From c36ad692b4971b880bd1d28924313601b71bff4e Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 8 Jul 2020 14:18:52 +0800 Subject: [PATCH] packages: sync to new packages --- CONTRIBUTING.md | 75 +- README.md | 4 +- admin/atop/Makefile | 53 + .../patches/010-makefile-missing-cflags.patch | 22 + admin/backuppc/Makefile | 68 + admin/backuppc/files/backuppc.init | 66 + admin/backuppc/files/backuppc.upgrade | 2 + admin/backuppc/files/fixup-config-pl.patch | 67 + admin/backuppc/files/setuidwrapper.c | 8 + admin/backuppc/patches/001-debian-fixes.patch | 99 + admin/debootstrap/Makefile | 11 +- admin/debootstrap/files/pkgdetails.c | 1 + .../debootstrap/patches/010-no-nvswitch.patch | 10 + admin/gkrellmd/Makefile | 61 + admin/gkrellmd/files/gkrellmd.init | 16 + admin/gkrellmd/patches/100-conf.patch | 35 + admin/htop/Makefile | 9 +- admin/ipmitool/Makefile | 5 +- ....1-compatibility-error-storage-size-.patch | 104 + ...iler-happier-about-changes-related-t.patch | 36 + ...ool-coredumps-in-EVP_CIPHER_CTX_init.patch | 53 + ...CIPHER_CTX_free-instead-of-EVP_CIPHE.patch | 144 + ...ompile-with-deprecated-APIs-disabled.patch | 47 + ...-Fix-buffer-overflow-vulnerabilities.patch | 128 + ...uffer-overflow-in-ipmi_spd_print_fru.patch | 48 + ...er-overflow-in-ipmi_get_session_info.patch | 48 + ...020-5208-channel-Fix-buffer-overflow.patch | 37 + ...er-overflows-in-get_lan_param_select.patch | 88 + ...u-sdr-Fix-id_string-buffer-overflows.patch | 137 + admin/monit/Makefile | 8 +- .../patches/001-fix-default-piddir.patch | 20 +- admin/muninlite/Makefile | 29 +- admin/muninlite/files/etc/xinetd.d/munin | 10 - admin/muninlite/files/etc/xinetd.d/muninlite | 10 + admin/muninlite/patches/001-fix_disks.patch | 10 - admin/muninlite/patches/002-hostname.patch | 11 - .../patches/100-fix-no-ethtool.patch | 21 - .../patches/110-fix-uptime-days.patch | 12 - admin/muninlite/patches/200-add-tap-dev.patch | 20 - .../patches/210-add-bridge-devs.patch | 24 - .../patches/220-modify-ifname-parser.patch | 22 - .../230-fix-available-interface-parsing.patch | 20 - admin/netatop/Makefile | 86 + .../patches/010-daemon-makefile-ldflags.patch | 13 + admin/netdata/Makefile | 16 +- admin/netdata/files/netdata.conf | 3 - admin/nyx/Makefile | 34 + admin/openwisp-config/Makefile | 3 +- admin/schroot/Config.in | 23 + admin/schroot/Makefile | 82 + admin/schroot/files/schroot.init | 10 + admin/schroot/patches/01-openwrt.patch | 219 + admin/sudo/Makefile | 17 +- .../patches/010-cross-compile-fixes.patch | 9 +- admin/sudo/patches/020-no-owner-change.patch | 7 +- .../patches/030-musl-fix-missing-header.patch | 12 - admin/syslog-ng/Makefile | 104 +- admin/syslog-ng/files/logread | 76 + .../files/scl/network_localhost/detect.sh | 6 + .../files/scl/network_localhost/plugin.conf | 1 + admin/syslog-ng/files/syslog-ng.conf | 52 +- admin/syslog-ng/files/syslog-ng.init | 34 +- .../patches/100-use-1.0.2k-threadids.patch | 35 - admin/zabbix/Makefile | 116 +- admin/zabbix/files/mac80211 | 4 +- admin/zabbix/files/network | 7 +- admin/zabbix/files/wifi | 3 +- .../zabbix/files/zabbix-network-ubus-acl.json | 8 + admin/zabbix/files/zabbix-wifi-ubus-acl.json | 8 + .../patches/002-fix-res_send-on-uclibc.patch | 35 - .../003-change-user-and-foreground.patch | 17 - .../patches/010-change-agentd-config.patch | 8 +- admin/zabbix/patches/100-musl-compat.patch | 23 - .../patches/110-reproducible-builds.patch | 12 +- devel/asu/Makefile | 56 + devel/asu/files/asu.defaults | 22 + devel/asu/files/asu.init | 40 + devel/autoconf/Makefile | 4 +- devel/automake/Makefile | 37 +- devel/diffutils/Makefile | 35 +- devel/gcc/Config.in | 34 + devel/gcc/Makefile | 100 +- devel/gcc/README | 6 +- .../001-revert_register_mode_search.patch | 14 +- devel/gcc/patches/002-case_insensitive.patch | 10 + .../gcc/patches/003-mpfr-longlong-mips.patch | 38 - devel/gcc/patches/010-documentation.patch | 14 +- devel/gcc/patches/020-no-plt-backport.patch | 28 - .../patches/040-fix-mips-ICE-PR-68400.patch | 23 - devel/gcc/patches/100-uclibc-conf.patch | 33 - devel/gcc/patches/110-Fix-MIPS-PR-84790.patch | 20 + devel/gcc/patches/200-musl_config.patch | 309 - devel/gcc/patches/201-musl_arm.patch | 43 - devel/gcc/patches/202-musl_mips.patch | 35 - devel/gcc/patches/203-musl_powerpc.patch | 209 - devel/gcc/patches/204-musl_sh.patch | 39 - devel/gcc/patches/205-musl_x86.patch | 41 - devel/gcc/patches/206-musl_aarch64.patch | 31 - devel/gcc/patches/207-musl_fixincludes.patch | 30 - devel/gcc/patches/209-musl_libstdc++.patch | 72 - devel/gcc/patches/230-musl_libssp.patch | 17 +- devel/gcc/patches/240-musl-libitm-fixes.patch | 61 - devel/gcc/patches/250-add-musl.patch | 120 - .../270-musl-add-powerpc-softfloat-fix.patch | 24 - .../300-mips_Os_cpu_rtx_cost_model.patch | 13 +- .../patches/800-arm_v5te_no_ldrd_strd.patch | 23 +- .../patches/810-arm-softfloat-libgcc.patch | 10 +- devel/gcc/patches/820-libgcc_pic.patch | 16 +- .../gcc/patches/830-arm_unbreak_armv4t.patch | 13 - .../840-armv4_pass_fix-v4bx_to_ld.patch | 11 +- devel/gcc/patches/850-use_shared_libgcc.patch | 13 +- devel/gcc/patches/851-libgcc_no_compat.patch | 10 + devel/gcc/patches/870-ppc_no_crtsavres.patch | 9 +- devel/gcc/patches/880-no_java_section.patch | 11 - devel/gcc/patches/881-no_tm_section.patch | 22 + devel/gcc/patches/900-bad-mips16-crt.patch | 21 + devel/gcc/patches/910-mbsd_multi.patch | 114 +- .../patches/920-specs_nonfatal_getenv.patch | 15 +- .../patches/930-fix-mips-noexecstack.patch | 6 +- devel/gcc/patches/930-osdefines.patch | 13 - ...ibffi-fix-MIPS-softfloat-build-issue.patch | 175 + .../patches/940-no-clobber-stamp-bits.patch | 24 +- .../950-cpp_file_path_translation.patch | 55 +- devel/gcc/patches/960-go_libm.patch | 11 - ...mpilation-when-making-cross-compiler.patch | 73 + devel/gcc/patches/970-warn_bug.patch | 11 - devel/libtool-bin/Makefile | 6 +- devel/lpc21isp/Makefile | 4 +- devel/lttng-modules/Makefile | 8 +- .../patches/001-mm_page_alloc_extfrag.patch | 10 - devel/lttng-tools/Makefile | 16 +- .../010-fix-compile-fails-for-x32-arch.patch | 45 + ...tgrnam-is-not-MT-Safe-use-getgrnam_r.patch | 345 + .../lttng-tools/patches/100-musl-compat.patch | 23 - .../lttng-tools/patches/200-use-extern.patch | 423 - devel/m4/Makefile | 5 +- devel/make/Makefile | 17 +- devel/meson/Makefile | 5 +- devel/ninja/Makefile | 4 +- devel/ninja/patches/010-musl.patch | 37 - devel/ninja/patches/020-uclibc.patch | 30 - devel/patch/Makefile | 4 +- devel/patch/patches/050-CVE-2019-13636.patch | 108 + .../060-CVE-2018-20969-CVE-2019-13638.patch | 38 + devel/pkg-config/Makefile | 18 +- devel/pkgconf/Makefile | 82 + ipv6/miredo/Makefile | 72 + ipv6/miredo/files/miredo.init | 17 + .../001-fix-musl-pthread-non-portable.patch | 24 + .../patches/002-fix-redefinition-ethadr.patch | 21 + .../003-fix-warnings-portable-defined.patch | 47 + kernel/antfs/Makefile | 44 + kernel/ksmbd/Makefile | 70 + .../ksmbd/patches/01-keep_kmod_metadata.patch | 11 + lang/chicken-scheme/Makefile | 150 + lang/dkjson/Makefile | 14 +- lang/erlang/Makefile | 133 +- .../patches/101-emulator_includes.patch | 11 - lang/erlang/patches/102-musl_compat.patch | 11 - lang/erlang/patches/103-disable_emacs.patch | 11 - lang/golang/golang-package.mk | 89 +- lang/golang/golang-values.mk | 30 +- lang/golang/golang/Makefile | 79 +- lang/jamvm/Makefile | 67 - ...-Use-fenv.h-instead-of-fpu_control.h.patch | 86 - lang/json4lua/Makefile | 14 +- lang/ldbus/Makefile | 40 +- lang/lpeg/Makefile | 8 +- lang/lua-bencode/Makefile | 9 +- lang/lua-bit32/Makefile | 59 + lang/lua-cjson/Makefile | 1 - lang/lua-copas/Makefile | 19 +- lang/lua-copas/patches/makefile.patch | 15 - lang/lua-coxpcall/Makefile | 6 +- lang/lua-ev/Makefile | 45 + lang/lua-libmodbus/Makefile | 40 + lang/lua-lsqlite3/Makefile | 25 +- lang/lua-md5/Makefile | 7 +- lang/lua-md5/patches/config.patch | 15 +- lang/lua-mobdebug/Makefile | 18 +- lang/lua-openssl/Makefile | 6 +- .../patches/0001-Revise-Makefile.patch | 265 +- .../patches/0010-Fix-Linkage.patch | 36 - .../0020-support-OPENSSL_NO_SSL3_METHOD.patch | 41 - .../0030-support-OPENSSL_NO_COMP.patch | 20 - lang/lua-penlight/Makefile | 14 +- lang/lua-rs232/Makefile | 51 +- .../patches/100-remove-build-timestamps.patch | 8 +- lang/lua-wsapi/Makefile | 17 +- lang/lua-xavante/Makefile | 19 +- lang/luaexpat/Makefile | 2 + lang/luafilesystem/Makefile | 6 +- lang/luajit/Makefile | 47 +- lang/luajit/patches/010-lua-path.patch | 4 +- lang/lualanes/Makefile | 19 +- lang/lualanes/patches/100-musl-compat.patch | 4 +- .../patches/200-fix-redef-error.patch | 12 + lang/luaposix/Makefile | 62 +- lang/luaposix/patches/100-eglibc-compat.patch | 30 - .../luaposix/patches/101-disable-curses.patch | 32 - .../102-disable-compat-deprecated.diff | 33 +- lang/luaposix/patches/900-disable-ldoc.patch | 13 + lang/luaposix/scripts/uname | 2 + lang/luarocks/Makefile | 30 +- .../patches/01_dont_modify_bin_shebang.diff | 2 +- lang/luasec/Makefile | 16 +- lang/luasec/patches/100-fix-compilation.patch | 28 + lang/luasoap/Makefile | 1 + lang/luasocket/Makefile | 73 +- .../patches/0001-Add-interface-support.patch | 38 +- .../patches/0301-Fix-mpc85xx-build.patch | 4 +- .../040-remove-fpic-and-warnings.patch | 14 + lang/luasql/Makefile | 30 +- lang/luasrcdiet/Makefile | 58 + lang/luv/Makefile | 12 +- lang/lzmq/Makefile | 6 +- lang/node-hid/Makefile | 4 +- lang/node-homebridge/Makefile | 4 +- lang/node-javascript-obfuscator/Makefile | 4 +- lang/node-serialport-bindings/Makefile | 4 +- lang/node-serialport/Makefile | 4 +- .../patches/001-turn_off_depends.patch | 10 +- lang/node/Makefile | 14 +- lang/node/patches/003-path.patch | 2 +- lang/node/patches/004-musl_support.patch | 2 +- lang/node/patches/006-mips64_support.patch | 4 +- ...necessary_libraries_for_host_execute.patch | 14 +- .../999-fix_missing_llhttp_depends.patch | 2 +- ...this_build_method_will_be_deprecated.patch | 8 +- lang/perl-authen-sasl-xs/Makefile | 4 +- lang/perl-authen-sasl/Makefile | 4 +- lang/perl-cgi/Makefile | 14 +- lang/perl-compress-bzip2/Makefile | 16 +- lang/perl-dbi/Makefile | 12 +- lang/perl-device-serialport/Makefile | 4 +- lang/perl-device-usb/Makefile | 10 +- ... => 110-just_assume_libusb_is_there.patch} | 0 .../140-avoid-libusb-name-conflicts.patch | 12 +- lang/perl-encode-locale/Makefile | 4 +- lang/perl-file-listing/Makefile | 4 +- lang/perl-file-rsyncp/Makefile | 57 + .../patches/001-no-subdirs.patch | 11 + lang/perl-file-sharedir-install/Makefile | 11 +- lang/perl-html-form/Makefile | 16 +- lang/perl-html-parser/Makefile | 5 +- lang/perl-html-tagset/Makefile | 4 +- lang/perl-html-tree/Makefile | 4 +- lang/perl-http-cookies/Makefile | 16 +- lang/perl-http-daemon/Makefile | 14 +- lang/perl-http-date/Makefile | 16 +- lang/perl-http-message/Makefile | 16 +- lang/perl-http-negotiate/Makefile | 4 +- lang/perl-http-server-simple/Makefile | 15 +- lang/perl-inline-c/Makefile | 11 +- .../100-inline_c-no_compile_hack.patch | 2 +- ...ne_c-make_system_typemap_overridable.patch | 2 +- lang/perl-inline/Makefile | 11 +- lang/perl-io-html/Makefile | 4 +- lang/perl-lockfile-simple/Makefile | 4 +- lang/perl-lwp-mediatypes/Makefile | 16 +- lang/perl-net-cidr-lite/Makefile | 48 + lang/perl-net-http/Makefile | 16 +- lang/perl-net-telnet/Makefile | 4 +- lang/perl-parse-recdescent/Makefile | 10 +- lang/perl-parse-yapp/Makefile | 64 + lang/perl-sub-uplevel/Makefile | 16 +- lang/perl-test-harness/Makefile | 15 +- lang/perl-test-warn/Makefile | 15 +- lang/perl-text-csv_xs/Makefile | 15 +- lang/perl-uri/Makefile | 16 +- lang/perl-www-curl/Makefile | 4 +- .../patches/210-curl_7.66_compat.patch | 56 + .../patches/220-curl_7.69_compat.patch | 11 + lang/perl-www-mechanize/Makefile | 16 +- lang/perl-www-robotrules/Makefile | 4 +- lang/perl-www/Makefile | 19 +- lang/perl-xml-parser/Makefile | 12 +- lang/perl-xml-parser/patches/030-expat.patch | 11 + lang/perl/Makefile | 12 +- lang/perl/files/base.config | 1 - lang/perl/files/mips64el.config | 21 + lang/perl/files/version.config | 2 +- lang/perl/patches/010-musl-compat.patch | 4 +- .../patches/020-storables-stacksize.patch | 7 - .../patches/110-always_use_miniperl.patch | 2 +- .../patches/120-remove-build-timestamp.patch | 8 +- .../301-fix_macos_static_linking.patch | 19 + lang/perl/patches/900-use-rm-force.patch | 8 +- .../patches/910-miniperl-needs-inc-dot.patch | 13 +- lang/perl/patches/920-fix-no-locale.patch | 44 +- .../perl/patches/998-Errno_errno.h_path.patch | 11 + ...999-fix-build-failure-against-gcc-10.patch | 103 + lang/perl/perlmod.mk | 6 +- lang/perl/perlver.mk | 2 +- lang/php7-pecl-dio/Makefile | 10 +- lang/php7-pecl-http/Makefile | 17 +- .../100_php_http_etag_bigendian_check.patch | 11 - .../patches/200-string_or_null_register.patch | 57 - lang/php7-pecl-http/patches/300-fix-73.patch | 55 - lang/php7-pecl-krb5/Makefile | 37 + lang/php7-pecl-libevent/Makefile | 12 +- lang/php7-pecl-mcrypt/Makefile | 35 + lang/php7-pecl-propro/Makefile | 2 +- lang/php7-pecl-raphf/Makefile | 6 +- lang/php7-pecl-redis/Makefile | 39 + lang/php7/Makefile | 171 +- lang/php7/files/php7-fastcgi.init | 4 +- ...-use-of-the-system-timezone-database.patch | 98 +- .../patches/0016-dont-gitclean-in-build.patch | 19 - .../patches/0032-Use-system-timezone.patch | 4 +- ...ove-build-timestamps-from-generated-.patch | 42 +- ...ation-icon-to-not-expose-the-reader-.patch | 2 +- .../0050-remove-build-timestamps.patch | 16 +- ...fix_membar_producer_link_error_gcc3x.patch | 11 - ...xt-opcache-fix-detection-of-shm-mmap.patch | 160 +- lang/php7/patches/1002-gd-iconv.patch | 14 - .../1003-Fix-dl-cross-compiling-issue.patch | 59 - .../patches/1004-disable-phar-command.patch | 4 +- lang/php7/patches/1006-multiline-syslog.patch | 178 - .../patches/1010-pcrelib-NativeMIPS.patch | 17 - ...12-php_iconv_string-null-out-pointer.patch | 69 - lang/python/Flask/Makefile | 5 +- lang/python/Jinja2/Makefile | 7 +- lang/python/MarkupSafe/Makefile | 3 +- lang/python/README.md | 300 +- lang/python/Werkzeug/Makefile | 5 +- lang/python/bcrypt/Makefile | 39 +- lang/python/click-log/Makefile | 3 +- lang/python/click/Makefile | 3 +- lang/python/django-appconf/Makefile | 40 +- lang/python/django-compressor/Makefile | 45 +- lang/python/django-constance/Makefile | 66 - lang/python/django-formtools/Makefile | 35 +- lang/python/django-jsonfield/Makefile | 38 +- lang/python/django-jsonfield2/Makefile | 49 + lang/python/django-picklefield/Makefile | 37 +- lang/python/django-postoffice/Makefile | 41 +- lang/python/django-ranged-response/Makefile | 35 +- lang/python/django-restframework/Makefile | 5 +- lang/python/django-restframework39/Makefile | 35 +- lang/python/django-simple-captcha/Makefile | 55 +- lang/python/django-statici18n/Makefile | 41 +- lang/python/django-webpack-loader/Makefile | 35 +- lang/python/django/Makefile | 12 +- lang/python/django1/Makefile | 57 +- lang/python/django1/files/django-admin | 23 - lang/python/flup/Makefile | 66 - lang/python/gunicorn/Makefile | 66 +- lang/python/itsdangerous/Makefile | 3 +- lang/python/numpy/Makefile | 50 + lang/python/openpyxl/Makefile | 44 +- lang/python/passlib/Makefile | 29 +- lang/python/pillow/Makefile | 35 +- lang/python/pyjwt/Makefile | 30 +- lang/python/pymysql/Makefile | 3 +- lang/python/pyodbc/Makefile | 41 +- lang/python/python-aiohttp-cors/Makefile | 3 +- lang/python/python-aiohttp/Makefile | 3 +- lang/python/python-appdirs/Makefile | 8 +- lang/python/python-asn1crypto/Makefile | 3 +- lang/python/python-astral/Makefile | 34 +- lang/python/python-async-timeout/Makefile | 3 +- lang/python/python-atomicwrites/Makefile | 7 +- lang/python/python-attrs/Makefile | 30 +- lang/python/python-automat/Makefile | 48 +- lang/python/python-awscli/Makefile | 51 +- lang/python/python-boto3/Makefile | 3 +- lang/python/python-botocore/Makefile | 45 +- lang/python/python-cached-property/Makefile | 35 + lang/python/python-cachelib/Makefile | 3 +- lang/python/python-cachetools/Makefile | 3 +- lang/python/python-certifi/Makefile | 34 +- lang/python/python-cffi/Makefile | 38 +- lang/python/python-chardet/Makefile | 34 +- lang/python/python-colorama/Makefile | 30 +- lang/python/python-constantly/Makefile | 30 +- lang/python/python-contextlib2/Makefile | 3 +- lang/python/python-crcmod/Makefile | 49 - lang/python/python-crypto/Makefile | 73 - .../patches/001-no-host-paths.patch | 11 - .../patches/002-fix-endianness-detect.patch | 13 - .../patches/003-omit-tests.patch | 19 - .../patches/100-CVE-2013-7459.patch | 106 - .../patches/101-CVE-2018-6594.patch | 51 - lang/python/python-cryptodome/Makefile | 42 +- lang/python/python-cryptodomex/Makefile | 39 +- lang/python/python-cryptography/Makefile | 49 +- .../001-disable-setup-requirements.patch | 10 - lang/python/python-curl/Makefile | 36 +- lang/python/python-dateutil/Makefile | 29 +- lang/python/python-decorator/Makefile | 10 +- lang/python/python-defusedxml/Makefile | 35 +- lang/python/python-distro/Makefile | 34 + lang/python/python-dns/Makefile | 41 +- lang/python/python-docker/Makefile | 40 + lang/python/python-dockerpty/Makefile | 35 + lang/python/python-docopt/Makefile | 35 + lang/python/python-docutils/Makefile | 31 +- lang/python/python-dotenv/Makefile | 35 + lang/python/python-dpkt/Makefile | 47 - lang/python/python-egenix-mx-base/Makefile | 47 - lang/python/python-enum34/Makefile | 52 - .../python-enum34/patches/001-omit-docs.patch | 18 - lang/python/python-et_xmlfile/Makefile | 30 +- lang/python/python-evdev/Makefile | 40 +- lang/python/python-flask-login/Makefile | 3 +- lang/python/python-futures/Makefile | 35 - lang/python/python-gmpy2/Makefile | 32 +- lang/python/python-gnupg/Makefile | 72 +- lang/python/python-host.mk | 95 - lang/python/python-hyperlink/Makefile | 34 +- lang/python/python-idna/Makefile | 36 +- lang/python/python-ifaddr/Makefile | 3 +- lang/python/python-incremental/Makefile | 30 +- lang/python/python-influxdb/Makefile | 3 +- lang/python/python-intelhex/Makefile | 3 +- lang/python/python-ipaddress/Makefile | 44 - lang/python/python-jdcal/Makefile | 30 +- lang/python/python-jmespath/Makefile | 30 +- lang/python/python-jsonpath-ng/Makefile | 3 +- lang/python/python-jsonschema/Makefile | 37 + lang/python/python-ldap/Makefile | 57 - lang/python/python-libmodbus/Makefile | 36 +- lang/python/python-lxml/Makefile | 72 +- lang/python/python-markdown/Makefile | 3 +- lang/python/python-more-itertools/Makefile | 5 +- lang/python/python-multidict/Makefile | 3 +- lang/python/python-mysqlclient/Makefile | 33 +- lang/python/python-netdisco/Makefile | 3 +- lang/python/python-oauthlib/Makefile | 30 +- lang/python/python-package-install.sh | 56 +- lang/python/python-package.mk | 153 - lang/python/python-packages/Makefile | 131 - lang/python/python-packages/README.md | 72 - lang/python/python-packaging/Makefile | 40 + lang/python/python-paho-mqtt/Makefile | 3 +- lang/python/python-paramiko/Makefile | 39 + lang/python/python-parsley/Makefile | 31 +- lang/python/python-pcapy/Makefile | 45 - .../python-pcapy/patches/010-libcxx.patch | 13 - lang/python/python-pluggy/Makefile | 43 + lang/python/python-ply/Makefile | 30 +- lang/python/python-psycopg2/Makefile | 55 - lang/python/python-py/Makefile | 8 +- lang/python/python-pyasn1-modules/Makefile | 34 +- lang/python/python-pyasn1/Makefile | 30 +- lang/python/python-pycparser/Makefile | 36 +- lang/python/python-pynacl/Makefile | 40 + lang/python/python-pyopenssl/Makefile | 37 +- lang/python/python-pyotp/Makefile | 3 +- lang/python/python-pyparsing/Makefile | 7 +- lang/python/python-pyptlib/Makefile | 46 - lang/python/python-pyrsistent/Makefile | 5 +- lang/python/python-pyserial/Makefile | 33 +- lang/python/python-pytest/Makefile | 54 + lang/python/python-pytz/Makefile | 35 +- lang/python/python-qrcode/Makefile | 40 +- lang/python/python-rcssmin/Makefile | 32 +- lang/python/python-requests-oauthlib/Makefile | 37 +- lang/python/python-requests/Makefile | 45 +- lang/python/python-rsa/Makefile | 30 +- lang/python/python-s3transfer/Makefile | 35 +- lang/python/python-schedule/Makefile | 3 +- lang/python/python-schema/Makefile | 10 +- lang/python/python-sentry-sdk/Makefile | 3 +- lang/python/python-service-identity/Makefile | 44 +- lang/python/python-simplejson/Makefile | 38 +- lang/python/python-six/Makefile | 34 +- lang/python/python-slugify/Makefile | 3 +- lang/python/python-sqlalchemy/Makefile | 3 +- lang/python/python-stem/Makefile | 3 +- lang/python/python-texttable/Makefile | 33 + lang/python/python-twisted/Makefile | 62 +- lang/python/python-txsocksx/Makefile | 52 - .../patches/001-omit-tests.patch | 9 - .../patches/002-do-not-use-vcversioner.patch | 27 - lang/python/python-urllib3/Makefile | 32 +- lang/python/python-version.mk | 15 - .../python-voluptuous-serialize/Makefile | 3 +- lang/python/python-voluptuous/Makefile | 31 +- lang/python/python-wcwidth/Makefile | 7 +- lang/python/python-websocket-client/Makefile | 36 + lang/python/python-yaml/Makefile | 39 +- lang/python/python-yarl/Makefile | 3 +- lang/python/python-zeroconf/Makefile | 3 +- lang/python/python-zipp/Makefile | 8 +- lang/python/python-zope-interface/Makefile | 32 +- lang/python/python/Config-python-light.in | 7 - lang/python/python/Makefile | 380 - lang/python/python/files/config.site | 12 - lang/python/python/files/python-config.in | 80 - .../python/files/python-package-codecs.mk | 23 - .../python/files/python-package-compiler.mk | 16 - .../python/files/python-package-ctypes.mk | 18 - lang/python/python/files/python-package-db.mk | 18 - .../python/files/python-package-decimal.mk | 16 - .../python/python/files/python-package-dev.mk | 27 - .../python/files/python-package-distutils.mk | 16 - .../python/files/python-package-email.mk | 16 - .../python/files/python-package-gdbm.mk | 16 - .../python/files/python-package-lib2to3.mk | 18 - .../python/files/python-package-logging.mk | 16 - .../files/python-package-multiprocessing.mk | 17 - .../python/files/python-package-ncurses.mk | 18 - .../python/files/python-package-openssl.mk | 17 - .../python/python/files/python-package-pip.mk | 30 - .../files/python-package-pkg-resources.mk | 28 - .../python/files/python-package-pydoc.mk | 18 - .../python/files/python-package-setuptools.mk | 31 - .../python/files/python-package-sqlite3.mk | 17 - .../python/files/python-package-unittest.mk | 16 - .../python/python/files/python-package-xml.mk | 20 - .../patches-setuptools/001-reproducible.patch | 16 - .../002-sorted-requires.patch | 16 - .../003-PKG-INFO-output-reproducible.patch | 14 - .../python/patches/001-enable-zlib.patch | 20 - ...dd-include-dirs-when-cross-compiling.patch | 12 - .../003-do-not-compile-tests-at-build.patch | 18 - .../004-do-not-write-bytes-codes.patch | 11 - .../patches/005-fix-bluetooth-support.patch | 57 - ...06-remove-multi-arch-and-local-paths.patch | 16 - .../007-distutils-do-not-adjust-path.patch | 10 - .../008-distutils-use-python-sysroot.patch | 50 - ...t-use-dblib_dir-when-cross-compiling.patch | 32 - ...add-rt-lib-dirs-when-cross-compiling.patch | 13 - ...12-add-support-source-date-epoch-pyc.patch | 10 - ...uildinfo-date-time-source-date-epoch.patch | 28 - .../021-compileall-add-recursion-option.patch | 31 - .../patches/024-musl-find_library.patch | 74 - lang/python/python/patches/025-utime.patch | 11 - ...test-to-get-float-byte-order-GH-9085.patch | 209 - ...po-34585-run-autoconf-GH-9411-edited.patch | 218 - lang/python/python3-asgiref/Makefile | 7 +- lang/python/python3-bottle/Makefile | 3 +- .../python3-django-cors-headers/Makefile | 7 +- .../python3-django-etesync-journal/Makefile | 3 +- .../python3-drf-nested-routers/Makefile | 3 +- lang/python/python3-find-stdlib-depends.sh | 434 + lang/python/python3-host.mk | 60 +- lang/python/python3-maxminddb/Makefile | 5 +- lang/python/python3-netifaces/Makefile | 3 +- lang/python/python3-package.mk | 216 +- lang/python/python3-packages/Makefile | 6 +- lang/python/python3-pyroute2/Makefile | 3 +- lang/python/python3-speedtest-cli/Makefile | 3 +- lang/python/python3-sqlparse/Makefile | 3 +- lang/python/python3-unidecode/Makefile | 3 +- lang/python/python3-version.mk | 6 +- lang/python/python3/Makefile | 136 +- .../python3/files/python3-package-dev.mk | 10 +- .../python3/files/python3-package-openssl.mk | 2 +- .../python3/files/python3-package-pip.mk | 4 +- .../files/python3-package-setuptools.mk | 4 + .../patches-pip/001-pep517-pyc-fix.patch | 13 + .../patches-setuptools/004-site-patch.patch | 14 + .../004-do-not-write-bytes-codes.patch | 2 +- .../014-remove-platform-so-suffix.patch | 4 +- .../patches/016-adjust-config-paths.patch | 4 +- .../020-ssl-module-emulate-tls-methods.patch | 15 +- .../patches/021-openssl-deprecated.patch | 12 +- lang/python/ruamel-yaml/Makefile | 31 +- lang/python/text-unidecode/Makefile | 31 +- lang/python/vobject/Makefile | 30 +- lang/python/xmltodict/Makefile | 3 +- lang/ruby/Makefile | 301 +- lang/ruby/patches/100-musl.patch | 24 + lang/ruby/ruby_find_pkgsdeps | 29 +- lang/ruby/ruby_missingfiles | 12 +- lang/tcl/Makefile | 51 +- .../100-disable_tzdata_and_msgs_install.patch | 22 - lang/tcl/patches/200-fix_mips_build.patch | 20 - lang/uuid/Makefile | 1 + lang/vala/Makefile | 79 +- libs/afalg_engine/Config.in | 43 + libs/afalg_engine/Makefile | 71 + libs/alsa-lib/Makefile | 45 +- libs/alsa-lib/patches/100-link_fix.patch | 8 +- libs/alsa-lib/patches/200-usleep.patch | 34 + libs/apr-util/Makefile | 157 +- .../patches/001-automake-compat.patch | 21 - .../patches/002-fix-gdbm-error-handling.patch | 79 + .../patches/003-support_mariadb.patch | 125 + .../patches/004-avoid_ldap_by_defaut.patch | 34 + .../005-apu_config_dont_list_indep_libs.patch | 31 + .../patches/006-avoid_db_by-default.patch | 35 + libs/apr/Makefile | 91 +- libs/apr/patches/001-autoconf-compat.patch | 26 - libs/apr/patches/001-cross-compile.patch | 56 + libs/apr/patches/002-sys-param-h.patch | 37 + libs/apr/patches/101-fix_apr_time_now.patch | 13 - .../patches/201-upgrade-and-fix-1.5.1.patch | 51 - ...ze-doesn-t-match-in-glibc-when-cross.patch | 73 + .../302-add-cache-for-strerror_r.patch | 30 + .../patches/303-add-cache-for-mmap-zero.patch | 25 + libs/avahi/Makefile | 11 +- libs/avahi/patches/010-pkgconfig.patch | 206 + libs/avro/Makefile | 56 - libs/boost/Makefile | 60 +- libs/boost/patches/001-uclibc-asio.patch | 29 +- libs/boost/patches/002-outcome-assert.patch | 11 + libs/boost/patches/002-utime-filesystem.patch | 71 - libs/boost/patches/003-beast-coroutines.patch | 1465 + libs/boost/patches/101-uclibc-ng-math.patch | 21 - libs/c-ares/Makefile | 5 +- libs/cereal/Makefile | 48 + libs/check/Makefile | 28 +- libs/classpath/Makefile | 90 - .../patches/010-double-memleak.patch | 91 - libs/confuse/Makefile | 7 +- libs/cyrus-sasl/Makefile | 13 +- libs/czmq/Makefile | 64 + libs/dtc/Makefile | 22 +- libs/dtndht/Makefile | 4 +- libs/elektra/Makefile | 88 +- libs/eventlog/Makefile | 44 - libs/faad2/Makefile | 29 +- libs/faad2/patches/030-sbr-ps-dec.patch | 20 + libs/fcgi/Makefile | 82 - .../fcgi/patches/100-fcgio-int-type-fix.patch | 38 - libs/fcgi/patches/110-no_examples.patch | 24 - libs/fcgi/patches/120-stdio.patch | 12 - libs/fftw3/Makefile | 121 - libs/fftw3/patches/001-makefile.patch | 20 - libs/file/Makefile | 34 +- libs/flac/Makefile | 20 +- .../patches/001-no-docs-and-examples.patch | 6 +- libs/flac/patches/005-gcc_debug_options.patch | 16 - libs/flac/patches/010-automake-compat.patch | 11 - libs/flac/patches/010-utime.patch | 118 + libs/freetype/Makefile | 60 +- libs/gdbm/Makefile | 21 +- .../999-001-fix-multiple-def-gcc-10.patch | 11 + libs/getdns/Makefile | 51 +- ...lude-linux-sysctl.h-in-getentropy_li.patch | 25 - .../getdns-1.6.0-fix-crosscompile.patch | 11 + libs/giflib/Makefile | 2 - libs/glpk/Makefile | 66 - libs/gnutls/Config.in | 4 - libs/gnutls/Makefile | 50 +- libs/google-authenticator-libpam/Makefile | 51 + libs/h2o/Makefile | 54 + libs/h2o/patches/100-socket_disable_npn.patch | 22 + .../200-libh2o-evloop_wslay-link.patch | 45 + .../patches/300-picotls-chacha-detect.patch | 17 + .../h2o/patches/400-backtrace-detection.patch | 74 + libs/h2o/patches/500-openssl.patch | 96 + libs/h2o/patches/600-engine.patch | 28 + libs/hiredis/Makefile | 10 +- libs/hiredis/patches/001-lvalue_fix.patch | 13 - .../patches/010-fix_pkconfig_file.patch | 34 + libs/ibrcommon/Makefile | 5 +- .../patches/010-build-with-openssl-1.1.patch | 353 + .../patches/020-openssl-deprecated.patch | 25 + libs/ibrdtn/Makefile | 3 +- ...10-Add-operator-to-Bundle-block_elem.patch | 25 + ...or-in-const-function-of-MemoryBundle.patch | 22 + ...d-streamoff-instead-of-std-streampos.patch | 41 + ...-operator-to-BundleID-and-MetaBundle.patch | 53 + libs/icu/Makefile | 8 +- .../020-ICU-20958_CVE-2020-10531.patch | 118 + libs/ipfs-http-client/Makefile | 82 + .../patches/001-add-srv-addr.patch | 247 + libs/jansson/Makefile | 52 - libs/jose/Makefile | 74 + .../010-fix_minor_leak_upstream_198f720.patch | 33 + .../jose/patches/020-openssl-deprecated.patch | 21 + libs/json-glib/Makefile | 83 + libs/jsoncpp/Makefile | 69 + libs/keyutils/Makefile | 6 +- libs/leptonica/Makefile | 53 + libs/libaio/Makefile | 38 +- libs/libaio/patches/001_arches.patch | 479 +- libs/libaio/patches/002_arches_sh.patch | 115 +- .../patches/003_arches_mips_fix_padding.patch | 38 + libs/libaio/patches/003_arches_sparc64.patch | 117 - libs/libaio/patches/004_arches_x32.patch | 59 +- libs/libaio/patches/005_arches_mips.patch | 63 - .../patches/006_arches_mips_fix_padding.patch | 37 - libs/libantlr3c/Makefile | 9 +- libs/libarchive/Makefile | 76 +- libs/libartnet/Makefile | 60 - libs/libartnet/patches/001-bswap_16.patch | 12 - libs/libaudiofile/Makefile | 71 - ...-gcc6-fix-left-shift-negative-number.patch | 18 - .../020-remove-tests-examples-docs.patch | 25 - .../patches/030-CVE-2015-7747.patch | 19 - ...ays-check-the-number-of-coefficients.patch | 34 - ...ues-to-fix-index-overflow-in-IMA.cpp.patch | 37 - ...multiplication-overflow-in-sfconvert.patch | 70 - ...ail-when-error-occurs-in-parseFormat.patch | 35 - ...lication-overflow-in-MSADPCM-decodeS.patch | 120 - ...x-signature-of-multiplyCheckOverflow.patch | 40 - ...k-for-division-by-zero-in-BlockCodec.patch | 21 - libs/libavl/Makefile | 55 - .../patches/010-update_GNUmakefile.patch | 45 - libs/libcanfestival/Makefile | 73 - .../patches/001-sigval-ref-fix.patch | 11 - .../patches/002-makefile-gcc-linker.patch | 33 - .../patches/003-makefile-skip-examples.patch | 20 - .../patches/004-override-cflags.patch | 44 - libs/libcap-ng/Makefile | 90 + .../patches/add_library_if_header_found.patch | 30 + libs/libcap-ng/patches/fix-includes.patch | 11 + .../patches/fix_build_without_threads.patch | 26 + libs/libcap/Makefile | 64 +- libs/libcap/patches/100-portability.patch | 19 - .../200-change-hardcoded-shell-to-sh.patch | 34 - libs/libcap/patches/300-disable-tests.patch | 10 + libs/libcgroup/Makefile | 65 + libs/libcgroup/patches/010-cdefs.patch | 240 + libs/libcoap/Makefile | 31 +- libs/libconfig/Makefile | 61 + libs/libcups/Makefile | 97 + libs/libdaq/Makefile | 19 +- libs/libdaq/patches/001-compile.patch | 7 +- libs/libdaq/patches/100-musl-compat.patch | 15 +- libs/libdmapsharing/Makefile | 26 +- .../patches/001-disable_pixbuf.patch | 2 +- libs/libdnet/patches/001-compile.patch | 20 - libs/libdouble-conversion/Makefile | 68 - libs/libdrm/Makefile | 59 +- .../000-remove-dep-on-pthread-stubs.patch | 101 - libs/libebml/Makefile | 49 + libs/libedit/Makefile | 5 +- libs/libesmtp/Makefile | 15 +- libs/libesmtp/patches/100-openssl-1.1.patch | 92 + .../200-add-TLSv1_1-TLSv1_2-support.patch | 36 + libs/libestr/Makefile | 12 +- libs/libev/Makefile | 4 +- libs/libevdev/Makefile | 22 +- ...s-fix-compilation-with-older-kernels.patch | 49 + ...010-no-clock-monotonic-raw-in-uclibc.patch | 14 - libs/libevhtp/Makefile | 46 +- .../libevhtp/patches/010-openssl-thread.patch | 29 + .../patches/010-strcmp-endianness-fix.patch | 49 - libs/libexif/Makefile | 1 + libs/libextractor/Makefile | 8 +- libs/libextractor/patches/010-musl.patch | 13 + libs/libfastjson/Makefile | 13 +- libs/libffi/Makefile | 43 +- .../patches/002-fix-toolexeclibdir-path.patch | 31 - .../patches/100-fix_mips_softfloat.patch | 174 +- libs/libffi/patches/200-ppc.patch | 36 + libs/libfmt/Makefile | 32 +- libs/libfstrm/Makefile | 61 + libs/libftdi/Makefile | 30 +- libs/libftdi1/Makefile | 38 +- libs/libftdi1/patches/101-use-findSWIG.patch | 11 + libs/libfuse3/Makefile | 68 + libs/libgabe/Makefile | 47 + libs/libgabe/patches/010-shared-library.patch | 51 + libs/libgd/Makefile | 110 +- libs/libgd/patches/010-getlib.patch | 61 + libs/libgd/patches/100-no-cxx.patch | 28 + libs/libgd/patches/101-gdlib-config.patch | 20 - libs/libgd/patches/102-gdlib-pc-in.patch | 9 - libs/libgd/patches/200-uclibc-ceill.patch | 24 - .../patches/220-exclude_host_headers.patch | 11 + libs/libgee/Makefile | 32 +- .../libgee-0.18.0-no-introspection.patch | 102 - libs/libglog/Makefile | 52 - libs/libgpg-error/Makefile | 10 +- .../patches/020-gawk5-support.patch | 158 - libs/libgphoto2/Makefile | 16 +- .../patches/001-automake-compat.patch | 12 +- ...2-no-docs-examples-test-translations.patch | 36 +- libs/libgpiod/Makefile | 43 +- libs/libhttp-parser/Makefile | 6 +- .../patches/000-fix_darwin_error.patch | 10 +- libs/libical/Makefile | 43 +- .../001-disable-icu-and-bdb-support.patch | 81 + libs/libid3tag/Makefile | 8 + libs/libid3tag/src/id3tag.pc | 11 + libs/libidn/Makefile | 5 +- libs/libidn2/Makefile | 15 +- libs/libiio/Makefile | 9 +- ...date-channel-type-and-modifier-lists.patch | 80 + libs/libimobiledevice/Makefile | 50 +- .../libimobiledevice/patches/020-config.patch | 11 + libs/libinput/Makefile | 25 +- libs/libinput/patches/001-no-locale.patch | 38 - libs/libinput/patches/002-static_assert.patch | 14 - libs/libirecovery/Makefile | 84 + libs/libjpeg/Makefile | 8 +- libs/liblo/Makefile | 34 +- libs/liblo/patches/001-fix-musl-include.patch | 11 - libs/liblo/patches/010-index.patch | 15 + libs/liblo/patches/020-usleep.patch | 20 + libs/liblz4/Config.in | 7 + libs/liblz4/Makefile | 82 +- libs/liblz4/patches/010-utime.patch | 72 + libs/libmad/Makefile | 3 +- .../101-CVE-2017-8374-length-check.patch | 817 + ...-CVE-2017-8373-CVE-2017-8372-md-size.patch | 58 + libs/libmariadb/Makefile | 188 + .../libmariadb}/conf/50-client.cnf | 0 libs/libmariadb/files/mysql_config | 61 + .../patches/fix-ucontext-header.patch | 11 + libs/libmatroska/Makefile | 48 + libs/libmaxminddb/Makefile | 4 +- libs/libmbim/Makefile | 8 +- libs/libmcrypt/Makefile | 1 + libs/libmicrohttpd/Makefile | 34 +- libs/libmms/Makefile | 1 + libs/libmodbus/Makefile | 10 +- ...T_-macros-in-case-of-negative-values.patch | 35 + libs/libmpdclient/Makefile | 19 +- libs/libmraa/Makefile | 108 +- libs/libmraa/patches/0001-base.patch | 118 - .../patches/0002-add-mips-support.patch | 483 - libs/libmraa/patches/0003-uart.patch | 26 - libs/libmraa/patches/0004-fixes.patch | 666 - libs/libmraa/patches/010-version.patch | 16 + libs/libnatpmp/Makefile | 29 +- .../patches/001-install_declspec.patch | 11 - libs/libnatpmp/patches/010-cmake.patch | 53 + libs/libndpi/Makefile | 57 +- libs/libnet-1.2.x/Makefile | 2 +- libs/libnetconf2/Makefile | 51 +- .../patches/001-cmake_not_updated.patch | 11 + libs/libnetfilter-acct/Makefile | 13 +- libs/libnopoll/Makefile | 19 +- .../patches/001-param_h_rename.patch | 66 - .../patches/010-openssl-deprecated.patch | 87 + libs/libnpupnp/Makefile | 51 + libs/libogg/Makefile | 19 +- libs/liboping/Makefile | 11 +- libs/libopusenc/Makefile | 51 + libs/liborcania/Makefile | 45 + libs/libowfat/Makefile | 10 +- libs/libowfat/patches/001-fixbuild.patch | 4 +- libs/libowfat/patches/010-gcc10.patch | 11 + libs/libp11/Makefile | 17 +- libs/libp11/patches/001-fix-install.patch | 17 +- libs/libpam/Makefile | 60 +- ...uild-always-use-lib-instead-of-lib64.patch | 2 +- ..._rhosts-if-neither-ruserok-nor-ruser.patch | 77 - ..._lastlog-when-logwtmp-is-not-availab.patch | 60 - ...when-crypt-is-not-part-of-crypt_libs.patch | 28 - .../patches/0005-build-fix-doc-build.patch | 133 - ...pilation-in-case-rpc-rpc.h-is-missin.patch | 29 - ...innetgr-is-available-at-compile-time.patch | 106 - libs/libpam/patches/010-crypt.patch | 35 + libs/libpam/patches/020-fgetpwent_r.patch | 110 + libs/libpbc/Makefile | 52 + libs/libpbc/patches/010-pass-cflags.patch | 10 + libs/libpfring/Makefile | 90 + .../patches/0001-fix-cross-compiling.patch | 32 + libs/libplist/Makefile | 56 +- libs/libpng/Makefile | 45 +- libs/libpng/patches/101-old-libtool.patch | 13 - libs/libpng/patches/200-ccache.patch | 19 + libs/libpsl/Makefile | 65 + libs/libqmi/Makefile | 8 +- libs/libradcli/Makefile | 9 +- libs/libradiotap/Makefile | 50 + libs/libre2/Makefile | 48 + libs/libre2/patches/010-cxx17.patch | 23 + libs/libredblack/Makefile | 31 +- libs/libsamplerate/Makefile | 4 +- libs/libsearpc/Makefile | 30 +- .../patches/001-fix-memory-leak-GH-48.patch | 19 - .../patches/001-no-python-compile.patch | 8 + libs/libseccomp/Makefile | 10 +- libs/libshout/Makefile | 23 +- libs/libshout/patches/120-vorbis-c.patch | 2 +- libs/libshout/patches/130-usleep.patch | 14 + .../patches/140-no_example_doc_win32.patch | 19 - libs/libsigc++/Makefile | 63 - .../patches/001-no_doc_tests_examples.patch | 22 - libs/libsndfile/Makefile | 31 +- libs/libsoc/Makefile | 8 +- libs/libsodium/Makefile | 18 +- libs/libsoup/Makefile | 47 +- libs/libsoxr/Makefile | 16 +- libs/libsoxr/patches/020-pkgconfig.patch | 56 + libs/libssh/Makefile | 33 +- ...libcrypto-compat-add-extra-functions.patch | 73 + ...ibcrypto-remove-deprecated-API-usage.patch | 63 + libs/libssh2/Config.in | 15 - libs/libssh2/Makefile | 26 +- libs/libstrophe/Makefile | 19 +- libs/libtalloc/Makefile | 61 +- .../100-Remove_libbsd_dependency_check.patch | 58 + libs/libtasn1/Makefile | 3 +- libs/libtasn1/patches/001-fix-c99-error.patch | 12 - libs/libtins/Config.in | 32 + libs/libtins/Makefile | 56 +- libs/libtins/patches/010-pkgconfig.patch | 10 + .../110-fix_ch_switch_timing_value.patch | 11 + libs/libtirpc/Makefile | 19 +- libs/libtirpc/patches/001-musl.patch | 18 - libs/libtorrent/Makefile | 42 +- libs/libtorrent/patches/010-usleep.patch | 54 + .../patches/100-fix_cross_compile.patch | 41 - libs/libudev-fbsd/Makefile | 24 +- .../libudev-fbsd/patches/001-fix-unused.patch | 42 - .../patches/002-replace-nitems.patch | 11 - .../003-add-pkg-config-description.patch | 2 +- libs/libudev-fbsd/patches/005-extern-c.patch | 23 +- .../100-add-stub-udev_device_get_driver.patch | 4 +- ...ev_device_new_from_subsystem_sysname.patch | 8 +- ...b-udev_enumerate_add_nomatch_sysattr.patch | 6 +- libs/libuecc/Makefile | 4 +- libs/libugpio/Makefile | 8 +- libs/libuhttpd/Makefile | 6 +- libs/libulfius/Makefile | 70 + libs/libunistring/Makefile | 6 +- libs/libupm/Makefile | 379 +- libs/libupm/patches/001-version.patch | 16 +- libs/libupm/patches/002-at42qt1070-id.patch | 2 +- libs/libupm/patches/003-link-atomic.patch | 8 + libs/libupm/patches/003-lsm303-args.patch | 11 - libs/libupm/patches/004-uint8_t.patch | 106 + libs/libupnp/Makefile | 47 +- libs/libupnpp/Makefile | 6 +- libs/liburcu/Makefile | 17 +- libs/liburing/Makefile | 59 + .../000-OPENWRT-add-int64_t-detection.patch | 11 + libs/libusbmuxd/Makefile | 38 +- libs/libuvc/Makefile | 53 - libs/libuwifi/Makefile | 53 + libs/libuwsc/Makefile | 112 +- libs/libuwsc/patches/001-fix_find_lua.patch | 23 + libs/libvorbis/Makefile | 1 + libs/libvpx/Makefile | 41 +- libs/libwebsockets/Makefile | 10 +- ...eLists-build-reproducible-by-default.patch | 78 - .../patches/020-fix-travis.patch | 14 + libs/libwslay/Makefile | 56 + libs/libwslay/patches/100-disable-doc.patch | 26 + libs/libx264/Makefile | 59 +- .../001-fix-x32-build-by-disabling-asm.patch | 48 + ...-dont-default-to-cortex-a9-with-neon.patch | 28 + libs/libxcrypt/Makefile | 55 + libs/libxerces-c/Makefile | 50 +- .../0001-fix-configure-cross-compiling.patch | 4 +- libs/libxml2/Makefile | 19 +- libs/libxslt/Makefile | 36 +- .../patches/100-fix-cve-2019-11068.patch | 120 - .../patches/101-fix-cve-2019-13117.patch | 29 - .../patches/102-fix-cve-2019-13118.patch | 71 - libs/libyaml-cpp/Makefile | 45 +- libs/libyang/Makefile | 67 +- libs/libyang/patches/001-fix-musl-issue.patch | 47 - libs/libyubikey/Makefile | 47 + libs/libzdb/Makefile | 91 - .../patches/010-cross-compile-fixes.patch | 186 - .../020-filterh-use-host-built-version.patch | 20 - libs/libzdb/patches/030-openssl-1.1.patch | 11 - libs/libzip/Makefile | 136 + libs/lmdb/Makefile | 98 + libs/lmdb/patches/010-fix-makefile.patch | 23 + libs/lmdb/src/liblmdb.pc | 12 + libs/log4cplus/Makefile | 60 + libs/loudmouth/Makefile | 28 +- .../patches/002-fix-comparison.patch | 12 + libs/loudmouth/patches/010-add-private.patch | 277 + .../patches/020-openssl-deprecated.patch | 14 + libs/lttng-ust/Makefile | 17 +- .../lttng-ust/patches/001-no_docs_tests.patch | 4 +- libs/lttng-ust/patches/002-examples.patch | 18 - libs/measurement-kit/Makefile | 78 + libs/minizip/Makefile | 66 + libs/minizip/patches/010-disable-libbsd.patch | 55 + libs/mtdev/Makefile | 8 +- libs/mxml/Makefile | 16 +- libs/mxml/patches/001-targets.patch | 11 - libs/neon/Makefile | 23 +- .../neon/patches/010-openssl-deprecated.patch | 15 + libs/newt/Makefile | 125 + .../002-use-target-ar-python-config.patch | 25 + .../patches/python_memory_allocation.patch | 35 + libs/nlohmannjson/Makefile | 38 + libs/nspr/Makefile | 87 + ...le.in_rm_BUILD_STRING_and_BUILD_TIME.patch | 103 + .../patches/002-native_and_musl_fix.patch | 23 + libs/nspr/patches/010-sgidefs.patch | 11 + libs/nss/Makefile | 155 + libs/nss/files/blank-cert9.db | Bin 0 -> 28672 bytes libs/nss/files/blank-key4.db | Bin 0 -> 36864 bytes libs/nss/files/system-pkcs11.txt | 5 + libs/nss/patches/001-nss_standalone.patch | 253 + libs/nss/patches/002-os_test.patch | 18 + libs/nss/patches/003-openwrt_fix.patch | 86 + libs/nss/patches/010-nanosleep.patch | 33 + libs/oniguruma/Makefile | 10 +- libs/open-vm-tools/Makefile | 117 - ...10-Use-uintmax_t-for-handling-rlim_t.patch | 14 - ...ve-musl-does-not-implement-res_ninit.patch | 46 - libs/opencv/Makefile | 73 - libs/opencv/README.md | 23 - libs/openldap/patches/800-implicit.patch | 10 + libs/opus/Makefile | 17 +- libs/opusfile/Makefile | 53 + libs/p11-kit/Makefile | 35 +- libs/pcre/Config.in | 11 + libs/pcre/Makefile | 33 +- libs/pcre2/Config.in | 30 + libs/pcre2/Makefile | 24 +- libs/pixman/Makefile | 11 +- ...4-pixman-fix-detection-of-mips-dspr2.patch | 2 +- .../0005-pixman-arm-neon-assembler-fix.patch | 17 - libs/poco/Makefile | 65 +- libs/poco/patches/100-configure.patch | 14 +- libs/poco/patches/200-strerror.patch | 4 +- libs/postgresql/Makefile | 46 +- libs/postgresql/files/postgresql.init | 5 +- .../patches/001-configure_fixes.patch | 44 +- libs/postgresql/patches/200-ranlib.patch | 4 +- libs/postgresql/patches/300-fix-pc-file.patch | 33 + .../patches/900-pg_ctl-setuid.patch | 24 +- libs/protobuf-c/Makefile | 38 +- libs/protobuf-c/patches/010-pkgconfig.patch | 40 + libs/protobuf/Makefile | 52 +- libs/protobuf/patches/010-rpath.patch | 24 + libs/psqlodbc/Makefile | 18 +- libs/pthsem/Makefile | 12 +- libs/pugixml/Makefile | 51 + libs/qrencode/Makefile | 15 +- libs/quasselc/Makefile | 26 +- .../patches/001-respect-cflags-ldflags.patch | 17 +- libs/redis/Makefile | 99 + libs/redis/files/redis.init | 17 + libs/redis/patches/020-fix-atomicvar.patch | 22 + .../patches/030-fix-uclibc-compilation.patch | 25 + libs/rpcsvc-proto/Makefile | 14 +- libs/rxtx/Makefile | 49 - libs/rxtx/patches/010-acm-devices.patch | 11 - libs/sbc/Makefile | 8 +- libs/serdisplib/Makefile | 80 + .../patches/002-allow-1bpp-framebuffer.patch | 21 + .../patches/010-cross-compile.patch | 101 + libs/slang2/Makefile | 190 + .../patches/001-skip-terminfo-dir-test.patch | 11 + libs/slang2/patches/002-use-target-ar.patch | 11 + libs/spdlog/Makefile | 54 + libs/speex/Makefile | 2 + libs/speexdsp/Makefile | 9 +- libs/spice-protocol/Makefile | 13 +- libs/spice/Makefile | 8 +- .../spice/patches/0001-build-skip-tests.patch | 26 + ..._set_ecdh_auto-call-for-some-old-Ope.patch | 48 - .../0002-build-tools-fix-build-failure.patch | 24 + ...tion-without-deprecated-OpenSSL-1.1-.patch | 78 - libs/sqlite3/Config-cli.in | 24 + libs/sqlite3/Config-lib.in | 47 + libs/sqlite3/Config.in | 18 - libs/sqlite3/Makefile | 89 +- libs/taglib/Makefile | 57 + libs/tcp_wrappers/Makefile | 4 +- .../patches/006-compilation-warnings.patch | 765 + libs/tdb/Makefile | 18 +- .../100-Remove_libbsd_dependency_check.patch | 29 +- libs/tiff/Makefile | 70 +- libs/tiff/patches/001-autoconf-compat.patch | 2 +- libs/tiff/patches/005-fix-ftell-macro.patch | 2 +- libs/tiff/patches/020-CVE-2018-5784.patch | 128 - libs/tiff/patches/021-CVE-2018-7456.patch | 170 - libs/tiff/patches/022-CVE-2017-9935.patch | 164 - libs/tiff/patches/023-CVE-2017-18013.patch | 36 - libs/tiff/patches/024-CVE-2018-8905.patch | 53 - libs/tiff/patches/025-CVE-2018-10963.patch | 31 - libs/tiff/patches/026-CVE-2017-11613.patch | 44 - libs/tinycdb/Makefile | 30 +- libs/unixodbc/Makefile | 31 +- libs/vips/Makefile | 57 +- libs/vips/patches/001-no_introspection.patch | 14 +- .../vips/patches/010-reproducible-build.patch | 20 + libs/websocketpp/Makefile | 37 + libs/xmlrpc-c/Makefile | 12 +- libs/xmlrpc-c/patches/001-config.mk.in.patch | 11 - .../patches/002-automake-compat.patch | 13 - libs/xmlrpc-c/patches/010-nanosleep.patch | 20 + libs/xr_usb_serial_common/Makefile | 2 +- libs/yajl/Makefile | 33 +- libs/yaml/Makefile | 13 +- libs/yubico-pam/Makefile | 51 + libs/zmq/Makefile | 35 +- ...sable_pedantic_on_linux_with_ulibc++.patch | 14 - ...0-map_with_const_string_with_ublic++.patch | 31 +- libs/zmq/patches/050-nanosleep.patch | 54 + .../patches/100-fix-cxx-include-order.patch | 84 - mail/alpine/Makefile | 30 +- .../100-no-openssl-check-cross-compile.patch | 29 - mail/bogofilter/Makefile | 18 +- mail/clamsmtp/Makefile | 2 +- mail/clamsmtp/patches/010-fix-build.patch | 19 + mail/dovecot/Config.in | 40 + mail/dovecot/Makefile | 98 +- mail/dovecot/patches/001-configure_in.patch | 116 +- ...fix-dovecot-config-for-cross-compile.patch | 56 + .../patches/100-openssl-deprecated.patch | 63 + mail/dovecot/patches/110-openssl-engine.patch | 87 + mail/emailrelay/Makefile | 40 +- mail/emailrelay/files/emailrelay.config | 6 + mail/emailrelay/files/emailrelay.init | 9 +- mail/emailrelay/patches/010-openssl-1.1.patch | 38 + mail/emailrelay/patches/010-ssl3-fix.patch | 13 - mail/fdm/Makefile | 19 +- .../010-Compat-fixes-from-Rosen-Penev.patch | 388 - mail/fdm/patches/010-ntop-fix.patch | 9 + .../020-Fix-compile-with-OpenSSL-1.1.0.patch | 13 +- mail/fdm/patches/040-openssl-1.1.patch | 31 - mail/mailman/Makefile | 126 - mail/mailman/files/mailman.init | 22 - mail/mailman/patches/100-postfix.patch | 12 - .../mailman/patches/200-nohostdnspython.patch | 68 - mail/mailman/patches/300-targetpython.patch | 12 - mail/mailman/patches/400-modules.patch | 35 - mail/mailsend/Makefile | 6 +- ...001-OpenSSL-1.1-support-for-HMAC-api.patch | 49 + ...oved-API-deprecated-by-OpenSSL-1.1.0.patch | 73 + mail/msmtp-scripts/Makefile | 141 - mail/msmtp-scripts/files/msmtpq-ng-mta.init | 17 - mail/msmtp-scripts/files/msmtpq-ng.rc | 18 - mail/msmtp/Makefile | 47 +- mail/mutt/Makefile | 15 +- mail/nail/Makefile | 2 +- mail/nail/patches/010-remove-gssapi.patch | 52 + ...0-handle-openssl-without-sslv2-sslv3.patch | 2 +- .../patches/200-handle-openssl-no-egd.patch | 14 + .../nail/patches/300-openssl-deprecated.patch | 47 + mail/opendkim/Makefile | 3 +- .../patches/010-openssl_1.1_compat.patch | 202 + mail/opendkim/patches/020-uclibc.patch | 20 + mail/pigeonhole/Makefile | 18 +- mail/postfix/Makefile | 22 +- mail/postfix/files/postfix.init | 2 +- mail/postfix/patches/100-fsstat.patch | 12 - mail/postfix/patches/200-manpages.patch | 22 +- .../patches/300-bdb_hash_segfault.patch | 6 +- mail/postfix/patches/400-cdb.patch | 7 +- mail/postfix/patches/500-crosscompile.patch | 8 +- mail/postfix/patches/501-include_stdio.patch | 2 +- mail/postfix/patches/600-nopostconf.patch | 7 +- mail/postfix/patches/700-defaultconfig.patch | 9 +- mail/postfix/patches/800-fmt.patch | 7 +- .../patches/900_less_overlayfs_rewrites.patch | 7 +- ...ookup-Fix-compilation-with-uClibc-ng.patch | 36 + mail/sendmail/Makefile | 3 +- mail/sendmail/files/OpenWrt | 2 +- mail/sendmail/files/sharedlibrary.m4 | 2 +- mail/sendmail/patches/200-openssl-1.1.1.patch | 255 + .../patches/201-openssl-1.1.1-ecdhe.patch | 20 + .../patches/202-openssl-deprecated.patch | 76 + mail/ssmtp/Makefile | 5 +- .../patches/020-openssl-deprecated.patch | 13 + multimedia/crtmpserver/Makefile | 99 - multimedia/crtmpserver/files/crtmpserver.init | 30 - .../patches/010-link-crypt-for-lua.patch | 11 - .../crtmpserver/patches/020-add-rpath.patch | 13 - .../patches/030-default-config.patch | 51 - .../crtmpserver/patches/040-use-select.patch | 11 - .../050-add-missing-make-defines.patch | 41 - .../patches/060-add-missing-includes.patch | 26 - .../patches/070-missing-include-gcc-47.patch | 10 - .../patches/080-disable-apple-streaming.patch | 12 - .../patches/080-musl-uint32_t.patch | 91 - multimedia/ffmpeg/Config.in | 14 - multimedia/ffmpeg/Makefile | 84 +- ...20-ffmpeg-fix-build-with-fdk-aac-2.0.patch | 92 - .../ffmpeg/patches/030-fdkaac-version.patch | 90 - multimedia/ffmpeg/patches/030-h264-mips.patch | 16 + .../ffmpeg/patches/040-fdkaac-eld.patch | 67 - .../ffmpeg/patches/050-fdkaac-define.patch | 63 - multimedia/ffmpeg/patches/050-glibc.patch | 10 + multimedia/gerbera/Makefile | 85 + multimedia/gerbera/files/gerbera.config | 6 + multimedia/gerbera/files/gerbera.init | 48 + multimedia/gerbera/patches/010-iconv.patch | 36 + multimedia/gerbera/patches/020-pid.patch | 41 + multimedia/gerbera/patches/030-unistd.patch | 74 + multimedia/gerbera/patches/040-npupnp.patch | 485 + multimedia/gphoto2/Makefile | 4 +- .../gphoto2/patches/001-automake-compat.patch | 20 +- .../gphoto2/patches/002-no-docs-test.patch | 18 +- multimedia/graphicsmagick/Makefile | 104 + multimedia/grilo-plugins/Makefile | 39 +- ...ilo-plugins-0.3.5-no-itstool-xmllint.patch | 122 - .../patches/001-no-help-po-tests.patch | 15 + .../patches/010-backport-fix-whitespace.patch | 1250 + ...0-backport-add-missing-calls-to-free.patch | 33 + .../030-backport-libdmapsharing4.patch | 1490 + multimedia/grilo/Makefile | 36 +- multimedia/grilo/files/grilo-0.3.vapi | 451 +- multimedia/grilo/files/grilo-net-0.3.vapi | 12 +- multimedia/gst1-libav/Makefile | 20 +- multimedia/gst1-plugins-bad/Makefile | 57 +- multimedia/gst1-plugins-base/Makefile | 34 +- multimedia/gst1-plugins-good/Makefile | 103 +- multimedia/gst1-plugins-ugly/Makefile | 7 +- multimedia/gstreamer1/Makefile | 12 +- .../patches/001-no-translations.patch | 28 - multimedia/icecast/Makefile | 9 +- .../patches/001-icecast-2.4.0-tremor.patch | 94 +- .../patches/005-no_examples_doc_win32.patch | 2 +- .../patches/010-fix_libcurl_test_crap.patch | 2 +- .../020-icecast_config_for_openwrt.patch | 2 +- multimedia/imagemagick/Makefile | 141 + multimedia/lcdgrilo/Makefile | 19 +- .../patches/010-remove-check-dependency.patch | 10 + multimedia/lcdgrilo/patches/020-vala.patch | 11 + multimedia/minidlna/Makefile | 52 +- multimedia/minidlna/files/minidlna.config | 5 +- multimedia/minidlna/files/minidlna.init | 96 +- multimedia/minidlna/files/minidlna.sysctl | 2 + .../patches/001-dont-build-po-files.patch | 25 + .../patches/001-support-ape-format.patch | 47 - .../patches/002-dont-build-po-files.patch | 25 - .../patches/005-added-support-RMVB.patch | 64 + multimedia/minidlna/patches/010-lg.patch | 24 + .../minidlna/patches/010-libav-fix.patch | 19 - .../patches/020-add-support-for-dsd.patch | 981 - ...ntainer_definitions_into_a_structure.patch | 124 + .../patches/030-add-rm-rmbv-webm-format.patch | 68 - ...tances_of_magic_container_s_as_const.patch | 125 + multimedia/minidlna/patches/040-heroes.patch | 27 + .../060-reduce_duplication_in_sql_c.patch | 192 + .../minidlna/patches/070-return-void.patch | 21 + multimedia/minisatip/Makefile | 62 + multimedia/minisatip/files/minisatip.init | 16 + multimedia/minisatip/patches/010-gcc10.patch | 43 + multimedia/mjpg-streamer/Config.in | 36 - multimedia/mjpg-streamer/Makefile | 274 +- .../mjpg-streamer/files/mjpg-streamer.config | 1 + .../mjpg-streamer/files/mjpg-streamer.init | 80 +- .../patches/005-musl_compatibility.patch | 2 +- .../010-enable_additional_plugins.patch | 17 - .../010-optional-plugins-selection.patch | 25 + .../020-remove-auto-lib-selection.patch | 55 + .../020-remove_gcc_debug_options.patch | 33 - .../030-allow_16_char_device_names.patch | 11 - .../030-remove-git-hash-version-number.patch | 24 + .../patches/035-remove_build_date-time.patch | 34 - ...used-variable-from-struct-v4l2_buffe.patch | 87 - ...-leaking-data-via-struct-v4l2_buffer.patch | 242 - .../patches/050-fix-yuv-capture.patch | 58 - .../patches/060-fix-sigtrap-in-v4l2uvc.patch | 11 - multimedia/motion/Makefile | 47 +- multimedia/motion/files/motion.conf | 2 + multimedia/motion/files/motion.init | 22 + multimedia/motion/patches/010-no-po-man.patch | 21 + .../motion/patches/100-musl-compat.patch | 49 - multimedia/tvheadend/Makefile | 14 +- .../patches/010-openssl-deprecated.patch | 42 + .../tvheadend/patches/020-strncpy-issue.patch | 13 + multimedia/v4l2rtspserver/Makefile | 67 +- .../v4l2rtspserver/files/config.openwrt | 19 - .../v4l2rtspserver/files/v4l2rtspserver.init | 11 +- multimedia/xupnpd/Makefile | 14 +- multimedia/youtube-dl/Makefile | 47 +- .../Config_keystored.in | 0 net/Netopeer2/Makefile | 128 + .../files/netopeer2-keystored-keygen.default | 22 + .../files/netopeer2-keystored.default | 16 + net/Netopeer2/files/netopeer2-server.default | 59 + net/Netopeer2/files/netopeer2-server.init | 21 + .../files/stock_config.xml | 0 .../patches/001-openss_1.1_support.patch | 11 + net/Netopeer2/patches/010-gcc10.patch | 22 + net/acme/Makefile | 55 +- net/acme/files/acme-cbi.lua | 108 - net/acme/files/acme-controller.lua | 7 - net/acme/files/acme.config | 22 +- net/acme/files/run.sh | 73 +- net/acme/files/uci-defaults-acme | 11 - net/adblock/Makefile | 23 +- net/adblock/files/README.md | 476 +- net/adblock/files/adblock.conf | 217 +- net/adblock/files/adblock.init | 194 +- net/adblock/files/adblock.mail | 81 + net/adblock/files/adblock.monitor | 37 + net/adblock/files/adblock.notify | 69 - net/adblock/files/adblock.sh | 2000 +- net/adblock/files/adblock.sources | 350 + net/addrwatch/Makefile | 26 +- net/addrwatch/files/addrwatch.init | 22 +- .../patches/001-fix-sys_siglist.patch | 32 - .../patches/002-fix-uclibc-sysconf.patch | 2 +- net/aggregate/Makefile | 2 +- .../patches/500-cross_compile_flags.patch | 14 + net/apache/Config.in | 11 - net/apache/Makefile | 443 +- net/apache/files/apache2.init | 21 + net/apache/patches/001-Makefile_in.patch | 14 - net/apache/patches/001-cross-compile.patch | 57 + net/apache/patches/002-test_char_h.patch | 49 - net/apache/patches/003-logdir_fix.patch | 37 - .../patches/004-fix-scoreboard-location.patch | 11 + net/apache/patches/004-pidfile_fix.patch | 13 - net/apache/patches/005-httpd_conf.patch | 60 +- .../patches/010-reproducible-builds.patch | 14 +- net/apcupsd/Makefile | 5 +- net/apcupsd/files/apccontrol | 6 +- net/apcupsd/patches/015-drop-doc.patch | 10 + net/apfree-wifidog/Makefile | 66 + net/apfree-wifidog/README.md | 125 + net/apfree-wifidog/files/wdping | 7 + net/apfree-wifidog/files/wifidogx.conf | 9 + net/apfree-wifidog/files/wifidogx.init | 285 + .../patches/010-openssl-deprecated.patch | 18 + net/apinger/Makefile | 22 +- net/apinger/patches/001-autoreconf.patch | 13 - net/apinger/patches/002-run_as_user.patch | 6 +- net/apinger/patches/003-no_docs.patch | 4 +- net/apinger/patches/010-poll.patch | 24 + net/aria2/Makefile | 7 +- net/ariang/Makefile | 43 +- net/ariang/files/80_ariang-nginx-support | 5 + net/ariang/files/ariang.locations | 4 + net/arp-scan/Makefile | 56 +- net/arp-scan/patches/001-cross_compile.patch | 10 - net/atftp/Makefile | 22 +- net/atftp/patches/04-cdefs.patch | 22 + net/autossh/files/autossh.config | 10 +- net/autossh/files/autossh.init | 2 - net/banip/Makefile | 2 +- net/banip/files/banip.service | 2 +- net/banip/files/banip.sh | 23 +- net/bcp38/Makefile | 5 +- net/bcp38/files/bcp38.config | 2 - net/beanstalkd/Makefile | 1 + net/bfdd/Makefile | 61 + net/bfdd/files/bfdd.init | 17 + net/bfdd/files/bfdd.template.json | 57 + net/bfdd/patches/002-ipv6_musl_fix.patch | 10 + net/bfdd/patches/010-uclibc.patch | 13 + net/bind/Config.in | 15 - net/bind/Makefile | 108 +- net/bind/files/bind/bind.keys | 69 + net/bind/patches/001-no-tests.patch | 27 +- net/bind/patches/002-autoconf-ar-fix.patch | 31 - net/bitlbee/Makefile | 15 +- net/boinc/Makefile | 83 + net/boinc/files/boinc-client.init | 53 + net/boinc/files/global_prefs_override.xml | 4 + net/boinc/files/remote_hosts.cfg | 8 + net/boinc/patches/001-avoidExtraDependencies | 15 + net/boinc/patches/002-hosttypeRespected | 51 + net/bonding/Makefile | 42 + net/bonding/files/lib/netifd/proto/bonding.sh | 220 + net/bridge-utils/Makefile | 31 +- .../010-fix_struct_in6_addr_usage.patch | 10 - .../patches/100-musl-compat.patch | 11 - net/bwping/Makefile | 48 + net/cgi-io/Makefile | 10 +- net/cgi-io/src/CMakeLists.txt | 7 +- net/cgi-io/src/main.c | 610 +- net/chrony/Makefile | 7 +- net/chrony/patches/001-freebind_uclibc.patch | 13 - net/cifs-utils/Makefile | 57 +- net/cifs-utils/patches/010-no-libtalloc.patch | 2 - net/cifs-utils/patches/020-no-smb3.patch | 13 + net/clamav/Makefile | 16 +- net/clamav/files/clamav.init | 74 +- net/clamav/files/freshclam.init | 24 +- net/clamav/patches/001-compile.patch | 10 - ...libxml-checks-if-disable-xml-is-used.patch | 167 - .../patches/010-openssl-deprecated.patch | 37 - net/conntrack-tools/Makefile | 82 + net/conntrack-tools/files/conntrackd.init | 18 + .../patches/conntrack-tools-1.4.5-rpc.patch | 41 + net/conserver/Makefile | 16 +- net/conserver/files/config.guess | 1645 + net/conserver/files/config.sub | 1795 + net/coova-chilli/Config.in | 21 +- net/coova-chilli/Makefile | 54 +- net/coova-chilli/files/chilli.config | 17 +- net/coova-chilli/files/chilli.firewall | 41 - net/coova-chilli/files/chilli.init | 42 +- .../100-fix-sysinfo-redeclaration.patch | 24 - .../patches/100-fix_compile_kmod.patch | 13 + .../patches/200-fix_compile_kmod.patch | 17 - net/coova-chilli/patches/200-wolfssl.patch | 53 + .../201-fix_dereferencing_pointers.patch | 49 - .../patches/300-fix-compile-with-cyassl.patch | 28 - net/coova-chilli/patches/300-sysinfo.patch | 25 + .../patches/400-fix-compile-with-musl.patch | 61 - .../patches/400-fix-version.patch | 11 + ...1-fix-compile-misleading-indentation.patch | 31 - net/cshark/Makefile | 20 +- net/daemonlogger/Makefile | 1 - net/danish/Makefile | 55 - net/darkstat/Makefile | 11 +- net/darkstat/files/darkstat.config | 9 +- net/darkstat/files/darkstat.init | 122 +- net/davfs2/Makefile | 15 +- net/davfs2/patches/010-main_code_fix.patch | 13 +- net/davfs2/patches/020-neon.patch | 11 + net/davfs2/patches/100-musl-compat.patch | 134 +- ...vfs2-1.5.4-no-forced-stack-protector.patch | 2 +- net/davfs2/patches/300-have_iconv_h.patch | 2 - net/davfs2/patches/400-gcc10.patch | 11 + net/dawn/Makefile | 50 + net/dawn/files/dawn.config | 61 + net/dawn/files/dawn.init | 59 + net/dcstad/Makefile | 49 + net/dcwapd/Makefile | 6 +- net/ddns-scripts/Makefile | 128 +- net/ddns-scripts/files/ddns.config | 2 +- .../files/dynamic_dns_functions.sh | 120 +- net/ddns-scripts/files/dynamic_dns_updater.sh | 9 + net/ddns-scripts/files/services | 20 +- net/ddns-scripts/files/services_ipv6 | 16 +- .../files/update_cloudflare_com_v4.sh | 1 + .../files/update_cloudflare_com_v4_token.sh | 194 + net/ddns-scripts/files/update_cnkuai_cn.sh | 86 + .../files/update_digitalocean_com_v2.sh | 51 + net/ddns-scripts/files/update_route53_v1.sh | 72 +- net/ddns-scripts/samples/slaac_sample.sh | 59 + net/dhcpcd/Makefile | 5 +- net/dmapd/Makefile | 22 +- net/dmapd/files/dmapd.init | 26 +- net/dmapd/patches/001-dmapd_conf.patch | 11 - .../002-make_unit_test_optionnal.patch | 17 - net/dnscrypt-proxy/Makefile | 20 +- net/dnscrypt-proxy/files/dnscrypt-proxy.init | 3 +- .../files/dnscrypt-resolvers.csv | 8 +- net/dnscrypt-proxy/patches/010-internal.patch | 11 + net/dnscrypt-proxy2/Makefile | 83 + net/dnscrypt-proxy2/files/blacklist.txt | 54 + net/dnscrypt-proxy2/files/dnscrypt-proxy.init | 21 + net/dnsdist/Makefile | 129 + net/dnsdist/files/dnsdist.conf | 0 net/dnsdist/files/dnsdist.config | 2 + net/dnsdist/files/dnsdist.init | 20 + net/dnsdist/patches/010-libcxx.patch | 41 + net/dnsdist/patches/020-std.patch | 25 + net/dnstop/Makefile | 35 + net/dnstop/patches/100-fix_udphdr_error.patch | 14 + net/dynapoint/Makefile | 7 +- net/e2guardian/Makefile | 83 - net/e2guardian/files/e2guardian.config | 69 - net/e2guardian/files/e2guardian.init | 212 - net/e2guardian/files/e2guardianf1.conf | 430 - net/esniper/Makefile | 6 +- net/etesync-server/Makefile | 108 + .../files/81_setup-etesync-server | 56 + net/etesync-server/files/etesync.locations | 13 + net/etesync-server/files/uci.cfg | 13 + net/etesync-server/files/uwsgi.ini | 48 + net/etesync-server/files/uwsgi.init | 136 + net/etherwake-nfqueue/Makefile | 51 + net/etherwake-nfqueue/README.md | 378 + .../files/etherwake-nfqueue.config | 21 + .../files/etherwake-nfqueue.init | 69 + net/etherwake/Makefile | 2 +- .../patches/100-no_ether_hostton.patch | 37 - net/fakeidentd/Makefile | 4 +- net/family-dns/Makefile | 56 + net/family-dns/Readme.md | 21 + net/family-dns/files/family-dns-update | 95 + net/family-dns/files/family-dns.conf | 14 + net/family-dns/files/family-dns.uci-defaults | 9 + net/family-dns/files/test-family-dns | 124 + net/fastd/Config.in | 10 - net/fastd/Makefile | 22 +- net/foolsm/Makefile | 22 +- net/fossil/Makefile | 72 - net/fossil/files/fossil.config | 5 - net/fossil/files/fossil.init | 54 - net/fossil/patches/001-no_https.patch | 22 - net/fping/Makefile | 12 +- net/freeradius3/Makefile | 233 +- net/freeradius3/files/radiusd.init | 1 + ...-disable-session-cache-CVE-2017-9148.patch | 8 +- ...4-fix-target-python-header-detection.patch | 80 - net/frp/Makefile | 83 + net/frp/files/frpc.config | 23 + net/frp/files/frpc.init | 72 + net/frp/files/frps.config | 16 + net/frp/files/frps.init | 72 + net/frr/Config.in | 32 + net/frr/Makefile | 240 + net/frr/files/daemons | 54 + net/frr/files/frr | 68 + net/frr/files/frr.conf | 22 + net/frr/files/frrcommon.sh | 335 + net/frr/files/vtysh.conf | 7 + net/frr/files/watchfrr.sh | 35 + net/frr/patches/001-vti_interface_fix.patch | 26 + net/frr/patches/010-add_yahng_filter.patch | 385 + net/frr/patches/010-add_yang_routemap.patch | 390 + .../patches/011-mod_yang_routemap_model.patch | 5045 ++ net/frr/patches/012-add_yang_filter.patch | 83 + net/frr/patches/013-backport_northbound.patch | 147 + net/frr/patches/014-backport_northbound.patch | 330 + net/frr/patches/098-fix_mips_libyang.patch | 14 + net/frr/patches/099-redefine_ethhdr.patch | 17 + net/fwknop/Makefile | 13 +- net/fwknop/files/fwknopd | 7 +- net/fwknop/files/fwknopd.init | 68 +- net/geth/Makefile | 55 + net/geth/files/geth.init | 15 + net/git/Makefile | 40 +- .../100-configure_for_crosscompiling.patch | 8 +- .../patches/200-imapsend_without_curl.patch | 2 +- net/git/patches/300-openssl-deprecated.patch | 27 + ...310-fix-uname-detection-for-crosscompiling | 44 + net/gitolite/Makefile | 44 +- .../patches/0100-avoid-ssh-keygen.patch | 132 + .../patches/100-fix-missing-hooks-dir.patch | 27 - net/gnunet-fuse/Makefile | 40 + net/gnunet-fuse/patches/001-musl-compat.patch | 33 + net/gnunet-secushare/Makefile | 107 + .../files/gnunet-secushare-mysql.defaults | 8 + .../files/gnunet-secushare-pgsql.defaults} | 0 .../files/gnunet-secushare-sqlite.defaults} | 0 net/gnunet/Makefile | 140 +- net/gnunet/files/gnunet-gns-flat.defaults | 6 +- ...fix-opus-and-pulse-library-detection.patch | 38 + net/gnurl/Makefile | 17 +- net/haproxy/Makefile | 103 +- net/haproxy/files/haproxy.cfg | 17 +- net/haproxy/files/haproxy.hotplug | 8 - net/haproxy/files/haproxy.init | 26 +- net/haproxy/get-latest-patches.sh | 27 + ...d-on-glibc-version-and-not-__USE_GNU.patch | 23 + ...t-SSL_ERROR_SYSCALL-as-unrecovarable.patch | 61 - ...ion-for-reading-on-SSL_ERROR_SYSCALL.patch | 63 - ...n-tunnel-mode-as-earlier-as-possible.patch | 69 - ...le-ssl_bc_-fetch-keywords-are-broken.patch | 103 - net/hcxdumptool/Makefile | 52 + net/hcxtools/Makefile | 69 + net/horst/Makefile | 6 +- net/htpdate/Makefile | 4 +- net/htpdate/files/htpdate.init | 14 +- net/httping/Makefile | 1 - net/https-dns-proxy/Makefile | 50 +- net/https-dns-proxy/files/README.md | 94 + .../files/https-dns-proxy.config | 18 + .../files/https-dns-proxy.init | 184 + .../files/https_dns_proxy.config | 8 - .../files/https_dns_proxy.init | 48 - net/i2pd/Makefile | 32 +- net/i2pd/files/i2pd.config | 18 + net/i2pd/files/i2pd.init | 70 +- net/i2pd/patches/config.patch | 88 + net/ibrdtn-tools/Makefile | 3 +- net/ibrdtnd/Makefile | 5 +- ...-ibrdtnd-added-openssl-compatibility.patch | 202 + net/ibrdtnd/patches/010-no-const.patch | 33 + net/ibrdtnd/patches/020-uClibc-ng.patch | 20 + .../patches/030-openssl-deprecated.patch | 20 + net/ifstat/Config.in | 4 + net/ifstat/Makefile | 10 +- net/inadyn/Makefile | 24 +- net/iodine/Makefile | 3 +- .../patches/100-musl-compatibility.patch | 2 +- net/iotivity/Makefile | 313 - net/iotivity/files/etc/iotivity/ReadMe.txt | 2 - .../files/etc/iotivity/oic_svr_db.cbor | Bin 1234 -> 0 bytes .../files/etc/iotivity/oic_svr_db.json | 101 - net/iotivity/patches/001-no_unit_test.patch | 141 - .../patches/002-do-not-chck-for-boost.patch | 29 - .../020-linux-Add-more-architectures.patch | 44 - ...ld-do-not-set-TARGET_ARCH-to-default.patch | 39 - ...ompiler-options-to-supported-archite.patch | 57 - ...ke-compiler-options-from-environment.patch | 126 - .../patches/030-remove-check-for-curl.patch | 55 - .../040-linux-Use-system-sqlite3.patch | 27 - ...tyHandlerResponse-from-stack-to-heap.patch | 54 - ...-OCClientResponse-from-stack-to-heap.patch | 357 - ...-OCClientResponse-from-stack-to-heap.patch | 103 - ...ompilation-against-non-debug-mbedtls.patch | 27 - ..._version_get_string-only-if-availabl.patch | 35 - ..._ssl_conf_renegotiation-only-if-avai.patch | 30 - ...-of-patched-mbed-functions-condition.patch | 44 - .../patches/078-use-system-mbedtls.patch | 22 - ...pper-do-not-check-for-floating-point.patch | 31 - net/iotivity/patches/140-remove-glib2.patch | 32 - ...le-try-to-load-security-configuratio.patch | 44 - ...nclude-functional-header-for-g-7.1.0.patch | 58 - net/ipsec-tools/Makefile | 103 - net/ipsec-tools/files/functions.sh | 172 - net/ipsec-tools/files/p1client-down | 41 - net/ipsec-tools/files/p1client-up | 41 - net/ipsec-tools/files/racoon | 113 - net/ipsec-tools/files/racoon.init | 479 - net/ipsec-tools/files/vpnctl | 19 - .../patches/001-ipsec-tools-def-psk.patch | 24 - net/ipsec-tools/patches/001-no_libfl.patch | 22 - net/ipsec-tools/patches/002-patch8-utmp.patch | 72 - .../patches/003-microsoft-fqdn-in-main.patch | 13 - net/ipsec-tools/patches/005-isakmp-fix.patch | 11 - .../patches/006-linux-3.7-compat.patch | 50 - .../patches/007-force_have_policy_fwd.patch | 12 - .../008-racoon-fix_dereference_crash.patch | 16 - net/ipsec-tools/patches/009-musl-compat.patch | 187 - .../patches/010-CVE-2016-10396.patch | 201 - net/iptraf-ng/Makefile | 2 +- net/iputils/Config_ping.in | 17 + net/iputils/Config_tracepath.in | 16 + net/iputils/Makefile | 150 + net/ipvsadm/Makefile | 50 + net/ipvsadm/patches/001-Makefile.patch | 54 + net/ipvsadm/patches/002-save-restore.patch | 34 + net/irssi/Makefile | 23 +- ...SSL-when-1.1-with-deprecated-APIs-di.patch | 27 + net/isc-dhcp/Makefile | 8 +- net/isc-dhcp/files/dhcpd.init | 47 +- net/jool/Makefile | 24 +- net/jool/patches/010-musl.patch | 24 - net/kadnode/Makefile | 14 +- net/kadnode/patches/0001-LFLAGS-LDFLAGS.patch | 67 - net/kcptun/Makefile | 77 + net/kcptun/README.md | 54 + net/kcptun/files/kcptun.config | 43 + net/kcptun/files/kcptun.init | 174 + net/kea/Makefile | 252 + net/kea/patches/001-fix-cross-compile.patch | 14 + net/kea/patches/002-fix-host-compile.patch | 11 + net/kea/patches/003-no-test-compile.patch | 326 + net/kea/patches/010-openssl-deprecated.patch | 11 + net/keepalived/Makefile | 10 +- .../files/etc/uci-defaults/keepalived | 12 + net/keepalived/files/keepalived.init | 25 +- ...uilding-with-disable-libipvs-dynamic.patch | 53 + net/kismet/Makefile | 7 +- net/kismet/patches/030-libcxx.patch | 64 + net/knot/Makefile | 55 +- net/knot/patches/01_zscanner_tests.patch | 18 +- net/knot/patches/02_knot.conf.patch | 27 +- net/knxd/Makefile | 30 +- net/knxd/files/knxd.config | 4 +- net/knxd/files/knxd.ini | 1 - net/knxd/files/knxd.init | 12 +- net/knxd/patches/0099-openwrt.patch | 5 +- net/knxd/patches/0100-version.patch | 8 + net/kplex/Makefile | 8 +- net/krb5/Makefile | 40 +- net/krb5/files/krb5kdc | 4 +- ...001-fix-uninitialized-warning-errors.patch | 30 +- net/ksmbd-tools/Makefile | 139 + net/ksmbd-tools/files/ksmbd.config | 3 + net/ksmbd-tools/files/ksmbd.config.example | 11 + net/ksmbd-tools/files/ksmbd.init | 207 + net/ksmbd-tools/files/smb.conf.template | 14 + net/ksmbd-tools/files/smb.service | 9 + net/leech/Makefile | 57 + net/lftp/Makefile | 23 +- net/lftp/patches/010-openssl-deprecated.patch | 65 + net/libndp/Makefile | 63 + net/libreswan/Makefile | 121 + net/libreswan/files/ipsec.conf | 25 + net/libreswan/files/ipsec.init | 36 + net/libreswan/files/ipsec.secrets | 10 + net/libreswan/patches/010-nanosleep.patch | 21 + net/libreswan/patches/020-limits.patch | 20 + net/libreswan/patches/030-fix_nss_3.52.patch | 30 + .../099-continue_on_missing_ipv6.patch | 12 + net/lighttpd/Makefile | 52 +- ...decode-when-char-is-unsigned-fixes-2.patch | 43 - net/linknx/Makefile | 30 +- net/linknx/files/linknx.config | 7 +- net/linknx/files/linknx.init | 20 +- net/linuxptp/Makefile | 13 +- .../patches/001-fix_kbuild_output.patch | 11 + net/lispmob/Makefile | 57 - net/lispmob/patches/001-fix-musl-build.patch | 31 - net/lksctp-tools/Makefile | 30 +- ...x-netinet-sctp.h-not-to-be-installed.patch | 35 + net/lora-gateway-hal/Config.in | 13 + net/lora-gateway-hal/Makefile | 95 + .../patches/0001-add-cmake-support.patch | 496 + ...ssing-for-SPI_DEV_PATH-and-SPI_SPEED.patch | 35 + ...-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.patch | 45 + net/lynx/Makefile | 70 + net/lynx/files/lynx.cfg | 7 + net/lynx/files/lynx.lss | 115 + net/mac-telnet/Makefile | 18 +- net/mdnsresponder/Makefile | 9 +- .../patches/001-cross_compile.patch | 115 - net/mdnsresponder/patches/010-uclibc.patch | 13 + .../patches/100-linux_fixes.patch | 388 - .../patches/114-fix_posix_build.patch | 11 - .../patches/120-reproducible-builds.patch | 52 - net/memcached/Makefile | 16 +- net/memcached/patches/100-fix_iov_max.patch | 25 - net/mii-tool/Makefile | 54 - .../001-mii-tool-4.9-compatibility.patch | 10 - net/mini_snmpd/Makefile | 3 +- net/mini_snmpd/files/mini_snmpd.init | 115 +- net/miniupnpc/Makefile | 41 +- net/miniupnpc/patches/100-no-fPIC.patch | 15 + .../patches/100-no_minixml_test.patch | 13 - .../patches/200-miniupnpc_desc.patch | 2 +- net/miniupnpd/Makefile | 66 +- net/miniupnpd/files/firewall.include | 32 +- net/miniupnpd/files/miniupnpd.hotplug | 55 +- net/miniupnpd/files/miniupnpd.init | 225 +- net/miniupnpd/files/upnpd.config | 13 +- net/miniupnpd/patches/100-no-daemon.patch | 25 + net/miniupnpd/patches/101-no-ssl-uuid.patch | 23 - net/miniupnpd/patches/102-ipv6-ext-port.patch | 10 - .../patches/103-no-ipv6-autodetection.patch | 27 - .../patches/104-always-libuuid.patch | 20 - net/miniupnpd/patches/105-no_ssdp_warn.patch | 13 - .../patches/200-remove-default-cflags.patch | 24 + net/miniupnpd/patches/300-macos-compat.patch | 36 + net/modemmanager/Makefile | 26 +- net/modemmanager/README.md | 36 +- net/modemmanager/files/modemmanager.proto | 51 +- net/mosh/Makefile | 117 + net/mosh/patches/020-std.patch | 10 + net/mosquitto/Makefile | 21 +- net/mosquitto/files/etc/init.d/mosquitto | 7 +- net/mstpd/Config.in | 12 + net/mstpd/Makefile | 58 + net/mstpd/files/etc/init.d/mstpd.init | 124 + net/mstpd/files/sbin/bridge-stp | 9 + net/mtr/Makefile | 42 +- net/mtr/patches/100-disabled-ipv6-fix.patch | 49 - net/mwan3/Makefile | 2 +- net/mwan3/files/usr/sbin/mwan3 | 1 + net/nbd/Makefile | 15 +- .../100-make-gnutls-test-optional.patch | 15 - .../101-fix-build-without-gnutls.patch | 11 - net/net-snmp/Makefile | 15 +- net/net-snmp/files/snmpd.init | 19 +- net/net-snmp/patches/000-cross-compile.patch | 10 +- .../patches/100-debian-statistics.patch | 4 +- .../patches/110-debian-makefiles.patch | 6 +- net/net-snmp/patches/160-no_ldconfig.patch | 2 +- net/net-snmp/patches/170-ldflags.patch | 4 +- net/net-tools/Makefile | 73 + net/netatalk/Makefile | 4 +- net/netatalk/patches/010-gcc10.patch | 22 + net/netcat/Makefile | 3 +- net/netcat/patches/002-udp_listen_fix.patch | 14 + net/netifyd/Makefile | 106 + net/netifyd/README.md | 69 + net/netifyd/files/netifyd.config | 5 + net/netifyd/files/netifyd.init | 46 + net/netopeer2/Makefile | 131 - .../files/netopeer2-keystored-keygen.default | 22 - .../files/netopeer2-keystored.default | 16 - net/netopeer2/files/netopeer2-server.default | 45 - net/netopeer2/files/netopeer2-server.init | 47 - .../001-remove-sysrepoctl-commands-from-cmake | 40 - net/netopeer2/patches/002-fix-for-cmake-build | 58 - net/netperf/Makefile | 2 + net/netsniff-ng/Makefile | 69 + ...1-configure-script-honors-C-LD-FLAGS.patch | 154 + ...2-fix-ncurses-check-during-configure.patch | 30 + ...flowtop-pkg-config-usage-for-ncurses.patch | 36 + net/nextdns/Makefile | 27 +- net/nextdns/files/nextdns.config | 5 +- net/nextdns/files/nextdns.init | 76 - net/nfdump/Makefile | 59 + net/nfdump/files/nfcapd.config | 4 + net/nfdump/files/nfcapd.init | 30 + net/nfs-kernel-server/Makefile | 6 +- .../patches/100-no_malloc_h.patch | 10 - .../patches/102-uclibc-ns-maxmsg.patch | 13 + net/nft-qos/Makefile | 59 + net/nft-qos/files/lib/core.sh | 93 + net/nft-qos/files/lib/dynamic.sh | 90 + net/nft-qos/files/lib/monitor.sh | 39 + net/nft-qos/files/lib/priority.sh | 93 + net/nft-qos/files/lib/static.sh | 74 + net/nft-qos/files/nft-qos-dynamic.hotplug | 36 + net/nft-qos/files/nft-qos-monitor.hotplug | 23 + net/nft-qos/files/nft-qos.config | 107 + net/nft-qos/files/nft-qos.init | 47 + net/nginx-util/Makefile | 94 + net/nginx-util/src/CMakeLists.txt | 62 + net/nginx-util/src/nginx-ssl-util.hpp | 654 + net/nginx-util/src/nginx-util.cpp | 194 + net/nginx-util/src/nginx-util.hpp | 141 + net/nginx-util/src/px5g-openssl.hpp | 421 + net/nginx-util/src/px5g.cpp | 451 + net/nginx-util/src/regex-pcre.hpp | 511 + net/nginx-util/src/test-nginx-util-root.sh | 246 + net/nginx-util/src/test-nginx-util.sh | 48 + net/nginx-util/src/test-px5g.sh | 139 + net/nginx-util/src/ubus-cxx.cpp | 148 + net/nginx-util/src/ubus-cxx.hpp | 375 + net/nginx/Config.in | 7 + net/nginx/Config_ssl.in | 7 + net/nginx/Makefile | 166 +- .../files-luci-support/60_nginx-luci-support | 54 +- .../70_nginx-luci-support-ssl | 48 - net/nginx/files-luci-support/luci.locations | 17 + net/nginx/files-luci-support/luci_nginx.conf | 52 - .../files-luci-support/luci_nginx_ssl.conf | 67 - net/nginx/files-luci-support/luci_uwsgi.conf | 16 - net/nginx/files/README.sh | 327 + net/nginx/files/_lan.conf | 8 + net/nginx/files/_redirect2ssl.conf | 8 + net/nginx/files/nginx.conf | 30 + net/nginx/files/nginx.init | 45 +- .../100-drop-libxslt-dep.patch | 14 + net/nginx/patches/104-endianness_fix.patch | 21 + .../patches/201-ignore-invalid-options.patch | 2 +- net/nginx/patches/300-max-processes.patch | 11 - net/ngircd/Makefile | 21 +- net/nlbwmon/Makefile | 9 +- net/nlbwmon/files/nlbwmon.config | 5 + net/nlbwmon/files/nlbwmon.init | 3 +- net/nmap/Makefile | 126 +- ...namespace-std-causing-name-conflicts.patch | 135 + .../patches/020-Python3-port-of-ndiff.patch | 1715 + net/nmap/patches/030-libcxx.patch | 20 + net/nsd/Makefile | 36 +- net/ntpclient/Makefile | 10 +- net/ntpclient/files/ntpclient.hotplug | 14 +- net/ntpclient/patches/100-daemon.patch | 6 +- net/ntpclient/patches/200-time.patch | 54 + net/ntpclient/patches/300-siocgarp.patch | 12 + net/ntpd/Makefile | 2 +- net/ntpd/files/ntpd.init | 2 + net/ntripcaster/Makefile | 16 +- net/ntripclient/Makefile | 16 +- net/ntripserver/Makefile | 16 +- net/nut/Makefile | 1 - net/obfs4proxy/Makefile | 81 + net/obfsproxy/Makefile | 63 - net/obfsproxy/files/obfsproxy.conf | 57 - net/obfsproxy/files/obfsproxy.init | 158 - net/obfsproxy/patches/001-exclude-tests.patch | 13 - .../patches/002-fix-python-path.patch | 16 - .../003-remove-argparse-dependency-test.patch | 12 - .../patches/004-add-syslog-support.patch | 51 - net/ocserv/Makefile | 6 +- net/ola/Makefile | 36 +- ...emove-visibility-inlines-hidden-flag.patch | 2 +- .../patches/050-always-force-gnu++11.patch | 21 - net/ola/patches/100-protobuf-3.7.patch | 45 + .../110-add-missing-config.h-incluude.patch | 25 + net/ola/patches/120-compile-fix.patch | 14 + net/oor/Makefile | 61 + net/open-isns/Makefile | 54 + net/open-isns/patches/01-security_mode.patch | 185 + .../patches/02-fix_signed_vs_unsigned.patch | 41 + net/open-isns/patches/03-include_poll_h.patch | 24 + net/open-isns/patches/04-ignore_write.patch | 86 + .../10-without_deprecated_openssl.patch | 26 + net/openconnect/Makefile | 17 +- net/openconnect/README | 5 + net/openconnect/files/openconnect.sh | 54 +- ...ompilation-with-libp11-version-0.4.7.patch | 50 - net/openfortivpn/Makefile | 65 + net/openfortivpn/files/14-openforticlient | 18 + net/openfortivpn/files/openfortivpn-wrapper | 13 + net/openfortivpn/files/openfortivpn.sh | 134 + net/openfortivpn/patches/010-bind-iface.patch | 182 + net/opennhrp/Makefile | 60 - net/opennhrp/files/opennhrp.init | 15 - net/opennhrp/patches/100-musl-compat.patch | 20 - net/openssh/Makefile | 30 +- net/openssh/files/sshd.init | 4 +- net/openssh/patches/010-musl-stdio.patch | 22 - net/opentracker/Makefile | 16 +- net/openvswitch/Makefile | 101 +- net/openvswitch/files/openvswitch.init | 5 +- net/openvswitch/files/ovs-ctl-wrapper | 2 +- net/openvswitch/openvswitch.mk | 37 + ...-interface-flag-survive-internal-por.patch | 9 +- ...host-target-python-for-cross-compile.patch | 36 +- .../0003-ovs-lib-fix-install_dir.patch | 4 +- .../0004-build-disable-building-tests.patch | 22 - .../patches/0004-build-trim-build.patch | 27 + .../0005-datapath-unexport-LDFLAGS.patch | 31 + ...dlc-fix-dict-change-during-iteration.patch | 38 - ...assing-additional-OVS_KERNEL_MAKE_FL.patch | 25 + net/ostiary/Makefile | 47 + net/ostiary/files/ostiaryd.init | 19 + net/overture/Makefile | 57 + net/overture/files/domain_alternative_sample | 1 + net/overture/files/domain_primary_sample | 1 + net/overture/files/domain_ttl_sample | 1 + net/overture/files/hosts_sample | 1 + .../files/ip_network_alternative_sample | 1 + net/overture/files/ip_network_primary_sample | 1 + net/overture/files/overture.init | 14 + net/ovn/Makefile | 94 + .../0001-build-skip-building-tests.patch | 22 + .../0002-ovn-lib-fix-install_dir.patch | 28 + net/p910nd/Makefile | 5 +- net/p910nd/files/p910nd.config | 21 + net/p910nd/files/p910nd.hotplug | 13 + net/p910nd/files/p910nd.init | 18 +- net/pagekitec/Makefile | 5 +- net/pagekitec/files/etc/init.d/pagekitec | 9 +- net/pdns-recursor/Makefile | 62 + net/pdns-recursor/files/pdns-recursor.init | 14 + net/pdns-recursor/files/recursor.conf-dist | 662 + .../100-disable-recursor.conf-dist.patch | 15 + .../patches/200-boost_thread_fix.patch | 24 + net/pdns-recursor/patches/300-boost-173.patch | 21 + net/pdns/Makefile | 253 + net/pdns/files/pdns.conf-dist | 657 + net/pdns/files/pdns.init | 14 + .../100-pdns-disable-pdns.conf-dist.patch | 34 + net/pdns/patches/200-openssl-deprecated.patch | 20 + net/pdns/patches/300-boost-173.patch | 32 + net/pen/Makefile | 13 +- net/pen/patches/010-deprecated-openssl.patch | 49 + net/phantap/Makefile | 66 + net/pingcheck/Makefile | 15 +- net/pixiewps/Makefile | 2 +- net/polipo/Makefile | 2 + net/port-mirroring/Makefile | 33 +- .../patches/010-snprintf-to-strncpy.patch | 20 + net/port-mirroring/patches/020-time.patch | 20 + net/portmap/Makefile | 53 - net/portmap/files/portmap.init | 13 - net/portmap/patches/101-no_pie.patch | 12 - net/pppossh/Makefile | 1 + net/pptpd/Makefile | 4 +- net/pptpd/files/pptpd.init | 33 +- net/privoxy/Makefile | 7 +- net/prosody/Makefile | 50 +- net/prosody/files/prosody.cfg.lua | 132 +- net/prosody/files/prosody.init | 3 +- net/proxychains-ng/Makefile | 67 + net/ptunnel-ng/Makefile | 41 + net/quassel-irssi/Makefile | 24 +- .../patches/001-respect-cflags.patch | 10 +- .../patches/002-use-cc-var.patch | 4 +- .../003-use-pkgconfig-ldflags-quasselc.patch | 6 +- ...ith-potential-irssi-abi-8-and-drop-p.patch | 111 + net/radicale/Makefile | 125 +- net/radicale/files/radicale.init | 29 + net/radicale/files/radicale.upgrade | 4 - net/radicale2/Makefile | 42 +- net/radsecproxy/Makefile | 22 +- net/radsecproxy/files/radsecproxy.init | 8 +- .../patches/100-missing-return.patch | 58 - .../patches/200-logdest-on-foreground.patch | 22 +- net/ratechecker/Makefile | 44 + net/reaver/Makefile | 7 +- net/redsocks/Makefile | 18 +- net/remserial/Makefile | 4 +- net/restic-rest-server/Makefile | 49 + .../files/etc/config/restic-rest-server | 13 + .../files/etc/init.d/restic-rest-server | 40 + net/rp-pppoe/Makefile | 22 +- net/rp-pppoe/patches/100-configure.patch | 36 - net/rp-pppoe/patches/110-Makefile.patch | 2 +- .../120-use-linux-ether-not-netinet.patch | 37 +- net/rp-pppoe/patches/130-static-lib-fix.patch | 6 +- net/rsync/Makefile | 47 +- net/rsyslog/Makefile | 24 +- net/rtorrent/Makefile | 43 +- .../patches/100-fix-cross_compile.patch | 30 - net/rtorrent/patches/120-fix-ncurses.patch | 4 +- net/rtorrent/patches/130-usleep.patch | 33 + net/safe-search/Makefile | 73 + net/safe-search/Readme.md | 25 + net/safe-search/files/hosts/bing.default | 14 + .../files/hosts/duckduckgo.default | 16 + net/safe-search/files/hosts/google.default | 773 + net/safe-search/files/hosts/youtube.restrict | 25 + .../files/hosts/youtube.restrictmoderate | 25 + net/safe-search/files/safe-search-update | 23 + net/safe-search/files/safe-search.conf | 20 + net/safe-search/files/safe-search.defaults | 13 + net/samba4/Config.in | 53 + net/samba4/Makefile | 446 + net/samba4/files/samba.config | 24 + net/samba4/files/samba.init | 250 + net/samba4/files/smb.conf.template | 121 + net/samba4/patches/001-samba-4.4.0-pam.patch | 29 + net/samba4/patches/002-dnsserver-4.7.0.patch | 19 + net/samba4/patches/003-getpwent_r.patch | 80 + net/samba4/patches/004-missing-headers.patch | 38 + net/samba4/patches/005-musl_uintptr.patch | 35 + net/samba4/patches/006-netdb-defines.patch | 19 + ...bldb-fix-musl-libc-unkown-type-error.patch | 31 + ...samba-4.11-add_missing___compar_fn_t.patch | 14 + ...mba-4-11-fix-host-tools-checks.patch.patch | 40 + ...-fix-musl_missing__nss_buflen_passwd.patch | 12 + .../020-source3-msgsock-nvram-fix.patch | 20 + .../021-source4-msgsock-nvram-fix.patch | 11 + .../101-do-not-check-xsltproc-manpages.patch | 37 + .../102-samba-4.11-unbundle-libbsd.patch | 59 + .../103-samba-4.12-unbundle-libunwind.patch | 23 + .../patches/104-samba-4.12-unbundle-icu.patch | 30 + net/samba4/waf-cross-answers/aarch64.txt | 38 + net/samba4/waf-cross-answers/arc.txt | 41 + net/samba4/waf-cross-answers/arm.txt | 38 + net/samba4/waf-cross-answers/armeb.txt | 38 + net/samba4/waf-cross-answers/i386.txt | 38 + net/samba4/waf-cross-answers/mips.txt | 38 + net/samba4/waf-cross-answers/mips64.txt | 38 + net/samba4/waf-cross-answers/mips64el.txt | 38 + net/samba4/waf-cross-answers/mipsel.txt | 38 + net/samba4/waf-cross-answers/powerpc.txt | 38 + net/samba4/waf-cross-answers/x86_64.txt | 38 + net/scapy/Makefile | 37 +- net/seafile-ccnet/Makefile | 19 +- .../patches/011-no-python-compile.patch | 6 + net/seafile-seahub/Makefile | 17 +- net/seafile-seahub/patches/030-uci-conf.patch | 4 +- net/seafile-server/Makefile | 38 +- .../012-automake-no-python-compile.patch | 14 + .../patches/060-timestamps-as-int64.patch | 18 - net/ser2net/Makefile | 8 +- net/ser2net/files/ser2net.init | 6 + net/shadowsocks-client/Makefile | 40 - net/shadowsocks-client/files/sslocal.config | 7 - net/shadowsocks-client/files/sslocal.init | 52 - net/shadowsocks-libev/Makefile | 40 +- net/shadowsocks-libev/files/ss-rules | 2 +- net/shadowsocks-libev/patches/010-gcc10.patch | 20 + net/shorewall-core/Makefile | 15 +- .../patches/110-lib.common.patch | 10 +- net/shorewall-lite/Makefile | 15 +- net/shorewall-lite/files/hotplug_iface | 16 +- .../patches/010-install_cp.patch | 8 +- net/shorewall/Makefile | 15 +- net/shorewall/files/hotplug_iface | 14 +- net/shorewall6-lite/Makefile | 15 +- net/shorewall6-lite/files/hotplug_iface | 16 +- .../patches/010-install_cp.patch | 8 +- net/shorewall6/Makefile | 15 +- net/shorewall6/files/hotplug_iface | 14 +- net/siit/Makefile | 6 +- net/simple-adblock/Makefile | 22 +- net/simple-adblock/files/README.md | 235 +- net/simple-adblock/files/simple-adblock.conf | 93 +- .../files/simple-adblock.conf.update | 10 + .../files/simple-adblock.hotplug | 4 +- net/simple-adblock/files/simple-adblock.init | 1428 +- net/smartdns/Makefile | 59 + net/smartsnmpd/Makefile | 6 +- net/smcroute/Makefile | 54 + net/smcroute/files/smcroute.init | 13 + net/snort/Makefile | 15 +- net/snort/files/snort.init | 15 +- net/snort/patches/001-compile.patch | 6 +- net/snort/patches/002-fix_include.patch | 14 + net/snort/patches/003-include-tirpc.patch | 11 + net/snort3/Makefile | 104 + net/snort3/files/snort.config | 4 + net/snort3/files/snort.init | 41 + net/snort3/patches/001-compile.patch | 52 + net/snort3/patches/002-ignore-liblzma.patch | 11 + net/snort3/patches/003-fix-bigendian.patch | 43 + net/socat/Makefile | 11 +- net/socat/files/socat.init | 20 +- net/socat/patches/100-musl-compat.patch | 23 - net/socat/patches/100-usleep.patch | 18 + .../patches/200-openssl-deprecated.patch | 13 + net/softethervpn/Makefile | 12 +- net/softethervpn5/Makefile | 169 + net/softethervpn5/files/dummy | 1 + net/softethervpn5/files/launcher.sh | 2 + net/softethervpn5/files/vpnbridge.init | 22 + net/softethervpn5/files/vpnclient.init | 22 + net/softethervpn5/files/vpnserver.init | 22 + .../patches/001-iconv-defines-fix.patch | 11 + .../patches/002-iconv-cmake-fix.patch | 11 + .../100-increase-cfg-save-intervall.patch | 17 + .../patches/101-add-config-write-syslog.patch | 22 + net/softflowd/Makefile | 17 +- net/softflowd/files/softflowd.init | 5 +- net/softflowd/patches/010-bzero.patch | 134 + net/softflowd/patches/020-uid.patch | 11 + net/speedtest-netperf/Makefile | 45 + net/speedtest-netperf/files/README.md | 131 + .../files/speedtest-netperf.sh | 408 + net/spoofer/Makefile | 67 + net/squid/Makefile | 3 +- net/squid/files/squid.conf | 2 +- net/sshfs/Makefile | 2 - net/sshtunnel/Makefile | 5 +- net/sshtunnel/files/sshtunnel.init | 87 +- net/sshtunnel/files/uci_sshtunnel | 2 +- net/sslh/Makefile | 14 +- net/sslh/files/sslh.config | 12 +- net/sslh/files/sslh.init | 12 +- net/sslh/patches/010-format.patch | 11 + net/sstp-client/Makefile | 20 +- .../files/lib/netifd/proto/sstp.sh | 130 + .../patches/200-openssl-deprecated.patch | 20 + net/strongswan/Config.in | 9 +- net/strongswan/Makefile | 55 +- net/strongswan/files/ipsec.init | 3 + net/strongswan/patches/101-musl-fixes.patch | 2 +- net/strongswan/patches/201-kmodloader.patch | 28 - .../patches/305-minimal_dh_plugin.patch | 10 +- net/stubby/Makefile | 62 +- net/stubby/files/README.md | 456 +- net/stubby/files/stubby.conf | 66 + net/stubby/files/stubby.init | 281 +- net/stubby/files/stubby.yml | 42 +- .../stubby-0.3.0-fix-config-install.patch | 35 + net/stunnel/Makefile | 16 +- net/stunnel/files/stunnel.init | 436 +- net/stunnel/files/stunnel.uci | 6 +- net/subversion/Makefile | 41 +- .../patches/301-cross-compilation-macos.patch | 43 +- net/switchdev-poller/Makefile | 41 + net/switchdev-poller/files/switchdev-poller | 155 + .../files/switchdev-poller.init | 18 + net/sysrepo/Config_libsysrepo.in | 23 - net/sysrepo/Makefile | 152 +- net/sysrepo/files/libsysrepo.default | 28 +- net/sysrepo/files/sysrepo.init | 10 +- .../001-add-generated-protobufc-files.patch | 14781 +++++ ...obuf-remove-protoc-command-from-cmake-file | 14804 ----- .../002-remove-buildtime-module-install | 26 - net/sysrepo/patches/003-missing-time-header | 12 - .../patches/004-disable-sysrepod-autostart | 19 - .../patches/005-fix-struct-ucred-define | 30 - ...006-update-generated-protobufc-files.patch | 66 + net/tac_plus/Makefile | 95 + net/tac_plus/files/tac_plus.conf | 58 + net/tac_plus/files/tac_plus.init | 12 + .../patches/010-configure-remove-libnsl.patch | 15 + net/tcpproxy/Makefile | 4 +- net/tcpreplay/Makefile | 9 +- net/tgt/Makefile | 56 +- net/tgt/files/etc/config/tgt | 64 - net/tgt/files/etc/init.d/tgt | 237 - net/tgt/files/tgt.config | 67 + net/tgt/files/tgt.init | 252 + net/tgt/patches/020-usr_Makefile.patch | 2 - net/tgt/patches/030-Makefile.patch | 6 +- net/tgt/patches/100-musl-compat.patch | 4 - net/tinc/Makefile | 16 +- net/tinyproxy/Makefile | 24 +- net/tinyproxy/files/tinyproxy.init | 152 +- .../patches/010-no-docs-and-tests.patch | 86 - .../patches/020-config_and_pid-path.patch | 31 +- .../030-allow_bind_in_transparent_mode.patch | 22 - net/tinyproxy/patches/120-fix_INET6.patch | 4 +- ...2-3505-tiniproxy-randomized-hashmaps.patch | 101 - ...VE-2012-3505-tinyproxy-limit-headers.patch | 44 - net/tor-fw-helper/Makefile | 76 + net/tor-hs/Makefile | 52 + net/tor-hs/README.md | 104 + net/tor-hs/files/nextcloud-update.sh | 44 + net/tor-hs/files/tor-hs.conf | 22 + net/tor-hs/files/tor-hs.init | 116 + net/tor-hs/files/tor_rpcd.sh | 69 + net/tor/Makefile | 42 +- net/tor/files/tor.conf | 5 + net/tor/files/tor.init | 52 +- net/tor/patches/001-torrc.patch | 2 +- net/torsocks/Makefile | 62 + net/trafficshaper/Makefile | 48 + net/trafficshaper/files/trafficshaper.conf | 42 + net/trafficshaper/files/trafficshaper.init | 477 + net/transmission-web-control/Makefile | 2 +- net/transmission/Makefile | 16 +- .../files/transmission-daemon.json | 81 + net/transmission/files/transmission.config | 10 +- net/transmission/files/transmission.init | 111 +- .../patches/010-fix-port-test.patch | 30 - net/transmission/patches/020-fix-safari.patch | 26 - .../patches/030-fix-dht-memory-leak.patch | 31 - net/transmission/patches/040-fix-curl.patch | 29 - ...1.0.18-has-sys-quota.h-synced-with-G.patch | 25 - .../patches/080-disable-webseeding.patch | 11 + net/travelmate/Makefile | 15 +- net/travelmate/files/README.md | 49 +- net/travelmate/files/generic-user-pass.login | 20 + net/travelmate/files/travelmate.conf | 6 +- net/travelmate/files/travelmate.init | 97 +- net/travelmate/files/travelmate.sh | 1000 +- net/travelmate/files/wifionice.login | 37 + net/u2pnpd/Makefile | 14 +- net/uacme/Makefile | 99 + net/uacme/files/acme.config | 16 + net/uacme/files/acme.init | 35 + net/uacme/files/run.sh | 410 + net/uanytun/Makefile | 18 +- .../patches/100-reproducible-builds.patch | 12 - net/udptunnel/Makefile | 39 + net/udptunnel/patches/001-multicast.patch | 14 + net/udptunnel/patches/002-main_code_fix.patch | 67 + net/udpxy/Makefile | 16 +- net/ulogd/Makefile | 44 +- net/ulogd/patches/010-json-remote.patch | 441 + net/ulogd/patches/020-fix-musl.patch | 29 + net/ulogd/patches/030-ipfix-add.patch | 879 + net/ulogd/patches/040-ipfix-template.patch | 432 + net/ulogd/patches/100-musl-compat.patch | 57 - ...-ulogd-use-strncpy-instead-of-memcpy.patch | 31 - net/umurmur/Makefile | 52 +- ...01-Update-openssl-1.1-deprecated-API.patch | 103 + .../patches/010-deprecated-openssl.patch | 24 + .../patches/010-mbedtls_fix_includes.patch | 11 - net/unbound/Makefile | 124 +- net/unbound/files/README.md | 16 + net/unbound/files/defaults.sh | 1 + net/unbound/files/unbound.sh | 93 +- net/unbound/files/unbound.uci | 1 + net/usbip/Makefile | 17 +- net/uwsgi-cgi/Makefile | 71 - .../files-luci-support/luci-cgi_io.ini | 22 - .../files-luci-support/luci-webui.ini | 28 - net/uwsgi-cgi/files/emperor.ini | 10 - net/uwsgi-cgi/files/uwsgi.init | 13 - .../patches/001-remove-unused-deps.patch | 17 - ...04-hard-code-Linux-as-compilation-os.patch | 15 - net/uwsgi/Makefile | 168 + net/uwsgi/files-luci-support/luci-cgi_io.ini | 31 + net/uwsgi/files-luci-support/luci-webui.ini | 36 + net/uwsgi/files/emperor.ini | 9 + net/uwsgi/files/uwsgi.init | 14 + .../patches/001-dont-hardcode-zlib.patch} | 0 ...ont-override-toolchain-optimization.patch} | 0 ...03-hard-code-Linux-as-compilation-os.patch | 15 + .../patches/010-uclibc-ng.patch | 0 .../020-uwsgiconfig-system-python3.patch | 0 ...-plugins-cgi_adds_dontresolve_option.patch | 0 net/uwsgi/src/buildconf/openwrt.ini | 30 + net/vallumd/Makefile | 6 +- net/vnstat/Makefile | 2 +- net/vnstat/files/vnstat.init | 35 +- net/vnstat2/Makefile | 88 + net/vnstat2/files/vnstat.config | 2 + net/vnstat2/files/vnstat.init | 61 + net/vpn-policy-routing/Makefile | 81 + net/vpn-policy-routing/files/README.md | 890 + .../files/vpn-policy-routing.aws.user | 11 + .../files/vpn-policy-routing.conf | 29 + .../files/vpn-policy-routing.firewall.hotplug | 6 + .../files/vpn-policy-routing.iface.hotplug | 6 + .../files/vpn-policy-routing.init | 1044 + .../files/vpn-policy-routing.netflix.user | 11 + net/vpnbypass/Makefile | 38 +- net/vpnbypass/files/README.md | 102 +- net/vpnbypass/files/vpnbypass.init | 105 +- net/vpnc-scripts/Makefile | 3 +- net/vpnc-scripts/files/vpnc-script | 3 + net/vpnc/Makefile | 3 +- net/vpnc/files/vpnc.sh | 2 +- net/vpnc/patches/110-openssl-deprecated.patch | 23 + net/vsftpd/Makefile | 10 +- .../patches/010-openssl-deprecated.patch | 66 + net/wakeonlan/Makefile | 1 + net/wavemon/Makefile | 28 +- net/webui-aria2/Makefile | 24 +- .../patches/0001-fix-favicon-path.patch | 11 + .../patches/001-simplify-flag-icon-css.patch | 9 - net/wget/Makefile | 14 +- net/wget/files/.wgetrc | 1 - net/wifidog-ng/Makefile | 100 - net/wifidog-ng/files/ssl.crt | 24 - net/wifidog-ng/files/ssl.key | 28 - net/wifidog-ng/files/wifidog-ng.config | 20 - net/wifidog-ng/files/wifidog-ng.hotplug | 3 - net/wifidog-ng/files/wifidog-ng.init | 135 - net/wifidog-ng/files/wifidog-ng.lua | 37 - net/wifidog-ng/files/wifidog-ng/auth.lua | 221 - net/wifidog-ng/files/wifidog-ng/config.lua | 158 - net/wifidog-ng/files/wifidog-ng/heartbeat.lua | 46 - net/wifidog-ng/files/wifidog-ng/ubus.lua | 128 - net/wifidog-ng/files/wifidog-ng/util.lua | 83 - net/wifidog-ng/files/wifidog-ng/version.lua | 30 - net/wifidog-ng/src/Makefile | 18 - net/wifidog-ng/src/config.c | 174 - net/wifidog-ng/src/config.h | 31 - net/wifidog-ng/src/main.c | 192 - net/wifidog-ng/src/utils.h | 60 - net/wifischedule/Makefile | 2 +- net/wsdd2/Makefile | 46 + net/wsdd2/files/wsdd2.init | 80 + net/xinetd/Makefile | 12 +- net/xinetd/files/xinetd.conf | 6 - net/xinetd/files/xinetd.init | 114 +- net/xinetd/files/xinetd.uci.conf.sample | 11 + net/xtables-addons/Makefile | 25 +- .../002-build-support-for-Linux-4.15.patch | 50 - .../002-restore-support-for-Linux-4.14.patch | 69 + ...003-build-add-support-for-Linux-4.18.patch | 25 - .../patches/100-add-rtsp-conntrack.patch | 58 +- .../patches/200-add-lua-packetscript.patch | 6 +- .../patches/201-fix-lua-packetscript.patch | 9 + .../patches/210-freebsd-build-fix.patch | 11 + .../patches/300-geoip-endian-detection.patch | 18 - net/yaaw/Makefile | 50 - net/yggdrasil/Makefile | 81 + net/yggdrasil/files/yggdrasil.defaults | 99 + net/yggdrasil/files/yggdrasil.init | 34 + net/yggdrasil/files/ygguci | 236 + net/zerotier/Makefile | 4 +- net/zerotier/files/etc/config/zerotier | 5 +- net/zerotier/files/etc/init.d/zerotier | 10 +- net/zerotier/patches/010-mangix.patch | 10 + net/zerotier/patches/020-musl.patch | 25 + net/znc/Makefile | 22 +- .../100-move_rootcheck_after_config.patch | 52 - net/znc/patches/101-Reduce_rebuild_time.patch | 4 +- .../104-disable-empty-modules-check.patch | 24 +- net/znc/patches/120-openssl-deprecated.patch | 62 + sound/alac/Makefile | 56 - sound/alsa-utils/Makefile | 39 +- .../patches/100-uClibc-compat.patch | 23 - .../patches/101-disable-libsamplerate.patch | 45 - sound/espeak/Makefile | 33 +- sound/espeak/patches/010-uclibcxx.patch | 21 + ...-Fix_GCC_narrowing_conversion_errors.patch | 20 + sound/espeak/patches/101-portaudio.patch | 2093 - sound/fdk-aac/Makefile | 77 +- .../fdk-aac/patches-free/010-remove-sbr.patch | 49625 ++++++++++++++++ .../020-remove-hcx-rvlc-error.patch | 10233 ++++ .../030-remove-mp3-surround.patch | 29035 +++++++++ .../patches-free/040-remove-usac.patch | 9569 +++ sound/forked-daapd/Makefile | 19 +- sound/forked-daapd/files/forked-daapd.conf | 12 +- sound/forked-daapd/patches/010-errno.patch | 10 + sound/forked-daapd/patches/020-gcc10.patch | 20 + sound/madplay/Makefile | 50 +- sound/mocp/Makefile | 43 +- sound/mpc/Makefile | 32 +- sound/mpc/files/pls-handler.sh | 6 +- sound/mpd/Makefile | 200 +- sound/mpd/files/mpd.init | 19 +- .../patches/210-support_raw_pcm_streams.patch | 10 - ...20-handle_slow_server_stream_startup.patch | 16 - sound/mpg123/Makefile | 27 +- sound/opus-tools/Makefile | 9 +- sound/pianod/Makefile | 6 +- sound/portaudio/Makefile | 42 +- sound/pulseaudio/Makefile | 114 +- .../pulseaudio/patches/010-also-include.patch | 130 - sound/shairplay/Makefile | 22 +- .../patches/002-libavahi-compat-dnssd.patch | 11 - ...heck-for-dns_sd.h-in-case-libdl-was-.patch | 26 + sound/shairport-sync/Makefile | 20 +- .../shairport-sync/files/shairport-sync.init | 161 +- sound/shairport-sync/patches/010-no-cxx.patch | 35 + sound/shine/Makefile | 6 +- .../002-fix-name-collision-with-ffmpeg.patch | 64 - sound/sox/Makefile | 3 +- sound/squeezelite/Makefile | 62 +- sound/squeezelite/files/squeezelite.conf | 2 - sound/squeezelite/files/squeezelite.init | 108 +- .../patches/005-respect_LDFLAGS.patch | 56 - .../010-select_broadcast_interface.patch | 201 +- sound/squeezelite/patches/020-no_libmad.patch | 65 +- .../patches/030-fix_musl_compatibilty.patch | 14 - .../patches/040-clear_dynlink_errors.patch | 105 - sound/svox/Makefile | 2 +- ...t-text-to-.wav-using-svox-text-to-sp.patch | 3 +- sound/upmpdcli/Config.in | 2 +- sound/upmpdcli/Makefile | 22 +- sound/upmpdcli/files/upmpdcli.init | 4 +- .../patches/010-Add_icon_config.patch | 11 - utils/acl/Makefile | 12 +- utils/acpica-unix/Makefile | 5 +- utils/acpid/Makefile | 34 +- utils/acpid/files/acpid.init | 26 +- .../acpid/patches/002-dont-use-isfdtype.patch | 21 - utils/antfs-mount/Makefile | 28 + utils/antfs-mount/files/mount.ntfs | 2 + utils/ap51-flash/Makefile | 21 +- utils/at/Makefile | 10 +- utils/attendedsysupgrade-common/Makefile | 8 +- .../files/attendedsysupgrade.defaults | 2 +- .../files/c06d891233ba699 | 2 + utils/attr/Makefile | 27 +- .../110-Replace-bzero-with-memset.patch | 69 + utils/auc/Makefile | 6 +- utils/auc/src/auc.c | 257 +- utils/avrdude/Makefile | 8 +- utils/avrdude/patches/110-ud-to-u.patch | 38 + utils/bandwidthd/Makefile | 16 +- utils/bandwidthd/patches/030-gcc10.patch | 20 + utils/bash/Makefile | 21 +- utils/bash/files/etc/bash.bashrc | 6 + utils/bash/files/etc/profile.d/sys_bashrc.sh | 1 + utils/bash/patches/100-fix-jobs.patch | 6 +- utils/bash/patches/101-bash50-001.patch | 166 + utils/bash/patches/102-bash50-002.patch | 113 + utils/bash/patches/103-bash50-003.patch | 239 + utils/bash/patches/104-bash50-004.patch | 53 + utils/bash/patches/105-bash50-005.patch | 110 + utils/bash/patches/106-bash50-006.patch | 47 + utils/bash/patches/107-bash50-007.patch | 62 + utils/bash/patches/108-bash50-008.patch | 68 + utils/bash/patches/109-bash50-009.patch | 42 + utils/bash/patches/110-bash50-010.patch | 172 + utils/bash/patches/111-bash50-011.patch | 59 + utils/bash/patches/112-bash50-012.patch | 64 + utils/bash/patches/113-bash50-013.patch | 73 + utils/bash/patches/114-bash50-014.patch | 52 + utils/bash/patches/115-bash50-015.patch | 78 + utils/bash/patches/116-bash50-016.patch | 58 + utils/bash/patches/117-bash50-017.patch | 289 + utils/bash/patches/900-no_doc.patch | 2 +- utils/bash/patches/901-startup-files.patch | 27 + utils/bcm27xx-eeprom/Makefile | 58 + ...1-rpi-eeprom-update-OpenWrt-defaults.patch | 48 + ...rpi-eeprom-config-switch-to-Python-3.patch | 21 + ...m-update-change-default-include-path.patch | 44 + utils/bigclown/bigclown-control-tool/Makefile | 38 + .../bigclown/bigclown-firmware-tool/Makefile | 40 + utils/bigclown/bigclown-gateway/Makefile | 56 + utils/bigclown/bigclown-gateway/files/config | 10 + utils/bigclown/bigclown-gateway/files/init | 58 + .../bigclown/bigclown-mqtt2influxdb/Makefile | 50 + .../bigclown-mqtt2influxdb/files/config.yml | 67 + .../bigclown-mqtt2influxdb/files/init | 21 + utils/bluelog/Makefile | 18 +- utils/bluez/Makefile | 4 +- utils/bluez/patches/201-readline.patch | 20 +- utils/bluez/patches/202-fix-endianness.patch | 10 +- ...fresh_adv_manager_for_non-LE_devices.patch | 8 +- utils/bmx7-dnsupdate/Makefile | 1 + utils/bonnie++/Makefile | 28 +- .../patches/001-cross_compile_fix.patch | 38 - .../002-add-verbose-error-messages.patch | 2 +- .../bonnie++/patches/010-openwrt-fixes.patch | 81 + utils/btrfs-progs/Config.in | 9 + utils/btrfs-progs/Makefile | 68 +- utils/btrfs-progs/files/btrfs-scan.init | 12 +- utils/byobu/Makefile | 102 + .../patches/001-hardcode-utf-8-charmap.patch | 11 + utils/byobu/patches/002-fix-missing-tty.patch | 11 + .../byobu/patches/004-skip-python-test.patch | 10 + utils/byobu/patches/005-monitor-overlay.patch | 41 + .../patches/006-only-pgrep-services.patch | 11 + .../patches/007-count-dropbear-users.patch | 24 + utils/cache-domains/Makefile | 55 + utils/cache-domains/README.md | 30 + utils/cache-domains/files/30-cache-domains | 8 + utils/cache-domains/files/cache-domains | 52 + utils/canutils/Makefile | 38 +- utils/ccid/Makefile | 6 +- utils/ccrypt/Makefile | 8 +- utils/ccrypt/patches/001-no-intl.patch | 106 +- utils/cgroupfs-mount/Makefile | 19 +- utils/cmdpad/Makefile | 2 +- utils/cmdpad/patches/150-header.patch | 49 + utils/collectd/Makefile | 53 +- utils/collectd/files/collectd.init | 15 +- utils/collectd/files/collectd.uci | 5 + .../files/exec-scripts/sqm_collectd.sh | 107 + .../usr/share/collectd/plugin/syslog.json | 6 + .../files/usr/share/collectd/plugin/ubi.json | 8 + .../patches/600-fix-libmodbus-detection.patch | 2 +- .../patches/900-add-iwinfo-plugin.patch | 24 +- .../patches/910-add-cake-qdisc-types.patch | 20 + .../920-fix-ubi-data-source-type.patch | 47 + utils/containerd/Makefile | 2 +- utils/coremark/Makefile | 50 + utils/coreutils/Makefile | 68 +- .../patches/001-no_docs_man_tests.patch | 64 +- .../patches/002-fix_compile_with_uclibc.patch | 12 - ...-831-behavior-on-removed-directories.patch | 117 + utils/crconf/Makefile | 13 +- utils/crelay/Makefile | 17 +- utils/cryptsetup/Makefile | 81 +- utils/ctop/Makefile | 52 + utils/dbus/Makefile | 152 +- utils/dbus/files/dbus-launch | 4 +- utils/dbus/files/dbus.init | 4 +- utils/dbus/patches/100-fix-poll-select.patch | 13 - utils/device-observatory/Makefile | 37 + .../files/etc/config/device-observatory | 26 + .../files/etc/init.d/device-observatory | 66 + .../patches/010-uClibc-ng.patch | 22 + utils/dfu-util/Makefile | 4 +- utils/digitemp/Makefile | 18 +- utils/dmidecode/Makefile | 6 +- utils/docker-ce/Config.in | 159 +- utils/docker-ce/Makefile | 52 +- utils/docker-ce/files/daemon.json | 4 - utils/docker-ce/files/dockerd.init | 81 +- utils/docker-ce/files/etc/config/dockerd | 7 + .../etc/sysctl.d/sysctl-br-netfilter-ip.conf | 7 + utils/docker-compose/Makefile | 51 + utils/domoticz/Makefile | 45 +- utils/domoticz/patches/010-boost-173.patch | 413 + .../patches/011-openzwave-include.patch | 129 + .../patches/012-minizip-overflow.patch | 46 + utils/dosfstools/Makefile | 5 +- ..._CHECK_LIB-for-iconv-library-linking.patch | 27 - utils/dosfstools/patches/010-iconv.patch | 26 + utils/dump1090/Makefile | 32 +- utils/dump1090/files/dump1090.init | 6 +- utils/dump1090/patches/010-gcc10.patch | 80 + utils/ecdsautils/Makefile | 32 +- utils/evtest/Makefile | 19 +- utils/evtest/patches/010-musl.patch | 24 + ...ld-on-32bit-arches-with-64bit-time_t.patch | 43 + utils/fft-eval/Makefile | 41 + utils/findutils/Makefile | 65 +- utils/fio/Makefile | 68 + utils/fish/Makefile | 69 + utils/flashrom/Makefile | 22 +- utils/flashrom/flashrom.mk | 23 +- .../patches/0001-fix_internal_bitbang.patch | 11 - .../patches/0002-fix-io-h-include.patch | 10 - ...pi-avoid-deprecated-libusb-functions.patch | 40 - ...-build_internal_programmer_all_archs.patch | 18 + utils/flent-tools/Makefile | 21 +- utils/fontconfig/Makefile | 4 +- utils/fuse/Makefile | 107 + utils/fuse/patches/100-missing_includes.patch | 10 + .../fuse/patches/112-no_break_on_mknod.patch | 11 + ...t_arm64_fuse_kernel_h_clean_includes.patch | 30 + utils/gammu/Makefile | 47 +- utils/gammu/files/gammu.init | 63 +- .../patches/001-iconv-disabling-option.patch | 51 - .../patches/002-no-fstack-protector.patch | 11 - .../patches/003-cmake-cross-toolchain.patch | 43 - .../patches/004-cmake_libdbi_optional.patch | 34 - utils/gammu/patches/010-utils-shell-fix.patch | 16 - utils/gammu/patches/020-select.patch | 10 + utils/gawk/Makefile | 13 +- utils/gddrescue/Makefile | 51 + utils/gddrescue/patches/001-fix_uclibc.patch | 28 + utils/gkermit/Makefile | 7 +- utils/gkermit/patches/010-musl.patch | 29 + utils/gnupg/Makefile | 8 +- utils/gnuplot/Makefile | 47 + .../010-remove_doc_from_makefile.patch | 13 + utils/gptfdisk/Makefile | 23 +- ...ome-extra-flushes-before-getline-cin.patch | 79 + utils/grep/Makefile | 37 +- utils/gzip/Makefile | 39 +- utils/hamlib/Makefile | 11 +- utils/hashdeep/Makefile | 45 + utils/haveged/Makefile | 10 +- utils/haveged/files/haveged.init | 17 +- utils/hd-idle/Makefile | 2 +- utils/hd-idle/files/hd-idle.init | 13 +- utils/hdparm/Makefile | 5 +- utils/hfsprogs/Makefile | 14 +- .../0016-Fix-fsckhfs-wide-literal.patch | 13 + .../patches/010-valloc-to-memalign.patch | 20 + utils/hfsprogs/patches/020-cdefs.patch | 30 + utils/hplip/Makefile | 117 + utils/hplip/files/hplib.conf | 2 + utils/hplip/patches/010-libusb_fix.patch | 13 + .../patches/020-remove_cups_dep_on_scan.patch | 162 + ...0-replace_unsafe_memcpy_with_memmove.patch | 15 + utils/hplip/patches/050-fix-glibcisms.patch | 17 + utils/hplip/patches/060-fix-uclibc.patch | 15 + utils/hub-ctrl/Makefile | 4 +- utils/hwinfo/Makefile | 89 + utils/hwinfo/patches/0-hardcoding-version | 19 + .../patches/1-remove_libx8emu_dependency | 68 + ...-disable-generation-of-tiny-hwinfo-headers | 75 + .../patches/3-assorted-Makefile-butchery | 197 + utils/i2c-tools/Makefile | 103 +- utils/idevicerestore/Makefile | 47 + utils/inotify-tools/Makefile | 12 +- utils/io/Makefile | 5 +- utils/io/src/io.c | 4 +- utils/irqbalance/Makefile | 38 +- utils/irqbalance/files/irqbalance.config | 10 + utils/irqbalance/files/irqbalance.init | 36 + .../patches/100-disable-ui-compilation.patch | 47 - .../100-remove-libncursesw-dependency.patch | 10 + .../110-fix-runtime-socket-directory.patch | 22 + utils/irqbalance/patches/200-avoid-glib.patch | 421 - .../300-upstream-fix-for-AARCH64.patch | 21 - utils/joe/Makefile | 11 +- utils/jupp/Makefile | 97 + utils/klish/Makefile | 23 +- utils/kmod/Makefile | 23 +- utils/lcd4linux/Makefile | 50 +- .../patches/110-uclibc-logarithm-fix.patch | 11 - utils/lcd4linux/patches/160-uinput_defs.patch | 24 - .../170-add-generic-spidev-driver.patch | 2 +- .../patches/172-add-TEW673GRU-driver.patch | 2 +- utils/lcd4linux/patches/200-musl.patch | 10 + utils/lcdproc/Makefile | 17 +- utils/lcdproc/patches/110-in-outb.patch | 11 + utils/less/Makefile | 31 +- utils/libnetwork/Makefile | 6 +- utils/lm-sensors/Makefile | 6 +- .../patches/100-ignore-no-sensor-info.patch | 13 - utils/logrotate/Makefile | 40 +- utils/lrzsz/Makefile | 4 +- utils/lsof/Makefile | 22 +- utils/lsof/patches/003-lsof_selinux.patch | 2 +- utils/lsof/patches/004-lsof_ccv.patch | 2 +- utils/lvm2/Makefile | 37 +- utils/lvm2/files/lvm2.preinit | 25 + utils/lvm2/patches/000-compile.patch | 11 - utils/lvm2/patches/001-include_fix.patch | 11 - utils/lvm2/patches/002-const-stdio.patch | 16 +- utils/lvm2/patches/003-no-mallinfo.patch | 6 +- ...04-device-include-goto-lable-as-well.patch | 2 +- utils/lxc/Config.in | 5 +- utils/lxc/Makefile | 83 +- utils/lxc/files/lxc-auto.init | 13 + ...01-nl-avoid-NULL-pointer-dereference.patch | 37 - utils/lxc/patches/002-compile.patch | 10 - utils/lxc/patches/003-compile.patch | 11 - .../lxc/patches/010-Remove-distro-check.patch | 47 + utils/lxc/patches/010-compile.patch | 37 - utils/lxc/patches/015-getline.patch | 6 +- utils/lxc/patches/020-lxc-checkconfig.patch | 6 +- .../025-remove-unsupported-option.patch | 14 +- utils/macchanger/Makefile | 4 +- utils/mariadb-common/Makefile | 49 + utils/{mariadb => mariadb-common}/conf/my.cnf | 0 utils/mariadb/Makefile | 267 +- utils/mariadb/conf/50-server.cnf | 1 - utils/mariadb/files/mysqld.config | 6 +- utils/mariadb/files/mysqld.init | 184 +- utils/mariadb/patches/100-fix_hostname.patch | 2 +- utils/mariadb/patches/110-pcre.cmake.patch | 41 +- utils/mariadb/patches/130-c11_atomics.patch | 138 +- .../patches/140-mips-connect-unaligned.patch | 339 +- utils/mariadb/patches/160-mips-machine.patch | 22 +- .../patches/170-ppc-remove-glibc-dep.patch | 114 +- utils/mariadb/patches/180-libedit.patch | 105 - ...-relax-mysql_install-db-wrt-pam-tool.patch | 39 + .../190-replace-hostname-in-mysqld_safe.patch | 29 + utils/mbtools/Makefile | 21 +- utils/mbtools/patches/010-glib.patch | 11 + utils/mc/Config.in | 6 +- utils/mc/Makefile | 18 +- utils/mc/patches/010-subshell.patch | 27 +- ...20-fix-mouse-handling-newer-terminfo.patch | 73 + utils/mg/Makefile | 43 + .../patches/001-cross_compile_openwrt.patch | 153 + utils/mg/patches/900-musl_compatibility.patch | 13 + utils/mg/patches/901-use_pcre.patch | 11 + utils/micrond/Makefile | 23 + utils/micrond/files/etc/init.d/micrond | 15 + utils/micrond/files/usr/lib/micron.d/.keep | 0 utils/micrond/src/Makefile | 3 + utils/micrond/src/micrond.c | 316 + utils/minicom/Makefile | 3 +- utils/minicom/patches/200-gcc10.patch | 30 + utils/mmc-utils/Makefile | 10 +- ...erly-set-fortify-source-in-makefile.patch} | 0 ...f-Product-Revision-and-Serial-Number.patch | 29 + ...Add-various-SD-eMMC-vendors-to-table.patch | 97 + .../patches/0008-Various-fixes.patch | 276 + ...ils-let-FFU-mode-use-CMD23-and-CMD25.patch | 188 + ...her-optimization-of-trimming-routine.patch | 35 + ...-mmc-utils-Fix-scaling-of-cache-size.patch | 34 + utils/moreutils/Makefile | 9 +- .../patches/001_disable-manuals.patch | 6 +- .../patches/002_no-install-strip.patch | 2 +- utils/mt-st/Makefile | 8 +- utils/mt-st/patches/010-sysmacros.patch | 24 + utils/nano/Makefile | 15 +- ...pstream-fix-for-3.1-tiny-compilation.patch | 29 - utils/ncdu/Makefile | 16 +- utils/nnn/Makefile | 38 + utils/ntfs-3g/Makefile | 23 +- utils/oath-toolkit/Makefile | 17 +- .../oath-toolkit-2.6.2-build-fix.patch | 852 + utils/open-plc-utils/Makefile | 24 +- utils/open-plc-utils/patches/010-gcc10.patch | 11 + .../patches/100-remove-build-timestamp.patch | 37 - utils/open-vm-tools/Makefile | 138 + {libs => utils}/open-vm-tools/files/shutdown | 0 .../open-vm-tools/files/tools.conf | 0 .../open-vm-tools/files/vmtoolsd.init | 0 .../open-vm-tools/files/vmware-scsi.hotplug | 0 ...1-configure.ac-don-t-use-dnet-config.patch | 0 .../0002-add-include-sys-sysmacros.h.patch | 0 ...e-configure-test-for-struct-timespec.patch | 0 ...finition-of-ALLPERMS-and-ACCESSPERMS.patch | 0 ...-test-for-feature-instead-of-platfor.patch | 0 ...onfigure-test-for-sys-stat.h-include.patch | 0 ...include-poll.h-instead-of-sys-poll.h.patch | 0 .../0008-Rename-poll.h-to-vm_poll.h.patch | 0 ...strerror_r-unless-on-gnu-libc-system.patch | 0 ...10-Use-uintmax_t-for-handling-rlim_t.patch | 14 + ...011-Use-off64_t-instead-of-__off64_t.patch | 0 .../0013-fsutil_use_typedef_loff_t.patch | 0 ...ve-musl-does-not-implement-res_ninit.patch | 46 + utils/open2300/Makefile | 23 +- utils/open2300/patches/001-crosscompile.patch | 139 - utils/openobex/Makefile | 13 +- utils/openobex/patches/001-cxx.patch | 15 +- utils/openocd/Makefile | 39 +- utils/openocd/patches/010-gcc10.patch | 31 + utils/opensc/Makefile | 10 +- .../patches/010-openssl-deprecated.patch | 24 + utils/openzwave/Makefile | 18 +- ...x-compilation-against-musl-libc-1127.patch | 28 - utils/openzwave/patches/900_fix-build.patch | 29 - .../patches/901_no-hidcontroller.patch | 89 - utils/openzwave/patches/902_no-udev.patch | 24 - .../patches/904-fix-lib-include-path.patch | 15 - utils/owfs/Makefile | 14 +- utils/owfs/patches/010-gcc10.patch | 38 + ...-netlink-w1-status-message-detection.patch | 30 - .../101-fix-no-reset-routine-segfault.patch | 13 - utils/pciutils/Makefile | 48 +- utils/pciutils/patches/101-no-strip.patch | 4 +- utils/pcsc-lite/Makefile | 5 +- utils/pcsc-tools/Makefile | 4 +- utils/picocom/Makefile | 15 +- utils/picocom/patches/010-fix-compile.patch | 12 + .../picocom/patches/020-fix-compile-x86.patch | 44 + utils/picocom/patches/100-musl-compat.patch | 17 - utils/powertop/Makefile | 53 + utils/powertop/patches/002-strerror_r.patch | 20 + ...-src-main-Add-missing-pthread-header.patch | 38 + ...-Change-open-parameter-to-const-char.patch | 30 + utils/pps-tools/Makefile | 17 +- utils/procps-ng/Makefile | 12 +- utils/progress/Makefile | 11 +- .../patches/001_set-ncurses-lib.patch | 16 +- utils/prometheus-node-exporter-lua/Makefile | 28 +- .../etc/config/prometheus-node-exporter-lua | 3 +- .../etc/init.d/prometheus-node-exporter-lua | 43 +- .../usr/bin/prometheus-node-exporter-lua | 4 +- .../lua/prometheus-collectors/conntrack.lua | 12 +- .../lib/lua/prometheus-collectors/dawn.lua | 52 + .../hostapd_stations.lua | 110 + .../lib/lua/prometheus-collectors/ltq-dsl.lua | 100 + .../lib/lua/prometheus-collectors/netdev.lua | 2 +- .../lib/lua/prometheus-collectors/openwrt.lua | 28 +- .../lib/lua/prometheus-collectors/time.lua | 2 +- .../lib/lua/prometheus-collectors/uname.lua | 6 +- .../lib/lua/prometheus-collectors/wifi.lua | 44 +- .../prometheus-collectors/wifi_stations.lua | 64 +- utils/prometheus-statsd-exporter/Makefile | 49 + .../etc/config/prometheus-statsd-exporter | 12 + .../etc/init.d/prometheus-statsd-exporter | 99 + .../files/etc/prometheus-statsd-exporter.yml | 24 + utils/prometheus/Makefile | 56 + utils/prometheus/files/etc/init.d/prometheus | 27 + utils/prometheus/files/etc/prometheus.yml | 29 + .../etc/uci-defaults/prometheus-defaults | 13 + utils/prometheus/files/prometheus.yml | 29 + utils/pservice/Makefile | 32 + utils/pservice/README.md | 44 + utils/pservice/files/pservice.config | 24 + utils/pservice/files/pservice.init | 63 + utils/pv/Makefile | 8 +- utils/qemu/Makefile | 32 +- utils/qemu/files/shutdown | 2 - ...nfigure-allow-disable-fortify_source.patch | 12 +- ...enabling-disabling-libudev-from-comm.patch | 13 +- ...-guest_agent-no-matter-whether-softm.patch | 27 + ...lation-failure-when-isnan-is-a-macro.patch | 66 - ...lation-failure-when-isnan-is-a-macro.patch | 66 + ...ilation-when-AS-is-actually-gcc-driv.patch | 32 - ...ilation-when-AS-is-actually-gcc-driv.patch | 31 + ...005-slirp-ipreass-fix-use-after-free.patch | 46 - ...util-mmap-alloc-fix-missing-MAP_SYNC.patch | 50 + utils/quota/Makefile | 52 + utils/readsb/Makefile | 73 + utils/readsb/files/readsb.config | 46 + utils/readsb/files/readsb.init | 105 + ...twork-avoid-segfault-in-freeaddrinfo.patch | 89 + utils/readsb/patches/010-gcc10.patch | 61 + utils/restic/Makefile | 42 + utils/rng-tools/Makefile | 56 +- .../patches/100-message-no-newline.patch | 137 - utils/rrdtool1/Makefile | 6 +- .../040-no-e-notation-on-log-display.patch | 27 + utils/rtklib/Makefile | 18 +- utils/rtklib/patches/010-musl.patch | 12 + utils/rtklib/patches/020-no-gfortran.patch | 21 + utils/rtl-ais/Makefile | 21 +- utils/rtl-ais/files/rtl_ais.init | 15 +- utils/rtl-ais/patches/010-musl.patch | 10 + utils/rtl-sdr/Makefile | 19 +- utils/rtl-sdr/patches/101-fix-inlines.patch | 66 - utils/rtl_433/Makefile | 22 +- utils/rtty/Makefile | 96 +- utils/rtty/files/rtty.config | 3 +- utils/rtty/files/rtty.init | 88 +- utils/runc/Makefile | 2 +- utils/sane-backends/Makefile | 189 +- utils/sane-backends/files/saned.hotplug | 28 + utils/sane-backends/files/saned.sbin | 24 + utils/sane-backends/files/saned.xinetd | 14 + utils/sane-backends/files/xinet.d_sane-port | 14 - .../patches/002-remove-uneeded.patch | 6 +- .../patches/031-fix_uclibc.patch | 24 - ...emove_linked_libs_for_unused_preload.patch | 22 - .../patches/100-fix-bigendian.patch | 21 + .../patches/101-fix_uclibc_std_rand.patch | 16 + utils/screen/Makefile | 27 +- .../patches/100-cross_compile_fix.patch | 64 - ...10-do_not_add_srcdir_to_include_path.patch | 11 - utils/screen/patches/200-musl-compat.patch | 57 - utils/sed/Makefile | 52 + utils/setserial/Makefile | 4 +- utils/setserial/patches/010-no-docs.patch | 13 + utils/setserial/patches/020-musl.patch | 19 + utils/shadow/Makefile | 40 +- utils/shadow/patches/001-busybox_ash.patch | 11 - .../patches/002-disable-ruser-lookup.patch | 10 - ...id_t-and-gid_t-using-AC_CHECK_SIZEOF.patch | 35 - .../patches/004-fix-su-controoling-term.patch | 2 +- utils/sispmctl/Makefile | 44 +- utils/sispmctl/patches/001-fix-includes.patch | 25 - utils/slide-switch/Makefile | 49 +- utils/smartmontools/Makefile | 21 +- utils/smartmontools/files/smartd.init | 18 +- .../patches/002-os_mailer-is-mailx.patch | 13 + utils/smstools3/Makefile | 13 +- utils/smstools3/files/smstools3.init | 2 +- utils/spi-tools/Makefile | 35 +- utils/squashfs-tools/Config.in | 6 + utils/squashfs-tools/Makefile | 30 +- ...c-get-inline-functions-work-with-C99.patch | 154 - .../patches/0004-vla-to-malloc.patch | 474 - ...ashfs-fix-compilation-with-glibc-2.2.patch | 47 - utils/squashfs-tools/patches/010-gcc10.patch | 43 + utils/ssdeep/Makefile | 45 + utils/sshpass/Makefile | 37 + utils/stm32flash/Makefile | 10 +- utils/stoken/Makefile | 20 +- utils/sumo/Makefile | 26 +- utils/sumo/patches/010-usleep.patch | 73 + utils/sumo/patches/020-strerror.patch | 26 + utils/sumo/patches/100-configure_fix.patch | 14 - utils/swig/Makefile | 17 +- ...0001-Add-Node-7.x-aka-V8-5.2-support.patch | 330 - utils/syncthing/Makefile | 68 + utils/syncthing/files/etc/config/syncthing | 26 + utils/syncthing/files/etc/init.d/syncthing | 69 + .../etc/sysctl.d/90-syncthing-inotify.conf | 1 + utils/sysstat/Makefile | 25 +- utils/sysstat/files/sysstat.init | 27 +- utils/sysstat/patches/100-musl-compat.patch | 30 - utils/sysstat/patches/110-remove-sccsid.patch | 131 - utils/tang/Makefile | 73 + utils/tang/files/tangdw | 4 + utils/tang/files/tangdx | 12 + utils/tang/patches/010-makefile.patch | 31 + utils/tang/patches/020-no-systemd.patch | 35 + utils/tang/patches/030-readlink.patch | 13 + utils/tar/Makefile | 58 +- utils/taskwarrior/Makefile | 18 +- utils/tcsh/Makefile | 36 +- utils/tcsh/patches/001-sysmalloc.patch | 2 +- utils/tcsh/patches/010-wint.patch | 14 + utils/tcsh/patches/020-cross.patch | 11 + utils/tcsh/patches/030-gcc10.patch | 22 + utils/telldus-core/Makefile | 67 + utils/telldus-core/files/telldusd | 20 + utils/telldus-core/files/tellstick.conf | 21 + .../patches/100-add_includes.patch | 21 + .../patches/110-fix_warnings.patch | 23 + .../patches/120-fix_missing_var_conf.patch | 11 + .../patches/900-openwrt_fixes_cmake.patch | 56 + .../920-openwrt_missing_var_conf.patch | 18 + utils/telldus-core/patches/930-usleep.patch | 40 + utils/telldus-core/patches/940-cxx11.patch | 29 + utils/telldus-core/patches/950-pthread.patch | 21 + utils/telldus-core/patches/960-time.patch | 20 + utils/temperusb/Makefile | 42 + utils/tessdata/Makefile | 59 + utils/tesseract/Makefile | 57 + utils/tio/Makefile | 15 +- utils/tmux/Makefile | 17 +- utils/tree/Makefile | 8 +- utils/uledd/Makefile | 8 +- utils/unrar/Makefile | 6 +- utils/unrar/patches/100-makefile_fixes.patch | 2 +- utils/unzip/Makefile | 3 +- ...18-1000035-overflow-password-protect.patch | 34 + utils/usbmuxd/Makefile | 34 +- utils/usbmuxd/files/usbmuxd.init | 17 + utils/usbmuxd/patches/010-config.patch | 11 + utils/uvcdynctrl/Makefile | 31 +- utils/uvcdynctrl/patches/010-iconv.patch | 11 + utils/vim/Makefile | 34 +- ...ompilation-date-in-SOURCE_DATE_EPOCH.patch | 6 +- .../002-remove_helptags_generation.patch | 2 +- utils/vim/patches/003-CVE-2019-12735.patch | 15 + utils/vim/scripts/uname | 2 + utils/watchcat/Makefile | 1 + utils/which/Makefile | 37 + utils/wifitoggle/Makefile | 5 +- utils/wipe/Makefile | 42 + ...version_hash_and_fix_release_version.patch | 30 + utils/xfsprogs/Makefile | 93 + utils/xfsprogs/patches/110-subdirs.patch | 12 + .../xfsprogs/patches/120-disable_assert.patch | 12 + ...six_memalign-instead-of-deprecated-v.patch | 26 + utils/xfsprogs/patches/140-mman.patch | 17 + utils/xz/Makefile | 30 +- .../001-relative-pkg-config-paths.patch | 13 + utils/yara/Config.in | 7 + utils/yara/Makefile | 23 +- utils/ykclient/Makefile | 47 + utils/ykpers/Makefile | 55 + utils/ykpers/patches/010-gcc10.patch | 13 + utils/ykpers/patches/020-json-c-0.14.patch | 83 + utils/yunbridge/Makefile | 49 - utils/yunbridge/files/etc/config/yunbridge | 6 - utils/yunbridge/files/etc/init.d/yunbridge | 22 - utils/yunbridge/files/sbin/yunbridge | 6 - .../files/usr/bin/pretty-wifi-info.lua | 75 - .../lib/lua/luci/controller/arduino/index.lua | 414 - .../files/usr/lib/lua/luci/sha256.lua | 199 - utils/yunbridge/patches/000-scripts.patch | 18 - utils/zile/Makefile | 4 +- utils/zip/Makefile | 73 - ...e-borrow-the-LFS-test-from-autotools.patch | 90 - utils/zip/patches/010-remove-build-date.patch | 15 - utils/zoneinfo/Makefile | 32 +- utils/zsh/Makefile | 38 +- utils/zstd/Makefile | 93 +- utils/zstd/patches/010-python.patch | 21 + 2904 files changed, 216720 insertions(+), 68234 deletions(-) create mode 100644 admin/atop/Makefile create mode 100644 admin/atop/patches/010-makefile-missing-cflags.patch create mode 100644 admin/backuppc/Makefile create mode 100644 admin/backuppc/files/backuppc.init create mode 100644 admin/backuppc/files/backuppc.upgrade create mode 100644 admin/backuppc/files/fixup-config-pl.patch create mode 100644 admin/backuppc/files/setuidwrapper.c create mode 100644 admin/backuppc/patches/001-debian-fixes.patch create mode 100644 admin/debootstrap/patches/010-no-nvswitch.patch create mode 100644 admin/gkrellmd/Makefile create mode 100644 admin/gkrellmd/files/gkrellmd.init create mode 100644 admin/gkrellmd/patches/100-conf.patch create mode 100644 admin/ipmitool/patches/0001-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch create mode 100644 admin/ipmitool/patches/0002-ID-461-Make-compiler-happier-about-changes-related-t.patch create mode 100644 admin/ipmitool/patches/0003-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch create mode 100644 admin/ipmitool/patches/0004-ID-480-Call-EVP_CIPHER_CTX_free-instead-of-EVP_CIPHE.patch create mode 100644 admin/ipmitool/patches/0005-ipmitool-Fix-compile-with-deprecated-APIs-disabled.patch create mode 100644 admin/ipmitool/patches/0006-CVE-2020-5208-fru-Fix-buffer-overflow-vulnerabilities.patch create mode 100644 admin/ipmitool/patches/0007-CVE-2020-5208-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch create mode 100644 admin/ipmitool/patches/0008-CVE-2020-5208-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch create mode 100644 admin/ipmitool/patches/0009-CVE-2020-5208-channel-Fix-buffer-overflow.patch create mode 100644 admin/ipmitool/patches/0010-CVE-2020-5208-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch create mode 100644 admin/ipmitool/patches/0011-CVE-2020-5208-fru-sdr-Fix-id_string-buffer-overflows.patch delete mode 100644 admin/muninlite/files/etc/xinetd.d/munin create mode 100644 admin/muninlite/files/etc/xinetd.d/muninlite delete mode 100644 admin/muninlite/patches/001-fix_disks.patch delete mode 100644 admin/muninlite/patches/002-hostname.patch delete mode 100644 admin/muninlite/patches/100-fix-no-ethtool.patch delete mode 100644 admin/muninlite/patches/110-fix-uptime-days.patch delete mode 100644 admin/muninlite/patches/200-add-tap-dev.patch delete mode 100644 admin/muninlite/patches/210-add-bridge-devs.patch delete mode 100644 admin/muninlite/patches/220-modify-ifname-parser.patch delete mode 100644 admin/muninlite/patches/230-fix-available-interface-parsing.patch create mode 100644 admin/netatop/Makefile create mode 100644 admin/netatop/patches/010-daemon-makefile-ldflags.patch create mode 100644 admin/nyx/Makefile create mode 100644 admin/schroot/Config.in create mode 100644 admin/schroot/Makefile create mode 100755 admin/schroot/files/schroot.init create mode 100644 admin/schroot/patches/01-openwrt.patch delete mode 100644 admin/sudo/patches/030-musl-fix-missing-header.patch create mode 100644 admin/syslog-ng/files/logread create mode 100755 admin/syslog-ng/files/scl/network_localhost/detect.sh create mode 100644 admin/syslog-ng/files/scl/network_localhost/plugin.conf delete mode 100644 admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch create mode 100644 admin/zabbix/files/zabbix-network-ubus-acl.json create mode 100644 admin/zabbix/files/zabbix-wifi-ubus-acl.json delete mode 100644 admin/zabbix/patches/002-fix-res_send-on-uclibc.patch delete mode 100644 admin/zabbix/patches/003-change-user-and-foreground.patch delete mode 100644 admin/zabbix/patches/100-musl-compat.patch create mode 100644 devel/asu/Makefile create mode 100644 devel/asu/files/asu.defaults create mode 100644 devel/asu/files/asu.init create mode 100644 devel/gcc/Config.in delete mode 100644 devel/gcc/patches/003-mpfr-longlong-mips.patch delete mode 100644 devel/gcc/patches/020-no-plt-backport.patch delete mode 100644 devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch delete mode 100644 devel/gcc/patches/100-uclibc-conf.patch create mode 100644 devel/gcc/patches/110-Fix-MIPS-PR-84790.patch delete mode 100644 devel/gcc/patches/200-musl_config.patch delete mode 100644 devel/gcc/patches/201-musl_arm.patch delete mode 100644 devel/gcc/patches/202-musl_mips.patch delete mode 100644 devel/gcc/patches/203-musl_powerpc.patch delete mode 100644 devel/gcc/patches/204-musl_sh.patch delete mode 100644 devel/gcc/patches/205-musl_x86.patch delete mode 100644 devel/gcc/patches/206-musl_aarch64.patch delete mode 100644 devel/gcc/patches/207-musl_fixincludes.patch delete mode 100644 devel/gcc/patches/209-musl_libstdc++.patch delete mode 100644 devel/gcc/patches/240-musl-libitm-fixes.patch delete mode 100644 devel/gcc/patches/250-add-musl.patch delete mode 100644 devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch delete mode 100644 devel/gcc/patches/830-arm_unbreak_armv4t.patch delete mode 100644 devel/gcc/patches/880-no_java_section.patch create mode 100644 devel/gcc/patches/881-no_tm_section.patch delete mode 100644 devel/gcc/patches/930-osdefines.patch create mode 100644 devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch delete mode 100644 devel/gcc/patches/960-go_libm.patch create mode 100644 devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch delete mode 100644 devel/gcc/patches/970-warn_bug.patch delete mode 100644 devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch create mode 100644 devel/lttng-tools/patches/010-fix-compile-fails-for-x32-arch.patch create mode 100644 devel/lttng-tools/patches/020-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch delete mode 100644 devel/lttng-tools/patches/100-musl-compat.patch delete mode 100644 devel/lttng-tools/patches/200-use-extern.patch delete mode 100644 devel/ninja/patches/010-musl.patch delete mode 100644 devel/ninja/patches/020-uclibc.patch create mode 100644 devel/patch/patches/050-CVE-2019-13636.patch create mode 100644 devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch create mode 100644 devel/pkgconf/Makefile create mode 100644 ipv6/miredo/Makefile create mode 100644 ipv6/miredo/files/miredo.init create mode 100644 ipv6/miredo/patches/001-fix-musl-pthread-non-portable.patch create mode 100644 ipv6/miredo/patches/002-fix-redefinition-ethadr.patch create mode 100644 ipv6/miredo/patches/003-fix-warnings-portable-defined.patch create mode 100644 kernel/antfs/Makefile create mode 100644 kernel/ksmbd/Makefile create mode 100644 kernel/ksmbd/patches/01-keep_kmod_metadata.patch create mode 100644 lang/chicken-scheme/Makefile delete mode 100644 lang/erlang/patches/101-emulator_includes.patch delete mode 100644 lang/erlang/patches/102-musl_compat.patch delete mode 100644 lang/erlang/patches/103-disable_emacs.patch delete mode 100644 lang/jamvm/Makefile delete mode 100644 lang/jamvm/patches/001-Use-fenv.h-instead-of-fpu_control.h.patch create mode 100644 lang/lua-bit32/Makefile delete mode 100644 lang/lua-copas/patches/makefile.patch create mode 100644 lang/lua-ev/Makefile create mode 100644 lang/lua-libmodbus/Makefile delete mode 100644 lang/lua-openssl/patches/0010-Fix-Linkage.patch delete mode 100644 lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch delete mode 100644 lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch create mode 100644 lang/lualanes/patches/200-fix-redef-error.patch delete mode 100644 lang/luaposix/patches/100-eglibc-compat.patch delete mode 100644 lang/luaposix/patches/101-disable-curses.patch create mode 100644 lang/luaposix/patches/900-disable-ldoc.patch create mode 100755 lang/luaposix/scripts/uname create mode 100644 lang/luasec/patches/100-fix-compilation.patch create mode 100644 lang/luasocket/patches/040-remove-fpic-and-warnings.patch create mode 100644 lang/luasrcdiet/Makefile rename lang/perl-device-usb/patches/{110-just_assume_libusb_is_there.diff => 110-just_assume_libusb_is_there.patch} (100%) create mode 100644 lang/perl-file-rsyncp/Makefile create mode 100644 lang/perl-file-rsyncp/patches/001-no-subdirs.patch create mode 100644 lang/perl-net-cidr-lite/Makefile create mode 100644 lang/perl-parse-yapp/Makefile create mode 100644 lang/perl-www-curl/patches/210-curl_7.66_compat.patch create mode 100644 lang/perl-www-curl/patches/220-curl_7.69_compat.patch create mode 100644 lang/perl-xml-parser/patches/030-expat.patch create mode 100644 lang/perl/files/mips64el.config create mode 100644 lang/perl/patches/301-fix_macos_static_linking.patch create mode 100644 lang/perl/patches/998-Errno_errno.h_path.patch create mode 100644 lang/perl/patches/999-fix-build-failure-against-gcc-10.patch delete mode 100644 lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch delete mode 100644 lang/php7-pecl-http/patches/200-string_or_null_register.patch delete mode 100644 lang/php7-pecl-http/patches/300-fix-73.patch create mode 100644 lang/php7-pecl-krb5/Makefile create mode 100644 lang/php7-pecl-mcrypt/Makefile create mode 100644 lang/php7-pecl-redis/Makefile delete mode 100644 lang/php7/patches/0016-dont-gitclean-in-build.patch delete mode 100644 lang/php7/patches/1000-fix_membar_producer_link_error_gcc3x.patch delete mode 100644 lang/php7/patches/1002-gd-iconv.patch delete mode 100644 lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch delete mode 100644 lang/php7/patches/1006-multiline-syslog.patch delete mode 100644 lang/php7/patches/1010-pcrelib-NativeMIPS.patch delete mode 100644 lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch delete mode 100644 lang/python/django-constance/Makefile create mode 100644 lang/python/django-jsonfield2/Makefile delete mode 100644 lang/python/django1/files/django-admin delete mode 100644 lang/python/flup/Makefile create mode 100644 lang/python/numpy/Makefile create mode 100644 lang/python/python-cached-property/Makefile delete mode 100644 lang/python/python-crcmod/Makefile delete mode 100644 lang/python/python-crypto/Makefile delete mode 100644 lang/python/python-crypto/patches/001-no-host-paths.patch delete mode 100644 lang/python/python-crypto/patches/002-fix-endianness-detect.patch delete mode 100644 lang/python/python-crypto/patches/003-omit-tests.patch delete mode 100644 lang/python/python-crypto/patches/100-CVE-2013-7459.patch delete mode 100644 lang/python/python-crypto/patches/101-CVE-2018-6594.patch delete mode 100644 lang/python/python-cryptography/patches/001-disable-setup-requirements.patch create mode 100644 lang/python/python-distro/Makefile create mode 100644 lang/python/python-docker/Makefile create mode 100644 lang/python/python-dockerpty/Makefile create mode 100644 lang/python/python-docopt/Makefile create mode 100644 lang/python/python-dotenv/Makefile delete mode 100644 lang/python/python-dpkt/Makefile delete mode 100644 lang/python/python-egenix-mx-base/Makefile delete mode 100644 lang/python/python-enum34/Makefile delete mode 100644 lang/python/python-enum34/patches/001-omit-docs.patch delete mode 100644 lang/python/python-futures/Makefile delete mode 100644 lang/python/python-host.mk delete mode 100644 lang/python/python-ipaddress/Makefile create mode 100644 lang/python/python-jsonschema/Makefile delete mode 100644 lang/python/python-ldap/Makefile delete mode 100644 lang/python/python-package.mk delete mode 100644 lang/python/python-packages/Makefile delete mode 100644 lang/python/python-packages/README.md create mode 100644 lang/python/python-packaging/Makefile create mode 100644 lang/python/python-paramiko/Makefile delete mode 100644 lang/python/python-pcapy/Makefile delete mode 100644 lang/python/python-pcapy/patches/010-libcxx.patch create mode 100644 lang/python/python-pluggy/Makefile delete mode 100644 lang/python/python-psycopg2/Makefile create mode 100644 lang/python/python-pynacl/Makefile delete mode 100644 lang/python/python-pyptlib/Makefile create mode 100644 lang/python/python-pytest/Makefile create mode 100644 lang/python/python-texttable/Makefile delete mode 100644 lang/python/python-txsocksx/Makefile delete mode 100644 lang/python/python-txsocksx/patches/001-omit-tests.patch delete mode 100644 lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch delete mode 100644 lang/python/python-version.mk create mode 100644 lang/python/python-websocket-client/Makefile delete mode 100644 lang/python/python/Config-python-light.in delete mode 100644 lang/python/python/Makefile delete mode 100644 lang/python/python/files/config.site delete mode 100644 lang/python/python/files/python-config.in delete mode 100644 lang/python/python/files/python-package-codecs.mk delete mode 100644 lang/python/python/files/python-package-compiler.mk delete mode 100644 lang/python/python/files/python-package-ctypes.mk delete mode 100644 lang/python/python/files/python-package-db.mk delete mode 100644 lang/python/python/files/python-package-decimal.mk delete mode 100644 lang/python/python/files/python-package-dev.mk delete mode 100644 lang/python/python/files/python-package-distutils.mk delete mode 100644 lang/python/python/files/python-package-email.mk delete mode 100644 lang/python/python/files/python-package-gdbm.mk delete mode 100644 lang/python/python/files/python-package-lib2to3.mk delete mode 100644 lang/python/python/files/python-package-logging.mk delete mode 100644 lang/python/python/files/python-package-multiprocessing.mk delete mode 100644 lang/python/python/files/python-package-ncurses.mk delete mode 100644 lang/python/python/files/python-package-openssl.mk delete mode 100644 lang/python/python/files/python-package-pip.mk delete mode 100644 lang/python/python/files/python-package-pkg-resources.mk delete mode 100644 lang/python/python/files/python-package-pydoc.mk delete mode 100644 lang/python/python/files/python-package-setuptools.mk delete mode 100644 lang/python/python/files/python-package-sqlite3.mk delete mode 100644 lang/python/python/files/python-package-unittest.mk delete mode 100644 lang/python/python/files/python-package-xml.mk delete mode 100644 lang/python/python/patches-setuptools/001-reproducible.patch delete mode 100644 lang/python/python/patches-setuptools/002-sorted-requires.patch delete mode 100644 lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch delete mode 100644 lang/python/python/patches/001-enable-zlib.patch delete mode 100644 lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch delete mode 100644 lang/python/python/patches/003-do-not-compile-tests-at-build.patch delete mode 100644 lang/python/python/patches/004-do-not-write-bytes-codes.patch delete mode 100644 lang/python/python/patches/005-fix-bluetooth-support.patch delete mode 100644 lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch delete mode 100644 lang/python/python/patches/007-distutils-do-not-adjust-path.patch delete mode 100644 lang/python/python/patches/008-distutils-use-python-sysroot.patch delete mode 100644 lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch delete mode 100644 lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch delete mode 100644 lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch delete mode 100644 lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch delete mode 100644 lang/python/python/patches/021-compileall-add-recursion-option.patch delete mode 100644 lang/python/python/patches/024-musl-find_library.patch delete mode 100644 lang/python/python/patches/025-utime.patch delete mode 100644 lang/python/python/patches/026-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch delete mode 100644 lang/python/python/patches/027-bpo-34585-run-autoconf-GH-9411-edited.patch create mode 100644 lang/python/python3-find-stdlib-depends.sh create mode 100644 lang/python/python3/patches-pip/001-pep517-pyc-fix.patch create mode 100644 lang/python/python3/patches-setuptools/004-site-patch.patch create mode 100644 lang/ruby/patches/100-musl.patch delete mode 100644 lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch delete mode 100644 lang/tcl/patches/200-fix_mips_build.patch create mode 100644 libs/afalg_engine/Config.in create mode 100644 libs/afalg_engine/Makefile create mode 100644 libs/alsa-lib/patches/200-usleep.patch delete mode 100644 libs/apr-util/patches/001-automake-compat.patch create mode 100644 libs/apr-util/patches/002-fix-gdbm-error-handling.patch create mode 100644 libs/apr-util/patches/003-support_mariadb.patch create mode 100644 libs/apr-util/patches/004-avoid_ldap_by_defaut.patch create mode 100644 libs/apr-util/patches/005-apu_config_dont_list_indep_libs.patch create mode 100644 libs/apr-util/patches/006-avoid_db_by-default.patch delete mode 100644 libs/apr/patches/001-autoconf-compat.patch create mode 100644 libs/apr/patches/001-cross-compile.patch create mode 100644 libs/apr/patches/002-sys-param-h.patch delete mode 100644 libs/apr/patches/101-fix_apr_time_now.patch delete mode 100644 libs/apr/patches/201-upgrade-and-fix-1.5.1.patch create mode 100644 libs/apr/patches/301-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch create mode 100644 libs/apr/patches/302-add-cache-for-strerror_r.patch create mode 100644 libs/apr/patches/303-add-cache-for-mmap-zero.patch create mode 100644 libs/avahi/patches/010-pkgconfig.patch delete mode 100644 libs/avro/Makefile create mode 100644 libs/boost/patches/002-outcome-assert.patch delete mode 100644 libs/boost/patches/002-utime-filesystem.patch create mode 100644 libs/boost/patches/003-beast-coroutines.patch delete mode 100644 libs/boost/patches/101-uclibc-ng-math.patch create mode 100644 libs/cereal/Makefile delete mode 100644 libs/classpath/Makefile delete mode 100644 libs/classpath/patches/010-double-memleak.patch create mode 100644 libs/czmq/Makefile delete mode 100644 libs/eventlog/Makefile create mode 100644 libs/faad2/patches/030-sbr-ps-dec.patch delete mode 100644 libs/fcgi/Makefile delete mode 100644 libs/fcgi/patches/100-fcgio-int-type-fix.patch delete mode 100644 libs/fcgi/patches/110-no_examples.patch delete mode 100644 libs/fcgi/patches/120-stdio.patch delete mode 100644 libs/fftw3/Makefile delete mode 100644 libs/fftw3/patches/001-makefile.patch delete mode 100644 libs/flac/patches/005-gcc_debug_options.patch delete mode 100644 libs/flac/patches/010-automake-compat.patch create mode 100644 libs/flac/patches/010-utime.patch create mode 100644 libs/gdbm/patches/999-001-fix-multiple-def-gcc-10.patch delete mode 100644 libs/getdns/patches/001-Bugfix-399-Reinclude-linux-sysctl.h-in-getentropy_li.patch create mode 100644 libs/getdns/patches/getdns-1.6.0-fix-crosscompile.patch delete mode 100644 libs/glpk/Makefile create mode 100644 libs/google-authenticator-libpam/Makefile create mode 100644 libs/h2o/Makefile create mode 100644 libs/h2o/patches/100-socket_disable_npn.patch create mode 100644 libs/h2o/patches/200-libh2o-evloop_wslay-link.patch create mode 100644 libs/h2o/patches/300-picotls-chacha-detect.patch create mode 100644 libs/h2o/patches/400-backtrace-detection.patch create mode 100644 libs/h2o/patches/500-openssl.patch create mode 100644 libs/h2o/patches/600-engine.patch delete mode 100644 libs/hiredis/patches/001-lvalue_fix.patch create mode 100644 libs/hiredis/patches/010-fix_pkconfig_file.patch create mode 100644 libs/ibrcommon/patches/010-build-with-openssl-1.1.patch create mode 100644 libs/ibrcommon/patches/020-openssl-deprecated.patch create mode 100644 libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch create mode 100644 libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch create mode 100644 libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch create mode 100644 libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch create mode 100644 libs/icu/patches/020-ICU-20958_CVE-2020-10531.patch create mode 100644 libs/ipfs-http-client/Makefile create mode 100644 libs/ipfs-http-client/patches/001-add-srv-addr.patch delete mode 100644 libs/jansson/Makefile create mode 100644 libs/jose/Makefile create mode 100644 libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch create mode 100644 libs/jose/patches/020-openssl-deprecated.patch create mode 100644 libs/json-glib/Makefile create mode 100644 libs/jsoncpp/Makefile create mode 100644 libs/leptonica/Makefile create mode 100644 libs/libaio/patches/003_arches_mips_fix_padding.patch delete mode 100644 libs/libaio/patches/003_arches_sparc64.patch delete mode 100644 libs/libaio/patches/005_arches_mips.patch delete mode 100644 libs/libaio/patches/006_arches_mips_fix_padding.patch delete mode 100644 libs/libartnet/Makefile delete mode 100644 libs/libartnet/patches/001-bswap_16.patch delete mode 100644 libs/libaudiofile/Makefile delete mode 100644 libs/libaudiofile/patches/010-gcc6-fix-left-shift-negative-number.patch delete mode 100644 libs/libaudiofile/patches/020-remove-tests-examples-docs.patch delete mode 100644 libs/libaudiofile/patches/030-CVE-2015-7747.patch delete mode 100644 libs/libaudiofile/patches/110-Always-check-the-number-of-coefficients.patch delete mode 100644 libs/libaudiofile/patches/120-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch delete mode 100644 libs/libaudiofile/patches/130-Check-for-multiplication-overflow-in-sfconvert.patch delete mode 100644 libs/libaudiofile/patches/140-Actually-fail-when-error-occurs-in-parseFormat.patch delete mode 100644 libs/libaudiofile/patches/150-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch delete mode 100644 libs/libaudiofile/patches/160-Fix-signature-of-multiplyCheckOverflow.patch delete mode 100644 libs/libaudiofile/patches/170-Check-for-division-by-zero-in-BlockCodec.patch delete mode 100644 libs/libavl/Makefile delete mode 100644 libs/libavl/patches/010-update_GNUmakefile.patch delete mode 100644 libs/libcanfestival/Makefile delete mode 100644 libs/libcanfestival/patches/001-sigval-ref-fix.patch delete mode 100644 libs/libcanfestival/patches/002-makefile-gcc-linker.patch delete mode 100644 libs/libcanfestival/patches/003-makefile-skip-examples.patch delete mode 100644 libs/libcanfestival/patches/004-override-cflags.patch create mode 100644 libs/libcap-ng/Makefile create mode 100644 libs/libcap-ng/patches/add_library_if_header_found.patch create mode 100644 libs/libcap-ng/patches/fix-includes.patch create mode 100644 libs/libcap-ng/patches/fix_build_without_threads.patch delete mode 100644 libs/libcap/patches/100-portability.patch delete mode 100644 libs/libcap/patches/200-change-hardcoded-shell-to-sh.patch create mode 100644 libs/libcap/patches/300-disable-tests.patch create mode 100644 libs/libcgroup/Makefile create mode 100644 libs/libcgroup/patches/010-cdefs.patch create mode 100644 libs/libconfig/Makefile create mode 100644 libs/libcups/Makefile delete mode 100644 libs/libdnet/patches/001-compile.patch delete mode 100644 libs/libdouble-conversion/Makefile delete mode 100644 libs/libdrm/patches/000-remove-dep-on-pthread-stubs.patch create mode 100644 libs/libebml/Makefile create mode 100644 libs/libesmtp/patches/100-openssl-1.1.patch create mode 100644 libs/libesmtp/patches/200-add-TLSv1_1-TLSv1_2-support.patch create mode 100644 libs/libevdev/patches/010-libevdev-events-fix-compilation-with-older-kernels.patch delete mode 100644 libs/libevdev/patches/010-no-clock-monotonic-raw-in-uclibc.patch create mode 100644 libs/libevhtp/patches/010-openssl-thread.patch delete mode 100644 libs/libevhtp/patches/010-strcmp-endianness-fix.patch create mode 100644 libs/libextractor/patches/010-musl.patch delete mode 100644 libs/libffi/patches/002-fix-toolexeclibdir-path.patch create mode 100644 libs/libffi/patches/200-ppc.patch create mode 100644 libs/libfstrm/Makefile create mode 100644 libs/libftdi1/patches/101-use-findSWIG.patch create mode 100644 libs/libfuse3/Makefile create mode 100644 libs/libgabe/Makefile create mode 100644 libs/libgabe/patches/010-shared-library.patch create mode 100644 libs/libgd/patches/010-getlib.patch create mode 100644 libs/libgd/patches/100-no-cxx.patch delete mode 100644 libs/libgd/patches/101-gdlib-config.patch delete mode 100644 libs/libgd/patches/102-gdlib-pc-in.patch delete mode 100644 libs/libgd/patches/200-uclibc-ceill.patch create mode 100644 libs/libgd/patches/220-exclude_host_headers.patch delete mode 100644 libs/libgee/patches/libgee-0.18.0-no-introspection.patch delete mode 100644 libs/libglog/Makefile delete mode 100644 libs/libgpg-error/patches/020-gawk5-support.patch create mode 100644 libs/libical/patches/001-disable-icu-and-bdb-support.patch create mode 100644 libs/libid3tag/src/id3tag.pc create mode 100644 libs/libiio/patches/0001-Update-channel-type-and-modifier-lists.patch create mode 100644 libs/libimobiledevice/patches/020-config.patch delete mode 100644 libs/libinput/patches/001-no-locale.patch delete mode 100644 libs/libinput/patches/002-static_assert.patch create mode 100644 libs/libirecovery/Makefile delete mode 100644 libs/liblo/patches/001-fix-musl-include.patch create mode 100644 libs/liblo/patches/010-index.patch create mode 100644 libs/liblo/patches/020-usleep.patch create mode 100644 libs/liblz4/Config.in create mode 100644 libs/liblz4/patches/010-utime.patch create mode 100644 libs/libmad/patches/101-CVE-2017-8374-length-check.patch create mode 100644 libs/libmad/patches/102-CVE-2017-8373-CVE-2017-8372-md-size.patch create mode 100644 libs/libmariadb/Makefile rename {utils/mariadb => libs/libmariadb}/conf/50-client.cnf (100%) create mode 100755 libs/libmariadb/files/mysql_config create mode 100644 libs/libmariadb/patches/fix-ucontext-header.patch create mode 100644 libs/libmatroska/Makefile create mode 100644 libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch delete mode 100644 libs/libmraa/patches/0001-base.patch delete mode 100644 libs/libmraa/patches/0002-add-mips-support.patch delete mode 100644 libs/libmraa/patches/0003-uart.patch delete mode 100644 libs/libmraa/patches/0004-fixes.patch create mode 100644 libs/libmraa/patches/010-version.patch delete mode 100644 libs/libnatpmp/patches/001-install_declspec.patch create mode 100644 libs/libnatpmp/patches/010-cmake.patch create mode 100644 libs/libnetconf2/patches/001-cmake_not_updated.patch delete mode 100644 libs/libnopoll/patches/001-param_h_rename.patch create mode 100644 libs/libnopoll/patches/010-openssl-deprecated.patch create mode 100644 libs/libnpupnp/Makefile create mode 100644 libs/libopusenc/Makefile create mode 100644 libs/liborcania/Makefile create mode 100644 libs/libowfat/patches/010-gcc10.patch delete mode 100644 libs/libpam/patches/0002-build-ignore-pam_rhosts-if-neither-ruserok-nor-ruser.patch delete mode 100644 libs/libpam/patches/0003-build-ignore-pam_lastlog-when-logwtmp-is-not-availab.patch delete mode 100644 libs/libpam/patches/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch delete mode 100644 libs/libpam/patches/0005-build-fix-doc-build.patch delete mode 100644 libs/libpam/patches/0006-pam_unix-fix-compilation-in-case-rpc-rpc.h-is-missin.patch delete mode 100644 libs/libpam/patches/0007-Check-if-innetgr-is-available-at-compile-time.patch create mode 100644 libs/libpam/patches/010-crypt.patch create mode 100644 libs/libpam/patches/020-fgetpwent_r.patch create mode 100644 libs/libpbc/Makefile create mode 100644 libs/libpbc/patches/010-pass-cflags.patch create mode 100644 libs/libpfring/Makefile create mode 100644 libs/libpfring/patches/0001-fix-cross-compiling.patch delete mode 100644 libs/libpng/patches/101-old-libtool.patch create mode 100644 libs/libpng/patches/200-ccache.patch create mode 100644 libs/libpsl/Makefile create mode 100644 libs/libradiotap/Makefile create mode 100644 libs/libre2/Makefile create mode 100644 libs/libre2/patches/010-cxx17.patch delete mode 100644 libs/libsearpc/patches/001-fix-memory-leak-GH-48.patch create mode 100644 libs/libsearpc/patches/001-no-python-compile.patch create mode 100644 libs/libshout/patches/130-usleep.patch delete mode 100644 libs/libshout/patches/140-no_example_doc_win32.patch delete mode 100644 libs/libsigc++/Makefile delete mode 100644 libs/libsigc++/patches/001-no_doc_tests_examples.patch create mode 100644 libs/libsoxr/patches/020-pkgconfig.patch create mode 100644 libs/libssh/patches/0001-libcrypto-compat-add-extra-functions.patch create mode 100644 libs/libssh/patches/0002-libcrypto-remove-deprecated-API-usage.patch delete mode 100644 libs/libssh2/Config.in create mode 100644 libs/libtalloc/patches/100-Remove_libbsd_dependency_check.patch delete mode 100644 libs/libtasn1/patches/001-fix-c99-error.patch create mode 100644 libs/libtins/Config.in create mode 100644 libs/libtins/patches/010-pkgconfig.patch create mode 100644 libs/libtins/patches/110-fix_ch_switch_timing_value.patch delete mode 100644 libs/libtirpc/patches/001-musl.patch create mode 100644 libs/libtorrent/patches/010-usleep.patch delete mode 100644 libs/libtorrent/patches/100-fix_cross_compile.patch delete mode 100644 libs/libudev-fbsd/patches/001-fix-unused.patch delete mode 100644 libs/libudev-fbsd/patches/002-replace-nitems.patch mode change 100755 => 100644 libs/libuhttpd/Makefile create mode 100644 libs/libulfius/Makefile create mode 100644 libs/libupm/patches/003-link-atomic.patch delete mode 100644 libs/libupm/patches/003-lsm303-args.patch create mode 100644 libs/libupm/patches/004-uint8_t.patch create mode 100644 libs/liburing/Makefile create mode 100644 libs/liburing/patches/000-OPENWRT-add-int64_t-detection.patch delete mode 100644 libs/libuvc/Makefile create mode 100644 libs/libuwifi/Makefile mode change 100755 => 100644 libs/libuwsc/Makefile create mode 100644 libs/libuwsc/patches/001-fix_find_lua.patch delete mode 100644 libs/libwebsockets/patches/001-CMakeLists-build-reproducible-by-default.patch create mode 100644 libs/libwebsockets/patches/020-fix-travis.patch create mode 100644 libs/libwslay/Makefile create mode 100644 libs/libwslay/patches/100-disable-doc.patch create mode 100644 libs/libx264/patches/001-fix-x32-build-by-disabling-asm.patch create mode 100644 libs/libx264/patches/002-dont-default-to-cortex-a9-with-neon.patch create mode 100644 libs/libxcrypt/Makefile delete mode 100644 libs/libxslt/patches/100-fix-cve-2019-11068.patch delete mode 100644 libs/libxslt/patches/101-fix-cve-2019-13117.patch delete mode 100644 libs/libxslt/patches/102-fix-cve-2019-13118.patch delete mode 100644 libs/libyang/patches/001-fix-musl-issue.patch create mode 100644 libs/libyubikey/Makefile delete mode 100644 libs/libzdb/Makefile delete mode 100644 libs/libzdb/patches/010-cross-compile-fixes.patch delete mode 100644 libs/libzdb/patches/020-filterh-use-host-built-version.patch delete mode 100644 libs/libzdb/patches/030-openssl-1.1.patch create mode 100644 libs/libzip/Makefile create mode 100644 libs/lmdb/Makefile create mode 100644 libs/lmdb/patches/010-fix-makefile.patch create mode 100644 libs/lmdb/src/liblmdb.pc create mode 100644 libs/log4cplus/Makefile create mode 100644 libs/loudmouth/patches/002-fix-comparison.patch create mode 100644 libs/loudmouth/patches/010-add-private.patch create mode 100644 libs/loudmouth/patches/020-openssl-deprecated.patch delete mode 100644 libs/lttng-ust/patches/002-examples.patch create mode 100644 libs/measurement-kit/Makefile create mode 100644 libs/minizip/Makefile create mode 100644 libs/minizip/patches/010-disable-libbsd.patch delete mode 100644 libs/mxml/patches/001-targets.patch create mode 100644 libs/neon/patches/010-openssl-deprecated.patch create mode 100644 libs/newt/Makefile create mode 100644 libs/newt/patches/002-use-target-ar-python-config.patch create mode 100644 libs/newt/patches/python_memory_allocation.patch create mode 100644 libs/nlohmannjson/Makefile create mode 100644 libs/nspr/Makefile create mode 100644 libs/nspr/patches/001-Makefile.in_rm_BUILD_STRING_and_BUILD_TIME.patch create mode 100644 libs/nspr/patches/002-native_and_musl_fix.patch create mode 100644 libs/nspr/patches/010-sgidefs.patch create mode 100644 libs/nss/Makefile create mode 100644 libs/nss/files/blank-cert9.db create mode 100644 libs/nss/files/blank-key4.db create mode 100644 libs/nss/files/system-pkcs11.txt create mode 100644 libs/nss/patches/001-nss_standalone.patch create mode 100644 libs/nss/patches/002-os_test.patch create mode 100644 libs/nss/patches/003-openwrt_fix.patch create mode 100644 libs/nss/patches/010-nanosleep.patch delete mode 100644 libs/open-vm-tools/Makefile delete mode 100644 libs/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch delete mode 100644 libs/open-vm-tools/patches/0014-resolve-musl-does-not-implement-res_ninit.patch delete mode 100644 libs/opencv/Makefile delete mode 100644 libs/opencv/README.md create mode 100644 libs/openldap/patches/800-implicit.patch create mode 100644 libs/opusfile/Makefile create mode 100644 libs/pcre/Config.in create mode 100644 libs/pcre2/Config.in delete mode 100644 libs/pixman/patches/0005-pixman-arm-neon-assembler-fix.patch create mode 100644 libs/postgresql/patches/300-fix-pc-file.patch create mode 100644 libs/protobuf-c/patches/010-pkgconfig.patch create mode 100644 libs/protobuf/patches/010-rpath.patch create mode 100644 libs/pugixml/Makefile create mode 100644 libs/redis/Makefile create mode 100755 libs/redis/files/redis.init create mode 100644 libs/redis/patches/020-fix-atomicvar.patch create mode 100644 libs/redis/patches/030-fix-uclibc-compilation.patch delete mode 100644 libs/rxtx/Makefile delete mode 100755 libs/rxtx/patches/010-acm-devices.patch create mode 100644 libs/serdisplib/Makefile create mode 100644 libs/serdisplib/patches/002-allow-1bpp-framebuffer.patch create mode 100644 libs/serdisplib/patches/010-cross-compile.patch create mode 100644 libs/slang2/Makefile create mode 100644 libs/slang2/patches/001-skip-terminfo-dir-test.patch create mode 100644 libs/slang2/patches/002-use-target-ar.patch create mode 100644 libs/spdlog/Makefile create mode 100644 libs/spice/patches/0001-build-skip-tests.patch delete mode 100644 libs/spice/patches/0001-reds-Fix-SSL_CTX_set_ecdh_auto-call-for-some-old-Ope.patch create mode 100644 libs/spice/patches/0002-build-tools-fix-build-failure.patch delete mode 100644 libs/spice/patches/0002-reds-Fix-compilation-without-deprecated-OpenSSL-1.1-.patch create mode 100644 libs/sqlite3/Config-cli.in create mode 100644 libs/sqlite3/Config-lib.in delete mode 100644 libs/sqlite3/Config.in create mode 100644 libs/taglib/Makefile create mode 100644 libs/tcp_wrappers/patches/006-compilation-warnings.patch delete mode 100644 libs/tiff/patches/020-CVE-2018-5784.patch delete mode 100644 libs/tiff/patches/021-CVE-2018-7456.patch delete mode 100644 libs/tiff/patches/022-CVE-2017-9935.patch delete mode 100644 libs/tiff/patches/023-CVE-2017-18013.patch delete mode 100644 libs/tiff/patches/024-CVE-2018-8905.patch delete mode 100644 libs/tiff/patches/025-CVE-2018-10963.patch delete mode 100644 libs/tiff/patches/026-CVE-2017-11613.patch create mode 100644 libs/vips/patches/010-reproducible-build.patch create mode 100644 libs/websocketpp/Makefile delete mode 100644 libs/xmlrpc-c/patches/001-config.mk.in.patch delete mode 100644 libs/xmlrpc-c/patches/002-automake-compat.patch create mode 100644 libs/xmlrpc-c/patches/010-nanosleep.patch create mode 100644 libs/yubico-pam/Makefile delete mode 100644 libs/zmq/patches/010-disable_pedantic_on_linux_with_ulibc++.patch create mode 100644 libs/zmq/patches/050-nanosleep.patch delete mode 100644 libs/zmq/patches/100-fix-cxx-include-order.patch delete mode 100644 mail/alpine/patches/100-no-openssl-check-cross-compile.patch create mode 100644 mail/clamsmtp/patches/010-fix-build.patch create mode 100644 mail/dovecot/Config.in create mode 100644 mail/dovecot/patches/050-fix-dovecot-config-for-cross-compile.patch create mode 100644 mail/dovecot/patches/100-openssl-deprecated.patch create mode 100644 mail/dovecot/patches/110-openssl-engine.patch create mode 100644 mail/emailrelay/patches/010-openssl-1.1.patch delete mode 100644 mail/emailrelay/patches/010-ssl3-fix.patch delete mode 100644 mail/fdm/patches/010-Compat-fixes-from-Rosen-Penev.patch create mode 100644 mail/fdm/patches/010-ntop-fix.patch delete mode 100644 mail/fdm/patches/040-openssl-1.1.patch delete mode 100644 mail/mailman/Makefile delete mode 100644 mail/mailman/files/mailman.init delete mode 100644 mail/mailman/patches/100-postfix.patch delete mode 100644 mail/mailman/patches/200-nohostdnspython.patch delete mode 100644 mail/mailman/patches/300-targetpython.patch delete mode 100644 mail/mailman/patches/400-modules.patch create mode 100644 mail/mailsend/patches/0001-OpenSSL-1.1-support-for-HMAC-api.patch create mode 100644 mail/mailsend/patches/0002-Removed-API-deprecated-by-OpenSSL-1.1.0.patch delete mode 100644 mail/msmtp-scripts/Makefile delete mode 100644 mail/msmtp-scripts/files/msmtpq-ng-mta.init delete mode 100644 mail/msmtp-scripts/files/msmtpq-ng.rc create mode 100644 mail/nail/patches/010-remove-gssapi.patch create mode 100644 mail/nail/patches/200-handle-openssl-no-egd.patch create mode 100644 mail/nail/patches/300-openssl-deprecated.patch create mode 100644 mail/opendkim/patches/010-openssl_1.1_compat.patch create mode 100644 mail/opendkim/patches/020-uclibc.patch delete mode 100644 mail/postfix/patches/100-fsstat.patch create mode 100644 mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch create mode 100644 mail/sendmail/patches/200-openssl-1.1.1.patch create mode 100644 mail/sendmail/patches/201-openssl-1.1.1-ecdhe.patch create mode 100644 mail/sendmail/patches/202-openssl-deprecated.patch create mode 100644 mail/ssmtp/patches/020-openssl-deprecated.patch delete mode 100644 multimedia/crtmpserver/Makefile delete mode 100644 multimedia/crtmpserver/files/crtmpserver.init delete mode 100644 multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch delete mode 100644 multimedia/crtmpserver/patches/020-add-rpath.patch delete mode 100644 multimedia/crtmpserver/patches/030-default-config.patch delete mode 100644 multimedia/crtmpserver/patches/040-use-select.patch delete mode 100644 multimedia/crtmpserver/patches/050-add-missing-make-defines.patch delete mode 100644 multimedia/crtmpserver/patches/060-add-missing-includes.patch delete mode 100644 multimedia/crtmpserver/patches/070-missing-include-gcc-47.patch delete mode 100644 multimedia/crtmpserver/patches/080-disable-apple-streaming.patch delete mode 100644 multimedia/crtmpserver/patches/080-musl-uint32_t.patch delete mode 100644 multimedia/ffmpeg/patches/020-ffmpeg-fix-build-with-fdk-aac-2.0.patch delete mode 100644 multimedia/ffmpeg/patches/030-fdkaac-version.patch create mode 100644 multimedia/ffmpeg/patches/030-h264-mips.patch delete mode 100644 multimedia/ffmpeg/patches/040-fdkaac-eld.patch delete mode 100644 multimedia/ffmpeg/patches/050-fdkaac-define.patch create mode 100644 multimedia/ffmpeg/patches/050-glibc.patch create mode 100644 multimedia/gerbera/Makefile create mode 100644 multimedia/gerbera/files/gerbera.config create mode 100644 multimedia/gerbera/files/gerbera.init create mode 100644 multimedia/gerbera/patches/010-iconv.patch create mode 100644 multimedia/gerbera/patches/020-pid.patch create mode 100644 multimedia/gerbera/patches/030-unistd.patch create mode 100644 multimedia/gerbera/patches/040-npupnp.patch create mode 100644 multimedia/graphicsmagick/Makefile delete mode 100644 multimedia/grilo-plugins/patches/001-grilo-plugins-0.3.5-no-itstool-xmllint.patch create mode 100644 multimedia/grilo-plugins/patches/001-no-help-po-tests.patch create mode 100644 multimedia/grilo-plugins/patches/010-backport-fix-whitespace.patch create mode 100644 multimedia/grilo-plugins/patches/020-backport-add-missing-calls-to-free.patch create mode 100644 multimedia/grilo-plugins/patches/030-backport-libdmapsharing4.patch delete mode 100644 multimedia/gstreamer1/patches/001-no-translations.patch create mode 100644 multimedia/imagemagick/Makefile create mode 100644 multimedia/lcdgrilo/patches/010-remove-check-dependency.patch create mode 100644 multimedia/lcdgrilo/patches/020-vala.patch create mode 100644 multimedia/minidlna/files/minidlna.sysctl create mode 100644 multimedia/minidlna/patches/001-dont-build-po-files.patch delete mode 100644 multimedia/minidlna/patches/001-support-ape-format.patch delete mode 100644 multimedia/minidlna/patches/002-dont-build-po-files.patch create mode 100644 multimedia/minidlna/patches/005-added-support-RMVB.patch create mode 100644 multimedia/minidlna/patches/010-lg.patch delete mode 100644 multimedia/minidlna/patches/010-libav-fix.patch delete mode 100755 multimedia/minidlna/patches/020-add-support-for-dsd.patch create mode 100644 multimedia/minidlna/patches/020-wrap_container_definitions_into_a_structure.patch delete mode 100644 multimedia/minidlna/patches/030-add-rm-rmbv-webm-format.patch create mode 100644 multimedia/minidlna/patches/030-mark_all_instances_of_magic_container_s_as_const.patch create mode 100644 multimedia/minidlna/patches/040-heroes.patch create mode 100644 multimedia/minidlna/patches/060-reduce_duplication_in_sql_c.patch create mode 100644 multimedia/minidlna/patches/070-return-void.patch create mode 100644 multimedia/minisatip/Makefile create mode 100644 multimedia/minisatip/files/minisatip.init create mode 100644 multimedia/minisatip/patches/010-gcc10.patch delete mode 100644 multimedia/mjpg-streamer/Config.in delete mode 100644 multimedia/mjpg-streamer/patches/010-enable_additional_plugins.patch create mode 100644 multimedia/mjpg-streamer/patches/010-optional-plugins-selection.patch create mode 100644 multimedia/mjpg-streamer/patches/020-remove-auto-lib-selection.patch delete mode 100644 multimedia/mjpg-streamer/patches/020-remove_gcc_debug_options.patch delete mode 100644 multimedia/mjpg-streamer/patches/030-allow_16_char_device_names.patch create mode 100644 multimedia/mjpg-streamer/patches/030-remove-git-hash-version-number.patch delete mode 100644 multimedia/mjpg-streamer/patches/035-remove_build_date-time.patch delete mode 100644 multimedia/mjpg-streamer/patches/040-Buffer-the-bytesused-variable-from-struct-v4l2_buffe.patch delete mode 100644 multimedia/mjpg-streamer/patches/041-Stop-leaking-data-via-struct-v4l2_buffer.patch delete mode 100644 multimedia/mjpg-streamer/patches/050-fix-yuv-capture.patch delete mode 100644 multimedia/mjpg-streamer/patches/060-fix-sigtrap-in-v4l2uvc.patch create mode 100644 multimedia/motion/files/motion.conf create mode 100644 multimedia/motion/files/motion.init create mode 100644 multimedia/motion/patches/010-no-po-man.patch delete mode 100644 multimedia/motion/patches/100-musl-compat.patch create mode 100644 multimedia/tvheadend/patches/010-openssl-deprecated.patch create mode 100644 multimedia/tvheadend/patches/020-strncpy-issue.patch delete mode 100644 multimedia/v4l2rtspserver/files/config.openwrt rename net/{netopeer2 => Netopeer2}/Config_keystored.in (100%) create mode 100644 net/Netopeer2/Makefile create mode 100644 net/Netopeer2/files/netopeer2-keystored-keygen.default create mode 100644 net/Netopeer2/files/netopeer2-keystored.default create mode 100644 net/Netopeer2/files/netopeer2-server.default create mode 100644 net/Netopeer2/files/netopeer2-server.init rename net/{netopeer2 => Netopeer2}/files/stock_config.xml (100%) create mode 100644 net/Netopeer2/patches/001-openss_1.1_support.patch create mode 100644 net/Netopeer2/patches/010-gcc10.patch delete mode 100644 net/acme/files/acme-cbi.lua delete mode 100644 net/acme/files/acme-controller.lua delete mode 100644 net/acme/files/uci-defaults-acme create mode 100755 net/adblock/files/adblock.mail create mode 100755 net/adblock/files/adblock.monitor delete mode 100644 net/adblock/files/adblock.notify create mode 100644 net/adblock/files/adblock.sources delete mode 100644 net/addrwatch/patches/001-fix-sys_siglist.patch create mode 100644 net/aggregate/patches/500-cross_compile_flags.patch delete mode 100644 net/apache/Config.in create mode 100644 net/apache/files/apache2.init delete mode 100644 net/apache/patches/001-Makefile_in.patch create mode 100644 net/apache/patches/001-cross-compile.patch delete mode 100644 net/apache/patches/002-test_char_h.patch delete mode 100644 net/apache/patches/003-logdir_fix.patch create mode 100644 net/apache/patches/004-fix-scoreboard-location.patch delete mode 100644 net/apache/patches/004-pidfile_fix.patch create mode 100644 net/apcupsd/patches/015-drop-doc.patch create mode 100644 net/apfree-wifidog/Makefile create mode 100644 net/apfree-wifidog/README.md create mode 100644 net/apfree-wifidog/files/wdping create mode 100644 net/apfree-wifidog/files/wifidogx.conf create mode 100644 net/apfree-wifidog/files/wifidogx.init create mode 100644 net/apfree-wifidog/patches/010-openssl-deprecated.patch delete mode 100644 net/apinger/patches/001-autoreconf.patch create mode 100644 net/apinger/patches/010-poll.patch create mode 100644 net/ariang/files/80_ariang-nginx-support create mode 100644 net/ariang/files/ariang.locations delete mode 100644 net/arp-scan/patches/001-cross_compile.patch create mode 100644 net/atftp/patches/04-cdefs.patch create mode 100644 net/bfdd/Makefile create mode 100644 net/bfdd/files/bfdd.init create mode 100644 net/bfdd/files/bfdd.template.json create mode 100644 net/bfdd/patches/002-ipv6_musl_fix.patch create mode 100644 net/bfdd/patches/010-uclibc.patch create mode 100644 net/bind/files/bind/bind.keys delete mode 100644 net/bind/patches/002-autoconf-ar-fix.patch create mode 100644 net/boinc/Makefile create mode 100755 net/boinc/files/boinc-client.init create mode 100644 net/boinc/files/global_prefs_override.xml create mode 100644 net/boinc/files/remote_hosts.cfg create mode 100644 net/boinc/patches/001-avoidExtraDependencies create mode 100644 net/boinc/patches/002-hosttypeRespected create mode 100644 net/bonding/Makefile create mode 100755 net/bonding/files/lib/netifd/proto/bonding.sh delete mode 100644 net/bridge-utils/patches/010-fix_struct_in6_addr_usage.patch delete mode 100644 net/bridge-utils/patches/100-musl-compat.patch create mode 100644 net/bwping/Makefile delete mode 100644 net/chrony/patches/001-freebind_uclibc.patch create mode 100644 net/cifs-utils/patches/020-no-smb3.patch delete mode 100644 net/clamav/patches/001-compile.patch delete mode 100644 net/clamav/patches/002-Avoid-libxml-checks-if-disable-xml-is-used.patch delete mode 100644 net/clamav/patches/010-openssl-deprecated.patch create mode 100644 net/conntrack-tools/Makefile create mode 100644 net/conntrack-tools/files/conntrackd.init create mode 100644 net/conntrack-tools/patches/conntrack-tools-1.4.5-rpc.patch create mode 100644 net/conserver/files/config.guess create mode 100644 net/conserver/files/config.sub delete mode 100644 net/coova-chilli/files/chilli.firewall delete mode 100644 net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch create mode 100644 net/coova-chilli/patches/100-fix_compile_kmod.patch delete mode 100644 net/coova-chilli/patches/200-fix_compile_kmod.patch create mode 100644 net/coova-chilli/patches/200-wolfssl.patch delete mode 100644 net/coova-chilli/patches/201-fix_dereferencing_pointers.patch delete mode 100644 net/coova-chilli/patches/300-fix-compile-with-cyassl.patch create mode 100644 net/coova-chilli/patches/300-sysinfo.patch delete mode 100644 net/coova-chilli/patches/400-fix-compile-with-musl.patch create mode 100644 net/coova-chilli/patches/400-fix-version.patch delete mode 100644 net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch delete mode 100644 net/danish/Makefile create mode 100644 net/davfs2/patches/020-neon.patch create mode 100644 net/davfs2/patches/400-gcc10.patch create mode 100644 net/dawn/Makefile create mode 100644 net/dawn/files/dawn.config create mode 100755 net/dawn/files/dawn.init create mode 100644 net/dcstad/Makefile create mode 100644 net/ddns-scripts/files/update_cloudflare_com_v4_token.sh create mode 100755 net/ddns-scripts/files/update_cnkuai_cn.sh create mode 100755 net/ddns-scripts/files/update_digitalocean_com_v2.sh create mode 100755 net/ddns-scripts/samples/slaac_sample.sh delete mode 100644 net/dmapd/patches/001-dmapd_conf.patch delete mode 100644 net/dmapd/patches/002-make_unit_test_optionnal.patch create mode 100644 net/dnscrypt-proxy/patches/010-internal.patch create mode 100644 net/dnscrypt-proxy2/Makefile create mode 100644 net/dnscrypt-proxy2/files/blacklist.txt create mode 100644 net/dnscrypt-proxy2/files/dnscrypt-proxy.init create mode 100644 net/dnsdist/Makefile create mode 100644 net/dnsdist/files/dnsdist.conf create mode 100644 net/dnsdist/files/dnsdist.config create mode 100644 net/dnsdist/files/dnsdist.init create mode 100644 net/dnsdist/patches/010-libcxx.patch create mode 100644 net/dnsdist/patches/020-std.patch create mode 100644 net/dnstop/Makefile create mode 100644 net/dnstop/patches/100-fix_udphdr_error.patch delete mode 100644 net/e2guardian/Makefile delete mode 100644 net/e2guardian/files/e2guardian.config delete mode 100644 net/e2guardian/files/e2guardian.init delete mode 100644 net/e2guardian/files/e2guardianf1.conf create mode 100644 net/etesync-server/Makefile create mode 100644 net/etesync-server/files/81_setup-etesync-server create mode 100644 net/etesync-server/files/etesync.locations create mode 100644 net/etesync-server/files/uci.cfg create mode 100644 net/etesync-server/files/uwsgi.ini create mode 100644 net/etesync-server/files/uwsgi.init create mode 100644 net/etherwake-nfqueue/Makefile create mode 100644 net/etherwake-nfqueue/README.md create mode 100644 net/etherwake-nfqueue/files/etherwake-nfqueue.config create mode 100644 net/etherwake-nfqueue/files/etherwake-nfqueue.init delete mode 100644 net/etherwake/patches/100-no_ether_hostton.patch create mode 100644 net/family-dns/Makefile create mode 100644 net/family-dns/Readme.md create mode 100644 net/family-dns/files/family-dns-update create mode 100644 net/family-dns/files/family-dns.conf create mode 100644 net/family-dns/files/family-dns.uci-defaults create mode 100755 net/family-dns/files/test-family-dns delete mode 100644 net/fossil/Makefile delete mode 100644 net/fossil/files/fossil.config delete mode 100644 net/fossil/files/fossil.init delete mode 100644 net/fossil/patches/001-no_https.patch delete mode 100644 net/freeradius3/patches/004-fix-target-python-header-detection.patch create mode 100644 net/frp/Makefile create mode 100644 net/frp/files/frpc.config create mode 100644 net/frp/files/frpc.init create mode 100644 net/frp/files/frps.config create mode 100644 net/frp/files/frps.init create mode 100644 net/frr/Config.in create mode 100644 net/frr/Makefile create mode 100644 net/frr/files/daemons create mode 100644 net/frr/files/frr create mode 100644 net/frr/files/frr.conf create mode 100644 net/frr/files/frrcommon.sh create mode 100644 net/frr/files/vtysh.conf create mode 100644 net/frr/files/watchfrr.sh create mode 100644 net/frr/patches/001-vti_interface_fix.patch create mode 100644 net/frr/patches/010-add_yahng_filter.patch create mode 100644 net/frr/patches/010-add_yang_routemap.patch create mode 100644 net/frr/patches/011-mod_yang_routemap_model.patch create mode 100644 net/frr/patches/012-add_yang_filter.patch create mode 100644 net/frr/patches/013-backport_northbound.patch create mode 100644 net/frr/patches/014-backport_northbound.patch create mode 100644 net/frr/patches/098-fix_mips_libyang.patch create mode 100644 net/frr/patches/099-redefine_ethhdr.patch create mode 100644 net/geth/Makefile create mode 100644 net/geth/files/geth.init create mode 100644 net/git/patches/300-openssl-deprecated.patch create mode 100644 net/git/patches/310-fix-uname-detection-for-crosscompiling create mode 100644 net/gitolite/patches/0100-avoid-ssh-keygen.patch delete mode 100644 net/gitolite/patches/100-fix-missing-hooks-dir.patch create mode 100644 net/gnunet-fuse/Makefile create mode 100644 net/gnunet-fuse/patches/001-musl-compat.patch create mode 100644 net/gnunet-secushare/Makefile create mode 100644 net/gnunet-secushare/files/gnunet-secushare-mysql.defaults rename net/{gnunet/files/gnunet-social-pgsql.defaults => gnunet-secushare/files/gnunet-secushare-pgsql.defaults} (100%) rename net/{gnunet/files/gnunet-social-sqlite.defaults => gnunet-secushare/files/gnunet-secushare-sqlite.defaults} (100%) create mode 100644 net/gnunet/patches/100-fix-opus-and-pulse-library-detection.patch delete mode 100644 net/haproxy/files/haproxy.hotplug create mode 100755 net/haproxy/get-latest-patches.sh create mode 100644 net/haproxy/patches/000-OPENWRT-BUILD-make-dladdr1-depend-on-glibc-version-and-not-__USE_GNU.patch delete mode 100644 net/haproxy/patches/0001-BUG-MEDIUM-ssl-Dont-always-treat-SSL_ERROR_SYSCALL-as-unrecovarable.patch delete mode 100644 net/haproxy/patches/0002-BUG-MEDIUM-ssl-Shutdown-the-connection-for-reading-on-SSL_ERROR_SYSCALL.patch delete mode 100644 net/haproxy/patches/0003-BUG-MEDIUM-http-Switch-the-HTTP-response-in-tunnel-mode-as-earlier-as-possible.patch delete mode 100644 net/haproxy/patches/0004-BUG-MEDIUM-ssl-sample-ssl_bc_-fetch-keywords-are-broken.patch create mode 100644 net/hcxdumptool/Makefile create mode 100644 net/hcxtools/Makefile create mode 100644 net/https-dns-proxy/files/README.md create mode 100644 net/https-dns-proxy/files/https-dns-proxy.config create mode 100755 net/https-dns-proxy/files/https-dns-proxy.init delete mode 100644 net/https-dns-proxy/files/https_dns_proxy.config delete mode 100644 net/https-dns-proxy/files/https_dns_proxy.init create mode 100644 net/i2pd/files/i2pd.config create mode 100644 net/i2pd/patches/config.patch create mode 100644 net/ibrdtnd/patches/0001-ibrdtnd-added-openssl-compatibility.patch create mode 100644 net/ibrdtnd/patches/010-no-const.patch create mode 100644 net/ibrdtnd/patches/020-uClibc-ng.patch create mode 100644 net/ibrdtnd/patches/030-openssl-deprecated.patch create mode 100644 net/ifstat/Config.in delete mode 100644 net/iotivity/Makefile delete mode 100644 net/iotivity/files/etc/iotivity/ReadMe.txt delete mode 100644 net/iotivity/files/etc/iotivity/oic_svr_db.cbor delete mode 100644 net/iotivity/files/etc/iotivity/oic_svr_db.json delete mode 100644 net/iotivity/patches/001-no_unit_test.patch delete mode 100644 net/iotivity/patches/002-do-not-chck-for-boost.patch delete mode 100644 net/iotivity/patches/020-linux-Add-more-architectures.patch delete mode 100644 net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch delete mode 100644 net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch delete mode 100644 net/iotivity/patches/023-build-take-compiler-options-from-environment.patch delete mode 100644 net/iotivity/patches/030-remove-check-for-curl.patch delete mode 100644 net/iotivity/patches/040-linux-Use-system-sqlite3.patch delete mode 100644 net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch delete mode 100644 net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch delete mode 100644 net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch delete mode 100644 net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch delete mode 100644 net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch delete mode 100644 net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch delete mode 100644 net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch delete mode 100644 net/iotivity/patches/078-use-system-mbedtls.patch delete mode 100644 net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch delete mode 100644 net/iotivity/patches/140-remove-glib2.patch delete mode 100644 net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch delete mode 100644 net/iotivity/patches/300-resource-Include-functional-header-for-g-7.1.0.patch delete mode 100644 net/ipsec-tools/Makefile delete mode 100644 net/ipsec-tools/files/functions.sh delete mode 100644 net/ipsec-tools/files/p1client-down delete mode 100644 net/ipsec-tools/files/p1client-up delete mode 100644 net/ipsec-tools/files/racoon delete mode 100644 net/ipsec-tools/files/racoon.init delete mode 100644 net/ipsec-tools/files/vpnctl delete mode 100644 net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch delete mode 100644 net/ipsec-tools/patches/001-no_libfl.patch delete mode 100644 net/ipsec-tools/patches/002-patch8-utmp.patch delete mode 100644 net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch delete mode 100644 net/ipsec-tools/patches/005-isakmp-fix.patch delete mode 100644 net/ipsec-tools/patches/006-linux-3.7-compat.patch delete mode 100644 net/ipsec-tools/patches/007-force_have_policy_fwd.patch delete mode 100644 net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch delete mode 100644 net/ipsec-tools/patches/009-musl-compat.patch delete mode 100644 net/ipsec-tools/patches/010-CVE-2016-10396.patch create mode 100644 net/iputils/Config_ping.in create mode 100644 net/iputils/Config_tracepath.in create mode 100644 net/iputils/Makefile create mode 100644 net/ipvsadm/Makefile create mode 100644 net/ipvsadm/patches/001-Makefile.patch create mode 100644 net/ipvsadm/patches/002-save-restore.patch create mode 100644 net/irssi/patches/010-Fix-finding-OpenSSL-when-1.1-with-deprecated-APIs-di.patch delete mode 100644 net/jool/patches/010-musl.patch delete mode 100644 net/kadnode/patches/0001-LFLAGS-LDFLAGS.patch create mode 100644 net/kcptun/Makefile create mode 100644 net/kcptun/README.md create mode 100644 net/kcptun/files/kcptun.config create mode 100644 net/kcptun/files/kcptun.init create mode 100644 net/kea/Makefile create mode 100644 net/kea/patches/001-fix-cross-compile.patch create mode 100644 net/kea/patches/002-fix-host-compile.patch create mode 100644 net/kea/patches/003-no-test-compile.patch create mode 100644 net/kea/patches/010-openssl-deprecated.patch create mode 100644 net/keepalived/files/etc/uci-defaults/keepalived create mode 100644 net/keepalived/patches/0001-Fix-building-with-disable-libipvs-dynamic.patch create mode 100644 net/kismet/patches/030-libcxx.patch create mode 100644 net/knxd/patches/0100-version.patch create mode 100644 net/ksmbd-tools/Makefile create mode 100644 net/ksmbd-tools/files/ksmbd.config create mode 100644 net/ksmbd-tools/files/ksmbd.config.example create mode 100644 net/ksmbd-tools/files/ksmbd.init create mode 100644 net/ksmbd-tools/files/smb.conf.template create mode 100644 net/ksmbd-tools/files/smb.service create mode 100644 net/leech/Makefile create mode 100644 net/lftp/patches/010-openssl-deprecated.patch create mode 100644 net/libndp/Makefile create mode 100644 net/libreswan/Makefile create mode 100644 net/libreswan/files/ipsec.conf create mode 100755 net/libreswan/files/ipsec.init create mode 100644 net/libreswan/files/ipsec.secrets create mode 100644 net/libreswan/patches/010-nanosleep.patch create mode 100644 net/libreswan/patches/020-limits.patch create mode 100644 net/libreswan/patches/030-fix_nss_3.52.patch create mode 100644 net/libreswan/patches/099-continue_on_missing_ipv6.patch delete mode 100644 net/lighttpd/patches/0001-core-fix-base64-decode-when-char-is-unsigned-fixes-2.patch create mode 100644 net/linuxptp/patches/001-fix_kbuild_output.patch delete mode 100644 net/lispmob/Makefile delete mode 100644 net/lispmob/patches/001-fix-musl-build.patch create mode 100644 net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch create mode 100644 net/lora-gateway-hal/Config.in create mode 100644 net/lora-gateway-hal/Makefile create mode 100644 net/lora-gateway-hal/patches/0001-add-cmake-support.patch create mode 100644 net/lora-gateway-hal/patches/0002-add-preprocessing-for-SPI_DEV_PATH-and-SPI_SPEED.patch create mode 100644 net/lora-gateway-hal/patches/0003-add-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.patch create mode 100644 net/lynx/Makefile create mode 100644 net/lynx/files/lynx.cfg create mode 100644 net/lynx/files/lynx.lss delete mode 100644 net/mdnsresponder/patches/001-cross_compile.patch create mode 100644 net/mdnsresponder/patches/010-uclibc.patch delete mode 100644 net/mdnsresponder/patches/100-linux_fixes.patch delete mode 100644 net/mdnsresponder/patches/114-fix_posix_build.patch delete mode 100644 net/mdnsresponder/patches/120-reproducible-builds.patch delete mode 100644 net/memcached/patches/100-fix_iov_max.patch delete mode 100644 net/mii-tool/Makefile delete mode 100644 net/mii-tool/patches/001-mii-tool-4.9-compatibility.patch create mode 100644 net/miniupnpc/patches/100-no-fPIC.patch delete mode 100644 net/miniupnpc/patches/100-no_minixml_test.patch create mode 100644 net/miniupnpd/patches/100-no-daemon.patch delete mode 100644 net/miniupnpd/patches/101-no-ssl-uuid.patch delete mode 100644 net/miniupnpd/patches/102-ipv6-ext-port.patch delete mode 100644 net/miniupnpd/patches/103-no-ipv6-autodetection.patch delete mode 100644 net/miniupnpd/patches/104-always-libuuid.patch delete mode 100644 net/miniupnpd/patches/105-no_ssdp_warn.patch create mode 100644 net/miniupnpd/patches/200-remove-default-cflags.patch create mode 100644 net/miniupnpd/patches/300-macos-compat.patch create mode 100644 net/mosh/Makefile create mode 100644 net/mosh/patches/020-std.patch create mode 100644 net/mstpd/Config.in create mode 100644 net/mstpd/Makefile create mode 100644 net/mstpd/files/etc/init.d/mstpd.init create mode 100644 net/mstpd/files/sbin/bridge-stp delete mode 100644 net/mtr/patches/100-disabled-ipv6-fix.patch delete mode 100644 net/nbd/patches/100-make-gnutls-test-optional.patch delete mode 100644 net/nbd/patches/101-fix-build-without-gnutls.patch create mode 100644 net/net-tools/Makefile create mode 100644 net/netatalk/patches/010-gcc10.patch create mode 100644 net/netcat/patches/002-udp_listen_fix.patch create mode 100644 net/netifyd/Makefile create mode 100644 net/netifyd/README.md create mode 100644 net/netifyd/files/netifyd.config create mode 100644 net/netifyd/files/netifyd.init delete mode 100644 net/netopeer2/Makefile delete mode 100644 net/netopeer2/files/netopeer2-keystored-keygen.default delete mode 100644 net/netopeer2/files/netopeer2-keystored.default delete mode 100644 net/netopeer2/files/netopeer2-server.default delete mode 100644 net/netopeer2/files/netopeer2-server.init delete mode 100644 net/netopeer2/patches/001-remove-sysrepoctl-commands-from-cmake delete mode 100644 net/netopeer2/patches/002-fix-for-cmake-build create mode 100644 net/netsniff-ng/Makefile create mode 100644 net/netsniff-ng/patches/0001-configure-script-honors-C-LD-FLAGS.patch create mode 100644 net/netsniff-ng/patches/0002-fix-ncurses-check-during-configure.patch create mode 100644 net/netsniff-ng/patches/0003-removed-flowtop-pkg-config-usage-for-ncurses.patch delete mode 100644 net/nextdns/files/nextdns.init create mode 100644 net/nfdump/Makefile create mode 100644 net/nfdump/files/nfcapd.config create mode 100644 net/nfdump/files/nfcapd.init delete mode 100644 net/nfs-kernel-server/patches/100-no_malloc_h.patch create mode 100644 net/nfs-kernel-server/patches/102-uclibc-ns-maxmsg.patch create mode 100644 net/nft-qos/Makefile create mode 100644 net/nft-qos/files/lib/core.sh create mode 100644 net/nft-qos/files/lib/dynamic.sh create mode 100644 net/nft-qos/files/lib/monitor.sh create mode 100644 net/nft-qos/files/lib/priority.sh create mode 100644 net/nft-qos/files/lib/static.sh create mode 100644 net/nft-qos/files/nft-qos-dynamic.hotplug create mode 100644 net/nft-qos/files/nft-qos-monitor.hotplug create mode 100644 net/nft-qos/files/nft-qos.config create mode 100755 net/nft-qos/files/nft-qos.init create mode 100644 net/nginx-util/Makefile create mode 100644 net/nginx-util/src/CMakeLists.txt create mode 100644 net/nginx-util/src/nginx-ssl-util.hpp create mode 100644 net/nginx-util/src/nginx-util.cpp create mode 100644 net/nginx-util/src/nginx-util.hpp create mode 100644 net/nginx-util/src/px5g-openssl.hpp create mode 100644 net/nginx-util/src/px5g.cpp create mode 100644 net/nginx-util/src/regex-pcre.hpp create mode 100644 net/nginx-util/src/test-nginx-util-root.sh create mode 100755 net/nginx-util/src/test-nginx-util.sh create mode 100755 net/nginx-util/src/test-px5g.sh create mode 100644 net/nginx-util/src/ubus-cxx.cpp create mode 100644 net/nginx-util/src/ubus-cxx.hpp delete mode 100644 net/nginx/files-luci-support/70_nginx-luci-support-ssl create mode 100644 net/nginx/files-luci-support/luci.locations delete mode 100644 net/nginx/files-luci-support/luci_nginx.conf delete mode 100644 net/nginx/files-luci-support/luci_nginx_ssl.conf delete mode 100644 net/nginx/files-luci-support/luci_uwsgi.conf create mode 100755 net/nginx/files/README.sh create mode 100644 net/nginx/files/_lan.conf create mode 100644 net/nginx/files/_redirect2ssl.conf create mode 100644 net/nginx/files/nginx.conf create mode 100644 net/nginx/patches-dav-nginx/100-drop-libxslt-dep.patch create mode 100644 net/nginx/patches/104-endianness_fix.patch delete mode 100644 net/nginx/patches/300-max-processes.patch create mode 100644 net/nmap/patches/010-Avoid-using-namespace-std-causing-name-conflicts.patch create mode 100644 net/nmap/patches/020-Python3-port-of-ndiff.patch create mode 100644 net/nmap/patches/030-libcxx.patch create mode 100644 net/ntpclient/patches/200-time.patch create mode 100644 net/ntpclient/patches/300-siocgarp.patch create mode 100644 net/obfs4proxy/Makefile delete mode 100644 net/obfsproxy/Makefile delete mode 100644 net/obfsproxy/files/obfsproxy.conf delete mode 100644 net/obfsproxy/files/obfsproxy.init delete mode 100644 net/obfsproxy/patches/001-exclude-tests.patch delete mode 100644 net/obfsproxy/patches/002-fix-python-path.patch delete mode 100644 net/obfsproxy/patches/003-remove-argparse-dependency-test.patch delete mode 100644 net/obfsproxy/patches/004-add-syslog-support.patch delete mode 100644 net/ola/patches/050-always-force-gnu++11.patch create mode 100644 net/ola/patches/100-protobuf-3.7.patch create mode 100644 net/ola/patches/110-add-missing-config.h-incluude.patch create mode 100644 net/ola/patches/120-compile-fix.patch create mode 100644 net/oor/Makefile create mode 100644 net/open-isns/Makefile create mode 100644 net/open-isns/patches/01-security_mode.patch create mode 100644 net/open-isns/patches/02-fix_signed_vs_unsigned.patch create mode 100644 net/open-isns/patches/03-include_poll_h.patch create mode 100644 net/open-isns/patches/04-ignore_write.patch create mode 100644 net/open-isns/patches/10-without_deprecated_openssl.patch delete mode 100644 net/openconnect/patches/0001-Fix-compilation-with-libp11-version-0.4.7.patch create mode 100644 net/openfortivpn/Makefile create mode 100644 net/openfortivpn/files/14-openforticlient create mode 100755 net/openfortivpn/files/openfortivpn-wrapper create mode 100755 net/openfortivpn/files/openfortivpn.sh create mode 100644 net/openfortivpn/patches/010-bind-iface.patch delete mode 100644 net/opennhrp/Makefile delete mode 100644 net/opennhrp/files/opennhrp.init delete mode 100644 net/opennhrp/patches/100-musl-compat.patch delete mode 100644 net/openssh/patches/010-musl-stdio.patch create mode 100644 net/openvswitch/openvswitch.mk delete mode 100644 net/openvswitch/patches/0004-build-disable-building-tests.patch create mode 100644 net/openvswitch/patches/0004-build-trim-build.patch create mode 100644 net/openvswitch/patches/0005-datapath-unexport-LDFLAGS.patch delete mode 100644 net/openvswitch/patches/0005-ovsdb-idlc-fix-dict-change-during-iteration.patch create mode 100644 net/openvswitch/patches/0006-datapath-allow-passing-additional-OVS_KERNEL_MAKE_FL.patch create mode 100644 net/ostiary/Makefile create mode 100755 net/ostiary/files/ostiaryd.init create mode 100644 net/overture/Makefile create mode 100644 net/overture/files/domain_alternative_sample create mode 100644 net/overture/files/domain_primary_sample create mode 100644 net/overture/files/domain_ttl_sample create mode 100644 net/overture/files/hosts_sample create mode 100644 net/overture/files/ip_network_alternative_sample create mode 100644 net/overture/files/ip_network_primary_sample create mode 100644 net/overture/files/overture.init create mode 100644 net/ovn/Makefile create mode 100644 net/ovn/patches/0001-build-skip-building-tests.patch create mode 100644 net/ovn/patches/0002-ovn-lib-fix-install_dir.patch create mode 100644 net/p910nd/files/p910nd.hotplug create mode 100644 net/pdns-recursor/Makefile create mode 100644 net/pdns-recursor/files/pdns-recursor.init create mode 100644 net/pdns-recursor/files/recursor.conf-dist create mode 100644 net/pdns-recursor/patches/100-disable-recursor.conf-dist.patch create mode 100644 net/pdns-recursor/patches/200-boost_thread_fix.patch create mode 100644 net/pdns-recursor/patches/300-boost-173.patch create mode 100644 net/pdns/Makefile create mode 100644 net/pdns/files/pdns.conf-dist create mode 100644 net/pdns/files/pdns.init create mode 100644 net/pdns/patches/100-pdns-disable-pdns.conf-dist.patch create mode 100644 net/pdns/patches/200-openssl-deprecated.patch create mode 100644 net/pdns/patches/300-boost-173.patch create mode 100644 net/pen/patches/010-deprecated-openssl.patch create mode 100644 net/phantap/Makefile create mode 100644 net/port-mirroring/patches/010-snprintf-to-strncpy.patch create mode 100644 net/port-mirroring/patches/020-time.patch delete mode 100644 net/portmap/Makefile delete mode 100644 net/portmap/files/portmap.init delete mode 100644 net/portmap/patches/101-no_pie.patch create mode 100644 net/proxychains-ng/Makefile create mode 100644 net/ptunnel-ng/Makefile create mode 100644 net/quassel-irssi/patches/010-Get-compatible-with-potential-irssi-abi-8-and-drop-p.patch delete mode 100644 net/radicale/files/radicale.upgrade delete mode 100644 net/radsecproxy/patches/100-missing-return.patch create mode 100644 net/ratechecker/Makefile create mode 100644 net/restic-rest-server/Makefile create mode 100644 net/restic-rest-server/files/etc/config/restic-rest-server create mode 100755 net/restic-rest-server/files/etc/init.d/restic-rest-server delete mode 100644 net/rp-pppoe/patches/100-configure.patch delete mode 100644 net/rtorrent/patches/100-fix-cross_compile.patch create mode 100644 net/rtorrent/patches/130-usleep.patch create mode 100644 net/safe-search/Makefile create mode 100644 net/safe-search/Readme.md create mode 100644 net/safe-search/files/hosts/bing.default create mode 100644 net/safe-search/files/hosts/duckduckgo.default create mode 100644 net/safe-search/files/hosts/google.default create mode 100644 net/safe-search/files/hosts/youtube.restrict create mode 100644 net/safe-search/files/hosts/youtube.restrictmoderate create mode 100644 net/safe-search/files/safe-search-update create mode 100644 net/safe-search/files/safe-search.conf create mode 100644 net/safe-search/files/safe-search.defaults create mode 100644 net/samba4/Config.in create mode 100644 net/samba4/Makefile create mode 100644 net/samba4/files/samba.config create mode 100644 net/samba4/files/samba.init create mode 100644 net/samba4/files/smb.conf.template create mode 100644 net/samba4/patches/001-samba-4.4.0-pam.patch create mode 100644 net/samba4/patches/002-dnsserver-4.7.0.patch create mode 100644 net/samba4/patches/003-getpwent_r.patch create mode 100644 net/samba4/patches/004-missing-headers.patch create mode 100644 net/samba4/patches/005-musl_uintptr.patch create mode 100644 net/samba4/patches/006-netdb-defines.patch create mode 100644 net/samba4/patches/007-libldb-fix-musl-libc-unkown-type-error.patch create mode 100644 net/samba4/patches/008-samba-4.11-add_missing___compar_fn_t.patch create mode 100644 net/samba4/patches/009-samba-4-11-fix-host-tools-checks.patch.patch create mode 100644 net/samba4/patches/010-samba-4-12-fix-musl_missing__nss_buflen_passwd.patch create mode 100644 net/samba4/patches/020-source3-msgsock-nvram-fix.patch create mode 100644 net/samba4/patches/021-source4-msgsock-nvram-fix.patch create mode 100644 net/samba4/patches/101-do-not-check-xsltproc-manpages.patch create mode 100644 net/samba4/patches/102-samba-4.11-unbundle-libbsd.patch create mode 100644 net/samba4/patches/103-samba-4.12-unbundle-libunwind.patch create mode 100644 net/samba4/patches/104-samba-4.12-unbundle-icu.patch create mode 100644 net/samba4/waf-cross-answers/aarch64.txt create mode 100644 net/samba4/waf-cross-answers/arc.txt create mode 100644 net/samba4/waf-cross-answers/arm.txt create mode 100644 net/samba4/waf-cross-answers/armeb.txt create mode 100644 net/samba4/waf-cross-answers/i386.txt create mode 100644 net/samba4/waf-cross-answers/mips.txt create mode 100644 net/samba4/waf-cross-answers/mips64.txt create mode 100644 net/samba4/waf-cross-answers/mips64el.txt create mode 100644 net/samba4/waf-cross-answers/mipsel.txt create mode 100644 net/samba4/waf-cross-answers/powerpc.txt create mode 100644 net/samba4/waf-cross-answers/x86_64.txt create mode 100644 net/seafile-ccnet/patches/011-no-python-compile.patch create mode 100644 net/seafile-server/patches/012-automake-no-python-compile.patch delete mode 100644 net/shadowsocks-client/Makefile delete mode 100644 net/shadowsocks-client/files/sslocal.config delete mode 100755 net/shadowsocks-client/files/sslocal.init create mode 100644 net/shadowsocks-libev/patches/010-gcc10.patch create mode 100644 net/simple-adblock/files/simple-adblock.conf.update create mode 100644 net/smartdns/Makefile create mode 100644 net/smcroute/Makefile create mode 100755 net/smcroute/files/smcroute.init create mode 100644 net/snort/patches/002-fix_include.patch create mode 100644 net/snort/patches/003-include-tirpc.patch create mode 100644 net/snort3/Makefile create mode 100644 net/snort3/files/snort.config create mode 100644 net/snort3/files/snort.init create mode 100644 net/snort3/patches/001-compile.patch create mode 100644 net/snort3/patches/002-ignore-liblzma.patch create mode 100644 net/snort3/patches/003-fix-bigendian.patch delete mode 100644 net/socat/patches/100-musl-compat.patch create mode 100644 net/socat/patches/100-usleep.patch create mode 100644 net/socat/patches/200-openssl-deprecated.patch create mode 100644 net/softethervpn5/Makefile create mode 100644 net/softethervpn5/files/dummy create mode 100644 net/softethervpn5/files/launcher.sh create mode 100644 net/softethervpn5/files/vpnbridge.init create mode 100644 net/softethervpn5/files/vpnclient.init create mode 100644 net/softethervpn5/files/vpnserver.init create mode 100644 net/softethervpn5/patches/001-iconv-defines-fix.patch create mode 100644 net/softethervpn5/patches/002-iconv-cmake-fix.patch create mode 100644 net/softethervpn5/patches/100-increase-cfg-save-intervall.patch create mode 100644 net/softethervpn5/patches/101-add-config-write-syslog.patch create mode 100644 net/softflowd/patches/010-bzero.patch create mode 100644 net/softflowd/patches/020-uid.patch create mode 100644 net/speedtest-netperf/Makefile create mode 100644 net/speedtest-netperf/files/README.md create mode 100644 net/speedtest-netperf/files/speedtest-netperf.sh create mode 100644 net/spoofer/Makefile create mode 100644 net/sslh/patches/010-format.patch create mode 100755 net/sstp-client/files/lib/netifd/proto/sstp.sh create mode 100644 net/sstp-client/patches/200-openssl-deprecated.patch delete mode 100644 net/strongswan/patches/201-kmodloader.patch create mode 100644 net/stubby/files/stubby.conf mode change 100644 => 100755 net/stubby/files/stubby.init create mode 100644 net/stubby/patches/stubby-0.3.0-fix-config-install.patch create mode 100644 net/switchdev-poller/Makefile create mode 100755 net/switchdev-poller/files/switchdev-poller create mode 100755 net/switchdev-poller/files/switchdev-poller.init delete mode 100644 net/sysrepo/Config_libsysrepo.in create mode 100644 net/sysrepo/patches/001-add-generated-protobufc-files.patch delete mode 100644 net/sysrepo/patches/001-protobuf-remove-protoc-command-from-cmake-file delete mode 100644 net/sysrepo/patches/002-remove-buildtime-module-install delete mode 100644 net/sysrepo/patches/003-missing-time-header delete mode 100644 net/sysrepo/patches/004-disable-sysrepod-autostart delete mode 100644 net/sysrepo/patches/005-fix-struct-ucred-define create mode 100644 net/sysrepo/patches/006-update-generated-protobufc-files.patch create mode 100644 net/tac_plus/Makefile create mode 100644 net/tac_plus/files/tac_plus.conf create mode 100755 net/tac_plus/files/tac_plus.init create mode 100644 net/tac_plus/patches/010-configure-remove-libnsl.patch delete mode 100644 net/tgt/files/etc/config/tgt delete mode 100755 net/tgt/files/etc/init.d/tgt create mode 100644 net/tgt/files/tgt.config create mode 100755 net/tgt/files/tgt.init delete mode 100644 net/tinyproxy/patches/010-no-docs-and-tests.patch delete mode 100644 net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch delete mode 100644 net/tinyproxy/patches/CVE-2012-3505-tiniproxy-randomized-hashmaps.patch delete mode 100644 net/tinyproxy/patches/CVE-2012-3505-tinyproxy-limit-headers.patch create mode 100644 net/tor-fw-helper/Makefile create mode 100644 net/tor-hs/Makefile create mode 100644 net/tor-hs/README.md create mode 100755 net/tor-hs/files/nextcloud-update.sh create mode 100644 net/tor-hs/files/tor-hs.conf create mode 100755 net/tor-hs/files/tor-hs.init create mode 100755 net/tor-hs/files/tor_rpcd.sh create mode 100644 net/tor/files/tor.conf create mode 100644 net/torsocks/Makefile create mode 100644 net/trafficshaper/Makefile create mode 100644 net/trafficshaper/files/trafficshaper.conf create mode 100755 net/trafficshaper/files/trafficshaper.init create mode 100644 net/transmission/files/transmission-daemon.json delete mode 100644 net/transmission/patches/010-fix-port-test.patch delete mode 100644 net/transmission/patches/020-fix-safari.patch delete mode 100644 net/transmission/patches/030-fix-dht-memory-leak.patch delete mode 100644 net/transmission/patches/040-fix-curl.patch delete mode 100644 net/transmission/patches/070-uClibc-ng-since-1.0.18-has-sys-quota.h-synced-with-G.patch create mode 100644 net/transmission/patches/080-disable-webseeding.patch create mode 100755 net/travelmate/files/generic-user-pass.login create mode 100755 net/travelmate/files/wifionice.login create mode 100644 net/uacme/Makefile create mode 100644 net/uacme/files/acme.config create mode 100644 net/uacme/files/acme.init create mode 100644 net/uacme/files/run.sh delete mode 100644 net/uanytun/patches/100-reproducible-builds.patch create mode 100644 net/udptunnel/Makefile create mode 100644 net/udptunnel/patches/001-multicast.patch create mode 100644 net/udptunnel/patches/002-main_code_fix.patch create mode 100644 net/ulogd/patches/010-json-remote.patch create mode 100644 net/ulogd/patches/020-fix-musl.patch create mode 100644 net/ulogd/patches/030-ipfix-add.patch create mode 100644 net/ulogd/patches/040-ipfix-template.patch delete mode 100644 net/ulogd/patches/100-musl-compat.patch delete mode 100644 net/ulogd/patches/101-ulogd-use-strncpy-instead-of-memcpy.patch create mode 100644 net/umurmur/patches/0001-Update-openssl-1.1-deprecated-API.patch create mode 100644 net/umurmur/patches/010-deprecated-openssl.patch delete mode 100644 net/umurmur/patches/010-mbedtls_fix_includes.patch delete mode 100644 net/uwsgi-cgi/Makefile delete mode 100644 net/uwsgi-cgi/files-luci-support/luci-cgi_io.ini delete mode 100644 net/uwsgi-cgi/files-luci-support/luci-webui.ini delete mode 100644 net/uwsgi-cgi/files/emperor.ini delete mode 100644 net/uwsgi-cgi/files/uwsgi.init delete mode 100644 net/uwsgi-cgi/patches/001-remove-unused-deps.patch delete mode 100644 net/uwsgi-cgi/patches/004-hard-code-Linux-as-compilation-os.patch create mode 100644 net/uwsgi/Makefile create mode 100644 net/uwsgi/files-luci-support/luci-cgi_io.ini create mode 100644 net/uwsgi/files-luci-support/luci-webui.ini create mode 100644 net/uwsgi/files/emperor.ini create mode 100644 net/uwsgi/files/uwsgi.init rename net/{uwsgi-cgi/patches/002-dont-hardcode-zlib.patch => uwsgi/patches/001-dont-hardcode-zlib.patch} (100%) rename net/{uwsgi-cgi/patches/003-dont-override-toolchain-optimization.patch => uwsgi/patches/002-dont-override-toolchain-optimization.patch} (100%) create mode 100644 net/uwsgi/patches/003-hard-code-Linux-as-compilation-os.patch rename net/{uwsgi-cgi => uwsgi}/patches/010-uclibc-ng.patch (100%) rename net/{uwsgi-cgi => uwsgi}/patches/020-uwsgiconfig-system-python3.patch (100%) rename net/{uwsgi-cgi => uwsgi}/patches/030-plugins-cgi_adds_dontresolve_option.patch (100%) create mode 100644 net/uwsgi/src/buildconf/openwrt.ini create mode 100644 net/vnstat2/Makefile create mode 100644 net/vnstat2/files/vnstat.config create mode 100644 net/vnstat2/files/vnstat.init create mode 100644 net/vpn-policy-routing/Makefile create mode 100644 net/vpn-policy-routing/files/README.md create mode 100644 net/vpn-policy-routing/files/vpn-policy-routing.aws.user create mode 100644 net/vpn-policy-routing/files/vpn-policy-routing.conf create mode 100755 net/vpn-policy-routing/files/vpn-policy-routing.firewall.hotplug create mode 100755 net/vpn-policy-routing/files/vpn-policy-routing.iface.hotplug create mode 100755 net/vpn-policy-routing/files/vpn-policy-routing.init create mode 100644 net/vpn-policy-routing/files/vpn-policy-routing.netflix.user create mode 100644 net/vpnc/patches/110-openssl-deprecated.patch create mode 100644 net/vsftpd/patches/010-openssl-deprecated.patch create mode 100644 net/webui-aria2/patches/0001-fix-favicon-path.patch delete mode 100644 net/webui-aria2/patches/001-simplify-flag-icon-css.patch delete mode 100644 net/wget/files/.wgetrc delete mode 100644 net/wifidog-ng/Makefile delete mode 100644 net/wifidog-ng/files/ssl.crt delete mode 100644 net/wifidog-ng/files/ssl.key delete mode 100644 net/wifidog-ng/files/wifidog-ng.config delete mode 100644 net/wifidog-ng/files/wifidog-ng.hotplug delete mode 100644 net/wifidog-ng/files/wifidog-ng.init delete mode 100644 net/wifidog-ng/files/wifidog-ng.lua delete mode 100644 net/wifidog-ng/files/wifidog-ng/auth.lua delete mode 100644 net/wifidog-ng/files/wifidog-ng/config.lua delete mode 100644 net/wifidog-ng/files/wifidog-ng/heartbeat.lua delete mode 100644 net/wifidog-ng/files/wifidog-ng/ubus.lua delete mode 100644 net/wifidog-ng/files/wifidog-ng/util.lua delete mode 100644 net/wifidog-ng/files/wifidog-ng/version.lua delete mode 100644 net/wifidog-ng/src/Makefile delete mode 100644 net/wifidog-ng/src/config.c delete mode 100644 net/wifidog-ng/src/config.h delete mode 100644 net/wifidog-ng/src/main.c delete mode 100644 net/wifidog-ng/src/utils.h create mode 100644 net/wsdd2/Makefile create mode 100644 net/wsdd2/files/wsdd2.init delete mode 100644 net/xinetd/files/xinetd.conf create mode 100644 net/xinetd/files/xinetd.uci.conf.sample delete mode 100644 net/xtables-addons/patches/002-build-support-for-Linux-4.15.patch create mode 100644 net/xtables-addons/patches/002-restore-support-for-Linux-4.14.patch delete mode 100644 net/xtables-addons/patches/003-build-add-support-for-Linux-4.18.patch create mode 100644 net/xtables-addons/patches/210-freebsd-build-fix.patch delete mode 100644 net/xtables-addons/patches/300-geoip-endian-detection.patch delete mode 100644 net/yaaw/Makefile create mode 100644 net/yggdrasil/Makefile create mode 100644 net/yggdrasil/files/yggdrasil.defaults create mode 100755 net/yggdrasil/files/yggdrasil.init create mode 100755 net/yggdrasil/files/ygguci create mode 100644 net/zerotier/patches/010-mangix.patch create mode 100644 net/zerotier/patches/020-musl.patch delete mode 100644 net/znc/patches/100-move_rootcheck_after_config.patch create mode 100644 net/znc/patches/120-openssl-deprecated.patch delete mode 100644 sound/alac/Makefile delete mode 100644 sound/alsa-utils/patches/100-uClibc-compat.patch delete mode 100644 sound/alsa-utils/patches/101-disable-libsamplerate.patch create mode 100644 sound/espeak/patches/010-uclibcxx.patch create mode 100644 sound/espeak/patches/101-Fix_GCC_narrowing_conversion_errors.patch delete mode 100644 sound/espeak/patches/101-portaudio.patch create mode 100644 sound/fdk-aac/patches-free/010-remove-sbr.patch create mode 100644 sound/fdk-aac/patches-free/020-remove-hcx-rvlc-error.patch create mode 100644 sound/fdk-aac/patches-free/030-remove-mp3-surround.patch create mode 100644 sound/fdk-aac/patches-free/040-remove-usac.patch create mode 100644 sound/forked-daapd/patches/010-errno.patch create mode 100644 sound/forked-daapd/patches/020-gcc10.patch delete mode 100644 sound/mpd/patches/210-support_raw_pcm_streams.patch delete mode 100644 sound/mpd/patches/220-handle_slow_server_stream_startup.patch delete mode 100644 sound/pulseaudio/patches/010-also-include.patch delete mode 100644 sound/shairplay/patches/002-libavahi-compat-dnssd.patch create mode 100644 sound/shairplay/patches/010-configure-only-check-for-dns_sd.h-in-case-libdl-was-.patch create mode 100644 sound/shairport-sync/patches/010-no-cxx.patch delete mode 100644 sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch delete mode 100644 sound/squeezelite/patches/005-respect_LDFLAGS.patch delete mode 100644 sound/squeezelite/patches/030-fix_musl_compatibilty.patch delete mode 100644 sound/squeezelite/patches/040-clear_dynlink_errors.patch delete mode 100644 sound/upmpdcli/patches/010-Add_icon_config.patch delete mode 100644 utils/acpid/patches/002-dont-use-isfdtype.patch create mode 100644 utils/antfs-mount/Makefile create mode 100644 utils/antfs-mount/files/mount.ntfs create mode 100644 utils/attendedsysupgrade-common/files/c06d891233ba699 create mode 100644 utils/attr/patches/110-Replace-bzero-with-memset.patch create mode 100644 utils/avrdude/patches/110-ud-to-u.patch create mode 100644 utils/bandwidthd/patches/030-gcc10.patch create mode 100644 utils/bash/files/etc/bash.bashrc create mode 100644 utils/bash/files/etc/profile.d/sys_bashrc.sh create mode 100644 utils/bash/patches/101-bash50-001.patch create mode 100644 utils/bash/patches/102-bash50-002.patch create mode 100644 utils/bash/patches/103-bash50-003.patch create mode 100644 utils/bash/patches/104-bash50-004.patch create mode 100644 utils/bash/patches/105-bash50-005.patch create mode 100644 utils/bash/patches/106-bash50-006.patch create mode 100644 utils/bash/patches/107-bash50-007.patch create mode 100644 utils/bash/patches/108-bash50-008.patch create mode 100644 utils/bash/patches/109-bash50-009.patch create mode 100644 utils/bash/patches/110-bash50-010.patch create mode 100644 utils/bash/patches/111-bash50-011.patch create mode 100644 utils/bash/patches/112-bash50-012.patch create mode 100644 utils/bash/patches/113-bash50-013.patch create mode 100644 utils/bash/patches/114-bash50-014.patch create mode 100644 utils/bash/patches/115-bash50-015.patch create mode 100644 utils/bash/patches/116-bash50-016.patch create mode 100644 utils/bash/patches/117-bash50-017.patch create mode 100644 utils/bash/patches/901-startup-files.patch create mode 100644 utils/bcm27xx-eeprom/Makefile create mode 100644 utils/bcm27xx-eeprom/patches/0001-rpi-eeprom-update-OpenWrt-defaults.patch create mode 100644 utils/bcm27xx-eeprom/patches/0002-rpi-eeprom-config-switch-to-Python-3.patch create mode 100644 utils/bcm27xx-eeprom/patches/0003-rpi-eeprom-update-change-default-include-path.patch create mode 100644 utils/bigclown/bigclown-control-tool/Makefile create mode 100644 utils/bigclown/bigclown-firmware-tool/Makefile create mode 100644 utils/bigclown/bigclown-gateway/Makefile create mode 100644 utils/bigclown/bigclown-gateway/files/config create mode 100755 utils/bigclown/bigclown-gateway/files/init create mode 100644 utils/bigclown/bigclown-mqtt2influxdb/Makefile create mode 100644 utils/bigclown/bigclown-mqtt2influxdb/files/config.yml create mode 100644 utils/bigclown/bigclown-mqtt2influxdb/files/init delete mode 100644 utils/bonnie++/patches/001-cross_compile_fix.patch create mode 100644 utils/bonnie++/patches/010-openwrt-fixes.patch create mode 100644 utils/btrfs-progs/Config.in create mode 100644 utils/byobu/Makefile create mode 100644 utils/byobu/patches/001-hardcode-utf-8-charmap.patch create mode 100644 utils/byobu/patches/002-fix-missing-tty.patch create mode 100644 utils/byobu/patches/004-skip-python-test.patch create mode 100644 utils/byobu/patches/005-monitor-overlay.patch create mode 100644 utils/byobu/patches/006-only-pgrep-services.patch create mode 100644 utils/byobu/patches/007-count-dropbear-users.patch create mode 100644 utils/cache-domains/Makefile create mode 100644 utils/cache-domains/README.md create mode 100644 utils/cache-domains/files/30-cache-domains create mode 100644 utils/cache-domains/files/cache-domains create mode 100644 utils/cmdpad/patches/150-header.patch create mode 100755 utils/collectd/files/exec-scripts/sqm_collectd.sh create mode 100644 utils/collectd/files/usr/share/collectd/plugin/syslog.json create mode 100644 utils/collectd/files/usr/share/collectd/plugin/ubi.json create mode 100644 utils/collectd/patches/910-add-cake-qdisc-types.patch create mode 100644 utils/collectd/patches/920-fix-ubi-data-source-type.patch create mode 100644 utils/coremark/Makefile delete mode 100644 utils/coreutils/patches/002-fix_compile_with_uclibc.patch create mode 100644 utils/coreutils/patches/002-ls-restore-831-behavior-on-removed-directories.patch create mode 100644 utils/ctop/Makefile delete mode 100644 utils/dbus/patches/100-fix-poll-select.patch create mode 100644 utils/device-observatory/Makefile create mode 100644 utils/device-observatory/files/etc/config/device-observatory create mode 100755 utils/device-observatory/files/etc/init.d/device-observatory create mode 100644 utils/device-observatory/patches/010-uClibc-ng.patch delete mode 100644 utils/docker-ce/files/daemon.json create mode 100644 utils/docker-ce/files/etc/config/dockerd create mode 100644 utils/docker-ce/files/etc/sysctl.d/sysctl-br-netfilter-ip.conf create mode 100644 utils/docker-compose/Makefile create mode 100644 utils/domoticz/patches/010-boost-173.patch create mode 100644 utils/domoticz/patches/011-openzwave-include.patch create mode 100644 utils/domoticz/patches/012-minizip-overflow.patch delete mode 100644 utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch create mode 100644 utils/dosfstools/patches/010-iconv.patch create mode 100644 utils/dump1090/patches/010-gcc10.patch create mode 100644 utils/evtest/patches/010-musl.patch create mode 100644 utils/evtest/patches/020-Fix-build-on-32bit-arches-with-64bit-time_t.patch create mode 100644 utils/fft-eval/Makefile create mode 100644 utils/fio/Makefile create mode 100644 utils/fish/Makefile delete mode 100644 utils/flashrom/patches/0001-fix_internal_bitbang.patch delete mode 100644 utils/flashrom/patches/0002-fix-io-h-include.patch delete mode 100644 utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch create mode 100644 utils/flashrom/patches/900-build_internal_programmer_all_archs.patch create mode 100644 utils/fuse/Makefile create mode 100644 utils/fuse/patches/100-missing_includes.patch create mode 100644 utils/fuse/patches/112-no_break_on_mknod.patch create mode 100644 utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch delete mode 100644 utils/gammu/patches/001-iconv-disabling-option.patch delete mode 100644 utils/gammu/patches/002-no-fstack-protector.patch delete mode 100644 utils/gammu/patches/003-cmake-cross-toolchain.patch delete mode 100644 utils/gammu/patches/004-cmake_libdbi_optional.patch delete mode 100644 utils/gammu/patches/010-utils-shell-fix.patch create mode 100644 utils/gammu/patches/020-select.patch create mode 100644 utils/gddrescue/Makefile create mode 100644 utils/gddrescue/patches/001-fix_uclibc.patch create mode 100644 utils/gkermit/patches/010-musl.patch create mode 100644 utils/gnuplot/Makefile create mode 100644 utils/gnuplot/patches/010-remove_doc_from_makefile.patch create mode 100644 utils/gptfdisk/patches/050-Add-some-extra-flushes-before-getline-cin.patch create mode 100644 utils/hashdeep/Makefile create mode 100644 utils/hfsprogs/patches/0016-Fix-fsckhfs-wide-literal.patch create mode 100644 utils/hfsprogs/patches/010-valloc-to-memalign.patch create mode 100644 utils/hfsprogs/patches/020-cdefs.patch create mode 100644 utils/hplip/Makefile create mode 100644 utils/hplip/files/hplib.conf create mode 100644 utils/hplip/patches/010-libusb_fix.patch create mode 100644 utils/hplip/patches/020-remove_cups_dep_on_scan.patch create mode 100644 utils/hplip/patches/030-replace_unsafe_memcpy_with_memmove.patch create mode 100644 utils/hplip/patches/050-fix-glibcisms.patch create mode 100644 utils/hplip/patches/060-fix-uclibc.patch create mode 100644 utils/hwinfo/Makefile create mode 100644 utils/hwinfo/patches/0-hardcoding-version create mode 100644 utils/hwinfo/patches/1-remove_libx8emu_dependency create mode 100644 utils/hwinfo/patches/2-enable-hw-ids-and-disable-generation-of-tiny-hwinfo-headers create mode 100644 utils/hwinfo/patches/3-assorted-Makefile-butchery create mode 100644 utils/idevicerestore/Makefile create mode 100644 utils/irqbalance/files/irqbalance.config create mode 100644 utils/irqbalance/files/irqbalance.init delete mode 100644 utils/irqbalance/patches/100-disable-ui-compilation.patch create mode 100644 utils/irqbalance/patches/100-remove-libncursesw-dependency.patch create mode 100644 utils/irqbalance/patches/110-fix-runtime-socket-directory.patch delete mode 100644 utils/irqbalance/patches/200-avoid-glib.patch delete mode 100644 utils/irqbalance/patches/300-upstream-fix-for-AARCH64.patch create mode 100644 utils/jupp/Makefile delete mode 100644 utils/lcd4linux/patches/110-uclibc-logarithm-fix.patch delete mode 100644 utils/lcd4linux/patches/160-uinput_defs.patch create mode 100644 utils/lcd4linux/patches/200-musl.patch create mode 100644 utils/lcdproc/patches/110-in-outb.patch delete mode 100644 utils/lm-sensors/patches/100-ignore-no-sensor-info.patch create mode 100644 utils/lvm2/files/lvm2.preinit delete mode 100644 utils/lvm2/patches/000-compile.patch delete mode 100644 utils/lvm2/patches/001-include_fix.patch delete mode 100644 utils/lxc/patches/001-nl-avoid-NULL-pointer-dereference.patch delete mode 100644 utils/lxc/patches/002-compile.patch delete mode 100644 utils/lxc/patches/003-compile.patch create mode 100644 utils/lxc/patches/010-Remove-distro-check.patch delete mode 100644 utils/lxc/patches/010-compile.patch create mode 100644 utils/mariadb-common/Makefile rename utils/{mariadb => mariadb-common}/conf/my.cnf (100%) delete mode 100644 utils/mariadb/patches/180-libedit.patch create mode 100644 utils/mariadb/patches/180-relax-mysql_install-db-wrt-pam-tool.patch create mode 100644 utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch create mode 100644 utils/mbtools/patches/010-glib.patch create mode 100644 utils/mc/patches/020-fix-mouse-handling-newer-terminfo.patch create mode 100644 utils/mg/Makefile create mode 100644 utils/mg/patches/001-cross_compile_openwrt.patch create mode 100644 utils/mg/patches/900-musl_compatibility.patch create mode 100644 utils/mg/patches/901-use_pcre.patch create mode 100644 utils/micrond/Makefile create mode 100755 utils/micrond/files/etc/init.d/micrond create mode 100644 utils/micrond/files/usr/lib/micron.d/.keep create mode 100644 utils/micrond/src/Makefile create mode 100644 utils/micrond/src/micrond.c create mode 100644 utils/minicom/patches/200-gcc10.patch rename utils/mmc-utils/patches/{001-properly-set-fortify-source-in-makefile.patch => 0000-properly-set-fortify-source-in-makefile.patch} (100%) create mode 100644 utils/mmc-utils/patches/0006-Fix-parsing-of-Product-Revision-and-Serial-Number.patch create mode 100644 utils/mmc-utils/patches/0007-Add-various-SD-eMMC-vendors-to-table.patch create mode 100644 utils/mmc-utils/patches/0008-Various-fixes.patch create mode 100644 utils/mmc-utils/patches/0009-mmc-utils-let-FFU-mode-use-CMD23-and-CMD25.patch create mode 100644 utils/mmc-utils/patches/0010-One-further-optimization-of-trimming-routine.patch create mode 100644 utils/mmc-utils/patches/0011-mmc-utils-Fix-scaling-of-cache-size.patch create mode 100644 utils/mt-st/patches/010-sysmacros.patch delete mode 100644 utils/nano/patches/001-upstream-fix-for-3.1-tiny-compilation.patch create mode 100644 utils/nnn/Makefile create mode 100644 utils/oath-toolkit/patches/oath-toolkit-2.6.2-build-fix.patch create mode 100644 utils/open-plc-utils/patches/010-gcc10.patch delete mode 100644 utils/open-plc-utils/patches/100-remove-build-timestamp.patch create mode 100644 utils/open-vm-tools/Makefile rename {libs => utils}/open-vm-tools/files/shutdown (100%) rename {libs => utils}/open-vm-tools/files/tools.conf (100%) rename {libs => utils}/open-vm-tools/files/vmtoolsd.init (100%) rename {libs => utils}/open-vm-tools/files/vmware-scsi.hotplug (100%) rename {libs => utils}/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch (100%) rename {libs => utils}/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch (100%) rename {libs => utils}/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch (100%) rename {libs => utils}/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch (100%) rename {libs => utils}/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch (100%) rename {libs => utils}/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch (100%) rename {libs => utils}/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch (100%) rename {libs => utils}/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch (100%) rename {libs => utils}/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch (100%) create mode 100644 utils/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch rename {libs => utils}/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch (100%) rename {libs => utils}/open-vm-tools/patches/0013-fsutil_use_typedef_loff_t.patch (100%) create mode 100644 utils/open-vm-tools/patches/0014-resolve-musl-does-not-implement-res_ninit.patch delete mode 100644 utils/open2300/patches/001-crosscompile.patch create mode 100644 utils/openocd/patches/010-gcc10.patch create mode 100644 utils/opensc/patches/010-openssl-deprecated.patch delete mode 100644 utils/openzwave/patches/001-unix-fix-compilation-against-musl-libc-1127.patch delete mode 100644 utils/openzwave/patches/900_fix-build.patch delete mode 100644 utils/openzwave/patches/901_no-hidcontroller.patch delete mode 100644 utils/openzwave/patches/902_no-udev.patch delete mode 100644 utils/openzwave/patches/904-fix-lib-include-path.patch create mode 100644 utils/owfs/patches/010-gcc10.patch delete mode 100644 utils/owfs/patches/100-fix-netlink-w1-status-message-detection.patch delete mode 100644 utils/owfs/patches/101-fix-no-reset-routine-segfault.patch create mode 100644 utils/picocom/patches/010-fix-compile.patch create mode 100644 utils/picocom/patches/020-fix-compile-x86.patch delete mode 100644 utils/picocom/patches/100-musl-compat.patch create mode 100644 utils/powertop/Makefile create mode 100644 utils/powertop/patches/002-strerror_r.patch create mode 100644 utils/powertop/patches/010-src-main-Add-missing-pthread-header.patch create mode 100644 utils/powertop/patches/020-intel_cpus.cpp-Change-open-parameter-to-const-char.patch create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/dawn.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua create mode 100644 utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua create mode 100644 utils/prometheus-statsd-exporter/Makefile create mode 100644 utils/prometheus-statsd-exporter/files/etc/config/prometheus-statsd-exporter create mode 100755 utils/prometheus-statsd-exporter/files/etc/init.d/prometheus-statsd-exporter create mode 100644 utils/prometheus-statsd-exporter/files/etc/prometheus-statsd-exporter.yml create mode 100644 utils/prometheus/Makefile create mode 100755 utils/prometheus/files/etc/init.d/prometheus create mode 100644 utils/prometheus/files/etc/prometheus.yml create mode 100755 utils/prometheus/files/etc/uci-defaults/prometheus-defaults create mode 100644 utils/prometheus/files/prometheus.yml create mode 100644 utils/pservice/Makefile create mode 100644 utils/pservice/README.md create mode 100644 utils/pservice/files/pservice.config create mode 100755 utils/pservice/files/pservice.init delete mode 100755 utils/qemu/files/shutdown create mode 100644 utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch delete mode 100644 utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch create mode 100644 utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch delete mode 100644 utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch create mode 100644 utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch delete mode 100644 utils/qemu/patches/0005-slirp-ipreass-fix-use-after-free.patch create mode 100644 utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch create mode 100644 utils/quota/Makefile create mode 100644 utils/readsb/Makefile create mode 100644 utils/readsb/files/readsb.config create mode 100644 utils/readsb/files/readsb.init create mode 100644 utils/readsb/patches/001-network-avoid-segfault-in-freeaddrinfo.patch create mode 100644 utils/readsb/patches/010-gcc10.patch create mode 100644 utils/restic/Makefile delete mode 100644 utils/rng-tools/patches/100-message-no-newline.patch create mode 100644 utils/rrdtool1/patches/040-no-e-notation-on-log-display.patch create mode 100644 utils/rtklib/patches/010-musl.patch create mode 100644 utils/rtklib/patches/020-no-gfortran.patch create mode 100644 utils/rtl-ais/patches/010-musl.patch delete mode 100644 utils/rtl-sdr/patches/101-fix-inlines.patch mode change 100755 => 100644 utils/rtty/Makefile create mode 100755 utils/sane-backends/files/saned.hotplug create mode 100755 utils/sane-backends/files/saned.sbin create mode 100644 utils/sane-backends/files/saned.xinetd delete mode 100644 utils/sane-backends/files/xinet.d_sane-port delete mode 100644 utils/sane-backends/patches/031-fix_uclibc.patch delete mode 100644 utils/sane-backends/patches/050-remove_linked_libs_for_unused_preload.patch create mode 100644 utils/sane-backends/patches/100-fix-bigendian.patch create mode 100644 utils/sane-backends/patches/101-fix_uclibc_std_rand.patch delete mode 100644 utils/screen/patches/100-cross_compile_fix.patch delete mode 100644 utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch delete mode 100644 utils/screen/patches/200-musl-compat.patch create mode 100644 utils/sed/Makefile create mode 100644 utils/setserial/patches/010-no-docs.patch create mode 100644 utils/setserial/patches/020-musl.patch delete mode 100644 utils/shadow/patches/001-busybox_ash.patch delete mode 100644 utils/shadow/patches/002-disable-ruser-lookup.patch delete mode 100644 utils/shadow/patches/003-Check-size-of-uid_t-and-gid_t-using-AC_CHECK_SIZEOF.patch delete mode 100644 utils/sispmctl/patches/001-fix-includes.patch create mode 100644 utils/smartmontools/patches/002-os_mailer-is-mailx.patch delete mode 100644 utils/squashfs-tools/patches/0003-mksquashfs.c-get-inline-functions-work-with-C99.patch delete mode 100644 utils/squashfs-tools/patches/0004-vla-to-malloc.patch delete mode 100644 utils/squashfs-tools/patches/0005-mksquashfs-unsquashfs-fix-compilation-with-glibc-2.2.patch create mode 100644 utils/squashfs-tools/patches/010-gcc10.patch create mode 100644 utils/ssdeep/Makefile create mode 100644 utils/sshpass/Makefile create mode 100644 utils/sumo/patches/010-usleep.patch create mode 100644 utils/sumo/patches/020-strerror.patch delete mode 100644 utils/sumo/patches/100-configure_fix.patch delete mode 100644 utils/swig/patches/0001-Add-Node-7.x-aka-V8-5.2-support.patch create mode 100644 utils/syncthing/Makefile create mode 100644 utils/syncthing/files/etc/config/syncthing create mode 100755 utils/syncthing/files/etc/init.d/syncthing create mode 100644 utils/syncthing/files/etc/sysctl.d/90-syncthing-inotify.conf delete mode 100644 utils/sysstat/patches/100-musl-compat.patch delete mode 100644 utils/sysstat/patches/110-remove-sccsid.patch create mode 100644 utils/tang/Makefile create mode 100755 utils/tang/files/tangdw create mode 100644 utils/tang/files/tangdx create mode 100644 utils/tang/patches/010-makefile.patch create mode 100644 utils/tang/patches/020-no-systemd.patch create mode 100644 utils/tang/patches/030-readlink.patch create mode 100644 utils/tcsh/patches/010-wint.patch create mode 100644 utils/tcsh/patches/020-cross.patch create mode 100644 utils/tcsh/patches/030-gcc10.patch create mode 100644 utils/telldus-core/Makefile create mode 100644 utils/telldus-core/files/telldusd create mode 100644 utils/telldus-core/files/tellstick.conf create mode 100644 utils/telldus-core/patches/100-add_includes.patch create mode 100644 utils/telldus-core/patches/110-fix_warnings.patch create mode 100644 utils/telldus-core/patches/120-fix_missing_var_conf.patch create mode 100644 utils/telldus-core/patches/900-openwrt_fixes_cmake.patch create mode 100644 utils/telldus-core/patches/920-openwrt_missing_var_conf.patch create mode 100644 utils/telldus-core/patches/930-usleep.patch create mode 100644 utils/telldus-core/patches/940-cxx11.patch create mode 100644 utils/telldus-core/patches/950-pthread.patch create mode 100644 utils/telldus-core/patches/960-time.patch create mode 100644 utils/temperusb/Makefile create mode 100644 utils/tessdata/Makefile create mode 100644 utils/tesseract/Makefile create mode 100644 utils/unzip/patches/011-CVE-2018-1000035-overflow-password-protect.patch create mode 100644 utils/usbmuxd/files/usbmuxd.init create mode 100644 utils/usbmuxd/patches/010-config.patch create mode 100644 utils/uvcdynctrl/patches/010-iconv.patch create mode 100644 utils/vim/patches/003-CVE-2019-12735.patch create mode 100755 utils/vim/scripts/uname create mode 100644 utils/which/Makefile create mode 100644 utils/wipe/Makefile create mode 100644 utils/wipe/patches/001-ignore_git_version_hash_and_fix_release_version.patch create mode 100644 utils/xfsprogs/Makefile create mode 100644 utils/xfsprogs/patches/110-subdirs.patch create mode 100644 utils/xfsprogs/patches/120-disable_assert.patch create mode 100644 utils/xfsprogs/patches/130-db-malloc-Use-posix_memalign-instead-of-deprecated-v.patch create mode 100644 utils/xfsprogs/patches/140-mman.patch create mode 100644 utils/xz/patches/001-relative-pkg-config-paths.patch create mode 100644 utils/ykclient/Makefile create mode 100644 utils/ykpers/Makefile create mode 100644 utils/ykpers/patches/010-gcc10.patch create mode 100644 utils/ykpers/patches/020-json-c-0.14.patch delete mode 100644 utils/yunbridge/Makefile delete mode 100644 utils/yunbridge/files/etc/config/yunbridge delete mode 100755 utils/yunbridge/files/etc/init.d/yunbridge delete mode 100755 utils/yunbridge/files/sbin/yunbridge delete mode 100755 utils/yunbridge/files/usr/bin/pretty-wifi-info.lua delete mode 100644 utils/yunbridge/files/usr/lib/lua/luci/controller/arduino/index.lua delete mode 100644 utils/yunbridge/files/usr/lib/lua/luci/sha256.lua delete mode 100644 utils/yunbridge/patches/000-scripts.patch delete mode 100644 utils/zip/Makefile delete mode 100644 utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch delete mode 100644 utils/zip/patches/010-remove-build-date.patch create mode 100644 utils/zstd/patches/010-python.patch diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4cfaef15..0e4b4ce6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,35 +1,48 @@ # Contributing Guidelines -(See for overall format and construction) +Ref: for overall format and construction ### Basic guidelines All packages you commit or submit by pull-request should follow these simple guidelines: -* Package a version which is still maintained by the upstream author. -* Will be updated regularly to maintained and supported versions. + +* Package a version which is still maintained by the upstream author and will be updated regularly with supported versions. * Have no dependencies outside the OpenWrt core packages or this repository feed. * Have been tested to compile with the correct includes and dependencies. Please also test with "Compile with full language support" found under "General Build Settings" set if language support is relevant to your package. -* Do NOT use a rolling source file (e.g. foo-latest.tar.gz) or the head of a branch as source for the package since that would create unpredictable builds which change over time. * Best of all -- it works as expected! +### Package Sources (archives and repositories) + +* PKG_SOURCE should reference the smallest available archive. In order of preference: xz (most compressed), bzip2, gz and zip. As a last resort, downloads from source repositories can be used. +* PKG_SOURCE_URL should link to an official release archive. Use of HTTPS: is preferred. If a source archive is not available, a locally generated archive fetched using git, svn, cvs or in rare circumstances, hg or bzr. +* Convenience macros for popular mirrors are defined. Using these macros will make your package downloads more robust by mapping to a list of possible source mirrors for archive availability. + - @SF - Sourceforge (downloads.sourceforge.net) with 5 retries due to re-directs + - @GITHUB - Github (raw.githubusercontent.com) with 5 retries due to re-directs + - @GNU - 8 regional servers + - @GNOME - 8 regional servers + - @SAVANNAH - 8 regional servers + - @APACHE - 8 regional servers + - @KERNEL - Linux kernel archives & mirrors +* Please *DO NOT* use an archive which changes over time. A version labeled "latest" is not constant each download. Also, using the head of a branch will create unpredictable results which can be different each build. + #### Makefile contents should contain: -* An up-to-date copyright notice. Use OpenWrt if no other present or supply your own. -* A (PKG_)MAINTAINER definition listing either yourself or another person in the field. - (E.g.: PKG_MAINTAINER:= Joe D. Hacker `) +* Provide an up-to-date Copyright notice or **none**. Copyright should not be assigned to OpenWrt unless you are explicitly requested by or working under contract to OpenWrt. Assigning a Copyright to yourself or organization you represent is acceptable. +* A (PKG_)MAINTAINER definition listing either yourself and/or another person responsible for this package (E.g.: PKG_MAINTAINER:= Joe D. Hacker `). Listing multiple maintainers is encouraged in order to keep the package active and up-to-date. Leaving this blank will also be accepted, however the review process may not be as quick as one with a maintainer. * A PKG_LICENSE tag declaring the main license of the package. - (E.g.: PKG_LICENSE:=GPL-2.0+) Please use SPDX identifiers if possible (see list at the bottom). + (E.g.: PKG_LICENSE:=GPL-2.0-or-later) Please use SPDX identifiers if possible (see list at the bottom). * An optional PKG_LICENSE_FILES tag including the filenames of the license-files in the source-package. (E.g.: PKG_LICENSE_FILES:=COPYING) * PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE. * Avoid reuse of PKG_NAME in call, define and eval lines to improve readability. + #### Commits in your pull-requests should: * Have a useful description prefixed with the package name (E.g.: "foopkg: Add libzot dependency") -* Include Signed-off-by in the comment - (See ) +* Include Signed-off-by tag in the commit comments. + See: [Sign your work](https://openwrt.org/submitting-patches#sign_your_work) ### Advice on pull requests: @@ -74,7 +87,7 @@ Pull requests are the easiest way to contribute changes to git repos at Github. * If you are unsure if your change is suitable, please use a pull request. ### Common LICENSE tags (short list) -(Complete list can be found at: ) +(Complete list can be found at: ) | Full Name | Identifier | |---|:---| @@ -82,30 +95,30 @@ Pull requests are the easiest way to contribute changes to git repos at Github. |Apache License 1.1|Apache-1.1| |Apache License 2.0|Apache-2.0| |Artistic License 1.0|Artistic-1.0| -|Artistic License 1.0 (Perl)|Artistic-1.0-Perl| |Artistic License 1.0 w/clause 8|Artistic-1.0-cl8| +|Artistic License 1.0 (Perl)|Artistic-1.0-Perl| |Artistic License 2.0|Artistic-2.0| -|BSD 2-clause "Simplified" License|BSD-2-Clause| -|BSD 2-clause FreeBSD License|BSD-2-Clause-FreeBSD| -|BSD 2-clause NetBSD License|BSD-2-Clause-NetBSD| -|BSD 3-clause "New" or "Revised" License|BSD-3-Clause| -|BSD 3-clause Clear License|BSD-3-Clause-Clear| -|BSD 4-clause "Original" or "Old" License|BSD-4-Clause| -|BSD Protection License|BSD-Protection| +|BSD 2-Clause "Simplified" License|BSD-2-Clause| +|BSD 2-Clause FreeBSD License|BSD-2-Clause-FreeBSD| +|BSD 2-Clause NetBSD License|BSD-2-Clause-NetBSD| +|BSD 3-Clause "New" or "Revised" License|BSD-3-Clause| |BSD with attribution|BSD-3-Clause-Attribution| +|BSD 3-Clause Clear License|BSD-3-Clause-Clear| +|BSD 4-Clause "Original" or "Old" License|BSD-4-Clause| |BSD-4-Clause (University of California-Specific)|BSD-4-Clause-UC| -|GNU General Public License v1.0 only|GPL-1.0| -|GNU General Public License v1.0 or later|GPL-1.0+| -|GNU General Public License v2.0 only|GPL-2.0| -|GNU General Public License v2.0 or later|GPL-2.0+| -|GNU General Public License v3.0 only|GPL-3.0| -|GNU General Public License v3.0 or later|GPL-3.0+| -|GNU Lesser General Public License v2.1 only|LGPL-2.1| -|GNU Lesser General Public License v2.1 or later|LGPL-2.1+| -|GNU Lesser General Public License v3.0 only|LGPL-3.0| -|GNU Lesser General Public License v3.0 or later|LGPL-3.0+| -|GNU Library General Public License v2 only|LGPL-2.0| -|GNU Library General Public License v2 or later|LGPL-2.0+| +|BSD Protection License|BSD-Protection| +|GNU General Public License v1.0 only|GPL-1.0-only| +|GNU General Public License v1.0 or later|GPL-1.0-or-later| +|GNU General Public License v2.0 only|GPL-2.0-only| +|GNU General Public License v2.0 or later|GPL-2.0-or-later| +|GNU General Public License v3.0 only|GPL-3.0-only| +|GNU General Public License v3.0 or later|GPL-3.0-or-later| +|GNU Lesser General Public License v2.1 only|LGPL-2.1-only| +|GNU Lesser General Public License v2.1 or later|LGPL-2.1-or-later| +|GNU Lesser General Public License v3.0 only|LGPL-3.0-only| +|GNU Lesser General Public License v3.0 or later|LGPL-3.0-or-later| +|GNU Library General Public License v2 only|LGPL-2.0-only| +|GNU Library General Public License v2 or later|LGPL-2.0-or-later| |Fair License|Fair| |ISC License|ISC| |MIT License|MIT| diff --git a/README.md b/README.md index d908a86a..4b8b9e94 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt. -Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](http://wiki.openwrt.org/doc/howto/obtain.firmware.sdk) on a build system. +Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](https://openwrt.org/docs/guide-developer/using_the_sdk) on a build system. ## Usage -This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](http://wiki.openwrt.org/doc/howto/buildroot.exigence) on the OpenWrt support site. +This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) on the OpenWrt support site. This feed is enabled by default. To install all its package definitions, run: ``` diff --git a/admin/atop/Makefile b/admin/atop/Makefile new file mode 100644 index 00000000..4c3b4ff4 --- /dev/null +++ b/admin/atop/Makefile @@ -0,0 +1,53 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=atop +PKG_RELEASE:=1 +PKG_VERSION:=2.5.0 +PKG_LICENSE:=GPL-2.0-or-later +PKG_SOURCE_URL:=https://www.atoptool.nl/download/ +PKG_HASH:=4b911057ce50463b6e8b3016c5963d48535c0cddeebc6eda817e292b22f93f33 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MAINTAINER:=Toni Uhlig + +include $(INCLUDE_DIR)/package.mk + +define Package/atop + SECTION:=admin + CATEGORY:=Administration + TITLE:=System and process monitor for Linux + DEPENDS:=+zlib +libncurses + URL:=https://www.atoptool.nl/ + MAINTAINER:=Toni Uhlig +endef + +define Package/atop/description + Atop is an ASCII full-screen performance monitor for + Linux that is capable of reporting the activity of all + processes (even if processes have finished during the + interval), daily logging of system and process activity + for long-term analysis, highlighting overloaded system + resources by using colors, etcetera. At regular + intervals, it shows system-level activity related to the + CPU, memory, swap, disks (including LVM) and network + layers, and for every process (and thread) it shows e.g. + the CPU utilization, memory growth, disk utilization, + priority, username, state, and exit code. In combination + with the optional kernel module netatop, it even shows + network activity per process/thread. +endef + +MAKE_FLAGS += \ + CFLAGS+="-Wno-misleading-indentation -Wno-unused-const-variable -Wno-format-truncation" + +define Package/atop/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/atop $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,atop)) diff --git a/admin/atop/patches/010-makefile-missing-cflags.patch b/admin/atop/patches/010-makefile-missing-cflags.patch new file mode 100644 index 00000000..6754ff77 --- /dev/null +++ b/admin/atop/patches/010-makefile-missing-cflags.patch @@ -0,0 +1,22 @@ +diff --git a/Makefile b/Makefile +index 3bf5929..e065577 100644 +--- a/Makefile ++++ b/Makefile +@@ -32,7 +32,7 @@ VERS = $(shell ./atop -V 2>/dev/null| sed -e 's/^[^ ]* //' -e 's/ .*//') + all: atop atopsar atopacctd atopconvert + + atop: atop.o $(ALLMODS) Makefile +- $(CC) -c version.c ++ $(CC) $(CFLAGS) -c version.c + $(CC) atop.o $(ALLMODS) -o atop -lncurses -lz -lm -lrt $(LDFLAGS) + + atopsar: atop +@@ -45,7 +45,7 @@ atopconvert: atopconvert.o + $(CC) atopconvert.o -o atopconvert -lz $(LDFLAGS) + + netlink.o: netlink.c +- $(CC) -I. -Wall -c netlink.c ++ $(CC) $(CFLAGS) -I. -Wall -c netlink.c + + clean: + rm -f *.o atop atopacctd atopconvert diff --git a/admin/backuppc/Makefile b/admin/backuppc/Makefile new file mode 100644 index 00000000..431e34bb --- /dev/null +++ b/admin/backuppc/Makefile @@ -0,0 +1,68 @@ +# Copyright (C) 2018 OpenWrt +# +# Ideas used from the backuppc packaging in Debian GNU/Linux +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=backuppc +PKG_VERSION:=3.3.2 +PKG_RELEASE:=3 + +PKG_SOURCE:=BackupPC-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/backuppc +PKG_HASH:=fbade2c8d8039297e826a75d2c39d5ac9a6f66e0c84c0cf8c4cef0bcf64d2152 +PKG_BUILD_DIR:=$(BUILD_DIR)/BackupPC-$(PKG_VERSION) + +PKG_MAINTAINER:=Carsten Wolff +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/backuppc + SECTION:=admin + CATEGORY:=Administration + TITLE:=high-performance, enterprise-grade system for backing up PCs + URL:=https://sourceforge.net/projects/backuppc/ + DEPENDS:=+perl +perl-www +perl-cgi +perlbase-digest +perlbase-compress +perlbase-archive +perlbase-data +perlbase-storable +perlbase-getopt +perl-file-rsyncp +openssh-client +tar +bzip2 +samba4-client +rsync +iputils-ping +endef + +define Package/backuppc/description + BackupPC is a disk based backup system featuring a clever pooling scheme and + compression to minimize disk storage and disk I/O. It can use SMB, rsync or tar + to access the clients without any additional client software and offers a + powerful http/cgi user interface. +endef + +define Build/Configure + true +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -Wall -o $(PKG_BUILD_DIR)/BackupPC_Admin ./files/setuidwrapper.c +endef + +define Package/backuppc/install + $(INSTALL_DIR) $(strip $(1))/etc/init.d + $(INSTALL_BIN) ./files/backuppc.init $(strip $(1))/etc/init.d/backuppc + cd $(PKG_BUILD_DIR) && ./configure.pl --batch --html-dir-url=/backuppc/ \ + --html-dir=/www/backuppc/ --cgi-dir=/www/cgi-bin/ --no-fhs --uid-ignore \ + --dest-dir=$(strip $(1)) --install-dir /usr/share/backuppc \ + --hostname=XXXXXX --data-dir=/data/backuppc --log-dir=/data/backuppc/log \ + --bin-path perl=/usr/bin/perl --bin-path tar=/bin/tar \ + --bin-path smbclient=/usr/sbin/smbclient --bin-path nmblookup=/usr/sbin/nmblookup \ + --bin-path rsync=/usr/bin/rsync --bin-path ping=/usr/bin/ping --bin-path df=/bin/df \ + --bin-path ssh=/usr/bin/ssh --bin-path gzip=/bin/gzip \ + --bin-path sendmail=/usr/sbin/sendmail --bin-path bzip2=/usr/bin/bzip2 + $(INSTALL_DIR) $(strip $(1))/usr/share/backuppc/conf + chmod 755 $(strip $(1))/data + mv $(strip $(1))/data/backuppc/conf/config.pl $(strip $(1))/usr/share/backuppc/conf/config.pl + patch --no-backup-if-mismatch $(strip $(1))/usr/share/backuppc/conf/config.pl ./files/fixup-config-pl.patch + mv $(strip $(1))/www/cgi-bin/BackupPC_Admin $(strip $(1))/usr/share/backuppc/bin/BackupPC_Admin_real + $(INSTALL_BIN) $(PKG_BUILD_DIR)/BackupPC_Admin $(strip $(1))/www/cgi-bin/BackupPC_Admin + $(INSTALL_DIR) $(strip $(1))/lib/upgrade/keep.d + $(INSTALL_DATA) files/backuppc.upgrade $(strip $(1))/lib/upgrade/keep.d/backuppc +endef + +$(eval $(call BuildPackage,backuppc)) diff --git a/admin/backuppc/files/backuppc.init b/admin/backuppc/files/backuppc.init new file mode 100644 index 00000000..d8aaa377 --- /dev/null +++ b/admin/backuppc/files/backuppc.init @@ -0,0 +1,66 @@ +#!/bin/sh /etc/rc.common + +. /lib/functions.sh + +START=95 +STOP=10 + +USE_PROCD=1 +BACKUPPC_BIN="/usr/share/backuppc/bin/BackupPC" +BACKUPPC_USER=backuppc + +# it would be better if it was possible to do this at install time, but we +# can't, because in case of an openwrt image bundled with backuppc, all +# ownerships other than root are lost. +preconfigure() { + # create backuppc group and user if needed + if ! group_exists backuppc; then + group_add backuppc 864 + fi + if ! user_exists backuppc; then + user_add backuppc 864 864 "BackupPC user" /data/backuppc /bin/sh + fi + # install default config if none exists, yet + if [ ! -e /data/backuppc/conf/config.pl ]; then + cp /usr/share/backuppc/conf/config.pl /data/backuppc/conf/config.pl + fi + # ensure proper ownerships and rights + chown backuppc:backuppc /data/backuppc /data/backuppc/* \ + /www/cgi-bin/BackupPC_Admin + chmod 750 /data/backuppc /data/backuppc/* + chmod 755 /usr/share/backuppc/bin/BackupPC_Admin_real + # The CGI needs to be world-executable, because uhttpd-cgi.c:386 checks + # for exactly that. We don't want that, but can't avoid it, currently. + chmod 6751 /www/cgi-bin/BackupPC_Admin + chown -R :backuppc /data/backuppc/conf + chmod 2770 /data/backuppc/conf + # protect webinterface with a random password by default + if [ -x /usr/sbin/uhttpd ] && ! grep -q backuppc /etc/httpd.conf >/dev/null 2>&1; then + PASS=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..8)') + PASSHASH=$(/usr/sbin/uhttpd -m "${PASS}") + echo "/cgi-bin/BackupPC_Admin:backuppc:${PASSHASH}" >> /etc/httpd.conf + uci set uhttpd.main.config=/etc/httpd.conf + /etc/init.d/uhttpd restart + # inform user + echo + echo "To protect access to the backuppc web interface, HTTP basic authentication in" + echo "uhttpd for http://$(/sbin/uci get "system.@system[0].hostname")/cgi-bin/BackupPC_Admin has been configured:" + echo "user: backuppc" + echo "pass: ${PASS}" + echo + echo "It is also recommended to follow the steps in" + echo "https://openwrt.org/docs/guide-user/services/webserver/uhttpd#securing_uhttpd" + echo "to secure access to uhttpd." + fi +} + +start_service() { + # don't run preconfigure steps if called during image build + if [ -z "${IPKG_INSTROOT}" ]; then + preconfigure + fi + procd_open_instance + procd_set_param user $BACKUPPC_USER + procd_set_param reload_signal 1 + procd_set_param command $BACKUPPC_BIN +} diff --git a/admin/backuppc/files/backuppc.upgrade b/admin/backuppc/files/backuppc.upgrade new file mode 100644 index 00000000..aaf016f5 --- /dev/null +++ b/admin/backuppc/files/backuppc.upgrade @@ -0,0 +1,2 @@ +/etc/httpd.conf +/data/backuppc/conf/ diff --git a/admin/backuppc/files/fixup-config-pl.patch b/admin/backuppc/files/fixup-config-pl.patch new file mode 100644 index 00000000..2fa567c6 --- /dev/null +++ b/admin/backuppc/files/fixup-config-pl.patch @@ -0,0 +1,67 @@ +--- config.pl 2018-03-11 09:30:28.000000000 +0100 ++++ config.pl.new 2018-04-05 08:40:29.180000000 +0200 +@@ -41,7 +41,10 @@ + # + # Host name on which the BackupPC server is running. + # +-$Conf{ServerHost} = 'XXXXXX'; ++$ENV{'PATH'} = '/bin:/usr/bin'; ++delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ++$Conf{ServerHost} = $ENV{'HOSTNAME'}; ++chomp($Conf{ServerHost}); + + # + # TCP port number on which the BackupPC server listens for and accepts +@@ -223,7 +226,7 @@ + # + # Full path to various commands for archiving + # +-$Conf{SplitPath} = '/usr/bin/split'; ++$Conf{SplitPath} = '/usr/bin/split' if ( -x '/usr/bin/split' ); + $Conf{ParPath} = ''; + $Conf{CatPath} = '/bin/cat'; + $Conf{GzipPath} = '/bin/gzip'; +@@ -1572,7 +1575,7 @@ + # Full path for ssh. Security caution: normal users should not + # allowed to write to this file or directory. + # +-$Conf{SshPath} = '/usr/bin/ssh'; ++$Conf{SshPath} = '/usr/bin/ssh' if ( -x '/usr/bin/ssh' ); + + # + # Full path for nmblookup. Security caution: normal users should not +@@ -1874,7 +1877,7 @@ + # Full path to the sendmail command. Security caution: normal users + # should not allowed to write to this file or directory. + # +-$Conf{SendmailPath} = '/usr/sbin/sendmail'; ++$Conf{SendmailPath} = '/usr/sbin/sendmail' if ( -x '/usr/sbin/sendmail' ); + + # + # Minimum period between consecutive emails to a single user. +@@ -2028,13 +2031,13 @@ + # $Conf{CgiAdminUsers} = 'craig celia'; + # --> administrative users are only craig and celia'. + # +-$Conf{CgiAdminUserGroup} = ''; +-$Conf{CgiAdminUsers} = ''; ++$Conf{CgiAdminUserGroup} = 'backuppc'; ++$Conf{CgiAdminUsers} = 'backuppc'; + + # + # URL of the BackupPC_Admin CGI script. Used for email messages. + # +-$Conf{CgiURL} = 'http://XXXXXX/cgi-bin//BackupPC_Admin'; ++$Conf{CgiURL} = 'http://' . $Conf{ServerHost} . '/cgi-bin//BackupPC_Admin'; + + # + # Language to use. See lib/BackupPC/Lang for the list of supported +@@ -2076,7 +2079,7 @@ + # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero + # for international dates (DD/MM). + # +-$Conf{CgiDateFormatMMDD} = 1; ++$Conf{CgiDateFormatMMDD} = 2; + + # + # If set, the complete list of hosts appears in the left navigation diff --git a/admin/backuppc/files/setuidwrapper.c b/admin/backuppc/files/setuidwrapper.c new file mode 100644 index 00000000..b4496ffd --- /dev/null +++ b/admin/backuppc/files/setuidwrapper.c @@ -0,0 +1,8 @@ +#include + +int main(int argc, char* argv[]) +{ + execv("/usr/share/backuppc/bin/BackupPC_Admin_real", argv); + return 0; +} + diff --git a/admin/backuppc/patches/001-debian-fixes.patch b/admin/backuppc/patches/001-debian-fixes.patch new file mode 100644 index 00000000..37017557 --- /dev/null +++ b/admin/backuppc/patches/001-debian-fixes.patch @@ -0,0 +1,99 @@ +--- a/bin/BackupPC_archive 2017-01-26 02:31:24.000000000 +0100 ++++ b/bin/BackupPC_archive 2018-04-05 21:11:14.428000000 +0200 +@@ -299,7 +299,7 @@ + if ( $NeedPostCmd ) { + UserCommandRun("ArchivePostUserCmd"); + if ( $? && $Conf{UserCmdCheckStatus} ) { +- $stat{hostError} = "RestorePreUserCmd returned error status $?"; ++ $stat{hostError} = "ArchivePostUserCmd returned error status $?"; + $stat{xferOK} = 0; + } + } +--- a/bin/BackupPC_dump 2017-01-26 02:31:24.000000000 +0100 ++++ b/bin/BackupPC_dump 2018-04-05 21:12:23.640000000 +0200 +@@ -1067,7 +1067,7 @@ + # Send ALRMs to BackupPC_tarExtract if we are using it + # + if ( $tarPid > 0 ) { +- kill($bpc->sigName2num("ARLM"), $tarPid); ++ kill($bpc->sigName2num("ALRM"), $tarPid); + } + + # +--- a/configure.pl 2017-01-26 02:31:24.000000000 +0100 ++++ b/configure.pl 2018-04-05 21:39:24.668000000 +0200 +@@ -333,7 +333,10 @@ + $Conf{BackupPCUser} || "backuppc", + "backuppc-user"); + if ( $opts{"set-perms"} ) { +- ($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser}); ++ #($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser}); ++ $name = 'backuppc'; ++ $Uid=`id -u`; ++ $Gid=`id -g`; + last if ( $name ne "" ); + print </ ++ || $s =~ /^tar:\d+\s/ ++ || $s =~ /^ NTLMSSP_/ ++ || $s =~ /^GENSEC backend / ++ || $s =~ /^doing parameter / + || $s =~ /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/ + || $s =~ /^tar: dumped \d+ files/ + || $s =~ /^\s*added interface/i +--- a/lib/BackupPC/Lib.pm 2017-01-26 02:31:24.000000000 +0100 ++++ b/lib/BackupPC/Lib.pm 2018-04-05 21:48:38.048000000 +0200 +@@ -512,7 +512,8 @@ + } + if ( $IODirentOk ) { + @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh)); +- map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric ++ #map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric ++ map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries; # make type numeric, unset unknown types + } else { + @entries = map { { name => $_} } readdir($fh); + } +--- a/lib/BackupPC/Xfer/Smb.pm 2017-01-26 02:31:24.000000000 +0100 ++++ b/lib/BackupPC/Xfer/Smb.pm 2018-04-05 21:57:16.616000000 +0200 +@@ -219,7 +219,7 @@ + # + # MAKSYM 14082016: The next regex will never match on Samba-4.3, as + # smbclient doesn't produce output required; keeping it for older Sambas +- if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) { ++ if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) { + my $sambaFileSize = $1; + my $pcFileName = $2; + (my $fileName = $pcFileName) =~ s/\\/\//g; +@@ -281,6 +281,9 @@ + } elsif ( /smb: \\>/ + || /^\s*tar:\d+/ # MAKSYM 14082016: ignoring 2 more Samba-4.3 specific lines + || /^\s*WARNING:/i ++ || /^ NTLMSSP_/ ++ || /^GENSEC backend / ++ || /^doing parameter / + || /^\s*added interface/i + || /^\s*tarmode is now/i + || /^\s*Total bytes written/i diff --git a/admin/debootstrap/Makefile b/admin/debootstrap/Makefile index f16cab3f..cf29b284 100644 --- a/admin/debootstrap/Makefile +++ b/admin/debootstrap/Makefile @@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=debootstrap -PKG_VERSION:=1.0.92 +PKG_VERSION:=1.0.119~bpo10+1 PKG_RELEASE:=1 -PKG_MAINTAINER:=Daniel Golle PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap -PKG_HASH:=fa58c00529912d2cc187aa5434962376bd5ec00d3e7e9693f505a27b8848fdcf +PKG_HASH:=b48aeb76533f233ac45c8b5ddd452550b3998e67e32dba4137f320a1a7b3519e + +PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=Unique PKG_LICENSE_FILES:=debian/copyright @@ -27,8 +28,8 @@ define Package/debootstrap SECTION:=admin CATEGORY:=Administration TITLE:=Bootstrap a basic Debian system - URL:=http://wiki.debian.org/Debootstrap - DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz + URL:=https://wiki.debian.org/Debootstrap + DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz-utils +xz endef define Package/debootstrap/description diff --git a/admin/debootstrap/files/pkgdetails.c b/admin/debootstrap/files/pkgdetails.c index 99ee1900..7de6731d 100644 --- a/admin/debootstrap/files/pkgdetails.c +++ b/admin/debootstrap/files/pkgdetails.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include #include #include diff --git a/admin/debootstrap/patches/010-no-nvswitch.patch b/admin/debootstrap/patches/010-no-nvswitch.patch new file mode 100644 index 00000000..d288dccb --- /dev/null +++ b/admin/debootstrap/patches/010-no-nvswitch.patch @@ -0,0 +1,10 @@ +--- a/usr/share/debootstrap/functions ++++ b/usr/share/debootstrap/functions +@@ -77,7 +77,6 @@ progress_next () { + } + + wgetprogress () { +- [ ! "$VERBOSE" ] && NVSWITCH="-nv" + local ret=0 + if [ "$USE_DEBIANINSTALLER_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then + # The exit status of a pipeline is that of the last command in diff --git a/admin/gkrellmd/Makefile b/admin/gkrellmd/Makefile new file mode 100644 index 00000000..dbccd784 --- /dev/null +++ b/admin/gkrellmd/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2007-2018 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gkrellmd +PKG_VERSION:=2.3.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=gkrellm-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://gkrellm.srcbox.net/releases +PKG_HASH:=1ee0643ed9ed99f88c1504c89d9ccb20780cf29319c904b68e80a8e7c8678c06 +PKG_BUILD_DIR:=$(BUILD_DIR)/gkrellm-$(PKG_VERSION) + +PKG_MAINTAINER:=Peter Denison +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/gkrellmd + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+glib2 + TITLE:=The GNU Krell Monitors Server + URL:=http://gkrellm.net/ +endef + +define Package/gkrellmd/description + Gkrellmd listens for connections from gkrellm clients. When + a gkrellm client connects to a gkrellmd server all builtin + monitors collect their data from the server. +endef + +define Package/gkrellmd/conffiles +/etc/$(PKG_NAME).conf +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/server \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) " \ + without-libsensors="yes" +endef + +define Package/gkrellmd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,gkrellmd)) diff --git a/admin/gkrellmd/files/gkrellmd.init b/admin/gkrellmd/files/gkrellmd.init new file mode 100644 index 00000000..5bd88a94 --- /dev/null +++ b/admin/gkrellmd/files/gkrellmd.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org + +START=60 +BIN=gkrellmd +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} diff --git a/admin/gkrellmd/patches/100-conf.patch b/admin/gkrellmd/patches/100-conf.patch new file mode 100644 index 00000000..c4b9ea20 --- /dev/null +++ b/admin/gkrellmd/patches/100-conf.patch @@ -0,0 +1,35 @@ +Index: gkrellm-2.3.10/server/gkrellmd.conf +=================================================================== +--- gkrellm-2.3.10.orig/server/gkrellmd.conf 2008-03-09 10:19:26.000000000 +0100 ++++ gkrellm-2.3.10/server/gkrellmd.conf 2008-03-09 10:19:26.000000000 +0100 +@@ -4,7 +4,7 @@ + # the client update frequency. Values may be from 1 to 10 and should be + # smaller values to reduce network traffic. + # +-#update-hz 3 ++update-hz 10 + + # Limit number of simultaneous clients allowed to connect. + # +@@ -30,18 +30,18 @@ + # Drop privileges after startup (you must start gkrellmd as root to do it). + # NOTE: Option ignored on Windows + # +-#user nobody ++user nobody + #group proc + + # Create a PID file for the running gkrellmd. Default is no PID file. + # NOTE: Option ignored on Windows + # +-#pidfile /var/run/gkrellmd.pid ++pidfile /var/run/gkrellmd.pid + + # Run in background and detach from the controlling terminal + # NOTE: Option ignored on Windows + # +-#detach ++detach + + # Time interval between checks for various monitors. If nfs-interval + # is <= 0 then gkrellmd will not read data for nfs file system types. diff --git a/admin/htop/Makefile b/admin/htop/Makefile index 1d6a2dc4..3e3d9f64 100644 --- a/admin/htop/Makefile +++ b/admin/htop/Makefile @@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=htop PKG_VERSION:=2.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://hisham.hm/htop/releases/$(PKG_VERSION)/ +PKG_SOURCE_URL:=https://hisham.hm/htop/releases/$(PKG_VERSION)/ PKG_HASH:=d9d6826f10ce3887950d709b53ee1d8c1849a70fa38e91d5896ad8cbc6ba3c57 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:htop:htop -PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -28,7 +29,7 @@ define Package/htop CATEGORY:=Administration TITLE:=Interactive processes viewer DEPENDS:=+libncurses - URL:=http://htop.sourceforge.net/ + URL:=https://hisham.hm/htop/ MAINTAINER:=Etienne CHAMPETIER endef diff --git a/admin/ipmitool/Makefile b/admin/ipmitool/Makefile index 6c7ead7e..898e2e6c 100644 --- a/admin/ipmitool/Makefile +++ b/admin/ipmitool/Makefile @@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ipmitool PKG_VERSION:=1.8.18 -PKG_RELEASE:=1 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_HASH:=0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01 PKG_LICENSE:=BSD-3-clause PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:ipmitool_project:ipmitool include $(INCLUDE_DIR)/package.mk @@ -24,7 +25,7 @@ define Package/ipmitool CATEGORY:=Administration DEPENDS:=+libopenssl +libncurses +libreadline TITLE:=Command-line interface to IPMI-enabled devices - URL:=http://sourceforge.net/projects/ipmitool/ + URL:=https://github.com/ipmitool/ipmitool MAINTAINER:=Alexander Couzens endef diff --git a/admin/ipmitool/patches/0001-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch b/admin/ipmitool/patches/0001-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch new file mode 100644 index 00000000..30948775 --- /dev/null +++ b/admin/ipmitool/patches/0001-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch @@ -0,0 +1,104 @@ +From b57487e360916ab3eaa50aa6d021c73b6337a4a0 Mon Sep 17 00:00:00 2001 +From: Dennis Schridde +Date: Wed, 30 Nov 2016 17:33:00 +0100 +Subject: [PATCH 1/4] ID:461 - OpenSSL 1.1 compatibility - "error: storage size + of 'ctx' isn't known" + +In OpenSSL 1.1 EVP_CIPHER_CTX became opaque, cf. `man 3ssl EVP_EncryptInit` + +Fixes: ID:461 +--- + src/plugins/lanplus/lanplus_crypt_impl.c | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c +index d5fac37..3c0df23 100644 +--- a/src/plugins/lanplus/lanplus_crypt_impl.c ++++ b/src/plugins/lanplus/lanplus_crypt_impl.c +@@ -164,10 +164,10 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + uint8_t * output, + uint32_t * bytes_written) + { +- EVP_CIPHER_CTX ctx; +- EVP_CIPHER_CTX_init(&ctx); +- EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv); +- EVP_CIPHER_CTX_set_padding(&ctx, 0); ++ EVP_CIPHER_CTX* ctx; ++ EVP_CIPHER_CTX_init(ctx); ++ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); ++ EVP_CIPHER_CTX_set_padding(ctx, 0); + + + *bytes_written = 0; +@@ -191,7 +191,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0); + + +- if(!EVP_EncryptUpdate(&ctx, output, (int *)bytes_written, input, input_length)) ++ if(!EVP_EncryptUpdate(ctx, output, (int *)bytes_written, input, input_length)) + { + /* Error */ + *bytes_written = 0; +@@ -201,7 +201,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + { + uint32_t tmplen; + +- if(!EVP_EncryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen)) ++ if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) + { + *bytes_written = 0; + return; /* Error */ +@@ -210,7 +210,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + { + /* Success */ + *bytes_written += tmplen; +- EVP_CIPHER_CTX_cleanup(&ctx); ++ EVP_CIPHER_CTX_cleanup(ctx); + } + } + } +@@ -239,10 +239,10 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + uint8_t * output, + uint32_t * bytes_written) + { +- EVP_CIPHER_CTX ctx; +- EVP_CIPHER_CTX_init(&ctx); +- EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv); +- EVP_CIPHER_CTX_set_padding(&ctx, 0); ++ EVP_CIPHER_CTX* ctx; ++ EVP_CIPHER_CTX_init(ctx); ++ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); ++ EVP_CIPHER_CTX_set_padding(ctx, 0); + + + if (verbose >= 5) +@@ -266,7 +266,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0); + + +- if (!EVP_DecryptUpdate(&ctx, output, (int *)bytes_written, input, input_length)) ++ if (!EVP_DecryptUpdate(ctx, output, (int *)bytes_written, input, input_length)) + { + /* Error */ + lprintf(LOG_DEBUG, "ERROR: decrypt update failed"); +@@ -277,7 +277,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + { + uint32_t tmplen; + +- if (!EVP_DecryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen)) ++ if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) + { + char buffer[1000]; + ERR_error_string(ERR_get_error(), buffer); +@@ -290,7 +290,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + { + /* Success */ + *bytes_written += tmplen; +- EVP_CIPHER_CTX_cleanup(&ctx); ++ EVP_CIPHER_CTX_cleanup(ctx); + } + } + +-- +2.16.1 + diff --git a/admin/ipmitool/patches/0002-ID-461-Make-compiler-happier-about-changes-related-t.patch b/admin/ipmitool/patches/0002-ID-461-Make-compiler-happier-about-changes-related-t.patch new file mode 100644 index 00000000..cd4f7307 --- /dev/null +++ b/admin/ipmitool/patches/0002-ID-461-Make-compiler-happier-about-changes-related-t.patch @@ -0,0 +1,36 @@ +From 77fe5635037ebaf411cae46cf5045ca819b5c145 Mon Sep 17 00:00:00 2001 +From: Zdenek Styblik +Date: Sun, 15 Jan 2017 15:11:25 +0100 +Subject: [PATCH 2/4] ID:461 - Make compiler happier about changes related to + OpenSSL 1.1 + +Complaint was that ctx isn't initialized. +--- + src/plugins/lanplus/lanplus_crypt_impl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c +index 3c0df23..d12d0e3 100644 +--- a/src/plugins/lanplus/lanplus_crypt_impl.c ++++ b/src/plugins/lanplus/lanplus_crypt_impl.c +@@ -164,7 +164,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + uint8_t * output, + uint32_t * bytes_written) + { +- EVP_CIPHER_CTX* ctx; ++ EVP_CIPHER_CTX *ctx = NULL; + EVP_CIPHER_CTX_init(ctx); + EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); + EVP_CIPHER_CTX_set_padding(ctx, 0); +@@ -239,7 +239,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + uint8_t * output, + uint32_t * bytes_written) + { +- EVP_CIPHER_CTX* ctx; ++ EVP_CIPHER_CTX *ctx = NULL; + EVP_CIPHER_CTX_init(ctx); + EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); + EVP_CIPHER_CTX_set_padding(ctx, 0); +-- +2.16.1 + diff --git a/admin/ipmitool/patches/0003-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch b/admin/ipmitool/patches/0003-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch new file mode 100644 index 00000000..91aed82f --- /dev/null +++ b/admin/ipmitool/patches/0003-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch @@ -0,0 +1,53 @@ +From f004b4b7197fc83e7d47ec8cbcaefffa9a922717 Mon Sep 17 00:00:00 2001 +From: Zdenek Styblik +Date: Sun, 12 Mar 2017 14:00:35 +0100 +Subject: [PATCH 3/4] ID:480 - ipmitool coredumps in EVP_CIPHER_CTX_init + +IPMI tool coredumps due to changes introduced in ID:461. This shouldn't be +surprise as a NULL pointer is passed to init. Commit addresses this issue by +calling EVP_CIPHER_CTX_new() instead of EVP_CIPHER_CTX_init(), which is +deprecated, and by checking return value of call to former function. +--- + src/plugins/lanplus/lanplus_crypt_impl.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c +index d12d0e3..0e330c1 100644 +--- a/src/plugins/lanplus/lanplus_crypt_impl.c ++++ b/src/plugins/lanplus/lanplus_crypt_impl.c +@@ -165,10 +165,13 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + uint32_t * bytes_written) + { + EVP_CIPHER_CTX *ctx = NULL; +- EVP_CIPHER_CTX_init(ctx); ++ ctx = EVP_CIPHER_CTX_new(); ++ if (ctx == NULL) { ++ *bytes_written = 0; ++ return; ++ } + EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); + EVP_CIPHER_CTX_set_padding(ctx, 0); +- + + *bytes_written = 0; + +@@ -240,11 +243,14 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + uint32_t * bytes_written) + { + EVP_CIPHER_CTX *ctx = NULL; +- EVP_CIPHER_CTX_init(ctx); ++ ctx = EVP_CIPHER_CTX_new(); ++ if (ctx == NULL) { ++ *bytes_written = 0; ++ return; ++ } + EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); + EVP_CIPHER_CTX_set_padding(ctx, 0); + +- + if (verbose >= 5) + { + printbuf(iv, 16, "decrypting with this IV"); +-- +2.16.1 + diff --git a/admin/ipmitool/patches/0004-ID-480-Call-EVP_CIPHER_CTX_free-instead-of-EVP_CIPHE.patch b/admin/ipmitool/patches/0004-ID-480-Call-EVP_CIPHER_CTX_free-instead-of-EVP_CIPHE.patch new file mode 100644 index 00000000..65a40b02 --- /dev/null +++ b/admin/ipmitool/patches/0004-ID-480-Call-EVP_CIPHER_CTX_free-instead-of-EVP_CIPHE.patch @@ -0,0 +1,144 @@ +From 1664902525a1c3771b4d8b3ccab7ea1ba6b2bdd1 Mon Sep 17 00:00:00 2001 +From: Holger Liebig +Date: Tue, 4 Apr 2017 20:43:05 +0200 +Subject: [PATCH 4/4] ID:480 - Call EVP_CIPHER_CTX_free() instead of + EVP_CIPHER_CTX_cleanup() + +Call EVP_CIPHER_CTX_free() instead of EVP_CIPHER_CTX_cleanup() to fix memory +leak. +--- + src/plugins/lanplus/lanplus_crypt_impl.c | 44 +++++++++++++++++--------------- + 1 file changed, 23 insertions(+), 21 deletions(-) + +diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c +index 0e330c1..9652a5e 100644 +--- a/src/plugins/lanplus/lanplus_crypt_impl.c ++++ b/src/plugins/lanplus/lanplus_crypt_impl.c +@@ -165,13 +165,6 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + uint32_t * bytes_written) + { + EVP_CIPHER_CTX *ctx = NULL; +- ctx = EVP_CIPHER_CTX_new(); +- if (ctx == NULL) { +- *bytes_written = 0; +- return; +- } +- EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); +- EVP_CIPHER_CTX_set_padding(ctx, 0); + + *bytes_written = 0; + +@@ -185,6 +178,14 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + printbuf(input, input_length, "encrypting this data"); + } + ++ ctx = EVP_CIPHER_CTX_new(); ++ if (ctx == NULL) { ++ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed"); ++ return; ++ } ++ EVP_CIPHER_CTX_init(ctx); ++ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); ++ EVP_CIPHER_CTX_set_padding(ctx, 0); + + /* + * The default implementation adds a whole block of padding if the input +@@ -198,7 +199,6 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + { + /* Error */ + *bytes_written = 0; +- return; + } + else + { +@@ -206,16 +206,17 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + + if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) + { ++ /* Error */ + *bytes_written = 0; +- return; /* Error */ + } + else + { + /* Success */ + *bytes_written += tmplen; +- EVP_CIPHER_CTX_cleanup(ctx); + } + } ++ /* performs cleanup and free */ ++ EVP_CIPHER_CTX_free(ctx); + } + + +@@ -243,13 +244,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + uint32_t * bytes_written) + { + EVP_CIPHER_CTX *ctx = NULL; +- ctx = EVP_CIPHER_CTX_new(); +- if (ctx == NULL) { +- *bytes_written = 0; +- return; +- } +- EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); +- EVP_CIPHER_CTX_set_padding(ctx, 0); + + if (verbose >= 5) + { +@@ -258,12 +252,20 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + printbuf(input, input_length, "decrypting this data"); + } + +- + *bytes_written = 0; + + if (input_length == 0) + return; + ++ ctx = EVP_CIPHER_CTX_new(); ++ if (ctx == NULL) { ++ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed"); ++ return; ++ } ++ EVP_CIPHER_CTX_init(ctx); ++ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); ++ EVP_CIPHER_CTX_set_padding(ctx, 0); ++ + /* + * The default implementation adds a whole block of padding if the input + * data is perfectly aligned. We would like to keep that from happening. +@@ -277,7 +279,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + /* Error */ + lprintf(LOG_DEBUG, "ERROR: decrypt update failed"); + *bytes_written = 0; +- return; + } + else + { +@@ -285,20 +286,21 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + + if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) + { ++ /* Error */ + char buffer[1000]; + ERR_error_string(ERR_get_error(), buffer); + lprintf(LOG_DEBUG, "the ERR error %s", buffer); + lprintf(LOG_DEBUG, "ERROR: decrypt final failed"); + *bytes_written = 0; +- return; /* Error */ + } + else + { + /* Success */ + *bytes_written += tmplen; +- EVP_CIPHER_CTX_cleanup(ctx); + } + } ++ /* performs cleanup and free */ ++ EVP_CIPHER_CTX_free(ctx); + + if (verbose >= 5) + { +-- +2.16.1 + diff --git a/admin/ipmitool/patches/0005-ipmitool-Fix-compile-with-deprecated-APIs-disabled.patch b/admin/ipmitool/patches/0005-ipmitool-Fix-compile-with-deprecated-APIs-disabled.patch new file mode 100644 index 00000000..7f2923fd --- /dev/null +++ b/admin/ipmitool/patches/0005-ipmitool-Fix-compile-with-deprecated-APIs-disabled.patch @@ -0,0 +1,47 @@ +From cf39da53236abf02d39c6a98a645488933f3e861 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Tue, 21 Aug 2018 19:29:07 -0700 +Subject: [PATCH] ipmitool: Fix compile with deprecated APIs disabled. + +From the man page: + +EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0. As a result, +EVP_CIPHER_CTX_reset() appeared and EVP_CIPHER_CTX_cleanup() disappeared. +EVP_CIPHER_CTX_init() remains as an alias for EVP_CIPHER_CTX_reset(). + +Signed-off-by: Rosen Penev +--- + src/plugins/lanplus/lanplus_crypt_impl.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c +index 9652a5e..e94401e 100644 +--- a/src/plugins/lanplus/lanplus_crypt_impl.c ++++ b/src/plugins/lanplus/lanplus_crypt_impl.c +@@ -183,7 +183,11 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv, + lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed"); + return; + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_CIPHER_CTX_init(ctx); ++#else ++ EVP_CIPHER_CTX_reset(ctx); ++#endif + EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); + EVP_CIPHER_CTX_set_padding(ctx, 0); + +@@ -262,7 +266,11 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv, + lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed"); + return; + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_CIPHER_CTX_init(ctx); ++#else ++ EVP_CIPHER_CTX_reset(ctx); ++#endif + EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); + EVP_CIPHER_CTX_set_padding(ctx, 0); + +-- +2.7.4 + diff --git a/admin/ipmitool/patches/0006-CVE-2020-5208-fru-Fix-buffer-overflow-vulnerabilities.patch b/admin/ipmitool/patches/0006-CVE-2020-5208-fru-Fix-buffer-overflow-vulnerabilities.patch new file mode 100644 index 00000000..48fe5eeb --- /dev/null +++ b/admin/ipmitool/patches/0006-CVE-2020-5208-fru-Fix-buffer-overflow-vulnerabilities.patch @@ -0,0 +1,128 @@ +From 960dbb956d9f9cb05b719087faed53c88dc80956 Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 16:33:59 +0000 +Subject: [PATCH 06/11] fru: Fix buffer overflow vulnerabilities + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `read_fru_area_section` function only performs size validation of +requested read size, and falsely assumes that the IPMI message will not +respond with more than the requested amount of data; it uses the +unvalidated response size to copy into `frubuf`. If the response is +larger than the request, this can result in overflowing the buffer. + +The same issue affects the `read_fru_area` function. +--- + lib/ipmi_fru.c | 33 +++++++++++++++++++++++++++++++-- + 1 file changed, 31 insertions(+), 2 deletions(-) + +diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c +index cf00effc82a2..af99aa99444c 100644 +--- a/lib/ipmi_fru.c ++++ b/lib/ipmi_fru.c +@@ -615,7 +615,10 @@ int + read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + uint32_t offset, uint32_t length, uint8_t *frubuf) + { +- uint32_t off = offset, tmp, finish; ++ uint32_t off = offset; ++ uint32_t tmp; ++ uint32_t finish; ++ uint32_t size_left_in_buffer; + struct ipmi_rs * rsp; + struct ipmi_rq req; + uint8_t msg_data[4]; +@@ -628,10 +631,12 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + + finish = offset + length; + if (finish > fru->size) { ++ memset(frubuf + fru->size, 0, length - fru->size); + finish = fru->size; + lprintf(LOG_NOTICE, "Read FRU Area length %d too large, " + "Adjusting to %d", + offset + length, finish - offset); ++ length = finish - offset; + } + + memset(&req, 0, sizeof(req)); +@@ -667,6 +672,7 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + } + ++ size_left_in_buffer = length; + do { + tmp = fru->access ? off >> 1 : off; + msg_data[0] = id; +@@ -707,9 +713,18 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + + tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0]; ++ if(rsp->data_len < 1 ++ || tmp > rsp->data_len - 1 ++ || tmp > size_left_in_buffer) ++ { ++ printf(" Not enough buffer size"); ++ return -1; ++ } ++ + memcpy(frubuf, rsp->data + 1, tmp); + off += tmp; + frubuf += tmp; ++ size_left_in_buffer -= tmp; + /* sometimes the size returned in the Info command + * is too large. return 0 so higher level function + * still attempts to parse what was returned */ +@@ -742,7 +757,9 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + uint32_t offset, uint32_t length, uint8_t *frubuf) + { + static uint32_t fru_data_rqst_size = 20; +- uint32_t off = offset, tmp, finish; ++ uint32_t off = offset; ++ uint32_t tmp, finish; ++ uint32_t size_left_in_buffer; + struct ipmi_rs * rsp; + struct ipmi_rq req; + uint8_t msg_data[4]; +@@ -755,10 +772,12 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + + finish = offset + length; + if (finish > fru->size) { ++ memset(frubuf + fru->size, 0, length - fru->size); + finish = fru->size; + lprintf(LOG_NOTICE, "Read FRU Area length %d too large, " + "Adjusting to %d", + offset + length, finish - offset); ++ length = finish - offset; + } + + memset(&req, 0, sizeof(req)); +@@ -773,6 +792,8 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + if (fru->access && fru_data_rqst_size > 16) + #endif + fru_data_rqst_size = 16; ++ ++ size_left_in_buffer = length; + do { + tmp = fru->access ? off >> 1 : off; + msg_data[0] = id; +@@ -804,8 +825,16 @@ read_fru_area_section(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, + } + + tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0]; ++ if(rsp->data_len < 1 ++ || tmp > rsp->data_len - 1 ++ || tmp > size_left_in_buffer) ++ { ++ printf(" Not enough buffer size"); ++ return -1; ++ } + memcpy((frubuf + off)-offset, rsp->data + 1, tmp); + off += tmp; ++ size_left_in_buffer -= tmp; + + /* sometimes the size returned in the Info command + * is too large. return 0 so higher level function +-- +2.27.0 + diff --git a/admin/ipmitool/patches/0007-CVE-2020-5208-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch b/admin/ipmitool/patches/0007-CVE-2020-5208-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch new file mode 100644 index 00000000..d694c925 --- /dev/null +++ b/admin/ipmitool/patches/0007-CVE-2020-5208-fru-Fix-buffer-overflow-in-ipmi_spd_print_fru.patch @@ -0,0 +1,48 @@ +From 910e5782b7d9f222d4e34d3505d0d636ff757103 Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 16:44:18 +0000 +Subject: [PATCH 07/11] fru: Fix buffer overflow in ipmi_spd_print_fru + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `ipmi_spd_print_fru` function has a similar issue as the one fixed +by the previous commit in `read_fru_area_section`. An initial request is +made to get the `fru.size`, which is used as the size for the allocation +of `spd_data`. Inside a loop, further requests are performed to get the +copy sizes which are not checked before being used as the size for a +copy into the buffer. +--- + lib/dimm_spd.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/lib/dimm_spd.c b/lib/dimm_spd.c +index 41e30dbb4bda..68f3b4fa1eff 100644 +--- a/lib/dimm_spd.c ++++ b/lib/dimm_spd.c +@@ -1621,7 +1621,7 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id) + struct ipmi_rq req; + struct fru_info fru; + uint8_t *spd_data, msg_data[4]; +- int len, offset; ++ uint32_t len, offset; + + msg_data[0] = id; + +@@ -1697,6 +1697,13 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id) + } + + len = rsp->data[0]; ++ if(rsp->data_len < 1 ++ || len > rsp->data_len - 1 ++ || len > fru.size - offset) ++ { ++ printf(" Not enough buffer size"); ++ return -1; ++ } + memcpy(&spd_data[offset], rsp->data + 1, len); + offset += len; + } while (offset < fru.size); +-- +2.27.0 + diff --git a/admin/ipmitool/patches/0008-CVE-2020-5208-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch b/admin/ipmitool/patches/0008-CVE-2020-5208-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch new file mode 100644 index 00000000..6d8cc154 --- /dev/null +++ b/admin/ipmitool/patches/0008-CVE-2020-5208-session-Fix-buffer-overflow-in-ipmi_get_session_info.patch @@ -0,0 +1,48 @@ +From 4f7778ed232a92bde388f38917b94f458a82c78e Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 16:51:49 +0000 +Subject: [PATCH 08/11] session: Fix buffer overflow in ipmi_get_session_info + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `ipmi_get_session_info` function does not properly check the +response `data_len`, which is used as a copy size, allowing stack buffer +overflow. +--- + lib/ipmi_session.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/lib/ipmi_session.c b/lib/ipmi_session.c +index 141f0f4ec8dd..b9af1fd75d40 100644 +--- a/lib/ipmi_session.c ++++ b/lib/ipmi_session.c +@@ -309,8 +309,10 @@ ipmi_get_session_info(struct ipmi_intf * intf, + } + else + { +- memcpy(&session_info, rsp->data, rsp->data_len); +- print_session_info(&session_info, rsp->data_len); ++ memcpy(&session_info, rsp->data, ++ __min(rsp->data_len, sizeof(session_info))); ++ print_session_info(&session_info, ++ __min(rsp->data_len, sizeof(session_info))); + } + break; + +@@ -341,8 +343,10 @@ ipmi_get_session_info(struct ipmi_intf * intf, + break; + } + +- memcpy(&session_info, rsp->data, rsp->data_len); +- print_session_info(&session_info, rsp->data_len); ++ memcpy(&session_info, rsp->data, ++ __min(rsp->data_len, sizeof(session_info))); ++ print_session_info(&session_info, ++ __min(rsp->data_len, sizeof(session_info))); + + } while (i <= session_info.session_slot_count); + break; +-- +2.27.0 + diff --git a/admin/ipmitool/patches/0009-CVE-2020-5208-channel-Fix-buffer-overflow.patch b/admin/ipmitool/patches/0009-CVE-2020-5208-channel-Fix-buffer-overflow.patch new file mode 100644 index 00000000..dd29993b --- /dev/null +++ b/admin/ipmitool/patches/0009-CVE-2020-5208-channel-Fix-buffer-overflow.patch @@ -0,0 +1,37 @@ +From 743dd4faa302f22950e4438cf684e1e398eb47eb Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 16:56:38 +0000 +Subject: [PATCH 09/11] channel: Fix buffer overflow +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `ipmi_get_channel_cipher_suites` function does not properly check +the final response’s `data_len`, which can lead to stack buffer overflow +on the final copy. +--- + lib/ipmi_channel.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lib/ipmi_channel.c b/lib/ipmi_channel.c +index fab2e5483d12..8cd7c59a4273 100644 +--- a/lib/ipmi_channel.c ++++ b/lib/ipmi_channel.c +@@ -413,7 +413,10 @@ ipmi_get_channel_cipher_suites(struct ipmi_intf *intf, const char *payload_type, + lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites"); + return -1; + } +- if (rsp->ccode > 0) { ++ if (rsp->ccode ++ || rsp->data_len < 1 ++ || rsp->data_len > sizeof(uint8_t) + 0x10) ++ { + lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s", + val2str(rsp->ccode, completion_code_vals)); + return -1; +-- +2.27.0 + diff --git a/admin/ipmitool/patches/0010-CVE-2020-5208-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch b/admin/ipmitool/patches/0010-CVE-2020-5208-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch new file mode 100644 index 00000000..e7a79707 --- /dev/null +++ b/admin/ipmitool/patches/0010-CVE-2020-5208-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch @@ -0,0 +1,88 @@ +From e048e9c65a52f0879d482531e70735c1d314d43a Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 17:06:39 +0000 +Subject: [PATCH 10/11] lanp: Fix buffer overflows in get_lan_param_select +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Partial fix for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +The `get_lan_param_select` function is missing a validation check on the +response’s `data_len`, which it then returns to caller functions, where +stack buffer overflow can occur. +--- + lib/ipmi_lanp.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lib/ipmi_lanp.c b/lib/ipmi_lanp.c +index 65d881bc5890..022c7f1605ed 100644 +--- a/lib/ipmi_lanp.c ++++ b/lib/ipmi_lanp.c +@@ -1809,7 +1809,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + /* set new ipaddr */ + memcpy(data+3, temp, 4); + printf("Setting LAN Alert %d IP Address to %d.%d.%d.%d\n", alert, +@@ -1824,7 +1824,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + /* set new macaddr */ + memcpy(data+7, temp, 6); + printf("Setting LAN Alert %d MAC Address to " +@@ -1838,7 +1838,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (strncasecmp(argv[1], "def", 3) == 0 || + strncasecmp(argv[1], "default", 7) == 0) { +@@ -1864,7 +1864,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (strncasecmp(argv[1], "on", 2) == 0 || + strncasecmp(argv[1], "yes", 3) == 0) { +@@ -1889,7 +1889,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (strncasecmp(argv[1], "pet", 3) == 0) { + printf("Setting LAN Alert %d destination to PET Trap\n", alert); +@@ -1917,7 +1917,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (str2uchar(argv[1], &data[2]) != 0) { + lprintf(LOG_ERR, "Invalid time: %s", argv[1]); +@@ -1933,7 +1933,7 @@ ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, + if (p == NULL) { + return (-1); + } +- memcpy(data, p->data, p->data_len); ++ memcpy(data, p->data, __min(p->data_len, sizeof(data))); + + if (str2uchar(argv[1], &data[3]) != 0) { + lprintf(LOG_ERR, "Invalid retry: %s", argv[1]); +-- +2.27.0 + diff --git a/admin/ipmitool/patches/0011-CVE-2020-5208-fru-sdr-Fix-id_string-buffer-overflows.patch b/admin/ipmitool/patches/0011-CVE-2020-5208-fru-sdr-Fix-id_string-buffer-overflows.patch new file mode 100644 index 00000000..6cc5b7aa --- /dev/null +++ b/admin/ipmitool/patches/0011-CVE-2020-5208-fru-sdr-Fix-id_string-buffer-overflows.patch @@ -0,0 +1,137 @@ +From 98b47424cf548f58c4d295fa8235210406ea85ca Mon Sep 17 00:00:00 2001 +From: Chrostoper Ertl +Date: Thu, 28 Nov 2019 17:13:45 +0000 +Subject: [PATCH 11/11] fru, sdr: Fix id_string buffer overflows + +Final part of the fixes for CVE-2020-5208, see +https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp + +9 variants of stack buffer overflow when parsing `id_string` field of +SDR records returned from `CMD_GET_SDR` command. + +SDR record structs have an `id_code` field, and an `id_string` `char` +array. + +The length of `id_string` is calculated as `(id_code & 0x1f) + 1`, +which can be larger than expected 16 characters (if `id_code = 0xff`, +then length will be `(0xff & 0x1f) + 1 = 32`). + +In numerous places, this can cause stack buffer overflow when copying +into fixed buffer of size `17` bytes from this calculated length. +--- + lib/ipmi_fru.c | 2 +- + lib/ipmi_sdr.c | 40 ++++++++++++++++++++++++---------------- + 2 files changed, 25 insertions(+), 17 deletions(-) + +diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c +index af99aa99444c..98bc9840955a 100644 +--- a/lib/ipmi_fru.c ++++ b/lib/ipmi_fru.c +@@ -3062,7 +3062,7 @@ ipmi_fru_print(struct ipmi_intf * intf, struct sdr_record_fru_locator * fru) + return 0; + + memset(desc, 0, sizeof(desc)); +- memcpy(desc, fru->id_string, fru->id_code & 0x01f); ++ memcpy(desc, fru->id_string, __min(fru->id_code & 0x01f, sizeof(desc))); + desc[fru->id_code & 0x01f] = 0; + printf("FRU Device Description : %s (ID %d)\n", desc, fru->device_id); + +diff --git a/lib/ipmi_sdr.c b/lib/ipmi_sdr.c +index 2a9cbe3087af..62aac08a9002 100644 +--- a/lib/ipmi_sdr.c ++++ b/lib/ipmi_sdr.c +@@ -2084,7 +2084,7 @@ ipmi_sdr_print_sensor_eventonly(struct ipmi_intf *intf, + return -1; + + memset(desc, 0, sizeof (desc)); +- snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string); ++ snprintf(desc, sizeof(desc), "%.*s", (sensor->id_code & 0x1f) + 1, sensor->id_string); + + if (verbose) { + printf("Sensor ID : %s (0x%x)\n", +@@ -2135,7 +2135,7 @@ ipmi_sdr_print_sensor_mc_locator(struct ipmi_intf *intf, + return -1; + + memset(desc, 0, sizeof (desc)); +- snprintf(desc, (mc->id_code & 0x1f) + 1, "%s", mc->id_string); ++ snprintf(desc, sizeof(desc), "%.*s", (mc->id_code & 0x1f) + 1, mc->id_string); + + if (verbose == 0) { + if (csv_output) +@@ -2228,7 +2228,7 @@ ipmi_sdr_print_sensor_generic_locator(struct ipmi_intf *intf, + char desc[17]; + + memset(desc, 0, sizeof (desc)); +- snprintf(desc, (dev->id_code & 0x1f) + 1, "%s", dev->id_string); ++ snprintf(desc, sizeof(desc), "%.*s", (dev->id_code & 0x1f) + 1, dev->id_string); + + if (!verbose) { + if (csv_output) +@@ -2285,7 +2285,7 @@ ipmi_sdr_print_sensor_fru_locator(struct ipmi_intf *intf, + char desc[17]; + + memset(desc, 0, sizeof (desc)); +- snprintf(desc, (fru->id_code & 0x1f) + 1, "%s", fru->id_string); ++ snprintf(desc, sizeof(desc), "%.*s", (fru->id_code & 0x1f) + 1, fru->id_string); + + if (!verbose) { + if (csv_output) +@@ -2489,35 +2489,43 @@ ipmi_sdr_print_name_from_rawentry(struct ipmi_intf *intf, uint16_t id, + + int rc =0; + char desc[17]; ++ const char *id_string; ++ uint8_t id_code; + memset(desc, ' ', sizeof (desc)); + + switch ( type) { + case SDR_RECORD_TYPE_FULL_SENSOR: + record.full = (struct sdr_record_full_sensor *) raw; +- snprintf(desc, (record.full->id_code & 0x1f) +1, "%s", +- (const char *)record.full->id_string); ++ id_code = record.full->id_code; ++ id_string = record.full->id_string; + break; ++ + case SDR_RECORD_TYPE_COMPACT_SENSOR: + record.compact = (struct sdr_record_compact_sensor *) raw ; +- snprintf(desc, (record.compact->id_code & 0x1f) +1, "%s", +- (const char *)record.compact->id_string); ++ id_code = record.compact->id_code; ++ id_string = record.compact->id_string; + break; ++ + case SDR_RECORD_TYPE_EVENTONLY_SENSOR: + record.eventonly = (struct sdr_record_eventonly_sensor *) raw ; +- snprintf(desc, (record.eventonly->id_code & 0x1f) +1, "%s", +- (const char *)record.eventonly->id_string); +- break; ++ id_code = record.eventonly->id_code; ++ id_string = record.eventonly->id_string; ++ break; ++ + case SDR_RECORD_TYPE_MC_DEVICE_LOCATOR: + record.mcloc = (struct sdr_record_mc_locator *) raw ; +- snprintf(desc, (record.mcloc->id_code & 0x1f) +1, "%s", +- (const char *)record.mcloc->id_string); ++ id_code = record.mcloc->id_code; ++ id_string = record.mcloc->id_string; + break; ++ + default: + rc = -1; +- break; +- } ++ } ++ if (!rc) { ++ snprintf(desc, sizeof(desc), "%.*s", (id_code & 0x1f) + 1, id_string); ++ } + +- lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc); ++ lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc); + return rc; + } + +-- +2.27.0 + diff --git a/admin/monit/Makefile b/admin/monit/Makefile index 3c6bf635..1c7d7195 100644 --- a/admin/monit/Makefile +++ b/admin/monit/Makefile @@ -8,17 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=monit -PKG_VERSION:=5.24.0 +PKG_VERSION:=5.26.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=754d1f0e165e5a26d4639a6a83f44ccf839e381f2622e0946d5302fa1f2d2414 PKG_SOURCE_URL:=https://mmonit.com/monit/dist +PKG_HASH:=87fc4568a3af9a2be89040efb169e3a2e47b262f99e78d5ddde99dd89f02f3c2 PKG_LICENSE:=AGPL-3.0 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:tildeslash:monit -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -61,6 +62,7 @@ endef CONFIGURE_ARGS += \ --without-pam \ + ac_cv_ipv6=$(if $(CONFIG_IPV6),yes,no) \ libmonit_cv_setjmp_available=yes \ libmonit_cv_vsnprintf_c99_conformant=yes diff --git a/admin/monit/patches/001-fix-default-piddir.patch b/admin/monit/patches/001-fix-default-piddir.patch index 6382f6f4..571c432b 100644 --- a/admin/monit/patches/001-fix-default-piddir.patch +++ b/admin/monit/patches/001-fix-default-piddir.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -13852,14 +13852,7 @@ fi +@@ -14436,14 +14436,7 @@ fi # Find the right directory to put the root-mode PID file in { $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5 $as_echo_n "checking pid file location... " >&6; } @@ -16,3 +16,21 @@ cat >>confdefs.h <<_ACEOF +--- a/configure.ac ++++ b/configure.ac +@@ -501,14 +501,7 @@ fi + + # Find the right directory to put the root-mode PID file in + AC_MSG_CHECKING([pid file location]) +-if test -d "/run" +-then +- piddir="/run" +-elif test -d "/var/run"; then +- piddir="/var/run" +-elif test -d "/etc"; then +- piddir="/etc" +-fi ++piddir="/var/run" + + AC_DEFINE_UNQUOTED([PIDDIR], "$piddir", + [Define to the pid storage directory.]) diff --git a/admin/muninlite/Makefile b/admin/muninlite/Makefile index 022da018..39e04307 100644 --- a/admin/muninlite/Makefile +++ b/admin/muninlite/Makefile @@ -8,13 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=muninlite -PKG_VERSION:=1.0.4 -PKG_RELEASE:=8 +PKG_VERSION:=2.0.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=736482dd6d6849d014d975b1f5794f20dda6e123dbba2d8c2f169c8e787e6f7e -PKG_LICENSE:=GPL-2.0+ +PKG_SOURCE_URL:=https://github.com/munin-monitoring/$(PKG_NAME)/releases/download/$(PKG_VERSION)/ +PKG_HASH:=8277ccd146b4fc5b57602dba3f5612c7d6f840b4c3ee2ff3756ff4b3d8527966 + +PKG_MAINTAINER:=Jonathan McCrohan +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk @@ -24,8 +26,7 @@ define Package/muninlite CATEGORY:=Administration DEPENDS:=+xinetd TITLE:=Munin node implemented in shell - URL:=http://sourceforge.net/projects/muninlite/ - PKG_MAINTAINER:=Jonathan McCrohan + URL:=https://github.com/munin-monitoring/muninlite endef define Package/muninlite/Default/description @@ -35,20 +36,14 @@ endef define Package/muninlite/install $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/munin-node $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/muninlite $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/xinetd.d - $(INSTALL_DATA) ./files/etc/xinetd.d/munin $(1)/etc/xinetd.d/ + $(INSTALL_DATA) ./files/etc/xinetd.d/muninlite $(1)/etc/xinetd.d/ + $(INSTALL_DIR) $(1)/etc/munin/plugins endef define Package/muninlite/conffiles -/etc/xinetd.d/munin -endef - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) +/etc/xinetd.d/muninlite endef $(eval $(call BuildPackage,muninlite)) diff --git a/admin/muninlite/files/etc/xinetd.d/munin b/admin/muninlite/files/etc/xinetd.d/munin deleted file mode 100644 index 012d71b9..00000000 --- a/admin/muninlite/files/etc/xinetd.d/munin +++ /dev/null @@ -1,10 +0,0 @@ -service munin -{ - socket_type = stream - protocol = tcp - wait = no - user = root - group = root - server = /usr/sbin/munin-node - disable = no -} diff --git a/admin/muninlite/files/etc/xinetd.d/muninlite b/admin/muninlite/files/etc/xinetd.d/muninlite new file mode 100644 index 00000000..d62dc103 --- /dev/null +++ b/admin/muninlite/files/etc/xinetd.d/muninlite @@ -0,0 +1,10 @@ +service muninlite +{ + socket_type = stream + protocol = tcp + wait = no + user = root + group = root + server = /usr/sbin/muninlite + disable = no +} diff --git a/admin/muninlite/patches/001-fix_disks.patch b/admin/muninlite/patches/001-fix_disks.patch deleted file mode 100644 index a2264a8f..00000000 --- a/admin/muninlite/patches/001-fix_disks.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/plugins/df -+++ b/plugins/df -@@ -19,6 +19,6 @@ fetch_df() { - do - PINFO=$(df -P $PART | tail -1); - PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/[\/.-]/_/g') -- echo "$PNAME.value" $(echo $PINFO | cut -f5 -d\ | sed -e 's/\%//g') -+ echo "$PNAME.value" $(echo $PINFO | sed -e 's/\%//g' -e 's/ */ /g' | cut -f5 -d' ') - done - } diff --git a/admin/muninlite/patches/002-hostname.patch b/admin/muninlite/patches/002-hostname.patch deleted file mode 100644 index 5d871683..00000000 --- a/admin/muninlite/patches/002-hostname.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/munin-node.in -+++ b/munin-node.in -@@ -113,7 +113,7 @@ PLUGINS=$RES - - # ===== MAIN LOOP ===== - FUNCTIONS="list nodes config fetch version quit" --HOSTNAME=$(hostname -f 2>/dev/null || hostname) -+HOSTNAME=$(/sbin/uci get "system.@system[0].hostname" 2>/dev/null || cat /proc/sys/kernel/hostname) - echo "# munin node at $HOSTNAME" - while read arg0 arg1 - do diff --git a/admin/muninlite/patches/100-fix-no-ethtool.patch b/admin/muninlite/patches/100-fix-no-ethtool.patch deleted file mode 100644 index 88f7e305..00000000 --- a/admin/muninlite/patches/100-fix-no-ethtool.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/plugins/if_ -+++ b/plugins/if_ -@@ -15,10 +15,14 @@ config_if() { - echo "up.min 0" - echo "up.negative down" - echo "up.cdef up,8,*" -- if ethtool $1 | grep -q Speed; then -- MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) -- echo "up.max $MAX" -- echo "down.max $MAX" -+ if [ -n "$(which ethtool)" ]; then -+ if [ -x "$(which ethtool)" ]; then -+ if ethtool $1 | grep -q Speed; then -+ MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) -+ echo "up.max $MAX" -+ echo "down.max $MAX" -+ fi -+ fi - fi - } - fetch_if() { diff --git a/admin/muninlite/patches/110-fix-uptime-days.patch b/admin/muninlite/patches/110-fix-uptime-days.patch deleted file mode 100644 index d9aa43f4..00000000 --- a/admin/muninlite/patches/110-fix-uptime-days.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/plugins/uptime -+++ b/plugins/uptime -@@ -4,8 +4,7 @@ config_uptime() { - echo "graph_vlabel uptime in days" - echo "uptime.label uptime" - echo "uptime.draw AREA" -- echo "uptime.cdef uptime,86400,/" - } - fetch_uptime() { -- echo "uptime.value" $(cut -d\ -f1 /proc/uptime) -+ awk '{printf "uptime.value %.2f",$1/86400; print ""}' /proc/uptime - } diff --git a/admin/muninlite/patches/200-add-tap-dev.patch b/admin/muninlite/patches/200-add-tap-dev.patch deleted file mode 100644 index fa46ce6b..00000000 --- a/admin/muninlite/patches/200-add-tap-dev.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/munin-node.in -+++ b/munin-node.in -@@ -72,7 +72,7 @@ RES="" - for PLUG in $PLUGINS - do - if [ "$PLUG" = "if_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do - INTERRES=$(echo $INTER | sed 's/\./VLAN/') - RES="$RES if_$INTERRES" -@@ -80,7 +80,7 @@ do - eval "config_if_${INTERRES}() { config_if $INTER $@; };" - done - elif [ "$PLUG" = "if_err_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do - INTERRES=$(echo $INTER | sed 's/\./VLAN/') - RES="$RES if_err_$INTERRES" diff --git a/admin/muninlite/patches/210-add-bridge-devs.patch b/admin/muninlite/patches/210-add-bridge-devs.patch deleted file mode 100644 index 1a76e971..00000000 --- a/admin/muninlite/patches/210-add-bridge-devs.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/munin-node.in -+++ b/munin-node.in -@@ -72,17 +72,17 @@ RES="" - for PLUG in $PLUGINS - do - if [ "$PLUG" = "if_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do -- INTERRES=$(echo $INTER | sed 's/\./VLAN/') -+ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') - RES="$RES if_$INTERRES" - eval "fetch_if_${INTERRES}() { fetch_if $INTER $@; };" - eval "config_if_${INTERRES}() { config_if $INTER $@; };" - done - elif [ "$PLUG" = "if_err_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do -- INTERRES=$(echo $INTER | sed 's/\./VLAN/') -+ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') - RES="$RES if_err_$INTERRES" - eval "fetch_if_err_${INTERRES}() { fetch_if_err $INTER $@; };" - eval "config_if_err_${INTERRES}() { config_if_err $INTER $@; };" diff --git a/admin/muninlite/patches/220-modify-ifname-parser.patch b/admin/muninlite/patches/220-modify-ifname-parser.patch deleted file mode 100644 index 6a2ba236..00000000 --- a/admin/muninlite/patches/220-modify-ifname-parser.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/plugins/if_ -+++ b/plugins/if_ -@@ -26,7 +26,7 @@ config_if() { - fi - } - fetch_if() { -- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g') -+ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//') - echo "down.value" $(echo $IINFO | cut -d\ -f1) - echo "up.value" $(echo $IINFO | cut -d\ -f9) - } ---- a/plugins/if_err_ -+++ b/plugins/if_err_ -@@ -15,7 +15,7 @@ config_if_err() { - echo "trans.warning 1" - } - fetch_if_err() { -- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g') -+ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//') - echo "rcvd.value" $(echo $IINFO | cut -d\ -f3) - echo "trans.value" $(echo $IINFO | cut -d\ -f11) - } diff --git a/admin/muninlite/patches/230-fix-available-interface-parsing.patch b/admin/muninlite/patches/230-fix-available-interface-parsing.patch deleted file mode 100644 index 2f227e58..00000000 --- a/admin/muninlite/patches/230-fix-available-interface-parsing.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/munin-node.in -+++ b/munin-node.in -@@ -72,7 +72,7 @@ RES="" - for PLUG in $PLUGINS - do - if [ "$PLUG" = "if_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do - INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') - RES="$RES if_$INTERRES" -@@ -80,7 +80,7 @@ do - eval "config_if_${INTERRES}() { config_if $INTER $@; };" - done - elif [ "$PLUG" = "if_err_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do - INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') - RES="$RES if_err_$INTERRES" diff --git a/admin/netatop/Makefile b/admin/netatop/Makefile new file mode 100644 index 00000000..aca607d8 --- /dev/null +++ b/admin/netatop/Makefile @@ -0,0 +1,86 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=netatop +PKG_RELEASE:=1 +PKG_VERSION:=3.1 +PKG_LICENSE:=GPL-2.0 +PKG_SOURCE_URL:=https://www.atoptool.nl/download/ +PKG_HASH:=736f43572c31a90748f023f0a5a814bff58d44c0c3f060d776cfd6e6e8435c62 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MAINTAINER:=Toni Uhlig + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define KernelPackage/netatop + URL:=https://www.atoptool.nl/ + CATEGORY:=Kernel modules + SUBMENU:=Netfilter Extensions + TITLE:=netatop netfilter module + FILES:= \ + $(PKG_BUILD_DIR)/module/netatop.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoProbe,netatop) +endef + +define KernelPackage/netatop/description + The optional kernel module netatop can be loaded to gather statistics about + the TCP and UDP packets that have been transmitted/received per process and + per thread. As soon as atop discovers that this module is active, it shows + the columns SNET and RNET in the generic screen for the number of transmitted + and received packets per process. When the 'n' key is pressed, it shows + detailed counters about the number packets transmitted/received via TCP and + UDP, the average sizes of these packets, and the total bandwidth consumed + for input and output per process/thread. +endef + +define Package/netatop + SECTION:=admin + CATEGORY:=Administration + TITLE:=network counter for atop + DEPENDS:=+zlib +kmod-netatop + URL:=https://www.atoptool.nl/ +endef + +define Package/netatop/description + The daemon netatopd is packaged with the netatop kernel module. This + daemon takes care that information is gathered about processes that are + finished. For every finished process that has transferred network packets, + a binary record is written to a dedicated logfile. The added records in the + logfile are read by atop with every sample to show information about the + network activity of finished processes as well. +endef + +NETATOP_KMOD_MAKEOPTS= \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + KERNDIR="$(LINUX_DIR)" +NETATOP_DAEMON_MAKEOPTS= \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" + +define Build/Compile/netatop + $(MAKE) -C $(PKG_BUILD_DIR)/module \ + $(NETATOP_KMOD_MAKEOPTS) \ + netatop.$(LINUX_KMOD_SUFFIX) + $(MAKE) -C $(PKG_BUILD_DIR)/daemon \ + $(NETATOP_DAEMON_MAKEOPTS) \ + all +endef + +define Build/Compile + $(call Build/Compile/netatop) +endef + +define Package/netatop/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon/netatopd $(1)/usr/sbin/ +endef + +$(eval $(call KernelPackage,netatop)) +$(eval $(call BuildPackage,netatop)) diff --git a/admin/netatop/patches/010-daemon-makefile-ldflags.patch b/admin/netatop/patches/010-daemon-makefile-ldflags.patch new file mode 100644 index 00000000..8601da87 --- /dev/null +++ b/admin/netatop/patches/010-daemon-makefile-ldflags.patch @@ -0,0 +1,13 @@ +diff --git a/daemon/Makefile b/daemon/Makefile +index e028e95..1233855 100644 +--- a/daemon/Makefile ++++ b/daemon/Makefile +@@ -6,7 +6,7 @@ THISDIR = $(shell pwd) + all: netatopd + + netatopd: netatopd.o Makefile +- $(CC) netatopd.o -o netatopd -lz ++ $(CC) $(LDFLAGS) netatopd.o -o netatopd -lz + + clean: + rm -f *.o netatopd diff --git a/admin/netdata/Makefile b/admin/netdata/Makefile index 1656519f..d07b46a6 100644 --- a/admin/netdata/Makefile +++ b/admin/netdata/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netdata -PKG_VERSION:=1.22.0 +PKG_VERSION:=1.20.0 PKG_RELEASE:=1 PKG_MAINTAINER:=Josef Schlehofer , Daniel Engberg @@ -18,7 +18,7 @@ PKG_CPE_ID:=cpe:/a:my-netdata:netdata PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/netdata/netdata/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=skip +PKG_HASH:=c739e0fa8d6d7f433c0c7c8016b763e8f70519d67f0b5e7eca9ee5318f210d90 PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -30,7 +30,7 @@ include $(INCLUDE_DIR)/package.mk define Package/netdata SECTION:=admin CATEGORY:=Administration - DEPENDS:=+zlib +libuuid +libmnl +libjson-c +libuv + DEPENDS:=+zlib +libuuid +libuv +libmnl +libjson-c TITLE:=Real-time performance monitoring tool URL:=https://www.netdata.cloud/ endef @@ -50,6 +50,7 @@ TARGET_LDFLAGS += -Wl,--gc-sections CONFIGURE_ARGS += \ --with-zlib \ --with-math \ + --disable-x86-sse \ --enable-lto \ --without-libcap \ --disable-https \ @@ -61,19 +62,10 @@ CONFIGURE_ARGS += \ --disable-backend-prometheus-remote-write \ --enable-jsonc -ifneq ($(ARCH),x86_64) - CONFIGURE_ARGS += --disable-x86-sse -endif - define Package/netdata/conffiles /etc/netdata/ endef -define Package/netdata/extra_provides - echo 'libcrypto.so.1.1';\ - echo 'libssl.so.1.1'; -endef - define Package/netdata/install $(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc diff --git a/admin/netdata/files/netdata.conf b/admin/netdata/files/netdata.conf index fda74fd6..46b87a8a 100644 --- a/admin/netdata/files/netdata.conf +++ b/admin/netdata/files/netdata.conf @@ -25,8 +25,5 @@ node.d = no python.d = no -[plugin:proc:ipc] - semaphore totals = no - [health] enabled = no diff --git a/admin/nyx/Makefile b/admin/nyx/Makefile new file mode 100644 index 00000000..5a7e26b4 --- /dev/null +++ b/admin/nyx/Makefile @@ -0,0 +1,34 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=nyx +PKG_VERSION:=2.1.0 +PKG_RELEASE:=2 + +PYPI_NAME:=nyx +PKG_HASH:=88521488d1c9052e457b9e66498a4acfaaa3adf3adc5a199892632f129a5390b + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=GPL-3.0-only +PKG_LICENSE_FILES:=LICENSE + +include ../../lang/python/pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../../lang/python/python3-package.mk + +define Package/nyx + SECTION:=admin + CATEGORY:=Administration + URL:=https://nyx.torproject.org/ + TITLE:=Terminal status monitor for Tor + DEPENDS:=+python3 +python3-stem +endef + +define Package/nyx/description + Nyx is a command-line monitor for Tor. With this you can get detailed real-time + information about your relay such as bandwidth usage, connections, logs, and + much more. +endef + +$(eval $(call Py3Package,nyx)) +$(eval $(call BuildPackage,nyx)) +$(eval $(call BuildPackage,nyx-src)) diff --git a/admin/openwisp-config/Makefile b/admin/openwisp-config/Makefile index c2237e32..143475f1 100644 --- a/admin/openwisp-config/Makefile +++ b/admin/openwisp-config/Makefile @@ -8,7 +8,6 @@ PKG_NAME:=openwisp-config PKG_VERSION:=0.4.5 PKG_RELEASE:=2 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git @@ -24,7 +23,7 @@ define Package/openwisp-config/default TITLE:=Remote configuration management agent ($(2) variant) CATEGORY:=Administration SECTION:=admin - SUBMENU:=openwisp + SUBMENU:=OpenWISP DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3) VARIANT:=$(1) MAINTAINER:=Federico Capoano diff --git a/admin/schroot/Config.in b/admin/schroot/Config.in new file mode 100644 index 00000000..3a1cdb14 --- /dev/null +++ b/admin/schroot/Config.in @@ -0,0 +1,23 @@ +menu "Configuration" + +config SCHROOT_BTRFS + bool "Enable support for btrfs snapshots" + select PACKAGE_btrfs-progs + default n + +config SCHROOT_LOOPBACK + bool "Enable support for loopback mounts" + select PACKAGE_losetup + default n + +config SCHROOT_LVM + bool "Enable support for LVM snapshots" + select PACKAGE_lvm2 + default n + +config SCHROOT_UUID + bool "Enable support for UUIDs" + select PACKAGE_libuuid + default n + +endmenu diff --git a/admin/schroot/Makefile b/admin/schroot/Makefile new file mode 100644 index 00000000..fdb81a32 --- /dev/null +++ b/admin/schroot/Makefile @@ -0,0 +1,82 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=schroot +PKG_VERSION:=1.6.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.xz +PKG_SOURCE_URL:=http://deb.debian.org/debian/pool/main/s/schroot +PKG_HASH:=3ce8dfd9cb97b099e4b6d4ccec421d6cc8c9ef84574681e928a12badb5643d0b + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=GPL-3.0-only +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/nls.mk +include $(INCLUDE_DIR)/package.mk + +define Package/schroot + SECTION:=admin + CATEGORY:=Administration + TITLE:=Securely enter a chroot and run a command or login shell. + DEPENDS:=$(ICONV_DEPENDS) \ + +boost +boost-filesystem +boost-iostreams +boost-program_options +boost-regex \ + +SCHROOT_BTRFS:btrfs-progs \ + +SCHROOT_LOOPBACK:losetup \ + +SCHROOT_LVM:lvm2 \ + +SCHROOT_UUID:libuuid + URL:=https://salsa.debian.org/debian/schroot +endef + +define Package/schroot/description + Securely enter a chroot and run a command or login shell. +endef + +define Package/sudo/conffiles +/etc/schroot/ +endef + +define Package/schroot/config + source "$(SOURCE)/Config.in" +endef + +PKG_CONFIG_DEPENDS := \ + CONFIG_SCHROOT_BTRFS \ + CONFIG_SCHROOT_LOOPBACK \ + CONFIG_SCHROOT_LVM \ + CONFIG_SCHROOT_UUID + +CONFIGURE_ARGS += \ + $(if $(CONFIG_SCHROOT_BTRFS),--enable,--disable)-btrfs-snapshot \ + $(if $(CONFIG_SCHROOT_LOOPBACK),--enable,--disable)-loopback \ + $(if $(CONFIG_SCHROOT_LVM),--enable,--disable)-lvm-snapshot \ + $(if $(CONFIG_SCHROOT_UUID),--enable,--disable)-uuid \ + --enable-block-device \ + --enable-union \ + --disable-dchroot \ + --disable-dchroot-dsa \ + --disable-csbuild \ + --disable-debug \ + --disable-pam \ + --disable-doxygen \ + --disable-rpath + +define Package/schroot/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/bin/schroot $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/schroot + $(CP) -R $(PKG_INSTALL_DIR)/etc/schroot/* $(1)/etc/schroot + $(INSTALL_DIR) $(1)/usr/lib/schroot + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libsbuild.* $(1)/usr/lib/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/schroot/* $(1)/usr/lib/schroot/ + $(INSTALL_DIR) $(1)/usr/share/schroot + $(CP) -R $(PKG_INSTALL_DIR)/usr/share/schroot/* $(1)/usr/share/schroot/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/schroot.init $(1)/etc/init.d/schroot +endef + +$(eval $(call BuildPackage,schroot)) diff --git a/admin/schroot/files/schroot.init b/admin/schroot/files/schroot.init new file mode 100755 index 00000000..aa37793a --- /dev/null +++ b/admin/schroot/files/schroot.init @@ -0,0 +1,10 @@ +#!/bin/sh /etc/rc.common + +START=94 + +start() { + [ -d /var/lib/schroot ] || { + mkdir -p /var/lib/schroot/mount /var/lib/schroot/session /var/lib/schroot/unpack /var/lib/schroot/union/overlay /var/lib/schroot/union/underlay + chmod 0700 /var/lib/schroot + } +} diff --git a/admin/schroot/patches/01-openwrt.patch b/admin/schroot/patches/01-openwrt.patch new file mode 100644 index 00000000..9b26b472 --- /dev/null +++ b/admin/schroot/patches/01-openwrt.patch @@ -0,0 +1,219 @@ +--- ./configure.ac-orig 2019-12-09 12:56:45.217308628 +0100 ++++ ./configure.ac 2019-12-09 12:57:18.667492923 +0100 +@@ -284,22 +284,8 @@ if test -z "$DOXYGEN"; then + HAVE_DOXYGEN="no" + fi + HAVE_LVM="yes" +-AC_PATH_PROG([LVCREATE], [lvcreate], [], [$PATH:/sbin:/usr/sbin]) +-AC_PATH_PROG([LVREMOVE], [lvremove], [], [$PATH:/sbin:/usr/sbin]) +-if test -z "$LVCREATE" || test -z "$LVREMOVE"; then +- HAVE_LVM="no" +-fi + HAVE_BTRFS="yes" +-AC_PATH_PROG([BTRFS], [btrfs], [], [$PATH:/sbin:/usr/sbin]) +-AC_PATH_PROG([BTRFSCTL], [btrfsctl], [], [$PATH:/sbin:/usr/sbin]) +-if test -z "$BTRFS" || test -z "$BTRFSCTL"; then +- HAVE_BTRFS="no" +-fi + HAVE_LOOPBACK="yes" +-AC_PATH_PROG([LOSETUP], [losetup], [], [$PATH:/sbin:/usr/sbin]) +-if test -z "$LOSETUP"; then +- HAVE_LOOPBACK="no" +-fi + + + # Check for host platform +@@ -336,7 +322,6 @@ PKG_CHECK_MODULES([UUID], [uuid], + [HAVE_UUID=yes], + [HAVE_UUID=no]) + +-AM_PATH_CPPUNIT([1.10.0], [HAVE_CPPUNIT=yes]) + AM_CONDITIONAL([USE_UNIT_TESTS], [test -n "$HAVE_CPPUNIT"]) + + SCHROOT_CFLAGS="$UUID_CFLAGS" +@@ -688,42 +673,25 @@ if test "$BOOST_PROGRAM_OPTIONS_VALIDATI + fi + + dnl Note the use of quadrigraphs to quote [ and ] in regexes. +-AH_TEMPLATE(HAVE_REGEX_REGEX, [Set if the header file includes std::regex]) + AH_TEMPLATE(HAVE_BOOST_REGEX, [Set if the header file includes boost::regex]) +-AC_MSG_CHECKING([for std::regex]) +-define([testprog], [AC_LANG_PROGRAM([#include ], +- [std::regex foo("^foo@<:@bar@:>@$"); +- std::regex bar("^foo@<:@bar@:>@$", std::regex::extended); +- std::regex check("^@<:@^:/,.@:>@@<:@^:/,@:>@*$", std::regex::extended);])]) +-AC_RUN_IFELSE(testprog, +- [AC_MSG_RESULT([yes]) +- AC_DEFINE(HAVE_REGEX_REGEX, 1)], +- [dnl Check if std::regex is present but broken. +-define([testprog], [AC_LANG_PROGRAM([#include ], +- [std::regex foo("^foo@<:@bar@:>@$"); +- std::regex bar("^foo@<:@bar@:>@$", std::regex::extended);])]) ++AC_MSG_CHECKING([for boost::regex in -lboost_regex]) ++saved_LIBS="${LIBS}" ++LIBS="${saved_LIBS} -lboost_regex" ++define([testprog], [AC_LANG_PROGRAM([#include ], ++ [boost::regex("^foo@<:@bar@:>@$"); ++ boost::regex bar("^foo@<:@bar@:>@$", boost::regex::extended);])]) + AC_LINK_IFELSE(testprog, +- [AC_MSG_RESULT([broken])], +- [AC_MSG_RESULT([no])]) +- AC_MSG_CHECKING([for boost::regex in -lboost_regex]) +- saved_LIBS="${LIBS}" +- LIBS="${saved_LIBS} -lboost_regex" +- define([testprog], [AC_LANG_PROGRAM([#include ], +- [boost::regex("^foo@<:@bar@:>@$"); +- boost::regex bar("^foo@<:@bar@:>@$", boost::regex::extended);])]) +- AC_LINK_IFELSE(testprog, +- [AC_MSG_RESULT([yes]) +- AC_DEFINE(HAVE_BOOST_REGEX, 1) +- BOOST_LIBS="${BOOST_LIBS} -lboost_regex"], +- [LIBS="${saved_LIBS} -lboost_regex-mt" +- AC_LINK_IFELSE(testprog, +- [AC_MSG_RESULT([yes]) +- AC_DEFINE(HAVE_BOOST_REGEX, 1) +- BOOST_LIBS="${BOOST_LIBS} -lboost_regex-mt"], +- [AC_MSG_RESULT([no]) +- AC_MSG_FAILURE([libboost_regex (Boost C++ Libraries) is not installed, but is required by schroot])])]) +- LIBS="${saved_LIBS}" +-]) ++ [AC_MSG_RESULT([yes]) ++ AC_DEFINE(HAVE_BOOST_REGEX, 1) ++ BOOST_LIBS="${BOOST_LIBS} -lboost_regex"], ++ [LIBS="${saved_LIBS} -lboost_regex-mt" ++ AC_LINK_IFELSE(testprog, ++ [AC_MSG_RESULT([yes]) ++ AC_DEFINE(HAVE_BOOST_REGEX, 1) ++ BOOST_LIBS="${BOOST_LIBS} -lboost_regex-mt"], ++ [AC_MSG_RESULT([no]) ++ AC_MSG_FAILURE([libboost_regex (Boost C++ Libraries) is not installed, but is required by schroot])])]) ++LIBS="${saved_LIBS}" + + AC_MSG_CHECKING([for boost::iostreams in -lboost_iostreams]) + saved_LIBS="${LIBS}" +--- ./bin/schroot-base/schroot-base-run.h-orig 2019-12-09 04:23:51.881428446 +0100 ++++ ./bin/schroot-base/schroot-base-run.h 2019-12-09 04:24:14.934887089 +0100 +@@ -61,8 +61,8 @@ namespace schroot_base + std::cout.imbue(std::locale()); + std::cerr.imbue(std::locale()); + +- bindtextdomain (SBUILD_MESSAGE_CATALOGUE, SCHROOT_LOCALE_DIR); +- textdomain (SBUILD_MESSAGE_CATALOGUE); ++ //bindtextdomain (SBUILD_MESSAGE_CATALOGUE, SCHROOT_LOCALE_DIR); ++ //textdomain (SBUILD_MESSAGE_CATALOGUE); + + typename options_type::ptr opts(new options_type); + main_type kit(opts); +--- ./sbuild/sbuild-feature.h-orig 2019-12-09 04:23:51.881428446 +0100 ++++ ./sbuild/sbuild-feature.h 2019-12-09 04:24:14.934887089 +0100 +@@ -24,6 +24,7 @@ + #include + + #include ++#include + + namespace sbuild + { +--- ./etc/setup.d/20copyfiles-orig 2018-11-03 14:26:12.000000000 +0100 ++++ ./etc/setup.d/20copyfiles 2019-12-09 13:56:45.277145648 +0100 +@@ -39,9 +39,9 @@ copy_file() + if [ -e "$2" ]; then + + # Device and inode +- da=$(/usr/bin/stat --format="%d %i" "$1") ++ da=$(/bin/stat --format="%d %i" "$1") + # This one can fail since it might not exist yet +- db=$(/usr/bin/stat --format="%d %i" "$2" 2>/dev/null || :) ++ db=$(/bin/stat --format="%d %i" "$2" 2>/dev/null || :) + + if [ "$da" = "$db" ]; then + COPY="false" +--- ./etc/setup.d/20nssdatabases-orig 2018-11-03 14:26:12.000000000 +0100 ++++ ./etc/setup.d/20nssdatabases 2019-12-09 13:57:34.397419039 +0100 +@@ -29,7 +29,7 @@ set -e + dup_nss() + { + info "Copying $1 database to $2" +- getent "$1" > "$2" ++ cat "/etc/$1" > "$2" + } + + if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then +@@ -42,9 +42,9 @@ if [ $STAGE = "setup-start" ] || [ $STAG + fi + + # Device and inode +- dr=$(/usr/bin/stat --format="%d %i" "/etc/$db") ++ dr=$(/bin/stat --format="%d %i" "/etc/$db") + # This one can fail since it might not exist yet +- dc=$(/usr/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :) ++ dc=$(/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :) + + # If the database inside and outside the chroot is the + # same, it's very likely that dup_nss would blank the +diff -X /home/jmarcet/.rsync-filter -pru ./etc/profile-templates/all/all/nssdatabases ./etc/profile-templates/all/all/nssdatabases +--- ./etc/profile-templates/all/all/nssdatabases 2018-11-03 14:26:12.000000000 +0100 ++++ ./etc/profile-templates/all/all/nssdatabases 2019-12-09 14:03:12.799297723 +0100 +@@ -4,4 +4,4 @@ + passwd + shadow +-group +-gshadow ++#group ++#gshadow +diff -X /home/jmarcet/.rsync-filter -pru ./etc/profile-templates/buildd/all/nssdatabases ./etc/profile-templates/buildd/all/nssdatabases +--- ./etc/profile-templates/buildd/all/nssdatabases 2018-11-03 14:26:12.000000000 +0100 ++++ ./etc/profile-templates/buildd/all/nssdatabases 2019-12-09 14:03:12.802631074 +0100 +@@ -4,4 +4,4 @@ + passwd + shadow +-group +-gshadow ++#group ++#gshadow +diff -X /home/jmarcet/.rsync-filter -pru ./etc/profile-templates/default/all/nssdatabases ./etc/profile-templates/default/all/nssdatabases +--- ./etc/profile-templates/default/all/nssdatabases 2018-11-03 14:26:12.000000000 +0100 ++++ ./etc/profile-templates/default/all/nssdatabases 2019-12-09 14:03:12.809297778 +0100 +@@ -1,4 +1,4 @@ + services + protocols +-networks ++#networks + hosts +diff -X /home/jmarcet/.rsync-filter -pru ./etc/profile-templates/desktop/all/nssdatabases ./etc/profile-templates/desktop/all/nssdatabases +--- ./etc/profile-templates/desktop/all/nssdatabases 2018-11-03 14:26:12.000000000 +0100 ++++ ./etc/profile-templates/desktop/all/nssdatabases 2019-12-09 14:03:12.812631129 +0100 +@@ -1,4 +1,4 @@ + services + protocols +-networks ++#networks + hosts +diff -X /home/jmarcet/.rsync-filter -pru ./etc/profile-templates/default/linux/fstab ./etc/profile-templates/default/linux/fstab +--- ./etc/profile-templates/default/linux/fstab 2018-11-03 14:26:12.000000000 +0100 ++++ ./etc/profile-templates/default/linux/fstab 2019-12-09 14:18:46.970887080 +0100 +@@ -7,7 +7,7 @@ + # to run additional services in the chroot. However, note that this + # may potentially cause undesirable behaviour on upgrades, such as + # killing services on the host. +-#/run /run none rw,bind 0 0 ++/run /run none rw,bind 0 0 + #/run/lock /run/lock none rw,bind 0 0 +-#/dev/shm /dev/shm none rw,bind 0 0 +-#/run/shm /run/shm none rw,bind 0 0 ++/tmp/shm /dev/shm none rw,bind 0 0 ++/tmp/shm /run/shm none rw,bind 0 0 +diff -X /home/jmarcet/.rsync-filter -pru ./etc/profile-templates/desktop/linux/fstab ./etc/profile-templates/desktop/linux/fstab +--- ./etc/profile-templates/desktop/linux/fstab 2018-11-03 14:26:12.000000000 +0100 ++++ ./etc/profile-templates/desktop/linux/fstab 2019-12-09 14:22:14.148555674 +0100 +@@ -12,7 +12,7 @@ + # to run additional services in the chroot. However, note that this + # may potentially cause undesirable behaviour on upgrades, such as + # killing services on the host. +-#/run /run none rw,bind 0 0 ++/run /run none rw,bind 0 0 + #/run/lock /run/lock none rw,bind 0 0 +-#/dev/shm /dev/shm none rw,bind 0 0 +-#/run/shm /run/shm none rw,bind 0 0 ++/tmp/shm /dev/shm none rw,bind 0 0 ++/tmp/shm /run/shm none rw,bind 0 0 diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile index 16779a7b..4f1a5da7 100644 --- a/admin/sudo/Makefile +++ b/admin/sudo/Makefile @@ -8,15 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sudo -PKG_VERSION:=1.8.21p2 +PKG_VERSION:=1.8.31 PKG_RELEASE:=1 -PKG_LICENSE:=ISC -PKG_LICENSE_FILES:=doc/LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.sudo.ws/dist -PKG_HASH:=74c5746cd33a814e2431c39faf0d76f7f8a697379bd073862e3b156cf0d76368 +PKG_SOURCE_URL:=https://www.sudo.ws/dist +PKG_HASH:=7ea8d97a3cee4c844e0887ea7a1bd80eb54cc98fd77966776cb1a80653ad454f +PKG_MAINTAINER:= +PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=doc/LICENSE +PKG_CPE_ID:=cpe:/a:todd_miller:sudo + +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_BUILD_DEPENDS:=sudo/host @@ -27,8 +31,7 @@ define Package/sudo SECTION:=admin CATEGORY:=Administration TITLE:=Delegate authority to run commands - URL:=http://www.sudo.ws/ - MAINTAINER:=Gergely Kiss + URL:=https://www.sudo.ws/ endef define Package/sudo/description diff --git a/admin/sudo/patches/010-cross-compile-fixes.patch b/admin/sudo/patches/010-cross-compile-fixes.patch index b9c1e799..92eceba3 100644 --- a/admin/sudo/patches/010-cross-compile-fixes.patch +++ b/admin/sudo/patches/010-cross-compile-fixes.patch @@ -1,7 +1,6 @@ -diff -rupN sudo-1.8.11p2.orig/lib/util/Makefile.in sudo-1.8.11p2/lib/util/Makefile.in ---- sudo-1.8.11p2.orig/lib/util/Makefile.in 2014-10-07 22:26:20.000000000 +0200 -+++ sudo-1.8.11p2/lib/util/Makefile.in 2014-12-09 21:44:35.610041162 +0100 -@@ -142,10 +142,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@ +--- a/lib/util/Makefile.in ++++ b/lib/util/Makefile.in +@@ -200,10 +200,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@ esac siglist.c: mksiglist @@ -13,4 +12,4 @@ diff -rupN sudo-1.8.11p2.orig/lib/util/Makefile.in sudo-1.8.11p2/lib/util/Makefi + mksigname > $@ mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/sudo_compat.h $(top_builddir)/config.h - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@ + $(CC) $(CPPFLAGS) $(CFLAGS) $(srcdir)/mksiglist.c -o $@ diff --git a/admin/sudo/patches/020-no-owner-change.patch b/admin/sudo/patches/020-no-owner-change.patch index 417e95de..ec145488 100644 --- a/admin/sudo/patches/020-no-owner-change.patch +++ b/admin/sudo/patches/020-no-owner-change.patch @@ -1,7 +1,6 @@ -diff -rupN sudo-1.8.11p2.orig/Makefile.in sudo-1.8.11p2/Makefile.in ---- sudo-1.8.11p2.orig/Makefile.in 2014-10-07 22:26:20.000000000 +0200 -+++ sudo-1.8.11p2/Makefile.in 2014-12-09 22:00:27.256934143 +0100 -@@ -62,7 +62,7 @@ SHELL = @SHELL@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -64,7 +64,7 @@ SHELL = @SHELL@ SED = @SED@ INSTALL = $(SHELL) $(top_srcdir)/install-sh -c diff --git a/admin/sudo/patches/030-musl-fix-missing-header.patch b/admin/sudo/patches/030-musl-fix-missing-header.patch deleted file mode 100644 index efb7d870..00000000 --- a/admin/sudo/patches/030-musl-fix-missing-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN sudo-1.8.14p3.orig/include/sudo_util.h sudo-1.8.14p3/include/sudo_util.h ---- sudo-1.8.14p3.orig/include/sudo_util.h 2015-07-22 14:22:49.000000000 +0200 -+++ sudo-1.8.14p3/include/sudo_util.h 2015-08-30 18:41:24.509814946 +0200 -@@ -23,6 +23,8 @@ - # include "compat/stdbool.h" - #endif /* HAVE_STDBOOL_H */ - -+#include -+ - /* - * Macros for operating on struct timeval. - */ diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile index e294ff57..c167d3be 100644 --- a/admin/syslog-ng/Makefile +++ b/admin/syslog-ng/Makefile @@ -1,26 +1,33 @@ -include $(TOPDIR)/rules.mk +include $(TOPDIR)/rules.mk PKG_NAME:=syslog-ng -PKG_VERSION:=3.9.1 -PKG_RELEASE:=3 +PKG_VERSION:=3.27.1 +PKG_RELEASE:=2 -PKG_MAINTAINER:=W. Michael Petullo +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING LGPL.txt GPL.txt +PKG_CPE_ID:=cpe:/a:balabit:syslog-ng PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ -PKG_HASH:=5678856a550ae790618fabde9d1447f932ce7a9080d55dca8fc5df1202c70a17 +PKG_SOURCE_URL:=https://github.com/syslog-ng/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_HASH:=c54c633c97f7fd8dd68261cfd784a76211e6e52965178e3aa4d0e32b899d61b3 +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_CONFIG_DEPENDS:= \ + CONFIG_IPV6 \ + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk define Package/syslog-ng SECTION:=admin CATEGORY:=Administration - DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libuuid +libcurl TITLE:=A powerful syslog daemon - URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/ + URL:=https://www.syslog-ng.com/products/open-source-log-management/ + DEPENDS:=+libpcre +glib2 +libopenssl +libpthread +librt +zlib +libdbi +libjson-c +libcurl +libuuid endef define Package/syslog-ng/description @@ -32,6 +39,7 @@ endef define Package/syslog-ng/conffiles /etc/syslog-ng.conf /etc/syslog-ng.d/ +/etc/scl.conf endef define Build/Configure @@ -39,39 +47,67 @@ define Build/Configure $(Build/Configure/Default) endef -CONFIGURE_ARGS += \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) \ - --disable-dependency-tracking \ - --disable-amqp \ - --disable-tcp-wrapper \ - --disable-glibtest \ - --disable-mongodb \ - --disable-java \ - --disable-json \ - --disable-python \ - --disable-spoof-source \ - --disable-sql \ - --disable-linux-caps \ - --disable-smtp \ - --disable-redis \ - --enable-prce \ - -TARGET_CPPFLAGS += \ - -I$(STAGING_DIR)/usr/include/eventlog +CONFIGURE_ARGS += \ + --disable-afsnmp \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) \ + --disable-tcp-wrapper \ + --disable-spoof-source \ + --disable-sql \ + --disable-linux-caps \ + --with-jsonc=system \ + --enable-json=yes \ + --enable-http=yes \ + --disable-smtp \ + --disable-redis \ + --disable-dependency-tracking \ + --disable-python \ + --disable-geoip2 \ + --disable-java \ + --disable-java-modules \ + --with-librabbitmq-client=no \ + --with-mongoc=no CONFIGURE_VARS += \ - LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include" + LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include" define Package/syslog-ng/install - $(INSTALL_DIR) $(1)/usr/lib - $(MAKE) -C $(PKG_BUILD_DIR) \ - install-sbinPROGRAMS install-libLTLIBRARIES \ - install-moduleLTLIBRARIES DESTDIR="$(1)" + cd $(PKG_BUILD_DIR); make DESTDIR=$(1) install + + $(call libtool_remove_files,$(1)) # This removes .la files in folder (including subfolders) /usr/lib + rm -rf $(1)/usr/lib/pkgconfig \ + $(1)/usr/lib/*.a \ + $(1)/usr/include \ + $(1)/var + $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng + $(INSTALL_DIR) $(1)/etc/syslog-ng.d $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc - $(INSTALL_DIR) $(1)/etc/syslog-ng.d/ - $(call libtool_remove_files,$(1)) + touch $(1)/etc/syslog-ng.d/.keep + + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) ./files/logread $(1)/sbin + + $(INSTALL_DIR) $(1)/usr/share/syslog-ng/include/ + $(CP) -r ./files/scl $(1)/usr/share/syslog-ng/include/ +endef + +define Package/syslog-ng/postinst +#!/bin/sh + +[ -n "$$IPKG_INSTROOT" ] || { +/etc/init.d/syslog-ng enable +/etc/init.d/syslog-ng restart +} +endef + +define Package/syslog-ng/prerm +#!/bin/sh + +[ -n "$$IPKG_INSTROOT" ] || { +/etc/init.d/syslog-ng disable +/etc/init.d/syslog-ng stop +} endef $(eval $(call BuildPackage,syslog-ng)) diff --git a/admin/syslog-ng/files/logread b/admin/syslog-ng/files/logread new file mode 100644 index 00000000..9dfe357d --- /dev/null +++ b/admin/syslog-ng/files/logread @@ -0,0 +1,76 @@ +#!/bin/sh +# Shell script compatibility wrapper for /sbin/logread +# +# Copyright (C) 2019 Dirk Brenken +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +logfile="/var/log/messages" + +if [ ! -f "${logfile}" ] +then + printf "%s\n" "Error: logfile not found!" + exit 2 +fi + +usage() +{ + printf "%s\n" "Usage: logread [options]" + printf "%s\n" "Options:" + printf "%5s %-10s%s\n" "-l" "" "Got only the last 'count' messages" + printf "%5s %-10s%s\n" "-e" "" "Filter messages with a regexp" + printf "%5s %-10s%s\n" "-f" "" "Follow log messages" + printf "%5s %-10s%s\n" "-h" "" "Print this help message" +} + +if [ -z "${1}" ] +then + cat "${logfile}" + exit 0 +else + while [ "${1}" ] + do + case "${1}" in + -l) + shift + count="${1//[^0-9]/}" + tail -n "${count:-50}" "${logfile}" + exit 0 + ;; + -e) + shift + pattern="${1}" + grep -E "${pattern}" "${logfile}" + exit 0 + ;; + -f) + tail -f "${logfile}" + exit 0 + ;; + -fe) + shift + pattern="${1}" + tail -f "${logfile}" | grep -E "${pattern}" + exit 0 + ;; + -h|*) + usage + exit 1 + ;; + esac + shift + done +fi diff --git a/admin/syslog-ng/files/scl/network_localhost/detect.sh b/admin/syslog-ng/files/scl/network_localhost/detect.sh new file mode 100755 index 00000000..ef76272c --- /dev/null +++ b/admin/syslog-ng/files/scl/network_localhost/detect.sh @@ -0,0 +1,6 @@ +#!/bin/sh +if [ "$(sysctl net.ipv6.conf.lo.disable_ipv6 | cut -d' ' -f 3)" = "0" ]; then + echo 'network(ip("::1") port(514) transport(udp) ip-protocol(6) )' +else + echo 'network(ip("127.0.0.1") port(514) transport(udp) ip-protocol(4) )' +fi diff --git a/admin/syslog-ng/files/scl/network_localhost/plugin.conf b/admin/syslog-ng/files/scl/network_localhost/plugin.conf new file mode 100644 index 00000000..b2789424 --- /dev/null +++ b/admin/syslog-ng/files/scl/network_localhost/plugin.conf @@ -0,0 +1 @@ +@module confgen context(source) name(network_localhost) exec("`scl-root`/network_localhost/detect.sh") diff --git a/admin/syslog-ng/files/syslog-ng.conf b/admin/syslog-ng/files/syslog-ng.conf index cae24a84..10cb98d8 100644 --- a/admin/syslog-ng/files/syslog-ng.conf +++ b/admin/syslog-ng/files/syslog-ng.conf @@ -1,24 +1,45 @@ -@version:3.9 +############################################################################# +# OpenWrt syslog-ng.conf specific file +# which collects all local logs into a single file called /var/log/messages. +# More details about these settings can be found here: +# https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition + +@version: 3.26 +@include "scl.conf" options { - chain_hostnames(no); + chain_hostnames(no); # Enable or disable the chained hostname format. create_dirs(yes); - flush_lines(0); - keep_hostname(yes); - log_fifo_size(256); - log_msg_size(1024); - stats_freq(0); - flush_lines(0); - use_fqdn(no); + keep_hostname(yes); # Enable or disable hostname rewriting. + log_fifo_size(256); # The number of messages that the output queue can store. + log_msg_size(1024); # Maximum length of a message in bytes. + stats_freq(0); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds. + flush_lines(0); # How many lines are flushed to a destination at a time. + use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname. }; +# syslog-ng gets messages from syslog-ng (internal) and from /dev/log + source src { internal(); unix-dgram("/dev/log"); }; source net { - udp(ip(0.0.0.0) port(514)); + network_localhost(); +}; + +source s_network { + default-network-drivers( + # NOTE: TLS support + # + # the default-network-drivers() source driver opens the TLS + # enabled ports as well, however without an actual key/cert + # pair they will not operate and syslog-ng would display a + # warning at startup. + # + #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert")) + ); }; source kernel { @@ -34,8 +55,13 @@ log { source(net); source(kernel); destination(messages); + + # uncomment this line to open port 514 to receive messages + #source(s_network); }; -# put any customization files in this directory -@include "/etc/syslog-ng.d/" - +# +# Finally, include any user settings last so that s/he can override or +# supplement all "canned" settings inherited from the distribution. +# +@include "/etc/syslog-ng.d/" # Put any customization files in this directory diff --git a/admin/syslog-ng/files/syslog-ng.init b/admin/syslog-ng/files/syslog-ng.init index bb03de67..5ca2d2aa 100644 --- a/admin/syslog-ng/files/syslog-ng.init +++ b/admin/syslog-ng/files/syslog-ng.init @@ -1,31 +1,17 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2006-2019 OpenWrt.org -START=20 -PROG=/usr/sbin/syslog-ng -PROG2=/usr/sbin/syslog-ng-ctl +START=50 -SERVICE_USE_PID=1 -SERVICE_PID_FILE=/var/run/syslog-ng.pid +USE_PROCD=1 -config_file=/etc/syslog-ng.conf - -start() { - [ -f $config_file ] || return 1 - - if ! $PROG -s 2>/dev/null ; then - echo "Couldn't parse $(basename $config_file)" >&2 - exit 1 - fi - - service_start $PROG --process-mode background \ - -p $SERVICE_PID_FILE +start_service() { + [ -f /etc/syslog-ng.conf ] || return 1 + procd_open_instance + procd_set_param command /usr/sbin/syslog-ng --foreground + procd_close_instance } -stop() { - service_stop $PROG -} - -reload() { - $PROG2 reload +reload_service() { + /usr/sbin/syslog-ng-ctl reload } diff --git a/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch b/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch deleted file mode 100644 index 17c005aa..00000000 --- a/admin/syslog-ng/patches/100-use-1.0.2k-threadids.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/lib/crypto.c 2016-12-21 07:57:44.000000000 -0700 -+++ b/lib/crypto.c 2017-03-24 13:19:34.188259018 -0600 -@@ -51,11 +51,20 @@ - } - } - -+#if OPENSSL_VERSION_NUMBER < 0x10000000 - static unsigned long - ssl_thread_id(void) - { - return (unsigned long) get_thread_id(); - } -+ -+#else -+static void -+ssl_thread_id2(CRYPTO_THREADID *id) -+{ -+ CRYPTO_THREADID_set_numeric(id, get_thread_id()); -+} -+#endif - - static void - crypto_init_threading(void) -@@ -68,7 +76,11 @@ - { - g_static_mutex_init(&ssl_locks[i]); - } -+#if OPENSSL_VERSION_NUMBER < 0x10000000 - CRYPTO_set_id_callback(ssl_thread_id); -+#else -+ CRYPTO_THREADID_set_callback(ssl_thread_id2); -+#endif - CRYPTO_set_locking_callback(ssl_locking_callback); - } - diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index af5044e0..ca189c14 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -8,32 +8,73 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zabbix -PKG_VERSION:=3.2.7 -PKG_RELEASE:=2 +PKG_VERSION:=5.0.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=3ea0c299bd69bc728177128740f0476bc1a2c1de438330df5bbd8f5fc6090712 -PKG_SOURCE_URL:=@SF/zabbix +PKG_SOURCE_URL:=https://cdn.zabbix.com/zabbix/sources/stable/5.0/ +PKG_HASH:=20a19e5cf2354ffcbbe24521b04becfc9875e57289c00da71999de60c4a853b6 +PKG_MAINTAINER:=Etienne CHAMPETIER PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:zabbix:zabbix PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf +PKG_CONFIG_DEPENDS:= \ + CONFIG_ZABBIX_GNUTLS \ + CONFIG_ZABBIX_OPENSSL \ + CONFIG_ZABBIX_MYSQL \ + CONFIG_ZABBIX_POSTGRESQL include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +define Package/zabbix-agentd/config +comment "SSL support" + +choice + prompt "Selected SSL library" + default ZABBIX_NOSSL + + config ZABBIX_OPENSSL + bool "OpenSSL" + + config ZABBIX_GNUTLS + bool "GnuTLS" + + config ZABBIX_NOSSL + bool "No SSL support" + +endchoice +endef + +define Package/zabbix-server/config +comment "Database Software" + +choice + prompt "Selected Database Software" + default ZABBIX_POSTGRESQL + + config ZABBIX_MYSQL + bool "MySQL/MariaDB" + + config ZABBIX_POSTGRESQL + bool "PostgreSQL" + +endchoice +endef + define Package/zabbix/Default SECTION:=admin CATEGORY:=Administration + SUBMENU:=Zabbix TITLE:=Zabbix - URL:=http://www.zabbix.com/ - SUBMENU:=zabbix - MAINTAINER:=Etienne CHAMPETIER + URL:=https://www.zabbix.com/ USERID:=zabbix=53:zabbix=53 - DEPENDS += $(ICONV_DEPENDS) + DEPENDS += $(ICONV_DEPENDS) +libpcre +zlib +ZABBIX_GNUTLS:libgnutls +ZABBIX_OPENSSL:libopenssl endef define Package/zabbix-agentd @@ -50,13 +91,13 @@ endef define Package/zabbix-extra-network $(call Package/zabbix/Default) TITLE+= discovery/userparameters for network - DEPENDS = +zabbix-agentd +libuci-lua +lua + DEPENDS = +zabbix-agentd +libubus-lua +lua endef define Package/zabbix-extra-wifi $(call Package/zabbix/Default) TITLE+= discovery/userparameters for wifi - DEPENDS = +zabbix-agentd +libiwinfo-lua +libuci-lua +lua + DEPENDS = +zabbix-agentd +libiwinfo-lua +libubus-lua +lua endef define Package/zabbix-sender @@ -72,31 +113,39 @@ endef define Package/zabbix-server $(call Package/zabbix/Default) TITLE+= server - DEPENDS += +libsqlite3 + DEPENDS += +ZABBIX_POSTGRESQL:libpq +ZABBIX_MYSQL:libmariadbclient +libevent2 +endef + +define Package/zabbix-server-frontend + $(call Package/zabbix/Default) + TITLE+= server-frontend + DEPENDS += +php7 +php7-cgi +ZABBIX_POSTGRESQL:php7-mod-pgsql +ZABBIX_MYSQL:php7-mod-mysqli \ + +php7-mod-gd +php7-mod-bcmath +php7-mod-ctype +php7-mod-xmlreader +php7-mod-xmlwriter \ + +php7-mod-session +php7-mod-sockets +php7-mod-mbstring +php7-mod-gettext endef define Package/zabbix-proxy $(call Package/zabbix/Default) TITLE+= proxy - DEPENDS += +libsqlite3 + DEPENDS += +ZABBIX_POSTGRESQL:libpq +ZABBIX_MYSQL:libmariadbclient +libevent2 endef define Package/zabbix-extra-mac80211/description An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters. It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root. -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. endef define Package/zabbix-extra-network/description An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces. The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0) -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. endef define Package/zabbix-extra-wifi/description An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters. As it uses libiwinfo, it works with all wifi devices supported by openwrt. -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. endef CONFIGURE_ARGS+= \ @@ -105,7 +154,16 @@ CONFIGURE_ARGS+= \ --enable-proxy \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \ --disable-java \ - --with-sqlite3="$(STAGING_DIR)/usr" + $(if $(CONFIG_ZABBIX_MYSQL),--with-mysql) \ + $(if $(CONFIG_ZABBIX_POSTGRESQL),--with-postgresql) \ + --with-libevent=$(STAGING_DIR)/usr/include/libevent \ + --with-libpcre=$(STAGING_DIR)/usr/include \ + --with-zlib=$(STAGING_DIR)/usr/include \ + $(if $(CONFIG_ZABBIX_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr") \ + $(if $(CONFIG_ZABBIX_OPENSSL),--with-openssl="$(STAGING_DIR)/usr") + +CONFIGURE_VARS += \ + ac_cv_header_sys_sysinfo_h=no MAKE_FLAGS += ARCH="linux" @@ -201,10 +259,28 @@ endef define Package/zabbix-extra-network/install $(call Package/zabbix/install/zabbix.conf.d,$(1),network) + $(INSTALL_DIR) $(1)/usr/share/acl.d + $(INSTALL_DATA) ./files/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json +endef + +define Package/zabbix-extra-network/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + killall -HUP ubusd +fi endef define Package/zabbix-extra-wifi/install $(call Package/zabbix/install/zabbix.conf.d,$(1),wifi) + $(INSTALL_DIR) $(1)/usr/share/acl.d + $(INSTALL_DATA) ./files/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json +endef + +define Package/zabbix-extra-wifi/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + killall -HUP ubusd +fi endef define Package/zabbix-sender/install @@ -220,6 +296,11 @@ define Package/zabbix-server/install $(call Package/zabbix/install/etc,$(1),server) endef +define Package/zabbix-server-frontend/install + $(INSTALL_DIR) $(1)/www/zabbix + $(CP) $(PKG_BUILD_DIR)/ui/* $(1)/www/zabbix +endef + define Package/zabbix-proxy/install $(call Package/zabbix/install/sbin,$(1),proxy) $(call Package/zabbix/install/etc,$(1),proxy) @@ -231,5 +312,6 @@ $(eval $(call BuildPackage,zabbix-extra-network)) $(eval $(call BuildPackage,zabbix-extra-wifi)) $(eval $(call BuildPackage,zabbix-sender)) $(eval $(call BuildPackage,zabbix-server)) +$(eval $(call BuildPackage,zabbix-server-frontend)) $(eval $(call BuildPackage,zabbix-proxy)) $(eval $(call BuildPackage,zabbix-get)) diff --git a/admin/zabbix/files/mac80211 b/admin/zabbix/files/mac80211 index a567f85c..fe3024c4 100644 --- a/admin/zabbix/files/mac80211 +++ b/admin/zabbix/files/mac80211 @@ -1,7 +1,7 @@ -#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates +#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates # If you want to know the exact meaning of an UserParameter, you can search in the ieee80211 standard: -# http://standards.ieee.org/getieee802/download/802.11-2012.pdf +# https://standards.ieee.org/getieee802/download/802.11-2012.pdf # example: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145) # mac80211 phy discovery (like 'phy0') diff --git a/admin/zabbix/files/network b/admin/zabbix/files/network index b68e2a50..43a0d394 100644 --- a/admin/zabbix/files/network +++ b/admin/zabbix/files/network @@ -1,9 +1,6 @@ -#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates +#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates # network interface discovery # example: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]} # -UserParameter=netowrt.discovery,lua -l uci -e 'x = uci.cursor(nil, "/var/state");list = "{\"data\":[";x:foreach("network", "interface", function(s) list=list.."{\"{#IF}\":\""..s.ifname.."\", \"{#NET}\":\""..s[".name"].."\"}," end); list=string.gsub(list,",$",""); print(list.."]}")' - - - +UserParameter=netowrt.discovery,lua -l ubus -e 'u=ubus.connect();list="{\"data\":[";dump=u:call("network.interface", "dump", {});for _, intf in ipairs(dump.interface) do list=list.."{\"{#IF}\":\""..intf.device.."\", \"{#NET}\":\""..intf.interface.."\"},";end;list=string.gsub(list,",$","");print(list.."]}")' diff --git a/admin/zabbix/files/wifi b/admin/zabbix/files/wifi index f03d9b41..e79d375d 100644 --- a/admin/zabbix/files/wifi +++ b/admin/zabbix/files/wifi @@ -1,8 +1,7 @@ -#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates +#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates # wifi interface discovery # example: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]} -# ubus call only work as root so you need to run zabbix as root to use wifi.ifdiscovery UserParameter=wifi.ifdiscovery, lua -l ubus -l iwinfo -e 'u=ubus.connect();list="{\"data\":[";stat=u:call("network.wireless", "status", {});for dev, dev_table in pairs(stat) do for i, iface in pairs(dev_table["interfaces"]) do c=iface["config"];i=iface["ifname"];t=iwinfo.type(i);iw=iwinfo[t];e = iw.encryption(i);e = e and e.description or "None";n = table.concat(c["network"]," ");list=list.."{\"{#IF}\":\""..i.."\", \"{#MODE}\":\""..iw.mode(i).."\", \"{#SSID}\":\""..c["ssid"].."\", \"{#NET}\":\""..n.."\", \"{#DEV}\":\""..dev.."\", \"{#ENC}\":\""..e.."\", \"{#TYPE}\":\""..t.."\", \"{#HWMODE}\":\"".."?".."\", \"{#CHANNEL}\":\""..iw.channel(i).."\", \"{#BSSID}\":\""..iw.bssid(i).."\"},";end;end;list=string.gsub(list,",$","");print(list.."]}")' diff --git a/admin/zabbix/files/zabbix-network-ubus-acl.json b/admin/zabbix/files/zabbix-network-ubus-acl.json new file mode 100644 index 00000000..f19f51b1 --- /dev/null +++ b/admin/zabbix/files/zabbix-network-ubus-acl.json @@ -0,0 +1,8 @@ +{ + "user": "zabbix", + "access": { + "network.interface": { + "methods": [ "dump" ] + } + } +} diff --git a/admin/zabbix/files/zabbix-wifi-ubus-acl.json b/admin/zabbix/files/zabbix-wifi-ubus-acl.json new file mode 100644 index 00000000..9d9b093c --- /dev/null +++ b/admin/zabbix/files/zabbix-wifi-ubus-acl.json @@ -0,0 +1,8 @@ +{ + "user": "zabbix", + "access": { + "network.wireless": { + "methods": [ "status" ] + } + } +} diff --git a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch deleted file mode 100644 index f4b5d33a..00000000 --- a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -161,6 +161,10 @@ if test "x$found_resolv" != "xyes"; then - AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)]) - fi - LIBS="${LIBS} ${RESOLV_LIBS}" -+AC_SEARCH_LIBS([res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])]) -+AC_SEARCH_LIBS([__res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])]) -+AC_SEARCH_LIBS([res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])]) -+AC_SEARCH_LIBS([__res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])]) - - dnl ***************************************************************** - dnl * * ---- a/src/libs/zbxsysinfo/common/net.c -+++ b/src/libs/zbxsysinfo/common/net.c -@@ -471,6 +471,7 @@ static int dns_query(AGENT_REQUEST *requ - return SYSINFO_RET_FAIL; - } - -+#if defined(HAVE_RES_MKQUERY) && defined(HAVE_RES_SEND) - if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf)))) - { - SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno))); -@@ -505,6 +506,11 @@ static int dns_query(AGENT_REQUEST *requ - _res.retry = retry; - - res = res_send(buf, res, answer.buffer, sizeof(answer.buffer)); -+#else /* defined(HAVE_RES_QUERY) && defined(HAVE_RES_SEND) */ -+ /* retrand and retry are ignored */ -+ if (-1 == (res = res_query(zone, C_IN, type, answer.buffer, sizeof(answer.buffer)))) -+ return SYSINFO_RET_FAIL; -+#endif - - _res.options = saved_options; - _res.retrans = saved_retrans; diff --git a/admin/zabbix/patches/003-change-user-and-foreground.patch b/admin/zabbix/patches/003-change-user-and-foreground.patch deleted file mode 100644 index 6779e471..00000000 --- a/admin/zabbix/patches/003-change-user-and-foreground.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/src/libs/zbxnix/daemon.c -+++ b/src/libs/zbxnix/daemon.c -@@ -300,11 +300,14 @@ int daemon_start(int allow_root, const c - - if (0 == allow_root && 0 == getuid()) /* running as root? */ - { -+#if 0 -+/* allow changing user and foreground */ - if (0 != (flags & ZBX_TASK_FLAG_FOREGROUND)) - { - zbx_error("cannot run as root!"); - exit(EXIT_FAILURE); - } -+#endif - - if (NULL == user) - user = "zabbix"; diff --git a/admin/zabbix/patches/010-change-agentd-config.patch b/admin/zabbix/patches/010-change-agentd-config.patch index 8b16b280..f7628274 100644 --- a/admin/zabbix/patches/010-change-agentd-config.patch +++ b/admin/zabbix/patches/010-change-agentd-config.patch @@ -27,7 +27,7 @@ ### Option: LogFileSize # Maximum size of log file in MB. # 0 - disable automatic log rotation. -@@ -114,6 +111,7 @@ Server=127.0.0.1 +@@ -138,6 +135,7 @@ Server=127.0.0.1 # Range: 0-100 # Default: # StartAgents=3 @@ -35,7 +35,7 @@ ##### Active checks related -@@ -129,8 +127,6 @@ Server=127.0.0.1 +@@ -153,8 +151,6 @@ Server=127.0.0.1 # Default: # ServerActive= @@ -44,7 +44,7 @@ ### Option: Hostname # Unique, case sensitive hostname. # Required for active checks and must match hostname as configured on the server. -@@ -140,8 +136,6 @@ ServerActive=127.0.0.1 +@@ -164,8 +160,6 @@ ServerActive=127.0.0.1 # Default: # Hostname= @@ -53,7 +53,7 @@ ### Option: HostnameItem # Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. # Does not support UserParameters or aliases. -@@ -259,8 +253,8 @@ Hostname=Zabbix server +@@ -305,8 +299,8 @@ Hostname=Zabbix server # Include= # Include=/usr/local/etc/zabbix_agentd.userparams.conf diff --git a/admin/zabbix/patches/100-musl-compat.patch b/admin/zabbix/patches/100-musl-compat.patch deleted file mode 100644 index 61aeb9e0..00000000 --- a/admin/zabbix/patches/100-musl-compat.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -51,7 +51,7 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string - syslog.h time.h errno.h sys/types.h sys/stat.h netinet/in.h \ - math.h sys/socket.h dirent.h ctype.h \ - mtent.h fcntl.h sys/param.h arpa/inet.h \ -- sys/vfs.h sys/pstat.h sys/sysinfo.h sys/statvfs.h sys/statfs.h \ -+ sys/vfs.h sys/pstat.h sys/statvfs.h sys/statfs.h \ - sys/socket.h sys/loadavg.h arpa/inet.h \ - sys/vmmeter.h strings.h vm/vm_param.h \ - sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \ -@@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string - Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \ - execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \ - dlfcn.h sys/utsname.h) -+AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [ -+#ifdef HAVE_LINUX_KERNEL_H -+# include -+#endif -+]) - AC_CHECK_HEADERS(resolv.h, [], [], [ - #ifdef HAVE_SYS_TYPES_H - # include diff --git a/admin/zabbix/patches/110-reproducible-builds.patch b/admin/zabbix/patches/110-reproducible-builds.patch index f7d03fa9..72f92acc 100644 --- a/admin/zabbix/patches/110-reproducible-builds.patch +++ b/admin/zabbix/patches/110-reproducible-builds.patch @@ -1,13 +1,11 @@ -Index: zabbix-3.2.7/src/libs/zbxcommon/str.c -=================================================================== ---- zabbix-3.2.7.orig/src/libs/zbxcommon/str.c -+++ zabbix-3.2.7/src/libs/zbxcommon/str.c -@@ -51,7 +51,7 @@ static const char help_message_footer[] +--- a/src/libs/zbxcommon/str.c ++++ b/src/libs/zbxcommon/str.c +@@ -54,7 +54,7 @@ static const char help_message_footer[] void version(void) { printf("%s (Zabbix) %s\n", title_message, ZABBIX_VERSION); - printf("Revision %s %s, compilation time: %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE, __DATE__, __TIME__); + printf("Revision %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE); puts(copyright_message); - } - + #if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL) + printf("\n"); diff --git a/devel/asu/Makefile b/devel/asu/Makefile new file mode 100644 index 00000000..54d55f24 --- /dev/null +++ b/devel/asu/Makefile @@ -0,0 +1,56 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=asu +PKG_VERSION:=0.2.3 +PKG_RELEASE:=3 + +PKG_LICENSE:=GPL-3.0 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=e60027cd531cc5b9b20d3321acc06fdf0cdd894004919800575b8235343ba8ef + +PKG_BUILD_DEPENDS:=python3 + +include ../../lang/python/pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../../lang/python/python3-package.mk + +IMAGEBUILDER_DEPENDS:= \ + @x86_64 +bash +bzip2 +coreutils +coreutils-stat +diffutils +file \ + +gawk +gcc +getopt +git +git-http +libncurses +make +patch +perl \ + +perlbase-attributes +perlbase-findbin +perlbase-getopt \ + +perlbase-thread +python3-light +tar +unzip +wget +xz +xzdiff \ + +xzgrep +xzless +xz-utils +zlib-dev + +define Package/asu + SECTION:=devel + CATEGORY:=Development + TITLE:=attended sysupgrade image server + MAINTAINER:=Paul Spooren + URL:=http://github.com/aparcar/gsoc17-attended-sysupgrade/ + DEPENDS:=$(IMAGEBUILDER_DEPENDS) +pgsql-server +psqlodbcw \ + +python3-ctypes +python3-distutils +python3-flask \ + +gunicorn3 +python3-openssl +python3-pyodbc +python3-yaml \ + +libustream-mbedtls +ca-certificates +gnupg + USERID:=asu:asu +endef + +define Package/asu/description + Build server to deliver OpenWrt/LEDE sysupgrade images +endef + +define Py3Package/asu/install + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/asu.defaults $(1)/etc/uci-defaults/99-asu + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/asu.init $(1)/etc/init.d/asu + $(INSTALL_DIR) $(1)/etc/asu + $(INSTALL_CONF) $(PKG_BUILD_DIR)/asu/utils/config.yml.default $(1)/etc/asu/config.yml +endef + +$(eval $(call Py3Package,asu)) +$(eval $(call BuildPackage,asu)) diff --git a/devel/asu/files/asu.defaults b/devel/asu/files/asu.defaults new file mode 100644 index 00000000..04fdf072 --- /dev/null +++ b/devel/asu/files/asu.defaults @@ -0,0 +1,22 @@ +#!/bin/sh + +asu_password=$(dd if=/dev/urandom bs=16 count=1 2>/dev/null | sha256sum | cut -d' ' -f1) +asu_tables="$(ls -1 /usr/lib/python*/site-packages/asu/utils/tables.sql | head -n 1)" + +uci -q batch < -PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE:=GPL-3.0-or-later PKG_INSTALL:=1 diff --git a/devel/automake/Makefile b/devel/automake/Makefile index 87a69b18..2eb8dc62 100644 --- a/devel/automake/Makefile +++ b/devel/automake/Makefile @@ -8,16 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=automake -PKG_VERSION:=1.15 -PKG_RELEASE:=4 +PKG_VERSION:=1.16.2 +PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/automake PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=9908c75aabd49d13661d6dcb1bc382252d22cc77bf733a2d55e87f2aa2db8636 +PKG_HASH:=ccc459de3d710e066ab9e12d2f119bd164a08c9341ca24ba22c9adaa179eedd0 + PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE:=GPL-3.0-or-later +PKG_CPE_ID:=cpe:/a:gnu:automake PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -36,22 +39,24 @@ endef FIX_PATHS = $(SED) '1c \#!/usr/bin/perl' -e 's| /[^ ]*/bin/perl| /usr/bin/perl|g' +AM_VERSION:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION))) + define Package/automake/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(PKG_VERSION) \ - $(1)/usr/bin/automake-$(PKG_VERSION) - $(LN) automake-$(PKG_VERSION) $(1)/usr/bin/automake - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(PKG_VERSION) \ - $(1)/usr/bin/aclocal-$(PKG_VERSION) - $(LN) aclocal-$(PKG_VERSION) $(1)/usr/bin/aclocal - $(FIX_PATHS) $(1)/usr/bin/automake-$(PKG_VERSION) - $(FIX_PATHS) $(1)/usr/bin/aclocal-$(PKG_VERSION) - $(INSTALL_DIR) $(1)/usr/share/automake-$(PKG_VERSION) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(AM_VERSION) \ + $(1)/usr/bin/automake-$(AM_VERSION) + $(LN) automake-$(AM_VERSION) $(1)/usr/bin/automake + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(AM_VERSION) \ + $(1)/usr/bin/aclocal-$(AM_VERSION) + $(LN) aclocal-$(AM_VERSION) $(1)/usr/bin/aclocal + $(FIX_PATHS) $(1)/usr/bin/automake-$(AM_VERSION) + $(FIX_PATHS) $(1)/usr/bin/aclocal-$(AM_VERSION) + $(INSTALL_DIR) $(1)/usr/share/automake-$(AM_VERSION) for dir in \ - automake-$(PKG_VERSION) automake-$(PKG_VERSION)/Automake \ - automake-$(PKG_VERSION)/am aclocal \ - aclocal-$(PKG_VERSION) aclocal-$(PKG_VERSION)/internal \ + automake-$(AM_VERSION) automake-$(AM_VERSION)/Automake \ + automake-$(AM_VERSION)/am aclocal \ + aclocal-$(AM_VERSION) aclocal-$(AM_VERSION)/internal \ ; do \ $(INSTALL_DIR) $(1)/usr/share/$$$$dir; \ for file in $$$$(cd $(PKG_INSTALL_DIR) && \ diff --git a/devel/diffutils/Makefile b/devel/diffutils/Makefile index 643eaf9a..65a41f8e 100644 --- a/devel/diffutils/Makefile +++ b/devel/diffutils/Makefile @@ -8,15 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=diffutils -PKG_VERSION:=3.6 -PKG_RELEASE:=1 +PKG_VERSION:=3.7 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/diffutils -PKG_HASH:=d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6 +PKG_HASH:=b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26 + PKG_MAINTAINER:=Roger D PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILES:=COPYING +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -27,6 +30,10 @@ define Package/diffutils DEPENDS:=+USE_GLIBC:librt TITLE:=diffutils URL:=http://www.gnu.org/software/diffutils/ + ALTERNATIVES:=\ + 200:/usr/bin/cmp:/usr/bin/gnu-cmp \ + 200:/usr/bin/diff:/usr/bin/gnu-diff \ + endef define Package/diffutils/description @@ -35,28 +42,14 @@ define Package/diffutils/description endef CONFIGURE_VARS += \ + gl_cv_func_getopt_gnu=yes \ ac_cv_func_mempcpy=n -TARGET_CFLAGS += --std=gnu99 define Package/diffutils/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/ -endef - -define Package/diffutils/preinst -#!/bin/sh -for x in sdiff diff3 diff cmp; do - [ -L "$${IPKG_INSTROOT}/usr/bin/$$x" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/$$x" -done -exit 0 -endef - -define Package/diffutils/postrm -#!/bin/sh -for x in sdiff diff3 diff cmp; do - /bin/busybox $$x -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/$$x -done -exit 0 + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3} $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/diff $(1)/usr/bin/gnu-diff + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmp $(1)/usr/bin/gnu-cmp endef $(eval $(call BuildPackage,diffutils)) diff --git a/devel/gcc/Config.in b/devel/gcc/Config.in new file mode 100644 index 00000000..f435b456 --- /dev/null +++ b/devel/gcc/Config.in @@ -0,0 +1,34 @@ +# gcc library configuration +menu "Libraries" + depends on PACKAGE_gcc + config INCLUDE_STATIC_LIBC + bool "Include static libc on target" + help + Copies libc.a to target device + Increases the size of an already + very large package + default n + config INCLUDE_STATIC_LIBPTHREAD + bool "Include static libptread on target" + help + Copies libpthread.a to target device + Increases the size of an already + very large package + default n + config INCLUDE_STATIC_LIBSTDC + bool "Include static libstdc++ on target" + help + Copies libstdc++.a to target device + Increases the size of an already + very large package + default n + config INCLUDE_STATIC_LINK_SPEC + depends on INCLUDE_STATIC_LIBSTDC + bool "Generate spec file for easy static c++ linking on target" + help + Creates a spec file for gcc to eliminate the need for + -lstdc++, libgcc_pic and -static-libstdc flags when + statically linking c++ programs + default n +endmenu + diff --git a/devel/gcc/Makefile b/devel/gcc/Makefile index 716f593d..00f8e190 100644 --- a/devel/gcc/Makefile +++ b/devel/gcc/Makefile @@ -6,19 +6,63 @@ # include $(TOPDIR)/rules.mk +define Package/gcc/description + Build a native toolchain for compiling on target + device. +endef + + +define Package/gcc + SECTION:=devel + CATEGORY:=Development + TITLE:=gcc + MAINTAINER:=Noble Pepper + DEPENDS:= +binutils +libstdcpp @!arc + MENU:=1 +endef PKG_NAME:=gcc -PKG_VERSION:=5.4.0 -PKG_RELEASE:=3 +# PKG_VERSION=7.3.0 +PKG_VERSION=7.4.0 +PKG_RELEASE:=5 PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) -PKG_HASH:=608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_INSTALL:=1 PKG_FIXUP:=libtool PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/package.mk +PKG_CPE_ID:=cpe:/a:gnu:gcc +ifeq ($(PKG_VERSION),7.3.0) + PKG_HASH:=832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c +endif +ifeq ($(PKG_VERSION),7.4.0) + PKG_HASH:=eddde28d04f334aec1604456e536416549e9b1aa137fc69204e65eb0c009fe51 +endif + + +define Package/gcc/config + source "$(SOURCE)/Config.in" +endef + +ifeq ($(CONFIG_INCLUDE_STATIC_LIBC),y) + COPY_STATIC_LIBC=cp -a $(TOOLCHAIN_DIR)/lib/libc.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) +endif + +ifeq ($(CONFIG_INCLUDE_STATIC_LIBPTHREAD),y) + COPY_STATIC_LIBPTHREAD=cp -a $(TOOLCHAIN_DIR)/lib/libpthread.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) +endif + +ifeq ($(CONFIG_INCLUDE_STATIC_LIBSTDC),y) + COPY_STATIC_LIBSTDC=cp -a $(TOOLCHAIN_DIR)/lib/libstdc++.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) +endif + +ifeq ($(CONFIG_INCLUDE_STATIC_LINK_SPEC),y) + INSTALL_STATIC_SPEC=g++ -dumpspecs |sed s/--start-group}\ %G\ %L\ /--start-group}\ %G\ %L\ -lstdc++\ -lgcc_pic\ / >/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/specs + REMOVE_STATIC_SPEC=rm /usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/specs +endif + +include $(INCLUDE_DIR)/package.mk TARGET_LANGUAGES:="c,c++" BUGURL=https://dev.openwrt.org/ PKGVERSION=OpenWrt GCC $(PKG_VERSION) @@ -37,43 +81,30 @@ ifneq ($(CONFIG_SOFT_FLOAT),y) ARM_FLOAT_OPTION:= --with-float=hard endif endif - -define Package/gcc - SECTION:=devel - CATEGORY:=Development - TITLE:=gcc - MAINTAINER:=Noble Pepper - DEPENDS:= +binutils +libstdcpp -endef - -define Package/gcc/description - build a native toolchain for compiling on target -endef - -GMPSRC=gmp-4.3.2 +GMPSRC=gmp-6.1.0 define Download/gmp URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ FILE:=$(GMPSRC).tar.bz2 - HASH:=936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775 + HASH:=498449a994efeba527885c10405993427995d3f86b8768d8cdf8d9dd7c6b73e8 endef $(eval $(call Download,gmp)) -MPCSRC=mpc-0.8.1 +MPCSRC=mpc-1.0.3 define Download/mpc URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ FILE:=$(MPCSRC).tar.gz - HASH:=e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4 + HASH:=617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3 endef $(eval $(call Download,mpc)) -MPFRSRC=mpfr-2.4.2 +MPFRSRC=mpfr-3.1.4 define Download/mpfr URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ FILE:=$(MPFRSRC).tar.bz2 - HASH:=c7e75a08a8d49d2082e4caee1591a05d11b9d5627514e678f02d66a124bcf2ba + HASH:=d3103a80cdad2407ed581f3618c4bed04e0c92d1cf771a65ead662cc397f7775 endef $(eval $(call Download,mpfr)) @@ -90,11 +121,11 @@ define Build/Prepare # poor man's fix for `none-openwrt-linux' not recognized when building with musl cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpfr/ cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/gmp/ + chmod u+w $(PKG_BUILD_DIR)/mpc/config.sub cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpc/ endef -TARGET_CXX += -std=gnu++03 -CONFIGURE_ARGS += CXX_FOR_TARGET="$(TARGET_CXX)" CXXFLAGS_FOR_TARGET="-g -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS" +CONFIGURE_ARGS += CXXFLAGS_FOR_TARGET="-g -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS" define Build/Configure (cd $(PKG_BUILD_DIR); rm -f config.cache; \ @@ -118,6 +149,7 @@ define Build/Configure --disable-libvtv \ --disable-libcilkrts \ --disable-libmudflap \ + --disable-libmpx \ --disable-multilib \ --disable-libgomp \ --disable-libquadmath \ @@ -128,6 +160,7 @@ define Build/Configure --prefix=/usr \ --libexecdir=/usr/lib \ --with-local-prefix=/usr \ + --with-stage1-ldflags=-lstdc++ \ $(ARM_FLOAT_OPTION) \ $(SOFT_FLOAT_CONFIG_OPTION) \ $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ @@ -149,7 +182,7 @@ ifeq ($(CONFIG_SOFT_FLOAT),y) endif ENVCFLAGS+=" -ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib" +ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib, -lstdc++" define Package/gcc/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) @@ -165,6 +198,9 @@ define Package/gcc/install cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) cp -a $(TOOLCHAIN_DIR)/lib/libm.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) + $(COPY_STATIC_LIBC) + $(COPY_STATIC_LIBPTHREAD) + $(COPY_STATIC_LIBSTDC) rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgo* rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libcc1* echo '#!/bin/sh' > $(1)/usr/bin/gcc_env.sh @@ -173,4 +209,14 @@ define Package/gcc/install chmod +x $(1)/usr/bin/gcc_env.sh endef +define Package/gcc/postinst + #!/bin/sh + $(INSTALL_STATIC_SPEC) +endef + +define Package/gcc/postrm + #!/bin/sh + $(REMOVE_STATIC_SPEC) +endef + $(eval $(call BuildPackage,gcc)) diff --git a/devel/gcc/README b/devel/gcc/README index 58db4740..06ace1a8 100644 --- a/devel/gcc/README +++ b/devel/gcc/README @@ -1,8 +1,8 @@ Native GCC that runs on target. -To save disk space, this GCC only supports dynamic linking on the target box, -there are no static libraries shipped except libgcc.a on those architectures -that need it. +To save disk space, this GCC uses dynamic linking on the target box. There +are configuration options to include libstdc++.a, libc.a and libpthread.a +if staticly linked binaries are needed. For now, this was only tested on arm (EABI) and mips targets. Others to be done... diff --git a/devel/gcc/patches/001-revert_register_mode_search.patch b/devel/gcc/patches/001-revert_register_mode_search.patch index 06373eb6..63e3fee0 100644 --- a/devel/gcc/patches/001-revert_register_mode_search.patch +++ b/devel/gcc/patches/001-revert_register_mode_search.patch @@ -1,3 +1,15 @@ +commit 31285a20390a5e53a74a2a71d1b5c82f366ddd5a +Author: Felix Fietkau +Date: Tue May 6 11:49:05 2014 +0000 + + gcc: revert an upstream patch that is causing a regression on powerpc + + https://forum.openwrt.org/viewtopic.php?pid=232494#p232494 + + Signed-off-by: Felix Fietkau + + SVN-Revision: 40709 + Revert of: commit 275035b56823b26d5fb7e90fad945b998648edf2 @@ -14,7 +26,7 @@ Date: Thu Sep 5 14:09:07 2013 +0000 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c -@@ -665,35 +665,40 @@ choose_hard_reg_mode (unsigned int regno +@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno mode = GET_MODE_WIDER_MODE (mode)) if ((unsigned) hard_regno_nregs[regno][mode] == nregs && HARD_REGNO_MODE_OK (regno, mode) diff --git a/devel/gcc/patches/002-case_insensitive.patch b/devel/gcc/patches/002-case_insensitive.patch index b3d2dbe2..3442076d 100644 --- a/devel/gcc/patches/002-case_insensitive.patch +++ b/devel/gcc/patches/002-case_insensitive.patch @@ -1,3 +1,13 @@ +commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e +Author: Felix Fietkau +Date: Sun Oct 19 21:45:51 2014 +0000 + + gcc: do not assume that the Mac OS X filesystem is case insensitive + + Signed-off-by: Felix Fietkau + + SVN-Revision: 42973 + --- a/include/filenames.h +++ b/include/filenames.h @@ -43,11 +43,6 @@ extern "C" { diff --git a/devel/gcc/patches/003-mpfr-longlong-mips.patch b/devel/gcc/patches/003-mpfr-longlong-mips.patch deleted file mode 100644 index 0ab9fe50..00000000 --- a/devel/gcc/patches/003-mpfr-longlong-mips.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naurd mpfr-2.4.2-a/mpfr-longlong.h mpfr-2.4.2-b/mpfr-longlong.h ---- -a/mpfr-2.4.2/mpfr-longlong.h 2009-11-30 02:43:08.000000000 +0000 -+++ -b/mpfr-2.4.2/mpfr-longlong.h 2009-12-18 12:04:29.000000000 +0000 -@@ -1011,7 +1011,15 @@ - #endif /* __m88000__ */ - - #if defined (__mips) && W_TYPE_SIZE == 32 --#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 -+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UDItype _r; \ -+ _r = (UDItype) u * v; \ -+ (w1) = _r >> 32; \ -+ (w0) = (USItype) _r; \ -+ } while (0) -+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 - #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) - #else -@@ -1024,7 +1032,16 @@ - #endif /* __mips */ - - #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 --#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 -+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) -+typedef unsigned int UTItype __attribute__ ((mode (TI))); -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UTItype _r; \ -+ _r = (UTItype) u * v; \ -+ (w1) = _r >> 64; \ -+ (w0) = (UDItype) _r; \ -+ } while (0) -+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 - #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) - #else diff --git a/devel/gcc/patches/010-documentation.patch b/devel/gcc/patches/010-documentation.patch index 07064a97..0106814f 100644 --- a/devel/gcc/patches/010-documentation.patch +++ b/devel/gcc/patches/010-documentation.patch @@ -1,6 +1,18 @@ +commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 +Author: Luka Perkov +Date: Tue Feb 26 16:16:33 2013 +0000 + + gcc: don't build documentation + + This closes #13039. + + Signed-off-by: Luka Perkov + + SVN-Revision: 35807 + --- a/gcc/Makefile.in +++ b/gcc/Makefile.in -@@ -2941,18 +2941,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) +@@ -3121,18 +3121,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) doc/gccint.info: $(TEXI_GCCINT_FILES) doc/cppinternals.info: $(TEXI_CPPINT_FILES) diff --git a/devel/gcc/patches/020-no-plt-backport.patch b/devel/gcc/patches/020-no-plt-backport.patch deleted file mode 100644 index b9702c95..00000000 --- a/devel/gcc/patches/020-no-plt-backport.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gcc/calls.c -+++ b/gcc/calls.c -@@ -225,6 +225,12 @@ prepare_call_address (tree fndecl_or_typ - && targetm.small_register_classes_for_mode_p (FUNCTION_MODE)) - ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) - : memory_address (FUNCTION_MODE, funexp)); -+ else if (flag_pic && !flag_plt && fndecl_or_type -+ && TREE_CODE (fndecl_or_type) == FUNCTION_DECL -+ && !targetm.binds_local_p (fndecl_or_type)) -+ { -+ funexp = force_reg (Pmode, funexp); -+ } - else if (! sibcallp) - { - #ifndef NO_FUNCTION_CSE ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1779,6 +1779,10 @@ fpie - Common Report Var(flag_pie,1) Negative(fPIC) - Generate position-independent code for executables if possible (small mode) - -+fplt -+Common Report Var(flag_plt) Init(1) -+Use PLT for PIC calls (-fno-plt: load the address from GOT at call site) -+ - fplugin= - Common Joined RejectNegative Var(common_deferred_options) Defer - Specify a plugin to load diff --git a/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch b/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch deleted file mode 100644 index e88af340..00000000 --- a/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -8001,9 +8001,17 @@ mask_low_and_shift_p (machine_mode mode, - bool - and_operands_ok (machine_mode mode, rtx op1, rtx op2) - { -- return (memory_operand (op1, mode) -- ? and_load_operand (op2, mode) -- : and_reg_operand (op2, mode)); -+ if (!memory_operand (op1, mode)) -+ return and_reg_operand (op2, mode); -+ -+ if (!and_load_operand (op2, mode)) -+ return false; -+ -+ if (!TARGET_MIPS16 || si_mask_operand(op2, mode)) -+ return true; -+ -+ op1 = XEXP (op1, 0); -+ return !(REG_P (op1) && REGNO (op1) == STACK_POINTER_REGNUM); - } - - /* The canonical form of a mask-low-and-shift-left operation is diff --git a/devel/gcc/patches/100-uclibc-conf.patch b/devel/gcc/patches/100-uclibc-conf.patch deleted file mode 100644 index ff9ad94f..00000000 --- a/devel/gcc/patches/100-uclibc-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/contrib/regression/objs-gcc.sh -+++ b/contrib/regression/objs-gcc.sh -@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- a/libjava/classpath/ltconfig -+++ b/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/devel/gcc/patches/110-Fix-MIPS-PR-84790.patch b/devel/gcc/patches/110-Fix-MIPS-PR-84790.patch new file mode 100644 index 00000000..643c5e68 --- /dev/null +++ b/devel/gcc/patches/110-Fix-MIPS-PR-84790.patch @@ -0,0 +1,20 @@ +Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. +MIPS16 functions have a static assembler prologue which clobbers +registers v0 and v1. Add these register clobbers to function call +instructions. + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -3098,6 +3098,12 @@ mips_emit_call_insn (rtx pattern, rtx or + emit_insn (gen_update_got_version ()); + } + ++ if (TARGET_MIPS16 && TARGET_USE_GOT) ++ { ++ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); ++ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); ++ } ++ + if (TARGET_MIPS16 + && TARGET_EXPLICIT_RELOCS + && TARGET_CALL_CLOBBERED_GP) diff --git a/devel/gcc/patches/200-musl_config.patch b/devel/gcc/patches/200-musl_config.patch deleted file mode 100644 index b9a5b282..00000000 --- a/devel/gcc/patches/200-musl_config.patch +++ /dev/null @@ -1,309 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 08:25:47 +0000 (+0000) -Subject: [PATCH 2/13] musl libc config -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb - -[PATCH 2/13] musl libc config - -2015-05-08 Gregor Richards - Szabolcs Nagy - - * config.gcc (LIBC_MUSL): New tm_defines macro. - * config/linux.h (OPTION_MUSL): Define. - (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,) - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,) - (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) - (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) - (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. - * config/linux.opt (mmusl): New option. - * doc/invoke.texi (GNU/Linux Options): Document -mmusl. - * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. - (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. - * configure: Regenerate. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -575,7 +575,7 @@ case ${target} in - esac - - # Common C libraries. --tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" -+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" - - # 32-bit x86 processors supported by --with-arch=. Each processor - # MUST be separated by exactly one space. -@@ -720,6 +720,9 @@ case ${target} in - *-*-*uclibc*) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" - ;; -+ *-*-*musl*) -+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" -+ ;; - *) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" - ;; ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ -@@ -50,21 +52,25 @@ see the files COPYING3 and COPYING.RUNTI - } while (0) - - /* Determine which dynamic linker to use depending on whether GLIBC or -- uClibc or Bionic is the default C library and whether -- -muclibc or -mglibc or -mbionic has been passed to change the default. */ -+ uClibc or Bionic or musl is the default C library and whether -+ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change -+ the default. */ - --#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ -- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" -+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ -+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" - - #if DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) - #elif DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) - #elif DEFAULT_LIBC == LIBC_BIONIC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) - #else - #error "Unsupported DEFAULT_LIBC" - #endif /* DEFAULT_LIBC */ -@@ -81,24 +87,100 @@ see the files COPYING3 and COPYING.RUNTI - #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" - #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" -+/* Should be redefined for each target that supports musl. */ -+#define MUSL_DYNAMIC_LINKER "/dev/null" -+#define MUSL_DYNAMIC_LINKER32 "/dev/null" -+#define MUSL_DYNAMIC_LINKER64 "/dev/null" -+#define MUSL_DYNAMIC_LINKERX32 "/dev/null" - - #define GNU_USER_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ -- BIONIC_DYNAMIC_LINKER) -+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - #define GNU_USER_DYNAMIC_LINKER32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ -- BIONIC_DYNAMIC_LINKER32) -+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ -- BIONIC_DYNAMIC_LINKER64) -+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - #define GNU_USER_DYNAMIC_LINKERX32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ -- BIONIC_DYNAMIC_LINKERX32) -+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) - - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) - -+/* musl avoids problematic includes by rearranging the include directories. -+ * Unfortunately, this is mostly duplicated from cppdefault.c */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif -+ - #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ - /* This is a *uclinux* target. We don't define below macros to normal linux - versions, because doing so would require *uclinux* targets to include ---- a/gcc/config/linux.opt -+++ b/gcc/config/linux.opt -@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l - Use GNU C library - - muclibc --Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) -+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) -+Use musl C library ---- a/gcc/configure -+++ b/gcc/configure -@@ -27833,6 +27833,9 @@ if test "${gcc_cv_libc_provides_ssp+set} - else - gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -27865,6 +27868,7 @@ fi - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" -@@ -27961,6 +27965,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5287,6 +5287,9 @@ AC_CACHE_CHECK(__stack_chk_fail in targe - gcc_cv_libc_provides_ssp, - [gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -5313,6 +5316,7 @@ AC_CACHE_CHECK(__stack_chk_fail in targe - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], -@@ -5386,6 +5390,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -667,7 +667,7 @@ Objective-C and Objective-C++ Dialects}. - -mcpu=@var{cpu}} - - @emph{GNU/Linux Options} --@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol -+@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol - -tno-android-cc -tno-android-ld} - - @emph{H8/300 Options} -@@ -15340,13 +15340,19 @@ These @samp{-m} options are defined for - @item -mglibc - @opindex mglibc - Use the GNU C library. This is the default except --on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. -+on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and -+@samp{*-*-linux-*android*} targets. - - @item -muclibc - @opindex muclibc - Use uClibc C library. This is the default on - @samp{*-*-linux-*uclibc*} targets. - -+@item -mmusl -+@opindex mmusl -+Use the musl C library. This is the default on -+@samp{*-*-linux-*musl*} targets. -+ - @item -mbionic - @opindex mbionic - Use Bionic C library. This is the default on diff --git a/devel/gcc/patches/201-musl_arm.patch b/devel/gcc/patches/201-musl_arm.patch deleted file mode 100644 index 27a26afc..00000000 --- a/devel/gcc/patches/201-musl_arm.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: ktkachov -Date: Wed, 27 May 2015 13:17:11 +0000 (+0000) -Subject: [PATCH 4/13] arm musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4 - -[PATCH 4/13] arm musl support - -On behalf of szabolcs.nagy@arm.com - -2015-05-27 Gregor Richards - - * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -77,6 +77,23 @@ - %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ - %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" - -+/* For ARM musl currently supports four dynamic linkers: -+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI -+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI -+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB -+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB -+ musl does not support the legacy OABI mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, EL. */ -+#undef MUSL_DYNAMIC_LINKER -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" -+#endif -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC diff --git a/devel/gcc/patches/202-musl_mips.patch b/devel/gcc/patches/202-musl_mips.patch deleted file mode 100644 index 816dd8d1..00000000 --- a/devel/gcc/patches/202-musl_mips.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 15:16:50 +0000 (+0000) -Subject: [PATCH 6/13] mips musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8 - -[PATCH 6/13] mips musl support - -2015-05-08 Gregor Richards - Szabolcs Nagy - - * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define. - (GNU_USER_DYNAMIC_LINKERN32): Update. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -37,7 +37,13 @@ along with GCC; see the file COPYING3. - #define UCLIBC_DYNAMIC_LINKERN32 \ - "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" - -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" -+ - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ -- BIONIC_DYNAMIC_LINKERN32) -+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/devel/gcc/patches/203-musl_powerpc.patch b/devel/gcc/patches/203-musl_powerpc.patch deleted file mode 100644 index b4f34e81..00000000 --- a/devel/gcc/patches/203-musl_powerpc.patch +++ /dev/null @@ -1,209 +0,0 @@ - -gcc/Changelog: - -2015-04-24 Gregor Richards - Szabolcs Nagy - - * config.gcc (secure_plt): Add *-linux*-musl*. - * config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64): Define. - (GNU_USER_DYNAMIC_LINKER32): Update. - (GNU_USER_DYNAMIC_LINKER64): Update. - (CHOOSE_DYNAMIC_LINKER): Update. - - * config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define. - * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update. - (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,) - (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) - (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) - (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. - (LINK_SECURE_PLT_DEFAULT_SPEC): Define. - (CHOOSE_DYNAMIC_LINKER, LINK_TARGET_SPEC, LINK_OS_LINUX_SPEC): Update. - - * config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define. - ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -365,17 +365,21 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER32 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - - #undef DEFAULT_ASM_ENDIAN - #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) ---- a/gcc/config/rs6000/secureplt.h -+++ b/gcc/config/rs6000/secureplt.h -@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3. - . */ - - #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" -+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -537,6 +537,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - #ifndef CC1_SECURE_PLT_DEFAULT_SPEC - #define CC1_SECURE_PLT_DEFAULT_SPEC "" - #endif -+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC -+#define LINK_SECURE_PLT_DEFAULT_SPEC "" -+#endif - - /* Pass -G xxx to the compiler. */ - #undef CC1_SPEC -@@ -574,7 +577,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - %{R*} \ - %(link_shlib) \ - %{!T*: %(link_start) } \ --%(link_os)" -+%(link_os)" \ -+"%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" - - /* Shared libraries are not default. */ - #define LINK_SHLIB_SPEC "\ -@@ -757,17 +761,22 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - - #define LINK_START_LINUX_SPEC "" - -+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - - #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -@@ -889,6 +898,7 @@ ncrtn.o%s" - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ - { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ - { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ -+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ - { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ - { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ - { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ -@@ -943,3 +953,72 @@ ncrtn.o%s" - /* This target uses the sysv4.opt file. */ - #define TARGET_USES_SYSV4_OPT 1 - -+/* Include order changes for musl, same as in generic linux.h. */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif ---- a/gcc/config/rs6000/sysv4le.h -+++ b/gcc/config/rs6000/sysv4le.h -@@ -31,3 +31,5 @@ - /* Little-endian PowerPC64 Linux uses the ELF v2 ABI by default. */ - #define LINUX64_DEFAULT_ABI_ELFv2 - -+#undef MUSL_DYNAMIC_LINKER_E -+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","le") ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -2416,6 +2416,10 @@ powerpc*-*-linux*) - powerpc*-*-linux*paired*) - tm_file="${tm_file} rs6000/750cl.h" ;; - esac -+ case ${target} in -+ *-linux*-musl*) -+ enable_secureplt=yes ;; -+ esac - if test x${enable_secureplt} = xyes; then - tm_file="rs6000/secureplt.h ${tm_file}" - fi diff --git a/devel/gcc/patches/204-musl_sh.patch b/devel/gcc/patches/204-musl_sh.patch deleted file mode 100644 index 8c3753d5..00000000 --- a/devel/gcc/patches/204-musl_sh.patch +++ /dev/null @@ -1,39 +0,0 @@ -gcc/Changelog: - -2015-04-27 Gregor Richards - Szabolcs Nagy - - * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define. - (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define. - ---- a/gcc/config/sh/linux.h -+++ b/gcc/config/sh/linux.h -@@ -43,6 +43,28 @@ along with GCC; see the file COPYING3. - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - -+#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN -+#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}" -+#endif -+ -+#if TARGET_CPU_DEFAULT & ( MASK_HARD_SH2A_DOUBLE | MASK_SH4 ) -+/* "-nofpu" if any nofpu option is specified */ -+#define MUSL_DYNAMIC_LINKER_FP \ -+ "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \ -+ "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \ -+ "m5-compact-nofpu:-nofpu}" -+#else -+/* "-nofpu" if none of the hard fpu options are specified */ -+#define MUSL_DYNAMIC_LINKER_FP \ -+ "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}" -+#endif -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1" -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #undef SUBTARGET_LINK_EMUL_SUFFIX diff --git a/devel/gcc/patches/205-musl_x86.patch b/devel/gcc/patches/205-musl_x86.patch deleted file mode 100644 index 8772328d..00000000 --- a/devel/gcc/patches/205-musl_x86.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: ktkachov -Date: Fri, 15 May 2015 13:20:01 +0000 (+0000) -Subject: [PATCH 9/13] x86 musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c - -[PATCH 9/13] x86 musl support - -On behalf of Szabolcs Nagy. - -2015-05-15 Gregor Richards - - * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define. - * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -21,3 +21,6 @@ along with GCC; see the file COPYING3. - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTI - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" -+#undef MUSL_DYNAMIC_LINKERX32 -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff --git a/devel/gcc/patches/206-musl_aarch64.patch b/devel/gcc/patches/206-musl_aarch64.patch deleted file mode 100644 index 6925a026..00000000 --- a/devel/gcc/patches/206-musl_aarch64.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: jgreenhalgh -Date: Wed, 27 May 2015 16:46:39 +0000 (+0000) -Subject: [PATCH 3/13] aarch64 musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78 - -[PATCH 3/13] aarch64 musl support - -gcc/Changelog: - -2015-05-27 Gregor Richards - Szabolcs Nagy - - * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -23,6 +23,9 @@ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" - -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" -+ - #undef ASAN_CC1_SPEC - #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" - diff --git a/devel/gcc/patches/207-musl_fixincludes.patch b/devel/gcc/patches/207-musl_fixincludes.patch deleted file mode 100644 index 0ff33d39..00000000 --- a/devel/gcc/patches/207-musl_fixincludes.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000) -Subject: fixincludes update for musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d - -fixincludes update for musl support - -On behalf of Szabolcs.Nagy@arm.com - -2015-04-22 Gregor Richards - - * mkfixinc.sh: Add *-musl* with no fixes. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/fixincludes/mkfixinc.sh -+++ b/fixincludes/mkfixinc.sh -@@ -19,7 +19,8 @@ case $machine in - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ -- powerpcle-*-eabi* ) -+ powerpcle-*-eabi* | \ -+ *-musl* ) - # IF there is no include fixing, - # THEN create a no-op fixer and exit - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff --git a/devel/gcc/patches/209-musl_libstdc++.patch b/devel/gcc/patches/209-musl_libstdc++.patch deleted file mode 100644 index d2414d02..00000000 --- a/devel/gcc/patches/209-musl_libstdc++.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000) -Subject: libstdc++, libgfortran gthr workaround for musl -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61 - -libstdc++, libgfortran gthr workaround for musl - -On behalf of szabolcs.nagy@arm.com - -[libstdc++-v3/] -2015-04-22 Szabolcs Nagy - - * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define. - * configure.host (os_include_dir): Set to "os/generic" for linux-musl*. - -[libgfortran/] -2015-04-22 Szabolcs Nagy - - * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*. - * configure: Regenerate. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libgfortran/acinclude.m4 -+++ b/libgfortran/acinclude.m4 -@@ -100,7 +100,7 @@ void foo (void); - [Define to 1 if the target supports #pragma weak]) - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - AC_DEFINE(GTHREAD_USE_WEAK, 0, - [Define to 0 if the target shouldn't use #pragma weak]) - ;; ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con - - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - - $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h - ---- a/libstdc++-v3/config/os/generic/os_defines.h -+++ b/libstdc++-v3/config/os/generic/os_defines.h -@@ -33,4 +33,9 @@ - // System-specific #define, typedefs, corrections, etc, go here. This - // file will come before all others. - -+// Disable the weak reference logic in gthr.h for os/generic because it -+// is broken on every platform unless there is implementation specific -+// workaround in gthr-posix.h and at link-time for static linking. -+#define _GLIBCXX_GTHREAD_USE_WEAK 0 -+ - #endif ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -273,6 +273,9 @@ case "${host_os}" in - freebsd*) - os_include_dir="os/bsd/freebsd" - ;; -+ linux-musl*) -+ os_include_dir="os/generic" -+ ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" diff --git a/devel/gcc/patches/230-musl_libssp.patch b/devel/gcc/patches/230-musl_libssp.patch index 30f42e9f..eebee917 100644 --- a/devel/gcc/patches/230-musl_libssp.patch +++ b/devel/gcc/patches/230-musl_libssp.patch @@ -1,6 +1,21 @@ +commit 1877bc9d8f2be143fbe530347a945850d0ecd234 +Author: Steven Barth +Date: Mon Jun 22 10:31:07 2015 +0000 + + gcc/musl: rework SSP-support + + Make musl provide libssp_nonshared.a and make GCC link it unconditionally + if musl is used. This should be a no-op if SSP is disabled and seems to be + the only reliable way of dealing with SSP over all packages due to the mess + that is linkerflags handling in packages. + + Signed-off-by: Steven Barth + + SVN-Revision: 46108 + --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -727,7 +727,9 @@ proper position among the other output f +@@ -861,7 +861,9 @@ proper position among the other output f #endif #ifndef LINK_SSP_SPEC diff --git a/devel/gcc/patches/240-musl-libitm-fixes.patch b/devel/gcc/patches/240-musl-libitm-fixes.patch deleted file mode 100644 index 533cb684..00000000 --- a/devel/gcc/patches/240-musl-libitm-fixes.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000) -Subject: libitm fixes for musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338 - -libitm fixes for musl support - -On behalf of Szabolcs.Nagy@arm.com - -2015-04-22 Gregor Richards - - * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h. - * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libitm/config/arm/hwcap.cc -+++ b/libitm/config/arm/hwcap.cc -@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0 - - #ifdef __linux__ - #include --#include -+#include - #include - - static void __attribute__((constructor)) ---- a/libitm/config/linux/x86/tls.h -+++ b/libitm/config/linux/x86/tls.h -@@ -25,16 +25,19 @@ - #ifndef LIBITM_X86_TLS_H - #define LIBITM_X86_TLS_H 1 - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - /* Use slots in the TCB head rather than __thread lookups. - GLIBC has reserved words 10 through 13 for TM. */ - #define HAVE_ARCH_GTM_THREAD 1 - #define HAVE_ARCH_GTM_THREAD_DISP 1 - #endif -+#endif - - #include "config/generic/tls.h" - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - namespace GTM HIDDEN { - - #ifdef __x86_64__ -@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H diff --git a/devel/gcc/patches/250-add-musl.patch b/devel/gcc/patches/250-add-musl.patch deleted file mode 100644 index 8cbeddea..00000000 --- a/devel/gcc/patches/250-add-musl.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 08:30:40 +0000 (+0000) -Subject: [PATCH 0/13] Add musl support to GCC -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e - -[PATCH 0/13] Add musl support to GCC - -2015-05-08 Szabolcs Nagy - - * config/glibc-stdint.h (OPTION_MUSL): Define. - (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): - Change the definition based on OPTION_MUSL for 64 bit targets. - * config/linux.h (OPTION_MUSL): Redefine. - * config/alpha/linux.h (OPTION_MUSL): Redefine. - * config/rs6000/linux.h (OPTION_MUSL): Redefine. - * config/rs6000/linux64.h (OPTION_MUSL): Redefine. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/alpha/linux.h -+++ b/gcc/config/alpha/linux.h -@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3. - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; ---- a/gcc/config/glibc-stdint.h -+++ b/gcc/config/glibc-stdint.h -@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* Systems using musl libc should use this header and make sure -+ OPTION_MUSL is defined correctly before using the TYPE macros. */ -+#ifndef OPTION_MUSL -+#define OPTION_MUSL 0 -+#endif -+ - #define SIG_ATOMIC_TYPE "int" - - #define INT8_TYPE "signed char" -@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTI - #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INT_FAST8_TYPE "signed char" --#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") --#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") -+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") -+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") - #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") - #define UINT_FAST8_TYPE "unsigned char" --#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") --#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") -+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") -+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") - #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -30,10 +30,14 @@ - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -299,10 +299,14 @@ extern int dot_symbols; - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; diff --git a/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch b/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch deleted file mode 100644 index bdebf6c0..00000000 --- a/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -369,8 +369,8 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" --#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" --#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -765,7 +765,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" --#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_MUSL diff --git a/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch b/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch index 1743658a..2d0ae461 100644 --- a/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch +++ b/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch @@ -1,9 +1,16 @@ -Use the proper rtx cost model for the selected CPU, even when optimizing -for size. This generates better code. +commit ecf7671b769fe96f7b5134be442089f8bdba55d2 +Author: Felix Fietkau +Date: Thu Aug 4 20:29:45 2016 +0200 + +gcc: add a patch to generate better code with Os on mips + +Also happens to reduce compressed code size a bit + +Signed-off-by: Felix Fietkau --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c -@@ -17483,7 +17483,7 @@ mips_option_override (void) +@@ -19790,7 +19790,7 @@ mips_option_override (void) flag_pcc_struct_return = 0; /* Decide which rtx_costs structure to use. */ diff --git a/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch b/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch index 0edeb13c..76200a16 100644 --- a/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch +++ b/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch @@ -1,6 +1,27 @@ +commit b050f87d13b5dc7ed82feb9a90f4529de58bdf25 +Author: Felix Fietkau +Date: Wed Feb 19 19:20:10 2014 +0000 + + gcc: prevent the use of LDRD/STRD on ARMv5TE + + These instructions are for 64-bit load/store. On ARMv5TE, the CPU + requires addresses to be aligned to 64-bit. When misaligned, behavior is + undefined (effectively either loads the same word twice on LDRD, or + corrupts surrounding memory on STRD). + + On ARMv6 and newer, unaligned access is safe. + + Removing these instructions for ARMv5TE is necessary, because GCC + ignores alignment information in pointers and does unsafe optimizations + that have shown up as bugs in various places. + + Signed-off-by: Felix Fietkau + + SVN-Revision: 39638 + --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h -@@ -285,7 +285,7 @@ extern void (*arm_lang_output_object_att +@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node; /* Thumb-1 only. */ #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) diff --git a/devel/gcc/patches/810-arm-softfloat-libgcc.patch b/devel/gcc/patches/810-arm-softfloat-libgcc.patch index 1d06f5b2..5c9d86ae 100644 --- a/devel/gcc/patches/810-arm-softfloat-libgcc.patch +++ b/devel/gcc/patches/810-arm-softfloat-libgcc.patch @@ -1,3 +1,11 @@ +commit 8570c4be394cff7282f332f97da2ff569a927ddb +Author: Imre Kaloz +Date: Wed Feb 2 20:06:12 2011 +0000 + + fixup arm soft-float symbols + + SVN-Revision: 25325 + --- a/libgcc/config/arm/t-linux +++ b/libgcc/config/arm/t-linux @@ -1,6 +1,10 @@ @@ -14,7 +22,7 @@ # difference. --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h -@@ -60,8 +60,6 @@ +@@ -58,8 +58,6 @@ %{shared:-lc} \ %{!shared:%{profile:-lc_p}%{!profile:-lc}}" diff --git a/devel/gcc/patches/820-libgcc_pic.patch b/devel/gcc/patches/820-libgcc_pic.patch index 42bf0c8c..0cc1e07e 100644 --- a/devel/gcc/patches/820-libgcc_pic.patch +++ b/devel/gcc/patches/820-libgcc_pic.patch @@ -1,6 +1,14 @@ +commit c96312958c0621e72c9b32da5bc224ffe2161384 +Author: Felix Fietkau +Date: Mon Oct 19 23:26:09 2009 +0000 + + gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) + + SVN-Revision: 18086 + --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in -@@ -887,11 +887,12 @@ $(libgcov-driver-objects): %$(objext): $ +@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $ # Static libraries. libgcc.a: $(libgcc-objects) @@ -14,7 +22,7 @@ -rm -f $@ objects="$(objects)"; \ -@@ -913,7 +914,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E +@@ -945,7 +946,7 @@ all: libunwind.a endif ifeq ($(enable_shared),yes) @@ -22,8 +30,8 @@ +all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) ifneq ($(LIBUNWIND),) all: libunwind$(SHLIB_EXT) - endif -@@ -1108,6 +1109,10 @@ install-shared: + libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) +@@ -1151,6 +1152,10 @@ install-shared: chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a diff --git a/devel/gcc/patches/830-arm_unbreak_armv4t.patch b/devel/gcc/patches/830-arm_unbreak_armv4t.patch deleted file mode 100644 index 37f8f2a5..00000000 --- a/devel/gcc/patches/830-arm_unbreak_armv4t.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://sourceware.org/ml/crossgcc/2008-05/msg00009.html - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -45,7 +45,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - /* TARGET_BIG_ENDIAN_DEFAULT is set in - config.gcc for big endian configurations. */ diff --git a/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch b/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch index cb1fb982..b9c9b161 100644 --- a/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch +++ b/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch @@ -1,6 +1,15 @@ +commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc +Author: Imre Kaloz +Date: Wed Feb 2 19:34:36 2011 +0000 + + add armv4 fixup patches + + SVN-Revision: 25322 + + --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h -@@ -94,10 +94,15 @@ +@@ -88,10 +88,15 @@ #define MUSL_DYNAMIC_LINKER \ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" diff --git a/devel/gcc/patches/850-use_shared_libgcc.patch b/devel/gcc/patches/850-use_shared_libgcc.patch index 5818cf4d..1d07efed 100644 --- a/devel/gcc/patches/850-use_shared_libgcc.patch +++ b/devel/gcc/patches/850-use_shared_libgcc.patch @@ -1,7 +1,14 @@ +commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd +Author: Felix Fietkau +Date: Sun Feb 12 20:25:47 2012 +0000 + + gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary + + SVN-Revision: 30486 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h -@@ -131,10 +131,6 @@ - #define ENDFILE_SPEC \ +@@ -126,10 +126,6 @@ + "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) -/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we @@ -26,7 +33,7 @@ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change --- a/libgcc/mkmap-symver.awk +++ b/libgcc/mkmap-symver.awk -@@ -132,5 +132,5 @@ function output(lib) { +@@ -136,5 +136,5 @@ function output(lib) { else if (inherit[lib]) printf("} %s;\n", inherit[lib]); else diff --git a/devel/gcc/patches/851-libgcc_no_compat.patch b/devel/gcc/patches/851-libgcc_no_compat.patch index 80c34768..d710e407 100644 --- a/devel/gcc/patches/851-libgcc_no_compat.patch +++ b/devel/gcc/patches/851-libgcc_no_compat.patch @@ -1,3 +1,13 @@ +commit 64661de100da1ec1061ef3e5e400285dce115e6b +Author: Felix Fietkau +Date: Sun May 10 13:16:35 2015 +0000 + + gcc: add some size optimization patches + + Signed-off-by: Felix Fietkau + + SVN-Revision: 45664 + --- a/libgcc/config/t-libunwind +++ b/libgcc/config/t-libunwind @@ -2,8 +2,7 @@ diff --git a/devel/gcc/patches/870-ppc_no_crtsavres.patch b/devel/gcc/patches/870-ppc_no_crtsavres.patch index 0e64a416..1b448eb5 100644 --- a/devel/gcc/patches/870-ppc_no_crtsavres.patch +++ b/devel/gcc/patches/870-ppc_no_crtsavres.patch @@ -1,6 +1,13 @@ +commit d8c570a1531035c3e26bcd94741e5f5b9c36b5d9 +Author: Felix Fietkau +Date: Mon Mar 5 00:51:01 2012 +0000 + + gcc: do not emit references to _savegpr_* and _restgpr_* on powerpc, as they are tricky to deal with wrt. libgcc. they cannot be linked dynamically + + SVN-Revision: 30814 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c -@@ -21500,7 +21500,7 @@ rs6000_savres_strategy (rs6000_stack_t * +@@ -26981,7 +26981,7 @@ rs6000_savres_strategy (rs6000_stack_t * /* Define cutoff for using out-of-line functions to save registers. */ if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) { diff --git a/devel/gcc/patches/880-no_java_section.patch b/devel/gcc/patches/880-no_java_section.patch deleted file mode 100644 index def6c9f4..00000000 --- a/devel/gcc/patches/880-no_java_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/defaults.h -+++ b/gcc/defaults.h -@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI - /* If we have named section and we support weak symbols, then use the - .jcr section for recording java classes which need to be registered - at program start-up time. */ --#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK -+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK - #ifndef JCR_SECTION_NAME - #define JCR_SECTION_NAME ".jcr" - #endif diff --git a/devel/gcc/patches/881-no_tm_section.patch b/devel/gcc/patches/881-no_tm_section.patch new file mode 100644 index 00000000..a58dc27e --- /dev/null +++ b/devel/gcc/patches/881-no_tm_section.patch @@ -0,0 +1,22 @@ +commit 565988ab47bd9b96b50608564aee2104aeb4b7ae +Author: Felix Fietkau +Date: Tue Dec 13 14:20:49 2016 +0100 + + gcc: rip out transactional memory related bloat from crtbegin + + Slightly improves compression for each executable, saving about 4k from + the default ar71xx rootfs + + Signed-off-by: Felix Fietkau + +--- a/libgcc/crtstuff.c ++++ b/libgcc/crtstuff.c +@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ + #endif + + #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) +-# define USE_TM_CLONE_REGISTRY 1 ++# define USE_TM_CLONE_REGISTRY 0 + #endif + + /* We do not want to add the weak attribute to the declarations of these diff --git a/devel/gcc/patches/900-bad-mips16-crt.patch b/devel/gcc/patches/900-bad-mips16-crt.patch index dd6e9dc8..f5cc0a74 100644 --- a/devel/gcc/patches/900-bad-mips16-crt.patch +++ b/devel/gcc/patches/900-bad-mips16-crt.patch @@ -1,3 +1,24 @@ +commit 9dc38e48f7a6f88b7ac7bfaced91f53660204e46 +Author: Florian Fainelli +Date: Fri Apr 5 12:36:06 2013 +0000 + + toolchain/gcc: .init and .fini need to pick one ISA + + The .init and .fini sections are built by concatenating code + fragments. Putting mips16 code in the middle of a mips32 code block + doesn't work. Make gcc built the magic crt stuff in no-mips16 mode. + + This is specific to 4.6-linaro but is probably portable to other gcc + flavors. Adding this to the t-libgcc-mips16 makefile fragment is a + hack not suitable for pushing upstream, but there is no mips/t-linux + or mips/t-uclibc and I am not going to touch gcc/configure for two + lines. + + Signed-off-by: Jay Carlson + Signed-off-by: Florian Fainelli + + SVN-Revision: 36200 + --- a/libgcc/config/mips/t-mips16 +++ b/libgcc/config/mips/t-mips16 @@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 diff --git a/devel/gcc/patches/910-mbsd_multi.patch b/devel/gcc/patches/910-mbsd_multi.patch index 32fc9da9..f19007ea 100644 --- a/devel/gcc/patches/910-mbsd_multi.patch +++ b/devel/gcc/patches/910-mbsd_multi.patch @@ -1,22 +1,23 @@ +commit 99368862e44740ff4fd33760893f04e14f9dbdf1 +Author: Felix Fietkau +Date: Tue Jul 31 00:52:27 2007 +0000 - This patch brings over a few features from MirBSD: + Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly + + SVN-Revision: 8256 + + This patch brings over a feature from MirBSD: * -fhonour-copts If this option is not given, it's warned (depending on environment variables). This is to catch errors of misbuilt packages which override CFLAGS themselves. - * -Werror-maybe-reset - Has the effect of -Wno-error if GCC_NO_WERROR is - set and not '0', a no-operation otherwise. This is - to be able to use -Werror in "make" but prevent - GNU autoconf generated configure scripts from - freaking out. This patch was authored by Thorsten Glaser with copyright assignment to the FSF in effect. --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c -@@ -122,6 +122,9 @@ static int class_dump_flags; +@@ -108,6 +108,9 @@ static int class_dump_flags; /* Whether any standard preincluded header has been preincluded. */ static bool done_preinclude; @@ -26,7 +27,7 @@ static void handle_OPT_d (const char *); static void set_std_cxx98 (int); static void set_std_cxx11 (int); -@@ -449,6 +452,12 @@ c_common_handle_option (size_t scode, co +@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co flag_no_builtin = !value; break; @@ -39,7 +40,7 @@ case OPT_fconstant_string_class_: constant_string_class_name = arg; break; -@@ -1034,6 +1043,47 @@ c_common_init (void) +@@ -1084,6 +1093,47 @@ c_common_init (void) return false; } @@ -89,18 +90,7 @@ --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt -@@ -431,6 +431,10 @@ Wfloat-conversion - C ObjC C++ ObjC++ Var(warn_float_conversion) LangEnabledBy(C ObjC C++ ObjC++,Wconversion) - Warn for implicit type conversions that cause loss of floating point precision - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality -@@ -1161,6 +1165,9 @@ C++ ObjC++ Optimization Alias(fexception +@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception fhonor-std C++ ObjC++ Ignore Warn(switch %qs is no longer supported) @@ -109,23 +99,12 @@ + fhosted C ObjC - Assume normal C execution environment + Assume normal C execution environment. --- a/gcc/common.opt +++ b/gcc/common.opt -@@ -561,6 +561,10 @@ Werror= - Common Joined - Treat specified warning as error - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings -@@ -1360,6 +1364,9 @@ fguess-branch-probability +@@ -1510,6 +1510,9 @@ fguess-branch-probability Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities + Enable guessing of branch probabilities. +fhonour-copts +Common RejectNegative @@ -135,60 +114,24 @@ ; On SVR4 targets, it also controls whether or not to emit a --- a/gcc/opts.c +++ b/gcc/opts.c -@@ -1699,6 +1699,17 @@ common_handle_option (struct gcc_options +@@ -1954,6 +1954,9 @@ common_handle_option (struct gcc_options opts, opts_set, loc, dc); break; -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ + case OPT_fhonour_copts: + break; + case OPT_Wlarger_than_: opts->x_larger_than_size = value; opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -163,6 +163,11 @@ in older programs. This warning is on b - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -251,7 +251,7 @@ Objective-C and Objective-C++ Dialects}. - -Wdisabled-optimization @gol - -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol - -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol ---Wno-endif-labels -Werror -Werror=* @gol -+-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol - -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-signedness -Wformat-y2k @gol -@@ -5382,6 +5382,22 @@ This option is only supported for C and +@@ -6572,6 +6572,17 @@ This option is only supported for C and @option{-Wall} and by @option{-Wpedantic}, which can be disabled with @option{-Wno-pointer-sign}. -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+ at item -fhonour-copts -+ at opindex fhonour-copts ++@item -fhonour-copts ++@opindex fhonour-copts +If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not +given at least once, and warn if it is given more than once. +If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not @@ -201,22 +144,3 @@ @item -Wstack-protector @opindex Wstack-protector @opindex Wno-stack-protector -@@ -7860,7 +7876,7 @@ so, the first branch is redirected to ei - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -629,6 +629,7 @@ lang_specific_pre_link (void) - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { diff --git a/devel/gcc/patches/920-specs_nonfatal_getenv.patch b/devel/gcc/patches/920-specs_nonfatal_getenv.patch index 3d708f24..a0fdc5f1 100644 --- a/devel/gcc/patches/920-specs_nonfatal_getenv.patch +++ b/devel/gcc/patches/920-specs_nonfatal_getenv.patch @@ -1,13 +1,20 @@ +Author: Jo-Philipp Wich +Date: Sat Apr 21 03:02:39 2012 +0000 + + gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset + + SVN-Revision: 31390 + --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -8807,8 +8807,10 @@ getenv_spec_function (int argc, const ch +@@ -9281,8 +9281,10 @@ getenv_spec_function (int argc, const ch + value = varname; - value = getenv (argv[0]); if (!value) - fatal_error (input_location, -- "environment variable %qs not defined", argv[0]); +- "environment variable %qs not defined", varname); + { -+ warning (input_location, "environment variable %qs not defined", argv[0]); ++ warning (input_location, "environment variable %qs not defined", varname); + value = ""; + } diff --git a/devel/gcc/patches/930-fix-mips-noexecstack.patch b/devel/gcc/patches/930-fix-mips-noexecstack.patch index c05844d2..5affd6f9 100644 --- a/devel/gcc/patches/930-fix-mips-noexecstack.patch +++ b/devel/gcc/patches/930-fix-mips-noexecstack.patch @@ -48,9 +48,9 @@ sellcey@mips.com --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c -@@ -19629,6 +19629,9 @@ mips_lra_p (void) - #undef TARGET_LRA_P - #define TARGET_LRA_P mips_lra_p +@@ -22567,6 +22567,9 @@ mips_promote_function_mode (const_tree t + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS + #define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2 +#undef TARGET_ASM_FILE_END +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack diff --git a/devel/gcc/patches/930-osdefines.patch b/devel/gcc/patches/930-osdefines.patch deleted file mode 100644 index a1b61204..00000000 --- a/devel/gcc/patches/930-osdefines.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/libstdc++-v3/config/os/gnu-linux/os_defines.h 2015-01-05 06:33:28.000000000 -0600 -+++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h 2016-04-15 12:32:49.374356001 -0500 -@@ -41,8 +41,8 @@ - // Provide a declaration for the possibly deprecated gets function, as - // glibc 2.15 and later does not declare gets for ISO C11 when - // __GNU_SOURCE is defined. --#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) -+//#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) - # undef _GLIBCXX_HAVE_GETS --#endif -+//#endif - - #endif diff --git a/devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch b/devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch new file mode 100644 index 00000000..9d436efc --- /dev/null +++ b/devel/gcc/patches/931-libffi-fix-MIPS-softfloat-build-issue.patch @@ -0,0 +1,175 @@ +From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 +From: BangLang Huang +Date: Wed, 9 Nov 2016 10:36:49 +0800 +Subject: [PATCH] libffi: fix MIPS softfloat build issue + +Backported from github.com/libffi/libffi#272 + +Signed-off-by: BangLang Huang +Signed-off-by: Yousong Zhou +--- + libffi/src/mips/n32.S | 17 +++++++++++++++++ + libffi/src/mips/o32.S | 17 +++++++++++++++++ + 2 files changed, 34 insertions(+) + +diff --git a/libffi/src/mips/n32.S b/libffi/src/mips/n32.S +index c6985d30a6f..8f25994773c 100644 +--- a/libffi/src/mips/n32.S ++++ b/libffi/src/mips/n32.S +@@ -107,6 +107,16 @@ loadregs: + + REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. + ++#ifdef __mips_soft_float ++ REG_L a0, 0*FFI_SIZEOF_ARG(t9) ++ REG_L a1, 1*FFI_SIZEOF_ARG(t9) ++ REG_L a2, 2*FFI_SIZEOF_ARG(t9) ++ REG_L a3, 3*FFI_SIZEOF_ARG(t9) ++ REG_L a4, 4*FFI_SIZEOF_ARG(t9) ++ REG_L a5, 5*FFI_SIZEOF_ARG(t9) ++ REG_L a6, 6*FFI_SIZEOF_ARG(t9) ++ REG_L a7, 7*FFI_SIZEOF_ARG(t9) ++#else + and t4, t6, ((1< +Date: Fri Dec 12 17:01:57 2014 +0000 + + gcc: don't clobber stamp-bits with a symlink to itself + + Several versions of gcc have an issue in libstdc++v3 where the build may + clobber stamp-bits with a link to itself. This doesn't manifest itself + on all systems. On several Ubuntu systems, this doesn't appear to be a + problem, but it is an issue on Fedora 16 systems. + + To fix the issue, we'll simply filter out stamp-bits from the symlinks + to be generated. + + Note: gcc 4.4.7 is unaffected by this issue, so no fix is necessary + there. + + Signed-off-by: John Szakmeister + + SVN-Revision: 43669 + + --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in -@@ -1421,7 +1421,7 @@ stamp-bits: ${bits_headers} +@@ -1474,7 +1474,7 @@ stamp-bits: ${bits_headers} @$(STAMP) stamp-bits stamp-bits-sup: stamp-bits ${bits_sup_headers} diff --git a/devel/gcc/patches/950-cpp_file_path_translation.patch b/devel/gcc/patches/950-cpp_file_path_translation.patch index dc0938ab..cd30cb20 100644 --- a/devel/gcc/patches/950-cpp_file_path_translation.patch +++ b/devel/gcc/patches/950-cpp_file_path_translation.patch @@ -1,8 +1,18 @@ +commit 331735a357a73c7b8adc205241ac3cc6543d985e +Author: Felix Fietkau +Date: Tue Nov 17 12:38:22 2015 +0000 + + gcc: add a patch to 5.x that supports translation of __FILE__ paths + + Signed-off-by: Felix Fietkau + + SVN-Revision: 47490 + Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c -@@ -581,6 +581,10 @@ c_common_handle_option (size_t scode, co +@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co add_path (xstrdup (arg), SYSTEM, 0, true); break; @@ -15,9 +25,9 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4 break; --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt -@@ -1528,6 +1528,10 @@ iquote +@@ -1825,6 +1825,10 @@ iquote C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path + -iquote Add to the end of the quote include path. +iremap +C ObjC C++ ObjC++ Joined Separate @@ -25,22 +35,22 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4 + iwithprefix C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path + -iwithprefix Add to the end of the system include path. --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi -@@ -4441,6 +4441,7 @@ without notice. +@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen @c man begin SYNOPSIS cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] + [@option{-iremap}@var{src}:@var{dst}] - [@option{-W}@var{warn}@dots{}] [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] [@option{-MP}] [@option{-MQ} @var{target}@dots{}] + [@option{-MT} @var{target}@dots{}] --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi -@@ -532,6 +532,12 @@ Search @var{dir} only for header files r - If @var{dir} begins with @code{=}, then the @code{=} will be replaced - by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. +@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam + extensions that GCC uses for preprocessed files created by + @option{-save-temps}. +@item -iremap @var{src}:@var{dst} +@opindex iremap @@ -53,20 +63,9 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4 When preprocessing, handle directives, but do not expand macros. --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -494,8 +494,8 @@ Objective-C and Objective-C++ Dialects}. - @item Directory Options - @xref{Directory Options,,Options for Directory Search}. - @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol ---iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol ----sysroot=@var{dir} --no-sysroot-suffix} -+-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -specs=@var{file} @gol -+-I- --sysroot=@var{dir} --no-sysroot-suffix} - - @item Machine Dependent Options - @xref{Submodel Options,,Hardware Models and Configurations}. -@@ -11479,6 +11479,12 @@ be searched for header files only for th - "@var{file}"}; they are not searched for @code{#include <@var{file}>}, - otherwise just like @option{-I}. +@@ -11871,6 +11871,12 @@ by @option{-fplugin=@var{name}} instead + @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant + to be used by the user, but only passed by the driver. +@item -iremap @var{src}:@var{dst} +@opindex iremap @@ -79,7 +78,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4 Add directory @var{dir} to the list of directories to be searched --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h -@@ -751,6 +751,9 @@ extern void cpp_set_lang (cpp_reader *, +@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *, /* Set the include paths. */ extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); @@ -91,7 +90,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4 call cpp_finish on that reader. You can either edit the callbacks --- a/libcpp/macro.c +++ b/libcpp/macro.c -@@ -224,6 +224,64 @@ static const char * const monthnames[] = +@@ -227,6 +227,64 @@ static const char * const monthnames[] = "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; @@ -156,7 +155,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4 /* Helper function for builtin_macro. Returns the text generated by a builtin macro. */ const uchar * -@@ -286,6 +344,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi +@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi { unsigned int len; const char *name; @@ -164,7 +163,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4 uchar *buf; if (node->value.builtin == BT_FILE) -@@ -297,6 +356,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi +@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi if (!name) abort (); } @@ -172,7 +171,7 @@ Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4 len = strlen (name); buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); result = buf; -@@ -304,6 +364,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi +@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); *buf++ = '"'; *buf = '\0'; diff --git a/devel/gcc/patches/960-go_libm.patch b/devel/gcc/patches/960-go_libm.patch deleted file mode 100644 index d16b0200..00000000 --- a/devel/gcc/patches/960-go_libm.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/go/Make-lang.in -+++ b/gcc/go/Make-lang.in -@@ -74,7 +74,7 @@ go_OBJS = $(GO_OBJS) go/gospec.o - - go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) - +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ -- $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -+ $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -lm - - # Documentation. - diff --git a/devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch b/devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch new file mode 100644 index 00000000..556fa164 --- /dev/null +++ b/devel/gcc/patches/960-gotools-fix-compilation-when-making-cross-compiler.patch @@ -0,0 +1,73 @@ +From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Fri, 4 May 2018 18:20:53 +0800 +Subject: [PATCH] gotools: fix compilation when making cross compiler + +libgo is "the runtime support library for the Go programming language. +This library is intended for use with the Go frontend." + +gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but +the linker will complain that it cannot find it. That's because shared libgcc +is not present in the install directory yet. libgo.so was made without problem +because gcc will emit -lgcc_s when compiled with -shared option. When gotools +were being made, it was supplied with -static-libgcc thus no link option was +provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec +for linking with libgo.so + +- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation +- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html + +When 3-pass GCC compilation is used, shared libgcc runtime libraries will be +available after gcc pass2 completed and will meet the gotools link requirement +at gcc pass3 +--- + gotools/Makefile.am | 4 +++- + gotools/Makefile.in | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/gotools/Makefile.am b/gotools/Makefile.am +index 5f3940a278b..9c22f5df103 100644 +--- a/gotools/Makefile.am ++++ b/gotools/Makefile.am +@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} + STAMP = echo timestamp > + + libgodir = ../$(target_noncanonical)/libgo ++libgccdir = ../$(target_noncanonical)/libgcc + LIBGODEP = $(libgodir)/libgo.la + + if NATIVE +@@ -38,7 +39,8 @@ endif + GOCFLAGS = $(CFLAGS_FOR_TARGET) + GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) + +-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs ++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ ++ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s + GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ + + cmdsrcdir = $(srcdir)/../libgo/go/cmd +diff --git a/gotools/Makefile.in b/gotools/Makefile.in +index 4386576b011..0bdd9290e01 100644 +--- a/gotools/Makefile.in ++++ b/gotools/Makefile.in +@@ -252,13 +252,15 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs + PWD_COMMAND = $${PWDCMD-pwd} + STAMP = echo timestamp > + libgodir = ../$(target_noncanonical)/libgo ++libgccdir = ../$(target_noncanonical)/libgcc + LIBGODEP = $(libgodir)/libgo.la + @NATIVE_FALSE@GOCOMPILER = $(GOC) + + # Use the compiler we just built. + @NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) + GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) +-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs ++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ ++ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s + GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ + cmdsrcdir = $(srcdir)/../libgo/go/cmd + go_cmd_go_files = \ +-- +2.16.3 + diff --git a/devel/gcc/patches/970-warn_bug.patch b/devel/gcc/patches/970-warn_bug.patch deleted file mode 100644 index 2c5cf9be..00000000 --- a/devel/gcc/patches/970-warn_bug.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgo/runtime/mprof.goc -+++ b/libgo/runtime/mprof.goc -@@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int - - func Stack(b Slice, all bool) (n int) { - byte *pc, *sp; -- bool enablegc; -+ bool enablegc = false; /* workaround GCC bug #36550 */ - - sp = runtime_getcallersp(&b); - pc = (byte*)(uintptr)runtime_getcallerpc(&b); diff --git a/devel/libtool-bin/Makefile b/devel/libtool-bin/Makefile index efcee5c6..c63fd951 100644 --- a/devel/libtool-bin/Makefile +++ b/devel/libtool-bin/Makefile @@ -9,13 +9,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtool PKG_VERSION:=2.4.6 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/libtool PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later +PKG_CPE_ID:=cpe:/a:gnu:libtool + PKG_BUILD_DIR = $(BUILD_DIR)/libtool-bin/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL:=1 diff --git a/devel/lpc21isp/Makefile b/devel/lpc21isp/Makefile index daaf05ff..63ea54cd 100644 --- a/devel/lpc21isp/Makefile +++ b/devel/lpc21isp/Makefile @@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lpc21isp PKG_VERSION:=197 -PKG_RELEASE:=2 -PKG_LICENSE:=LGPL-3.0+ +PKG_RELEASE:=3 +PKG_LICENSE:=LGPL-3.0-or-later PKG_LICENSE_FILES:=README gpl.txt lgpl-3.0.txt PKG_BUILD_DIR:=$(BUILD_DIR)/lpc21isp_$(PKG_VERSION) diff --git a/devel/lttng-modules/Makefile b/devel/lttng-modules/Makefile index c1380865..08d93d27 100644 --- a/devel/lttng-modules/Makefile +++ b/devel/lttng-modules/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lttng-modules -PKG_VERSION:=2.6.1 +PKG_VERSION:=2.10.8 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ -PKG_HASH:=0112d0646437163a0065022e5a788d049b690ec3fa99494c4ab6f61ced2a46af +PKG_HASH:=fe1d269bca723e8948af871c322c37d3900e647cdc5eb3efbe821e434beee44c +PKG_MAINTAINER:= PKG_LICENSE:=LGPL-2.1 GPL-2.0 MIT PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Nicolas Thill include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk @@ -37,7 +37,7 @@ define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - SUBDIRS="$(PKG_BUILD_DIR)" \ + M="$(PKG_BUILD_DIR)" \ V="$(V)" \ modules endef diff --git a/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch b/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch deleted file mode 100644 index d8a0c62f..00000000 --- a/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/instrumentation/events/lttng-module/kmem.h -+++ b/instrumentation/events/lttng-module/kmem.h -@@ -287,6 +287,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm - ) - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \ -+ || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) \ - || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0) \ - || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0)) - diff --git a/devel/lttng-tools/Makefile b/devel/lttng-tools/Makefile index dfce72c8..eb40f602 100644 --- a/devel/lttng-tools/Makefile +++ b/devel/lttng-tools/Makefile @@ -8,18 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lttng-tools -PKG_VERSION:=2.6.0 +PKG_VERSION:=2.10.6 PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ -PKG_HASH:=128166445126d76da7d9f42a56dec12716732a1ed697a6cfdf40c9e135384f32 +PKG_HASH:=f05df52bbebf8ce88d1b29e9e98cfc957d2ed738a345118018237ebdb581537c +PKG_MAINTAINER:= PKG_LICENSE:=LGPL-2.1 GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill -PKG_FIXUP:=autoreconf PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -34,11 +33,12 @@ define Package/lttng-tools DEPENDS:= +lttng-ust +libpopt +libxml2 endef -CONFIGURE_ARGS += --disable-kmod +TARGET_CFLAGS += $(FPIC) -TARGET_LDFLAGS += -lurcu-bp - -MAKE_FLAGS += V="$(V)" +CONFIGURE_ARGS += \ + --enable-epoll \ + --without-kmod \ + --without-pic define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/devel/lttng-tools/patches/010-fix-compile-fails-for-x32-arch.patch b/devel/lttng-tools/patches/010-fix-compile-fails-for-x32-arch.patch new file mode 100644 index 00000000..becb4330 --- /dev/null +++ b/devel/lttng-tools/patches/010-fix-compile-fails-for-x32-arch.patch @@ -0,0 +1,45 @@ +From e0212fb3278ca54ac6d3beecf990297670f2612f Mon Sep 17 00:00:00 2001 +From: Kai Kang +Date: Thu, 13 Dec 2018 10:55:36 +0800 +Subject: [PATCH] Fix: compile fails for x32 arch + +It fails to compile for x32 arch: + +| .../src/common/utils.c: Assembler messages: +| .../src/common/utils.c:1026: Error: register type mismatch for `bsr' +| .../src/common/utils.c:1028: Error: operand type mismatch for `movq' + +Add macro check that not to define that fls_u64() for x32. + +Signed-off-by: Kai Kang +--- + src/bin/lttng/utils.c | 2 +- + src/common/utils.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/bin/lttng/utils.c b/src/bin/lttng/utils.c +index 0e96ef0c3..5c79c8c7e 100644 +--- a/src/bin/lttng/utils.c ++++ b/src/bin/lttng/utils.c +@@ -158,7 +158,7 @@ unsigned int fls_u32(uint32_t x) + #define HAS_FLS_U32 + #endif + +-#if defined(__x86_64) ++#if defined(__x86_64) && !defined(__ILP32__) + static inline + unsigned int fls_u64(uint64_t x) + { +diff --git a/src/common/utils.c b/src/common/utils.c +index 08139e5e2..3c3899819 100644 +--- a/src/common/utils.c ++++ b/src/common/utils.c +@@ -1223,7 +1223,7 @@ static inline unsigned int fls_u32(uint32_t x) + #define HAS_FLS_U32 + #endif + +-#if defined(__x86_64) ++#if defined(__x86_64) && !defined(__ILP32__) + static inline + unsigned int fls_u64(uint64_t x) + { diff --git a/devel/lttng-tools/patches/020-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch b/devel/lttng-tools/patches/020-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch new file mode 100644 index 00000000..5437de26 --- /dev/null +++ b/devel/lttng-tools/patches/020-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch @@ -0,0 +1,345 @@ +From 10e8001ad876d8cb3b5a17c7492e713bbc047975 Mon Sep 17 00:00:00 2001 +From: Jonathan Rajotte +Date: Thu, 28 Mar 2019 18:31:29 -0400 +Subject: [PATCH] Fix: getgrnam is not MT-Safe, use getgrnam_r + +Running the test suite under a Yocto musl build resulted in musl +coredump due to double freeing. + +We get the following backtraces: + +0 a_crash () at ./arch/x86_64/atomic_arch.h:108 +1 unmap_chunk (self=) at src/malloc/malloc.c:515 +2 free (p=) at src/malloc/malloc.c:526 +3 0x00007f46d9dc3849 in __getgrent_a (f=f@entry=0x7f46d9d1f7e0, gr=gr@entry=0x7f46d9e24460 , line=line@entry=0x7f46d9e26058 , size=size@entry=0x7f46d92db550, mem=mem@entry=0x7f46d9e26050 , nmem=nmem@entry=0x7f46d92db558, res=0x7f46d92db548) at src/passwd/getgrent_a.c:45 +4 0x00007f46d9dc2e6b in __getgr_a (name=0x487242 "tracing", gid=gid@entry=0, gr=gr@entry=0x7f46d9e24460 , buf=buf@entry=0x7f46d9e26058 , size=size@entry=0x7f46d92db550, mem=mem@entry=0x7f46d9e26050 , nmem=0x7f46d92db558, res=0x7f46d92db548) at src/passwd/getgr_a.c:30 +5 0x00007f46d9dc3733 in getgrnam (name=) at src/passwd/getgrent.c:37 +6 0x0000000000460b29 in utils_get_group_id (name=) at ../../../lttng-tools-2.10.6/src/common/utils.c:1241 +7 0x000000000044ee69 in thread_manage_health (data=) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/main.c:4115 +8 0x00007f46d9de1541 in start (p=) at src/thread/pthread_create.c:195 +9 0x00007f46d9dee661 in __clone () at src/thread/x86_64/clone.s:22 + +From another run: + +0 a_crash () at ./arch/x86_64/atomic_arch.h:108 +1 unmap_chunk (self=) at src/malloc/malloc.c:515 +2 free (p=) at src/malloc/malloc.c:526 +3 0x00007f5abc210849 in __getgrent_a (f=f@entry=0x7f5abc2733e0, gr=gr@entry=0x7f5abc271460 , line=line@entry=0x7f5abc273058 , size=size@entry=0x7f5abaef5510, mem=mem@entry=0x7f5abc273050 , nmem=nmem@entry=0x7f5abaef5518, res=0x7f5abaef5508) at src/passwd/getgrent_a.c:45 +4 0x00007f5abc20fe6b in __getgr_a (name=0x487242 "tracing", gid=gid@entry=0, gr=gr@entry=0x7f5abc271460 , buf=buf@entry=0x7f5abc273058 , size=size@entry=0x7f5abaef5510, mem=mem@entry=0x7f5abc273050 , nmem=0x7f5abaef5518, res=0x7f5abaef5508) at src/passwd/getgr_a.c:30 +5 0x00007f5abc210733 in getgrnam (name=) at src/passwd/getgrent.c:37 +6 0x0000000000460b29 in utils_get_group_id (name=) at ../../../lttng-tools-2.10.6/src/common/utils.c:1241 +7 0x000000000042dee4 in notification_channel_socket_create () at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:238 +8 init_thread_state (state=0x7f5abaef5560, handle=0x7f5abbf9be40) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:375 +9 thread_notification (data=0x7f5abbf9be40) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:495 +10 0x00007f5abc22e541 in start (p=) at src/thread/pthread_create.c:195 +11 0x00007f5abc23b661 in __clone () at src/thread/x86_64/clone.s:22 + +The problem was easily reproducible (~6 crash on ~300 runs). A prototype fix +using mutex around the getgrnam yielded no crash in over 1000 runs. This +patch yielded the same results as the prototype fix. + +Unfortunately we cannot rely on a mutex in liblttng-ctl since we cannot +enforce the locking for the application using the lib. + +Use getgrnam_r instead. + +The previous implementation of utils_get_group_id returned the gid of +the root group (0) on error/not found. lttng_check_tracing_group needs +to know if an error/not found occured, returning the root group is not +enough. We now return the gid via the passed parameter. The caller is +responsible for either defaulting to the root group or propagating the +error. + +We also do not want to warn when used in liblttng-ctl context. We might +want to move the warning elsewhere in the future. For now, pass a bool +if we need to warn or not. + +Signed-off-by: Jonathan Rajotte +--- + src/bin/lttng-consumerd/health-consumerd.c | 10 ++- + src/bin/lttng-relayd/health-relayd.c | 20 ++++-- + src/bin/lttng-sessiond/main.c | 24 +++++-- + src/bin/lttng-sessiond/notification-thread.c | 10 ++- + src/common/utils.c | 75 +++++++++++++++++--- + src/common/utils.h | 4 +- + src/lib/lttng-ctl/lttng-ctl.c | 8 +-- + 7 files changed, 122 insertions(+), 29 deletions(-) + +diff --git a/src/bin/lttng-consumerd/health-consumerd.c b/src/bin/lttng-consumerd/health-consumerd.c +index 1e2f31e4..6045401a 100644 +--- a/src/bin/lttng-consumerd/health-consumerd.c ++++ b/src/bin/lttng-consumerd/health-consumerd.c +@@ -184,8 +184,14 @@ void *thread_manage_health(void *data) + is_root = !getuid(); + if (is_root) { + /* lttng health client socket path permissions */ +- ret = chown(health_unix_sock_path, 0, +- utils_get_group_id(tracing_group_name)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(tracing_group_name, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group. */ ++ } ++ ++ ret = chown(health_unix_sock_path, 0, gid); + if (ret < 0) { + ERR("Unable to set group on %s", health_unix_sock_path); + PERROR("chown"); +diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c +index ba996621..962e88c4 100644 +--- a/src/bin/lttng-relayd/health-relayd.c ++++ b/src/bin/lttng-relayd/health-relayd.c +@@ -105,8 +105,14 @@ static int create_lttng_rundir_with_perm(const char *rundir) + int is_root = !getuid(); + + if (is_root) { +- ret = chown(rundir, 0, +- utils_get_group_id(tracing_group_name)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(tracing_group_name, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group.*/ ++ } ++ ++ ret = chown(rundir, 0, gid); + if (ret < 0) { + ERR("Unable to set group on %s", rundir); + PERROR("chown"); +@@ -256,8 +262,14 @@ void *thread_manage_health(void *data) + is_root = !getuid(); + if (is_root) { + /* lttng health client socket path permissions */ +- ret = chown(health_unix_sock_path, 0, +- utils_get_group_id(tracing_group_name)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(tracing_group_name, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group */ ++ } ++ ++ ret = chown(health_unix_sock_path, 0, gid); + if (ret < 0) { + ERR("Unable to set group on %s", health_unix_sock_path); + PERROR("chown"); +diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c +index fa6fa483..49307064 100644 +--- a/src/bin/lttng-sessiond/main.c ++++ b/src/bin/lttng-sessiond/main.c +@@ -4112,8 +4112,14 @@ static void *thread_manage_health(void *data) + + if (is_root) { + /* lttng health client socket path permissions */ +- ret = chown(config.health_unix_sock_path.value, 0, +- utils_get_group_id(config.tracing_group_name.value)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group */ ++ } ++ ++ ret = chown(config.health_unix_sock_path.value, 0, &gid); + if (ret < 0) { + ERR("Unable to set group on %s", config.health_unix_sock_path.value); + PERROR("chown"); +@@ -5238,7 +5244,10 @@ static int set_permissions(char *rundir) + int ret; + gid_t gid; + +- gid = utils_get_group_id(config.tracing_group_name.value); ++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group */ ++ } + + /* Set lttng run dir */ + ret = chown(rundir, 0, gid); +@@ -5349,7 +5358,14 @@ static int set_consumer_sockets(struct consumer_data *consumer_data) + goto error; + } + if (is_root) { +- ret = chown(path, 0, utils_get_group_id(config.tracing_group_name.value)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group */ ++ } ++ ++ ret = chown(path, 0, gid); + if (ret < 0) { + ERR("Unable to set group on %s", path); + PERROR("chown"); +diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c +index 92ac597f..18a264d9 100644 +--- a/src/bin/lttng-sessiond/notification-thread.c ++++ b/src/bin/lttng-sessiond/notification-thread.c +@@ -235,8 +235,14 @@ int notification_channel_socket_create(void) + } + + if (getuid() == 0) { +- ret = chown(sock_path, 0, +- utils_get_group_id(config.tracing_group_name.value)); ++ gid_t gid; ++ ++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid); ++ if (ret) { ++ gid = 0; /* Default to root group. */ ++ } ++ ++ ret = chown(sock_path, 0, gid); + if (ret) { + ERR("Failed to set the notification channel socket's group"); + ret = -1; +diff --git a/src/common/utils.c b/src/common/utils.c +index c0bb031e..778bc00f 100644 +--- a/src/common/utils.c ++++ b/src/common/utils.c +@@ -1231,24 +1231,77 @@ size_t utils_get_current_time_str(const char *format, char *dst, size_t len) + } + + /* +- * Return the group ID matching name, else 0 if it cannot be found. ++ * Return 0 on success and set *gid to the group_ID matching the passed name. ++ * Else -1 if it cannot be found or an error occurred. + */ + LTTNG_HIDDEN +-gid_t utils_get_group_id(const char *name) ++int utils_get_group_id(const char *name, bool warn, gid_t *gid) + { +- struct group *grp; ++ static volatile int warn_once; + +- grp = getgrnam(name); +- if (!grp) { +- static volatile int warn_once; ++ int ret; ++ long sys_len; ++ size_t len; ++ struct group grp; ++ struct group *result; ++ char *buffer = NULL; + +- if (!warn_once) { +- WARN("No tracing group detected"); +- warn_once = 1; ++ /* Get the system limit if it exists */ ++ sys_len = sysconf(_SC_GETGR_R_SIZE_MAX); ++ if (sys_len == -1) { ++ len = 1024; ++ } else { ++ len = (size_t) sys_len; ++ } ++ ++ buffer = malloc(len); ++ if (!buffer) { ++ PERROR("getgrnam_r malloc"); ++ ret = -1; ++ goto error; ++ } ++ ++ while ((ret = getgrnam_r(name, &grp, buffer, len, &result)) == ERANGE) ++ { ++ /* Buffer is not big enough, increase its size. */ ++ size_t new_len = 2 * len; ++ char *new_buffer = NULL; ++ if (new_len < len) { ++ ERR("getgrnam_r buffer size overflow"); ++ ret = -1; ++ goto error; ++ } ++ len = new_len; ++ new_buffer = realloc(buffer, len); ++ if (!new_buffer) { ++ PERROR("getgrnam_r realloc"); ++ ret = -1; ++ goto error; + } +- return 0; ++ buffer = new_buffer; ++ } ++ if (ret != 0) { ++ PERROR("getgrnam_r"); ++ ret = -1; ++ goto error; ++ } ++ ++ /* Group not found. */ ++ if (!result) { ++ ret = -1; ++ goto error; ++ } ++ ++ *gid = result->gr_gid; ++ ret = 0; ++ ++error: ++ free(buffer); ++ if (ret && warn && !warn_once) { ++ WARN("No tracing group detected"); ++ warn_once = 1; + } +- return grp->gr_gid; ++ return ret; + } + + /* +diff --git a/src/common/utils.h b/src/common/utils.h +index 18f19ef1..9c72431d 100644 +--- a/src/common/utils.h ++++ b/src/common/utils.h +@@ -22,6 +22,8 @@ + #include + #include + #include ++#include ++#include + + #define KIBI_LOG2 10 + #define MEBI_LOG2 20 +@@ -52,7 +54,7 @@ int utils_get_count_order_u64(uint64_t x); + char *utils_get_home_dir(void); + char *utils_get_user_home_dir(uid_t uid); + size_t utils_get_current_time_str(const char *format, char *dst, size_t len); +-gid_t utils_get_group_id(const char *name); ++int utils_get_group_id(const char *name, bool warn, gid_t *gid); + char *utils_generate_optstring(const struct option *long_options, + size_t opt_count); + int utils_create_lock_file(const char *filepath); +diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c +index 2d84aad9..561b0bcf 100644 +--- a/src/lib/lttng-ctl/lttng-ctl.c ++++ b/src/lib/lttng-ctl/lttng-ctl.c +@@ -208,15 +208,13 @@ end: + LTTNG_HIDDEN + int lttng_check_tracing_group(void) + { +- struct group *grp_tracing; /* no free(). See getgrnam(3) */ +- gid_t *grp_list; ++ gid_t *grp_list, tracing_gid; + int grp_list_size, grp_id, i; + int ret = -1; + const char *grp_name = tracing_group; + + /* Get GID of group 'tracing' */ +- grp_tracing = getgrnam(grp_name); +- if (!grp_tracing) { ++ if (utils_get_group_id(grp_name, false, &tracing_gid)) { + /* If grp_tracing is NULL, the group does not exist. */ + goto end; + } +@@ -241,7 +239,7 @@ int lttng_check_tracing_group(void) + } + + for (i = 0; i < grp_list_size; i++) { +- if (grp_list[i] == grp_tracing->gr_gid) { ++ if (grp_list[i] == tracing_gid) { + ret = 1; + break; + } +-- +2.17.1 + diff --git a/devel/lttng-tools/patches/100-musl-compat.patch b/devel/lttng-tools/patches/100-musl-compat.patch deleted file mode 100644 index 8813f837..00000000 --- a/devel/lttng-tools/patches/100-musl-compat.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/src/common/compat/poll.h -+++ b/src/common/compat/poll.h -@@ -55,6 +55,10 @@ static inline void __lttng_poll_free(voi - #include - #include - -+#ifndef __GLIBC_PREREQ -+#define __GLIBC_PREREQ(maj, min) (0) -+#endif -+ - /* See man epoll(7) for this define path */ - #define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches" - ---- a/src/common/runas.h -+++ b/src/common/runas.h -@@ -21,6 +21,7 @@ - - #include - #include -+#include - - int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid); - int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid); diff --git a/devel/lttng-tools/patches/200-use-extern.patch b/devel/lttng-tools/patches/200-use-extern.patch deleted file mode 100644 index 180c0611..00000000 --- a/devel/lttng-tools/patches/200-use-extern.patch +++ /dev/null @@ -1,423 +0,0 @@ ---- a/src/common/mi-lttng.h -+++ b/src/common/mi-lttng.h -@@ -49,133 +49,133 @@ struct mi_lttng_version { - }; - - /* Strings related to command */ --const char * const mi_lttng_element_command; --const char * const mi_lttng_element_command_action; --const char * const mi_lttng_element_command_add_context; --const char * const mi_lttng_element_command_calibrate; --const char * const mi_lttng_element_command_create; --const char * const mi_lttng_element_command_destroy; --const char * const mi_lttng_element_command_disable_channel; --const char * const mi_lttng_element_command_disable_event; --const char * const mi_lttng_element_command_enable_channels; --const char * const mi_lttng_element_command_enable_event; --const char * const mi_lttng_element_command_list; --const char * const mi_lttng_element_command_load; --const char * const mi_lttng_element_command_name; --const char * const mi_lttng_element_command_output; --const char * const mi_lttng_element_command_save; --const char * const mi_lttng_element_command_set_session; --const char * const mi_lttng_element_command_snapshot; --const char * const mi_lttng_element_command_snapshot_add; --const char * const mi_lttng_element_command_snapshot_del; --const char * const mi_lttng_element_command_snapshot_list; --const char * const mi_lttng_element_command_snapshot_record; --const char * const mi_lttng_element_command_start; --const char * const mi_lttng_element_command_stop; --const char * const mi_lttng_element_command_success; --const char * const mi_lttng_element_command_version; -+extern const char * const mi_lttng_element_command; -+extern const char * const mi_lttng_element_command_action; -+extern const char * const mi_lttng_element_command_add_context; -+extern const char * const mi_lttng_element_command_calibrate; -+extern const char * const mi_lttng_element_command_create; -+extern const char * const mi_lttng_element_command_destroy; -+extern const char * const mi_lttng_element_command_disable_channel; -+extern const char * const mi_lttng_element_command_disable_event; -+extern const char * const mi_lttng_element_command_enable_channels; -+extern const char * const mi_lttng_element_command_enable_event; -+extern const char * const mi_lttng_element_command_list; -+extern const char * const mi_lttng_element_command_load; -+extern const char * const mi_lttng_element_command_name; -+extern const char * const mi_lttng_element_command_output; -+extern const char * const mi_lttng_element_command_save; -+extern const char * const mi_lttng_element_command_set_session; -+extern const char * const mi_lttng_element_command_snapshot; -+extern const char * const mi_lttng_element_command_snapshot_add; -+extern const char * const mi_lttng_element_command_snapshot_del; -+extern const char * const mi_lttng_element_command_snapshot_list; -+extern const char * const mi_lttng_element_command_snapshot_record; -+extern const char * const mi_lttng_element_command_start; -+extern const char * const mi_lttng_element_command_stop; -+extern const char * const mi_lttng_element_command_success; -+extern const char * const mi_lttng_element_command_version; - - /* Strings related to version command */ --const char * const mi_lttng_element_version; --const char * const mi_lttng_element_version_commit; --const char * const mi_lttng_element_version_description; --const char * const mi_lttng_element_version_license; --const char * const mi_lttng_element_version_major; --const char * const mi_lttng_element_version_minor; --const char * const mi_lttng_element_version_patch_level; --const char * const mi_lttng_element_version_str; --const char * const mi_lttng_element_version_web; -+extern const char * const mi_lttng_element_version; -+extern const char * const mi_lttng_element_version_commit; -+extern const char * const mi_lttng_element_version_description; -+extern const char * const mi_lttng_element_version_license; -+extern const char * const mi_lttng_element_version_major; -+extern const char * const mi_lttng_element_version_minor; -+extern const char * const mi_lttng_element_version_patch_level; -+extern const char * const mi_lttng_element_version_str; -+extern const char * const mi_lttng_element_version_web; - - /* String related to a lttng_event_field */ --const char * const mi_lttng_element_event_field; --const char * const mi_lttng_element_event_fields; -+extern const char * const mi_lttng_element_event_field; -+extern const char * const mi_lttng_element_event_fields; - - /* String related to lttng_event_context */ --const char * const mi_lttng_context_type_perf_counter; --const char * const mi_lttng_context_type_perf_cpu_counter; --const char * const mi_lttng_context_type_perf_thread_counter; -+extern const char * const mi_lttng_context_type_perf_counter; -+extern const char * const mi_lttng_context_type_perf_cpu_counter; -+extern const char * const mi_lttng_context_type_perf_thread_counter; - - /* String related to lttng_event_perf_counter_ctx */ --const char * const mi_lttng_element_perf_counter_context; -+extern const char * const mi_lttng_element_perf_counter_context; - - /* Strings related to pid */ --const char * const mi_lttng_element_pids; --const char * const mi_lttng_element_pid; --const char * const mi_lttng_element_pid_id; -+extern const char * const mi_lttng_element_pids; -+extern const char * const mi_lttng_element_pid; -+extern const char * const mi_lttng_element_pid_id; - - /* Strings related to save command */ --const char * const mi_lttng_element_save; -+extern const char * const mi_lttng_element_save; - - /* Strings related to load command */ --const char * const mi_lttng_element_load; -+extern const char * const mi_lttng_element_load; - - /* General element of mi_lttng */ --const char * const mi_lttng_element_empty; --const char * const mi_lttng_element_id; --const char * const mi_lttng_element_nowrite; --const char * const mi_lttng_element_success; --const char * const mi_lttng_element_type_enum; --const char * const mi_lttng_element_type_float; --const char * const mi_lttng_element_type_integer; --const char * const mi_lttng_element_type_other; --const char * const mi_lttng_element_type_string; -+extern const char * const mi_lttng_element_empty; -+extern const char * const mi_lttng_element_id; -+extern const char * const mi_lttng_element_nowrite; -+extern const char * const mi_lttng_element_success; -+extern const char * const mi_lttng_element_type_enum; -+extern const char * const mi_lttng_element_type_float; -+extern const char * const mi_lttng_element_type_integer; -+extern const char * const mi_lttng_element_type_other; -+extern const char * const mi_lttng_element_type_string; - - /* String related to loglevel */ --const char * const mi_lttng_loglevel_str_alert; --const char * const mi_lttng_loglevel_str_crit; --const char * const mi_lttng_loglevel_str_debug; --const char * const mi_lttng_loglevel_str_debug_function; --const char * const mi_lttng_loglevel_str_debug_line; --const char * const mi_lttng_loglevel_str_debug_module; --const char * const mi_lttng_loglevel_str_debug_process; --const char * const mi_lttng_loglevel_str_debug_program; --const char * const mi_lttng_loglevel_str_debug_system; --const char * const mi_lttng_loglevel_str_debug_unit; --const char * const mi_lttng_loglevel_str_emerg; --const char * const mi_lttng_loglevel_str_err; --const char * const mi_lttng_loglevel_str_info; --const char * const mi_lttng_loglevel_str_notice; --const char * const mi_lttng_loglevel_str_unknown; --const char * const mi_lttng_loglevel_str_warning; -+extern const char * const mi_lttng_loglevel_str_alert; -+extern const char * const mi_lttng_loglevel_str_crit; -+extern const char * const mi_lttng_loglevel_str_debug; -+extern const char * const mi_lttng_loglevel_str_debug_function; -+extern const char * const mi_lttng_loglevel_str_debug_line; -+extern const char * const mi_lttng_loglevel_str_debug_module; -+extern const char * const mi_lttng_loglevel_str_debug_process; -+extern const char * const mi_lttng_loglevel_str_debug_program; -+extern const char * const mi_lttng_loglevel_str_debug_system; -+extern const char * const mi_lttng_loglevel_str_debug_unit; -+extern const char * const mi_lttng_loglevel_str_emerg; -+extern const char * const mi_lttng_loglevel_str_err; -+extern const char * const mi_lttng_loglevel_str_info; -+extern const char * const mi_lttng_loglevel_str_notice; -+extern const char * const mi_lttng_loglevel_str_unknown; -+extern const char * const mi_lttng_loglevel_str_warning; - - /* String related to loglevel JUL */ --const char * const mi_lttng_loglevel_str_jul_all; --const char * const mi_lttng_loglevel_str_jul_config; --const char * const mi_lttng_loglevel_str_jul_fine; --const char * const mi_lttng_loglevel_str_jul_finer; --const char * const mi_lttng_loglevel_str_jul_finest; --const char * const mi_lttng_loglevel_str_jul_info; --const char * const mi_lttng_loglevel_str_jul_off; --const char * const mi_lttng_loglevel_str_jul_severe; --const char * const mi_lttng_loglevel_str_jul_warning; -+extern const char * const mi_lttng_loglevel_str_jul_all; -+extern const char * const mi_lttng_loglevel_str_jul_config; -+extern const char * const mi_lttng_loglevel_str_jul_fine; -+extern const char * const mi_lttng_loglevel_str_jul_finer; -+extern const char * const mi_lttng_loglevel_str_jul_finest; -+extern const char * const mi_lttng_loglevel_str_jul_info; -+extern const char * const mi_lttng_loglevel_str_jul_off; -+extern const char * const mi_lttng_loglevel_str_jul_severe; -+extern const char * const mi_lttng_loglevel_str_jul_warning; - - /* String related to loglevel Log4j */ --const char * const mi_lttng_loglevel_str_log4j_off; --const char * const mi_lttng_loglevel_str_log4j_fatal; --const char * const mi_lttng_loglevel_str_log4j_error; --const char * const mi_lttng_loglevel_str_log4j_warn; --const char * const mi_lttng_loglevel_str_log4j_info; --const char * const mi_lttng_loglevel_str_log4j_debug; --const char * const mi_lttng_loglevel_str_log4j_trace; --const char * const mi_lttng_loglevel_str_log4j_all; -+extern const char * const mi_lttng_loglevel_str_log4j_off; -+extern const char * const mi_lttng_loglevel_str_log4j_fatal; -+extern const char * const mi_lttng_loglevel_str_log4j_error; -+extern const char * const mi_lttng_loglevel_str_log4j_warn; -+extern const char * const mi_lttng_loglevel_str_log4j_info; -+extern const char * const mi_lttng_loglevel_str_log4j_debug; -+extern const char * const mi_lttng_loglevel_str_log4j_trace; -+extern const char * const mi_lttng_loglevel_str_log4j_all; - - /* String related to loglevel type */ --const char * const mi_lttng_loglevel_type_all; --const char * const mi_lttng_loglevel_type_range; --const char * const mi_lttng_loglevel_type_single; --const char * const mi_lttng_loglevel_type_unknown; -+extern const char * const mi_lttng_loglevel_type_all; -+extern const char * const mi_lttng_loglevel_type_range; -+extern const char * const mi_lttng_loglevel_type_single; -+extern const char * const mi_lttng_loglevel_type_unknown; - - /* Sting related to lttng_calibrate */ --const char * const mi_lttng_element_calibrate; --const char * const mi_lttng_element_calibrate_function; -+extern const char * const mi_lttng_element_calibrate; -+extern const char * const mi_lttng_element_calibrate_function; - - /* String related to a lttng_snapshot */ --const char * const mi_lttng_element_snapshot_ctrl_url; --const char * const mi_lttng_element_snapshot_data_url; --const char * const mi_lttng_element_snapshot_max_size; --const char * const mi_lttng_element_snapshot_n_ptr; --const char * const mi_lttng_element_snapshot_session_name; --const char * const mi_lttng_element_snapshots; -+extern const char * const mi_lttng_element_snapshot_ctrl_url; -+extern const char * const mi_lttng_element_snapshot_data_url; -+extern const char * const mi_lttng_element_snapshot_max_size; -+extern const char * const mi_lttng_element_snapshot_n_ptr; -+extern const char * const mi_lttng_element_snapshot_session_name; -+extern const char * const mi_lttng_element_snapshots; - - /* Utility string function */ - const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain); ---- a/src/common/config/config-session-abi.h -+++ b/src/common/config/config-session-abi.h -@@ -18,95 +18,95 @@ - #ifndef CONFIG_SESSION_INTERNAL_H - #define CONFIG_SESSION_INTERNAL_H - --const char * const config_element_channel; --const char * const config_element_channels; --const char * const config_element_domain; --const char * const config_element_domains; --const char * const config_element_event; --const char * const config_element_events; --const char * const config_element_context; --const char * const config_element_contexts; --const char * const config_element_attributes; --const char * const config_element_exclusion; --const char * const config_element_exclusions; --const char * const config_element_function_attributes; --const char * const config_element_probe_attributes; --const char * const config_element_symbol_name; --const char * const config_element_address; --const char * const config_element_offset; --const char * const config_element_name; --const char * const config_element_enabled; --const char * const config_element_overwrite_mode; --const char * const config_element_subbuf_size; --const char * const config_element_num_subbuf; --const char * const config_element_switch_timer_interval; --const char * const config_element_read_timer_interval; --const char * const config_element_output; --const char * const config_element_output_type; --const char * const config_element_tracefile_size; --const char * const config_element_tracefile_count; --const char * const config_element_live_timer_interval; --const char * const config_element_type; --const char * const config_element_buffer_type; --const char * const config_element_session; --const char * const config_element_sessions; --const char * const config_element_perf; --const char * const config_element_config; --const char * const config_element_started; --const char * const config_element_snapshot_mode; --const char * const config_element_loglevel; --const char * const config_element_loglevel_type; --const char * const config_element_filter; --const char * const config_element_snapshot_outputs; --const char * const config_element_consumer_output; --const char * const config_element_destination; --const char * const config_element_path; --const char * const config_element_net_output; --const char * const config_element_control_uri; --const char * const config_element_data_uri; --const char * const config_element_max_size; -- --const char * const config_domain_type_kernel; --const char * const config_domain_type_ust; --const char * const config_domain_type_jul; --const char * const config_domain_type_log4j; -- --const char * const config_buffer_type_per_pid; --const char * const config_buffer_type_per_uid; --const char * const config_buffer_type_global; -- --const char * const config_overwrite_mode_discard; --const char * const config_overwrite_mode_overwrite; -- --const char * const config_output_type_splice; --const char * const config_output_type_mmap; -- --const char * const config_loglevel_type_all; --const char * const config_loglevel_type_range; --const char * const config_loglevel_type_single; -- --const char * const config_event_type_all; --const char * const config_event_type_tracepoint; --const char * const config_event_type_probe; --const char * const config_event_type_function; --const char * const config_event_type_function_entry; --const char * const config_event_type_noop; --const char * const config_event_type_syscall; --const char * const config_event_type_kprobe; --const char * const config_event_type_kretprobe; -- --const char * const config_event_context_pid; --const char * const config_event_context_procname; --const char * const config_event_context_prio; --const char * const config_event_context_nice; --const char * const config_event_context_vpid; --const char * const config_event_context_tid; --const char * const config_event_context_vtid; --const char * const config_event_context_ppid; --const char * const config_event_context_vppid; --const char * const config_event_context_pthread_id; --const char * const config_event_context_hostname; --const char * const config_event_context_ip; --const char * const config_event_context_perf_thread_counter; -+extern const char * const config_element_channel; -+extern const char * const config_element_channels; -+extern const char * const config_element_domain; -+extern const char * const config_element_domains; -+extern const char * const config_element_event; -+extern const char * const config_element_events; -+extern const char * const config_element_context; -+extern const char * const config_element_contexts; -+extern const char * const config_element_attributes; -+extern const char * const config_element_exclusion; -+extern const char * const config_element_exclusions; -+extern const char * const config_element_function_attributes; -+extern const char * const config_element_probe_attributes; -+extern const char * const config_element_symbol_name; -+extern const char * const config_element_address; -+extern const char * const config_element_offset; -+extern const char * const config_element_name; -+extern const char * const config_element_enabled; -+extern const char * const config_element_overwrite_mode; -+extern const char * const config_element_subbuf_size; -+extern const char * const config_element_num_subbuf; -+extern const char * const config_element_switch_timer_interval; -+extern const char * const config_element_read_timer_interval; -+extern const char * const config_element_output; -+extern const char * const config_element_output_type; -+extern const char * const config_element_tracefile_size; -+extern const char * const config_element_tracefile_count; -+extern const char * const config_element_live_timer_interval; -+extern const char * const config_element_type; -+extern const char * const config_element_buffer_type; -+extern const char * const config_element_session; -+extern const char * const config_element_sessions; -+extern const char * const config_element_perf; -+extern const char * const config_element_config; -+extern const char * const config_element_started; -+extern const char * const config_element_snapshot_mode; -+extern const char * const config_element_loglevel; -+extern const char * const config_element_loglevel_type; -+extern const char * const config_element_filter; -+extern const char * const config_element_snapshot_outputs; -+extern const char * const config_element_consumer_output; -+extern const char * const config_element_destination; -+extern const char * const config_element_path; -+extern const char * const config_element_net_output; -+extern const char * const config_element_control_uri; -+extern const char * const config_element_data_uri; -+extern const char * const config_element_max_size; -+ -+extern const char * const config_domain_type_kernel; -+extern const char * const config_domain_type_ust; -+extern const char * const config_domain_type_jul; -+extern const char * const config_domain_type_log4j; -+ -+extern const char * const config_buffer_type_per_pid; -+extern const char * const config_buffer_type_per_uid; -+extern const char * const config_buffer_type_global; -+ -+extern const char * const config_overwrite_mode_discard; -+extern const char * const config_overwrite_mode_overwrite; -+ -+extern const char * const config_output_type_splice; -+extern const char * const config_output_type_mmap; -+ -+extern const char * const config_loglevel_type_all; -+extern const char * const config_loglevel_type_range; -+extern const char * const config_loglevel_type_single; -+ -+extern const char * const config_event_type_all; -+extern const char * const config_event_type_tracepoint; -+extern const char * const config_event_type_probe; -+extern const char * const config_event_type_function; -+extern const char * const config_event_type_function_entry; -+extern const char * const config_event_type_noop; -+extern const char * const config_event_type_syscall; -+extern const char * const config_event_type_kprobe; -+extern const char * const config_event_type_kretprobe; -+ -+extern const char * const config_event_context_pid; -+extern const char * const config_event_context_procname; -+extern const char * const config_event_context_prio; -+extern const char * const config_event_context_nice; -+extern const char * const config_event_context_vpid; -+extern const char * const config_event_context_tid; -+extern const char * const config_event_context_vtid; -+extern const char * const config_event_context_ppid; -+extern const char * const config_event_context_vppid; -+extern const char * const config_event_context_pthread_id; -+extern const char * const config_event_context_hostname; -+extern const char * const config_event_context_ip; -+extern const char * const config_event_context_perf_thread_counter; - - #endif /* CONFIG_SESSION_INTERNAL_H */ diff --git a/devel/m4/Makefile b/devel/m4/Makefile index 1a42f4b1..69ca0fd5 100644 --- a/devel/m4/Makefile +++ b/devel/m4/Makefile @@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=m4 PKG_VERSION:=1.4.18 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=@GNU/m4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_HASH:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07 PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE:=GPL-3.0-or-later +PKG_CPE_ID:=cpe:/a:gnu:m4 PKG_INSTALL:=1 diff --git a/devel/make/Makefile b/devel/make/Makefile index a2692d42..61ce3a63 100644 --- a/devel/make/Makefile +++ b/devel/make/Makefile @@ -8,16 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=make -PKG_VERSION:=4.2.1 -PKG_RELEASE:=2 +PKG_VERSION:=4.3 +PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/make -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_HASH:=d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19 + PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE:=GPL-3.0-or-later +PKG_CPE_ID:=cpe:/a:gnu:make PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -37,10 +40,12 @@ define Package/make/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/make $(1)/usr/bin/ endef +CONFIGURE_VARS += ac_cv_lib_elf_elf_begin=no + # provide gnumake.h at build time for other packages define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/gnumake.h $(1)/usr/include/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/gnumake.h $(1)/usr/include/ endef $(eval $(call BuildPackage,make)) diff --git a/devel/meson/Makefile b/devel/meson/Makefile index 16be7f35..e83aef19 100644 --- a/devel/meson/Makefile +++ b/devel/meson/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson -PKG_VERSION:=0.54.2 +PKG_VERSION:=0.54.3 PKG_RELEASE:=1 PYPI_NAME:=meson -PKG_HASH:=a7716eeae8f8dff002e4147642589ab6496ff839e4376a5aed761f83c1fa0455 +PKG_HASH:=f2bdf4cf0694e696b48261cdd14380fb1d0fe33d24744d8b2df0c12f33ebb662 PKG_MAINTAINER:=Andre Heider PKG_LICENSE:=Apache-2.0 @@ -40,7 +40,6 @@ define Package/meson TITLE:=meson URL:=https://mesonbuild.com/ DEPENDS:=+ninja +python3-pkg-resources - VARIANT:=python3 endef define Package/meson/description diff --git a/devel/ninja/Makefile b/devel/ninja/Makefile index 309ce800..aa20fd91 100644 --- a/devel/ninja/Makefile +++ b/devel/ninja/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ninja -PKG_VERSION:=1.9.0 +PKG_VERSION:=1.10.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ninja-build/ninja/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=5d7ec75828f8d3fd1a0c2f31b5b0cea780cdfe1031359228c428c1a48bfcd5b9 +PKG_HASH:=3810318b08489435f8efc19c05525e80a993af5a55baa0dfeae0465a9d45f99f PKG_MAINTAINER:=Andre Heider PKG_LICENSE:=Apache-2.0 diff --git a/devel/ninja/patches/010-musl.patch b/devel/ninja/patches/010-musl.patch deleted file mode 100644 index 6c4426fa..00000000 --- a/devel/ninja/patches/010-musl.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 567815df38a2ff54ad7478a90bd75c91e434236a Mon Sep 17 00:00:00 2001 -From: makepost -Date: Mon, 24 Dec 2018 03:13:16 +0200 -Subject: [PATCH] Use st_mtim if st_mtime is macro, fix #1510 - -In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward -compatibility macro. Should help avoid hardcoding platform detection. ---- - src/disk_interface.cc | 14 ++++---------- - 1 file changed, 4 insertions(+), 10 deletions(-) - ---- a/src/disk_interface.cc -+++ b/src/disk_interface.cc -@@ -202,19 +202,13 @@ TimeStamp RealDiskInterface::Stat(const - // that it doesn't exist. - if (st.st_mtime == 0) - return 1; --#if defined(__APPLE__) && !defined(_POSIX_C_SOURCE) -+#if defined(_AIX) -+ return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n; -+#elif defined(__APPLE__) - return ((int64_t)st.st_mtimespec.tv_sec * 1000000000LL + - st.st_mtimespec.tv_nsec); --#elif (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || \ -- defined(__BIONIC__) || (defined (__SVR4) && defined (__sun)) || defined(__FreeBSD__)) -- // For glibc, see "Timestamp files" in the Notes of http://www.kernel.org/doc/man-pages/online/pages/man2/stat.2.html -- // newlib, uClibc and musl follow the kernel (or Cygwin) headers and define the right macro values above. -- // For bsd, see https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h and similar -- // For bionic, C and POSIX API is always enabled. -- // For solaris, see https://docs.oracle.com/cd/E88353_01/html/E37841/stat-2.html. -+#elif defined(st_mtime) // A macro, so we're likely on modern POSIX. - return (int64_t)st.st_mtim.tv_sec * 1000000000LL + st.st_mtim.tv_nsec; --#elif defined(_AIX) -- return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n; - #else - return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec; - #endif diff --git a/devel/ninja/patches/020-uclibc.patch b/devel/ninja/patches/020-uclibc.patch deleted file mode 100644 index 5637e65d..00000000 --- a/devel/ninja/patches/020-uclibc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 76abf78aac8c56606fb52ea874873d790b9044da Mon Sep 17 00:00:00 2001 -From: "Pawel Hajdan, Jr" -Date: Mon, 2 Jan 2017 10:42:35 +0000 -Subject: [PATCH] Fix build with uclibc - -Resolves #985 - -This is based on musl implementation, -http://git.musl-libc.org/cgit/musl/commit/?id=20cbd607759038dca57f84ef7e7b5d44a3088574 -(thanks to jbergstroem@ for reference) ---- - src/util.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - ---- a/src/util.cc -+++ b/src/util.cc -@@ -572,6 +572,13 @@ double GetLoadAverage() { - return -0.0f; - return 1.0 / (1 << SI_LOAD_SHIFT) * si.loads[0]; - } -+#elif defined(__UCLIBC__) -+double GetLoadAverage() { -+ struct sysinfo si; -+ if (sysinfo(&si) != 0) -+ return -0.0f; -+ return 1.0 / (1 << SI_LOAD_SHIFT) * si.loads[0]; -+} - #else - double GetLoadAverage() { - double loadavg[3] = { 0.0f, 0.0f, 0.0f }; diff --git a/devel/patch/Makefile b/devel/patch/Makefile index 43049def..5ea67c7a 100644 --- a/devel/patch/Makefile +++ b/devel/patch/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=patch PKG_VERSION:=2.7.6 -PKG_RELEASE:=3 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/patch PKG_HASH:=ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd -PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:gnu:patch diff --git a/devel/patch/patches/050-CVE-2019-13636.patch b/devel/patch/patches/050-CVE-2019-13636.patch new file mode 100644 index 00000000..e62c3d41 --- /dev/null +++ b/devel/patch/patches/050-CVE-2019-13636.patch @@ -0,0 +1,108 @@ +From dce4683cbbe107a95f1f0d45fabc304acfb5d71a Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Mon, 15 Jul 2019 16:21:48 +0200 +Subject: Don't follow symlinks unless --follow-symlinks is given + +* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, +append_to_file): Unless the --follow-symlinks option is given, open files with +the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing +that consistently for input files. +* src/util.c (create_backup): When creating empty backup files, (re)create them +with O_CREAT | O_EXCL to avoid following symlinks in that case as well. +--- + src/inp.c | 12 ++++++++++-- + src/util.c | 14 +++++++++++--- + 2 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/src/inp.c b/src/inp.c +index 32d0919..22d7473 100644 +--- a/src/inp.c ++++ b/src/inp.c +@@ -238,8 +238,13 @@ plan_a (char const *filename) + { + if (S_ISREG (instat.st_mode)) + { +- int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); ++ int flags = O_RDONLY | binary_transput; + size_t buffered = 0, n; ++ int ifd; ++ ++ if (! follow_symlinks) ++ flags |= O_NOFOLLOW; ++ ifd = safe_open (filename, flags, 0); + if (ifd < 0) + pfatal ("can't open file %s", quotearg (filename)); + +@@ -340,6 +345,7 @@ plan_a (char const *filename) + static void + plan_b (char const *filename) + { ++ int flags = O_RDONLY | binary_transput; + int ifd; + FILE *ifp; + int c; +@@ -353,7 +359,9 @@ plan_b (char const *filename) + + if (instat.st_size == 0) + filename = NULL_DEVICE; +- if ((ifd = safe_open (filename, O_RDONLY | binary_transput, 0)) < 0 ++ if (! follow_symlinks) ++ flags |= O_NOFOLLOW; ++ if ((ifd = safe_open (filename, flags, 0)) < 0 + || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r"))) + pfatal ("Can't open file %s", quotearg (filename)); + if (TMPINNAME_needs_removal) +diff --git a/src/util.c b/src/util.c +index 1cc08ba..fb38307 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) + + try_makedirs_errno = ENOENT; + safe_unlink (bakname); +- while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) ++ while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)) < 0) + { + if (errno != try_makedirs_errno) + pfatal ("Can't create file %s", quotearg (bakname)); +@@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode, + static void + copy_to_fd (const char *from, int tofd) + { ++ int from_flags = O_RDONLY | O_BINARY; + int fromfd; + ssize_t i; + +- if ((fromfd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0) ++ if (! follow_symlinks) ++ from_flags |= O_NOFOLLOW; ++ if ((fromfd = safe_open (from, from_flags, 0)) < 0) + pfatal ("Can't reopen file %s", quotearg (from)); + while ((i = read (fromfd, buf, bufsize)) != 0) + { +@@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost, + else + { + assert (S_ISREG (mode)); ++ if (! follow_symlinks) ++ to_flags |= O_NOFOLLOW; + tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode, + to_dir_known_to_exist); + copy_to_fd (from, tofd); +@@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost, + void + append_to_file (char const *from, char const *to) + { ++ int to_flags = O_WRONLY | O_APPEND | O_BINARY; + int tofd; + +- if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0) ++ if (! follow_symlinks) ++ to_flags |= O_NOFOLLOW; ++ if ((tofd = safe_open (to, to_flags, 0)) < 0) + pfatal ("Can't reopen file %s", quotearg (to)); + copy_to_fd (from, tofd); + if (close (tofd) != 0) +-- +cgit v1.0-41-gc330 + diff --git a/devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch b/devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch new file mode 100644 index 00000000..38caff62 --- /dev/null +++ b/devel/patch/patches/060-CVE-2018-20969-CVE-2019-13638.patch @@ -0,0 +1,38 @@ +From 3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Fri, 6 Apr 2018 19:36:15 +0200 +Subject: Invoke ed directly instead of using the shell + +* src/pch.c (do_ed_script): Invoke ed directly instead of using a shell +command to avoid quoting vulnerabilities. +--- + src/pch.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/pch.c b/src/pch.c +index 4fd5a05..16e001a 100644 +--- a/src/pch.c ++++ b/src/pch.c +@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, + *outname_needs_removal = true; + copy_file (inname, outname, 0, exclusive, instat.st_mode, true); + } +- sprintf (buf, "%s %s%s", editor_program, +- verbosity == VERBOSE ? "" : "- ", +- outname); + fflush (stdout); + + pid = fork(); +@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname, + else if (pid == 0) + { + dup2 (tmpfd, 0); +- execl ("/bin/sh", "sh", "-c", buf, (char *) 0); ++ assert (outname[0] != '!' && outname[0] != '-'); ++ execlp (editor_program, editor_program, "-", outname, (char *) NULL); + _exit (2); + } + else +-- +cgit v1.0-41-gc330 + diff --git a/devel/pkg-config/Makefile b/devel/pkg-config/Makefile index 26ef737c..3ea917e2 100644 --- a/devel/pkg-config/Makefile +++ b/devel/pkg-config/Makefile @@ -8,16 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pkg-config -PKG_VERSION:=0.29.1 -PKG_RELEASE:=1 +PKG_VERSION:=0.29.2 +PKG_RELEASE:=3 -PKG_SOURCE_URL:=http://pkgconfig.freedesktop.org/releases/ +PKG_SOURCE_URL:=https://pkg-config.freedesktop.org/releases/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=beb43c9e064555469bd4390dcfd8030b1536e0aa103f08d7abf7ae8cac0cb001 +PKG_HASH:=6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591 + PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-2+ +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -26,8 +29,9 @@ define Package/pkg-config SECTION:=devel CATEGORY:=Development TITLE:=pkg-config - URL:=http://www.freedesktop.org/wiki/Software/pkg-config/ + URL:=https://www.freedesktop.org/wiki/Software/pkg-config/ DEPENDS:=+glib2 $(INTL_DEPENDS) + CONFLICTS:=pkgconf endef define Package/pkg-config/description @@ -38,6 +42,8 @@ define Package/pkg-config/description other libraries). endef +TARGET_CFLAGS += $(FPIC) + define Package/pkg-config/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pkg-config $(1)/usr/bin/ diff --git a/devel/pkgconf/Makefile b/devel/pkgconf/Makefile new file mode 100644 index 00000000..e4ea3866 --- /dev/null +++ b/devel/pkgconf/Makefile @@ -0,0 +1,82 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pkgconf +PKG_VERSION:=1.7.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://distfiles.dereferenced.org/pkgconf +PKG_HASH:=b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0 + +PKG_MAINTAINER:=Rosen Penev +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=meson/host + +include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk + +define Package/libpkgconf + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libpkgconf + URL:=http://pkgconf.org/ +endef + +define Package/pkgconf + SECTION:=devel + CATEGORY:=Development + TITLE:=pkgconf + URL:=http://pkgconf.org/ + DEPENDS:=+libpkgconf +endef + +define Package/libpkgconf/description + libpkgconf is a library which provides access to most of pkgconf’s + functionality, to allow other tooling such as compilers and IDEs to + discover and use frameworks configured by pkgconf. It features a stable + library ABI and API designed for building bindings and other tools. +endef + +define Package/pkgconf/description + pkgconf is a program which helps to configure compiler and linker flags + for development frameworks. It is similar to pkg-config from + freedesktop.org, providing additional functionality while also + maintaining compatibility. +endef + +MESON_ARGS += \ + -Dtests=false + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/libpkgconf + $(CP) $(PKG_INSTALL_DIR)/usr/include/libpkgconf/*.h $(1)/usr/include/libpkgconf/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpkgconf.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/share/aclocal/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/pkg.m4 \ + $(1)/usr/share/aclocal/ +endef + +define Package/libpkgconf/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpkgconf.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/share/aclocal/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/pkg.m4 \ + $(1)/usr/share/aclocal/ +endef + +define Package/pkgconf/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pkgconf $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libpkgconf)) +$(eval $(call BuildPackage,pkgconf)) diff --git a/ipv6/miredo/Makefile b/ipv6/miredo/Makefile new file mode 100644 index 00000000..e3498a89 --- /dev/null +++ b/ipv6/miredo/Makefile @@ -0,0 +1,72 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=miredo +PKG_VERSION:=1.2.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=miredo-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://www.remlab.net/files/miredo/ +PKG_HASH:=fa26d2f4a405415833669e2e2e22677b225d8f83600844645d5683535ea43149 + +PKG_CONFIG_DEPENDS:= \ + CONFIG_IPV6 \ + CONFIG_TUN +PKG_BUILD_PARALLEL:=1 +PKG_CHECK_FORMAT_SECURITY:=0 +PKG_INSTALL:=1 + +PKG_MAINTAINER:= +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk + +define Package/miredo + SECTION:=net + CATEGORY:=Network + TITLE:=Teredo IPv6 tunneling utility + URL:=https://www.remlab.net/miredo/ + DEPENDS:=@IPV6 +libpthread +librt +kmod-tun +endef + +define Package/miredo/description + Miredo is an open-source Teredo IPv6 tunneling software, for Linux and the BSD + operating systems. It includes functional implementations of all components of + the Teredo specification (client, relay and server). It is meant to provide + IPv6 connectivity even from behind NAT devices. +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --enable-static \ + --disable-binreloc \ + --with-pic \ + --without-libiconv-prefix \ + --without-libintl-prefix + +CONFIGURE_VARS += \ + ac_cv_header_sys_capability_h=no + +TARGET_CFLAGS+= \ + $(FPIC) \ + -ffunction-sections \ + -fdata-sections + +TARGET_LDFLAGS += -Wl,--gc-sections + +define Package/miredo/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo-checkconf $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/miredo + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/miredo/miredo-privproc $(1)/usr/lib/miredo + $(INSTALL_DIR) $(1)/etc/miredo + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/miredo/miredo.conf $(1)/etc/miredo + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/miredo/client-hook $(1)/etc/miredo + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/miredo.init $(1)/etc/init.d/miredo +endef + +$(eval $(call BuildPackage,miredo)) diff --git a/ipv6/miredo/files/miredo.init b/ipv6/miredo/files/miredo.init new file mode 100644 index 00000000..95582775 --- /dev/null +++ b/ipv6/miredo/files/miredo.init @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 +START=41 + +PROG=/usr/sbin/miredo +CONFFILE=/etc/miredo/miredo.conf + +start_service() { + procd_open_instance + procd_set_param command $PROG -f -c $CONFFILE + procd_set_param respawn + procd_set_param file $CONFFILE + procd_set_param stdout 1 # forward stdout of the command to logd + procd_set_param stderr 1 # same for stderr + procd_close_instance +} diff --git a/ipv6/miredo/patches/001-fix-musl-pthread-non-portable.patch b/ipv6/miredo/patches/001-fix-musl-pthread-non-portable.patch new file mode 100644 index 00000000..bbaa54c4 --- /dev/null +++ b/ipv6/miredo/patches/001-fix-musl-pthread-non-portable.patch @@ -0,0 +1,24 @@ +--- a/libteredo/debug.h 2009-02-28 23:17:14.000000000 +0300 ++++ b/libteredo/debug.h 2019-04-07 01:46:48.235087395 +0300 +@@ -43,8 +43,10 @@ + # ifdef __linux__ + # include + # include +-# undef PTHREAD_MUTEX_INITIALIZER +-# define PTHREAD_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP ++# if defined(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP) ++# undef PTHREAD_MUTEX_INITIALIZER ++# define PTHREAD_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP ++# endif + + static inline int + d_pthread_mutex_init (pthread_mutex_t *mutex, pthread_mutexattr_t *pattr) +@@ -57,7 +59,7 @@ + pthread_mutexattr_init (&attr); + } + +- pthread_mutexattr_settype (pattr, PTHREAD_MUTEX_ERRORCHECK_NP); ++ pthread_mutexattr_settype (pattr, PTHREAD_MUTEX_ERRORCHECK); + int res = pthread_mutex_init (mutex, pattr); + + if (pattr == &attr) diff --git a/ipv6/miredo/patches/002-fix-redefinition-ethadr.patch b/ipv6/miredo/patches/002-fix-redefinition-ethadr.patch new file mode 100644 index 00000000..5cd20f4a --- /dev/null +++ b/ipv6/miredo/patches/002-fix-redefinition-ethadr.patch @@ -0,0 +1,21 @@ +--- a/libtun6/tun6.c 2012-09-12 17:03:59.000000000 +0400 ++++ b/libtun6/tun6.c 2019-04-07 02:21:07.439952535 +0300 +@@ -53,7 +53,7 @@ + const char os_driver[] = "Linux"; + # define USE_LINUX 1 + +-# include // TUNSETIFF - Linux tunnel driver ++# include // TUNSETIFF - Linux tunnel driver, ETH_P_IPV6 + /* + * conflicts with and , + * so we've got to declare this structure by hand. +@@ -65,7 +65,7 @@ + }; + + # include // struct in6_rtmsg +-# include // ETH_P_IPV6 ++//# include // ETH_P_IPV6 + + typedef struct + { + diff --git a/ipv6/miredo/patches/003-fix-warnings-portable-defined.patch b/ipv6/miredo/patches/003-fix-warnings-portable-defined.patch new file mode 100644 index 00000000..d812f777 --- /dev/null +++ b/ipv6/miredo/patches/003-fix-warnings-portable-defined.patch @@ -0,0 +1,47 @@ +--- a/include/gettext.h 2012-09-12 16:57:52.000000000 +0400 ++++ b/include/gettext.h 2019-04-07 01:11:52.492519796 +0300 +@@ -182,7 +182,7 @@ + (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined(__STRICT_ANSI__)) \ + /* || __STDC_VERSION__ >= 199901L */ ) + +-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS ++#if !defined(_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS) + #include + #endif + +@@ -206,7 +206,7 @@ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +-#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS ++#if defined(_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS) + char msg_ctxt_id[msgctxt_len + msgid_len]; + #else + char buf[1024]; +@@ -221,7 +221,7 @@ + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcgettext (domain, msg_ctxt_id, category); +-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS ++#if !defined(_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS) + if (msg_ctxt_id != buf) + free (msg_ctxt_id); + #endif +@@ -252,7 +252,7 @@ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +-#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS ++#if defined(_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS) + char msg_ctxt_id[msgctxt_len + msgid_len]; + #else + char buf[1024]; +@@ -267,7 +267,7 @@ + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); +-#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS ++#if !defined(_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS) + if (msg_ctxt_id != buf) + free (msg_ctxt_id); + #endif diff --git a/kernel/antfs/Makefile b/kernel/antfs/Makefile new file mode 100644 index 00000000..6f277198 --- /dev/null +++ b/kernel/antfs/Makefile @@ -0,0 +1,44 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=antfs +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://github.com/klukonin/antfs.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE:=2020-02-10 +PKG_SOURCE_VERSION:=b41ba529f6b64b429527e09a06ce0326d5456c05 +PKG_MIRROR_HASH:=dae039c0fe5bf1a2c8c1cca4211d607a4d6f56fc41b38444e2234b40d710d9db + +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/fs-antfs + SUBMENU:=Filesystems + TITLE:=AVM NTFS Read/Write Driver + FILES:=$(PKG_BUILD_DIR)/antfs.ko + AUTOLOAD:=$(call AutoLoad,30,antfs,1) + DEPENDS:=+kmod-nls-base +endef + +define KernelPackage/fs-antfs/description + Kernel module for NTFS Filesytem +endef + +MAKE_OPTS:= \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + M="$(PKG_BUILD_DIR)" + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + $(MAKE_OPTS) \ + CONFIG_ANTFS_FS=m \ + CONFIG_ANTFS_SYMLINKS=y \ + ANTFS_VERSION=07.19-$(call version_abbrev,$(PKG_SOURCE_VERSION)) \ + modules +endef + +$(eval $(call KernelPackage,fs-antfs)) diff --git a/kernel/ksmbd/Makefile b/kernel/ksmbd/Makefile new file mode 100644 index 00000000..c67c29c4 --- /dev/null +++ b/kernel/ksmbd/Makefile @@ -0,0 +1,70 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=ksmbd +PKG_VERSION:=3.2.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)? +PKG_HASH:=16ad304c09d5f04ddbe99d21ca9df8a9a6d8e35b21ff0e205f212f8c545b979b + +PKG_MAINTAINER:=Andy Walsh +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk + +TAR_OPTIONS+= --strip-components 1 +TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) + +define KernelPackage/fs-ksmbd + SUBMENU:=Filesystems + TITLE:=SMB kernel server support + URL:=https://github.com/cifsd-team/cifsd + FILES:=$(PKG_BUILD_DIR)/ksmbd.ko + DEPENDS:= \ + +kmod-nls-base \ + +kmod-nls-utf8 \ + +kmod-crypto-md4 \ + +kmod-crypto-md5 \ + +kmod-crypto-hmac \ + +kmod-crypto-arc4 \ + +kmod-crypto-ecb \ + +kmod-crypto-des \ + +kmod-crypto-sha256 \ + +kmod-crypto-cmac \ + +kmod-crypto-sha512 \ + +kmod-crypto-aead \ + +kmod-crypto-ccm \ + +kmod-crypto-gcm +endef + +define KernelPackage/fs-ksmbd/description + Ksmbd is an In-kernel SMBv(1)2/3 fileserver. + It's an implementation of the SMB protocol in kernel space for sharing files and IPC services over network. +endef + +define KernelPackage/fs-ksmbd/config +config KSMBD_SMB_INSECURE_SERVER + bool "Support for insecure SMB1/CIFS and SMB2.0 protocols" + depends on PACKAGE_kmod-fs-ksmbd + help + This enables deprecated insecure protocols dialects: SMB1/CIFS and SMB2.0. + default y +endef + +ifeq ($(CONFIG_KSMBD_SMB_INSECURE_SERVER),y) +PKG_EXTRA_KCONFIG:=CONFIG_SMB_INSECURE_SERVER=y +EXTRA_CFLAGS += -DCONFIG_SMB_INSECURE_SERVER=1 +endif + +define Build/Compile + $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + $(PKG_EXTRA_KCONFIG) \ + CONFIG_SMB_SERVER=m \ + modules +endef + +$(eval $(call KernelPackage,fs-ksmbd)) diff --git a/kernel/ksmbd/patches/01-keep_kmod_metadata.patch b/kernel/ksmbd/patches/01-keep_kmod_metadata.patch new file mode 100644 index 00000000..a7055299 --- /dev/null +++ b/kernel/ksmbd/patches/01-keep_kmod_metadata.patch @@ -0,0 +1,11 @@ +--- a/glob.h ++++ b/glob.h +@@ -7,6 +7,8 @@ + #ifndef __KSMBD_GLOB_H + #define __KSMBD_GLOB_H + ++#undef CONFIG_MODULE_STRIPPED ++ + #include + #include + diff --git a/lang/chicken-scheme/Makefile b/lang/chicken-scheme/Makefile new file mode 100644 index 00000000..bdeb7d0c --- /dev/null +++ b/lang/chicken-scheme/Makefile @@ -0,0 +1,150 @@ +# Copyright (C) 2019-2020 Jerônimo Cordoni Pellegrini +# +# This file is free software, licensed under the GNU General Public License v3 +# or later. +# See /LICENSE for details +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=chicken-scheme +PKG_VERSION=5.2.0 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION) +PKG_SOURCE:=chicken-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://code.call-cc.org/releases/$(PKG_VERSION)/ +PKG_HASH:=819149c8ce7303a9b381d3fdc1d5765c5f9ac4dee6f627d1652f47966a8780fa +PKG_MAINTAINER:=Jeronimo Pellegrini + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + + + + +define Package/chicken-scheme/Default + SECTION:=lang + CATEGORY:=Languages + URL:=https://call-cc.org + ABI_VERSION:=11 +endef + + +## +## chicken-scheme-interpreter +## + +define Package/chicken-scheme-interpreter +$(call Package/chicken-scheme/Default) + TITLE:=Chicken Scheme -- interpreter only + SECTION:=lang + CATEGORY:=Languages +endef + +define Package/chicken-scheme-interpreter/description + Chicken is an implementation of the Scheme language. It is portable, efficient, and supports + the R5RS and R7RS (work in progress) standards, and many extensions. + Chicken can be used as a scripting language to automate tasks. + This package contains the interpreter, 'csi', only -- + the compiler and the package installer are not included because they depend on a C compiler. + For more information, please refer to the Chicken Scheme website at https://call-cc.org. +endef + + +# csc calls gcc with "-lm -ldl", but "-lm" doesn't work with musl, +# so we set LIBRARIES=-lm +MAKE_FLAGS += PLATFORM=linux C_COMPILER=$(TARGET_CC) LINKER=$(TARGET_CC) PREFIX=/usr C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS)" LIBRARIES=-lm + +# not installed: +# - csc and chicken, the compiler +# - the include dir (only useful with the compiler) +# - install, uninstall, status, and chicken-do, which deal with modules +# (installation of more modules depends on the compiler) +# - profiler +# - feathers, the debugger +# - libchicken.a, the static library +define Package/chicken-scheme-interpreter/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib/chicken/$(ABI_VERSION) + $(INSTALL_BIN) $(PKG_BUILD_DIR)/csi $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/libchicken.so.$(ABI_VERSION) $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libchicken.so $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/*.import.so $(1)/usr/lib/chicken/$(ABI_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/types.db $(1)/usr/lib/chicken/$(ABI_VERSION)/ +endef + +$(eval $(call BuildPackage,chicken-scheme-interpreter)) + + + +## +## chicken-scheme-full +## + +# mips-openwrt-linux-musl-gcc dowsn't seem to link with libchicken.so. +# already tried -lchicken and passing /usr/lib/libchicken.so on the command +# line. +# also tried -Wl,-R/usr/lib,-R/usr/lib/chicken/$(ABI_VERSION) +# +# current solution: we do not strip binaries in chicken-scheme-full +# we do this by unsetting STRIP and RSTRIP, *and* reloading rules.mk +# +STRIP:=: +RSTRIP:=: +include $(TOPDIR)/rules.mk + +define Package/chicken-scheme-full +$(call Package/chicken-scheme/Default) + TITLE:=Chicken Scheme -- full package + SECTION:=lang + CATEGORY:=Languages + # csc depends on gcc; chicken-install uses the 'install' command from coreutils + EXTRA_DEPENDS:= gcc, coreutils-install +endef + +define Package/chicken-scheme-full/description + Chicken is an implementation of the Scheme language. It is portable, efficient, and supports + the R5RS and R7RS (work in progress) standards, and many extensions. + Chicken can be used as a scripting language to automate tasks. + This package contains the interpreter, 'csi'; the compiler, 'csc'; + the tools for installing and removing eggs (modules); the profiler and + the debugger. + Note that this package depends on gcc, which is quite large (more than 100Mb). + For more information, please refer to the Chicken Scheme website at https://call-cc.org. +endef + + +# not installed: +# - libchicken.a, the static library +define Package/chicken-scheme-full/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib/chicken/$(ABI_VERSION) + $(INSTALL_DIR) $(1)/usr/include/chicken + $(INSTALL_DIR) $(1)/usr/share/chicken + $(INSTALL_BIN) $(PKG_BUILD_DIR)/csi $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/libchicken.so.$(ABI_VERSION) $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libchicken.so $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/*.import.so $(1)/usr/lib/chicken/$(ABI_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/types.db $(1)/usr/lib/chicken/$(ABI_VERSION)/ + # csc + $(INSTALL_BIN) $(PKG_BUILD_DIR)/csc $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken $(1)/usr/bin/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/chicken.h $(1)/usr/include/chicken/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/chicken-config.h $(1)/usr/include/chicken/ + # chicken-install + $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-install $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-uninstall $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-status $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-do $(1)/usr/bin/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/setup.defaults $(1)/usr/share/chicken/ + # profile + $(INSTALL_BIN) $(PKG_BUILD_DIR)/chicken-profile $(1)/usr/bin/ + # feathers + $(INSTALL_BIN) $(PKG_BUILD_DIR)/feathers.tcl $(1)/usr/share/chicken/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/feathers $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,chicken-scheme-full)) diff --git a/lang/dkjson/Makefile b/lang/dkjson/Makefile index 0901bc06..3f0f6fd9 100644 --- a/lang/dkjson/Makefile +++ b/lang/dkjson/Makefile @@ -9,16 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dkjson PKG_VERSION:=2.5 -PKG_RELEASE:=3 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/LuaDist/dkjson/tar.gz/$(PKG_VERSION)? +PKG_HASH:=8560ee3c7ed421b293bf0905017bc90bd2f282d56517aa59ec6c53f5fb4057bd -PKG_SOURCE_URL:=https://github.com/LuaDist/dkjson.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=e72ba0c9f5d8b8746fc306f6189a819dbb5cd0be PKG_LICENSE:=MIT -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 -PKG_MIRROR_HASH:=e80673611e25ce63a95ea0f7a9c407868903fd78536d6c80f1763f2cf9488030 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) include $(INCLUDE_DIR)/package.mk @@ -30,6 +27,7 @@ define Package/dkjson URL:=http://dkolf.de/src/dkjson-lua.fsl/home MAINTAINER:=Lars Gierth DEPENDS:=+lua + PKGARCH:=all endef define Package/dkjson/description diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index ed569aa7..079946c5 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2015 OpenWrt.org +# Copyright (C) 2009-2020 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,17 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=erlang -PKG_VERSION:=17.5 -PKG_RELEASE:=3 +PKG_VERSION:=23.0 +PKG_RELEASE:=1 PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= http://www.erlang.org/download/ \ - http://erlang.mirror.su.se/ -PKG_HASH:=3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474 +PKG_SOURCE_URL:= http://www.erlang.org/download/ +PKG_HASH:=42dcf3c721f4de59fe74ae7b65950c2174c46dc8d1dd4e27c0594d86f606a635 -PKG_LICENSE:=ErlPL-1.1 -PKG_LICENSE_FILES:=EPLICENCE -PKG_MAINTAINER:=Nicolas Thill +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE.txt +PKG_MAINTAINER:=Arnaud Sautaux +PKG_CPE_ID:=cpe:/a:erlang:erlang PKG_BUILD_DEPENDS:=erlang/host openssl PKG_USE_MIPS16:=0 @@ -46,7 +46,7 @@ endef define Package/erlang $(call Package/erlang/Default) DEPENDS+= +libncurses +librt +zlib - PROVIDES:= erlang-erts=6.4 erlang-kernel=3.2 erlang-sasl=2.4.1 erlang-stdlib=2.4 + PROVIDES:= erlang-erts=10.0.1 erlang-kernel=6.0 erlang-sasl=3.2 erlang-stdlib=3.5 endef define Package/erlang/description @@ -60,7 +60,7 @@ endef define Package/erlang-asn1 $(call Package/erlang/Default) TITLE:=Abstract Syntax Notation One (ASN.1) support - VERSION:=3.0.4 + VERSION:=5.0.6 DEPENDS+= +erlang +erlang-syntax-tools endef @@ -75,7 +75,7 @@ endef define Package/erlang-compiler $(call Package/erlang/Default) TITLE:=Byte code compiler - VERSION:=5.0.4 + VERSION:=7.2 DEPENDS+= +erlang +erlang-hipe endef @@ -90,7 +90,7 @@ endef define Package/erlang-crypto $(call Package/erlang/Default) TITLE:=Cryptography support - VERSION:=3.5 + VERSION:=4.3 DEPENDS+= +erlang +libopenssl endef @@ -105,7 +105,7 @@ endef define Package/erlang-hipe $(call Package/erlang/Default) TITLE:=High Performance Erlang - VERSION:=3.11.3 + VERSION:=3.18 DEPENDS+= +erlang endef @@ -120,7 +120,7 @@ endef define Package/erlang-inets $(call Package/erlang/Default) TITLE:=Internet clients and servers - VERSION:=5.10.6 + VERSION:=7.0 DEPENDS+= +erlang endef @@ -136,7 +136,7 @@ endef define Package/erlang-mnesia $(call Package/erlang/Default) TITLE:=Distributed database - VERSION:=4.12.5 + VERSION:=4.15.4 DEPENDS+= +erlang endef @@ -153,7 +153,7 @@ endef define Package/erlang-runtime-tools $(call Package/erlang/Default) TITLE:=Low-profile debugging/tracing tools - VERSION:=1.8.16 + VERSION:=1.13 DEPENDS+= +erlang endef @@ -168,7 +168,7 @@ endef define Package/erlang-snmp $(call Package/erlang/Default) TITLE:=Simple Network Management Protocol (SNMP) support - VERSION:=5.1.1 + VERSION:=5.2.11 DEPENDS+= +erlang +erlang-asn1 endef @@ -181,10 +181,24 @@ $(call Package/erlang/Default/description) endef +define Package/erlang-public-key +$(call Package/erlang/Default) + TITLE:=Public Key support + VERSION:=1.6 + DEPENDS+= +erlang +erlang-crypto +erlang-asn1 +endef + +define Package/erlang-public-key/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides functions to handle public-key infrastructure. +endef + + define Package/erlang-ssh $(call Package/erlang/Default) TITLE:=Secure Shell (SSH) support - VERSION:=3.2 + VERSION:=4.7 DEPENDS+= +erlang +erlang-crypto endef @@ -199,7 +213,7 @@ endef define Package/erlang-ssl $(call Package/erlang/Default) TITLE:=Secure Sockets Layer (SSL) support - VERSION:=6.0 + VERSION:=9.0 DEPENDS+= +erlang +erlang-crypto endef @@ -214,7 +228,7 @@ endef define Package/erlang-syntax-tools $(call Package/erlang/Default) TITLE:=Abstract Erlang syntax trees handling support - VERSION:=1.6.18 + VERSION:=2.1.5 DEPENDS+= +erlang endef @@ -226,6 +240,76 @@ $(call Package/erlang/Default/description) endef +define Package/erlang-tools +$(call Package/erlang/Default) + TITLE:=Erlang tools support + VERSION:=3.0 + DEPENDS+= +erlang +endef + +define Package/erlang-tools/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides support for misc tools. +endef + + +define Package/erlang-reltool +$(call Package/erlang/Default) + TITLE:=Erlang reltool support + VERSION:=0.7.6 + DEPENDS+= +erlang +endef + +define Package/erlang-reltool/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides support for release management. +endef + + +define Package/erlang-erl-interface +$(call Package/erlang/Default) + TITLE:=Erlang erl_interface support + VERSION:=3.9.3 + DEPENDS+= +erlang +endef + +define Package/erlang-erl-interface/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides support for erlang interoperability with other languages. +endef + +define Package/erlang-os_mon +$(call Package/erlang/Default) + TITLE:=Erlang OS Monitoring Application + VERSION:=2.4.5 + DEPENDS+= +erlang +endef + +define Package/erlang-os_mon/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides the following services: + cpu_sup CPU load and utilization supervision + disksup Disk supervision + memsup Memory supervision +endef + +define Package/erlang-xmerl +$(call Package/erlang/Default) + TITLE:=Erlang XML export + VERSION:=1.3.17 + DEPENDS+= +erlang +endef + +define Package/erlang-xmerl/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides functions for exporting XML data to an external format +endef + # Host HOST_CONFIGURE_ARGS += \ @@ -334,6 +418,13 @@ $(eval $(call BuildModule,inets,inets)) $(eval $(call BuildModule,mnesia,mnesia)) $(eval $(call BuildModule,runtime-tools,runtime_tools)) $(eval $(call BuildModule,snmp,snmp)) +$(eval $(call BuildModule,public-key,public_key)) $(eval $(call BuildModule,ssh,ssh)) $(eval $(call BuildModule,ssl,ssl)) $(eval $(call BuildModule,syntax-tools,syntax_tools)) +$(eval $(call BuildModule,tools,tools)) +$(eval $(call BuildModule,reltool,reltool)) +$(eval $(call BuildModule,erl-interface,erl_interface)) +$(eval $(call BuildModule,os_mon,os_mon)) +$(eval $(call BuildModule,xmerl,xmerl)) + diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch deleted file mode 100644 index 5a413af4..00000000 --- a/lang/erlang/patches/101-emulator_includes.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/erts/emulator/Makefile.in -+++ b/erts/emulator/Makefile.in -@@ -682,7 +682,7 @@ $(OBJDIR)/beam_emu.o: beam/beam_emu.c - endif - - $(OBJDIR)/%.o: beam/%.c -- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ -+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ - - $(OBJDIR)/%.o: $(TARGET)/%.c - $(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ diff --git a/lang/erlang/patches/102-musl_compat.patch b/lang/erlang/patches/102-musl_compat.patch deleted file mode 100644 index d23900ed..00000000 --- a/lang/erlang/patches/102-musl_compat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lib/erl_interface/src/connect/ei_resolve.c -+++ b/lib/erl_interface/src/connect/ei_resolve.c -@@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const - #ifndef HAVE_GETHOSTBYNAME_R - return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop); - #else --#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__)) -+#if (defined(_GNU_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__)) - struct hostent *result; - - gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop); diff --git a/lang/erlang/patches/103-disable_emacs.patch b/lang/erlang/patches/103-disable_emacs.patch deleted file mode 100644 index 94121952..00000000 --- a/lang/erlang/patches/103-disable_emacs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lib/tools/Makefile -+++ b/lib/tools/Makefile -@@ -23,7 +23,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk - # Macros - # ---------------------------------------------------- - --SUB_DIRECTORIES = c_src src doc/src examples priv emacs -+SUB_DIRECTORIES = c_src src doc/src examples priv - - include vsn.mk - VSN = $(TOOLS_VSN) diff --git a/lang/golang/golang-package.mk b/lang/golang/golang-package.mk index 303ae0eb..ebc99863 100644 --- a/lang/golang/golang-package.mk +++ b/lang/golang/golang-package.mk @@ -89,7 +89,12 @@ include $(GO_INCLUDE_DIR)/golang-values.mk # # Additional go tool link arguments to use when building targets. # -# e.g. GO_PKG_LDFLAGS:=-s -w +# Note that the OpenWrt build system has an option to strip binaries +# (enabled by default), so -s (Omit the symbol table and debug +# information) and -w (Omit the DWARF symbol table) flags are not +# necessary. +# +# e.g. GO_PKG_LDFLAGS:=-r dir1:dir2 -u # # # GO_PKG_LDFLAGS_X - list of string variable definitions, default empty @@ -110,14 +115,14 @@ GO_PKG_PATH:=/usr/share/gocode GO_PKG_BUILD_PKG?=$(strip $(GO_PKG))/... GO_PKG_WORK_DIR_NAME:=.go_work -GO_PKG_WORK_DIR:=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME) +GO_PKG_WORK_DIR=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME) -GO_PKG_BUILD_DIR:=$(GO_PKG_WORK_DIR)/build -GO_PKG_CACHE_DIR:=$(GO_PKG_WORK_DIR)/cache +GO_PKG_BUILD_DIR=$(GO_PKG_WORK_DIR)/build +GO_PKG_CACHE_DIR=$(GO_PKG_WORK_DIR)/cache -GO_PKG_BUILD_BIN_DIR:=$(GO_PKG_BUILD_DIR)/bin$(if $(GO_HOST_TARGET_DIFFERENT),/$(GO_OS_ARCH)) +GO_PKG_BUILD_BIN_DIR=$(GO_PKG_BUILD_DIR)/bin$(if $(GO_HOST_TARGET_DIFFERENT),/$(GO_OS_ARCH)) -GO_PKG_BUILD_DEPENDS_SRC:=$(STAGING_DIR)$(GO_PKG_PATH)/src +GO_PKG_BUILD_DEPENDS_SRC=$(STAGING_DIR)$(GO_PKG_PATH)/src ifdef CONFIG_PKG_ASLR_PIE_ALL ifeq ($(strip $(PKG_ASLR_PIE)),1) @@ -147,16 +152,6 @@ ifneq ($(CONFIG_USE_SSTRIP),) GO_PKG_STRIP_ARGS:=--strip-all endif STRIP:=$(TARGET_CROSS)strip $(GO_PKG_STRIP_ARGS) - RSTRIP= \ - export CROSS="$(TARGET_CROSS)" \ - $(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \ - $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \ - $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \ - NM="$(TARGET_CROSS)nm" \ - STRIP="$(STRIP)" \ - STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \ - PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \ - $(SCRIPT_DIR)/rstrip.sh endif define GoPackage/GoSubMenu @@ -165,7 +160,7 @@ define GoPackage/GoSubMenu CATEGORY:=Languages endef -define GoPackage/Environment/Target +GO_PKG_TARGET_VARS= \ GOOS=$(GO_OS) \ GOARCH=$(GO_ARCH) \ GO386=$(GO_386) \ @@ -179,20 +174,40 @@ define GoPackage/Environment/Target CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \ CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" \ CGO_LDFLAGS="$(TARGET_LDFLAGS)" -endef -define GoPackage/Environment/Build +GO_PKG_BUILD_VARS= \ GOPATH=$(GO_PKG_BUILD_DIR) \ GOCACHE=$(GO_PKG_CACHE_DIR) \ GOENV=off -endef -define GoPackage/Environment/Default - $(call GoPackage/Environment/Target) \ - $(call GoPackage/Environment/Build) -endef +GO_PKG_DEFAULT_VARS= \ + $(GO_PKG_TARGET_VARS) \ + $(GO_PKG_BUILD_VARS) -GoPackage/Environment=$(call GoPackage/Environment/Default) +GO_PKG_VARS=$(GO_PKG_DEFAULT_VARS) + +# do not use for new code; this will be removed after the next OpenWrt release +GoPackage/Environment=$(GO_PKG_VARS) + +GO_PKG_DEFAULT_LDFLAGS= \ + -buildid '$(SOURCE_DATE_EPOCH)' \ + -linkmode external \ + -extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(TARGET_LDFLAGS))' + +GO_PKG_CUSTOM_LDFLAGS= \ + $(GO_PKG_LDFLAGS) \ + $(patsubst %,-X %,$(GO_PKG_LDFLAGS_X)) + +GO_PKG_INSTALL_ARGS= \ + -v \ + -trimpath \ + -ldflags "all=$(GO_PKG_DEFAULT_LDFLAGS)" \ + $(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie) \ + $(if $(filter $(GO_ARCH),arm),-installsuffix "v$(GO_ARM)") \ + $(if $(filter $(GO_ARCH),mips mipsle),-installsuffix "$(GO_MIPS)") \ + $(if $(filter $(GO_ARCH),mips64 mips64le),-installsuffix "$(GO_MIPS64)") \ + $(if $(GO_PKG_GCFLAGS),-gcflags "$(GO_PKG_GCFLAGS)") \ + $(if $(GO_PKG_CUSTOM_LDFLAGS),-ldflags "$(GO_PKG_CUSTOM_LDFLAGS) $(GO_PKG_DEFAULT_LDFLAGS)") # false if directory does not exist GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null) @@ -278,7 +293,7 @@ endef define GoPackage/Build/Compile ( \ cd $(GO_PKG_BUILD_DIR) ; \ - export $(call GoPackage/Environment) ; \ + export $(GO_PKG_VARS) ; \ \ echo "Finding targets" ; \ targets=$$$$(go list $(GO_PKG_BUILD_PKG)) ; \ @@ -295,27 +310,7 @@ define GoPackage/Build/Compile \ if [ "$(strip $(GO_PKG_SOURCE_ONLY))" != 1 ]; then \ echo "Building targets" ; \ - case $(GO_ARCH) in \ - arm) installsuffix="v$(GO_ARM)" ;; \ - mips|mipsle) installsuffix="$(GO_MIPS)" ;; \ - mips64|mips64le) installsuffix="$(GO_MIPS64)" ;; \ - esac ; \ - ldflags="-linkmode external -extldflags '$(TARGET_LDFLAGS:-z%=-Wl,-z,%)'" ; \ - pkg_gcflags="$(strip $(GO_PKG_GCFLAGS))" ; \ - pkg_ldflags="$(strip $(GO_PKG_LDFLAGS))" ; \ - for def in $(GO_PKG_LDFLAGS_X); do \ - pkg_ldflags="$$$$pkg_ldflags -X $$$$def" ; \ - done ; \ - go install \ - $(if $(GO_PKG_ENABLE_PIE),-buildmode pie) \ - $$$${installsuffix:+-installsuffix $$$$installsuffix} \ - -trimpath \ - -ldflags "all=$$$$ldflags" \ - -v \ - $$$${pkg_gcflags:+-gcflags "$$$$pkg_gcflags"} \ - $$$${pkg_ldflags:+-ldflags "$$$$pkg_ldflags $$$$ldflags"} \ - $(1) \ - $$$$targets ; \ + go install $(GO_PKG_INSTALL_ARGS) $(1) $$$$targets ; \ retval=$$$$? ; \ echo ; \ \ diff --git a/lang/golang/golang-values.mk b/lang/golang/golang-values.mk index 0b0c0c18..d52ad481 100644 --- a/lang/golang/golang-values.mk +++ b/lang/golang/golang-values.mk @@ -29,6 +29,7 @@ unexport \ GOROOT \ GOTMPDIR # Unmodified: +# GOINSECURE # GOPRIVATE # GOPROXY # GONOPROXY @@ -155,32 +156,15 @@ ifeq ($(GO_ARCH),386) else ifeq ($(GO_ARCH),arm) GO_TARGET_FPU:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))) - # FPU names from https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/ARM-Options.html#index-mfpu-1 - # see also https://github.com/gcc-mirror/gcc/blob/gcc-8_3_0-release/gcc/config/arm/arm-cpus.in - # - # Assumptions: - # - # * -d16 variants (16 instead of 32 double-precision registers) acceptable - # Go doesn't appear to check the HWCAP_VFPv3D16 flag in - # https://github.com/golang/go/blob/release-branch.go1.13/src/runtime/os_linux_arm.go - # - # * Double-precision required - # Based on no evidence(!) - # Excludes vfpv3xd, vfpv3xd-fp16, fpv4-sp-d16, fpv5-sp-d16 + # FPU names from https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gcc/ARM-Options.html#index-mfpu-1 + # see also https://github.com/gcc-mirror/gcc/blob/releases/gcc-8.4.0/gcc/config/arm/arm-cpus.in - GO_ARM_7_FPUS:= \ - vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 neon neon-vfpv3 neon-fp16 \ - vfpv4 vfpv4-d16 neon-vfpv4 \ - fpv5-d16 fp-armv8 neon-fp-armv8 crypto-neon-fp-armv8 - - GO_ARM_6_FPUS:=vfp vfpv2 - - ifneq ($(filter $(GO_TARGET_FPU),$(GO_ARM_7_FPUS)),) - GO_ARM:=7 - else ifneq ($(filter $(GO_TARGET_FPU),$(GO_ARM_6_FPUS)),) + ifeq ($(GO_TARGET_FPU),) + GO_ARM:=5 + else ifneq ($(filter $(GO_TARGET_FPU),vfp vfpv2),) GO_ARM:=6 else - GO_ARM:=5 + GO_ARM:=7 endif else ifneq ($(filter $(GO_ARCH),mips mipsle),) diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index 7b73f37c..44d60890 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk GO_VERSION_MAJOR_MINOR:=1.14 -GO_VERSION_PATCH:= +GO_VERSION_PATCH:=4 PKG_NAME:=golang PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH)) @@ -20,7 +20,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \ PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz PKG_SOURCE_URL:=$(GO_SOURCE_URLS) -PKG_HASH:=6d643e46ad565058c7a39dac01144172ef9bd476521f42148be59249e4b74389 +PKG_HASH:=7011af3bbc2ac108d1b82ea8abb87b2e63f78844f0259be20cde4d42c5c40584 PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=BSD-3-Clause @@ -53,10 +53,10 @@ HOST_GO_ROOT:=$(HOST_GO_PREFIX)/lib/go-$(HOST_GO_VERSION_ID) HOST_GO_VALID_OS_ARCH:= \ android_386 android_amd64 android_arm android_arm64 \ darwin_386 darwin_amd64 darwin_arm darwin_arm64 \ + freebsd_386 freebsd_amd64 freebsd_arm freebsd_arm64 \ linux_386 linux_amd64 linux_arm linux_arm64 \ - openbsd_386 openbsd_amd64 openbsd_arm openbsd_arm64 \ \ - freebsd_386 freebsd_amd64 freebsd_arm \ + openbsd_386 openbsd_amd64 openbsd_arm \ netbsd_386 netbsd_amd64 netbsd_arm \ plan9_386 plan9_amd64 plan9_arm \ \ @@ -69,7 +69,9 @@ HOST_GO_VALID_OS_ARCH:= \ aix_ppc64 \ js_wasm \ \ - linux_ppc64 linux_ppc64le linux_mips linux_mipsle linux_mips64 linux_mips64le linux_s390x + linux_ppc64 linux_ppc64le \ + linux_mips linux_mipsle linux_mips64 linux_mips64le \ + linux_riscv64 linux_s390x BOOTSTRAP_SOURCE:=go1.4-bootstrap-20171003.tar.gz BOOTSTRAP_SOURCE_URL:=$(GO_SOURCE_URLS) @@ -99,7 +101,7 @@ PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/ HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) BOOTSTRAP_UNPACK:=$(HOST_TAR) -C $(BOOTSTRAP_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(BOOTSTRAP_SOURCE) -# don't strip ELF executables in test data (and go itself) +# don't strip ELF executables in test data RSTRIP:=: STRIP:=: @@ -152,6 +154,23 @@ This package provides an assembler, compiler, linker, and compiled libraries for the Go programming language. endef +define Package/golang/config +menu "Configuration" + +config GOLANG_EXTERNAL_BOOTSTRAP_ROOT + string "External bootstrap Go root directory" + help + Path to a working Go tree (>= Go 1.4), with bin, pkg, and src + subdirectories and the Go compiler at bin/go. + + If specified, the existing Go installation will be used to + compile host (buildroot) Go. + + Leave blank to compile the default bootstrap Go. + +endmenu +endef + define Package/golang-doc $(call Package/golang/Default) TITLE+= (documentation) @@ -175,22 +194,53 @@ This package provides the Go programming language source files needed for cross-compilation. endef +EXTERNAL_BOOTSTRAP_DIR:=$(call qstrip,$(CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT)) +USE_DEFAULT_BOOTSTRAP:=$(if $(EXTERNAL_BOOTSTRAP_DIR),,1) + +PKG_GO_ZBOOTSTRAP_MODS:= \ + s/defaultGO386 = `[^`]*`/defaultGO386 = `$(if $(GO_386),$(GO_386),387)`/; \ + s/defaultGOARM = `[^`]*`/defaultGOARM = `$(if $(GO_ARM),$(GO_ARM),5)`/; \ + s/defaultGOMIPS = `[^`]*`/defaultGOMIPS = `$(if $(GO_MIPS),$(GO_MIPS),hardfloat)`/; \ + s/defaultGOMIPS64 = `[^`]*`/defaultGOMIPS64 = `$(if $(GO_MIPS64),$(GO_MIPS64),hardfloat)`/; \ + s/defaultGOPPC64 = `[^`]*`/defaultGOPPC64 = `power8`/; + +PKG_GO_LDFLAGS= \ + -buildid '$(SOURCE_DATE_EPOCH)' + +ifeq ($(CONFIG_NO_STRIP)$(CONFIG_DEBUG),) + PKG_GO_LDFLAGS+= -s -w +endif + +# setting -trimpath is not necessary here because the paths inside the +# compiler binary are relative to GOROOT_FINAL (PKG_GO_ROOT), which is +# static / not dependent on the build environment +PKG_GO_INSTALL_ARGS= \ + -ldflags "all=$(PKG_GO_LDFLAGS)" + +ifeq ($(PKG_GO_ENABLE_PIE),1) + PKG_GO_INSTALL_ARGS+= -buildmode pie +endif + define Download/golang-bootstrap FILE:=$(BOOTSTRAP_SOURCE) URL:=$(BOOTSTRAP_SOURCE_URL) HASH:=$(BOOTSTRAP_HASH) endef -$(eval $(call Download,golang-bootstrap)) -$(eval $(call GoCompiler/AddProfile,Bootstrap,$(BOOTSTRAP_BUILD_DIR),,bootstrap,$(GO_HOST_OS_ARCH))) $(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH),$(HOST_GO_INSTALL_SUFFIX))) $(eval $(call GoCompiler/AddProfile,Package,$(PKG_BUILD_DIR),$(PKG_GO_PREFIX),$(PKG_GO_VERSION_ID),$(GO_OS_ARCH),$(PKG_GO_INSTALL_SUFFIX))) -define Host/Prepare +ifeq ($(USE_DEFAULT_BOOTSTRAP),1) + $(eval $(call GoCompiler/AddProfile,Bootstrap,$(BOOTSTRAP_BUILD_DIR),,bootstrap,$(GO_HOST_OS_ARCH))) + + $(eval $(call Download,golang-bootstrap)) + + define Host/Prepare $(call Host/Prepare/Default) mkdir -p $(BOOTSTRAP_BUILD_DIR) $(BOOTSTRAP_UNPACK) -endef + endef +endif # when https://github.com/golang/go/issues/31544 is fixed, # we should be able to set GO_LDFLAGS=-buildmode=pie for host make @@ -210,7 +260,7 @@ define Host/Compile ) $(call GoCompiler/Host/Make, \ - GOROOT_BOOTSTRAP=$(BOOTSTRAP_BUILD_DIR) \ + GOROOT_BOOTSTRAP=$(if $(USE_DEFAULT_BOOTSTRAP),$(BOOTSTRAP_BUILD_DIR),$(EXTERNAL_BOOTSTRAP_DIR)) \ GOCACHE=$(HOST_GO_CACHE_DIR) \ CC=$(HOSTCC_NOCACHE) \ CXX=$(HOSTCXX_NOCACHE) \ @@ -280,11 +330,14 @@ define Build/Compile PATH=$(HOST_GO_ROOT)/openwrt:$$$$PATH \ ) + $(SED) '$(PKG_GO_ZBOOTSTRAP_MODS)' \ + $(PKG_BUILD_DIR)/src/cmd/internal/objabi/zbootstrap.go + @echo "Building target Go second stage" ( \ cd $(PKG_BUILD_DIR)/bin ; \ - export $(call GoPackage/Environment/Target) ; \ + export $(GO_PKG_TARGET_VARS) ; \ $(CP) go go-host ; \ GOROOT_FINAL=$(PKG_GO_ROOT) \ GOCACHE=$(PKG_GO_TARGET_CACHE_DIR) \ @@ -296,7 +349,7 @@ define Build/Compile CXX=g++ \ PKG_CONFIG=pkg-config \ PATH=$(HOST_GO_ROOT)/openwrt:$$$$PATH \ - ./go-host install -a $(if $(PKG_GO_ENABLE_PIE),-buildmode=pie) std cmd ; \ + ./go-host install -a $(PKG_GO_INSTALL_ARGS) std cmd ; \ retval=$$$$? ; \ rm -f go-host ; \ exit $$$$retval ; \ diff --git a/lang/jamvm/Makefile b/lang/jamvm/Makefile deleted file mode 100644 index e074cb3c..00000000 --- a/lang/jamvm/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=jamvm -PKG_VERSION:=2.0.0 -PKG_RELEASE:=2 -PKG_LICENSE:=GPL-2.0+ -PKG_MAINTAINER:=Dana H. Myers - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=76428e96df0ae9dd964c7a7c74c1e9a837e2f312c39e9a357fa8178f7eff80da - -PKG_USE_MIPS16:=0 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/jamvm - SUBMENU:=Java - SECTION:=lang - CATEGORY:=Languages - TITLE:=A compact Java Virtual Machine - URL:=http://sourceforge.net/projects/jamvm - DEPENDS:=+zlib +libpthread +librt +classpath @!avr32 -endef - -define Package/jamvm/description - JamVM is a new Java Virtual Machine which conforms to the JVM - specification version (blue book). In comparison to most other VM's (free - and commercial) it is extremely small.However, unlike other small VMs - (e.g. KVM) it is designed to support the full specification, and includes - support for object finalisation, Soft/Weak/Phantom References, the Java - Native Interface (JNI) and the Reflection API. -endef - -CONFIGURE_ARGS += \ - --with-java-runtime-library=gnuclasspath \ - --with-classpath-install-dir=/usr \ - --disable-int-inlining \ - --disable-shared \ - --without-pic - -MAKE_FLAGS += \ - GLIBJ_ZIP=$(STAGING_DIR)/usr/share/classpath/glibj.zip - -define Package/jamvm/install - $(INSTALL_DIR) $(1)/usr - $(CP) \ - $(PKG_INSTALL_DIR)/usr/bin \ - $(PKG_INSTALL_DIR)/usr/share \ - $(1)/usr/ -endef - -define Build/InstallDev - $(CP) $(PKG_INSTALL_DIR)/* $(1)/ -endef - -$(eval $(call BuildPackage,jamvm)) diff --git a/lang/jamvm/patches/001-Use-fenv.h-instead-of-fpu_control.h.patch b/lang/jamvm/patches/001-Use-fenv.h-instead-of-fpu_control.h.patch deleted file mode 100644 index 50f95cde..00000000 --- a/lang/jamvm/patches/001-Use-fenv.h-instead-of-fpu_control.h.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 7152ded5219453c9ff1cd062cecbeaf4d77e4cab Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Thu, 26 May 2016 15:05:48 +0200 -Subject: [PATCH] Use instead of - -musl libc (http://musl-libc.org lack the non-standard -header, which is used in src/os/linux/{i386,x86_64}/init.c files to -setup the floating point precision. This patch makes it use the -standard C header instead. - -Original patch at Felix Janda at -https://sourceforge.net/p/jamvm/patches/6/. - -Signed-off-by: Thomas Petazzoni ---- - src/os/linux/i386/init.c | 12 ++++++------ - src/os/linux/x86_64/init.c | 16 ++++++---------- - 2 files changed, 12 insertions(+), 16 deletions(-) - -diff --git a/src/os/linux/i386/init.c b/src/os/linux/i386/init.c -index d9c6648..94a733e 100644 ---- a/src/os/linux/i386/init.c -+++ b/src/os/linux/i386/init.c -@@ -19,18 +19,18 @@ - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - --#include -+#include - - /* Change floating point precision to double (64-bit) from - * the extended (80-bit) Linux default. */ - - void setDoublePrecision() { -- fpu_control_t cw; -+ fenv_t fenv; - -- _FPU_GETCW(cw); -- cw &= ~_FPU_EXTENDED; -- cw |= _FPU_DOUBLE; -- _FPU_SETCW(cw); -+ fegetenv(&fenv); -+ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */ -+ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */ -+ fesetenv(&fenv); - } - - void initialisePlatform() { -diff --git a/src/os/linux/x86_64/init.c b/src/os/linux/x86_64/init.c -index 9d55229..a76a923 100644 ---- a/src/os/linux/x86_64/init.c -+++ b/src/os/linux/x86_64/init.c -@@ -19,9 +19,7 @@ - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - --#ifdef __linux__ --#include --#endif -+#include - - /* Change the x87 FPU precision to double (64-bit) from the extended - (80-bit) Linux default. Note, unlike on i386, my testcases pass -@@ -30,14 +28,12 @@ - */ - - void setDoublePrecision() { --#ifdef __linux__ -- fpu_control_t cw; -+ fenv_t fenv; - -- _FPU_GETCW(cw); -- cw &= ~_FPU_EXTENDED; -- cw |= _FPU_DOUBLE; -- _FPU_SETCW(cw); --#endif -+ fegetenv(&fenv); -+ fenv.__control_word &= ~0x300; /*_FPU_EXTENDED */ -+ fenv.__control_word |= 0x200; /*_FPU_DOUBLE */ -+ fesetenv(&fenv); - } - - void initialisePlatform() { --- -2.7.4 - diff --git a/lang/json4lua/Makefile b/lang/json4lua/Makefile index 2e84fce5..6a4f8af7 100644 --- a/lang/json4lua/Makefile +++ b/lang/json4lua/Makefile @@ -8,18 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=json4lua -PKG_VERSION:=0.9.53 +PKG_VERSION:=0.9.54 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=61a9631784aa5d7dd8adfdfa149f0a45deaa4bf80b117e89722702c612afa081 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/amrhassan/json4lua.git -PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/amrhassan/json4lua/tar.gz/$(PKG_VERSION)? +PKG_HASH:=2498e5224b024521af7f2de9a2c2af4028cd8da4b724ffd6bd94beede2402cfe PKG_MAINTAINER:=Amr Hassan -PKG_LICENSE=MIT +PKG_LICENSE:=MIT LUA_MODULE_PATH:=/usr/lib/lua @@ -32,6 +29,7 @@ define Package/json4lua TITLE:=json4lua URL:=https://github.com/amrhassan/json4lua DEPENDS:=+lua +luasocket + PKGARCH:=all endef define Package/json4lua/description diff --git a/lang/ldbus/Makefile b/lang/ldbus/Makefile index a0500a64..55769913 100644 --- a/lang/ldbus/Makefile +++ b/lang/ldbus/Makefile @@ -7,17 +7,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ldbus -PKG_RELEASE:=2 -PKG_MIRROR_HASH:=0e39a80e126a77a937226e49ae0246e1fd4600a03dee6bdee5ac822963a234e1 +PKG_SOURCE_DATE:=2019-08-15 +PKG_SOURCE_VERSION:=9e176fe851006037a643610e6d8f3a8e597d4073 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=f4a1464e915a2313c80fb40c5c40b0bee7583677 -PKG_SOURCE_DATE:=2017-10-03 PKG_SOURCE_URL=https://github.com/daurnimator/ldbus +PKG_MIRROR_HASH:=65fc7c975a17cfd3929b54973558205354fc285b6bd88a732c045e8444000d44 + PKG_MAINTAINER:=Enrico Mioso PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=luarocks/host +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -26,6 +29,7 @@ define Package/ldbus SECTION:=lang CATEGORY:=Languages TITLE:=ldbus Lua DBus bindings + URL:=https://github.com/daurnimator/ldbus DEPENDS:=+dbus +lua endef @@ -36,26 +40,22 @@ define Package/ldbus/description for details. endef -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include - -MAKE_FLAGS += \ - FPIC="$(FPIC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" +define Build/Compile + cd $(PKG_BUILD_DIR) && \ + luarocks make --pack-binary-rock ldbus-scm-0.rockspec \ + LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ + LUA_PKGNAME=lua5.1 \ + DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \ + DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \ + DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \ + CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef define Package/ldbus/install $(INSTALL_DIR) $(1)/usr/lib/lua $(INSTALL_BIN) $(PKG_BUILD_DIR)/ldbus.so $(1)/usr/lib/lua endef -define Build/Compile - cd $(PKG_BUILD_DIR) && \ - luarocks make --pack-binary-rock ldbus-scm-0.rockspec \ - DBUS_INCDIR=$(STAGING_DIR)/usr/include/dbus-1.0/ \ - DBUS_ARCH_INCDIR=$(STAGING_DIR)/usr/lib/dbus-1.0/include \ - DBUS_LIBDIR=$(STAGING_DIR)/usr/lib \ - CC="$(TARGET_CC)" LD="$(TARGET_CC)" -endef - $(eval $(call BuildPackage,ldbus)) diff --git a/lang/lpeg/Makefile b/lang/lpeg/Makefile index 03f8c765..896b70b5 100644 --- a/lang/lpeg/Makefile +++ b/lang/lpeg/Makefile @@ -8,16 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lpeg -PKG_VERSION:=0.12.2 -PKG_RELEASE:=2 +PKG_VERSION:=1.0.2 +PKG_RELEASE:=1 PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.inf.puc-rio.br/~roberto/lpeg/ -PKG_HASH:=6aad270b91d1b1c6fd75f68e162329a04a644e50e917d55f46cc8384b7120004 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_HASH:=48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe include $(INCLUDE_DIR)/package.mk diff --git a/lang/lua-bencode/Makefile b/lang/lua-bencode/Makefile index a7b898bf..3edee239 100644 --- a/lang/lua-bencode/Makefile +++ b/lang/lua-bencode/Makefile @@ -8,13 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-bencode -PKG_VERSION:=2.1.0 +PKG_VERSION:=2.2.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode/downloads/ -PKG_HASH:=4624f33ff026bc62990a323ee4953e42d68430c38a1a4726c9cfd77c085b1422 +PKG_HASH:=25830ff3fe342c09c65995d46c4d89ad0387cc502b1a2f70f9cca2d8c7ccafdd + +PKG_MAINTAINER:=Lars Gierth PKG_LICENSE:=MIT include $(INCLUDE_DIR)/package.mk @@ -25,8 +26,8 @@ define Package/lua-bencode CATEGORY:=Languages TITLE:=lua-bencode URL:=https://bitbucket.org/wilhelmy/lua-bencode - MAINTAINER:=Lars Gierth DEPENDS:=+lua + PKGARCH:=all endef define Package/lua-bencode/description diff --git a/lang/lua-bit32/Makefile b/lang/lua-bit32/Makefile new file mode 100644 index 00000000..da4ae876 --- /dev/null +++ b/lang/lua-bit32/Makefile @@ -0,0 +1,59 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lua-bit32 +PKG_VERSION:=5.3.0 +PKG_RELEASE:=1 + + +PKG_SRC_NAME:=lua-compat-5.2 +PKG_SRC_VERSION:=0.3 +PKG_SOURCE_URL=https://codeload.github.com/keplerproject/$(PKG_SRC_NAME)/tar.gz/v$(PKG_SRC_VERSION)? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=627e842c488c1afece4383da9f9a839a7ddbc2f7fedfc456f76e3a590d4ca67f +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SRC_NAME)-$(PKG_SRC_VERSION) + +PKG_MAINTAINER:=Maxim Storchak +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=luarocks/host + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-bit32 + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua 5.2 bit manipulation library + DEPENDS:=+lua +endef + +define Package/lua-bit32/description + lua-bit32 is the native Lua 5.2 bit manipulation library, + backported to Lua 5.1 +endef + +TARGET_CFLAGS += \ + -I$(STAGING_DIR)/usr/include + +define Build/Compile + cd $(PKG_BUILD_DIR) && \ + luarocks make --pack-binary-rock bit32-scm-1.rockspec \ + LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ + LUA_PKGNAME=lua5.1 \ + CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC)" LD="$(TARGET_CC)" +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit32.so $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-bit32)) diff --git a/lang/lua-cjson/Makefile b/lang/lua-cjson/Makefile index aea91a53..de727346 100644 --- a/lang/lua-cjson/Makefile +++ b/lang/lua-cjson/Makefile @@ -18,7 +18,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.kyne.com.au/~mark/software/download/ PKG_HASH:=51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) HOST_BUILD_DEPENDS:=lua/host include $(INCLUDE_DIR)/host-build.mk diff --git a/lang/lua-copas/Makefile b/lang/lua-copas/Makefile index 314850ec..527ec525 100644 --- a/lang/lua-copas/Makefile +++ b/lang/lua-copas/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-copas -PKG_VERSION:=2.0.0 +PKG_VERSION:=2.0.2 PKG_RELEASE:=1 + +PKG_SOURCE:=copas-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/copas/tar.gz/$(PKG_VERSION)? +PKG_HASH:=1469eaf987513f5a9a0bee345c040c8fa30ca6194bc75ad78171362f9904cf3e +PKG_BUILD_DIR:=$(BUILD_DIR)/copas-$(PKG_VERSION) + PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=a47a8b5f6c1cf0d9fff4770a28bf7a3efdd8f37415dde8e02528f3e63f8a7899 -PKG_SOURCE_URL:=https://github.com/keplerproject/copas.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=f39a80add9f7c010ac979297652bbaaea0360a27 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -47,9 +47,6 @@ define Build/Compile install endef -# add make variable overrides here -MAKE_FLAGS += - define Package/lua-copas/install $(INSTALL_DIR) $(1)/usr/lib/lua $(INSTALL_DIR) $(1)/usr/lib/lua/copas diff --git a/lang/lua-copas/patches/makefile.patch b/lang/lua-copas/patches/makefile.patch deleted file mode 100644 index 10e47340..00000000 --- a/lang/lua-copas/patches/makefile.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- lua-copas-1.2.1_org/Makefile 2014-06-04 16:39:17.451563827 +0800 -+++ lua-copas-1.2.1/Makefile 2014-06-04 16:39:41.115563309 +0800 -@@ -1,10 +1,10 @@ - # $Id: Makefile,v 1.3 2007/10/29 22:50:16 carregal Exp $ - - # Default prefix --PREFIX = /usr/local -+PREFIX ?= $(DESTDIR)/usr - - # System's lua directory (where Lua libraries are installed) --LUA_DIR= $(PREFIX)/share/lua/5.1 -+LUA_DIR= $(PREFIX)/lib/lua - - install: - mkdir -p $(LUA_DIR)/copas diff --git a/lang/lua-coxpcall/Makefile b/lang/lua-coxpcall/Makefile index 95d92aca..c9345df4 100644 --- a/lang/lua-coxpcall/Makefile +++ b/lang/lua-coxpcall/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-coxpcall -PKG_VERSION:=1.15.0 +PKG_VERSION:=1.17.0 PKG_RELEASE:=1 PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=2a99faec759aeb858eca3691a40609dd2710255497011e5754c4a2282232154b +PKG_MIRROR_HASH:=e037c1aa1d2a2b213fca144d86cd5b5cf2cd77cec6d8f52d056add7ea806f0dc PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=979257892884816c97391dfd7b0a7b30dcc8f479 +PKG_SOURCE_VERSION:=ea22f44e490430e40217f0792bf82eaeaec51903 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL:=1 diff --git a/lang/lua-ev/Makefile b/lang/lua-ev/Makefile new file mode 100644 index 00000000..42d323e9 --- /dev/null +++ b/lang/lua-ev/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2019 Jianhui Zhao +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lua-ev +PKG_RELEASE:=1 + +PKG_SOURCE_URL=https://github.com/brimworks/lua-ev.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE=2015-8-4 +PKG_SOURCE_VERSION:=339426fbe528f11cb3cd1af69a88f06bba367981 +PKG_MIRROR_HASH:=fe138f05845d549998443628e1b63e07d797977548a30e75305085cca4b25567 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:= + +PKG_MAINTAINER:=Jianhui Zhao + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/lua-ev + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=lua-ev + URL:=https://github.com/brimworks/lua-ev + DEPENDS:=+lua +libev +endef + +define Package/lua-ev/description + Lua integration with libev. +endef + +define Package/lua-ev/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ev.so $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-ev)) diff --git a/lang/lua-libmodbus/Makefile b/lang/lua-libmodbus/Makefile new file mode 100644 index 00000000..12e599a7 --- /dev/null +++ b/lang/lua-libmodbus/Makefile @@ -0,0 +1,40 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=lua-libmodbus +PKG_VERSION:=0.4.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=lua-libmodbus-$(PKG_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=lua-libmodbus-$(PKG_VERSION) +PKG_SOURCE_URL:=https://codeload.github.com/etactica/lua-libmodbus/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=90aff3a2cfe7f91f167ad4ea00f55c2aa86cf2aef93d022e3b2cf906a1791254 +PKG_SOURCE_VERSION:=v$(PKG_VERSION) + +PKG_MAINTAINER:=Karl Palsson +PKG_LICENSE:=MIT + +include $(INCLUDE_DIR)/package.mk + +define Package/lua-libmodbus + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=lua-libmodbus + URL:=https://github.com/etactica/lua-libmodbus + DEPENDS:=+liblua +libmodbus +endef + +define Package/lua-libmodbus/description + lua-libmodbus is a binding to libmodbus, + see also http://www.libmodbus.org +endef + +define Build/Configure +endef + +define Package/lua-libmodbus/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/libmodbus.so $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,lua-libmodbus)) diff --git a/lang/lua-lsqlite3/Makefile b/lang/lua-lsqlite3/Makefile index 02f4069e..64d5d063 100644 --- a/lang/lua-lsqlite3/Makefile +++ b/lang/lua-lsqlite3/Makefile @@ -8,18 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lsqlite3 -PKG_VERSION:=0.9.3 +PKG_VERSION:=0.9.5 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/lsqlite3_fsl09w.zip -PKG_HASH:=b857df8b66d01a803378cc86e56b787958beffdc8b851ad304f4ce8c7f0e9dbb +PKG_SOURCE:=lsqlite3_fsl09y.zip +PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/ +PKG_HASH:=d38402aa7640055d260c1246c36e6d6d31b425a25a805431f13695694466b722 PKG_LICENSE:=MIT PKG_MAINTAINER:=Oskari Rauta -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)_fsl09w.zip +PKG_BUILD_DIR:=$(BUILD_DIR)/$(basename $(PKG_SOURCE)) include $(INCLUDE_DIR)/package.mk @@ -38,21 +37,21 @@ endef TARGET_CFLAGS += $(FPIC) -std=gnu99 TARGET_CPPFLAGS += -DLUA_USE_LINUX -TARGET_LDFLAGS += -llua -lsqlite3 -lpthread +TARGET_LDFLAGS += -lsqlite3 -lpthread define Build/Compile $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \ - -c $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.c \ - -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \ - -DSQLITE_VERSION="$(PKG_VERSION)" + -c $(PKG_BUILD_DIR)/lsqlite3.c \ + -o $(PKG_BUILD_DIR)/lsqlite3.o \ + -DLSQLITE_VERSION=\"$(PKG_VERSION)\" $(TARGET_CC) $(TARGET_LDFLAGS) -shared \ - $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \ - -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.so + $(PKG_BUILD_DIR)/lsqlite3.o \ + -o $(PKG_BUILD_DIR)/lsqlite3.so endef define Package/lsqlite3/install $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/*.so $(1)/usr/lib/lua/ + $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib/lua/ endef $(eval $(call BuildPackage,lsqlite3)) diff --git a/lang/lua-md5/Makefile b/lang/lua-md5/Makefile index 4e4cae05..f4bb3e1c 100644 --- a/lang/lua-md5/Makefile +++ b/lang/lua-md5/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-md5 -PKG_VERSION:=1.2 +PKG_VERSION:=1.3 PKG_RELEASE:=1 PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=89a186d9e8bb43a6d45207eeba2883600854ea05befda55b38f7ac215b0d5615 +PKG_MIRROR_HASH:=675b8ba144d14cbe66abfd360d9a8861a18d5b69966768d6cdc78ca3c9fe0baf PKG_SOURCE_URL:=https://github.com/keplerproject/md5.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=024b65738b4434860777fc43d7cacaefea29ec60 +PKG_SOURCE_VERSION:=2a98633d7587a4900cfa7cbed340f377f4acd930 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL:=1 @@ -60,6 +60,7 @@ define Build/Compile endef define Build/Install + mkdir -p $(PKG_INSTALL_DIR)/usr/lib/lua $(MAKE) -C $(PKG_BUILD_DIR) \ LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ diff --git a/lang/lua-md5/patches/config.patch b/lang/lua-md5/patches/config.patch index abea3a88..85ec51fe 100644 --- a/lang/lua-md5/patches/config.patch +++ b/lang/lua-md5/patches/config.patch @@ -1,19 +1,22 @@ ---- lua-md5-1.2/config 2014-06-04 16:55:50.000000000 +0800 -+++ lua-md5-1.2_new/config 2014-06-04 16:57:54.223539416 +0800 -@@ -1,13 +1,13 @@ +--- a/config 2019-11-01 13:58:27.907691645 +0800 ++++ b/config 2019-11-01 14:00:52.126290663 +0800 +@@ -1,16 +1,16 @@ # Installation directories # Default prefix -PREFIX = /usr/local +PREFIX = /usr + # Lua version + LUA_SYS_VER ?= 5.2 + # System's libraries directory (where binary libraries are installed) --LUA_LIBDIR= $(PREFIX)/lib/lua/5.1 +-LUA_LIBDIR= $(PREFIX)/lib/lua/$(LUA_SYS_VER) +LUA_LIBDIR= $(PREFIX)/lib/lua # System's lua directory (where Lua libraries are installed) --LUA_DIR= $(PREFIX)/share/lua/5.1 -+LUA_DIR= $(PREFIX)/lib/lua +-LUA_DIR= $(PREFIX)/share/lua/$(LUA_SYS_VER) ++LUA_DIR= $(PREFIX)/share/lua # Lua includes directory LUA_INC= $(PREFIX)/include diff --git a/lang/lua-mobdebug/Makefile b/lang/lua-mobdebug/Makefile index 59b6c0e2..b1c387d4 100644 --- a/lang/lua-mobdebug/Makefile +++ b/lang/lua-mobdebug/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-mobdebug -PKG_VERSION:=0.61 +PKG_VERSION:=0.70 PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=947876d6b8e234a21d1e918523d66546282011718f2260d5e1f10ebf60c851cb -PKG_SOURCE_URL:=https://github.com/pkulchenko/MobDebug.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=9a03aa59696647ba3b7f9ae2f29a9f28532a4feb -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://codeload.github.com/pkulchenko/MobDebug/tar.gz/$(PKG_VERSION)? +PKG_HASH:=35ec131a0ecc74dbe1cc50582ed977120a4ef6d9f815ce07367fdb945cfee370 +PKG_BUILD_DIR:=$(BUILD_DIR)/MobDebug-$(PKG_VERSION) +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -31,6 +32,7 @@ define Package/lua-mobdebug TITLE:=Lua-MobDebug URL:=https://github.com/pkulchenko/MobDebug DEPENDS:=+lua + PKGARCH:=all endef define Package/lua-mobdebug/description diff --git a/lang/lua-openssl/Makefile b/lang/lua-openssl/Makefile index fc0629cf..aa7341fb 100644 --- a/lang/lua-openssl/Makefile +++ b/lang/lua-openssl/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-openssl -PKG_VERSION:=0.6.0 +PKG_VERSION:=0.7.4 PKG_RELEASE:=1 PKG_MAINTAINER:=Amnon Paz PKG_LICENSE:=MIT PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=33de8fa469f66bbf6df09c4ba4e3386c0613cc061f5adff0928d532af6905773 +PKG_MIRROR_HASH:=c27cedee438de95877823b1ae0607556564d82c8692be40f43743ca9cc5a029a PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=1b950e6ff8617205cda1a1b612637ef21b9daf96 +PKG_SOURCE_VERSION:=96effbaf477ca205f1787aaf1cce643bd208066b PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk diff --git a/lang/lua-openssl/patches/0001-Revise-Makefile.patch b/lang/lua-openssl/patches/0001-Revise-Makefile.patch index e084c0bb..44f46563 100644 --- a/lang/lua-openssl/patches/0001-Revise-Makefile.patch +++ b/lang/lua-openssl/patches/0001-Revise-Makefile.patch @@ -1,135 +1,148 @@ diff --git a/Makefile b/Makefile -index 6cb1176..6605879 100644 +index 10c1142..2a94df4 100644 --- a/Makefile +++ b/Makefile -@@ -1,85 +1,45 @@ --T=openssl -- --PREFIX ?=/usr/local --LIB_OPTION ?= -shared -- --#Lua auto detect --LUA_VERSION ?= $(shell pkg-config luajit --print-provides) --ifeq ($(LUA_VERSION),) ############ Not use luajit --LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") --LUA_CFLAGS ?= -I$(PREFIX)/include/lua$(LUAV) --LUA_LIBS ?= -L$(PREFIX)/lib --LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV) --else --LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") --LUA_CFLAGS ?= $(shell pkg-config luajit --cflags) --LUA_LIBS ?= $(shell pkg-config luajit --libs) --LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV) --endif -- --#OS auto detect --SYS := $(shell gcc -dumpmachine) -- --ifneq (, $(findstring linux, $(SYS))) --# Do linux things --LDFLAGS = -fPIC -lrt -ldl --OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) --OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) --CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) --endif --ifneq (, $(findstring apple, $(SYS))) --# Do darwin things --LDFLAGS = -fPIC -lrt -ldl --OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) --OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) --CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) --endif --ifneq (, $(findstring mingw, $(SYS))) --# Do mingw things --V = $(shell lua -e "v=string.gsub('$(LUAV)','%.','');print(v)") --LDFLAGS = -mwindows -lcrypt32 -lssl -lcrypto -lws2_32 $(PREFIX)/bin/lua$(V).dll --LUA_CFLAGS = -DLUA_LIB -DLUA_BUILD_AS_DLL -I$(PREFIX)/include/ --CFLAGS = $(OPENSSL_CFLAGS) $(LUA_CFLAGS) --endif --ifneq (, $(findstring cygwin, $(SYS))) --# Do cygwin things --OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) --OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) --CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) --endif --#custome config --ifeq (.config, $(wildcard .config)) --include .config --endif -- --LIBNAME= $T.so.$V -- --#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X -- --# Compilation directives --WARN_MOST = -Wall -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic --WARN = -Wall -Wno-unused-value --WARN_MIN = --CFLAGS += $(WARN_MIN) -DPTHREADS --CC= gcc -g $(CFLAGS) -Ideps -- -- --OBJS=src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \ --src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o \ --src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o -- --.c.o: -- $(CC) -c -o $@ $? -- --all: $T.so -- echo $(SYS) -- --$T.so: $(OBJS) -- MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(OPENSSL_LIBS) $(LUA_LIBS) $(LDFLAGS) -- --install: all -- mkdir -p $(LUA_LIBDIR) -- cp $T.so $(LUA_LIBDIR) -- --clean: -- rm -f $T.so $(OBJS) +@@ -1,121 +1,52 @@ + T=openssl +.PHONY: install clean -+ + +-PREFIX ?=/usr/local +-CC := $(CROSS)$(CC) +-AR := $(CROSS)$(AR) +-LD := $(CROSS)$(LD) +PKGC ?= pkg-config -+ -+LIBNAME = openssl.so -+LIB_OPTION = -shared -+ -+# lua's package config can be under various names -+LUAPKGC := $(shell for pc in lua lua5.1 lua5.2 lua5.3; do \ -+ $(PKGC) --exists $$pc && echo $$pc && break; \ -+ done) -+ -+BUILD_DIR = $(shell pwd) -+ + +-#OS auto detect +-ifneq (,$(TARGET_SYS)) +- SYS := $(TARGET_SYS) +-else +- SYS := $(shell gcc -dumpmachine) +-endif +- +-#Lua auto detect +-LUA_VERSION := $(shell pkg-config luajit --print-provides) +-ifeq ($(LUA_VERSION),) +- # Not found luajit package, try lua +- LUA_VERSION := $(shell pkg-config lua --print-provides) +- ifeq ($(LUA_VERSION),) +- # Not found lua package, try from prefix +- LUA_VERSION := $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") +- LUA_CFLAGS ?= -I$(PREFIX)/include/lua$(LUA_VERSION) +- LUA_LIBS ?= -L$(PREFIX)/lib -llua +- LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION) +- else +- # Found lua package +- LUA_VERSION := $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") +- LUA_CFLAGS ?= $(shell pkg-config lua --cflags) +- LUA_LIBS ?= $(shell pkg-config lua --libs) +- LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION) +- endif +-else +- # Found luajit package +- LUA_VERSION := $(shell luajit -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") +- LUA_CFLAGS ?= $(shell pkg-config luajit --cflags) +- LUA_LIBS ?= $(shell pkg-config luajit --libs) +- LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION) +-endif +- +-#OpenSSL auto detect +-OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) +-OPENSSL_LIBS ?= $(shell pkg-config openssl --static --libs) +- +-ifneq (, $(findstring linux, $(SYS))) +- # Do linux things +- CFLAGS = -fpic +- LDFLAGS = -Wl,--no-undefined -fpic -lrt -ldl -lm +-endif +- +-ifneq (, $(findstring apple, $(SYS))) +- # Do darwin things +- CFLAGS = -fPIC +- LDFLAGS = -fPIC -undefined dynamic_lookup -ldl +- #MACOSX_DEPLOYMENT_TARGET="10.3" +- CC := MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(CC) +-endif ++LIB_OPTION = -shared ++LUAPKGC = lua + +-ifneq (, $(findstring mingw, $(SYS))) +- # Do mingw things +- CFLAGS = -DLUA_LIB -DLUA_BUILD_AS_DLL -DWIN32_LEAN_AND_MEAN +-endif +- +-ifneq (, $(findstring cygwin, $(SYS))) +- # Do cygwin things +- CFLAGS = -fPIC +-endif +# LUA include/libraries build flags -+LUA_LIBDIR := $(shell $(PKGC) --variable=libdir $(LUAPKGC)) -+LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC)) -+LUA_LIBS := $(shell $(PKGC) --libs-only-L $(LUAPKGC)) -+ ++LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC)) ++LUA_LIBS_DIR := $(shell $(PKGC) --libs $(LUAPKGC)) + +-ifneq (, $(findstring iOS, $(SYS))) +- # Do iOS things +- CFLAGS = -fPIC +- LDFLAGS = -fPIC -ldl +-endif +# openssl include/libraries build flags -+OPENSSL_LIBS = $(shell $(PKGC) openssl --libs) -+OPENSSL_CFLAGS = $(shell $(PKGC) openssl --cflags) -+ -+# openssl include/libraries build flags -+LOCAL_INCLUDE = -I$(BUILD_DIR)/deps -+ -+CFLAGS += -fPIC -DPTHREADS -g $(LOCAL_INCLUDE) $(OPENSSL_CFLAGS) $(LUA_CFLAGS) -+LDFLAGS += -lrt -ldl $(OPENSSL_LIBS) $(LUA_LIBS) -+ -+OBJS = src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o -+ -+all: clean $(LIBNAME) -+ -+$(LIBNAME): $(OBJS) -+ $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@ -+ ++OPENSSL_CFLAGS ?= $(shell $(PKGC) openssl --cflags) ++OPENSSL_LIBS_DIR ?= $(shell $(PKGC) openssl --libs) + +-#custom config ++LDFLAGS = -Wl,--no-undefined -fpic -lrt -ldl -lm $(OPENSSL_LIBS_DIR) $(LUA_LIBS_DIR) ++CFLAGS += -fPIC -DPTHREADS $(OPENSSL_CFLAGS) $(LUA_CFLAGS) + ifeq (.config, $(wildcard .config)) +- include .config ++include .config + endif + +-LIBNAME= $T.so.$V ++LIBNAME= $T.so + +-CFLAGS += $(OPENSSL_CFLAGS) $(LUA_CFLAGS) $(TARGET_FLAGS) +-LDFLAGS += -shared $(OPENSSL_LIBS) $(LUA_LIBS) + # Compilation directives + WARN_MIN = -Wall -Wno-unused-value + WARN = -Wall + WARN_MOST = $(WARN) -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic + CFLAGS += -g $(WARN_MIN) -DPTHREADS -Ideps -Ideps/lua-compat -Ideps/auxiliar + +- + OBJS=src/asn1.o deps/auxiliar/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \ + src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o \ + src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o \ + src/xalgor.o src/callback.o src/srp.o deps/auxiliar/subsidiar.o + +-.c.o: +- $(CC) $(CFLAGS) -c -o $@ $? +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ -+ -+install: all -+ mkdir -p $(LUA_LIBDIR) -+ cp $(LIBNAME) $(LUA_LIBDIR) -+ -+clean: -+ rm -f $(LIBNAME) $(OBJS) + + all: $T.so +- @echo "Target system: "$(SYS) +- +-$T.so: lib$T.a +- $(CC) -o $@ src/openssl.o -L. -l$T $(LDFLAGS) ++ echo $(SYS) ++ $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@ + +-lib$T.a: $(OBJS) +- $(AR) rcs $@ $? ++$T.so: $(OBJS) ++ echo "LUA LIBS_DIR: " $(LUA_LIBS_DIR) ++ $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(LDFLAGS) + + install: all + mkdir -p $(LUA_LIBDIR) + cp $T.so $(LUA_LIBDIR) + +-info: +- @echo "Target system: "$(SYS) +- @echo "CC:" $(CC) +- @echo "AR:" $(AR) +- @echo "PREFIX:" $(PREFIX) +- + clean: +- rm -f $T.so lib$T.a $(OBJS) +- +-# vim: ts=8 sw=8 noet ++ rm -f $T.so $(OBJS) diff --git a/lang/lua-openssl/patches/0010-Fix-Linkage.patch b/lang/lua-openssl/patches/0010-Fix-Linkage.patch deleted file mode 100644 index 52bcf1ae..00000000 --- a/lang/lua-openssl/patches/0010-Fix-Linkage.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/deps/lua-compat/c-api/compat-5.3.c b/deps/lua-compat/c-api/compat-5.3.c -index 4395bbc..4a8877c 100644 ---- a/deps/lua-compat/c-api/compat-5.3.c -+++ b/deps/lua-compat/c-api/compat-5.3.c -@@ -491,17 +491,6 @@ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i) { - } - - --COMPAT53_API int lua_isinteger (lua_State *L, int index) { -- if (lua_type(L, index) == LUA_TNUMBER) { -- lua_Number n = lua_tonumber(L, index); -- lua_Integer i = lua_tointeger(L, index); -- if (i == n) -- return 1; -- } -- return 0; --} -- -- - static void compat53_reverse (lua_State *L, int a, int b) { - for (; a < b; ++a, --b) { - lua_pushvalue(L, a); -diff --git a/deps/lua-compat/c-api/compat-5.3.h b/deps/lua-compat/c-api/compat-5.3.h -index 2309294..8e67bae 100644 ---- a/deps/lua-compat/c-api/compat-5.3.h -+++ b/deps/lua-compat/c-api/compat-5.3.h -@@ -244,9 +244,6 @@ typedef int (*lua_KFunction)(lua_State *L, int status, lua_KContext ctx); - #define lua_geti COMPAT53_CONCAT(COMPAT53_PREFIX, _geti) - COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i); - --#define lua_isinteger COMPAT53_CONCAT(COMPAT53_PREFIX, _isinteger) --COMPAT53_API int lua_isinteger (lua_State *L, int index); -- - #define lua_numbertointeger(n, p) \ - ((*(p) = (lua_Integer)(n)), 1) - diff --git a/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch b/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch deleted file mode 100644 index 2f296801..00000000 --- a/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200 -+++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 09:02:45.733813437 +0200 -@@ -24,12 +24,17 @@ - SSL_METHOD* method = NULL; - const char* ciphers; - SSL_CTX* ctx; -- if (strcmp(meth, "SSLv3") == 0) -+ if (0); -+ -+#ifndef OPENSSL_NO_SSL3 -+ else if (strcmp(meth, "SSLv3") == 0) - method = SSLv3_method(); /* SSLv3 */ - else if (strcmp(meth, "SSLv3_server") == 0) - method = SSLv3_server_method(); /* SSLv3 */ - else if (strcmp(meth, "SSLv3_client") == 0) - method = SSLv3_client_method(); /* SSLv3 */ -+#endif -+ - else if (strcmp(meth, "SSLv23") == 0) - method = SSLv23_method(); /* SSLv3 but can rollback to v2 */ - else if (strcmp(meth, "SSLv23_server") == 0) -@@ -79,15 +84,15 @@ - #endif - else - luaL_error(L, "#1:%s not supported\n" -- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", -- "default is SSLv3", -+ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", -+ "default is TLSv1", - meth); - ciphers = luaL_optstring(L, 2, SSL_DEFAULT_CIPHER_LIST); - ctx = SSL_CTX_new(method); - if (!ctx) - luaL_error(L, "#1:%s not supported\n" -- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", -- "default is SSLv3", -+ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", -+ "default is TLSv1", - meth); - openssl_newvalue(L, ctx); - SSL_CTX_set_cipher_list(ctx, ciphers); diff --git a/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch b/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch deleted file mode 100644 index 44e53309..00000000 --- a/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200 -+++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 08:48:37.393737125 +0200 -@@ -1245,7 +1250,7 @@ - lua_pushinteger(L, st); - return 2; - } --#ifndef LIBRESSL_VERSION_NUMBER -+#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER) - static int openssl_ssl_current_compression(lua_State *L) - { - SSL* s = CHECK_OBJECT(1, SSL, "openssl.ssl"); -@@ -1803,7 +1808,7 @@ - {"getfd", openssl_ssl_getfd}, - - {"current_cipher", openssl_ssl_current_cipher}, --#ifndef LIBRESSL_VERSION_NUMBER -+#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER) - {"current_compression", openssl_ssl_current_compression}, - #endif - {"getpeerverification", openssl_ssl_getpeerverification}, diff --git a/lang/lua-penlight/Makefile b/lang/lua-penlight/Makefile index f7196946..ce5d4f9f 100644 --- a/lang/lua-penlight/Makefile +++ b/lang/lua-penlight/Makefile @@ -8,15 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-penlight -PKG_VERSION:=1.5.4 +PKG_VERSION:=1.7.0 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/stevedonovan/Penlight -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=cd9f25981b12022b66180a3b8df46840be1b3e2a857b8d9909b2d5601be0ead4 +PKG_BUILD_DIR:=$(BUILD_DIR)/Penlight-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/Tieske/Penlight/tar.gz/$(PKG_VERSION)? +PKG_HASH:=5b793fc93fa7227190e191e5b24a8f0ce9dd5958ccebe7a53842a58b5d46057f PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE.md @@ -27,7 +25,7 @@ define Package/lua-penlight SECTION:=lang CATEGORY:=Languages TITLE:=Penlight - URL:=http://stevedonovan.github.io/Penlight/api/manual/01-introduction.md.html + URL:=http://tieske.github.io/Penlight/manual/01-introduction.md.html DEPENDS:=+luafilesystem MAINTAINER:=Karl Palsson endef diff --git a/lang/lua-rs232/Makefile b/lang/lua-rs232/Makefile index 492d8cc8..d5fb9533 100644 --- a/lang/lua-rs232/Makefile +++ b/lang/lua-rs232/Makefile @@ -8,19 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-rs232 -PKG_VERSION:=1.0.3 -PKG_RELEASE:=2 +PKG_SOURCE_DATE:=2019-11-20 +PKG_SOURCE_VERSION:=c106c94d1a5a84e8582c936528303528608776c2 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/srdgame/librs232 +PKG_MIRROR_HASH:=6fcabfd1501b3a7719229334ce73f1cc74f5ac5795b8faf6d65eb2ae6b14f9a5 + PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=fb2f6453537e10beb2cd99d30eb1b4259ab75452992ca8a65d621186cf320960 -PKG_SOURCE_URL:=https://github.com/srdgame/librs232.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=a9d463181e7f7034fe6a55bc38e845fb04fa93ba -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=lua/host include $(INCLUDE_DIR)/package.mk @@ -37,27 +40,25 @@ define Package/lua-rs232/description multiplatform library for serial communications over RS-232 endef -CONFIGURE_ARGS += \ - --with-lua-inc=$(STAGING_DIR)/usr/include \ - --with-lua-lib=$(STAGING_DIR)/usr/lib +TARGET_CFLAGS += -ffunction-sections -fdata-sections +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -#define Build/Configure -# ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh ) -# $(call Build/Configure/Default) -#endef -define Build/Configure -endef - -define Build/Compile - (cd "$(PKG_BUILD_DIR)"; $(TARGET_CC) src/rs232.c src/rs232_posix.c bindings/lua/luars232.c -DLUAROCKS_HACK -std=gnu99 -I./include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib -fPIC -shared -o luars232.so) -endef - -define Build/Install +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/librs232 + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/librs232/rs232* $(1)/usr/include/librs232 + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/luars232* $(1)/usr/lib/lua + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librs232.pc $(1)/usr/lib/pkgconfig endef define Package/lua-rs232/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/luars232.so $(1)/usr/lib/lua/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/luars232* $(1)/usr/lib/lua endef $(eval $(call BuildPackage,lua-rs232)) diff --git a/lang/lua-rs232/patches/100-remove-build-timestamps.patch b/lang/lua-rs232/patches/100-remove-build-timestamps.patch index fe59e2c7..694c4720 100644 --- a/lang/lua-rs232/patches/100-remove-build-timestamps.patch +++ b/lang/lua-rs232/patches/100-remove-build-timestamps.patch @@ -1,7 +1,5 @@ -Index: lua-rs232-1.0.3/bindings/lua/luars232.c -=================================================================== ---- lua-rs232-1.0.3.orig/bindings/lua/luars232.c 2014-06-05 09:48:23.000000000 +0200 -+++ lua-rs232-1.0.3/bindings/lua/luars232.c 2017-12-03 13:03:51.008917783 +0100 +--- a/bindings/lua/luars232.c ++++ b/bindings/lua/luars232.c @@ -31,7 +31,6 @@ #include "librs232/rs232.h" @@ -10,7 +8,7 @@ Index: lua-rs232-1.0.3/bindings/lua/luars232.c #define MODULE_NAMESPACE "luars232" #define MODULE_VERSION "1.0.3" #define MODULE_BUILD "$Id: luars232.c 15 2011-02-23 09:02:20Z sp $" -@@ -483,9 +482,6 @@ +@@ -553,9 +552,6 @@ lua_pushstring(L, MODULE_BUILD); lua_setfield(L, -2, "_BUILD"); diff --git a/lang/lua-wsapi/Makefile b/lang/lua-wsapi/Makefile index 5e1e6c9d..71e5aad5 100644 --- a/lang/lua-wsapi/Makefile +++ b/lang/lua-wsapi/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-wsapi -PKG_VERSION:=1.6.1 +PKG_VERSION:=1.7 PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/wsapi/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=48dc7aba0fd2e96a3e5ef51045b5d923964f6ae299de761aa0467031ad44e987 +PKG_BUILD_DIR:=$(BUILD_DIR)/wsapi-$(PKG_VERSION) + PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=0e52ca377c135c8db1f824841e1a36c1ef7e4b4a594a5b70a2f402586901ca1f -PKG_SOURCE_URL:=https://github.com/keplerproject/wsapi.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=eed8338401196cc155e59280adbe58d78933ead0 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -31,6 +31,7 @@ define Package/lua-wsapi/Default TITLE:=Lua WSAPI URL:=https://keplerproject.github.io/wsapi/ DEPENDS:= +lua + PKGARCH:=all endef define Package/lua-wsapi/Default/description diff --git a/lang/lua-xavante/Makefile b/lang/lua-xavante/Makefile index 73be566a..9b870aa5 100644 --- a/lang/lua-xavante/Makefile +++ b/lang/lua-xavante/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-xavante -PKG_VERSION:=2.3.0 +PKG_VERSION:=2.4.0 PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/xavante/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=0e4f49dd96cb092cd5d80cc66a5204dcb22a14f80897a121f2f0d1dceb1c7ba5 +PKG_BUILD_DIR:=$(BUILD_DIR)/xavante-$(PKG_VERSION) + PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=0ab254d4bb8ce9556ad8fc2a1b4aef739ec3bb3e1f343400b20435e2ab8e686f -PKG_SOURCE_URL:=https://github.com/keplerproject/xavante.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=9825b905133e14d37a4c179f2d02367ab93f1ef6 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -29,8 +29,9 @@ define Package/lua-xavante SECTION:=lang CATEGORY:=Languages TITLE:=Xavante Web Server - URL:=http://keplerproject.github.io/xavante/ + URL:=https://keplerproject.github.io/xavante/ DEPENDS:= +lua + PKGARCH:=all endef define Package/lua-xavante/description diff --git a/lang/luaexpat/Makefile b/lang/luaexpat/Makefile index f4ebef8e..b5d7699d 100644 --- a/lang/luaexpat/Makefile +++ b/lang/luaexpat/Makefile @@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://matthewwild.co.uk/projects/luaexpat PKG_HASH:=d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3 +PKG_CPE_ID:=cpe:/a:matthewwild:luaexpat + include $(INCLUDE_DIR)/package.mk define Package/luaexpat diff --git a/lang/luafilesystem/Makefile b/lang/luafilesystem/Makefile index 55bb95e3..a54d750f 100644 --- a/lang/luafilesystem/Makefile +++ b/lang/luafilesystem/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luafilesystem -PKG_VERSION:=1.6.2 +PKG_VERSION:=1.7.0.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=b366bce608e6f18f1b3cb32c6eb6a78d78d17c3598a0d54c493601f9aadefdd8 +PKG_MIRROR_HASH:=f109017711dd77d74a39bd1c0975be7edf726da0265f16496ea468481fac0b85 PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git -PKG_SOURCE_VERSION:=2fd989cd6c777583be1c93616018c55b2cbb1bcf +PKG_SOURCE_VERSION:=de87218e9798c4dd1a40d65403d99e9e82e1cfa0 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) diff --git a/lang/luajit/Makefile b/lang/luajit/Makefile index e5dfa953..94429a7b 100644 --- a/lang/luajit/Makefile +++ b/lang/luajit/Makefile @@ -1,20 +1,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luajit -PKG_VERSION:=2017-01-17-71ff7ef -PKG_RELEASE:=1 +PKG_VERSION:=2.1.0-beta3 +PKG_RELEASE:=4 + +PKG_SOURCE:=LuaJIT-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://luajit.org/download +PKG_HASH:=1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3 +PKG_BUILD_DIR:=$(BUILD_DIR)/LuaJIT-$(PKG_VERSION) + PKG_MAINTAINER:=Morteza Milani PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYRIGHT -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/LuaJIT/LuaJIT.git -PKG_SOURCE_VERSION:=71ff7ef8a7e0592dedb3527d4aacc68bf04af0bd -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=543994d0822515d9b7dc7cbaa7737c48258403d56a3b30e729267421265d4618 -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - PKG_USE_MIPS16:=0 include $(INCLUDE_DIR)/package.mk @@ -25,19 +23,15 @@ define Package/luajit SECTION:=lang CATEGORY:=Languages TITLE:=LuaJIT - URL:=http://www.luajit.org - DEPENDS:=@(i386||x86_64||arm||armeb||powerpc||mips||mipsel) + URL:=https://www.luajit.org + DEPENDS:=@(i386||x86_64||arm||armeb||aarch64||powerpc||mips||mipsel||mips64) endef define Package/luajit/description LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. *** Requires GCC Multilib on host system to build! *** endef - -TARGET_CFLAGS += $(FPIC) -std=gnu99 -HOST_CFLAGS += $(FPIC) -std=gnu99 - -ifeq ($(HOST_ARCH),x86_64) - ifeq ($(CONFIG_x86_64),) +ifeq ($(HOST_ARCH),$(filter $(HOST_ARCH), x86_64 mips64)) + ifeq ($(CONFIG_ARCH_64BIT),) HOST_BITS := -m32 endif endif @@ -48,30 +42,33 @@ define Build/Compile CROSS="$(TARGET_CROSS)" \ DPREFIX=$(PKG_INSTALL_DIR)/usr \ PREFIX=/usr \ - TARGET_CFLAGS="$(TARGET_CFLAGS)" + TARGET_SYS=Linux \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + BUILDMODE=dynamic rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ DPREFIX=$(PKG_INSTALL_DIR)/usr \ PREFIX=/usr \ + TARGET_SYS=Linux \ install endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/luajit-2.1 - $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.h $(1)/usr/include/luajit-2.1 + $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.{h,hpp} $(1)/usr/include/luajit-2.1 $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/luajit.pc $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-2.1.0-beta2 $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) + $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-$(PKG_VERSION) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) endef define Package/luajit/install $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-2.1.0-beta2 $(1)/usr/bin/$(PKG_NAME) + $(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-$(PKG_VERSION) $(1)/usr/bin/$(PKG_NAME) endef define Host/Compile @@ -85,7 +82,7 @@ define Host/Install $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ DPREFIX=$(STAGING_DIR_HOSTPKG) \ install - $(CP) $(STAGING_DIR_HOSTPKG)/bin/luajit-2.1.0-beta2 $(STAGING_DIR_HOSTPKG)/bin/$(PKG_NAME) + $(CP) $(STAGING_DIR_HOSTPKG)/bin/luajit-$(PKG_VERSION) $(STAGING_DIR_HOSTPKG)/bin/$(PKG_NAME) endef $(eval $(call HostBuild,luajit)) diff --git a/lang/luajit/patches/010-lua-path.patch b/lang/luajit/patches/010-lua-path.patch index 63df9a11..f752002d 100644 --- a/lang/luajit/patches/010-lua-path.patch +++ b/lang/luajit/patches/010-lua-path.patch @@ -8,6 +8,6 @@ -#define LUA_LUADIR "/lua/5.1/" +#define LUA_LROOT "/usr" +#define LUA_LUADIR "/lua/" - #define LUA_LJDIR "/luajit-2.1.0-beta2/" - + #define LUA_LJDIR "/luajit-2.1.0-beta3/" + #ifdef LUA_ROOT diff --git a/lang/lualanes/Makefile b/lang/lualanes/Makefile index ca4573b4..b95b625f 100644 --- a/lang/lualanes/Makefile +++ b/lang/lualanes/Makefile @@ -8,16 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lualanes -PKG_REV:=aa9bfcf2dd49f55f11b27e7c21d5b75d81ccfc7e -PKG_VERSION:=3.9.4 -PKG_RELEASE=1 +PKG_VERSION:=3.13.0 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz -PKG_MIRROR_HASH:=e9b053e627edaf7ef229af176177bf2bd0edd31b69690ba7c1e6be41041ffd07 -PKG_SOURCE_URL:=https://github.com/LuaLanes/lanes.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/LuaLanes/lanes/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=53a17d7ee11f17ca0543ae5aa640208dcb62d37862a0d0ea450455fae12c8ff1 +PKG_BUILD_DIR:=$(BUILD_DIR)/lanes-$(PKG_VERSION) PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -45,7 +42,9 @@ define Build/Compile CC="$(TARGET_CC)" \ LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \ LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \ - OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield" + LUA_FLAGS= \ + LUA_LIBS=-llua \ + OPT_FLAGS="$(TARGET_CFLAGS) -Dpthread_yield=sched_yield" endef define Package/lualanes/install diff --git a/lang/lualanes/patches/100-musl-compat.patch b/lang/lualanes/patches/100-musl-compat.patch index ba3f49f9..2f3276b1 100644 --- a/lang/lualanes/patches/100-musl-compat.patch +++ b/lang/lualanes/patches/100-musl-compat.patch @@ -1,8 +1,6 @@ -diff --git a/src/threading.h b/src/threading.h -index bfa9ab8..7b3d6a1 100644 --- a/src/threading.h +++ b/src/threading.h -@@ -128,7 +128,7 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED }; +@@ -110,7 +110,7 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED }; #endif // PLATFORM_WIN32 #include diff --git a/lang/lualanes/patches/200-fix-redef-error.patch b/lang/lualanes/patches/200-fix-redef-error.patch new file mode 100644 index 00000000..662e08ff --- /dev/null +++ b/lang/lualanes/patches/200-fix-redef-error.patch @@ -0,0 +1,12 @@ +--- a/src/threading.c ++++ b/src/threading.c +@@ -35,7 +35,9 @@ THE SOFTWARE. + =============================================================================== + */ + #if defined(__linux__) ++#ifndef _GNU_SOURCE + # define _GNU_SOURCE /* must be defined before any include */ ++#endif + # ifdef __ANDROID__ + # include + # define LOG_TAG "LuaLanes" diff --git a/lang/luaposix/Makefile b/lang/luaposix/Makefile index 92ff86d0..9b9298d4 100644 --- a/lang/luaposix/Makefile +++ b/lang/luaposix/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2011 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -8,20 +6,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luaposix -PKG_VERSION:=v33.2.1 -PKG_RELEASE:=5 +PKG_VERSION:=34.1.1 +PKG_RELEASE:=1 -PKG_SOURCE:=release-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/ -PKG_HASH:=4fb34dfea67f4cf3194cdecc6614c9aea67edc3c4093d34137669ea869c358e1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION) -PKG_REMOVE_FILES:=aclocal.m4 -PKG_FIXUP:=autoreconf +PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=7948f4ac8b953172e928753632e37ad97cc3014df74b524fe7839f71216a7e90 PKG_MAINTAINER:=Maxim Storchak PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_BUILD_DEPENDS:=lua/host +PKG_BUILD_DEPENDS:=luarocks/host include $(INCLUDE_DIR)/package.mk @@ -29,9 +24,9 @@ define Package/luaposix SUBMENU:=Lua SECTION:=lang CATEGORY:=Languages - TITLE:=luaposix - URL:=http://luaforge.net/projects/luaposix/ - DEPENDS:=+lua +librt + TITLE:=POSIX binding for LuaJIT, Lua 5.1, 5.2 and 5.3 + URL:=https://github.com/luaposix/luaposix + DEPENDS:=+lua +lua-bit32 endef define Package/luaposix/description @@ -39,27 +34,32 @@ define Package/luaposix/description to various low level libc functions. endef -CONFIGURE_VARS += ac_cv_path_LDOC="true" +TARGET_PATH_PKG:=$(CURDIR)/scripts:$(TARGET_PATH_PKG) -TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99 -ifeq ($(CONFIG_USE_MUSL),y) - TARGET_CFLAGS += -D_POSIX_PRIORITY_SCHEDULING - # Musl doesn't do all of XOPEN_REALTIME, but it does for luaposix. - # see https://github.com/luaposix/luaposix/issues/295 - TARGET_CFLAGS += -D_XOPEN_REALTIME=1 -endif - -ifneq ($(CONFIG_USE_GLIBC),) - ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),) - TARGET_CFLAGS += -DNO_GETLOGIN - endif -endif +TARGET_CFLAGS += \ + -I$(STAGING_DIR)/usr/include +define Build/Compile + cd $(PKG_BUILD_DIR) && \ + LDFLAGS="$(TARGET_LDFLAGS) $(FPIC)" \ + CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ + CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ + LUA_PKGNAME=lua5.1 \ + LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ + luarocks make --force --deps-mode=none --pack-binary-rock luaposix-$(PKG_VERSION)-1.rockspec \ + LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \ + LUA_PKGNAME=lua5.1 \ + CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef define Package/luaposix/install - $(INSTALL_DIR) $(1)/usr/lib/lua/posix - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix.so $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua + $(INSTALL_DIR) $(1)/usr/lib/lua/posix/sys + $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/posix/*.so $(1)/usr/lib/lua/posix/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/posix/sys/*.so $(1)/usr/lib/lua/posix/sys/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix/*.lua $(1)/usr/lib/lua/posix/ + rm -f $(1)/usr/lib/lua/posix/{deprecated,compat}.lua endef $(eval $(call BuildPackage,luaposix)) diff --git a/lang/luaposix/patches/100-eglibc-compat.patch b/lang/luaposix/patches/100-eglibc-compat.patch deleted file mode 100644 index e4df63bf..00000000 --- a/lang/luaposix/patches/100-eglibc-compat.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/ext/posix/unistd.c b/ext/posix/unistd.c -index 9276640..69c8cef 100644 ---- a/ext/posix/unistd.c -+++ b/ext/posix/unistd.c -@@ -525,6 +525,7 @@ Pgetgroups(lua_State *L) - #endif - - -+#ifndef NO_GETLOGIN - /*** - Current logged-in user. - @treturn[1] string username, if successful -@@ -537,6 +538,7 @@ Pgetlogin(lua_State *L) - checknargs(L, 0); - return pushstringresult(getlogin()); - } -+#endif - - - /*** -@@ -1044,7 +1046,9 @@ static const luaL_Reg posix_unistd_fns[] = - LPOSIX_FUNC( Pgetegid ), - LPOSIX_FUNC( Pgeteuid ), - LPOSIX_FUNC( Pgetgid ), -+#ifndef NO_GETLOGIN - LPOSIX_FUNC( Pgetlogin ), -+#endif - LPOSIX_FUNC( Pgetpgrp ), - LPOSIX_FUNC( Pgetpid ), - LPOSIX_FUNC( Pgetppid ), diff --git a/lang/luaposix/patches/101-disable-curses.patch b/lang/luaposix/patches/101-disable-curses.patch deleted file mode 100644 index 6412799b..00000000 --- a/lang/luaposix/patches/101-disable-curses.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index dfd4199..19924d0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -153,15 +153,6 @@ AC_CHECK_LIB([rt], [clock_gettime]) - AC_SUBST([LIBRT], [$LIBS]) - LIBS=$save_LIBS - --## Curses --AX_WITH_CURSES --AC_ARG_VAR(CURSES_LIB, [linker flags for curses library]) -- --save_LIBS=$LIBS --LIBS="$CURSES_LIB $LIBS" --AC_CHECK_FUNCS([resizeterm]) --LIBS=$save_LIBS -- - ## Use system implementation, or bundled replacement? - AC_CHECK_FUNCS([strlcpy]) - -diff --git a/ext/posix/posix.c b/ext/posix/posix.c -index 6019df0..2d75487 100644 ---- a/ext/posix/posix.c -+++ b/ext/posix/posix.c -@@ -12,7 +12,6 @@ - - #include "bit32.c" - #include "ctype.c" --#include "curses.c" - #include "dirent.c" - #include "errno.c" - #include "fcntl.c" diff --git a/lang/luaposix/patches/102-disable-compat-deprecated.diff b/lang/luaposix/patches/102-disable-compat-deprecated.diff index 7c58be48..eef60f8a 100644 --- a/lang/luaposix/patches/102-disable-compat-deprecated.diff +++ b/lang/luaposix/patches/102-disable-compat-deprecated.diff @@ -1,20 +1,19 @@ -diff --git a/lib/posix.lua.in b/lib/posix.lua.in -index 17ef39a..a248d9b 100644 ---- a/lib/posix.lua.in -+++ b/lib/posix.lua.in -@@ -35,15 +35,6 @@ for _, sub in ipairs { - end +diff --git i/lib/posix/init.lua w/lib/posix/init.lua +index c17693a..d4db923 100644 +--- i/lib/posix/init.lua ++++ w/lib/posix/init.lua +@@ -325,14 +325,6 @@ do + end + end + end +- +- -- Inject deprecated APIs (overwriting submodules) for backwards compatibility. +- for k, v in next, require 'posix.deprecated' do +- M[k] = v +- end +- for k, v in next, require 'posix.compat' do +- M[k] = v +- end end -- ---- Inject deprecated APIs (overwriting submodules) for backwards compatibility. --for k, v in pairs (require "posix.deprecated") do -- M[k] = v --end --for k, v in pairs (require "posix.compat") do -- M[k] = v --end -- - M.version = "posix for " .. _VERSION .. " / @PACKAGE_STRING@" - diff --git a/lang/luaposix/patches/900-disable-ldoc.patch b/lang/luaposix/patches/900-disable-ldoc.patch new file mode 100644 index 00000000..7859807f --- /dev/null +++ b/lang/luaposix/patches/900-disable-ldoc.patch @@ -0,0 +1,13 @@ +diff --git a/lukefile b/lukefile +index 2d4bb2f..1e48540 100644 +--- a/lukefile ++++ b/lukefile +@@ -29,8 +29,6 @@ incdirs = { + '$LUA_INCDIR', + } + +-ldocs = 'build-aux/config.ld.in' +- + modules = { + ['posix'] = 'lib/posix/init.lua', + ['posix._base'] = 'lib/posix/_base.lua', diff --git a/lang/luaposix/scripts/uname b/lang/luaposix/scripts/uname new file mode 100755 index 00000000..787b647f --- /dev/null +++ b/lang/luaposix/scripts/uname @@ -0,0 +1,2 @@ +#!/bin/sh +echo Linux diff --git a/lang/luarocks/Makefile b/lang/luarocks/Makefile index 3428ef83..4c21e5c3 100644 --- a/lang/luarocks/Makefile +++ b/lang/luarocks/Makefile @@ -3,27 +3,31 @@ # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. -# +# include $(TOPDIR)/rules.mk PKG_NAME:=luarocks PKG_VERSION:=2.2.2 -PKG_RELEASE:=2 +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=e4cf874c9bce34a5accd41daaf51a3213763b8b6f7f658ca4d13a70a7ddb1c0c PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks.git +PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_MIRROR_HASH:=e4cf874c9bce34a5accd41daaf51a3213763b8b6f7f658ca4d13a70a7ddb1c0c PKG_MAINTAINER:=Amr Hassan -PKG_INSTALL=1 +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=lua/host HOST_BUILD_DEPENDS:=$(PKG_BUILD_DEPENDS) -PKG_LICENSE=GPL -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION) +HOST_BUILD_PARALLEL:=1 + +HOST_BUILD_PREFIX:=$(STAGING_DIR)/host +HOST_BUILD_DIR:=$(BUILD_DIR)/host/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -48,14 +52,18 @@ CONFIGURE_ARGS = \ --with-lua=$(STAGING_DIR_HOSTPKG) HOST_CONFIGURE_ARGS= \ - --prefix=$(STAGING_DIR_HOSTPKG) \ - --sysconfdir=$(STAGING_DIR_HOSTPKG)/etc \ + --prefix=$(STAGING_DIR)/host \ + --sysconfdir=$(STAGING_DIR)/host/etc \ --with-lua=$(STAGING_DIR_HOSTPKG) CONFIGURE_VARS = \ LUAROCKS_UNAME_S="Linux" \ LUAROCKS_UNAME_M="$(ARCH)" +HOST_CONFIGURE_VARS = \ + LUAROCKS_UNAME_S="Linux" \ + LUAROCKS_UNAME_M="$(ARCH)" + define Build/Compile $(call Build/Compile/Default,build) endef diff --git a/lang/luarocks/patches/01_dont_modify_bin_shebang.diff b/lang/luarocks/patches/01_dont_modify_bin_shebang.diff index a1bad215..69ab5c59 100644 --- a/lang/luarocks/patches/01_dont_modify_bin_shebang.diff +++ b/lang/luarocks/patches/01_dont_modify_bin_shebang.diff @@ -6,7 +6,7 @@ diff -rupN luarocks/Makefile luarocks.new/Makefile do \ sed "1d" src/bin/$$f > src/bin/$$f.bak ;\ - echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\ -+ echo "#!/usr/bin/env lua" > src/bin/$$f ;\ ++ echo "#!/usr/bin/env lua5.1" > src/bin/$$f ;\ echo "package.path = [[$(LUADIR)/?.lua;]]..package.path" | sed "s,//,/,g" >> src/bin/$$f ;\ cat src/bin/$$f.bak >> src/bin/$$f ;\ chmod +x src/bin/$$f ;\ diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile index 4bf05acc..8cef2c71 100644 --- a/lang/luasec/Makefile +++ b/lang/luasec/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luasec -PKG_VERSION:=0.6 +PKG_VERSION:=0.9 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/ -PKG_HASH:=cef3a35c18beb8a54d9c8ce6260a4cabbd9a386de8711320d084daffad0aed5d -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=6b6b94e8517bf6baf545fad29a2112f9ac7957ad85b4aae8e0727bec77d7a325 MAINTAINER:=W. Michael Petullo PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -40,9 +40,13 @@ endef define Build/Configure endef +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += $(FPIC) + MAKE_FLAGS += \ - INCDIR="$(TARGET_CPPFLAGS) -I." \ - LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \ + LD="$(TARGET_CC)" \ + INC_PATH="" \ + LIB_PATH="" \ LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \ LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" diff --git a/lang/luasec/patches/100-fix-compilation.patch b/lang/luasec/patches/100-fix-compilation.patch new file mode 100644 index 00000000..61f0490a --- /dev/null +++ b/lang/luasec/patches/100-fix-compilation.patch @@ -0,0 +1,28 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -15,8 +15,8 @@ WARN=-Wall -pedantic + BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS) + BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR) + +-LNX_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS) +-LNX_LDFLAGS=-O -fPIC -shared $(LIBDIR) ++LNX_CFLAGS=$(INCDIR) $(DEFS) ++LNX_LDFLAGS=-shared $(LIBDIR) + + MAC_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)' + MAC_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS) +@@ -33,10 +33,10 @@ LDFLAGS += $(MYLDFLAGS) + all: + + install: $(CMOD) $(LMOD) +- $(INSTALL) -d $(DESTDIR)$(LUAPATH)/ssl $(DESTDIR)$(LUACPATH) +- $(INSTALL) $(CMOD) $(DESTDIR)$(LUACPATH) +- $(INSTALL) -m644 $(LMOD) $(DESTDIR)$(LUAPATH) +- $(INSTALL) -m644 https.lua $(DESTDIR)$(LUAPATH)/ssl ++ $(INSTALL) -d $(LUAPATH)/ssl $(LUACPATH) ++ $(INSTALL) $(CMOD) $(LUACPATH) ++ $(INSTALL) -m644 $(LMOD) $(LUAPATH) ++ $(INSTALL) -m644 https.lua $(LUAPATH)/ssl + + linux: + @$(MAKE) $(CMOD) MYCFLAGS="$(LNX_CFLAGS)" MYLDFLAGS="$(LNX_LDFLAGS)" EXTRA="$(EXTRA)" diff --git a/lang/luasoap/Makefile b/lang/luasoap/Makefile index de88fcf9..f07c635a 100644 --- a/lang/luasoap/Makefile +++ b/lang/luasoap/Makefile @@ -30,6 +30,7 @@ define Package/luasoap TITLE:=LuaSOAP URL:=https://github.com/tomasguisasola/luasoap DEPENDS:=+lua +luaexpat +luasec +luasocket + PKGARCH:=all endef define Package/luasoap/description diff --git a/lang/luasocket/Makefile b/lang/luasocket/Makefile index ba8ca2a6..b44636e4 100644 --- a/lang/luasocket/Makefile +++ b/lang/luasocket/Makefile @@ -8,33 +8,58 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luasocket -PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448 -PKG_VERSION:=3.0-rc1-20130909 -PKG_RELEASE:=4 +PKG_SOURCE_DATE:=2019-04-21 +PKG_SOURCE_VERSION:=733af884f1aa18ff469bf3c4d18810e815853211 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_MIRROR_HASH:=d2fa075d8bd026c41e0eb1a634ac2ad8115dee8abb070720e8e91fab51f86ee4 -PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket +PKG_MIRROR_HASH:=60aef7544426cae3e6c7560a6e4ad556a04b879ca0ad0311645b2c513c872128 + +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk -define Package/luasocket +define Package/luasocket/default SUBMENU:=Lua SECTION:=lang CATEGORY:=Languages - TITLE:=LuaSocket - URL:=http://luasocket.luaforge.net/ - MAINTAINER:=W. Michael Petullo - DEPENDS:=+lua + URL:=http://w3.impa.br/~diego/software/luasocket endef -define Package/luasocket/description +define Package/luasocket + $(Package/luasocket/default) + TITLE:=LuaSocket + DEPENDS:=+lua + VARIANT:=lua-51 + DEFAULT_VARIANT:=1 +endef + +define Package/luasocket5.3 + $(Package/luasocket/default) + TITLE:=LuaSocket 5.3 + DEPENDS:=+liblua5.3 + VARIANT:=lua-53 +endef + +ifeq ($(BUILD_VARIANT),lua-51) + LUA_VERSION=5.1 +endif + +ifeq ($(BUILD_VARIANT),lua-53) + LUA_VERSION=5.3 +endif + + +define Package/luasocket/default/description LuaSocket is the most comprehensive networking support library for the Lua language. It provides easy access to TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more. endef +Package/luasocket/description = $(Package/luasocket/default/description) +Package/luasocket5.3/description = $(Package/luasocket/default/description) define Build/Configure endef @@ -42,23 +67,33 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/ \ LIBDIR="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \ LD="$(TARGET_CROSS)ld -shared" \ + LUAV=$(LUA_VERSION) LUAINC_linux_base=$(STAGING_DIR)/usr/include \ all endef - define Package/luasocket/install $(INSTALL_DIR) $(1)/usr/lib/lua $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime-1.0.3.so $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket-3.0-rc1.so $(1)/usr/lib/lua $(INSTALL_DIR) $(1)/usr/lib/lua/mime - ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so + ln -sf ../mime-1.0.3.so $(1)/usr/lib/lua/mime/core.so $(INSTALL_DIR) $(1)/usr/lib/lua/socket $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket - ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so + ln -sf ../socket-3.0-rc1.so $(1)/usr/lib/lua/socket/core.so endef + +define Package/luasocket5.3/install + $(MAKE) -C $(PKG_BUILD_DIR)/src \ + DESTDIR="$(1)" \ + LUAV=$(LUA_VERSION) \ + install +endef + + $(eval $(call BuildPackage,luasocket)) +$(eval $(call BuildPackage,luasocket5.3)) diff --git a/lang/luasocket/patches/0001-Add-interface-support.patch b/lang/luasocket/patches/0001-Add-interface-support.patch index 3be42ed5..00c27996 100644 --- a/lang/luasocket/patches/0001-Add-interface-support.patch +++ b/lang/luasocket/patches/0001-Add-interface-support.patch @@ -18,7 +18,7 @@ new file mode 100644 index 0000000..db231aa --- /dev/null +++ b/src/if.c -@@ -0,0 +1,113 @@ +@@ -0,0 +1,117 @@ +/* + * $Id: if.c $ + * @@ -55,7 +55,11 @@ index 0000000..db231aa +{ + lua_pushstring(L, "iface"); + lua_newtable(L); ++#if LUA_VERSION_NUM < 503 + luaL_openlib(L, NULL, func, 0); ++#else ++ luaL_setfuncs(L, func, 0); ++#endif + lua_settable(L, -3); + return 0; +} @@ -169,7 +173,7 @@ diff --git a/src/luasocket.c b/src/luasocket.c index e6ee747..85d41a6 100644 --- a/src/luasocket.c +++ b/src/luasocket.c -@@ -31,6 +31,7 @@ +@@ -21,6 +21,7 @@ #include "tcp.h" #include "udp.h" #include "select.h" @@ -177,7 +181,7 @@ index e6ee747..85d41a6 100644 /*-------------------------------------------------------------------------*\ * Internal function prototypes -@@ -51,6 +52,7 @@ static const luaL_Reg mod[] = { +@@ -41,6 +42,7 @@ static const luaL_Reg mod[] = { {"tcp", tcp_open}, {"udp", udp_open}, {"select", select_open}, @@ -189,15 +193,16 @@ diff --git a/src/makefile b/src/makefile index 8d3521e..09d4882 100644 --- a/src/makefile +++ b/src/makefile -@@ -262,6 +262,7 @@ SOCKET_OBJS= \ - auxiliar.$(O) \ + +@@ -303,6 +303,7 @@ SOCKET_OBJS= \ + compat.$(O) \ options.$(O) \ inet.$(O) \ + if.$(O) \ $(SOCKET) \ except.$(O) \ select.$(O) \ -@@ -387,6 +388,7 @@ auxiliar.$(O): auxiliar.c auxiliar.h +@@ -440,6 +441,7 @@ auxiliar.$(O): auxiliar.c auxiliar.h buffer.$(O): buffer.c buffer.h io.h timeout.h except.$(O): except.c except.h inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h @@ -209,17 +214,19 @@ diff --git a/src/options.c b/src/options.c index 8ac2a14..1c73e6f 100644 --- a/src/options.c +++ b/src/options.c -@@ -3,6 +3,9 @@ - * LuaSocket toolkit - \*=========================================================================*/ - #include +@@ -7,7 +7,10 @@ + #include "options.h" + #include "inet.h" + #include +- +#include +#include +#include - - #include "lauxlib.h" - -@@ -285,6 +288,12 @@ static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name) ++ + /*=========================================================================*\ + * Internal functions prototypes + \*=========================================================================*/ +@@ -388,6 +391,12 @@ static int opt_ip6_setmembership(lua_Sta if (!lua_isnil(L, -1)) { if (lua_isnumber(L, -1)) { val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1); @@ -232,6 +239,5 @@ index 8ac2a14..1c73e6f 100644 } else luaL_argerror(L, -1, "number 'interface' field expected"); } --- +-- 1.8.4.rc3 - diff --git a/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch b/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch index c3bf949c..c759da10 100644 --- a/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch +++ b/lang/luasocket/patches/0301-Fix-mpc85xx-build.patch @@ -1,6 +1,6 @@ --- a/src/makefile +++ b/src/makefile -@@ -345,18 +345,18 @@ none: +@@ -397,18 +398,18 @@ none: all: $(SOCKET_SO) $(MIME_SO) $(SOCKET_SO): $(SOCKET_OBJS) @@ -21,5 +21,5 @@ - $(LD) $(SERIAL_OBJS) $(LDFLAGS)$@ + $(CC) $(SERIAL_OBJS) $(LDFLAGS)$@ - install: + install: $(INSTALL_DIR) $(INSTALL_TOP_LDIR) diff --git a/lang/luasocket/patches/040-remove-fpic-and-warnings.patch b/lang/luasocket/patches/040-remove-fpic-and-warnings.patch new file mode 100644 index 00000000..647997aa --- /dev/null +++ b/lang/luasocket/patches/040-remove-fpic-and-warnings.patch @@ -0,0 +1,14 @@ +--- a/src/makefile ++++ b/src/makefile +@@ -174,9 +174,8 @@ SO_linux=so + O_linux=o + CC_linux=gcc + DEF_linux=-DLUASOCKET_$(DEBUG) +-CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ +- -Wimplicit -O2 -ggdb3 -fpic +-LDFLAGS_linux=-O -shared -fpic -o ++CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -O2 ++LDFLAGS_linux=-O -shared -o + LD_linux=gcc + SOCKET_linux=usocket.o + diff --git a/lang/luasql/Makefile b/lang/luasql/Makefile index 3f904f8c..baea0c16 100644 --- a/lang/luasql/Makefile +++ b/lang/luasql/Makefile @@ -8,21 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luasql -PKG_VERSION:=2.3.0 +PKG_VERSION:=2.4.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=b6251065656bf3e066d90d492dd06eec2c2cc76ab4b94187ce3ed9620d41f741 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/keplerproject/luasql.git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/keplerproject/luasql/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=db2458a8c8c5f3bc717e4030fe2878f1ad8d71e437ec6149c381eebad5d525c5 +PKG_MAINTAINER:= PKG_LICENSE:=MIT PKG_LICENSE_FILES:=docs/us/license.html -PKG_MAINTAINER:=Nicolas Thill - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk @@ -31,7 +26,7 @@ define Package/luasql/Default SECTION:=lang CATEGORY:=Languages TITLE:=Lua SQL binding - URL:=http://keplerproject.github.io/luasql/ + URL:=https://keplerproject.github.io/luasql/ DEPENDS:= +lua endef @@ -86,24 +81,21 @@ TARGET_CFLAGS += $(FPIC) -std=gnu99 TARGET_CPPFLAGS += -DLUA_USE_LINUX ifeq ($(BUILD_VARIANT),mysql) - TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/mysql - TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz + MAKE_FLAGS += DRIVER_INCS_mysql='-I$(STAGING_DIR)/usr/include/mysql' \ + DRIVER_LIBS_mysql='$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz' endif ifeq ($(BUILD_VARIANT),postgres) - TARGET_LDFLAGS += -lpq + MAKE_FLAGS += DRIVER_LIBS_postgres='$(TARGET_LDFLAGS) -lpq' endif ifeq ($(BUILD_VARIANT),sqlite3) - TARGET_LDFLAGS += -lsqlite3 -lpthread + MAKE_FLAGS += DRIVER_LIBS_sqlite='$(TARGET_LDFLAGS) -lsqlite3 -lpthread' endif MAKE_FLAGS += \ - T="$(BUILD_VARIANT)" \ - DRIVER_INCS="$(TARGET_CPPFLAGS)" \ - DRIVER_LIBS="$(TARGET_LDFLAGS)" \ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - lib + $(BUILD_VARIANT) define Package/Install/Default $(INSTALL_DIR) $(1)/usr/lib/lua/luasql diff --git a/lang/luasrcdiet/Makefile b/lang/luasrcdiet/Makefile new file mode 100644 index 00000000..3ee918ec --- /dev/null +++ b/lang/luasrcdiet/Makefile @@ -0,0 +1,58 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=luasrcdiet +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Matthias Schiffer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYRIGHT + +PKG_SOURCE_URL:=https://github.com/jirutka/luasrcdiet.git +PKG_SOURCE_VERSION:=f138fc9359821d9201cd6b57cfa2fcbed5b9af97 +PKG_SOURCE_PROTO:=git +PKG_MIRROR_HASH:=d4e9c396312ef3d91d86ea192569f03875459432994bc822dbdbbd0a34e306c5 + +HOST_BUILD_DEPENDS:=lua/host + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/luasrcdiet + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=luasrcdiet + URL:=https://github.com/jirutka/luasrcdiet + DEPENDS:=+lua + PKGARCH:=all +endef + +define Package/luasrcdiet/description + Compresses Lua source code by removing unnecessary characters +endef + +define Build/Compile +endef + +define Package/luasrcdiet/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/luasrcdiet $(1)/usr/bin/luasrcdiet + + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_BUILD_DIR)/luasrcdiet $(1)/usr/lib/lua/ +endef + +define Host/Compile +endef + +define Host/Install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/luasrcdiet $(1)/bin/ + + $(INSTALL_DIR) $(1)/lib/lua/5.1 + $(CP) $(HOST_BUILD_DIR)/luasrcdiet $(1)/lib/lua/5.1/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,luasrcdiet)) diff --git a/lang/luv/Makefile b/lang/luv/Makefile index a0057f1c..82388552 100644 --- a/lang/luv/Makefile +++ b/lang/luv/Makefile @@ -1,18 +1,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luv +PKG_VERSION:=1.22.0-1 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/luvit/luv.git -PKG_SOURCE_VERSION:=1.9.1-1 -PKG_SOURCE_DATE:=2016-12-16 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/luvit/luv/releases/download/$(PKG_VERSION) +PKG_HASH:=27886acb3d3f531a3d6ca70360d2593ddf1a8d4daf94ca3beea14d9381227ff7 +PKG_MAINTAINER:=Morteza Milani PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE -PKG_USE_MIPS16:=0 - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -22,7 +21,6 @@ define Package/luv CATEGORY:=Languages TITLE:=Luv URL:=https://github.com/luvit/luv - MAINTAINER:=Morteza Milani DEPENDS:=+libuv +!LUV_USE_LUAJIT_ENGINE:lua endef diff --git a/lang/lzmq/Makefile b/lang/lzmq/Makefile index 8ac4453a..210b88ed 100644 --- a/lang/lzmq/Makefile +++ b/lang/lzmq/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lzmq -PKG_VERSION:=0.4.3 +PKG_VERSION:=0.4.4 PKG_RELEASE:=1 PKG_MAINTAINER:=Dirk Chang PKG_LICENSE:=MIT PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=51ec00117b0570db82b1eba7b62e95d7e98c880a028584b195a98b433dd8edd1 +PKG_HASH:=cf70200045b8bcb0e929c338ad421b6a291cf1038053532888dc201af3224d8b include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -25,7 +25,7 @@ define Package/lzmq SECTION:=lang CATEGORY:=Languages TITLE:=Lua ZeroMQ binding - URL:=https://github.com/moteus/lzmq/ + URL:=https://github.com/zeromq/lzmq DEPENDS:= +lua +libzmq endef diff --git a/lang/node-hid/Makefile b/lang/node-hid/Makefile index c5b24de5..6946e4dd 100644 --- a/lang/node-hid/Makefile +++ b/lang/node-hid/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NPM_NAME:=node-hid PKG_NAME:=$(PKG_NPM_NAME) -PKG_VERSION:=1.1.0 +PKG_VERSION:=1.2.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=a128331388b9a0ac443fb55493e37a9b8043f34699c60453f395ad37b7d5f145 +PKG_HASH:=b4a3e4c5a42dcdb4b6ef3ceeec18ed073322e8bca4160b95ef1671b062796bde PKG_BUILD_DEPENDS:=node/host PKG_USE_MIPS16:=0 diff --git a/lang/node-homebridge/Makefile b/lang/node-homebridge/Makefile index 683556b9..3ceb0df8 100644 --- a/lang/node-homebridge/Makefile +++ b/lang/node-homebridge/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NPM_NAME:=homebridge PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.4.50 +PKG_VERSION:=0.4.53 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=85541254b44c0b70e38ed5e49a9c6a68a20467b99fe0ff3703ca9fc422ce879c +PKG_HASH:=c616c004451a2d508b810927488abece965a0c099f6d8bf13bbfc9b647e886bb PKG_BUILD_DEPENDS:=node/host PKG_USE_MIPS16:=0 diff --git a/lang/node-javascript-obfuscator/Makefile b/lang/node-javascript-obfuscator/Makefile index 6432f7d0..ef374fd8 100644 --- a/lang/node-javascript-obfuscator/Makefile +++ b/lang/node-javascript-obfuscator/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NPM_NAME:=javascript-obfuscator PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.24.0 +PKG_VERSION:=1.2.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=2312220a65b8d03195837bb8e2555115c9c9910eb08d3077297f5b9133570c26 +PKG_HASH:=adac10d3afe244833b74e6c965b7631a2a4417879e022fc4b7beea8be60ca86b PKG_BUILD_DEPENDS:=node/host HOST_BUILD_PARALLEL:=1 diff --git a/lang/node-serialport-bindings/Makefile b/lang/node-serialport-bindings/Makefile index 4a6e7522..8a5583c9 100644 --- a/lang/node-serialport-bindings/Makefile +++ b/lang/node-serialport-bindings/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NPM_SCOPE:=serialport PKG_NPM_NAME:=bindings PKG_NAME:=node-$(PKG_NPM_SCOPE)-$(PKG_NPM_NAME) -PKG_VERSION:=8.0.4 +PKG_VERSION:=8.0.7 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=https://registry.npmjs.org/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/-/ -PKG_HASH:=fd48dba7fd4de42d9908e33c21cd028345c3d481eff668511966313cfac61695 +PKG_HASH:=b555aabf8f47a914589e5e625c87b1ec6f0ce63f284cf59d5bf18c934ac988c4 PKG_BUILD_DEPENDS:=node/host PKG_USE_MIPS16:=0 diff --git a/lang/node-serialport/Makefile b/lang/node-serialport/Makefile index 7030f3b1..1d629731 100644 --- a/lang/node-serialport/Makefile +++ b/lang/node-serialport/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NPM_NAME:=serialport PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=8.0.5 +PKG_VERSION:=8.0.7 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_HASH:=d06e67edcc2d2c6489d8634b3bcef46325ecee0b9f8d9243af3518505608213e +PKG_HASH:=b70000ad4560dbd7170e657554d6302024a340ae868e1db0fc672aaab2efbd9c PKG_BUILD_DEPENDS:=node/host PKG_USE_MIPS16:=0 diff --git a/lang/node-serialport/patches/001-turn_off_depends.patch b/lang/node-serialport/patches/001-turn_off_depends.patch index 87a6828d..9c4ebf84 100644 --- a/lang/node-serialport/patches/001-turn_off_depends.patch +++ b/lang/node-serialport/patches/001-turn_off_depends.patch @@ -3,8 +3,8 @@ @@ -46,7 +46,6 @@ ], "dependencies": { - "@serialport/binding-mock": "^8.0.4", -- "@serialport/bindings": "^8.0.4", - "@serialport/parser-byte-length": "^8.0.4", - "@serialport/parser-cctalk": "^8.0.4", - "@serialport/parser-delimiter": "^8.0.4", + "@serialport/binding-mock": "^8.0.6", +- "@serialport/bindings": "^8.0.7", + "@serialport/parser-byte-length": "^8.0.6", + "@serialport/parser-cctalk": "^8.0.6", + "@serialport/parser-delimiter": "^8.0.6", diff --git a/lang/node/Makefile b/lang/node/Makefile index 87a22b5d..5b368c13 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=node -PKG_VERSION:=v12.15.0 -PKG_RELEASE:=1 +PKG_VERSION:=v12.16.1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION) -PKG_HASH:=d2fb4fa80ccf321570552b0a6e6b5f2aedeb281a8450207b057cf54c54d5a81b +PKG_HASH:=0a95845ba02c46102b5671d0c5732460073f2d397488337e18d1fc30146d412d PKG_MAINTAINER:=John Crispin , Adrian Panella PKG_LICENSE:=MIT @@ -47,7 +47,11 @@ define Package/node/description Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world. - *** Requires GCC/G++ Multilib on host system to build 32-bit target *** + *** The following preparations must be made on the host side. *** + 1. gcc 6.3 or higher is required. + 2. To build a 32-bit target, gcc-multilib, g++-multilib are required. + 3. Requires libatomic package. (If necessary, install the 32-bit library at the same time.) + ex) sudo apt-get install gcc-multilib g++-multilib endef define Package/node-npm @@ -93,7 +97,7 @@ endif MAKE_VARS+= \ DESTCPU=$(NODEJS_CPU) \ - LD_LIBRARY_PATH=$(STAGING_DIR_HOSTPKG)/share/icu/65.1/lib + LD_LIBRARY_PATH=$(STAGING_DIR_HOSTPKG)/share/icu/current/lib CONFIGURE_VARS:= \ CC="$(TARGET_CC) $(TARGET_OPTIMIZATION)" \ diff --git a/lang/node/patches/003-path.patch b/lang/node/patches/003-path.patch index 987c866f..63fe78b6 100644 --- a/lang/node/patches/003-path.patch +++ b/lang/node/patches/003-path.patch @@ -1,6 +1,6 @@ --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js -@@ -1095,7 +1095,8 @@ +@@ -1260,7 +1260,8 @@ path.resolve(process.execPath, '..') : path.resolve(process.execPath, '..', '..'); diff --git a/lang/node/patches/004-musl_support.patch b/lang/node/patches/004-musl_support.patch index 4d197ff4..ea7baff1 100644 --- a/lang/node/patches/004-musl_support.patch +++ b/lang/node/patches/004-musl_support.patch @@ -22,7 +22,7 @@ diff -urN a/deps/v8/src/base/platform/condition-variable.cc b/deps/v8/src/base/p diff -urN a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc --- a/deps/v8/src/base/platform/platform-posix.cc 2019-09-05 00:36:23.000000000 +0900 +++ b/deps/v8/src/base/platform/platform-posix.cc 2019-09-12 15:10:01.063792083 +0900 -@@ -773,7 +773,7 @@ +@@ -772,7 +772,7 @@ #if V8_OS_MACOSX // Default on Mac OS X is 512kB -- bump up to 1MB stack_size = 1 * 1024 * 1024; diff --git a/lang/node/patches/006-mips64_support.patch b/lang/node/patches/006-mips64_support.patch index 01fd2ace..5bd1b839 100644 --- a/lang/node/patches/006-mips64_support.patch +++ b/lang/node/patches/006-mips64_support.patch @@ -9,7 +9,7 @@ 'ppc64', 'x32','x64', 'x86', 'x86_64', 's390x') valid_arm_float_abi = ('soft', 'softfp', 'hard') valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon') -@@ -883,6 +883,9 @@ +@@ -896,6 +896,9 @@ if rtn == 'mipsel' and '_LP64' in k: rtn = 'mips64el' @@ -19,7 +19,7 @@ return rtn -@@ -981,7 +984,7 @@ +@@ -1001,7 +1004,7 @@ if target_arch == 'arm': configure_arm(o) diff --git a/lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch b/lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch index 7e87cee8..36ef76f1 100644 --- a/lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch +++ b/lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch @@ -34,7 +34,7 @@ '<@(icu_src_genccode)', --- a/tools/v8_gypfiles/v8.gyp 2019-06-27 19:12:20.000000000 +0900 +++ b/tools/v8_gypfiles/v8.gyp 2019-07-01 14:40:48.292020880 +0900 -@@ -1258,6 +1258,7 @@ +@@ -1265,6 +1265,7 @@ { 'target_name': 'bytecode_builtins_list_generator', 'type': 'executable', @@ -42,16 +42,16 @@ 'conditions': [ ['want_separate_host_toolset', { 'toolsets': ['host'], -@@ -1281,6 +1282,8 @@ +@@ -1288,6 +1289,8 @@ { 'target_name': 'mksnapshot', 'type': 'executable', + 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], -+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/65.1/lib' ], ++ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/current/lib' ], 'dependencies': [ 'v8_base_without_compiler', 'v8_compiler_for_mksnapshot', -@@ -1303,6 +1306,7 @@ +@@ -1310,6 +1313,7 @@ { 'target_name': 'torque', 'type': 'executable', @@ -59,7 +59,7 @@ 'dependencies': [ 'torque_base', # "build/win:default_exe_manifest", -@@ -1341,6 +1345,7 @@ +@@ -1348,6 +1352,7 @@ { 'target_name': 'torque-language-server', 'type': 'executable', @@ -67,12 +67,12 @@ 'conditions': [ ['want_separate_host_toolset', { 'toolsets': ['host'], -@@ -1368,6 +1373,8 @@ +@@ -1375,6 +1380,8 @@ { 'target_name': 'gen-regexp-special-case', 'type': 'executable', + 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], -+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/65.1/lib' ], ++ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/current/lib' ], 'dependencies': [ 'v8_libbase', # "build/win:default_exe_manifest", diff --git a/lang/node/patches/999-fix_missing_llhttp_depends.patch b/lang/node/patches/999-fix_missing_llhttp_depends.patch index 1ef0bd69..bd6c16f2 100644 --- a/lang/node/patches/999-fix_missing_llhttp_depends.patch +++ b/lang/node/patches/999-fix_missing_llhttp_depends.patch @@ -1,7 +1,7 @@ diff -urN a/node.gypi b/node.gypi --- a/node.gypi 2019-09-05 00:36:25.000000000 +0900 +++ b/node.gypi 2019-09-13 09:57:54.073191914 +0900 -@@ -142,6 +142,10 @@ +@@ -149,6 +149,10 @@ 'deps/http_parser/http_parser.gyp:http_parser', 'deps/llhttp/llhttp.gyp:llhttp' ], diff --git a/lang/node/patches/999-v8_this_build_method_will_be_deprecated.patch b/lang/node/patches/999-v8_this_build_method_will_be_deprecated.patch index 406b3403..ca81a5c5 100644 --- a/lang/node/patches/999-v8_this_build_method_will_be_deprecated.patch +++ b/lang/node/patches/999-v8_this_build_method_will_be_deprecated.patch @@ -1,7 +1,7 @@ diff -urN a/configure.py b/configure.py --- a/configure.py 2019-09-05 00:36:21.000000000 +0900 +++ b/configure.py 2019-09-27 11:49:55.445800884 +0900 -@@ -1202,6 +1202,25 @@ +@@ -1223,6 +1223,25 @@ options.build_v8_with_gn = FetchDeps(v8_path) o['variables']['build_v8_with_gn'] = b(options.build_v8_with_gn) @@ -18,16 +18,16 @@ diff -urN a/configure.py b/configure.py + o['variables']['v8_enable_embedded_builtins'] = 0 + elif target_arch == 'x64': + if options.with_intl in (None, 'none'): -+ o['variables']['v8_enable_embedded_builtins'] = 0 ++ o['variables']['v8_enable_embedded_builtins'] = 1 + elif target_arch == 'ia32': + if options.with_intl in (None, 'none'): -+ o['variables']['v8_enable_embedded_builtins'] = 1 ++ o['variables']['v8_use_snapshot'] = 'false' + else: + o['variables']['v8_enable_embedded_builtins'] = 0 def configure_openssl(o): variables = o['variables'] -@@ -1632,6 +1651,7 @@ +@@ -1654,6 +1673,7 @@ configure_intl(output) configure_static(output) configure_inspector(output) diff --git a/lang/perl-authen-sasl-xs/Makefile b/lang/perl-authen-sasl-xs/Makefile index e7e0083f..1201299b 100644 --- a/lang/perl-authen-sasl-xs/Makefile +++ b/lang/perl-authen-sasl-xs/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-authen-sasl-xs PKG_VERSION:=1.00 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_NAME:=Authen-SASL-XS PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GB/GBARR/ PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz PKG_HASH:=1b0eaa0e7ac3a45857147d837e3d34c80c6eca1d9fdcb826a213c2a105454234 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Philip Prindeville PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_SOURCE_NAME)-$(PKG_VERSION) diff --git a/lang/perl-authen-sasl/Makefile b/lang/perl-authen-sasl/Makefile index 434ec088..ed1fae12 100644 --- a/lang/perl-authen-sasl/Makefile +++ b/lang/perl-authen-sasl/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-authen-sasl PKG_VERSION:=2.16 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_NAME:=Authen-SASL PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GB/GBARR/ PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz PKG_HASH:=6614fa7518f094f853741b63c73f3627168c5d3aca89b1d02b1016dc32854e09 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Philip Prindeville PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_SOURCE_NAME)-$(PKG_VERSION) diff --git a/lang/perl-cgi/Makefile b/lang/perl-cgi/Makefile index 54dee23e..e060c188 100644 --- a/lang/perl-cgi/Makefile +++ b/lang/perl-cgi/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-cgi -PKG_VERSION:=4.38 +PKG_VERSION:=4.48 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/L/LE/LEEJO PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz -PKG_HASH:=8c58f4a529bb92a914b22b7e64c5e31185c9854a4070a6dfad44fe5cc248e7d4 +PKG_HASH:=102cd7562983b85e8354ebcbb3be94a35f7f6706b2b49fdb790135da4d1d55d2 +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION) -PKG_LICENSE:=GPL Artistic-2.0 PKG_MAINTAINER:=Marcel Denia , \ Philip Prindeville - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION) +PKG_LICENSE:=Artistic-2.0 +PKG_LICENSE_FILES:=LICENSE # don't strip comments because that will mangle this module PKG_LEAVE_COMMENTS:=1 @@ -32,7 +32,7 @@ define Package/perl-cgi SECTION:=lang CATEGORY:=Languages TITLE:=Handle Common Gateway Interface requests and responses - URL:=http://search.cpan.org/dist/CGI/ + URL:=https://search.cpan.org/dist/CGI/ DEPENDS:=perl +perl-html-parser +perlbase-base +perlbase-config +perlbase-encode +perlbase-essential +perlbase-file +perlbase-if +perlbase-utf8 endef diff --git a/lang/perl-compress-bzip2/Makefile b/lang/perl-compress-bzip2/Makefile index 1d9342d0..123ce95f 100644 --- a/lang/perl-compress-bzip2/Makefile +++ b/lang/perl-compress-bzip2/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-compress-bzip2 -PKG_VERSION:=2.24 +PKG_VERSION:=2.26 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/R/RU/RURBAN/ PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz -PKG_HASH:=7956ac627fb373fae6effede3d21b3157122800224491b124afdd7bb426c8c3f - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/R/RU/RURBAN/ +PKG_HASH:=5132f0c5f377a54d77ee36d332aa0ece585c22a40f2c31f2619e40262f5c4f0c PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Compress-Bzip2-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=COPYING + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-compress-bzip2 SECTION:=lang CATEGORY:=Languages TITLE:=Perl interface to bzip2 compression library - URL:=http://search.cpan.org/dist/Compress-Bzip2/ + URL:=https://search.cpan.org/dist/Compress-Bzip2/ DEPENDS:=perl +libbz2 +perlbase-autoloader +perlbase-config +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-getopt +perlbase-test +perlbase-xsloader endef diff --git a/lang/perl-dbi/Makefile b/lang/perl-dbi/Makefile index eef2b345..d60a034b 100644 --- a/lang/perl-dbi/Makefile +++ b/lang/perl-dbi/Makefile @@ -8,19 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-dbi -PKG_VERSION:=1.634 +PKG_VERSION:=1.643 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/ PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz -PKG_HASH:=250712f385864818abfba409420d16d9ee61f1cc73ac85159d054a5ee86d1450 +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/T/TI/TIMB/ +PKG_HASH:=8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/perl/DBI-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/DBI-$(PKG_VERSION) - HOST_BUILD_DEPENDS:=perl/host include $(INCLUDE_DIR)/package.mk @@ -32,7 +32,7 @@ define Package/perl-dbi SECTION:=lang CATEGORY:=Languages TITLE:=Database independent interface for Perl - URL:=http://search.cpan.org/dist/DBI/ + URL:=https://search.cpan.org/dist/DBI/ DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-data +perlbase-dynaloader +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-io +perlbase-ipc +perlbase-scalar +perlbase-storable +perlbase-symbol +perlbase-tie +perlbase-universal +perlbase-utf8 endef diff --git a/lang/perl-device-serialport/Makefile b/lang/perl-device-serialport/Makefile index 97b46e85..505d356c 100644 --- a/lang/perl-device-serialport/Makefile +++ b/lang/perl-device-serialport/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-device-serialport PKG_VERSION:=1.04 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CO/COOK/ PKG_SOURCE:=Device-SerialPort-$(PKG_VERSION).tar.gz PKG_HASH:=d392567cb39b4ea606c0e0acafd8ed72320311b995336ece5fcefcf9b150e9d7 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Paul Oranje PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-SerialPort-$(PKG_VERSION) diff --git a/lang/perl-device-usb/Makefile b/lang/perl-device-usb/Makefile index 754ed074..fdee5cc8 100644 --- a/lang/perl-device-usb/Makefile +++ b/lang/perl-device-usb/Makefile @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-device-usb -PKG_VERSION:=0.36 +PKG_VERSION:=0.38 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWADEJ/ +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/G/GW/GWADEJ/ PKG_SOURCE:=Device-USB-$(PKG_VERSION).tar.gz -PKG_HASH:=fac2eb4f9e8db08b46d734ba8a2076598f974c274a91b248613fcecd7c9fc175 +PKG_HASH:=f0c36379db4913406dc9bd546a6cfd4da20d58f7c2cc085893a2fe67a43465dc -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-USB-$(PKG_VERSION) PKG_BUILD_DEPENDS:=perl-inline-c/host @@ -29,7 +29,7 @@ define Package/perl-device-usb SECTION:=lang CATEGORY:=Languages TITLE:=libusb library wrapper - URL:=http://search.cpan.org/dist/Device-USB/ + URL:=https://search.cpan.org/dist/Device-USB/ DEPENDS:=perl +libusb-compat +perl-inline +perl-inline-c +perlbase-essential +perlbase-test endef diff --git a/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff b/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.patch similarity index 100% rename from lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff rename to lang/perl-device-usb/patches/110-just_assume_libusb_is_there.patch diff --git a/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch b/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch index 55e5cc3a..9ce0ba32 100644 --- a/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch +++ b/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch @@ -3,12 +3,12 @@ @@ -15,6 +15,7 @@ use Inline ( ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ), NAME => 'Device::USB', - VERSION => '0.36', + VERSION => '0.38', + PREFIX => 'deviceusb_', ); Inline->init(); -@@ -540,74 +541,74 @@ unsigned DeviceUSBDebugLevel() +@@ -657,74 +658,74 @@ unsigned DeviceUSBDebugLevel() return debugLevel; } @@ -98,7 +98,7 @@ } #if LIBUSB_HAS_GET_DRIVER_NP ret = usb_get_driver_np((usb_dev_handle *)dev, interface, name, namelen); -@@ -618,11 +619,11 @@ int libusb_get_driver_np(void *dev, int +@@ -735,11 +736,11 @@ int libusb_get_driver_np(void *dev, int interface, char *name, unsigned int name #endif } @@ -112,7 +112,7 @@ } #if LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP return usb_detach_kernel_driver_np((usb_dev_handle *)dev, interface); -@@ -631,25 +632,25 @@ int libusb_detach_kernel_driver_np(void +@@ -748,25 +749,25 @@ int libusb_detach_kernel_driver_np(void *dev, int interface) #endif } @@ -143,7 +143,7 @@ { int i = 0; int retval = 0; -@@ -658,7 +659,7 @@ void libusb_control_msg(void *dev, int r +@@ -775,7 +776,7 @@ void libusb_control_msg(void *dev, int requesttype, int request, int value, int if(DeviceUSBDebugLevel()) { @@ -152,7 +152,7 @@ requesttype, request, value, index, bytes, size, timeout ); /* maybe need to add support for printing the bytes string. */ -@@ -691,54 +692,54 @@ void libusb_control_msg(void *dev, int r +@@ -808,54 +809,54 @@ void libusb_control_msg(void *dev, int requesttype, int request, int value, int Inline_Stack_Done; } diff --git a/lang/perl-encode-locale/Makefile b/lang/perl-encode-locale/Makefile index 48eafa81..2f173f91 100644 --- a/lang/perl-encode-locale/Makefile +++ b/lang/perl-encode-locale/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-encode-locale PKG_VERSION:=1.05 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=Encode-Locale-$(PKG_VERSION).tar.gz PKG_HASH:=176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Encode-Locale-$(PKG_VERSION) diff --git a/lang/perl-file-listing/Makefile b/lang/perl-file-listing/Makefile index 2725cedb..63a6a7f3 100644 --- a/lang/perl-file-listing/Makefile +++ b/lang/perl-file-listing/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-file-listing PKG_VERSION:=6.04 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=File-Listing-$(PKG_VERSION).tar.gz PKG_HASH:=1e0050fcd6789a2179ec0db282bf1e90fb92be35d1171588bd9c47d52d959cf5 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-Listing-$(PKG_VERSION) diff --git a/lang/perl-file-rsyncp/Makefile b/lang/perl-file-rsyncp/Makefile new file mode 100644 index 00000000..05c418b6 --- /dev/null +++ b/lang/perl-file-rsyncp/Makefile @@ -0,0 +1,57 @@ +# Copyright (C) 2018 OpenWrt + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-file-rsyncp +PKG_VERSION:=0.74 +PKG_RELEASE:=1 + +PKG_SOURCE:=File-RsyncP-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/C/CB/CBARRATT/ +PKG_HASH:=ba4df5f9b0db6c9d86a6c5cf9861cf00d17b18e77cfa028e7a9157c0015a5aa3 +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-RsyncP-$(PKG_VERSION) + +PKG_MAINTAINER:=Carsten Wolff +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=LICENSE README + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-file-rsyncp + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl Rsync client + URL:=http://search.cpan.org/~cbarratt/File-RsyncP/ + DEPENDS:=perl +perlbase-autoloader +perlbase-socket +perlbase-getopt +perlbase-data +perlbase-config +perlbase-encode +perlbase-fcntl +perlbase-file +endef + +define Build/Configure + $(call perlmod/Configure,,) + $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/Digest) + $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/FileList) + $(call Build/Configure/Default,,rsync_cv_HAVE_LONGLONG=yes,FileList) +endef + +define Build/Compile + PERL5LIB=$(PERL_LIB) $(MAKE) -C $(PKG_BUILD_DIR)/Digest + PERL5LIB=$(PERL_LIB) $(MAKE) -C $(PKG_BUILD_DIR)/FileList + PERL5LIB=$(PERL_LIB) $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/perl-file-rsyncp/install + $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB)/File/RsyncP + $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/Digest + $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/FileList + $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/File/RsyncP.pm $(strip $(1))$(PERL_SITELIB)/File + $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/File/RsyncP/FileIO.pm $(strip $(1))$(PERL_SITELIB)/File/RsyncP + $(INSTALL_DATA) $(PKG_BUILD_DIR)/Digest/Digest.pm $(strip $(1))$(PERL_SITELIB)/File/RsyncP + $(INSTALL_DATA) $(PKG_BUILD_DIR)/FileList/FileList.pm $(strip $(1))$(PERL_SITELIB)/File/RsyncP + $(INSTALL_DATA) $(PKG_BUILD_DIR)/Digest/blib/lib/auto/File/RsyncP/Digest/autosplit.ix $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/Digest + $(INSTALL_DATA) $(PKG_BUILD_DIR)/Digest/blib/arch/auto/File/RsyncP/Digest/Digest.so $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/Digest + $(INSTALL_DATA) $(PKG_BUILD_DIR)/FileList/blib/lib/auto/File/RsyncP/FileList/autosplit.ix $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/FileList + $(INSTALL_DATA) $(PKG_BUILD_DIR)/FileList/blib/arch/auto/File/RsyncP/FileList/FileList.so $(strip $(1))$(PERL_SITELIB)/auto/File/RsyncP/FileList +endef + +$(eval $(call BuildPackage,perl-file-rsyncp)) diff --git a/lang/perl-file-rsyncp/patches/001-no-subdirs.patch b/lang/perl-file-rsyncp/patches/001-no-subdirs.patch new file mode 100644 index 00000000..65bb4277 --- /dev/null +++ b/lang/perl-file-rsyncp/patches/001-no-subdirs.patch @@ -0,0 +1,11 @@ +--- a/Makefile.PL 2010-07-25 22:50:02.000000000 +0200 ++++ b/Makefile.PL 2018-03-27 15:46:16.724000000 +0200 +@@ -8,7 +8,7 @@ + Getopt::Long => 2.24, # need OO interface + }, + 'PMLIBDIRS' => ['lib'], +- 'DIR' => ['Digest', 'FileList'], ++ 'DIR' => [], + ($] >= 5.005 ? ## Add these new keywords supported since 5.005 + (ABSTRACT_FROM => 'lib/File/RsyncP.pm', # retrieve abstract from module + AUTHOR => 'Craig Barratt ') diff --git a/lang/perl-file-sharedir-install/Makefile b/lang/perl-file-sharedir-install/Makefile index f37d41af..c1ab6a9e 100644 --- a/lang/perl-file-sharedir-install/Makefile +++ b/lang/perl-file-sharedir-install/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-file-sharedir-install -PKG_VERSION:=0.10 +PKG_VERSION:=0.13 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWYN PKG_SOURCE:=File-ShareDir-Install-$(PKG_VERSION).tar.gz -PKG_HASH:=708af71dec4dfb5a8cf9a5e863b566714c3f65f0a76722302de5a07ee202e6f7 +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/E/ET/ETHER +PKG_HASH:=45befdf0d95cbefe7c25a1daf293d85f780d6d2576146546e6828aad26e580f9 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/File-ShareDir-Install-$(PKG_VERSION) HOST_BUILD_DEPENDS:=perl/host @@ -31,7 +32,7 @@ define Package/perl-file-sharedir-install SECTION:=lang CATEGORY:=Languages TITLE:=Install read-only data files - URL:=http://search.cpan.org/dist/File-ShareDir-Install/ + URL:=https://search.cpan.org/dist/File-ShareDir-Install/ DEPENDS:=perl +perlbase-essential +perlbase-extutils +perlbase-file +perlbase-io endef diff --git a/lang/perl-html-form/Makefile b/lang/perl-html-form/Makefile index 022c3b7c..04cc0846 100644 --- a/lang/perl-html-form/Makefile +++ b/lang/perl-html-form/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-html-form -PKG_VERSION:=6.03 +PKG_VERSION:=6.07 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=HTML-Form-$(PKG_VERSION).tar.gz -PKG_HASH:=68c01d94f005d5ca9c4d55ad2a1bf3a8d034a5fc6db187d91a4c42f3fdc9fc36 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=7daa8c7eaff4005501c3431c8bf478d58bbee7b836f863581aa14afe1b4b6227 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Form-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-html-form SECTION:=lang CATEGORY:=Languages TITLE:=Class that represents an HTML form element - URL:=http://search.cpan.org/dist/HTML-Form/ + URL:=https://search.cpan.org/dist/HTML-Form/ DEPENDS:=perl +perl-html-parser +perl-http-message +perl-uri +perlbase-encode +perlbase-essential endef diff --git a/lang/perl-html-parser/Makefile b/lang/perl-html-parser/Makefile index c769ccc9..b000bea7 100644 --- a/lang/perl-html-parser/Makefile +++ b/lang/perl-html-parser/Makefile @@ -9,14 +9,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-html-parser PKG_VERSION:=3.72 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/ PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz PKG_HASH:=ec28c7e1d9e67c45eca197077f7cdc41ead1bb4c538c7f02a3296a4bb92f608b -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia +PKG_CPE_ID:=cpe:/a:derrick_oswald:html-parser PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Parser-$(PKG_VERSION) diff --git a/lang/perl-html-tagset/Makefile b/lang/perl-html-tagset/Makefile index 01410585..a2b6dcf5 100644 --- a/lang/perl-html-tagset/Makefile +++ b/lang/perl-html-tagset/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-html-tagset PKG_VERSION:=3.20 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETDANCE/ PKG_SOURCE:=HTML-Tagset-$(PKG_VERSION).tar.gz PKG_HASH:=adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tagset-$(PKG_VERSION) diff --git a/lang/perl-html-tree/Makefile b/lang/perl-html-tree/Makefile index 20839e62..eff72d92 100644 --- a/lang/perl-html-tree/Makefile +++ b/lang/perl-html-tree/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-html-tree PKG_VERSION:=3.23 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETEK/ PKG_SOURCE:=HTML-Tree-$(PKG_VERSION).tar.gz PKG_HASH:=f5175acf262f3710dce899796ea3e353049939400b100706d03df2f08803c8de -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tree-$(PKG_VERSION) diff --git a/lang/perl-http-cookies/Makefile b/lang/perl-http-cookies/Makefile index 712cfbd2..0bdaf135 100644 --- a/lang/perl-http-cookies/Makefile +++ b/lang/perl-http-cookies/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-http-cookies -PKG_VERSION:=6.01 +PKG_VERSION:=6.08 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=HTTP-Cookies-$(PKG_VERSION).tar.gz -PKG_HASH:=f5d3ade383ce6389d80cb0d0356b643af80435bb036afd8edce335215ec5eb20 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=49ebb73576eb41063c04bc079477df094496deec805ae033f3be338c23c3af59 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Cookies-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-http-cookies SECTION:=lang CATEGORY:=Languages TITLE:=HTTP cookie jars - URL:=http://search.cpan.org/dist/HTTP-Cookies/ + URL:=https://search.cpan.org/dist/HTTP-Cookies/ DEPENDS:=perl +perl-http-date +perl-http-message +perlbase-essential +perlbase-time endef diff --git a/lang/perl-http-daemon/Makefile b/lang/perl-http-daemon/Makefile index ed9d2925..fbecb42b 100644 --- a/lang/perl-http-daemon/Makefile +++ b/lang/perl-http-daemon/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-http-daemon -PKG_VERSION:=6.01 +PKG_VERSION:=6.06 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=HTTP-Daemon-$(PKG_VERSION).tar.gz -PKG_HASH:=43fd867742701a3f9fcc7bd59838ab72c6490c0ebaf66901068ec6997514adc2 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=fc03a161b54553f766457a4267e7066767f54ad01cacfe9a91d7caa2a0319bad PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Daemon-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENCE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk diff --git a/lang/perl-http-date/Makefile b/lang/perl-http-date/Makefile index 4801ac1f..916a0b86 100644 --- a/lang/perl-http-date/Makefile +++ b/lang/perl-http-date/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-http-date -PKG_VERSION:=6.02 -PKG_RELEASE:=1 +PKG_VERSION:=6.05 +PKG_RELEASE:=2 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=HTTP-Date-$(PKG_VERSION).tar.gz -PKG_HASH:=e8b9941da0f9f0c9c01068401a5e81341f0e3707d1c754f8e11f42a7e629e333 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=365d6294dfbd37ebc51def8b65b81eb79b3934ecbc95a2ec2d4d827efe6a922b PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Date-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk diff --git a/lang/perl-http-message/Makefile b/lang/perl-http-message/Makefile index c6a2469d..cc0d965d 100644 --- a/lang/perl-http-message/Makefile +++ b/lang/perl-http-message/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-http-message -PKG_VERSION:=6.11 +PKG_VERSION:=6.22 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER PKG_SOURCE:=HTTP-Message-$(PKG_VERSION).tar.gz -PKG_HASH:=e7b368077ae6a188d99920411d8f52a8e5acfb39574d4f5c24f46fd22533d81b - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=970efd151b81c95831d2a5f9e117f8032b63a1768cd2cd3f092ad634c85175c3 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Message-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-http-message SECTION:=lang CATEGORY:=Languages TITLE:=HTTP style messages - URL:=http://search.cpan.org/dist/HTTP-Message/ + URL:=https://search.cpan.org/dist/HTTP-Message/ DEPENDS:=perl +perl-encode-locale +perl-http-date +perl-io-html +perl-lwp-mediatypes +perl-uri +perlbase-base +perlbase-compress +perlbase-encode +perlbase-essential +perlbase-io +perlbase-mime endef diff --git a/lang/perl-http-negotiate/Makefile b/lang/perl-http-negotiate/Makefile index 6503e394..dbb5e185 100644 --- a/lang/perl-http-negotiate/Makefile +++ b/lang/perl-http-negotiate/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-http-negotiate PKG_VERSION:=6.01 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=HTTP-Negotiate-$(PKG_VERSION).tar.gz PKG_HASH:=1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Negotiate-$(PKG_VERSION) diff --git a/lang/perl-http-server-simple/Makefile b/lang/perl-http-server-simple/Makefile index aab1dfd6..26600a79 100644 --- a/lang/perl-http-server-simple/Makefile +++ b/lang/perl-http-server-simple/Makefile @@ -8,18 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-http-server-simple -PKG_VERSION:=0.51 +PKG_VERSION:=0.52 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/B/BP/BPS PKG_SOURCE:=HTTP-Server-Simple-$(PKG_VERSION).tar.gz -PKG_HASH:=b9dc5c9f12c16ca39a96f0ede1e27a18a5594274ff8f583000788a7fca136dfb - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/B/BP/BPS +PKG_HASH:=d8939fa4f12bd6b8c043537fd0bf96b055ac3686b9cdd9fa773dca6ae679cb4c PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Server-Simple-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +27,7 @@ define Package/perl-http-server-simple SECTION:=lang CATEGORY:=Languages TITLE:=Lightweight HTTP server - URL:=http://search.cpan.org/dist/HTTP-Server-Simple/ + URL:=https://search.cpan.org/dist/HTTP-Server-Simple/ DEPENDS:=perl +perl-cgi +perlbase-base +perlbase-essential +perlbase-filehandle +perlbase-socket +perlbase-test endef diff --git a/lang/perl-inline-c/Makefile b/lang/perl-inline-c/Makefile index bc5913da..9de7a908 100644 --- a/lang/perl-inline-c/Makefile +++ b/lang/perl-inline-c/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-inline-c -PKG_VERSION:=0.78 +PKG_VERSION:=0.81 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TINITA PKG_SOURCE:=Inline-C-$(PKG_VERSION).tar.gz -PKG_HASH:=9a7804d85c01a386073d2176582b0262b6374c5c0341049da3ef84c6f53efbc7 +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/T/TI/TINITA +PKG_HASH:=f185258d9050d7f79b4f00f12625cc469c2f700ff62d3e831cb18d80d2c87aac -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-C-$(PKG_VERSION) HOST_BUILD_DEPENDS:=perl/host perl-inline/host perl-parse-recdescent/host perl-file-sharedir-install/host @@ -32,7 +33,7 @@ define Package/perl-inline-c SECTION:=lang CATEGORY:=Languages TITLE:=C Language Support for Inline - URL:=http://search.cpan.org/dist/Inline-C/ + URL:=https://search.cpan.org/dist/Inline-C/ DEPENDS:=perl +perl-inline +perl-parse-recdescent +perlbase-config +perlbase-cwd +perlbase-data +perlbase-essential +perlbase-file +perlbase-if endef diff --git a/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch b/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch index dcfe2bb5..b001c206 100644 --- a/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch +++ b/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch @@ -1,6 +1,6 @@ --- a/lib/Inline/C.pm +++ b/lib/Inline/C.pm -@@ -361,7 +361,7 @@ sub build { +@@ -380,7 +380,7 @@ sub build { $o->call('write_XS', 'Build Glue 1'); $o->call('write_Inline_headers', 'Build Glue 2'); $o->call('write_Makefile_PL', 'Build Glue 3'); diff --git a/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch b/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch index b2ae09e6..d26318ab 100644 --- a/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch +++ b/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch @@ -1,6 +1,6 @@ --- a/lib/Inline/C.pm +++ b/lib/Inline/C.pm -@@ -438,22 +438,28 @@ sub get_maps { +@@ -457,22 +457,28 @@ sub get_maps { print STDERR "get_maps Stage\n" if $o->{CONFIG}{BUILD_NOISY}; my $typemap = ''; my $file; diff --git a/lang/perl-inline/Makefile b/lang/perl-inline/Makefile index c6de5b32..cbf2e8f5 100644 --- a/lang/perl-inline/Makefile +++ b/lang/perl-inline/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-inline -PKG_VERSION:=0.80 +PKG_VERSION:=0.86 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/I/IN/INGY PKG_SOURCE:=Inline-$(PKG_VERSION).tar.gz -PKG_HASH:=7e2bd984b1ebd43e336b937896463f2c6cb682c956cbd2c311a464363d2ccef6 +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/I/IN/INGY +PKG_HASH:=510a7de2d011b0db80b0874e8c0f7390010991000ae135cff7474df1e6d51e3a -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-$(PKG_VERSION) @@ -32,7 +33,7 @@ define Package/perl-inline SECTION:=lang CATEGORY:=Languages TITLE:=Write subroutines in other languages - URL:=http://search.cpan.org/dist/Inline/ + URL:=https://search.cpan.org/dist/Inline/ DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-digest +perlbase-essential +perlbase-fcntl +perlbase-file endef diff --git a/lang/perl-io-html/Makefile b/lang/perl-io-html/Makefile index 1e280d84..34e9a3a1 100644 --- a/lang/perl-io-html/Makefile +++ b/lang/perl-io-html/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-io-html PKG_VERSION:=1.001 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CJ/CJM PKG_SOURCE:=IO-HTML-$(PKG_VERSION).tar.gz PKG_HASH:=ea78d2d743794adc028bc9589538eb867174b4e165d7d8b5f63486e6b828e7e0 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/IO-HTML-$(PKG_VERSION) diff --git a/lang/perl-lockfile-simple/Makefile b/lang/perl-lockfile-simple/Makefile index 1bd5aca1..ca55b2cf 100644 --- a/lang/perl-lockfile-simple/Makefile +++ b/lang/perl-lockfile-simple/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-lockfile-simple PKG_VERSION:=0.208 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SC/SCHWIGON/lockfile-simple/ PKG_SOURCE:=LockFile-Simple-$(PKG_VERSION).tar.gz PKG_HASH:=45c77896b2a5a0a45f6202a6f813f437ff8b283f84a1c60d0c4f3730802af3a2 -PKG_LICENSE:=GPL-2.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-2.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LockFile-Simple-$(PKG_VERSION) diff --git a/lang/perl-lwp-mediatypes/Makefile b/lang/perl-lwp-mediatypes/Makefile index 375b3a4e..9b6d8246 100644 --- a/lang/perl-lwp-mediatypes/Makefile +++ b/lang/perl-lwp-mediatypes/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-lwp-mediatypes -PKG_VERSION:=6.02 +PKG_VERSION:=6.04 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=LWP-MediaTypes-$(PKG_VERSION).tar.gz -PKG_HASH:=18790b0cc5f0a51468495c3847b16738f785a2d460403595001e0b932e5db676 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=8f1bca12dab16a1c2a7c03a49c5e58cce41a6fec9519f0aadfba8dad997919d9 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LWP-MediaTypes-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-lwp-mediatypes SECTION:=lang CATEGORY:=Languages TITLE:=Guess media type for a file or a URL - URL:=http://search.cpan.org/dist/LWP-MediaTypes/ + URL:=https://search.cpan.org/dist/LWP-MediaTypes/ DEPENDS:=perl +perlbase-essential endef diff --git a/lang/perl-net-cidr-lite/Makefile b/lang/perl-net-cidr-lite/Makefile new file mode 100644 index 00000000..c09419c8 --- /dev/null +++ b/lang/perl-net-cidr-lite/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2020 Philip Prindeville, Redfish Solutions, LLC +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-net-cidr-lite +PKG_VERSION:=0.21 +PKG_RELEASE:=1 + +PKG_SOURCE:=Net-CIDR-Lite-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/D/DO/DOUGW +PKG_HASH:=cfa125e8a2aef9259bc3a44e07cbdfb7894b64d22e7c0cee92aee2f5c7915093 +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-CIDR-Lite-$(PKG_VERSION) + +PKG_MAINTAINER:=Philip Prindeville +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-net-cidr-lite + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl extension for merging IPv4 or IPv6 CIDR addresses + URL:=https://search.cpan.org/dist/Net-CIDR-Lite/ + DEPENDS:=perl +perlbase-essential +perlbase-config +perlbase-io +perlbase-dynaloader + PKGARCH:=all +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-net-cidr-lite/install + $(call perlmod/Install,$(1),Net Net/CIDR Net/CIDR/Lite.pm) +endef + + +$(eval $(call BuildPackage,perl-net-cidr-lite)) diff --git a/lang/perl-net-http/Makefile b/lang/perl-net-http/Makefile index 8bd32e7d..c8e0240f 100644 --- a/lang/perl-net-http/Makefile +++ b/lang/perl-net-http/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-net-http -PKG_VERSION:=6.09 +PKG_VERSION:=6.19 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER PKG_SOURCE:=Net-HTTP-$(PKG_VERSION).tar.gz -PKG_HASH:=52762b939d84806908ba544581c5708375f7938c3c0e496c128ca3fbc425e58d - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=52b76ec13959522cae64d965f15da3d99dcb445eddd85d2ce4e4f4df385b2fc4 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-HTTP-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-net-http SECTION:=lang CATEGORY:=Languages TITLE:=Low-level HTTP connection (client) - URL:=http://search.cpan.org/dist/Net-HTTP/ + URL:=https://search.cpan.org/dist/Net-HTTP/ DEPENDS:=perl +perl-uri +perlbase-compress +perlbase-essential +perlbase-io endef diff --git a/lang/perl-net-telnet/Makefile b/lang/perl-net-telnet/Makefile index d3b4cfa3..f94297a5 100644 --- a/lang/perl-net-telnet/Makefile +++ b/lang/perl-net-telnet/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-net-telnet PKG_VERSION:=3.04 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JR/JROGERS/ PKG_SOURCE:=Net-Telnet-$(PKG_VERSION).tar.gz PKG_HASH:=e64d567a4e16295ecba949368e7a6b8b5ae2a16b3ad682121d9b007dc5d2a37a -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-Telnet-$(PKG_VERSION) diff --git a/lang/perl-parse-recdescent/Makefile b/lang/perl-parse-recdescent/Makefile index d7dff8db..d041a6af 100644 --- a/lang/perl-parse-recdescent/Makefile +++ b/lang/perl-parse-recdescent/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-parse-recdescent -PKG_VERSION:=1.967013 -PKG_RELEASE:=1 +PKG_VERSION:=1.967015 +PKG_RELEASE:=2 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JT/JTBRAUN +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/J/JT/JTBRAUN PKG_SOURCE:=Parse-RecDescent-$(PKG_VERSION).tar.gz -PKG_HASH:=226590d3850cd1678deb0190d5207b3477fb9070a8ca6f18d8999daf44485930 +PKG_HASH:=1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37 -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Parse-RecDescent-$(PKG_VERSION) diff --git a/lang/perl-parse-yapp/Makefile b/lang/perl-parse-yapp/Makefile new file mode 100644 index 00000000..c9cf1ce4 --- /dev/null +++ b/lang/perl-parse-yapp/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-parse-yapp +PKG_VERSION:=1.21 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://www.cpan.org/authors/id/W/WB/WBRASWELL/ +PKG_SOURCE:=Parse-Yapp-$(PKG_VERSION).tar.gz +PKG_HASH:=3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5 + +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_MAINTAINER:=Andy Walsh + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Parse-Yapp-$(PKG_VERSION) +HOST_BUILD_DEPENDS:=perl/host +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Parse-Yapp-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include $(TOPDIR)/feeds/packages/lang/perl/perlmod.mk + +define Package/perl-parse-yapp + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Yet Another Parser Parser For Perl + URL:=http://search.cpan.org/dist/Parse-Yapp/ + DEPENDS:=perl +perlbase-essential +perlbase-test +endef + +define Host/Configure + $(call perlmod/host/Configure,,,) +endef + +define Host/Compile + $(call perlmod/host/Compile,,) +endef + +define Host/Install + $(call perlmod/host/Install,$(1),) +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-parse-yapp/install + $(call perlmod/Install,$(1),Parse auto/Parse) +endef + + +$(eval $(call BuildPackage,perl-parse-yapp)) +$(eval $(call HostBuild)) diff --git a/lang/perl-sub-uplevel/Makefile b/lang/perl-sub-uplevel/Makefile index f078f77e..5f2b421e 100644 --- a/lang/perl-sub-uplevel/Makefile +++ b/lang/perl-sub-uplevel/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-sub-uplevel -PKG_VERSION:=0.25 +PKG_VERSION:=0.2800 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/D/DA/DAGOLDEN PKG_SOURCE:=Sub-Uplevel-$(PKG_VERSION).tar.gz -PKG_HASH:=2dcca582a7ea5bada576eb27c4be1d1b064fb22175bdbd6d696c45d083560505 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN +PKG_HASH:=b4f3f63b80f680a421332d8851ddbe5a8e72fcaa74d5d1d98f3c8cc4a3ece293 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Sub-Uplevel-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-sub-uplevel SECTION:=lang CATEGORY:=Languages TITLE:=Apparently run a function in a higher stack frame - URL:=http://search.cpan.org/dist/Sub-Uplevel/ + URL:=https://search.cpan.org/dist/Sub-Uplevel/ DEPENDS:=perl +perlbase-essential endef diff --git a/lang/perl-test-harness/Makefile b/lang/perl-test-harness/Makefile index 36a00545..83001b41 100644 --- a/lang/perl-test-harness/Makefile +++ b/lang/perl-test-harness/Makefile @@ -8,18 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-test-harness -PKG_VERSION:=3.36 +PKG_VERSION:=3.42 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEONT/ PKG_SOURCE:=Test-Harness-$(PKG_VERSION).tar.gz -PKG_HASH:=e7566f13b041d028b56f184b77ec2545ec6f0bb5a0f8f5368f7e4a08b496b63e - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/L/LE/LEONT +PKG_HASH:=0fd90d4efea82d6e262e6933759e85d27cbcfa4091b14bf4042ae20bab528e53 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Test-Harness-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +27,7 @@ define Package/perl-test-harness SECTION:=lang CATEGORY:=Languages TITLE:=Perl Test Harness - URL:=http://search.cpan.org/dist/Test-Harness/ + URL:=https://search.cpan.org/dist/Test-Harness/ DEPENDS:=perl +perlbase-base +perlbase-benchmark +perlbase-config +perlbase-essential +perlbase-file +perlbase-getopt +perlbase-io +perlbase-posix +perlbase-text endef diff --git a/lang/perl-test-warn/Makefile b/lang/perl-test-warn/Makefile index 94409e1f..b4fdd224 100644 --- a/lang/perl-test-warn/Makefile +++ b/lang/perl-test-warn/Makefile @@ -8,18 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-test-warn -PKG_VERSION:=0.30 +PKG_VERSION:=0.36 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CH/CHORNY PKG_SOURCE:=Test-Warn-$(PKG_VERSION).tar.gz -PKG_HASH:=8197555b94189d919349a03f7058f83861f145af9bee59f505bfe47562144e41 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/B/BI/BIGJ +PKG_HASH:=ecbca346d379cef8d3c0e4ac0c8eb3b2613d737ffaaeae52271c38d7bf3c6cda PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Test-Warn-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +27,7 @@ define Package/perl-test-warn SECTION:=lang CATEGORY:=Languages TITLE:=Perl extension to test methods for warnings - URL:=http://search.cpan.org/dist/Test-Warn/ + URL:=https://search.cpan.org/dist/Test-Warn/ DEPENDS:=perl +perl-sub-uplevel +perlbase-essential +perlbase-test endef diff --git a/lang/perl-text-csv_xs/Makefile b/lang/perl-text-csv_xs/Makefile index 158cb0ec..bb1a4a78 100644 --- a/lang/perl-text-csv_xs/Makefile +++ b/lang/perl-text-csv_xs/Makefile @@ -8,18 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-text-csv_xs -PKG_VERSION:=1.35 +PKG_VERSION:=1.41 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/H/HM/HMBRAND/ PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz -PKG_HASH:=2b4f111e9486b230b02bfabbbf50c453f959d18ec17351a930e41f0959b358b7 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Philip Prindeville - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/H/HM/HMBRAND +PKG_HASH:=0e4b7be423c02f09135a75082cb00136ff6a69cff25b012089048ea030f173ab PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Text-CSV_XS-$(PKG_VERSION) +PKG_MAINTAINER:=Philip Prindeville +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +27,7 @@ define Package/perl-text-csv_xs SECTION:=lang CATEGORY:=Languages TITLE:=Text comma-separated values manipulation routines - URL:=http://search.cpan.org/dist/Text-CSV_XS/ + URL:=https://search.cpan.org/dist/Text-CSV_XS/ DEPENDS:=perl +perlbase-essential +perlbase-config +perlbase-io +perlbase-dynaloader endef diff --git a/lang/perl-uri/Makefile b/lang/perl-uri/Makefile index 3f043e4f..c4f76e56 100644 --- a/lang/perl-uri/Makefile +++ b/lang/perl-uri/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-uri -PKG_VERSION:=1.72 +PKG_VERSION:=1.76 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz -PKG_HASH:=35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=b2c98e1d50d6f572483ee538a6f4ccc8d9185f91f0073fd8af7390898254413e PKG_BUILD_DIR:=$(BUILD_DIR)/perl/URI-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-uri SECTION:=lang CATEGORY:=Languages TITLE:=Manipulates and accesses URI strings - URL:=http://search.cpan.org/dist/URI/ + URL:=https://search.cpan.org/dist/URI/ DEPENDS:=perl +perlbase-essential +perlbase-integer +perlbase-mime +perlbase-scalar +perlbase-utf8 endef diff --git a/lang/perl-www-curl/Makefile b/lang/perl-www-curl/Makefile index 9a7ad5fa..858ffa09 100644 --- a/lang/perl-www-curl/Makefile +++ b/lang/perl-www-curl/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-www-curl PKG_VERSION:=4.17 -PKG_RELEASE:=4 +PKG_RELEASE:=7 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/ PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz PKG_HASH:=52ffab110e32348d775f241c973eb56f96b08eedbc110d77d257cdb0a24ab7ba -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Marcel Denia diff --git a/lang/perl-www-curl/patches/210-curl_7.66_compat.patch b/lang/perl-www-curl/patches/210-curl_7.66_compat.patch new file mode 100644 index 00000000..e26d953d --- /dev/null +++ b/lang/perl-www-curl/patches/210-curl_7.66_compat.patch @@ -0,0 +1,56 @@ +--- a/Curl.xs ++++ b/Curl.xs +@@ -70,7 +70,7 @@ + + + typedef struct { +-#ifdef __CURL_MULTI_H ++#ifdef CURLINC_MULTI_H + struct CURLM *curlm; + #else + struct void *curlm; +@@ -234,7 +234,7 @@ + { + perl_curl_multi *self; + Newz(1, self, 1, perl_curl_multi); +-#ifdef __CURL_MULTI_H ++#ifdef CURLINC_MULTI_H + self->curlm=curl_multi_init(); + #else + croak("curl version too old to support curl_multi_init()"); +@@ -245,7 +245,7 @@ + /* delete the multi */ + static void perl_curl_multi_delete(perl_curl_multi *self) + { +-#ifdef __CURL_MULTI_H ++#ifdef CURLINC_MULTI_H + if (self->curlm) + curl_multi_cleanup(self->curlm); + Safefree(self); +@@ -1065,7 +1065,7 @@ + WWW::Curl::Multi curlm + WWW::Curl::Easy curl + CODE: +-#ifdef __CURL_MULTI_H ++#ifdef CURLINC_MULTI_H + curl_multi_add_handle(curlm->curlm, curl->curl); + #endif + +@@ -1074,7 +1074,7 @@ + WWW::Curl::Multi curlm + WWW::Curl::Easy curl + CODE: +-#ifdef __CURL_MULTI_H ++#ifdef CURLINC_MULTI_H + curl_multi_remove_handle(curlm->curlm, curl->curl); + #endif + +@@ -1149,7 +1149,7 @@ + PREINIT: + int remaining; + CODE: +-#ifdef __CURL_MULTI_H ++#ifdef CURLINC_MULTI_H + while(CURLM_CALL_MULTI_PERFORM == + curl_multi_perform(self->curlm, &remaining)); + RETVAL = remaining; diff --git a/lang/perl-www-curl/patches/220-curl_7.69_compat.patch b/lang/perl-www-curl/patches/220-curl_7.69_compat.patch new file mode 100644 index 00000000..1b59a30a --- /dev/null +++ b/lang/perl-www-curl/patches/220-curl_7.69_compat.patch @@ -0,0 +1,11 @@ +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -127,7 +127,7 @@ + close H; + + for my $e (sort @syms) { +- if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/) { ++ if($e =~ /(OBSOLETE|^CURL_EXTERN|CURLOPT\z|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z|WIN32)/) { + next; + } + my ($group) = $e =~ m/^([^_]+_)/; diff --git a/lang/perl-www-mechanize/Makefile b/lang/perl-www-mechanize/Makefile index a193a6b9..bb72a915 100644 --- a/lang/perl-www-mechanize/Makefile +++ b/lang/perl-www-mechanize/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-www-mechanize -PKG_VERSION:=1.75 +PKG_VERSION:=1.96 PKG_RELEASE:=1 PKG_SOURCE:=WWW-Mechanize-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ -PKG_HASH:=5310051feb66c6ef9f7a4c070c66ec6092932129fc9cd18bba009ce999b7930b - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS +PKG_HASH:=a79a613452287433a88e689195b09951a06c2df6d7fd40c15aa556452de9ab04 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Mechanize-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +28,7 @@ define Package/perl-www-mechanize SECTION:=lang CATEGORY:=Languages TITLE:=Perl WWW Mechanize - URL:=http://search.cpan.org/dist/WWW-Mechanize/ + URL:=https://search.cpan.org/dist/WWW-Mechanize/ DEPENDS:=perl +perl-cgi +perl-html-form +perl-html-parser +perl-html-tree +perl-http-daemon +perl-http-message +perl-http-server-simple +perl-test-warn +perl-uri +perl-www +perlbase-base +perlbase-essential +perlbase-file +perlbase-findbin +perlbase-getopt +perlbase-pod +perlbase-test endef diff --git a/lang/perl-www-robotrules/Makefile b/lang/perl-www-robotrules/Makefile index ccbb7fa6..bccf44ca 100644 --- a/lang/perl-www-robotrules/Makefile +++ b/lang/perl-www-robotrules/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-www-robotrules PKG_VERSION:=6.02 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS PKG_SOURCE:=WWW-RobotRules-$(PKG_VERSION).tar.gz PKG_HASH:=46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-RobotRules-$(PKG_VERSION) diff --git a/lang/perl-www/Makefile b/lang/perl-www/Makefile index 563e51c8..d044b351 100644 --- a/lang/perl-www/Makefile +++ b/lang/perl-www/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-www -PKG_VERSION:=6.15 +PKG_VERSION:=6.43 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ +PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/O/OA/OALDERS PKG_SOURCE:=libwww-perl-$(PKG_VERSION).tar.gz -PKG_HASH:=6f349d45c21b1ec0501c4437dfcb70570940e6c3d5bff783bd91d4cddead8322 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - +PKG_HASH:=e9849d7ee6fd0e89cc999e63d7612c951afd6aeea6bc721b767870d9df4ac40d PKG_BUILD_DIR:=$(BUILD_DIR)/perl/libwww-perl-$(PKG_VERSION) +PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:search.cpan:libwww-perl + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk @@ -28,7 +29,7 @@ define Package/perl-www SECTION:=lang CATEGORY:=Languages TITLE:=WWW client/server library for Perl (aka LWP) - URL:=http://search.cpan.org/dist/libwww-perl/ + URL:=https://search.cpan.org/dist/libwww-perl/ DEPENDS:=perl +perl-encode-locale +perl-file-listing +perl-html-parser +perl-http-cookies +perl-http-daemon +perl-http-date +perl-http-message +perl-http-negotiate +perl-lwp-mediatypes +perl-net-http +perl-uri +perl-www-robotrules +perlbase-base +perlbase-digest +perlbase-encode +perlbase-essential +perlbase-io +perlbase-mime +perlbase-net endef @@ -41,7 +42,7 @@ define Build/Compile endef define Package/perl-www/install - $(call perlmod/Install,$(1),LWP.pm auto/LWP LWP) + $(call perlmod/Install,$(1),LWP.pm LWP LWP) endef diff --git a/lang/perl-xml-parser/Makefile b/lang/perl-xml-parser/Makefile index 3a6ebcae..6e724a8d 100644 --- a/lang/perl-xml-parser/Makefile +++ b/lang/perl-xml-parser/Makefile @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-xml-parser -PKG_VERSION:=2.44 +PKG_VERSION:=2.46 PKG_RELEASE:=1 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TO/TODDR/ PKG_SOURCE:=XML-Parser-$(PKG_VERSION).tar.gz -PKG_HASH:=1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216 +PKG_HASH:=d331332491c51cccfb4cb94ffc44f9cd73378e618498d4a37df9e043661c515d -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_BUILD_DIR:=$(BUILD_DIR)/perl/XML-Parser-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/XML-Parser-$(PKG_VERSION) @@ -24,9 +24,9 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/XML-Parser-$(PKG_VERSION) HOST_BUILD_DEPENDS:=perl/host expat/host EXPAT_LIBPATH:=$(STAGING_DIR)/usr/lib -EXPAT_INCPATH=$(STAGING_DIR)/usr/include +EXPAT_INCPATH:=$(STAGING_DIR)/usr/include HOST_EXPAT_LIBPATH:=$(STAGING_DIR_HOSTPKG)/lib -HOST_EXPAT_INCPATH=$(STAGING_DIR_HOSTPKG)/include +HOST_EXPAT_INCPATH:=$(STAGING_DIR_HOSTPKG)/include include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -52,7 +52,7 @@ endef define Build/Configure $(call perlmod/Configure,EXPATLIBPATH=$(EXPAT_LIBPATH) EXPATINCPATH=$(EXPAT_INCPATH),,) - + $(call FixupExpat,$(PKG_BUILD_DIR),$(EXPAT_LIBPATH),$(EXPAT_INCPATH)) $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/Expat) endef diff --git a/lang/perl-xml-parser/patches/030-expat.patch b/lang/perl-xml-parser/patches/030-expat.patch new file mode 100644 index 00000000..12a7fb8e --- /dev/null +++ b/lang/perl-xml-parser/patches/030-expat.patch @@ -0,0 +1,11 @@ +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -65,7 +65,7 @@ Expat_Not_Installed; + + # exiting before Makefile generation silences CPANTesters reports + # when expat is not available. +- exit 0; ++# exit 0; + } + + if ( not $expat_libpath and $] >= 5.006001 and $^O ne 'MSWin32' ) { diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 86a4351a..84d256d2 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -11,7 +11,7 @@ include perlver.mk PKG_NAME:=perl PKG_VERSION:=$(PERL_VERSION) -PKG_RELEASE:=1 +PKG_RELEASE:=4 PKG_SOURCE_URL:=\ https://cpan.metacpan.org/src/5.0 \ @@ -21,12 +21,13 @@ PKG_SOURCE_URL:=\ https://mirrors.sonic.net/cpan/src/5.0 \ https://www.cpan.org/src/5.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=059b3cb69970d8c8c5964caced0335b4af34ac990c8e61f7e3f90cd1c2d11e49 +PKG_HASH:=fea7162d4cca940a387f0587b93f6737d884bf74d8a9d7cfd978bc12cd0b202d -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl PKG_LICENSE_FILES:=Copying Artistic README PKG_MAINTAINER:=Marcel Denia , \ Philip Prindeville +PKG_CPE_ID:=cpe:/a:perl:perl # Build settings PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION) @@ -63,7 +64,7 @@ define Package/perl CATEGORY:=Languages TITLE:=The Perl intepreter URL:=http://www.perl.com/ - DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread + DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread @!arc endef define Package/perl/description @@ -104,6 +105,7 @@ define Build/Configure -Dowrt:threads=$(if $(CONFIG_PERL_THREADS),yes,no) \ -Dowrt:staging_dir='$(STAGING_DIR)' \ -Dowrt:host_perl_prefix='$(HOST_PERL_PREFIX)' \ + -Dsysroot='$(TOOLCHAIN_DIR)' \ files/version.config \ files/base.config \ files/$(patsubst i386,i486,$(ARCH)).config \ @@ -121,10 +123,12 @@ define Build/Compile +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) endef +ifeq ($(CONFIG_arc),) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION) $(CP) $(PKG_INSTALL_DIR)/usr/lib/perl5/$(PERL_VERSION) $(1)/usr/lib/perl5/ endef +endif define Package/perl/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/lang/perl/files/base.config b/lang/perl/files/base.config index 90a2cfbf..f2d18f54 100644 --- a/lang/perl/files/base.config +++ b/lang/perl/files/base.config @@ -938,7 +938,6 @@ stdio_ptr='((fp)->_ptr)' stdio_stream_array='' submit='' sysman='/usr/share/man/man1' -sysroot='' tail='' tar='' targetdir='' diff --git a/lang/perl/files/mips64el.config b/lang/perl/files/mips64el.config new file mode 100644 index 00000000..e02fb410 --- /dev/null +++ b/lang/perl/files/mips64el.config @@ -0,0 +1,21 @@ +owrt:arch=mips64el +owrt:bits=64 +owrt:endian=little + +ccsymbols='' +cppccsymbols='' +cppsymbols='' +d_casti32='define' +d_double_style_ieee='define' +d_long_double_style_ieee_doubledouble='define' +d_modflproto='undef' +doublekind='3' +fpossize='24' +longdblkind='5' +need_va_copy='define' +quadkind='2' + +owrt:sig_count=128 +owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ' +owrt:sig_name_extra='IOT CLD POLL' +owrt:sig_num_extra='6 18 22' diff --git a/lang/perl/files/version.config b/lang/perl/files/version.config index 5a5c402f..b318648e 100644 --- a/lang/perl/files/version.config +++ b/lang/perl/files/version.config @@ -1,7 +1,7 @@ # Set the version here PERL_REVISION=5 PERL_VERSION=28 -PERL_SUBVERSION=0 +PERL_SUBVERSION=1 # (api_revison, api_version, api_subversion) = (revision, version, 0) usually PERL_API_REVISION=5 diff --git a/lang/perl/patches/010-musl-compat.patch b/lang/perl/patches/010-musl-compat.patch index c1479ff2..77ea26f4 100644 --- a/lang/perl/patches/010-musl-compat.patch +++ b/lang/perl/patches/010-musl-compat.patch @@ -1,11 +1,11 @@ --- a/perl.c +++ b/perl.c -@@ -286,7 +286,7 @@ perl_construct(pTHXx) +@@ -303,7 +303,7 @@ perl_construct(pTHXx) PL_localpatches = local_patches; /* For possible -v */ #endif -#if defined(LIBM_LIB_VERSION) -+#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__)) ++#if defined(LIBM_LIB_VERSION) && defined(__UCLIBC__) /* * Some BSDs and Cygwin default to POSIX math instead of IEEE. * This switches them over to IEEE. diff --git a/lang/perl/patches/020-storables-stacksize.patch b/lang/perl/patches/020-storables-stacksize.patch index a2fff02f..903d90b7 100644 --- a/lang/perl/patches/020-storables-stacksize.patch +++ b/lang/perl/patches/020-storables-stacksize.patch @@ -8,8 +8,6 @@ Subject: (perl #133411) don't try to load Storable with -Dusecrosscompile dist/Storable/stacksize | 10 +++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) -diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL -index a5d9e66891..db420ab30b 100644 --- a/dist/Storable/Makefile.PL +++ b/dist/Storable/Makefile.PL @@ -90,12 +90,19 @@ sub depend { @@ -33,8 +31,6 @@ index a5d9e66891..db420ab30b 100644 release : dist git tag \$(VERSION) -diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize -index 7abd3a84cc..14e0739734 100644 --- a/dist/Storable/stacksize +++ b/dist/Storable/stacksize @@ -7,6 +7,9 @@ use Cwd; @@ -68,6 +64,3 @@ index 7abd3a84cc..14e0739734 100644 if ($^O eq "MSWin32") { require Win32; my ($str, $major, $minor) = Win32::GetOSVersion(); --- -2.11.0 - diff --git a/lang/perl/patches/110-always_use_miniperl.patch b/lang/perl/patches/110-always_use_miniperl.patch index 147c2d38..2f7ebcbc 100644 --- a/lang/perl/patches/110-always_use_miniperl.patch +++ b/lang/perl/patches/110-always_use_miniperl.patch @@ -1,6 +1,6 @@ --- a/Makefile.SH +++ b/Makefile.SH -@@ -334,22 +334,11 @@ MANIFEST_SRT = MANIFEST.srt +@@ -339,22 +339,11 @@ MANIFEST_SRT = MANIFEST.srt !GROK!THIS! diff --git a/lang/perl/patches/120-remove-build-timestamp.patch b/lang/perl/patches/120-remove-build-timestamp.patch index 57de481e..b0e78346 100644 --- a/lang/perl/patches/120-remove-build-timestamp.patch +++ b/lang/perl/patches/120-remove-build-timestamp.patch @@ -1,8 +1,6 @@ -Index: perl-5.26.1/perl.c -=================================================================== ---- perl-5.26.1.orig/perl.c -+++ perl-5.26.1/perl.c -@@ -1878,16 +1878,6 @@ S_Internals_V(pTHX_ CV *cv) +--- a/perl.c ++++ b/perl.c +@@ -1987,16 +1987,6 @@ S_Internals_V(pTHX_ CV *cv) PUSHs(Perl_newSVpvn_flags(aTHX_ non_bincompat_options, sizeof(non_bincompat_options) - 1, SVs_TEMP)); diff --git a/lang/perl/patches/301-fix_macos_static_linking.patch b/lang/perl/patches/301-fix_macos_static_linking.patch new file mode 100644 index 00000000..4b4ef925 --- /dev/null +++ b/lang/perl/patches/301-fix_macos_static_linking.patch @@ -0,0 +1,19 @@ +--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm ++++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +@@ -2738,14 +2738,14 @@ sub _find_static_libs { + + Called by a utility method of makeaperl. Checks whether a given file + is an XS library by seeing whether it defines any symbols starting +-with C. ++with C (with an optional leading underscore – needed on MacOS). + + =cut + + sub xs_static_lib_is_xs { + my ($self, $libfile) = @_; + my $devnull = File::Spec->devnull; +- return `nm $libfile 2>$devnull` =~ /\bboot_/; ++ return `nm $libfile 2>$devnull` =~ /\b_?boot_/; + } + + =item makefile (o) diff --git a/lang/perl/patches/900-use-rm-force.patch b/lang/perl/patches/900-use-rm-force.patch index 1eac6ce3..d2197571 100644 --- a/lang/perl/patches/900-use-rm-force.patch +++ b/lang/perl/patches/900-use-rm-force.patch @@ -1,5 +1,5 @@ ---- a/Makefile.SH 2017-10-17 11:59:52.938763142 -0600 -+++ b/Makefile.SH 2017-10-17 12:13:46.202555604 -0600 +--- a/Makefile.SH ++++ b/Makefile.SH @@ -275,6 +275,7 @@ LNS = $lns # NOTE: some systems don't grok "cp -f". XXX Configure test needed? CPS = $cp @@ -120,8 +120,8 @@ !NO!SUBS! case $osname in -@@ -1119,8 +1120,8 @@ pod/perl5280delta.pod: pod/perldelta.pod - $(LNS) perldelta.pod pod/perl5280delta.pod +@@ -1119,8 +1120,8 @@ pod/perl5281delta.pod: pod/perldelta.pod + $(LNS) perldelta.pod pod/perl5281delta.pod extra.pods: $(MINIPERL_EXE) - -@test ! -f extra.pods || rm -f `cat extra.pods` diff --git a/lang/perl/patches/910-miniperl-needs-inc-dot.patch b/lang/perl/patches/910-miniperl-needs-inc-dot.patch index d6ef98ba..347f6f2a 100644 --- a/lang/perl/patches/910-miniperl-needs-inc-dot.patch +++ b/lang/perl/patches/910-miniperl-needs-inc-dot.patch @@ -1,6 +1,6 @@ ---- a/Makefile.SH 2017-10-15 18:57:08.436234652 -0600 -+++ b/Makefile.SH 2017-10-15 19:02:47.587658819 -0600 -@@ -328,7 +328,7 @@ PATH_SEP = $p_ +--- a/Makefile.SH ++++ b/Makefile.SH +@@ -333,7 +333,7 @@ PATH_SEP = $p_ # Macros to invoke a copy of miniperl during the build. Targets which # are built using these macros should depend on \$(MINIPERL_EXE) MINIPERL_EXE = miniperl\$(EXE_EXT) @@ -9,7 +9,7 @@ # Macros to invoke sort the MANIFEST during build MANIFEST_SRT = MANIFEST.srt -@@ -991,7 +991,7 @@ NAMESPACEFLAGS = -force_flat_namespace +@@ -996,7 +996,7 @@ lib/buildcustomize.pl: $& $(miniperl_obj @$(RMS) miniperl.xok $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \ $(miniperl_objs) $(libs) @@ -18,7 +18,7 @@ $(MINIPERL) -f write_buildcustomize.pl !NO!SUBS! ;; -@@ -1002,16 +1002,16 @@ lib/buildcustomize.pl: $& $(miniperl_obj +@@ -1007,7 +1007,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d @\$(RMS) miniperl.xok @\$(RMS) \$(MINIPERL_EXE) \$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE) @@ -27,8 +27,7 @@ \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname" !GROK!THIS! else - $spitshell >>$Makefile <<'!NO!SUBS!' - lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl +@@ -1016,7 +1016,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep @$(RMS) miniperl.xok $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ $(miniperl_objs) $(libs) diff --git a/lang/perl/patches/920-fix-no-locale.patch b/lang/perl/patches/920-fix-no-locale.patch index 594695b4..25ff2851 100644 --- a/lang/perl/patches/920-fix-no-locale.patch +++ b/lang/perl/patches/920-fix-no-locale.patch @@ -7,11 +7,9 @@ Date: Wed May 23 15:32:47 2018 -0600 Several problems with this compile option were not caught before 5.28 was frozen. -diff --git a/embed.fnc b/embed.fnc -index 0f06e38..36f9f97 100644 --- a/embed.fnc +++ b/embed.fnc -@@ -2765,9 +2765,11 @@ s |bool |isa_lookup |NN HV *stash|NN const char * const name \ +@@ -2793,9 +2793,11 @@ s |bool |isa_lookup |NN HV *stash|NN con #endif #if defined(PERL_IN_LOCALE_C) @@ -23,11 +21,9 @@ index 0f06e38..36f9f97 100644 # ifdef HAS_NL_LANGINFO sn |const char*|my_nl_langinfo|const nl_item item|bool toggle # else -diff --git a/embed.h b/embed.h -index cf3ad9e..fb66c26 100644 --- a/embed.h +++ b/embed.h -@@ -1724,16 +1724,16 @@ +@@ -1796,16 +1796,16 @@ #define unshare_hek_or_pvn(a,b,c,d) S_unshare_hek_or_pvn(aTHX_ a,b,c,d) # endif # if defined(PERL_IN_LOCALE_C) @@ -47,8 +43,6 @@ index cf3ad9e..fb66c26 100644 # if defined(USE_POSIX_2008_LOCALE) #define emulate_setlocale S_emulate_setlocale # endif -diff --git a/locale.c b/locale.c -index 7653340..f8f77fb 100644 --- a/locale.c +++ b/locale.c @@ -1264,6 +1264,7 @@ S_locking_setlocale(pTHX_ @@ -59,7 +53,7 @@ index 7653340..f8f77fb 100644 STATIC void S_set_numeric_radix(pTHX_ const bool use_locale) -@@ -1299,6 +1300,10 @@ S_set_numeric_radix(pTHX_ const bool use_locale) +@@ -1299,6 +1300,10 @@ S_set_numeric_radix(pTHX_ const bool use } # endif @@ -87,7 +81,7 @@ index 7653340..f8f77fb 100644 #ifdef WIN32 STATIC char * -@@ -2139,11 +2145,20 @@ Perl_setlocale(const int category, const char * locale) +@@ -2139,11 +2145,20 @@ Perl_setlocale(const int category, const { /* This wraps POSIX::setlocale() */ @@ -109,7 +103,7 @@ index 7653340..f8f77fb 100644 #ifdef USE_LOCALE_NUMERIC -@@ -2262,6 +2277,8 @@ Perl_setlocale(const int category, const char * locale) +@@ -2262,6 +2277,8 @@ Perl_setlocale(const int category, const return retval; @@ -118,7 +112,7 @@ index 7653340..f8f77fb 100644 } PERL_STATIC_INLINE const char * -@@ -2414,13 +2431,16 @@ S_my_nl_langinfo(const int item, bool toggle) +@@ -2414,13 +2431,16 @@ S_my_nl_langinfo(const int item, bool to dTHX; const char * retval; @@ -137,7 +131,7 @@ index 7653340..f8f77fb 100644 #if defined(HAS_NL_LANGINFO) /* nl_langinfo() is available. */ # if ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L) \ -@@ -2468,6 +2488,8 @@ S_my_nl_langinfo(const int item, bool toggle) +@@ -2468,6 +2488,8 @@ S_my_nl_langinfo(const int item, bool to do_free = TRUE; } @@ -146,7 +140,7 @@ index 7653340..f8f77fb 100644 if (toggle) { if (PL_underlying_numeric_obj) { cur = PL_underlying_numeric_obj; -@@ -2478,6 +2500,8 @@ S_my_nl_langinfo(const int item, bool toggle) +@@ -2478,6 +2500,8 @@ S_my_nl_langinfo(const int item, bool to } } @@ -176,7 +170,7 @@ index 7653340..f8f77fb 100644 SAVEFREEPV(errstr); return errstr; -@@ -5301,10 +5324,17 @@ L|perlapi/switch_to_global_locale>. +@@ -5301,10 +5324,17 @@ L|perlap bool Perl_sync_locale() { @@ -267,8 +261,6 @@ index 7653340..f8f77fb 100644 } #if defined(DEBUGGING) && defined(USE_LOCALE) -diff --git a/makedef.pl b/makedef.pl -index dbd756d..661b71d 100644 --- a/makedef.pl +++ b/makedef.pl @@ -574,6 +574,9 @@ unless ($define{USE_LOCALE_COLLATE}) { @@ -291,11 +283,9 @@ index dbd756d..661b71d 100644 ); } -diff --git a/perl.h b/perl.h -index 3e1f6cd..d457776 100644 --- a/perl.h +++ b/perl.h -@@ -5657,6 +5657,9 @@ typedef struct am_table_short AMTS; +@@ -5656,6 +5656,9 @@ typedef struct am_table_short AMTS; # define IN_LC_COMPILETIME(category) 0 # define IN_LC_RUNTIME(category) 0 # define IN_LC(category) 0 @@ -305,11 +295,9 @@ index 3e1f6cd..d457776 100644 #endif -diff --git a/proto.h b/proto.h -index 3e027ab..558c33a 100644 --- a/proto.h +++ b/proto.h -@@ -4669,8 +4669,6 @@ PERL_CALLCONV SV* Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp); +@@ -4886,8 +4886,6 @@ PERL_CALLCONV SV* Perl_hfree_next_entry( assert(hv); assert(indexp) #endif #if defined(PERL_IN_LOCALE_C) @@ -318,7 +306,7 @@ index 3e027ab..558c33a 100644 #ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset) __attribute__warn_unused_result__; -@@ -4678,17 +4676,19 @@ PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf +@@ -4895,17 +4893,19 @@ PERL_STATIC_INLINE const char * S_save_t assert(buf_size) #endif @@ -339,11 +327,9 @@ index 3e027ab..558c33a 100644 # if defined(USE_POSIX_2008_LOCALE) STATIC const char* S_emulate_setlocale(const int category, const char* locale, unsigned int index, const bool is_index_valid); # endif -diff --git a/sv.c b/sv.c -index 07865bb..81223ca 100644 --- a/sv.c +++ b/sv.c -@@ -13330,10 +13330,15 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p +@@ -13330,10 +13330,15 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const s SvTAINT(sv); @@ -359,11 +345,9 @@ index 07865bb..81223ca 100644 } /* ========================================================================= -diff --git a/t/lib/warnings/regexec b/t/lib/warnings/regexec -index 900dd6e..b9e53c9 100644 --- a/t/lib/warnings/regexec +++ b/t/lib/warnings/regexec -@@ -215,6 +215,10 @@ Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - +@@ -215,6 +215,10 @@ Use of \b{} or \B{} for non-UTF-8 locale Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17. ######## # NAME (?[ ]) in non-UTF-8 locale diff --git a/lang/perl/patches/998-Errno_errno.h_path.patch b/lang/perl/patches/998-Errno_errno.h_path.patch new file mode 100644 index 00000000..f221dd93 --- /dev/null +++ b/lang/perl/patches/998-Errno_errno.h_path.patch @@ -0,0 +1,11 @@ +--- a/ext/Errno/Errno_pm.PL ++++ b/ext/Errno/Errno_pm.PL +@@ -133,7 +133,7 @@ + # Some Linuxes have weird errno.hs which generate + # no #file or #line directives + my ($linux_errno_h) = grep { -e $_ } map { "$_/errno.h" } +- "$sysroot/usr/include", "$sysroot/usr/local/include", ++ "$sysroot/usr/include", "$sysroot/usr/local/include", "$sysroot/include", + split / / => $Config{locincpth} or + die "Cannot find errno.h"; + $file{$linux_errno_h} = 1; diff --git a/lang/perl/patches/999-fix-build-failure-against-gcc-10.patch b/lang/perl/patches/999-fix-build-failure-against-gcc-10.patch new file mode 100644 index 00000000..55d9a0e8 --- /dev/null +++ b/lang/perl/patches/999-fix-build-failure-against-gcc-10.patch @@ -0,0 +1,103 @@ +From 6bd6308fcea3541e505651bf8e8127a4a03d22cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 12 Nov 2019 09:19:18 +0100 +Subject: [PATCH] Adapt Configure to GCC version 10 + +I got a notice from Jeff Law : + + Your particular package fails its testsuite. This was ultimately + tracked down to a Configure problem. The perl configure script treated + gcc-10 as gcc-1 and turned on -fpcc-struct-return. This is an ABI + changing flag and caused Perl to not be able to interact properly with + the dbm libraries on the system leading to a segfault. + +His proposed patch corrected only this one instance of the version +mismatch. Reading the Configure script revealed more issues. This +patch fixes all of them I found. + +--- + Configure | 14 +++++++------- + cflags.SH | 2 +- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/Configure b/Configure +index fad1c9f2b1..706c0b64ed 100755 +--- a/Configure ++++ b/Configure +@@ -4701,7 +4701,7 @@ else + fi + $rm -f try try.* + case "$gccversion" in +-1*) cpp=`./loc gcc-cpp $cpp $pth` ;; ++1.*) cpp=`./loc gcc-cpp $cpp $pth` ;; + esac + case "$gccversion" in + '') gccosandvers='' ;; +@@ -4741,7 +4741,7 @@ esac + # gcc 3.* complain about adding -Idirectories that they already know about, + # so we will take those off from locincpth. + case "$gccversion" in +-3*) ++3.*) + echo "main(){}">try.c + for incdir in $locincpth; do + warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \ +@@ -5467,13 +5467,13 @@ fi + case "$hint" in + default|recommended) + case "$gccversion" in +- 1*) dflt="$dflt -fpcc-struct-return" ;; ++ 1.*) dflt="$dflt -fpcc-struct-return" ;; + esac + case "$optimize:$DEBUGGING" in + *-g*:old) dflt="$dflt -DDEBUGGING";; + esac + case "$gccversion" in +- 2*) if $test -d /etc/conf/kconfig.d && ++ 2.*) if $test -d /etc/conf/kconfig.d && + $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1 + then + # Interactive Systems (ISC) POSIX mode. +@@ -5482,7 +5482,7 @@ default|recommended) + ;; + esac + case "$gccversion" in +- 1*) ;; ++ 1.*) ;; + 2.[0-8]*) ;; + ?*) set strict-aliasing -fno-strict-aliasing + eval $checkccflag +@@ -5600,7 +5600,7 @@ case "$cppflags" in + ;; + esac + case "$gccversion" in +-1*) cppflags="$cppflags -D__GNUC__" ++1.*) cppflags="$cppflags -D__GNUC__" + esac + case "$mips_type" in + '');; +@@ -23103,7 +23103,7 @@ fi + + : add -D_FORTIFY_SOURCE if feasible and not already there + case "$gccversion" in +-[4567].*) case "$optimize$ccflags" in ++[456789].*|[1-9][0-9]*) case "$optimize$ccflags" in + *-O*) case "$ccflags$cppsymbols" in + *_FORTIFY_SOURCE=*) # Don't add it again. + echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4 +diff --git a/cflags.SH b/cflags.SH +index e60742fed1..f1bcd6c38e 100755 +--- a/cflags.SH ++++ b/cflags.SH +@@ -156,7 +156,7 @@ esac + + case "$gccversion" in + '') ;; +-[12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this. ++[12].*) ;; # gcc versions 1 (gasp!) and 2 are not good for this. + Intel*) ;; # # Is that you, Intel C++? + # + # NOTE 1: the -std=c89 without -pedantic is a bit pointless. +-- +2.17.1 + diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index d00a8c42..8a950991 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -1,7 +1,11 @@ # This makefile simplifies perl module builds. # -include ../perl/perlver.mk +ifeq ($(origin PERL_INCLUDE_DIR),undefined) + PERL_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) +endif + +include $(PERL_INCLUDE_DIR)/perlver.mk ifneq ($(PKG_NAME),perl) PKG_VERSION:=$(PKG_VERSION)+perl$(PERL_VERSION2) diff --git a/lang/perl/perlver.mk b/lang/perl/perlver.mk index b23e68a2..dbec8151 100644 --- a/lang/perl/perlver.mk +++ b/lang/perl/perlver.mk @@ -1,4 +1,4 @@ -PERL_VERSION:=5.28.0 +PERL_VERSION:=5.28.1 PERL_EXPLODE:=$(subst ., ,$(PERL_VERSION)) diff --git a/lang/php7-pecl-dio/Makefile b/lang/php7-pecl-dio/Makefile index ae29b284..4d95138d 100644 --- a/lang/php7-pecl-dio/Makefile +++ b/lang/php7-pecl-dio/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PECL_NAME:=dio PECL_LONGNAME:=Direct I/O functions -PKG_VERSION:=0.1.0 +PKG_VERSION:=0.2.0 PKG_RELEASE:=1 -PKG_HASH:=aab985e374604379d99c9c93207f2c2959ff141740d1a648c0fbd07e0e08a73e +PKG_HASH:=062777e948dece374c2d7d9e92106c87d18c11128d2179b50dedb43175c4bd6e PKG_NAME:=php7-pecl-$(PECL_NAME) PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz @@ -21,10 +21,8 @@ PKG_BUILD_PARALLEL:=1 PKG_MAINTAINER:=Michael Heimpold -PKG_LICENSE:=PHPv3.01 -PKG_LICENSE_FILES:= - -PKG_FIXUP:=autoreconf +PKG_LICENSE:=PHP-3.01 +PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/lang/php7-pecl-http/Makefile b/lang/php7-pecl-http/Makefile index 17eb4a94..f15e9a41 100644 --- a/lang/php7-pecl-http/Makefile +++ b/lang/php7-pecl-http/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PECL_NAME:=pecl_http PECL_LONGNAME:=Extended HTTP Support -PKG_VERSION:=3.1.0 -PKG_RELEASE:=5 -PKG_HASH:=e3de67b156e7d5f6c2e5eb1e2b5f0acceb7004f1260d68c9f8b2c0f9629aabf0 +PKG_VERSION:=3.2.3 +PKG_RELEASE:=2 +PKG_HASH:=cf9d2a2ed335e572366025eca1d69e86c585f96ca07db341839a06f52ee4aa88 PKG_NAME:=php7-pecl-http PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz @@ -25,8 +25,6 @@ PKG_BUILD_DEPENDS:=php7 php7-pecl-propro php7-pecl-raphf PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk include ../php7/pecl.mk @@ -41,7 +39,7 @@ CONFIGURE_VARS+= \ PECL_cv_HAVE_LIBCURL_SecureTransport=no \ PECL_cv_HAVE_LIBCURL_GSKit=no \ PECL_cv_HAVE_LIBCURL_PolarSSL=no \ - PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_CYASSL),yes,no) \ + PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_WOLFSSL),yes,no) \ PECL_cv_HAVE_LIBCURL_mbedTLS=$(if $(CONFIG_LIBCURL_MBEDTLS),yes,no) \ PECL_cv_HAVE_LIBCURL_axTLS=no \ PECL_cv_LIBCURL_TLSAUTH_SRP=$(if $(CONFIG_LIBCURL_TLS_SRP),yes,no) \ @@ -49,9 +47,12 @@ CONFIGURE_VARS+= \ CONFIGURE_ARGS+= \ --with-http \ --without-http-shared-deps \ + --with-http-zlib-dir="$(STAGING_DIR)/usr" \ --with-http-libcurl-dir="$(STAGING_DIR)/usr" \ --with-http-libevent-dir="$(STAGING_DIR)/usr" \ - --with-http-libidn-dir="$(STAGING_DIR)/usr" + --with-http-libidn-dir="$(STAGING_DIR)/usr" \ + --with-http-libidnkit-dir=no \ + --with-http-libidnkit2-dir=no -$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +PACKAGE_libidn:libidn +libidn2 +php7-mod-hash +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30)) +$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +PACKAGE_libidn:libidn +libidn2 +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30)) $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch deleted file mode 100644 index ee925c45..00000000 --- a/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/php_http_etag.c 2016-12-12 10:04:21.000000000 +0100 -+++ b/src/php_http_etag.c 2016-12-23 21:10:59.523222367 +0100 -@@ -60,7 +60,7 @@ - unsigned char buf[4]; - - *((uint *) e->ctx) = ~*((uint *) e->ctx); --#if WORDS_BIGENDIAN -+#ifdef WORDS_BIGENDIAN - etag = php_http_etag_digest((unsigned char *) e->ctx, 4); - #else - buf[0] = ((unsigned char *) e->ctx)[3]; diff --git a/lang/php7-pecl-http/patches/200-string_or_null_register.patch b/lang/php7-pecl-http/patches/200-string_or_null_register.patch deleted file mode 100644 index f2d37eeb..00000000 --- a/lang/php7-pecl-http/patches/200-string_or_null_register.patch +++ /dev/null @@ -1,57 +0,0 @@ -From ab5b4e3acd2b0379e5d8bc95a8d4f83ce5c91fb7 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Sun, 4 Jun 2017 15:00:33 +0200 -Subject: [PATCH] Handle NULL strings gracefully during constant registration - -When libcurl is compiled not using e.g. libz or SSL, then a call to -curl_version_info could return NULL in the corresponding fields of -curl_version_info_data. - -Passing such NULL pointers down to REGISTER_NS_STRING_CONSTANT results -in a segfault during php startup, so let's check for this special case -and register a NULL constant in this case. - -Signed-off-by: Michael Heimpold ---- - src/php_http_client_curl.c | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c -index f286324..f07bb8f 100644 ---- a/src/php_http_client_curl.c -+++ b/src/php_http_client_curl.c -@@ -2429,6 +2429,14 @@ php_http_client_ops_t *php_http_client_curl_get_ops(void) - return &php_http_client_curl_ops; - } - -+#define REGISTER_NS_STRING_OR_NULL_CONSTANT(ns, name, str, flags) \ -+ do { \ -+ if ((str) != NULL) { \ -+ REGISTER_NS_STRING_CONSTANT(ns, name, str, flags); \ -+ } else { \ -+ REGISTER_NS_NULL_CONSTANT(ns, name, flags); \ -+ } \ -+ } while (0) - - PHP_MINIT_FUNCTION(http_client_curl) - { -@@ -2509,12 +2517,12 @@ PHP_MINIT_FUNCTION(http_client_curl) - REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl", "VERSIONS", curl_version(), CONST_CS|CONST_PERSISTENT); - #if CURLVERSION_NOW >= 0 - REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "CURL", (char *) info->version, CONST_CS|CONST_PERSISTENT); -- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "SSL", (char *) info->ssl_version, CONST_CS|CONST_PERSISTENT); -- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "LIBZ", (char *) info->libz_version, CONST_CS|CONST_PERSISTENT); -+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "SSL", (char *) info->ssl_version, CONST_CS|CONST_PERSISTENT); -+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "LIBZ", (char *) info->libz_version, CONST_CS|CONST_PERSISTENT); - # if CURLVERSION_NOW >= 1 -- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "ARES", (char *) info->ares, CONST_CS|CONST_PERSISTENT); -+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "ARES", (char *) info->ares, CONST_CS|CONST_PERSISTENT); - # if CURLVERSION_NOW >= 2 -- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "IDN", (char *) info->libidn, CONST_CS|CONST_PERSISTENT); -+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "IDN", (char *) info->libidn, CONST_CS|CONST_PERSISTENT); - # endif - # endif - #endif --- -2.7.4 - diff --git a/lang/php7-pecl-http/patches/300-fix-73.patch b/lang/php7-pecl-http/patches/300-fix-73.patch deleted file mode 100644 index 1779223d..00000000 --- a/lang/php7-pecl-http/patches/300-fix-73.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 8158548a80733b3af9539356b47527d960a13287 Mon Sep 17 00:00:00 2001 -From: Michael Wallner -Date: Thu, 1 Feb 2018 14:36:09 +0100 -Subject: [PATCH] fix #73 - -include idna.h prior idn2.h to ensure INDA_H is defined and libidn2 does -not try to define the idna compat layer ---- - src/php_http.c | 6 +++--- - src/php_http_url.c | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/php_http.c b/src/php_http.c -index 207c248..bc9166a 100644 ---- a/src/php_http.c -+++ b/src/php_http.c -@@ -31,12 +31,12 @@ - #if PHP_HTTP_HAVE_LIBICU - # include - #endif --#if PHP_HTTP_HAVE_LIBIDN2 --# include --#endif - #if PHP_HTTP_HAVE_LIBIDN - # include - #endif -+#if PHP_HTTP_HAVE_LIBIDN2 -+# include -+#endif - #if PHP_HTTP_HAVE_LIBIDNKIT2 || PHP_HTTP_HAVE_LIBIDNKIT - #include "idn/version.h" - #endif -diff --git a/src/php_http_url.c b/src/php_http_url.c -index 029e6a8..361e61c 100644 ---- a/src/php_http_url.c -+++ b/src/php_http_url.c -@@ -12,12 +12,12 @@ - - #include "php_http_api.h" - --#if PHP_HTTP_HAVE_LIBIDN2 --# include --#endif - #if PHP_HTTP_HAVE_LIBIDN - # include - #endif -+#if PHP_HTTP_HAVE_LIBIDN2 -+# include -+#endif - #if PHP_HTTP_HAVE_LIBICU - # include - #endif --- -2.7.4 - diff --git a/lang/php7-pecl-krb5/Makefile b/lang/php7-pecl-krb5/Makefile new file mode 100644 index 00000000..d93ea0cd --- /dev/null +++ b/lang/php7-pecl-krb5/Makefile @@ -0,0 +1,37 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=krb5 +PECL_LONGNAME:=Bindings for the Kerberos library + +PKG_VERSION:=1.1.3 +PKG_RELEASE:=1 +PKG_HASH:=3a65bb5f7d64ed5f6fbcf07250c17b0de29f693ac88f96cd1cc9737b996da120 + +PKG_NAME:=php7-pecl-krb5 +PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://pecl.php.net/get/ + +PKG_MAINTAINER:=W. Michael Petullo + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=php7 +PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +CONFIGURE_ARGS+= \ + --with-krb5=shared,"$(STAGING_DIR)/usr" \ + --with-krb5config=$(STAGING_DIR)/usr/bin/krb5-config + +$(eval $(call PECLPackage,krb5,$(PECL_LONGNAME),+krb5-libs,30)) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-libevent/Makefile b/lang/php7-pecl-libevent/Makefile index c57bddad..5383df84 100644 --- a/lang/php7-pecl-libevent/Makefile +++ b/lang/php7-pecl-libevent/Makefile @@ -9,26 +9,24 @@ PECL_NAME:=libevent PECL_LONGNAME:=Libevent - event notification PKG_NAME:=php7-pecl-$(PECL_NAME) -PKG_VERSION=2017-03-24-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=1 +PKG_VERSION=2019-05-30-$(PKG_SOURCE_VERSION) +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/expressif/pecl-event-libevent.git -PKG_SOURCE_VERSION:=5a726cee95ef9760fe81a60e595e87655f324594 +PKG_SOURCE_VERSION:=ce255e7e1e293030951fd68d5df06b2a4c077a89 PKG_SOURCE_SUBDIR:=$(PECL_NAME)-$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PECL_NAME)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=8d6ef4e5f496cfe6aa927d4a8c886041c1aec04220f1a3670c084faa2cc01fe1 +PKG_MIRROR_HASH:=9bb1665e020c2254bb347adc0779bea75876b8c21f2612eca723c99280a780dd PKG_MAINTAINER:=Michael Heimpold -PKG_LICENSE:=PHPv3.01 +PKG_LICENSE:=PHP-3.01 PKG_LICENSE_FILES:= PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_SOURCE_VERSION) PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk include ../php7/pecl.mk diff --git a/lang/php7-pecl-mcrypt/Makefile b/lang/php7-pecl-mcrypt/Makefile new file mode 100644 index 00000000..edcf302f --- /dev/null +++ b/lang/php7-pecl-mcrypt/Makefile @@ -0,0 +1,35 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=mcrypt +PECL_LONGNAME:=Bindings for the libmcrypt library + +PKG_VERSION:=1.0.3 +PKG_RELEASE:=2 +PKG_HASH:=affd675843a079e9efd49ac2f723286dd5bcb0916315aa53e2ae5edd5eadb034 + +PKG_NAME:=php7-pecl-mcrypt +PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://pecl.php.net/get/ + +PKG_MAINTAINER:=W. Michael Petullo + +PKG_LICENSE:=PHP-3.01 +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=php7 +PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr" + +$(eval $(call PECLPackage,mcrypt,$(PECL_LONGNAME),+libmcrypt +libltdl,30)) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-propro/Makefile b/lang/php7-pecl-propro/Makefile index dbd662e3..79b08219 100644 --- a/lang/php7-pecl-propro/Makefile +++ b/lang/php7-pecl-propro/Makefile @@ -24,7 +24,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf +#PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/lang/php7-pecl-raphf/Makefile b/lang/php7-pecl-raphf/Makefile index 88593231..e2c3a757 100644 --- a/lang/php7-pecl-raphf/Makefile +++ b/lang/php7-pecl-raphf/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PECL_NAME:=raphf PECL_LONGNAME:=Resource and persistent handles factory -PKG_VERSION:=2.0.0 +PKG_VERSION:=2.0.1 PKG_RELEASE:=2 -PKG_HASH:=95a59ea0dc3fc172805a6acd8327b122dd159b0a85b253826166457a05efa411 +PKG_HASH:=da3566db17422e5ef08b7ff144162952aabc14cb22407cc6b1d2a2d095812bd0 PKG_NAME:=php7-pecl-raphf PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz @@ -24,8 +24,6 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk include ../php7/pecl.mk diff --git a/lang/php7-pecl-redis/Makefile b/lang/php7-pecl-redis/Makefile new file mode 100644 index 00000000..7a23f6c3 --- /dev/null +++ b/lang/php7-pecl-redis/Makefile @@ -0,0 +1,39 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=redis +PECL_LONGNAME:=PHP extension for interfacing with Redis + +PKG_VERSION:=5.2.2 +PKG_RELEASE:=1 +PKG_HASH:=9965269ec8da48761873e943b770d7053e7579b2b858af97e582eadc7e6eaa11 + +PKG_NAME:=php7-pecl-redis +PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://pecl.php.net/get/ + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=PHP-3.01 +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +CONFIGURE_ARGS+= \ + --enable-redis \ + --enable-redis-json \ + --disable-redis-igbinary \ + --disable-redis-lzf \ + --disable-redis-msgpack + +$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME),+php7-mod-json +php7-mod-session,25)) +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7/Makefile b/lang/php7/Makefile index 19b3bdaf..e5560434 100644 --- a/lang/php7/Makefile +++ b/lang/php7/Makefile @@ -6,30 +6,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=7.2.9 +PKG_VERSION:=7.4.7 PKG_RELEASE:=1 PKG_MAINTAINER:=Michael Heimpold - -PKG_LICENSE:=PHPv3.01 +PKG_LICENSE:=PHP-3.01 PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:php:php PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_HASH:=3585c1222e00494efee4f5a65a8e03a1e6eca3dfb834814236ee7f02c5248ae0 +PKG_HASH:=53558f8f24cd8ab6fa0ea252ca8198e2650160649681ce5230c1df1dc2b52faf -PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 -PHP7_MODULES = \ +PHP7_MODULES= \ + bcmath \ calendar ctype curl \ - fileinfo \ dom \ exif \ - ftp \ + fileinfo filter ftp \ gettext gd gmp \ - hash \ iconv imap intl \ json \ ldap \ @@ -38,11 +36,12 @@ PHP7_MODULES = \ pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql phar \ session shmop simplexml snmp soap sockets sqlite3 sysvmsg sysvsem sysvshm \ tokenizer \ - xml xmlreader xmlwriter zip \ + xml xmlreader xmlwriter \ + zip PKG_CONFIG_DEPENDS:= \ $(patsubst %,CONFIG_PACKAGE_php7-mod-%,$(PHP7_MODULES)) \ - CONFIG_PHP7_FILTER CONFIG_PHP7_LIBXML CONFIG_PHP7_SYSTEMTZDATA CONFIG_PHP7_LIBFREETYPE + CONFIG_PHP7_LIBXML CONFIG_PHP7_SYSTEMTZDATA include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -62,11 +61,6 @@ define Package/php7/Default/description endef define Package/php7/config - config PHP7_FILTER - bool "PHP7 Filter support" - depends on PACKAGE_php7-cli || PACKAGE_php7-cgi - default y - config PHP7_LIBXML bool "PHP7 LIBXML support" depends on PACKAGE_php7-cli || PACKAGE_php7-cgi @@ -84,7 +78,7 @@ endef define Package/php7 $(call Package/php7/Default) - DEPENDS:=+libpcre +zlib \ + DEPENDS:=+libpcre2 +zlib \ +PHP7_LIBXML:libxml2 \ +PHP7_SYSTEMTZDATA:zoneinfo-core endef @@ -142,11 +136,20 @@ define Package/php7-fpm/description This package contains the FastCGI Process Manager of the PHP7 interpreter. endef -define Package/php7-mod-gd/config - config PHP7_LIBFREETYPE - bool "Enable Freetype 2 support in php7-mod-gd" - depends on PACKAGE_php7-mod-gd - default y +define Package/php7-mod-intl/config + config PHP7_FULLICUDATA + bool "Add dependency to full ICU Data" + depends on PACKAGE_php7-mod-intl + default n +endef + +define Package/php7-mod-intl/description + Note that this package depends in ICU library which is built without data + by default. This is to satisfy programs build and run dependencies but to + keep the installed footprint small on the target system(s). + However, the data is required to make the ICU library useful - and thus + directly affects PHPs ICU extension, too - so consider to also + select/install package 'icu-full-data'. endef # not everything groks --disable-nls @@ -158,6 +161,7 @@ CONFIGURE_ARGS+= \ --enable-fpm \ --enable-shared \ --disable-static \ + --with-pic \ --disable-rpath \ --disable-debug \ --disable-phpdbg \ @@ -168,9 +172,14 @@ CONFIGURE_ARGS+= \ --disable-short-tags \ \ --without-valgrind \ - --with-pcre-regex="$(STAGING_DIR)/usr" \ - --with-zlib="$(STAGING_DIR)/usr" \ - --with-zlib-dir="$(STAGING_DIR)/usr" + --with-external-pcre \ + --with-zlib="$(STAGING_DIR)/usr" + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-bcmath),) + CONFIGURE_ARGS+= --enable-bcmath=shared +else + CONFIGURE_ARGS+= --disable-bcmath +endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-calendar),) CONFIGURE_ARGS+= --enable-calendar=shared @@ -185,23 +194,11 @@ else endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-curl),) - CONFIGURE_ARGS+= --with-curl=shared,"$(STAGING_DIR)/usr" + CONFIGURE_ARGS+= --with-curl=shared else CONFIGURE_ARGS+= --without-curl endif -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-fileinfo),) - CONFIGURE_ARGS+= --enable-fileinfo=shared -else - CONFIGURE_ARGS+= --disable-fileinfo -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gettext),) - CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full" -else - CONFIGURE_ARGS+= --without-gettext -endif - ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-dom),) CONFIGURE_ARGS+= --enable-dom=shared else @@ -214,6 +211,18 @@ else CONFIGURE_ARGS+= --disable-exif endif +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-fileinfo),) + CONFIGURE_ARGS+= --enable-fileinfo=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --disable-fileinfo +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-filter),) + CONFIGURE_ARGS+= --enable-filter=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --disable-filter +endif + ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ftp),) CONFIGURE_ARGS+= --enable-ftp=shared else @@ -222,19 +231,16 @@ endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gd),) CONFIGURE_ARGS+= \ - --with-gd=shared \ - --with-jpeg-dir="$(STAGING_DIR)/usr" \ - --with-png-dir="$(STAGING_DIR)/usr" \ - --without-xpm-dir \ - --enable-gd-native-ttf \ - --disable-gd-jis-conv + --enable-gd=shared,"$(STAGING_DIR)/usr" \ + --with-external-gd else - CONFIGURE_ARGS+= --without-gd + CONFIGURE_ARGS+= --disable-gd endif -ifneq ($(CONFIG_PHP7_LIBFREETYPE),) - CONFIGURE_ARGS+= --with-freetype-dir="$(STAGING_DIR)" + +ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gettext),) + CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full" else - CONFIGURE_ARGS+= --without-freetype-dir + CONFIGURE_ARGS+= --without-gettext endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gmp),) @@ -243,12 +249,6 @@ else CONFIGURE_ARGS+= --without-gmp endif -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-hash),) - CONFIGURE_ARGS+= --enable-hash=shared -else - CONFIGURE_ARGS+= --disable-hash -endif - ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-iconv),) CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)" else @@ -258,7 +258,7 @@ endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-imap),) CONFIGURE_ARGS+= \ --with-imap=shared,"$(STAGING_DIR)/usr" \ - --with-imap-kerberos=no \ + --with-kerberos=no \ --with-imap-ssl="$(STAGING_DIR)/usr" else CONFIGURE_ARGS+= --without-imap @@ -280,13 +280,15 @@ endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ldap),) CONFIGURE_ARGS+= \ --with-ldap=shared,"$(STAGING_DIR)/usr" \ - --with-ldap-sasl="$(STAGING_DIR)/usr" + --with-ldap-sasl else CONFIGURE_ARGS+= --without-ldap endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mbstring),) - CONFIGURE_ARGS+= --enable-mbstring=shared --enable-mbregex + CONFIGURE_ARGS+= \ + --enable-mbstring=shared \ + --enable-mbregex else CONFIGURE_ARGS+= --disable-mbstring endif @@ -311,7 +313,7 @@ endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-openssl)$(CONFIG_PACKAGE_php7-mod-ftp)$(CONFIG_PACKAGE_php7-mod-imap)$(CONFIG_PACKAGE_php7-mod-snmp),) CONFIGURE_ARGS+= \ - --with-openssl=shared,"$(STAGING_DIR)/usr" \ + --with-openssl=shared \ --with-kerberos=no \ --with-openssl-dir="$(STAGING_DIR)/usr" else @@ -337,7 +339,7 @@ ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo),) CONFIGURE_ARGS+= --without-pdo-pgsql endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-sqlite),) - CONFIGURE_ARGS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr" + CONFIGURE_ARGS+= --with-pdo-sqlite=shared else CONFIGURE_ARGS+= --without-pdo-sqlite endif @@ -394,7 +396,7 @@ else endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sqlite3),) - CONFIGURE_ARGS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr" + CONFIGURE_ARGS+= --with-sqlite3=shared else CONFIGURE_ARGS+= --without-sqlite3 endif @@ -425,10 +427,8 @@ endif ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xml),) CONFIGURE_ARGS+= --enable-xml=shared,"$(STAGING_DIR)/usr" - ifneq ($(CONFIG_PHP7_LIBXML),) - CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2" - else - CONFIGURE_ARGS+= --with-libexpat-dir="$(STAGING_DIR)/usr" + ifneq ($(CONFIG_PHP7_LIBXML),y) + CONFIGURE_ARGS+= --with-expat endif else CONFIGURE_ARGS+= --disable-xml @@ -447,22 +447,15 @@ else endif ifneq ($(CONFIG_PACKAGE_php7-mod-zip),) - CONFIGURE_ARGS+= --enable-zip=shared + CONFIGURE_ARGS+= --with-zip=shared,"$(STAGING_DIR)/usr" else - CONFIGURE_ARGS+= --disable-zip -endif - -ifneq ($(SDK)$(CONFIG_PHP7_FILTER),) - CONFIGURE_ARGS+= --enable-filter -else - CONFIGURE_ARGS+= --disable-filter + CONFIGURE_ARGS+= --without-zip endif ifneq ($(SDK)$(CONFIG_PHP7_LIBXML),) - CONFIGURE_ARGS+= --enable-libxml - CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2" + CONFIGURE_ARGS+= --with-libxml else - CONFIGURE_ARGS+= --disable-libxml + CONFIGURE_ARGS+= --without-libxml endif ifneq ($(CONFIG_PHP7_SYSTEMTZDATA),) @@ -476,7 +469,8 @@ CONFIGURE_VARS+= \ php_cv_cc_rpath="no" \ iconv_impl_name="gnu_libiconv" \ ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \ - ac_cv_u8t_decompose=yes + ac_cv_u8t_decompose=yes \ + ac_cv_have_pcre2_jit=no define Package/php7/conffiles /etc/php.ini @@ -507,6 +501,10 @@ define Package/php7-fastcgi/install $(INSTALL_BIN) ./files/php7-fastcgi.init $(1)/etc/init.d/php7-fastcgi endef +define Package/php7-fastcgi/conffiles +/etc/config/php7-fastcgi +endef + define Package/php7-fpm/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/sapi/fpm/php-fpm $(1)/usr/bin/php-fpm @@ -532,7 +530,7 @@ endef define Build/Prepare $(call Build/Prepare/Default) - ( cd $(PKG_BUILD_DIR); touch configure.in; ./buildconf --force ) + ( cd $(PKG_BUILD_DIR); touch configure.ac; ./buildconf --force ) endef define Build/InstallDev @@ -590,34 +588,35 @@ $(eval $(call BuildPackage,php7-fastcgi)) $(eval $(call BuildPackage,php7-fpm)) #$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS])) +$(eval $(call BuildModule,bcmath,Bcmath)) $(eval $(call BuildModule,calendar,Calendar)) $(eval $(call BuildModule,ctype,Ctype)) $(eval $(call BuildModule,curl,cURL,+PACKAGE_php7-mod-curl:libcurl)) $(eval $(call BuildModule,dom,DOM,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:libxml2)) $(eval $(call BuildModule,exif,EXIF)) $(eval $(call BuildModule,fileinfo,Fileinfo)) +$(eval $(call BuildModule,filter,Filter)) $(eval $(call BuildModule,ftp,FTP,+PACKAGE_php7-mod-ftp:libopenssl)) -$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng +PHP7_LIBFREETYPE:libfreetype)) +$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libgd-full)) $(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php7-mod-gettext:libintl-full)) $(eval $(call BuildModule,gmp,GMP,+PACKAGE_php7-mod-gmp:libgmp)) -$(eval $(call BuildModule,hash,Hash)) $(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS))) $(eval $(call BuildModule,imap,IMAP,+PACKAGE_php7-mod-imap:libopenssl +PACKAGE_libpam:libpam +PACKAGE_php7-mod-imap:uw-imap)) -$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu)) +$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu +PHP7_FULLICUDATA:icu-full-data)) $(eval $(call BuildModule,json,JSON)) $(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php7-mod-ldap:libopenldap +PACKAGE_php7-mod-ldap:libsasl2)) -$(eval $(call BuildModule,mbstring,MBString)) +$(eval $(call BuildModule,mbstring,MBString,+PACKAGE_php7-mod-mbstring:oniguruma)) $(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:php7-mod-mysqlnd,30)) -$(eval $(call BuildModule,mysqlnd,MySQL Native Driver,+php7-mod-hash)) +$(eval $(call BuildModule,mysqlnd,MySQL Native Driver,+PACKAGE_php7-mod-openssl:php7-mod-openssl)) $(eval $(call BuildModule,opcache,OPcache,,,zend)) -$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl)) +$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl,15)) $(eval $(call BuildModule,pcntl,PCNTL)) $(eval $(call BuildModule,pdo,PHP Data Objects)) $(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-mysql:php7-mod-mysqlnd)) $(eval $(call BuildModule,pdo-pgsql,PDO driver for PostgreSQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-pgsql:libpq)) $(eval $(call BuildModule,pdo-sqlite,PDO driver for SQLite 3.x,+php7-mod-pdo +PACKAGE_php7-mod-pdo-sqlite:libsqlite3 +PACKAGE_php7-mod-pdo-sqlite:librt)) $(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php7-mod-pgsql:libpq)) -$(eval $(call BuildModule,phar,Phar Archives,+php7-mod-hash)) +$(eval $(call BuildModule,phar,Phar Archives)) $(eval $(call BuildModule,session,Session)) $(eval $(call BuildModule,shmop,Shared Memory)) $(eval $(call BuildModule,simplexml,SimpleXML,+@PHP7_LIBXML +PACKAGE_php7-mod-simplexml:libxml2)) @@ -630,6 +629,6 @@ $(eval $(call BuildModule,sysvsem,System V shared memory)) $(eval $(call BuildModule,sysvshm,System V semaphore)) $(eval $(call BuildModule,tokenizer,Tokenizer)) $(eval $(call BuildModule,xml,XML,+PHP7_LIBXML:libxml2 +!PHP7_LIBXML:libexpat)) -$(eval $(call BuildModule,xmlreader,XMLReader,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlreader:libxml2)) +$(eval $(call BuildModule,xmlreader,XMLReader,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:php7-mod-dom +PACKAGE_php7-mod-xmlreader:libxml2)) $(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlwriter:libxml2)) -$(eval $(call BuildModule,zip,ZIP,+PACKAGE_php7-mod-zip:zlib)) +$(eval $(call BuildModule,zip,ZIP,+PACKAGE_php7-mod-zip:libzip)) diff --git a/lang/php7/files/php7-fastcgi.init b/lang/php7/files/php7-fastcgi.init index 21f5b09e..6106b4f8 100644 --- a/lang/php7/files/php7-fastcgi.init +++ b/lang/php7/files/php7-fastcgi.init @@ -11,12 +11,12 @@ start_instance() { local port config_get_bool enabled "$section" 'enabled' 0 - config_get port "$section" 'port' 1026 + config_get port "$section" 'port' [ $enabled -gt 0 ] || return 1 PHP_FCGI_CHILDREN='' \ - service_start /usr/bin/php-fcgi -b $port + service_start /usr/bin/php-fcgi ${port:+-b $port} } start() { diff --git a/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch b/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch index 97fd734a..ceea3f2c 100644 --- a/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch +++ b/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch @@ -1,3 +1,10 @@ +From: Debian PHP Maintainers +Date: Thu, 7 Mar 2019 19:42:35 +0000 +Subject: Add-support-for-use-of-the-system-timezone-database + +# License: MIT +# http://opensource.org/licenses/MIT + # License: MIT # http://opensource.org/licenses/MIT @@ -5,6 +12,9 @@ Add support for use of the system timezone database, rather than embedding a copy. Discussed upstream but was not desired. History: +r18: adapt for autotool change in 7.3.3RC1 +r17: adapt for timelib 2018.01 (in 7.3.2RC1) +r16: adapt for timelib 2017.06 (in 7.2.3RC1) r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1) r14: improve check for valid tz file r13: adapt for upstream changes to use PHP allocator @@ -25,11 +35,40 @@ r4: added "System/Localtime" tzname which uses /etc/localtime r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) r2: add filesystem trawl to set up name alias index r1: initial revision +--- + ext/date/config0.m4 | 13 ++ + ext/date/lib/parse_tz.c | 535 +++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 545 insertions(+), 3 deletions(-) -diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c ---- ./ext/date/lib/parse_tz.c.systzdata 2017-08-22 09:40:38.000000000 +0200 -+++ ./ext/date/lib/parse_tz.c 2017-08-22 12:16:00.370298079 +0200 -@@ -25,8 +25,21 @@ +diff --git a/ext/date/config0.m4 b/ext/date/config0.m4 +index 20e4164..a612436 100644 +--- a/ext/date/config0.m4 ++++ b/ext/date/config0.m4 +@@ -4,6 +4,19 @@ AC_CHECK_HEADERS([io.h]) + dnl Check for strtoll, atoll + AC_CHECK_FUNCS(strtoll atoll) + ++PHP_ARG_WITH(system-tzdata, for use of system timezone data, ++[ --with-system-tzdata[=DIR] to specify use of system timezone data], ++no, no) ++ ++if test "$PHP_SYSTEM_TZDATA" != "no"; then ++ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used]) ++ ++ if test "$PHP_SYSTEM_TZDATA" != "yes"; then ++ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA", ++ [Define for location of system timezone data]) ++ fi ++fi ++ + PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1" + timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c + lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c" +diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c +index 020da31..9b39c6e 100644 +--- a/ext/date/lib/parse_tz.c ++++ b/ext/date/lib/parse_tz.c +@@ -26,8 +26,21 @@ #include "timelib.h" #include "timelib_private.h" @@ -51,7 +90,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) # if defined(__LITTLE_ENDIAN__) -@@ -67,6 +80,11 @@ static int read_php_preamble(const unsig +@@ -88,6 +101,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz) { uint32_t version; @@ -63,7 +102,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c /* read ID */ version = (*tzf)[3] - '0'; *tzf += 4; -@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo +@@ -412,7 +430,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) } } @@ -266,7 +305,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c + } + + for (l = li[hash]; l; l = l->next) { -+ if (strcasecmp(l->name, name) == 0) ++ if (timelib_strcasecmp(l->name, name) == 0) + return l; + } + @@ -290,7 +329,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c +{ + const timelib_tzdb_index_entry *alpha = first, *beta = second; + -+ return strcasecmp(alpha->id, beta->id); ++ return timelib_strcasecmp(alpha->id, beta->id); +} + + @@ -493,8 +532,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c +static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) { int left = 0, right = tzdb->index_size - 1; - #ifdef HAVE_SETLOCALE -@@ -419,9 +859,48 @@ static int seek_to_tz_position(const uns + +@@ -438,9 +878,48 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const return 0; } @@ -542,8 +581,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c +#endif } - const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(timelib_tzdb *tzdb, int *count) -@@ -433,7 +912,30 @@ const timelib_tzdb_index_entry *timelib_ + const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count) +@@ -452,7 +931,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_ int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb) { const unsigned char *tzf; @@ -575,7 +614,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c } static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) -@@ -475,12 +977,14 @@ static timelib_tzinfo* timelib_tzinfo_ct +@@ -494,12 +996,14 @@ static timelib_tzinfo* timelib_tzinfo_ctor(char *name) timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code) { const unsigned char *tzf; @@ -591,11 +630,10 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c tmp = timelib_tzinfo_ctor(timezone); version = read_preamble(&tzf, tmp, &type); -@@ -503,6 +1007,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha - timelib_tzinfo_dtor(tmp); - return NULL; +@@ -534,11 +1038,36 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i } -+ + skip_posix_string(&tzf, tmp); + +#ifdef HAVE_SYSTEM_TZDATA + if (memmap) { + const struct location_info *li; @@ -618,10 +656,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c + munmap(memmap, maplen); + } else { +#endif - if (version == 2 || version == 3) { - if (!skip_64bit_preamble(&tzf, tmp)) { - /* 64 bit preamble is not in place */ -@@ -520,6 +1047,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha + if (type == TIMELIB_TZINFO_PHP) { + read_location(&tzf, tmp); } else { set_default_location_and_comments(&tzf, tmp); } @@ -631,23 +667,3 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c } else { *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE; tmp = NULL; -diff -up ./ext/date/lib/timelib.m4.systzdata ./ext/date/lib/timelib.m4 ---- ./ext/date/lib/timelib.m4.systzdata 2017-08-22 09:40:38.000000000 +0200 -+++ ./ext/date/lib/timelib.m4 2017-08-22 11:32:29.357799927 +0200 -@@ -81,3 +81,16 @@ io.h - - dnl Check for strtoll, atoll - AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday) -+ -+PHP_ARG_WITH(system-tzdata, for use of system timezone data, -+[ --with-system-tzdata[=DIR] to specify use of system timezone data], -+no, no) -+ -+if test "$PHP_SYSTEM_TZDATA" != "no"; then -+ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used]) -+ -+ if test "$PHP_SYSTEM_TZDATA" != "yes"; then -+ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA", -+ [Define for location of system timezone data]) -+ fi -+fi diff --git a/lang/php7/patches/0016-dont-gitclean-in-build.patch b/lang/php7/patches/0016-dont-gitclean-in-build.patch deleted file mode 100644 index 32de5579..00000000 --- a/lang/php7/patches/0016-dont-gitclean-in-build.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Debian PHP Maintainers -Date: Sat, 2 May 2015 10:26:53 +0200 -Subject: dont-gitclean-in-build - ---- - build/build.mk | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/build/build.mk b/build/build.mk -index 9452984..b964def 100644 ---- a/build/build.mk -+++ b/build/build.mk -@@ -63,6 +63,5 @@ gitclean-work: - @if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \ - (echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \ - fi; \ -- git clean -X -f -d; - - .PHONY: $(ALWAYS) snapshot diff --git a/lang/php7/patches/0032-Use-system-timezone.patch b/lang/php7/patches/0032-Use-system-timezone.patch index efa1fc7e..00873eee 100644 --- a/lang/php7/patches/0032-Use-system-timezone.patch +++ b/lang/php7/patches/0032-Use-system-timezone.patch @@ -14,10 +14,10 @@ To be used in tandem with use_embedded_timezonedb.patch and use_embedded_timezon 1 file changed, 17 insertions(+) diff --git a/ext/date/php_date.c b/ext/date/php_date.c -index cbe6e91..1999c83 100644 +index f049ae2..6a044ce 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c -@@ -1003,6 +1003,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb) +@@ -1030,6 +1030,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb) DATEG(timezone_valid) = 1; return DATEG(default_timezone); } diff --git a/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch b/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch index e05c102b..afab2b45 100644 --- a/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch +++ b/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch @@ -1,5 +1,5 @@ From: Thijs Kinkhorst -Date: Wed, 15 Jun 2016 09:18:03 +0200 +Date: Mon, 2 Dec 2019 22:18:43 +0100 Subject: Add patch to remove build timestamps from generated binaries. --- @@ -13,7 +13,7 @@ Subject: Add patch to remove build timestamps from generated binaries. --- a/ext/standard/info.c +++ b/ext/standard/info.c -@@ -830,7 +830,6 @@ PHPAPI void php_print_info(int flag) +@@ -802,7 +802,6 @@ PHPAPI ZEND_COLD void php_print_info(int flag) php_info_print_box_end(); php_info_print_table_start(); php_info_print_table_row(2, "System", ZSTR_VAL(php_uname)); @@ -23,7 +23,7 @@ Subject: Add patch to remove build timestamps from generated binaries. #endif --- a/sapi/apache2handler/config.m4 +++ b/sapi/apache2handler/config.m4 -@@ -67,18 +67,9 @@ if test "$PHP_APXS2" != "no"; then +@@ -64,18 +64,9 @@ if test "$PHP_APXS2" != "no"; then fi APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` @@ -47,53 +47,53 @@ Subject: Add patch to remove build timestamps from generated binaries. *aix*) --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c -@@ -2427,9 +2427,9 @@ consult the installation file that came - SG(request_info).no_headers = 1; - } +@@ -2392,9 +2392,9 @@ parent_loop_end: + SG(headers_sent) = 1; + SG(request_info).no_headers = 1; #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #else -- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #endif php_request_shutdown((void *) 0); fcgi_shutdown(); --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c -@@ -697,8 +697,8 @@ static int do_cli(int argc, char **argv) +@@ -645,8 +645,8 @@ static int do_cli(int argc, char **argv) /* {{{ */ goto out; case 'v': /* show php version & quit */ -- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", +- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s", - PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, -+ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", ++ php_printf("PHP %s (%s) ( %s)\nCopyright (c) The PHP Group\n%s", + PHP_VERSION, cli_sapi_module.name, #if ZTS "ZTS " #else --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c -@@ -1755,9 +1755,9 @@ int main(int argc, char *argv[]) +@@ -1722,9 +1722,9 @@ int main(int argc, char *argv[]) SG(request_info).no_headers = 1; #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #else -- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #endif php_request_shutdown((void *) 0); fcgi_shutdown(); --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c -@@ -1697,10 +1697,8 @@ phpdbg_main: +@@ -1695,10 +1695,8 @@ phpdbg_main: phpdbg_do_help_cmd(exec); } else if (show_version) { phpdbg_out( -- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2018 The PHP Group\n%s", -+ "phpdbg %s\nPHP %s, Copyright (c) 1997-2018 The PHP Group\n%s", +- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) The PHP Group\n%s", ++ "phpdbg %s\nPHP %s, Copyright (c) The PHP Group\n%s", PHPDBG_VERSION, - __DATE__, - __TIME__, diff --git a/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch b/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch index 78f7dca4..f52afe92 100644 --- a/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch +++ b/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch @@ -11,7 +11,7 @@ diff --git a/sapi/fpm/status.html.in b/sapi/fpm/status.html.in index 86492d7..31c31ff 100644 --- a/sapi/fpm/status.html.in +++ b/sapi/fpm/status.html.in -@@ -71,11 +71,6 @@ +@@ -70,11 +70,6 @@ PID↓Start TimeStart SinceRequests ServedRequest DurationRequest methodRequest URIContent LengthUserScriptLast Request %CPULast Request Memory diff --git a/lang/php7/patches/0050-remove-build-timestamps.patch b/lang/php7/patches/0050-remove-build-timestamps.patch index 9c7552dd..511d9899 100644 --- a/lang/php7/patches/0050-remove-build-timestamps.patch +++ b/lang/php7/patches/0050-remove-build-timestamps.patch @@ -1,6 +1,6 @@ --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c -@@ -2456,11 +2456,6 @@ static void accel_gen_system_id(void) +@@ -2652,11 +2652,6 @@ static void accel_gen_system_id(void) PHP_MD5Update(&context, PHP_VERSION, sizeof(PHP_VERSION)-1); PHP_MD5Update(&context, ZEND_EXTENSION_BUILD_ID, sizeof(ZEND_EXTENSION_BUILD_ID)-1); PHP_MD5Update(&context, ZEND_BIN_ID, sizeof(ZEND_BIN_ID)-1); @@ -10,19 +10,19 @@ - PHP_MD5Update(&context, __TIME__, sizeof(__TIME__)-1); - } PHP_MD5Final(digest, &context); - for (i = 0; i < 16; i++) { - c = digest[i] >> 4; + php_hash_bin2hex(accel_system_id, digest, sizeof digest); + } --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c -@@ -1034,9 +1034,9 @@ static int cli_main( int argc, char * ar +@@ -1284,9 +1284,9 @@ static int cli_main( int argc, char * ar case 'v': if (php_request_startup() != FAILURE) { #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #else -- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #endif #ifdef PHP_OUTPUT_NEWAPI php_output_end_all(); diff --git a/lang/php7/patches/1000-fix_membar_producer_link_error_gcc3x.patch b/lang/php7/patches/1000-fix_membar_producer_link_error_gcc3x.patch deleted file mode 100644 index 3e81dd6b..00000000 --- a/lang/php7/patches/1000-fix_membar_producer_link_error_gcc3x.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ext/standard/php_crypt_r.c -+++ b/ext/standard/php_crypt_r.c -@@ -96,6 +96,8 @@ void _crypt_extended_init_r(void) - InterlockedIncrement(&initialized); - #elif defined(HAVE_SYNC_FETCH_AND_ADD) - __sync_fetch_and_add(&initialized, 1); -+#elif (defined(__GNUC__) && (__GNUC__ == 3)) -+ initialized = 1; - #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ - membar_producer(); - atomic_add_int(&initialized, 1); diff --git a/lang/php7/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch b/lang/php7/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch index d2a1e91a..7b8193c8 100644 --- a/lang/php7/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch +++ b/lang/php7/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch @@ -1,6 +1,6 @@ -From dc8bb6a53bfdfe42d9ae81d4e78c6155ad4bfd6e Mon Sep 17 00:00:00 2001 +From dd6ee0fb6715881b204fb4cb124db9134c1a6c7d Mon Sep 17 00:00:00 2001 From: Michael Heimpold -Date: Sun, 17 May 2015 16:50:50 +0200 +Date: Mon, 2 Dec 2019 22:42:28 +0100 Subject: [PATCH] ext/opcache: fix detection of shm/mmap The detection of sysvipc and mmap doesn't work well when cross-compiling, @@ -15,145 +15,37 @@ and makes opcache usable on OpenWrt. Signed-off-by: Michael Heimpold --- - ext/opcache/config.m4 | 122 ++----------------------------------------------- - 1 file changed, 4 insertions(+), 118 deletions(-) + ext/opcache/config.m4 | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index b7e4835..7b6c0aa 100644 +index 6c40cafc1..63fa5bb55 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 -@@ -11,127 +11,13 @@ if test "$PHP_OPCACHE" != "no"; then - AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function]) - ]) - -- AC_MSG_CHECKING(for sysvipc shared memory support) -- AC_TRY_RUN([ --#include --#include --#include --#include --#include --#include -- --int main() { -- pid_t pid; -- int status; -- int ipc_id; -- char *shm; -- struct shmid_ds shmbuf; -- -- ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W)); -- if (ipc_id == -1) { -- return 1; -- } -- -- shm = shmat(ipc_id, NULL, 0); -- if (shm == (void *)-1) { -- shmctl(ipc_id, IPC_RMID, NULL); -- return 2; -- } -- -- if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) { -- shmdt(shm); -- shmctl(ipc_id, IPC_RMID, NULL); -- return 3; -- } -- -- shmbuf.shm_perm.uid = getuid(); -- shmbuf.shm_perm.gid = getgid(); -- shmbuf.shm_perm.mode = 0600; -- -- if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) { -- shmdt(shm); -- shmctl(ipc_id, IPC_RMID, NULL); -- return 4; -- } -- -- shmctl(ipc_id, IPC_RMID, NULL); -- -- strcpy(shm, "hello"); -- -- pid = fork(); -- if (pid < 0) { -- return 5; -- } else if (pid == 0) { -- strcpy(shm, "bye"); -- return 6; -- } -- if (wait(&status) != pid) { -- return 7; -- } -- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { -- return 8; -- } -- if (strcmp(shm, "bye") != 0) { -- return 9; -- } -- return 0; --} --],dnl -+ AC_CHECK_FUNC(shmget,[ +@@ -89,7 +89,10 @@ int main() { + } + ]])],[dnl AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) -- msg=yes,msg=no,msg=no) -- AC_MSG_RESULT([$msg]) -- -- AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) -- AC_TRY_RUN([ --#include --#include --#include --#include --#include -- --#ifndef MAP_ANON --# ifdef MAP_ANONYMOUS --# define MAP_ANON MAP_ANONYMOUS --# endif --#endif --#ifndef MAP_FAILED --# define MAP_FAILED ((void*)-1) --#endif -- --int main() { -- pid_t pid; -- int status; -- char *shm; -- -- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); -- if (shm == MAP_FAILED) { -- return 1; -- } -- -- strcpy(shm, "hello"); -+ ]) +- msg=yes],[msg=no],[msg=no]) ++ msg=yes],[msg=no],[dnl ++ AC_CHECK_FUNC(shmget,[dnl ++ AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) ++ msg=yes],[msg=no])]) + AC_MSG_RESULT([$msg]) -- pid = fork(); -- if (pid < 0) { -- return 5; -- } else if (pid == 0) { -- strcpy(shm, "bye"); -- return 6; -- } -- if (wait(&status) != pid) { -- return 7; -- } -- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { -- return 8; -- } -- if (strcmp(shm, "bye") != 0) { -- return 9; -- } -- return 0; --} --],dnl -+ AC_CHECK_FUNC(mmap,[ + AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) +@@ -141,7 +144,10 @@ int main() { + } + ]])],[dnl AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) -- msg=yes,msg=no,msg=no) -- AC_MSG_RESULT([$msg]) -+ ]) +- msg=yes],[msg=no],[msg=no]) ++ msg=yes],[msg=no],[dnl ++ AC_CHECK_FUNC(mmap,[dnl ++ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) ++ msg=yes],[msg=no])]) + AC_MSG_RESULT([$msg]) - AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) - AC_TRY_RUN([ + PHP_CHECK_FUNC_LIB(shm_open, rt) -- -1.7.10.4 +2.17.1 diff --git a/lang/php7/patches/1002-gd-iconv.patch b/lang/php7/patches/1002-gd-iconv.patch deleted file mode 100644 index 1418c276..00000000 --- a/lang/php7/patches/1002-gd-iconv.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/ext/gd/libgd/gdkanji.c -+++ b/ext/gd/libgd/gdkanji.c -@@ -9,6 +9,11 @@ - #include "gdhelpers.h" - - #include -+ -+/* force usage of internal conversation routine */ -+#undef HAVE_ICONV_H -+#undef HAVE_ICONV -+ - #if defined(HAVE_ICONV_H) || defined(HAVE_ICONV) - #include - #ifdef HAVE_ERRNO_H diff --git a/lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch b/lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch deleted file mode 100644 index 5359ab99..00000000 --- a/lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -453,7 +453,10 @@ PHP_CHECK_FUNC(gethostname, nsl) - PHP_CHECK_FUNC(gethostbyaddr, nsl) - PHP_CHECK_FUNC(yp_get_default_domain, nsl) - --PHP_CHECK_FUNC(dlopen, dl) -+PHP_ADD_LIBRARY(dl) -+PHP_DEF_HAVE(dlopen) -+PHP_DEF_HAVE(libdl) -+ac_cv_func_dlopen=yes - if test "$ac_cv_func_dlopen" = "yes"; then - AC_DEFINE(HAVE_LIBDL, 1, [ ]) - fi ---- a/ext/fileinfo/config.m4 -+++ b/ext/fileinfo/config.m4 -@@ -46,6 +46,10 @@ int main(void) - AC_MSG_RESULT(no) - AC_MSG_NOTICE(using libmagic strcasestr implementation) - libmagic_sources="$libmagic_sources libmagic/strcasestr.c" -+ ],[ -+ dnl cross-compiling; assume not present -+ AC_MSG_NOTICE(using libmagic strcasestr implementation) -+ libmagic_sources="$libmagic_sources libmagic/strcasestr.c" - ]) - - PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic) ---- a/ext/opcache/config.m4 -+++ b/ext/opcache/config.m4 -@@ -227,7 +227,14 @@ AC_TRY_RUN([ - flock_type=linux - AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) - AC_MSG_RESULT("yes") --], AC_MSG_RESULT("no") ) -+], [ -+ AC_MSG_RESULT("no") -+], [ -+ dnl cross-compiling; assume Linux -+ flock_type=linux -+ AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) -+ AC_MSG_RESULT("yes") -+]) - - AC_MSG_CHECKING("whether flock struct is BSD ordered") - AC_TRY_RUN([ -@@ -243,7 +250,12 @@ AC_TRY_RUN([ - flock_type=bsd - AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) - AC_MSG_RESULT("yes") --], AC_MSG_RESULT("no") ) -+], [ -+ AC_MSG_RESULT("no") -+], [ -+ dnl cross-compiling; assume Linux -+ AC_MSG_RESULT("no") -+]) - - if test "$flock_type" == "unknown"; then - AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) diff --git a/lang/php7/patches/1004-disable-phar-command.patch b/lang/php7/patches/1004-disable-phar-command.patch index e6162cdf..ee478ad4 100644 --- a/lang/php7/patches/1004-disable-phar-command.patch +++ b/lang/php7/patches/1004-disable-phar-command.patch @@ -1,6 +1,6 @@ --- a/ext/phar/config.m4 2016-08-17 21:50:58.000000000 +0200 +++ b/ext/phar/config.m4 2016-09-20 22:21:28.494934775 +0200 -@@ -26,7 +26,7 @@ +@@ -19,7 +19,7 @@ fi PHP_ADD_EXTENSION_DEP(phar, hash, true) PHP_ADD_EXTENSION_DEP(phar, spl, true) @@ -11,7 +11,7 @@ --- a/configure.ac 2016-09-20 22:26:38.000000000 +0200 +++ b/configure.ac 2016-09-20 22:42:30.380101556 +0200 -@@ -1448,13 +1448,13 @@ +@@ -1430,13 +1430,13 @@ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)" diff --git a/lang/php7/patches/1006-multiline-syslog.patch b/lang/php7/patches/1006-multiline-syslog.patch deleted file mode 100644 index 1346481f..00000000 --- a/lang/php7/patches/1006-multiline-syslog.patch +++ /dev/null @@ -1,178 +0,0 @@ -commit f11d40ef88f640fe4764d2731d3061472aefe556 -Author: Philip Prindeville -Date: Wed Aug 9 20:55:25 2017 -0600 - - Turn php_syslog() into wrapper for syslog and split lines - -diff --git a/Zend/zend_smart_string.h b/Zend/zend_smart_string.h -index 2282202..12d755e 100644 ---- a/Zend/zend_smart_string.h -+++ b/Zend/zend_smart_string.h -@@ -136,6 +136,10 @@ static zend_always_inline void smart_string_setl(smart_string *dest, char *src, - dest->c = src; - } - -+static zend_always_inline void smart_string_reset(smart_string *str) { -+ str->len = 0; -+} -+ - #endif - - /* -diff --git a/configure.ac b/configure.ac -index cb95d86..a63354f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1443,7 +1443,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \ - php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ - strlcat.c explicit_bzero.c mergesort.c reentrancy.c php_variables.c php_ticks.c \ - network.c php_open_temporary_file.c \ -- output.c getopt.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) -+ output.c getopt.c php_syslog.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) - - PHP_ADD_SOURCES_X(main, fastcgi.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1, PHP_FASTCGI_OBJS, no) - -diff --git a/main/php_syslog.c b/main/php_syslog.c -new file mode 100644 -index 0000000..c351951 ---- /dev/null -+++ b/main/php_syslog.c -@@ -0,0 +1,81 @@ -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 7 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2017 The PHP Group | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.01 of the PHP license, | -+ | that is bundled with this package in the file LICENSE, and is | -+ | available through the world-wide-web at the following url: | -+ | http://www.php.net/license/3_01.txt | -+ | If you did not receive a copy of the PHP license and are unable to | -+ | obtain it through the world-wide-web, please send a note to | -+ | license@php.net so we can mail you a copy immediately. | -+ +----------------------------------------------------------------------+ -+ | Author: Philip Prindeville | -+ +----------------------------------------------------------------------+ -+*/ -+ -+/* $Id$ */ -+ -+#include -+#include -+#include -+#include -+#include "php.h" -+#include "php_syslog.h" -+ -+#include "zend.h" -+#include "zend_smart_string.h" -+ -+/* -+ * The SCO OpenServer 5 Development System (not the UDK) -+ * defines syslog to std_syslog. -+ */ -+ -+#ifdef HAVE_STD_SYSLOG -+#define syslog std_syslog -+#endif -+ -+PHPAPI void php_syslog(int priority, const char *format, ...) /* {{{ */ -+{ -+ const char *ptr; -+ unsigned char c; -+ smart_string fbuf = {0}; -+ smart_string sbuf = {0}; -+ va_list args; -+ -+ va_start(args, format); -+ zend_printf_to_smart_string(&fbuf, format, args); -+ smart_string_0(&fbuf); -+ va_end(args); -+ -+ for (ptr = fbuf.c; ; ++ptr) { -+ c = *ptr; -+ if (c == '\0') { -+ syslog(priority, "%.*s", (int)sbuf.len, sbuf.c); -+ break; -+ } -+ -+ if (c != '\n') -+ smart_string_appendc(&sbuf, c); -+ else { -+ syslog(priority, "%.*s", (int)sbuf.len, sbuf.c); -+ smart_string_reset(&sbuf); -+ } -+ } -+ -+ smart_string_free(&fbuf); -+ smart_string_free(&sbuf); -+} -+ -+/* }}} */ -+ -+/* -+ * Local variables: -+ * tab-width: 4 -+ * c-basic-offset: 4 -+ * End: -+ * vim600: sw=4 ts=4 fdm=marker -+ * vim<600: sw=4 ts=4 -+ */ -diff --git a/main/php_syslog.h b/main/php_syslog.h -index be68cc4..4c4ca4e 100644 ---- a/main/php_syslog.h -+++ b/main/php_syslog.h -@@ -21,6 +21,8 @@ - #ifndef PHP_SYSLOG_H - #define PHP_SYSLOG_H - -+#include "php.h" -+ - #ifdef PHP_WIN32 - #include "win32/syslog.h" - #else -@@ -30,26 +32,12 @@ - #endif - #endif - --/* -- * The SCO OpenServer 5 Development System (not the UDK) -- * defines syslog to std_syslog. -- */ -- --#ifdef syslog -- --#ifdef HAVE_STD_SYSLOG --#define php_syslog std_syslog --#endif -- --#undef syslog -+BEGIN_EXTERN_C() -+PHPAPI void php_syslog(int, const char *format, ...); -+END_EXTERN_C() - - #endif - --#ifndef php_syslog --#define php_syslog syslog --#endif -- --#endif - /* - * Local variables: - * tab-width: 4 -diff --git a/win32/build/config.w32 b/win32/build/config.w32 -index 6cbb18b..71cf491 100644 ---- a/win32/build/config.w32 -+++ b/win32/build/config.w32 -@@ -244,7 +244,8 @@ ADD_FLAG("CFLAGS_BD_ZEND", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); - ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \ - php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ - strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c network.c \ -- php_open_temporary_file.c output.c internal_functions.c php_sprintf.c"); -+ php_open_temporary_file.c output.c internal_functions.c php_sprintf.c \ -+ php_syslog.c"); - ADD_FLAG("CFLAGS_BD_MAIN", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); - - AC_DEFINE('HAVE_STRNLEN', 1); diff --git a/lang/php7/patches/1010-pcrelib-NativeMIPS.patch b/lang/php7/patches/1010-pcrelib-NativeMIPS.patch deleted file mode 100644 index 7a1ac468..00000000 --- a/lang/php7/patches/1010-pcrelib-NativeMIPS.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c 2017-11-28 02:22:57.000000000 -0700 -+++ b/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c 2017-12-29 17:35:44.231934114 -0700 -@@ -498,12 +498,13 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_gen - - SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) - { -+ sljit_sw fir = 0; -+ - switch (feature_type) { - case SLJIT_HAS_FPU: - #ifdef SLJIT_IS_FPU_AVAILABLE - return SLJIT_IS_FPU_AVAILABLE; - #elif defined(__GNUC__) -- sljit_sw fir; - asm ("cfc1 %0, $0" : "=r"(fir)); - return (fir >> 22) & 0x1; - #else diff --git a/lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch b/lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch deleted file mode 100644 index 6dfbe51e..00000000 --- a/lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch +++ /dev/null @@ -1,69 +0,0 @@ -commit 31e53f07c26e5ac75ec2c2d99497439323dbdaf7 -Author: Philip Prindeville -Date: Wed Jan 24 18:47:19 2018 -0700 - - Be consistent in clearing out in php_iconv_string() - - Also, don't bother checking returned point in error case since it - will always be NULL (and not require free()ing, obviously). - -diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c -index 35dafd4..4289242 100644 ---- a/ext/iconv/iconv.c -+++ b/ext/iconv/iconv.c -@@ -559,6 +559,8 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, - size_t result; - zend_string *ret, *out_buffer; - -+ *out = NULL; -+ - /* - This is not the right way to get output size... - This is not space efficient for large text. - -commit 3763c8f1645983b5abc37c60597e1ecc1bf89019 -Author: Philip Prindeville -Date: Thu Jan 25 14:18:00 2018 -0700 - - Always free out_buf in php_iconv_string() - -diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c -index 4289242..807bb14 100644 ---- a/ext/iconv/iconv.c -+++ b/ext/iconv/iconv.c -@@ -697,6 +697,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, - iconv_close(cd); - - if (result == (size_t)(-1)) { -+ zend_string_free(out_buf); - switch (errno) { - case EINVAL: - retval = PHP_ICONV_ERR_ILLEGAL_CHAR; -@@ -713,7 +714,6 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, - - default: - /* other error */ -- zend_string_free(out_buf); - return PHP_ICONV_ERR_UNKNOWN; - } - } -@@ -986,9 +986,6 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval, - err = php_iconv_string(ndl, ndl_nbytes, &ndl_buf, GENERIC_SUPERSET_NAME, enc); - - if (err != PHP_ICONV_ERR_SUCCESS) { -- if (ndl_buf != NULL) { -- zend_string_free(ndl_buf); -- } - return err; - } - -@@ -2465,9 +2462,6 @@ PHP_NAMED_FUNCTION(php_if_iconv) - if (err == PHP_ICONV_ERR_SUCCESS && out_buffer != NULL) { - RETVAL_STR(out_buffer); - } else { -- if (out_buffer != NULL) { -- zend_string_free(out_buffer); -- } - RETURN_FALSE; - } - } diff --git a/lang/python/Flask/Makefile b/lang/python/Flask/Makefile index 08131551..82c0b1c0 100644 --- a/lang/python/Flask/Makefile +++ b/lang/python/Flask/Makefile @@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=Flask -PKG_VERSION:=1.1.1 +PKG_VERSION:=1.1.2 PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52 +PKG_HASH:=4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=BSD-3-Clause @@ -30,7 +30,6 @@ define Package/python3-flask +python3-itsdangerous +python3-jinja2 +python3 +python3-logging \ +python3-markupsafe +python3-multiprocessing +python3-setuptools \ +python3-werkzeug - VARIANT:=python3 endef define Package/python3-flask/description diff --git a/lang/python/Jinja2/Makefile b/lang/python/Jinja2/Makefile index 6be18dbc..ad727d06 100644 --- a/lang/python/Jinja2/Makefile +++ b/lang/python/Jinja2/Makefile @@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=Jinja2 -PKG_VERSION:=2.10.3 +PKG_VERSION:=2.11.2 PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de +PKG_HASH:=89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=BSD-3-Clause @@ -25,9 +25,8 @@ define Package/python3-jinja2 CATEGORY:=Languages SUBMENU:=Python TITLE:=Jinja2 - URL:=http://jinja.pocoo.org/ + URL:=https://palletsprojects.com/p/jinja/ DEPENDS:=+python3-light +python3-markupsafe - VARIANT:=python3 endef define Package/python3-jinja2/description diff --git a/lang/python/MarkupSafe/Makefile b/lang/python/MarkupSafe/Makefile index dde6dede..cd951854 100644 --- a/lang/python/MarkupSafe/Makefile +++ b/lang/python/MarkupSafe/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=MarkupSafe PKG_VERSION:=1.1.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b @@ -26,7 +26,6 @@ define Package/python3-markupsafe TITLE:=MarkupSafe URL:=https://palletsprojects.com/p/markupsafe/ DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-markupsafe/description diff --git a/lang/python/README.md b/lang/python/README.md index 501c1e69..ac3bf51c 100644 --- a/lang/python/README.md +++ b/lang/python/README.md @@ -1,70 +1,40 @@ # Python packages folder -:warning: **Python 2 will soon be unsupported and removed from the feed - [see below](#python-2-end-of-life)** :warning: - ## Table of contents 1. [Description](#description) -2. [Python 2 end-of-life](#python-2-end-of-life) - 1. [Transition policy / schedule](#transition-policy--schedule) -3. [Introduction](#introduction) -4. [Using Python[3] in external/other package feeds](#using-python3-in-externalother-package-feeds) +2. [Introduction](#introduction) +3. [Python 2 end-of-life](#python-2-end-of-life) +4. [Using Python in external/other package feeds](#using-python-in-externalother-package-feeds) 5. [Build considerations](#build-considerations) 6. [General folder structure](#general-folder-structure) -7. [Building a Python[3] package](#building-a-python3-package) - 1. [Include python[3]-package.mk](#include-python3-packagemk) +7. [Building a Python package](#building-a-python-package) + 1. [Include python3-package.mk](#include-python3-packagemk) 2. [Add Package/ OpenWrt definitions](#add-packagepkg_name-openwrt-definitions) - 3. [Wrapping things up so that they build](#wrapping-things-up-so-that-they-build) - 4. [Customizing things](#customizing-things) - 5. [Host-side Python packages for build](#host-side-python-packages-for-build) + 3. [Python package dependencies](#python-package-dependencies) + 4. [Wrapping things up so that they build](#wrapping-things-up-so-that-they-build) + 5. [Customizing things](#customizing-things) + 6. [Host-side Python packages for build](#host-side-python-packages-for-build) ## Description This section describes specifics for the Python packages that are present in this repo, and how things are structured. -In terms of license, contributing guide, etc, all of that information is described in the top [README.md](README.md) file, and it applies here as well. This document attempts to cover only technical aspects of Python/Python3 packages, and maybe some explanations about how things are (and why they are as they are). - -## Python 2 end-of-life - -Python 2 will not be maintained past [1 January 2020](https://pythonclock.org/). As such, we will be transitioning Python 2 programs and libraries to Python 3, and Python 2 packages will be removed in early 2020. - -(Discussion for how to handle this transition can be found in [#8520](https://github.com/openwrt/packages/issues/8520).) - -### Transition policy / schedule - -A mass removal event ("The Snap") will occur on 31 March 2020, or 2 weeks before the freeze for a 20.x release, whichever is sooner. The exact date will be confirmed when the 20.x release schedule is known, or by 15 March 2020. - -All Python 2 packages (the Python 2 interpreter, programs that depend on Python 2, and Python 2-only libraries) will be removed during this event. - -Leading up to "The Snap": - -* In general, new Python 2 packages are no longer accepted - * Exceptions can be made on a case-by-case basis, given extraordinary circumstances or reasons, until 31 May 2019 - * From 31 May 2019 onward, absolutely no new Python 2 packages will be accepted - -* The Python 2 interpreter will remain in the feed until "The Snap" - * The interpreter will continue to be updated, including the last release in January 2020 (if there is one) - -* Programs that depend on Python 2 will be transitioned to Python 3 (see [#8893](https://github.com/openwrt/packages/issues/8893)) - * If a program cannot be transitioned, a suitable replacement will be found - * If a replacement cannot be found, the program will be removed during "The Snap" - -* Python 2 libraries will remain in the feed until "The Snap" - * For any Python 2-only libraries, a Python 3 version will be added (or a suitable replacement found), if its Python 3 version is a dependency of another package in the feed - * Python 2 libraries will receive normal updates until 31 October 2019 - * From 31 October 2019 onward: - * Python 2-only libraries will receive security updates only - * Python 2 libraries that share the same Makefile as their Python 3 version will continue to receive normal updates +In terms of license, contributing guide, etc, all of that information is described in the top [README.md](../../README.md) file, and it applies here as well. This document attempts to cover only technical aspects of Python packages, and maybe some explanations about how things are (and why they are as they are). ## Introduction -This sub-tree came to exist after a number of contributions (Python packages) were made to this repo, and the [lang](lang) subtree grew to a point where a decision was made to move all Python packages under [lang/python](lang/python). +This sub-tree came to exist after a number of contributions (Python packages) were made to this repo, and the [lang](../) subtree grew to a point where a decision was made to move all Python packages under [lang/python](./). -It contains the 2 Python interpreters (Python & Python3) and Python packages. Most of the Python packages are downloaded from [pypi.org](https://pypi.org/). Python packages from [pypi.org](https://pypi.org/) are typically preferred when adding new packages. +It contains the Python 3 interpreter and Python packages. Most of the Python packages are downloaded from [pypi.org](https://pypi.org/). Python packages from pypi.org are typically preferred when adding new packages. -If more packages (than the ones packaged here) are needed, they can be downloaded via [pip or pip3](https://pip.pypa.io). Note that the versions of `pip` & `setuptools` [available in this repo] are the ones that are packaged inside the Python & Python3 packages (yes, Python & Python3 come packaged with `pip` & `setuptools`). +If more packages (than the ones packaged here) are needed, they can be downloaded via [pip](https://pip.pypa.io). Note that the versions of `pip` & `setuptools` [available in this repo] are the ones that are packaged inside the Python package (yes, Python comes packaged with `pip` & `setuptools`). -## Using Python[3] in external/other package feeds +## Python 2 end-of-life + +Python 2 [will not be maintained past 2020](https://www.python.org/dev/peps/pep-0373/). All Python 2 packages have been removed from the packages feed (this repo) and archived in the [abandoned packages feed](https://github.com/openwrt/packages-abandoned). + +## Using Python in external/other package feeds In the feeds.conf (or feeds.conf.default file, whatever is preferred), the packages repo should be present. @@ -79,14 +49,12 @@ src-git telephony https://git.openwrt.org/feed/telephony.git src-git someotherfeed https://github.com// ``` -Assuming that there are Python packages in the ``, they should include `python[3]-package.mk` like this: +Assuming that there are Python packages in the ``, they should include `python3-package.mk` like this: ``` -include $(TOPDIR)/feeds/packages/lang/python/python-package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk ``` -Same rules apply for `python[3]-package.mk` as the Python packages in this repo. -And if only 1 of `python-package.mk` or `python3-package.mk` is needed, then only the needed mk file should be included (though it's not an issue if both are included). +Same rules apply for `python3-package.mk` as the Python packages in this repo. **One important consideration:**: if the local name is not `packages`, it's something else, like `openwrt-packages`. And in `feeds.conf[.default]` it's: ``` @@ -95,7 +63,6 @@ src-git openwrt-packages https://git.openwrt.org/feed/packages.git Then, the inclusions also change: ``` -include $(TOPDIR)/feeds/openwrt-packages/lang/python/python-package.mk include $(TOPDIR)/feeds/openwrt-packages/lang/python/python3-package.mk ``` @@ -104,101 +71,86 @@ Each maintainer[s] of external packages feeds is responsible for the local name, In case there is a need/requirement such that the local package feed is named something else than `packages`, one approach to make the package flexible to change is: ``` -PYTHON_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/python/python-package.mk) +PYTHON3_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/python/python3-package.mk) # verify that there is only one single file returned -ifneq (1,$(words $(PYTHON_PACKAGE_MK))) -ifeq (0,$(words $(PYTHON_PACKAGE_MK))) -$(error did not find python-package.mk in any feed) +ifneq (1,$(words $(PYTHON3_PACKAGE_MK))) +ifeq (0,$(words $(PYTHON3_PACKAGE_MK))) +$(error did not find python3-package.mk in any feed) else -$(error found multiple python-package.mk files in the feeds) +$(error found multiple python3-package.mk files in the feeds) endif else -$(info found python-package.mk at $(PYTHON_PACKAGE_MK)) +$(info found python3-package.mk at $(PYTHON3_PACKAGE_MK)) endif -include $(PYTHON_PACKAGE_MK) +include $(PYTHON3_PACKAGE_MK) ``` -Same can be done for `python3-package.mk`. -This should solve the corner-case where the `python[3]-package.mk` can be in some other feed, or if the packages feed will be named something else locally. +This should solve the corner-case where the `python3-package.mk` can be in some other feed, or if the packages feed will be named something else locally. ## Build considerations -In order to build the Python[3] interpreters, a host Python/Python3 interpreter needs to be built, in order to process some of the build for the target Python/Python3 build. The host Python[3] interpreters are also needed so that Python bytecodes are generated, so the host interpreters need to be the exact versions as on the target. And finally, the host Python[3] interpreters also provide pip & pip3, so that they may be used to install some Python[3] packages that are required to build other Python[3] packages. -That's why you'll also see a Python/Python3 build & staging directories. +In order to build the Python interpreter, a host Python interpreter needs to be built, in order to process some of the build for the target Python build. The host Python interpreter is also needed so that Python bytecodes are generated, so the host interpreter needs to be the exact version as on the target. And finally, the host Python interpreter also provides pip, so that it may be used to install some Python packages that are required to build other Python packages. +That's why you'll also see a Python build & staging directories. -As you're probably thinking, this sounds [and is] somewhat too much complication [just for packaging], but the status of things is-as-it-is, and it's probably much worse than what's currently visible on the surface [with respect to packaging Python[3] & packages]. +As you're probably thinking, this sounds [and is] somewhat too much complication [just for packaging], but the status of things is-as-it-is, and it's probably much worse than what's currently visible on the surface [with respect to packaging Python & packages]. -As mentioned earlier, Python[3] packages are shipped with bytecodes, and the reason for this is simply performance & size. +As mentioned earlier, Python packages are shipped with bytecodes, and the reason for this is simply performance & size. The thought/discussion matrix derives a bit like this: * shipping both Python source-code & bytecodes takes too much space on some devices ; Python source code & byte-code take about similar disk-size * shipping only Python source code has a big performance penalty [on some lower end systems] ; something like 500 msecs (Python source-only) -> 70 msecs (Python byte-codes) time reduction for a simple "Hello World" script -* shipping only Python byte-codes seems like a good trade-off, and this means that `python-src` & `python3-src` can be provided for people that want the source code +* shipping only Python byte-codes seems like a good trade-off, and this means that `python3-src` can be provided for people that want the source code -By default, automatic Python[3] byte-code generation is disabled when running a Python script, in order to prevent a disk from accidentally filling up. Since some disks reside in RAM, this also means not filling up the RAM. If someone wants to convert Python source to byte-code then he/she is free to compile it [directly on the device] manually via the Python interpreter & library. +By default, automatic Python byte-code generation is disabled when running a Python script, in order to prevent a disk from accidentally filling up. Since some disks reside in RAM, this also means not filling up the RAM. If someone wants to convert Python source to byte-code then he/she is free to compile it [directly on the device] manually via the Python interpreter & library. ## General folder structure -The basis of all these packages are: -* [lang/python/python](lang/python/python) - The Python 2.7.y interpreter (supposedly, there won't ever by a 2.8.y) -* [lang/python/python3](lang/python/python3) - The Python 3.x.y interpreter +The basis of all these packages is: +* [lang/python/python3](./python3) - The Python 3.x.y interpreter -These 2 are normal OpenWrt packages, which will build the Python interpreters. They also provide `python[3]-pip` & `python[3]-setuptools`. Each Python or Python3 package is actually split into multiple sub-packages [e.g. python-email, python-sqlite3, etc]. This can be viewed inside [lang/python/python/files](lang/python/python/files) & [lang/python/python3/files](lang/python/python3/files). +This is a normal OpenWrt package, which will build the Python interpreter. This also provides `python3-pip` & `python3-setuptools`. Each Python package is actually split into multiple sub-packages [e.g. python3-email, python3-sqlite3, etc]. This can be viewed inside [lang/python/python3/files](./python3/files). -The reason for this splitting, is purely to offer a way for some people to package Python/Python3 in as-minimal-as-possible-and-still-runable way, and also to be somewhat maintainable when packaging. A standard Python[3] installation can take ~20-30 MBs of disk, which can be somewhat big for some people, so there are the `python[3]-base` packages which bring that down to ~5 MBs. This seems to be good enough (and interesting) for a number of people. +The reason for this splitting, is purely to offer a way for some people to package Python in as-minimal-as-possible-and-still-runable way, and also to be somewhat maintainable when packaging. A standard Python installation can take ~20-30 MBs of disk, which can be somewhat big for some people, so there is the `python3-base` package which brings that down to ~5 MBs. This seems to be good enough (and interesting) for a number of people. -The Python[3] interpreters are structured like this: -* `python-base` (and `python3-base`), which is just the minimal package to startup Python[3] and run basic commands -* `python` (and `python3`) are meta-packages, which install almost everything (python[3]-base [plus] Python[3] library [minus] some unit-tests & some windows-y things) -* `python-light` (and `python3-light`) are `python` (and `python3`) [minus] packages that are in [lang/python/python/files](lang/python/python/files) or [lang/python/python3/files](lang/python/python3/files) ; the size of these 2 packages may be sensible (and interesting) to another group of people +The Python interpreter is structured like this: +* `python3-base`, which is just the minimal package to startup Python and run basic commands +* `python3` is a meta-package, which installs almost everything (python3-base [plus] Python library [minus] some unit-tests & some windows-y things) +* `python3-light` is `python3` [minus] packages that are in [lang/python/python3/files](./python3/files) ; the size of this package may be sensible (and interesting) to another group of people -All other Python & Python3 packages (aside from the 2 intepreters) typically use these files: -* **python[3]-host.mk** - this file contains paths and build rules for running the Python[3] interpreters on the host-side; they also provide paths to host interprete, host Python lib-dir & so on -* **python[3]-package.mk** - * includes **python[3]-host.mk** - * contains all the default build rules for Python[3] packages; these will be detailed below in the [Building a Python[3] package](#Building a Python[3] package) section +All other Python packages (aside from the intepreter) typically use these files: +* **python3-host.mk** - this file contains paths and build rules for running the Python interpreter on the host-side; they also provide paths to host interprete, host Python lib-dir & so on +* **python3-package.mk** + * includes **python3-host.mk** + * contains all the default build rules for Python packages; these will be detailed below in the [Building a Python package](#building-a-python-package) section -**Note** that Python/Python3 packages don't need to use these files (i.e. `python[3]-package.mk` & `python[3]-host.mk`), but they do provide some ease-of-use & reduction of duplicate code, especially when packaging for both Python & Python3. And they do contain some learned-lessons about packaging Python/Python3 packages, so it's a good idea to use them. +**Note** that Python packages don't need to use these files (i.e. `python3-package.mk` & `python3-host.mk`), but they do provide some ease-of-use & reduction of duplicate code. And they do contain some learned-lessons about packaging Python packages, so it's a good idea to use them. -## Building a Python[3] package +## Building a Python package -A Python package can be packaged for either Python or Python3 or both. +### Include python3-package.mk -This section will describe both, and then it can be inferred which is for which. - -Packaging for both Python & Python3 uses the `VARIANT` mechanism for packaging inside OpenWrt. (#### FIXME: find a link for this later if it exists) - -### Include python[3]-package.mk - -If packaging for Python, add this after `include $(INCLUDE_DIR)/package.mk` -``` -include ../python-package.mk -``` - -If packaging for Python3, add this after `include $(INCLUDE_DIR)/package.mk` +Add this after `include $(INCLUDE_DIR)/package.mk` ``` include ../python3-package.mk ``` -Order doesn't matter between `python-package.mk` & `python3-package.mk`. - -These will make sure that build rules for Python or Python3 can be specified and picked up for build. +This will make sure that build rules for Python can be specified and picked up for build. ### Include pypi.mk (optional) -If the package source code will be downloaded from [pypi.org](https://pypi.org/), including `pypi.mk` can help simplify the package Makefile. +`pypi.mk` is an include file that makes downloading package source code from [pypi.org](https://pypi.org/) simpler. To use `pypi.mk`, add this **before** `include $(INCLUDE_DIR)/package.mk`: ``` include ../pypi.mk ``` -`pypi.mk` has several `PYPI_*` variables that must/can be set (see below); these should be set before `pypi.mk` is included, i.e. before the `include ../pypi.mk` line. +`pypi.mk` has several `PYPI_*` variables that can/must be set (see below); these should be set before `pypi.mk` is included, i.e. before the `include ../pypi.mk` line. `pypi.mk` also provides default values for `PKG_SOURCE` and `PKG_SOURCE_URL`, so these variables may be omitted. -One variable is required: +Required variables: * `PYPI_NAME`: Package name on pypi.org. This should match the PyPI name exactly. @@ -207,7 +159,7 @@ One variable is required: PYPI_NAME:=PyYAML ``` -These variables are optional: +Optional variables: * `PYPI_SOURCE_NAME`: Package name component of the source tarball filename Default: Same value as `PYPI_NAME` @@ -220,103 +172,93 @@ These variables are optional: PKG_SOURCE?=$(PYPI_SOURCE_NAME)-$(PKG_VERSION).$(PYPI_SOURCE_EXT) ``` -The `PYPI_SOURCE_*` variables allow this default `PKG_SOURCE` value to be customized as necessary. - ### Add Package/ OpenWrt definitions This part is similar to default OpenWrt packages. -It's usually recommended to have a `Package//Default` section that's common for both Python & Python3. Example: ``` -define Package/python-lxml/Default +define Package/python3-lxml SECTION:=lang CATEGORY:=Languages SUBMENU:=Python + TITLE:=Pythonic XML processing library URL:=https://lxml.de - DEPENDS:=+libxml2 +libxslt +libexslt -endef -``` - -Then for each variant do something like: -``` -define Package/python-lxml -$(call Package/python-lxml/Default) - TITLE:=python-lxml - DEPENDS+=+PACKAGE_python-lxml:python-light +PACKAGE_python-lxml:python-codecs - VARIANT:=python + DEPENDS:=+python3-light +libxml2 +libxslt +libexslt endef -define Package/python3-lxml -$(call Package/python-lxml/Default) - TITLE:=python3-lxml - DEPENDS+=+PACKAGE_python3-lxml:python3-light - VARIANT:=python3 +define Package/python3-lxml/description + The lxml XML toolkit is a Pythonic binding + for the C libraries libxml2 and libxslt. endef ``` Some considerations here (based on the example above): -* be sure to make sure that `DEPENDS` are correct for both variants; as seen in the example above, `python-codecs` is needed only for `python-lxml` (see **[note-encodings](#note-encodings)**) -* consider adding conditional DEPENDS for each variant ; so for each Python[3] package add `+PACKAGE_python-lxml:` as seen in the above example ; the reason for this is build-time reduction ; if you want to build Python3 only packages, this won't build Python & Python packages + dependencies ; this is a known functionality of OpenWrt build deps - * this should not happen anymore, but if adding `+PACKAGE_python-lxml` conditional deps creates circular dependencies, then open an issue so this can be resolved again. -* `VARIANT=python` or `VARIANT=python3` must be added -* typically each variant package is named `Package/python-` & `Package/python3-` ; this convention makes things easier to follow, though it could work without naming things this way +* typically the package is named `Package/python3-` ; this convention makes things easier to follow, though it could work without naming things this way * `TITLE` can be something a bit more verbose/neat ; typically the name is short as seen above -**note-encodings**: That's because some character encodings are needed, which are present in `python3-base` but not in `python-light` (but are present in `python-codecs`) ; this is because Python3 is designed to be more Unicode friendly than Python2 (it's one of the fundamental differences between the 2), and Python3 won't start without those encodings being present. +### Python package dependencies +Aside from other libraries and programs, every Python package will depend on at least one of these three types of packages: -Following these, 2 more definitions are required: -``` -define Package/python-lxml/description -The lxml XML toolkit is a Pythonic binding -for the C libraries libxml2 and libxslt. -endef +* The Python interpreter: All Python packages should depend on one of these three interpreter packages: -define Package/python3-lxml/description -$(call Package/python-lxml/description) -. -(Variant for Python3) -endef -``` + * `python3-light` is the best default for most Python packages. -Typically, the description is the same for both, so just mentioning that one is a variant of the other is sufficient. + * `python3-base` should only be used as a dependency if you are certain the bare interpreter is sufficient. + + * `python3` is useful if many (more than three) Python standard library packages are needed. + +* Python standard library packages: As noted above, many parts of the Python standard library are packaged separate from the Python interpreter. These packages are defined by the files in [lang/python/python3/files](./python3/files). + + To find out which of these separate standard library packages are necessary, after completing a draft Makefile (including the `$(eval ...)` lines described in the next section), run `make` with the `configure` target and `PY3=stdlib V=s` in the command line. For example: + + ``` + make package/python-lxml/configure PY3=stdlib V=s + ``` + + If the package has been built previously, include the `clean` target to trigger configure again: + + ``` + make package/python-lxml/{clean,configure} PY3=stdlib V=s + ``` + + This will search the package for module imports and generate a list of suggested dependencies. Some of the found imports may be false positives, e.g. in example or test files, so examine the matches for more information. + +* Other Python packages: The easiest way to find these dependencies is to look for the `install_requires` keyword inside the package's `setup.py` file (it will be a keyword argument to the `setup()` function). This will be a list of run-time dependencies for the package. + + There may already be packages in the packages feed that provide these dependencies. If not, they will need to be packaged for your Python package to function correctly. + + Any packages in a `setup_requires` keyword argument are build-time dependencies that may need to be installed on the host (host Python inside of OpenWrt buildroot, not system Python that is part of the outer computer system). To ensure these build-time dependencies are present, see [Host-side Python packages for build](#host-side-python-packages-for-build). (Note that Setuptools is already installed as part of host Python.) ### Wrapping things up so that they build If all the above prerequisites have been met, all that's left is: ``` -$(eval $(call PyPackage,python-lxml)) -$(eval $(call BuildPackage,python-lxml)) - $(eval $(call Py3Package,python3-lxml)) $(eval $(call BuildPackage,python3-lxml)) ``` -The `$(eval $(call PyPackage,python-lxml))` part will instantiate all the default Python build rules so that the final Python package is packaged into an OpenWrt. -And `$(eval $(call BuildPackage,python-lxml))` will bind all the rules generated with `$(eval $(call PyPackage,python-lxml))` into the OpenWrt build system. +The `$(eval $(call Py3Package,python3-lxml))` part will instantiate all the default Python build rules so that the final Python package is packaged into an OpenWrt. +And `$(eval $(call BuildPackage,python3-lxml))` will bind all the rules generated with `$(eval $(call Py3Package,python3-lxml))` into the OpenWrt build system. These packages will contain byte-codes and binaries (shared libs & other stuff). -If a user wishes to ship source code, adding 2 more lines creates 2 more packages that ship Python source code: +If a user wishes to ship source code, adding one more line creates one more package that ship Python source code: ``` -$(eval $(call PyPackage,python-lxml)) -$(eval $(call BuildPackage,python-lxml)) -$(eval $(call BuildPackage,python-lxml-src)) - $(eval $(call Py3Package,python3-lxml)) $(eval $(call BuildPackage,python3-lxml)) $(eval $(call BuildPackage,python3-lxml-src)) ``` -The name `*-src` must be the Python package name; so for `python-lxml-src` a equivalent `python-lxml` name must exist. +The name `*-src` must be the Python package name; so for `python3-lxml-src` a equivalent `python3-lxml` name must exist. ### Customizing things Some packages need custom build rules (because they do). -The default package build and install processes are defined in `python[3]-package.mk`. +The default package build and install processes are defined in `python3-package.mk`. #### Building @@ -324,35 +266,35 @@ The default build process calls `setup.py install` inside the directory where th There are several Makefile variables that can be used to customize this process (all optional): -* `PYTHON_PKG_SETUP_DIR` / `PYTHON3_PKG_SETUP_DIR`: Path where `setup.py` can be found, relative to the package directory (`PKG_BUILD_DIR`). +* `PYTHON3_PKG_SETUP_DIR`: Path where `setup.py` can be found, relative to the package directory (`PKG_BUILD_DIR`). Default: empty value (`setup.py` is in the package directory) -* `PYTHON_PKG_SETUP_VARS` / `PYTHON3_PKG_SETUP_VARS`: Additional environment variables to set for the call to `setup.py`. Should be in the form of `VARIABLE1=value VARIABLE2=value ...`. +* `PYTHON3_PKG_SETUP_VARS`: Additional environment variables to set for the call to `setup.py`. Should be in the form of `VARIABLE1=value VARIABLE2=value ...`. Default: empty value -* `PYTHON_PKG_SETUP_GLOBAL_ARGS` / `PYTHON3_PKG_SETUP_GLOBAL_ARGS`: Additional command line arguments to pass to `setup.py`, before / in front of the `install` command. +* `PYTHON3_PKG_SETUP_GLOBAL_ARGS`: Additional command line arguments to pass to `setup.py`, before / in front of the `install` command. Default: empty value -* `PYTHON_PKG_SETUP_ARGS` / `PYTHON3_PKG_SETUP_ARGS`: Additional command line arguments to pass to `setup.py`, after the `install` command. +* `PYTHON3_PKG_SETUP_ARGS`: Additional command line arguments to pass to `setup.py`, after the `install` command. Default: `--single-version-externally-managed` -Conceptually, these variables are used in this way (using a Python 2 package as an example): +Conceptually, these variables are used in this way: ``` -cd $(PKG_BUILD_DIR)/$(PYTHON_PKG_SETUP_DIR) -$(PYTHON_PKG_SETUP_VARS) python setup.py $(PYTHON_PKG_SETUP_GLOBAL_ARGS) install $(PYTHON_PKG_SETUP_ARGS) +cd $(PKG_BUILD_DIR)/$(PYTHON3_PKG_SETUP_DIR) +$(PYTHON3_PKG_SETUP_VARS) python3 setup.py $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) install $(PYTHON3_PKG_SETUP_ARGS) ``` -The default build process can be completely overridden by defining custom `PyBuild/Compile` & `Py3Build/Compile` rules in the package Makefile. +The default build process can be completely overridden by defining a custom `Py3Build/Compile` rule in the package Makefile. #### Installing The default install process copies some/all of the files from `PKG_INSTALL_DIR`, placed there by the build process, to a location passed to the install rule as the first argument (`$(1)`). The OpenWrt build system will then take those files and create the actual .ipk package archives. This default process uses 2 build rules: -* `PyPackage//filespec` & `Py3Package//filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` (`PYTHON[3]_PKG_DIR`) ; most Python[3] packages generate files that get installed in this sub-folder -* `PyPackage//install` & `Py3Package//install` is similar to `Package//install` ; these allow binary (or other files) to be installed on the target +* `Py3Package//filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON3_VERSION)/site-packages` (`PYTHON3_PKG_DIR`) ; most Python packages generate files that get installed in this sub-folder +* `Py3Package//install` is similar to `Package//install` ; this allows binary (or other files) to be installed on the target -Both the 2 above rules generate a `Package//install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python[3] packages. +Both the 2 above rules generate a `Package//install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python packages. -The `PyPackage//filespec` & `Py3Package//filespec` rules contain one or more lines of the following format (whitespace added for clarity): +The `Py3Package//filespec` rule contains one or more lines of the following format (whitespace added for clarity): ``` | | @@ -366,33 +308,35 @@ The initial character controls the action that will be taken: * File permissions is not used / ignored in this case. * `=`: Assign the given file permissions to the given path. File permissions is required in this case. -As mentioned, the default `PyPackage//filespec` & `Py3Package//filespec` install `PYTHON[3]_PKG_DIR`: +As mentioned, the default `Py3Package//filespec` installs `PYTHON3_PKG_DIR`: ``` -define PyPackage/python-example/filespec -+|$(PYTHON_PKG_DIR) +define Py3Package/python3-example/filespec ++|$(PYTHON3_PKG_DIR) endef ``` -If the package installs a `example_package` directory inside `PYTHON_PKG_DIR`, and there is an `examples` directory and `test_*.py` files that can be omitted to save space, this can be specified as: +If the package installs a `example_package` directory inside `PYTHON3_PKG_DIR`, and there is an `examples` directory and `test_*.py` files that can be omitted to save space, this can be specified as: ``` -define PyPackage/python-example/filespec -+|$(PYTHON_PKG_DIR) --|$(PYTHON_PKG_DIR)/example_package/examples --|$(PYTHON_PKG_DIR)/example_package/test_*.py +define Py3Package/python3-example/filespec ++|$(PYTHON3_PKG_DIR) +-|$(PYTHON3_PKG_DIR)/example_package/examples +-|$(PYTHON3_PKG_DIR)/example_package/test_*.py endef ``` ### Host-side Python packages for build -These can be installed via pip and ideally they should only be installed like this, because it's a bit simpler than running them through the OpenWrt build system. Build variants on the host-side build are more complicated (and nearly impossible to do sanely) in the current OpenWrt build system. +These can be installed via pip and ideally they should only be installed like this, because it's a bit simpler than running them through the OpenWrt build system. Which is why [for example] if you need python cffi on the host build, it's easier to just add it via: ``` -HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)" +PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)" ``` -[cffi is one of those packages that needs a host-side package installed for both Python & Python3]. +[cffi is one of those packages that needs a host-side package installed]. This works reasonably well in the current OpenWrt build system, as binaries get built for this package and get installed in the staging-dir `$(STAGING_DIR)/usr/lib/pythonX.Y/site-packages`. + +`PKG_BUILD_PARALLEL:=0` is necessary because installing packages with multiple concurrent pip processes can lead to [errors or unexpected results](https://github.com/pypa/pip/issues/2361). diff --git a/lang/python/Werkzeug/Makefile b/lang/python/Werkzeug/Makefile index deb3a51b..1d2951f6 100644 --- a/lang/python/Werkzeug/Makefile +++ b/lang/python/Werkzeug/Makefile @@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=Werkzeug -PKG_VERSION:=0.16.0 +PKG_VERSION:=1.0.1 PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7 +PKG_HASH:=6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=BSD-3-Clause @@ -26,7 +26,6 @@ define Package/python3-werkzeug TITLE:=Werkzeug URL:=https://palletsprojects.com/p/werkzeug/ DEPENDS:=+python3-light +python3-email - VARIANT:=python3 endef define Package/python3-werkzeug/description diff --git a/lang/python/bcrypt/Makefile b/lang/python/bcrypt/Makefile index eb56b00e..3a8bdf7d 100644 --- a/lang/python/bcrypt/Makefile +++ b/lang/python/bcrypt/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bcrypt PKG_VERSION:=3.1.7 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42 @@ -16,54 +16,29 @@ PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=libffi/host -HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.1" +PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.1" include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/bcrypt/Default +define Package/python3-bcrypt SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Modern password hashing URL:=https://github.com/pyca/bcrypt/ -endef - -define Package/python-bcrypt -$(call Package/bcrypt/Default) DEPENDS:= \ - +PACKAGE_python-bcrypt:python \ - +PACKAGE_python-bcrypt:python-cffi \ - +PACKAGE_python-bcrypt:python-six - VARIANT:=python -endef - -define Package/python3-bcrypt -$(call Package/bcrypt/Default) - DEPENDS:= \ - +PACKAGE_python3-bcrypt:python3 \ - +PACKAGE_python3-bcrypt:python3-cffi \ - +PACKAGE_python3-bcrypt:python3-six - VARIANT:=python3 -endef - -define Package/python-bcrypt/description - Good password hashing for your software and your servers. + +python3 \ + +python3-cffi \ + +python3-six endef define Package/python3-bcrypt/description -$(call Package/python-bcrypt/description) -. -(Variant for Python3) + Good password hashing for your software and your servers. endef -$(eval $(call PyPackage,python-bcrypt)) -$(eval $(call BuildPackage,python-bcrypt)) -$(eval $(call BuildPackage,python-bcrypt-src)) - $(eval $(call Py3Package,python3-bcrypt)) $(eval $(call BuildPackage,python3-bcrypt)) $(eval $(call BuildPackage,python3-bcrypt-src)) diff --git a/lang/python/click-log/Makefile b/lang/python/click-log/Makefile index 3da043a5..5a39c81d 100644 --- a/lang/python/click-log/Makefile +++ b/lang/python/click-log/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=click-log PKG_VERSION:=0.3.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Karel Kočí PKG_SOURCE_URL:=https://codeload.github.com/click-contrib/click-log/tar.gz/$(PKG_VERSION)? @@ -24,7 +24,6 @@ define Package/python3-click-log URL:=http://github.com/mitsuhiko/click TITLE:=python3-click-log DEPENDS:=+python3-click - VARIANT:=python3 endef define Package/python3-click-log/description diff --git a/lang/python/click/Makefile b/lang/python/click/Makefile index 4d237083..fff235d8 100644 --- a/lang/python/click/Makefile +++ b/lang/python/click/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=click PKG_VERSION:=7.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PYPI_SOURCE_NAME:=Click @@ -27,7 +27,6 @@ define Package/python3-click TITLE:=Click URL:=https://palletsprojects.com/p/click/ DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-click/description diff --git a/lang/python/django-appconf/Makefile b/lang/python/django-appconf/Makefile index 34ce696e..1f3a0e36 100644 --- a/lang/python/django-appconf/Makefile +++ b/lang/python/django-appconf/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-appconf -PKG_VERSION:=1.0.3 +PKG_VERSION:=1.0.4 PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=35f13ca4d567f132b960e2cd4c832c2d03cb6543452d34e29b7ba10371ba80e3 +PKG_HASH:=be58deb54a43d77d2e1621fe59f787681376d3cd0b8bd8e4758ef6c3a6453380 PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=BSD-3-Clause @@ -20,50 +20,24 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-appconf/Default +define Package/python3-django-appconf SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Helper class for handling config defaults URL:=https://django-appconf.readthedocs.io -endef - -define Package/python-django-appconf -$(call Package/django-appconf/Default) DEPENDS:= \ - +PACKAGE_python-django-appconf:python \ - python-django1 \ - +PACKAGE_python-django-appconf:python-six - VARIANT:=python - MDEPENDS:=python-django1 -endef - -define Package/python-django-appconf/description - A helper class for handling configuration defaults of packaged apps gracefully -endef - -define Package/python3-django-appconf -$(call Package/django-appconf/Default) - DEPENDS:= \ - +PACKAGE_python3-django-appconf:python3 \ - +PACKAGE_python3-django-appconf:python3-django1 \ - +PACKAGE_python3-django-appconf:python3-six - VARIANT:=python3 + +python3 \ + +python3-django1 \ + +python3-six endef define Package/python3-django-appconf/description -$(call Package/python-django-appconf/description) -. -(Variant for Python3) + A helper class for handling configuration defaults of packaged apps gracefully endef -$(eval $(call PyPackage,python-django-appconf)) -$(eval $(call BuildPackage,python-django-appconf)) -$(eval $(call BuildPackage,python-django-appconf-src)) - $(eval $(call Py3Package,python3-django-appconf)) $(eval $(call BuildPackage,python3-django-appconf)) $(eval $(call BuildPackage,python3-django-appconf-src)) diff --git a/lang/python/django-compressor/Makefile b/lang/python/django-compressor/Makefile index 0c277d36..66b4de71 100644 --- a/lang/python/django-compressor/Makefile +++ b/lang/python/django-compressor/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-compressor -PKG_VERSION:=2.2 -PKG_RELEASE:=7 +PKG_VERSION:=2.4 +PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) PYPI_SOURCE_NAME:=django_compressor -PKG_HASH:=9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f +PKG_HASH:=d2ed1c6137ddaac5536233ec0a819e14009553fee0a869bea65d03e5285ba74f PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=MIT @@ -21,55 +21,28 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-compressor/Default +define Package/python3-django-compressor SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Compress CSS/JS into single cached files URL:=https://django-compressor.readthedocs.io -endef - -define Package/python-django-compressor -$(call Package/django-compressor/Default) DEPENDS:= \ - +PACKAGE_python-django-compressor:python \ - python-django1 \ - +PACKAGE_python-django-compressor:python-django-appconf \ - +PACKAGE_python-django-compressor:python-rcssmin - VARIANT:=python - MDEPENDS:=python-django1 + +python3 \ + +python3-django1 \ + +python3-django-appconf \ + +python3-rcssmin endef -define Package/python-django-compressor/description +define Package/python3-django-compressor/description Compresses linked and inline JavaScript or CSS into single cached files. Note that the JavaScript filter is not being installed as a dependency. You'll need to build the rjsmin module (it is not par of the openwrt standard feeds) to use JavaScript functionality. endef -define Package/python3-django-compressor -$(call Package/django-compressor/Default) - DEPENDS:= \ - +PACKAGE_python3-django-compressor:python3 \ - +PACKAGE_python3-django-compressor:python3-django1 \ - +PACKAGE_python3-django-compressor:python3-django-appconf \ - +PACKAGE_python3-django-compressor:python3-rcssmin - VARIANT:=python3 -endef - -define Package/python3-django-compressor/description -$(call Package/python-django-compressor/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-django-compressor)) -$(eval $(call BuildPackage,python-django-compressor)) -$(eval $(call BuildPackage,python-django-compressor-src)) - $(eval $(call Py3Package,python3-django-compressor)) $(eval $(call BuildPackage,python3-django-compressor)) $(eval $(call BuildPackage,python3-django-compressor-src)) diff --git a/lang/python/django-constance/Makefile b/lang/python/django-constance/Makefile deleted file mode 100644 index 1332c44d..00000000 --- a/lang/python/django-constance/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2007-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-constance -PKG_VERSION:=2.3.1 -PKG_RELEASE:=5 - -PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=a49735063b2c30015d2e52a90609ea9798da722ed070f091de51714758a5d018 - -PKG_MAINTAINER:=Alexandru Ardelean -PKG_LICENSE:=BSD-3-Clause - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk -include ../python3-package.mk - -define Package/python-django-constance/Default - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=Django live settings with pluggable backends, including Redis. - URL:=https://github.com/jazzband/django-constance -endef - -define Package/python-django-constance -$(call Package/python-django-constance/Default) - DEPENDS:= \ - +PACKAGE_python-django-constance:python \ - python-django1 - VARIANT:=python - MDEPENDS:=python-django1 -endef - -define Package/python-django-constance/description - Django live settings with pluggable backends, including Redis. -endef - -define Package/python3-django-constance -$(call Package/python-django-constance/Default) - DEPENDS:= \ - +PACKAGE_python3-django-constance:python3 \ - +PACKAGE_python3-django-constance:python3-django1 - VARIANT:=python3 -endef - -define Package/python3-django-constance/description -$(call Package/python-django-constance/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-django-constance)) -$(eval $(call BuildPackage,python-django-constance)) -$(eval $(call BuildPackage,python-django-constance-src)) - -$(eval $(call Py3Package,python3-django-constance)) -$(eval $(call BuildPackage,python3-django-constance)) -$(eval $(call BuildPackage,python3-django-constance-src)) diff --git a/lang/python/django-formtools/Makefile b/lang/python/django-formtools/Makefile index c391da95..27104b57 100644 --- a/lang/python/django-formtools/Makefile +++ b/lang/python/django-formtools/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-formtools PKG_VERSION:=2.1 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=7703793f1675aa6e871f9fed147e8563816d7a5b9affdc5e3459899596217f7c @@ -18,49 +18,24 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-formtools/Default +define Package/python3-django-formtools SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=High-level abstractions for Django forms URL:=https://django-formtools.readthedocs.io -endef - -define Package/python-django-formtools -$(call Package/django-formtools/Default) DEPENDS:= \ - +PACKAGE_python-django-formtools:python \ - python-django1 - VARIANT:=python - MDEPENDS:=python-django1 + +python3 \ + +python3-django1 endef -define Package/python-django-formtools/description +define Package/python3-django-formtools/description Django "formtools" is a set of high-level abstractions for Django forms. Currently for form previews and multi-step forms. endef -define Package/python3-django-formtools -$(call Package/django-formtools/Default) - DEPENDS:= \ - +PACKAGE_python3-django-formtools:python3 \ - +PACKAGE_python3-django-formtools:python3-django1 - VARIANT:=python3 -endef - -define Package/python3-django-formtools/description -$(call Package/python-django-formtools/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-django-formtools)) -$(eval $(call BuildPackage,python-django-formtools)) -$(eval $(call BuildPackage,python-django-formtools-src)) - $(eval $(call Py3Package,python3-django-formtools)) $(eval $(call BuildPackage,python3-django-formtools)) $(eval $(call BuildPackage,python3-django-formtools-src)) diff --git a/lang/python/django-jsonfield/Makefile b/lang/python/django-jsonfield/Makefile index 2ed18e8a..39b998d1 100644 --- a/lang/python/django-jsonfield/Makefile +++ b/lang/python/django-jsonfield/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-jsonfield PKG_VERSION:=2.1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=jsonfield PKG_HASH:=ed7c5e1829e9453e24a8bebef1e702ffe402e6def6b326f0e0b88764c59a6dc7 @@ -20,51 +20,25 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-jsonfield/Default +define Package/python3-django-jsonfield SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=A reusable Django field to store validated JSON in models URL:=https://github.com/rpkilby/jsonfield -endef - -define Package/python-django-jsonfield -$(call Package/django-jsonfield/Default) DEPENDS:= \ - +PACKAGE_python-django-jsonfield:python \ - python-django1 \ - +PACKAGE_python-django-jsonfield:python-six - VARIANT:=python - MDEPENDS:=python-django1 + +python3 \ + +python3-django1 \ + +python3-six endef -define Package/python-django-jsonfield/description +define Package/python3-django-jsonfield/description jsonfield is a reusable model field that allows you to store validated JSON, automatically handling serialization to and from the database. endef -define Package/python3-django-jsonfield -$(call Package/django-jsonfield/Default) - DEPENDS:= \ - +PACKAGE_python3-django-jsonfield:python3 \ - +PACKAGE_python3-django-jsonfield:python3-django1 \ - +PACKAGE_python3-django-jsonfield:python3-six - VARIANT:=python3 -endef - -define Package/python3-django-jsonfield/description -$(call Package/python-django-jsonfield/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-django-jsonfield)) -$(eval $(call BuildPackage,python-django-jsonfield)) -$(eval $(call BuildPackage,python-django-jsonfield-src)) - $(eval $(call Py3Package,python3-django-jsonfield)) $(eval $(call BuildPackage,python3-django-jsonfield)) $(eval $(call BuildPackage,python3-django-jsonfield-src)) diff --git a/lang/python/django-jsonfield2/Makefile b/lang/python/django-jsonfield2/Makefile new file mode 100644 index 00000000..961d3453 --- /dev/null +++ b/lang/python/django-jsonfield2/Makefile @@ -0,0 +1,49 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +# Please do not update: 3.0.3 is the last version compatible with Django 1.11 +PKG_NAME:=django-jsonfield2 +PKG_VERSION:=3.0.3 +PKG_RELEASE:=1 + +# Source for 3.0.3 is not available from PyPI +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/rpkilby/jsonfield2/tar.gz/$(PKG_VERSION)? +PKG_HASH:=4b79ac28738671fe27cadbd537d50130c35a286207d31d8320c7b48b6cda36ca + +PKG_MAINTAINER:=Jeffery To +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DIR:=$(BUILD_DIR)/jsonfield2-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-django-jsonfield2 + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=A reusable Django field to store validated JSON in models + URL:=https://github.com/rpkilby/jsonfield2 + DEPENDS:=+python3-light +python3-decimal +django + CONFLICTS:=python3-django-jsonfield +endef + +define Package/python3-django-jsonfield2/description + A modern fork of django-jsonfield, compatible with the latest versions + of Django. + + jsonfield2 is a reusable model field that allows you to store + validated JSON, automatically handling serialization to and from the + database. +endef + +$(eval $(call Py3Package,python3-django-jsonfield2)) +$(eval $(call BuildPackage,python3-django-jsonfield2)) +$(eval $(call BuildPackage,python3-django-jsonfield2-src)) diff --git a/lang/python/django-picklefield/Makefile b/lang/python/django-picklefield/Makefile index c240b3f4..7d5705aa 100644 --- a/lang/python/django-picklefield/Makefile +++ b/lang/python/django-picklefield/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-picklefield PKG_VERSION:=2.1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=67a5e156343e3b032cac2f65565f0faa81635a99c7da74b0f07a0f5db467b646 @@ -20,53 +20,26 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -PYTHON_PKG_SETUP_VARS:= \ - PKG_VERSION="$(PKG_VERSION)" PYTHON3_PKG_SETUP_VARS:= \ PKG_VERSION="$(PKG_VERSION)" -define Package/django-picklefield/Default +define Package/python3-django-picklefield SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Pickled object field for Django URL:=https://github.com/gintas/django-picklefield/ -endef - -define Package/python-django-picklefield -$(call Package/django-picklefield/Default) DEPENDS:= \ - +PACKAGE_python-django-picklefield:python \ - python-django1 - VARIANT:=python - MDEPENDS:=python-django1 -endef - -define Package/python-django-picklefield/description - Pickled object field for Django -endef - -define Package/python3-django-picklefield -$(call Package/django-picklefield/Default) - DEPENDS:= \ - +PACKAGE_python3-django-picklefield:python3 \ - +PACKAGE_python3-django-picklefield:python3-django1 - VARIANT:=python3 + +python3 \ + +python3-django1 endef define Package/python3-django-picklefield/description -$(call Package/python-django-picklefield/description) -. -(Variant for Python3) + Pickled object field for Django endef -$(eval $(call PyPackage,python-django-picklefield)) -$(eval $(call BuildPackage,python-django-picklefield)) -$(eval $(call BuildPackage,python-django-picklefield-src)) - $(eval $(call Py3Package,python3-django-picklefield)) $(eval $(call BuildPackage,python3-django-picklefield)) $(eval $(call BuildPackage,python3-django-picklefield-src)) diff --git a/lang/python/django-postoffice/Makefile b/lang/python/django-postoffice/Makefile index 20af16ee..7e2336cb 100644 --- a/lang/python/django-postoffice/Makefile +++ b/lang/python/django-postoffice/Makefile @@ -7,13 +7,14 @@ include $(TOPDIR)/rules.mk +# Please do not update: 3.3.0 is the last version compatible with Django 1.11 PKG_NAME:=django-postoffice -PKG_VERSION:=3.2.1 +PKG_VERSION:=3.3.0 PKG_RELEASE:=1 PYPI_NAME:=django-post-office PYPI_SOURCE_NAME:=django-post_office -PKG_HASH:=e32427822f647719575094f790ca949ef9f9827ec0e8378cb021f01f3834b2a4 +PKG_HASH:=b06514da601c22e955bd93a4ac6dd6b2218c571ca67c193e62bd1f22cec7536f PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=MIT @@ -21,51 +22,25 @@ PKG_LICENSE_FILES:=LICENSE.txt include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-postoffice/Default +define Package/python3-django-postoffice SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=A Django app to monitor and send mail asynchronously URL:=https://github.com/ui/django-post_office -endef - -define Package/python-django-postoffice -$(call Package/django-postoffice/Default) DEPENDS:= \ - +PACKAGE_python-django-postoffice:python \ - python-django1 \ - +PACKAGE_python-django-postoffice:python-django-jsonfield - VARIANT:=python - MDEPENDS:=python-django1 + +python3 \ + +python3-django1 \ + +python3-django-jsonfield2 endef -define Package/python-django-postoffice/description +define Package/python3-django-postoffice/description A Django app to monitor and send mail asynchronously, complete with template support endef -define Package/python3-django-postoffice -$(call Package/django-postoffice/Default) - DEPENDS:= \ - +PACKAGE_python3-django-postoffice:python3 \ - +PACKAGE_python3-django-postoffice:python3-django1 \ - +PACKAGE_python3-django-postoffice:python3-django-jsonfield - VARIANT:=python3 -endef - -define Package/python3-django-postoffice/description -$(call Package/python-django-postoffice/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-django-postoffice)) -$(eval $(call BuildPackage,python-django-postoffice)) -$(eval $(call BuildPackage,python-django-postoffice-src)) - $(eval $(call Py3Package,python3-django-postoffice)) $(eval $(call BuildPackage,python3-django-postoffice)) $(eval $(call BuildPackage,python3-django-postoffice-src)) diff --git a/lang/python/django-ranged-response/Makefile b/lang/python/django-ranged-response/Makefile index 896073f6..c222983f 100644 --- a/lang/python/django-ranged-response/Makefile +++ b/lang/python/django-ranged-response/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-ranged-response PKG_VERSION:=0.2.0 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=f71fff352a37316b9bead717fc76e4ddd6c9b99c4680cdf4783b9755af1cf985 @@ -18,48 +18,23 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-ranged-response/Default +define Package/python3-django-ranged-response SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Add Content-Range: to FileResponse URL:=https://github.com/i3thuan5/django-ranged-response -endef - -define Package/python-django-ranged-response -$(call Package/django-ranged-response/Default) DEPENDS:= \ - +PACKAGE_python-django-ranged-response:python \ - python-django1 - VARIANT:=python - MDEPENDS:=python-django1 -endef - -define Package/python-django-ranged-response/description - Modified Django FileResponse that adds Content-Range headers. -endef - -define Package/python3-django-ranged-response -$(call Package/django-ranged-response/Default) - DEPENDS:= \ - +PACKAGE_python3-django-ranged-response:python3 \ - +PACKAGE_python3-django-ranged-response:python3-django1 - VARIANT:=python3 + +python3 \ + +python3-django1 endef define Package/python3-django-ranged-response/description -$(call Package/python-django-ranged-response/description) -. -(Variant for Python3) + Modified Django FileResponse that adds Content-Range headers. endef -$(eval $(call PyPackage,python-django-ranged-response)) -$(eval $(call BuildPackage,python-django-ranged-response)) -$(eval $(call BuildPackage,python-django-ranged-response-src)) - $(eval $(call Py3Package,python3-django-ranged-response)) $(eval $(call BuildPackage,python3-django-ranged-response)) $(eval $(call BuildPackage,python3-django-ranged-response-src)) diff --git a/lang/python/django-restframework/Makefile b/lang/python/django-restframework/Makefile index f18b8811..ff5bb155 100644 --- a/lang/python/django-restframework/Makefile +++ b/lang/python/django-restframework/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-restframework PKG_VERSION:=3.11.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=djangorestframework PKG_HASH:=e782087823c47a26826ee5b6fa0c542968219263fb3976ec3c31edab23a4001f @@ -29,13 +29,10 @@ define Package/python3-django-restframework TITLE:=Web APIs for Django, made easy. URL:=https://www.django-rest-framework.org DEPENDS:=+python3 +django - VARIANT:=python3 endef define Package/python3-django-restframework/description Web APIs for Django, made easy. -. -(Variant for Python3) endef $(eval $(call Py3Package,python3-django-restframework)) diff --git a/lang/python/django-restframework39/Makefile b/lang/python/django-restframework39/Makefile index 5cdb76bf..b3a130eb 100644 --- a/lang/python/django-restframework39/Makefile +++ b/lang/python/django-restframework39/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-restframework39 PKG_VERSION:=3.9.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=djangorestframework PKG_HASH:=c12869cfd83c33d579b17b3cb28a2ae7322a53c3ce85580c2a2ebe4e3f56c4fb @@ -20,49 +20,24 @@ PKG_LICENSE_FILES:=LICENSE.md include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-restframework39/Default +define Package/python3-django-restframework39 SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Web APIs for Django, made easy. URL:=https://www.django-rest-framework.org -endef - -define Package/python-django-restframework39 -$(call Package/django-restframework39/Default) DEPENDS:= \ - +PACKAGE_python-django-restframework39:python \ - python-django1 - VARIANT:=python - MDEPENDS:=python-django1 -endef - -define Package/python-django-restframework39/description - Web APIs for Django, made easy. (3.9 series) -endef - -define Package/python3-django-restframework39 -$(call Package/django-restframework39/Default) - DEPENDS:= \ - +PACKAGE_python3-django-restframework39:python3 \ - +PACKAGE_python3-django-restframework39:python3-django1 + +python3 \ + +python3-django1 CONFLICTS:=python3-django-restframework - VARIANT:=python3 endef define Package/python3-django-restframework39/description -$(call Package/python-django-restframework39/description) -. -(Variant for Python3) + Web APIs for Django, made easy. (3.9 series) endef -$(eval $(call PyPackage,python-django-restframework39)) -$(eval $(call BuildPackage,python-django-restframework39)) -$(eval $(call BuildPackage,python-django-restframework39-src)) - $(eval $(call Py3Package,python3-django-restframework39)) $(eval $(call BuildPackage,python3-django-restframework39)) $(eval $(call BuildPackage,python3-django-restframework39-src)) diff --git a/lang/python/django-simple-captcha/Makefile b/lang/python/django-simple-captcha/Makefile index a4431aa5..c3f41dfe 100644 --- a/lang/python/django-simple-captcha/Makefile +++ b/lang/python/django-simple-captcha/Makefile @@ -9,70 +9,39 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-simple-captcha PKG_VERSION:=0.5.12 -PKG_RELEASE:=3 +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/mbi/django-simple-captcha/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=89db73a3883573ad5e22c511948a5500491f9848363174d835a2364750c81a77 +PYPI_NAME:=$(PKG_NAME) +PYPI_SOURCE_EXT:=zip +PKG_HASH:=fc25f0425e282aa82d2a65013049a8dc7c0682f8e05d32681c39a0c55ed322bd PKG_MAINTAINER:=Eneas U de Queiroz PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION) - +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) - -define Package/django-simple-captcha/Default +define Package/python3-django-simple-captcha SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Simple Django captcha application URL:=https://github.com/mbi/django-simple-captcha -endef - -define Package/python-django-simple-captcha -$(call Package/django-simple-captcha/Default) DEPENDS:= \ - +PACKAGE_python-django-simple-captcha:python \ - +PACKAGE_python-django-simple-captcha:python-six \ - python-django1 \ - +PACKAGE_python-django-simple-captcha:python-pillow \ - +PACKAGE_python-django-simple-captcha:python-django-ranged-response - VARIANT:=python - MDEPENDS:=python-django1 + +python3 \ + +python3-six \ + +python3-django1 \ + +python3-pillow \ + +python3-django-ranged-response endef -define Package/python-django-simple-captcha/description +define Package/python3-django-simple-captcha/description Django Simple Captcha is an extremely simple, yet highly customizable Django application to add captcha images to any Django form. endef -define Package/python3-django-simple-captcha -$(call Package/django-simple-captcha/Default) - DEPENDS:= \ - +PACKAGE_python3-django-simple-captcha:python3 \ - +PACKAGE_python3-django-simple-captcha:python3-six \ - +PACKAGE_python3-django-simple-captcha:python3-django1 \ - +PACKAGE_python3-django-simple-captcha:python3-pillow \ - +PACKAGE_python3-django-simple-captcha:python3-django-ranged-response - VARIANT:=python3 -endef - -define Package/python3-django-simple-captcha/description -$(call Package/python-django-simple-captcha/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-django-simple-captcha)) -$(eval $(call BuildPackage,python-django-simple-captcha)) -$(eval $(call BuildPackage,python-django-simple-captcha-src)) - $(eval $(call Py3Package,python3-django-simple-captcha)) $(eval $(call BuildPackage,python3-django-simple-captcha)) $(eval $(call BuildPackage,python3-django-simple-captcha-src)) diff --git a/lang/python/django-statici18n/Makefile b/lang/python/django-statici18n/Makefile index 2e86437f..4f9ad8b1 100644 --- a/lang/python/django-statici18n/Makefile +++ b/lang/python/django-statici18n/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-statici18n PKG_VERSION:=1.9.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=913dd056c1abcbe129b1db806cb4cfb821c4077d7e857d6eb29043ea64f4d1d0 @@ -20,52 +20,25 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-statici18n/Default +define Package/python3-django-statici18n SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Helper for generating JavaScript catalog to static files URL:=https://django-statici18n.readthedocs.io -endef - -define Package/python-django-statici18n -$(call Package/django-statici18n/Default) DEPENDS:= \ - +PACKAGE_python-django-statici18n:python \ - python-django1 \ - +PACKAGE_python-django-statici18n:python-django-appconf \ - +PACKAGE_python-django-statici18n:python-six - VARIANT:=python - MDEPENDS:=python-django1 -endef - -define Package/python-django-statici18n/description - A Django app that provides helper for generating JavaScript catalog to static files. -endef - -define Package/python3-django-statici18n -$(call Package/django-statici18n/Default) - DEPENDS:= \ - +PACKAGE_python3-django-statici18n:python3 \ - +PACKAGE_python3-django-statici18n:python3-django1 \ - +PACKAGE_python3-django-statici18n:python3-django-appconf \ - +PACKAGE_python3-django-statici18n:python3-six - VARIANT:=python3 + +python3 \ + +python3-django1 \ + +python3-django-appconf \ + +python3-six endef define Package/python3-django-statici18n/description -$(call Package/python-django-statici18n/description) -. -(Variant for Python3) + A Django app that provides helper for generating JavaScript catalog to static files. endef -$(eval $(call PyPackage,python-django-statici18n)) -$(eval $(call BuildPackage,python-django-statici18n)) -$(eval $(call BuildPackage,python-django-statici18n-src)) - $(eval $(call Py3Package,python3-django-statici18n)) $(eval $(call BuildPackage,python3-django-statici18n)) $(eval $(call BuildPackage,python3-django-statici18n-src)) diff --git a/lang/python/django-webpack-loader/Makefile b/lang/python/django-webpack-loader/Makefile index 90c65d2a..2702d266 100644 --- a/lang/python/django-webpack-loader/Makefile +++ b/lang/python/django-webpack-loader/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-webpack-loader PKG_VERSION:=0.6.0 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=60bab6b9a037a5346fad12d2a70a6bc046afb33154cf75ed640b93d3ebd5f520 @@ -18,48 +18,23 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django-webpack-loader/Default +define Package/python3-django-webpack-loader SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Transparently use webpack in django URL:=https://github.com/owais/django-webpack-loader -endef - -define Package/python-django-webpack-loader -$(call Package/django-webpack-loader/Default) DEPENDS:= \ - +PACKAGE_python-django-webpack-loader:python \ - python-django1 - VARIANT:=python - MDEPENDS:=python-django1 -endef - -define Package/python-django-webpack-loader/description - Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers. -endef - -define Package/python3-django-webpack-loader -$(call Package/django-webpack-loader/Default) - DEPENDS:= \ - +PACKAGE_python3-django-webpack-loader:python3 \ - +PACKAGE_python3-django-webpack-loader:python3-django1 - VARIANT:=python3 + +python3 \ + +python3-django1 endef define Package/python3-django-webpack-loader/description -$(call Package/python-django-webpack-loader/description) -. -(Variant for Python3) + Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers. endef -$(eval $(call PyPackage,python-django-webpack-loader)) -$(eval $(call BuildPackage,python-django-webpack-loader)) -$(eval $(call BuildPackage,python-django-webpack-loader-src)) - $(eval $(call Py3Package,python3-django-webpack-loader)) $(eval $(call BuildPackage,python3-django-webpack-loader)) $(eval $(call BuildPackage,python3-django-webpack-loader-src)) diff --git a/lang/python/django/Makefile b/lang/python/django/Makefile index e60d693a..405cb162 100644 --- a/lang/python/django/Makefile +++ b/lang/python/django/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django -PKG_VERSION:=3.0.4 +PKG_VERSION:=3.0.7 PKG_RELEASE:=1 PYPI_NAME:=Django -PKG_HASH:=50b781f6cbeb98f673aa76ed8e572a019a45e52bdd4ad09001072dfd91ab07c8 +PKG_HASH:=5052b34b34b3425233c682e0e11d658fd6efd587d11335a0203d827224ada8f2 -PKG_MAINTAINER:=Alexandru Ardelean +PKG_MAINTAINER:=Alexandru Ardelean , Peter Stadler PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE LICENSE.python PKG_CPE_ID:=cpe:/a:djangoproject:django @@ -30,14 +30,12 @@ define Package/python3-django TITLE:=The web framework for perfectionists with deadlines. URL:=https://www.djangoproject.com/ DEPENDS:= +python3 +python3-pytz +python3-sqlparse +python3-asgiref - CONFLICTS:=python3-django1 python-django1-common + CONFLICTS:=python3-django1 PROVIDES:=django - VARIANT:=python3 endef define Package/python3-django/description - The web framework for perfectionists with deadlines (LTS 2.2 series). - Python3 only. + The web framework for perfectionists with deadlines. endef define Py3Package/python3-django/install diff --git a/lang/python/django1/Makefile b/lang/python/django1/Makefile index db260a20..a17d4c29 100644 --- a/lang/python/django1/Makefile +++ b/lang/python/django1/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django1 PKG_VERSION:=1.11.29 -PKG_RELEASE:=2 +PKG_RELEASE:=4 PYPI_NAME:=Django PKG_HASH:=4200aefb6678019a0acf0005cd14cfce3a5e6b9b90d06145fcdd2e474ad4329c @@ -21,71 +21,30 @@ PKG_CPE_ID:=cpe:/a:djangoproject:django include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/django1/Default +define Package/python3-django1 SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=The web framework for perfectionists with deadlines. URL:=https://www.djangoproject.com/ -endef - -define Package/python-django1 -$(call Package/django1/Default) DEPENDS:= \ - +PACKAGE_python-django1:python \ - +PACKAGE_python-django1:python-pytz \ - +PACKAGE_python-django1:python-django1-common - VARIANT:=python - MENU:=1 -endef - -define Package/python-django1/description - The web framework for perfectionists with deadlines (LTS 1.11 series). -endef - -define Package/python3-django1 -$(call Package/django1/Default) - DEPENDS:= \ - +PACKAGE_python3-django1:python3 \ - +PACKAGE_python3-django1:python3-pytz \ - +PACKAGE_python3-django1:python-django1-common - VARIANT:=python3 + +python3 \ + +python3-pytz PROVIDES:=django endef define Package/python3-django1/description -$(call Package/python-django1/description) -. -(Variant for Python3) + The web framework for perfectionists with deadlines (LTS 1.11 series). endef -define Package/python-django1-common -$(call Package/django1/Default) -endef - -define Package/python-django1-common/description -$(call Package/python-django1/description) -. -This package contains files common to both Python 2.7 and Python 3. -endef - -PyPackage/python-django1/install:=: -Py3Package/python3-django1/install:=: - -define Package/python-django1-common/install +define Py3Package/python3-django1/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./files/django-admin $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ + $(1)/usr/bin/django-admin endef -$(eval $(call PyPackage,python-django1)) -$(eval $(call BuildPackage,python-django1)) -$(eval $(call BuildPackage,python-django1-src)) - $(eval $(call Py3Package,python3-django1)) $(eval $(call BuildPackage,python3-django1)) $(eval $(call BuildPackage,python3-django1-src)) - -$(eval $(call BuildPackage,python-django1-common)) diff --git a/lang/python/django1/files/django-admin b/lang/python/django1/files/django-admin deleted file mode 100644 index acf99b94..00000000 --- a/lang/python/django1/files/django-admin +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -shell_code=''' ' -# shell code -if command -v python3.8 > /dev/null && test -e /usr/lib/python3.8/site-packages/django/bin/django-admin.pyc -then - exec python3.8 "$0" "$@" -elif command -v python2.7 > /dev/null && test -e /usr/lib/python2.7/site-packages/django/bin/django-admin.pyc -then - exec python2.7 "$0" "$@" -else - echo "Cannot find installed version of python-django1 or python3-django1." >&2 - exit 1 -fi - -python_code=''' -# python code -# ONLY use DOUBLE quotes <"> after this line -from django.core import management - -if __name__ == "__main__": - management.execute_from_command_line() - -# End of Python code. Do not modify this line. #' diff --git a/lang/python/flup/Makefile b/lang/python/flup/Makefile deleted file mode 100644 index 504b082a..00000000 --- a/lang/python/flup/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=flup -PKG_VERSION:=1.0.3 -PKG_RELEASE:=3 - -PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=5eb09f26eb0751f8380d8ac43d1dfb20e1d42eca0fa45ea9289fa532a79cd159 - -PKG_MAINTAINER:=Alexandru Ardelean -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=PKG-INFO - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk -include ../python3-package.mk - -define Package/flup/Default - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Random assortment of WSGI servers - URL:=https://www.saddi.com/software/flup/ -endef - -define Package/python-flup -$(call Package/flup/Default) - DEPENDS+= \ - +PACKAGE_python-flup:python-light \ - +PACKAGE_python-flup:python-logging - VARIANT:=python -endef - -define Package/python3-flup -$(call Package/flup/Default) - DEPENDS+= \ - +PACKAGE_python3-flup:python3-light \ - +PACKAGE_python3-flup:python3-logging - VARIANT:=python3 -endef - -define Package/python-flup/description - Random assortment of WSGI servers. -endef - -define Package/python3-flup/description -$(call Package/python-flup/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-flup)) -$(eval $(call BuildPackage,python-flup)) -$(eval $(call BuildPackage,python-flup-src)) - -$(eval $(call Py3Package,python3-flup)) -$(eval $(call BuildPackage,python3-flup)) -$(eval $(call BuildPackage,python3-flup-src)) diff --git a/lang/python/gunicorn/Makefile b/lang/python/gunicorn/Makefile index 1e65f4d1..37a3fe99 100644 --- a/lang/python/gunicorn/Makefile +++ b/lang/python/gunicorn/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gunicorn -PKG_VERSION:=19.9.0 -PKG_RELEASE=2 +PKG_VERSION:=20.0.4 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3 +PKG_HASH:=1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626 PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=MIT @@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk define Package/gunicorn/Default @@ -31,67 +30,29 @@ define Package/gunicorn/Default URL:=https://gunicorn.org endef -define Package/python-gunicorn -$(call Package/gunicorn/Default) - DEPENDS:=+python - VARIANT:=python -endef - -define Package/python-gunicorn/description - WSGI HTTP Server for UNIX (libraries) -endef - -define PyPackage/python-gunicorn/filespec -+|$(PYTHON_PKG_DIR) --|$(PYTHON_PKG_DIR)/gunicorn/workers/_gaiohttp.py -endef - define Package/python3-gunicorn $(call Package/gunicorn/Default) + TITLE:=WSGI HTTP Server for UNIX (library) DEPENDS:=+python3 - VARIANT:=python3 endef define Package/python3-gunicorn/description -$(call Package/python-gunicorn/description) -. -(Variant for Python3) + WSGI HTTP Server for UNIX (libraries) endef # Make sure that the binaries are not installed with the libraries -# That means adding some empty Py[3]Package/gunicorn[3]/install rules -define PyPackage/python-gunicorn/install - : -endef - +# That means adding some empty Py3Package/gunicorn3/install rules define Py3Package/python3-gunicorn/install : endef -define Package/gunicorn -$(call Package/gunicorn/Default) - DEPENDS:=+python +python-pkg-resources +python-gunicorn -endef - -define Package/gunicorn/description - WSGI HTTP Server for UNIX (daemon) -endef - -define Package/gunicorn/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(call PyShebang,$(1)/usr/bin/*) -endef - define Package/gunicorn3 $(call Package/gunicorn/Default) - DEPENDS:=+python3 +python3-pkg-resources +python3-gunicorn + DEPENDS:=+python3 +python3-setuptools +python3-gunicorn endef define Package/gunicorn3/description -$(call Package/gunicorn/description) -. -(Variant for Python3) + WSGI HTTP Server for UNIX (daemon) endef define Package/gunicorn3/install @@ -99,17 +60,10 @@ define Package/gunicorn3/install $(INSTALL_BIN) \ $(PKG_INSTALL_DIR)/usr/bin/gunicorn \ $(1)/usr/bin/gunicorn3 - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/gunicorn_paster \ - $(1)/usr/bin/gunicorn3_paster - $(call Py3Shebang,$(1)/usr/bin/*) + $(LN) gunicorn3 $(1)/usr/bin/gunicorn + $(call Python3/FixShebang,$(1)/usr/bin/*) endef -$(eval $(call PyPackage,python-gunicorn)) -$(eval $(call BuildPackage,python-gunicorn)) -$(eval $(call BuildPackage,python-gunicorn-src)) -$(eval $(call BuildPackage,gunicorn)) - $(eval $(call Py3Package,python3-gunicorn)) $(eval $(call BuildPackage,python3-gunicorn)) $(eval $(call BuildPackage,python3-gunicorn-src)) diff --git a/lang/python/itsdangerous/Makefile b/lang/python/itsdangerous/Makefile index 81cd669e..65d49d5d 100644 --- a/lang/python/itsdangerous/Makefile +++ b/lang/python/itsdangerous/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=itsdangerous PKG_VERSION:=1.1.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19 @@ -26,7 +26,6 @@ define Package/python3-itsdangerous TITLE:=ItsDangerous URL:=https://palletsprojects.com/p/itsdangerous/ DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-itsdangerous/description diff --git a/lang/python/numpy/Makefile b/lang/python/numpy/Makefile new file mode 100644 index 00000000..ebec9fee --- /dev/null +++ b/lang/python/numpy/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2019 Jakub Piotr Cłapa +# Copyright (C) 2020 Alexandru Ardelean +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=numpy +# Note: make sure to periodically update the Cython version in HOST_PYTHON3_PACKAGE_BUILD_DEPENDS +PKG_VERSION:=1.19.0 +PKG_RELEASE:=1 + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=76766cc80d6128750075378d3bb7812cf146415bd29b588616f72c943c00d598 + +PKG_MAINTAINER:=Alexandru Ardelean + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.txt +PKG_CPE_ID:=cpe:/a:numpy:numpy + +# yes, zip... sigh +PYPI_SOURCE_EXT:=zip +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="Cython==0.29.20" + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-numpy + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=The fundamental package for scientific computing with Python + URL:=https://www.numpy.org/ + DEPENDS:=@!SOFT_FLOAT +INSTALL_GFORTRAN:libgfortran +python3 +endef + +define Package/python3-numpy/description +NumPy is the fundamental package for array computing with Python. + +By default, this package is built without some modules. +For some modules to be available, the INSTALL_GFORTRAN symbol needs +to be enabled in the OpenWrt core/toolchain. +endef + +$(eval $(call Py3Package,python3-numpy)) +$(eval $(call BuildPackage,python3-numpy)) +$(eval $(call BuildPackage,python3-numpy-src)) diff --git a/lang/python/openpyxl/Makefile b/lang/python/openpyxl/Makefile index f0ea9326..1ee366e5 100644 --- a/lang/python/openpyxl/Makefile +++ b/lang/python/openpyxl/Makefile @@ -8,65 +8,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-openpyxl -PKG_VERSION:=2.6.2 -PKG_RELEASE:=1 +PKG_VERSION:=3.0.3 +PKG_RELEASE:=2 PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENCE.rst PYPI_NAME:=openpyxl -PKG_HASH:=1d2af392cef8c8227bd2ac3ebe3a28b25aba74fd4fa473ce106065f0b73bfe2e +PKG_HASH:=547a9fc6aafcf44abe358b89ed4438d077e9d92e4f182c87e2dc294186dc4b64 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-openpyxl/Default +define Package/python3-openpyxl SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=A Python library to read/write Excel 2010 xlsx/xlsm files URL:=https://openpyxl.readthedocs.org/ -endef - -define Package/python-openpyxl - $(call Package/python-openpyxl/Default) - DEPENDS:= \ - +PACKAGE_python-openpyxl:python \ - +PACKAGE_python-openpyxl:python-defusedxml \ - +PACKAGE_python-openpyxl:python-et_xmlfile \ - +PACKAGE_python-openpyxl:python-jdcal - VARIANT:=python - # The PROVIDES below is deprecated and should be dropped with the next version. - PROVIDES:=openpyxl -endef - -define Package/python3-openpyxl - $(call Package/python-openpyxl/Default) - DEPENDS:= \ - +PACKAGE_python3-openpyxl:python3 \ - +PACKAGE_python3-openpyxl:python3-defusedxml \ - +PACKAGE_python3-openpyxl:python3-et_xmlfile \ - +PACKAGE_python3-openpyxl:python3-jdcal - VARIANT:=python3 -endef - -define Package/python-openpyxl/description - A Python library to read/write Excel 2010 xlsx/xlsm files + DEPENDS:=+python3 +python3-defusedxml +python3-et_xmlfile +python3-jdcal endef define Package/python3-openpyxl/description -$(call Package/python-openpyxl/description) -. -(Variant for Python3) + A Python library to read/write Excel 2010 xlsx/xlsm files endef -$(eval $(call PyPackage,python-openpyxl)) -$(eval $(call BuildPackage,python-openpyxl)) -$(eval $(call BuildPackage,python-openpyxl-src)) - $(eval $(call Py3Package,python3-openpyxl)) $(eval $(call BuildPackage,python3-openpyxl)) $(eval $(call BuildPackage,python3-openpyxl-src)) diff --git a/lang/python/passlib/Makefile b/lang/python/passlib/Makefile index 144939f0..8080be90 100644 --- a/lang/python/passlib/Makefile +++ b/lang/python/passlib/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=passlib PKG_VERSION:=1.7.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=BSD-3-Clause PYPI_NAME:=$(PKG_NAME) @@ -14,30 +14,18 @@ PKG_HASH:=8d666cef936198bc2ab47ee9b0410c94adf2ba798e5a84bf220be079ae7ab6a8 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/passlib/Default +define Package/python3-passlib SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Comprehensive password hashing framework URL:=https://bitbucket.org/ecollins/passlib + DEPENDS:=+python3 +python3-dateutil endef -define Package/python-passlib -$(call Package/passlib/Default) - DEPENDS:=+PACKAGE_python-passlib:python +PACKAGE_python-passlib:python-dateutil - VARIANT:=python -endef - -define Package/python3-passlib -$(call Package/passlib/Default) - DEPENDS:=+PACKAGE_python3-passlib:python3 +PACKAGE_python3-passlib:python3-dateutil - VARIANT:=python3 -endef - -define Package/python-passlib/description +define Package/python3-passlib/description Passlib is a password hashing library for Python 2 & 3, which provides cross-platform implementations of over 30 password hashing algorithms, as well as a framework for managing existing password hashes. It’s @@ -46,16 +34,7 @@ found in /etc/shadow, to providing full-strength password hashing for multi-user applications. endef -define Package/python3-passlib/description -$(call Package/python-passlib/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-passlib)) $(eval $(call Py3Package,python3-passlib)) -$(eval $(call BuildPackage,python-passlib)) -$(eval $(call BuildPackage,python-passlib-src)) $(eval $(call BuildPackage,python3-passlib)) $(eval $(call BuildPackage,python3-passlib-src)) diff --git a/lang/python/pillow/Makefile b/lang/python/pillow/Makefile index e51fc016..281a282b 100644 --- a/lang/python/pillow/Makefile +++ b/lang/python/pillow/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pillow -PKG_VERSION:=6.2.1 +PKG_VERSION:=7.1.2 PKG_RELEASE:=1 PYPI_NAME:=Pillow -PKG_HASH:=bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1 +PKG_HASH:=a0b49960110bc6ff5fead46013bcb8825d101026d466f3a4de3476defe0fb0dd PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=HPND @@ -20,38 +20,19 @@ PKG_CPE_ID:=cpe:/a:python:pillow include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-pillow/Default +define Package/python3-pillow SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=The friendly PIL fork URL:=https://python-pillow.org/ - DEPENDS:=+libfreetype +libjpeg +libtiff +zlib -endef - -define Package/python-pillow -$(call Package/python-pillow/Default) - DEPENDS+=+PACKAGE_python-pillow:python - VARIANT:=python -endef - -define Package/python-pillow/description - The friendly PIL fork -endef - -define Package/python3-pillow -$(call Package/python-pillow/Default) - DEPENDS+=+PACKAGE_python3-pillow:python3 - VARIANT:=python3 + DEPENDS:=+libfreetype +libjpeg +libtiff +zlib +python3 endef define Package/python3-pillow/description -$(call Package/python-pillow/description) -. -(Variant for Python3) + The friendly PIL fork endef PYTHON3_PKG_SETUP_GLOBAL_ARGS += build_ext \ @@ -66,12 +47,6 @@ PYTHON3_PKG_SETUP_GLOBAL_ARGS += build_ext \ --disable-imagequant \ --disable-platform-guessing -PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS) - -$(eval $(call PyPackage,python-pillow)) -$(eval $(call BuildPackage,python-pillow)) -$(eval $(call BuildPackage,python-pillow-src)) - $(eval $(call Py3Package,python3-pillow)) $(eval $(call BuildPackage,python3-pillow)) $(eval $(call BuildPackage,python3-pillow-src)) diff --git a/lang/python/pyjwt/Makefile b/lang/python/pyjwt/Makefile index b8000308..15f131ab 100644 --- a/lang/python/pyjwt/Makefile +++ b/lang/python/pyjwt/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pyjwt PKG_VERSION:=1.7.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Eneas U de Queiroz PKG_LICENSE:=MIT @@ -18,43 +18,21 @@ PKG_HASH:=8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-pyjwt/Default +define Package/python3-pyjwt SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=JSON Web Token implementation in Python URL:=http://github.com/jpadilla/pyjwt -endef - -define Package/python-pyjwt - $(call Package/python-pyjwt/Default) - DEPENDS:=+PACKAGE_python-pyjwt:python - VARIANT:=python -endef - -define Package/python3-pyjwt - $(call Package/python-pyjwt/Default) - DEPENDS:=+PACKAGE_python3-pyjwt:python3 - VARIANT:=python3 -endef - -define Package/python-pyjwt/description - A Python implementation of RFC 7519. + DEPENDS:=+python3 endef define Package/python3-pyjwt/description -$(call Package/python-pyjwt/description) -. -(Variant for Python3) + A Python implementation of RFC 7519. endef -$(eval $(call PyPackage,python-pyjwt)) -$(eval $(call BuildPackage,python-pyjwt)) -$(eval $(call BuildPackage,python-pyjwt-src)) - $(eval $(call Py3Package,python3-pyjwt)) $(eval $(call BuildPackage,python3-pyjwt)) $(eval $(call BuildPackage,python3-pyjwt-src)) diff --git a/lang/python/pymysql/Makefile b/lang/python/pymysql/Makefile index 87baddd1..55275aaf 100644 --- a/lang/python/pymysql/Makefile +++ b/lang/python/pymysql/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pymysql PKG_VERSION:=0.9.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=PyMySQL PKG_HASH:=d8c059dcd81dedb85a9f034d5e22dcb4442c0b201908bede99e306d65ea7c8e7 @@ -31,7 +31,6 @@ define Package/python3-pymysql TITLE:=Pure Python MySQL Client URL:=https://pymysql.readthedocs.io/ DEPENDS:=+python3 +PYTHON3_PYMYSQL_SHA_PASSWORD_SUPPORT:python3-cryptography - VARIANT:=python3 endef define Package/python3-pymysql/config diff --git a/lang/python/pyodbc/Makefile b/lang/python/pyodbc/Makefile index fa70c8f6..805ccda6 100644 --- a/lang/python/pyodbc/Makefile +++ b/lang/python/pyodbc/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pyodbc -PKG_VERSION:=4.0.26 -PKG_RELEASE:=2 +PKG_VERSION:=4.0.30 +PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=e52700b5d24a846483b5ab80acd9153f8e593999c9184ffea11596288fb33de3 -PKG_BUILD_DEPENDS:=python python3 unixodbc +PKG_HASH:=852b5deeeb3366af8b4408efed993501708be45d221881bce60c9aac54be726a +PKG_BUILD_DEPENDS:=python3 unixodbc PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE.txt PKG_MAINTAINER:=Daniel Golle @@ -20,48 +20,23 @@ PKG_BUILD_DEPENDS:=unixodbc/host include ../pypi.mk include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-pyodbc/Default +define Package/python3-pyodbc SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=https://github.com/mkleehammer/pyodbc - DEPENDS:=+unixodbc $(CXX_DEPENDS) -endef - -define Package/python-pyodbc -$(call Package/python-pyodbc/Default) - TITLE:=python-pyodbc - DEPENDS+=+PACKAGE_python-pyodbc:python-light \ - +PACKAGE_python-pyodbc:python-logging \ - +PACKAGE_python-pyodbc:python-openssl - VARIANT:=python -endef - -define Package/python3-pyodbc -$(call Package/python-pyodbc/Default) TITLE:=python3-pyodbc - DEPENDS+=+PACKAGE_python3-pyodbc:python3-light - VARIANT:=python3 + URL:=https://github.com/mkleehammer/pyodbc + DEPENDS:=+unixodbc +python3-light $(CXX_DEPENDS) endef -define Package/python-pyodbc/description +define Package/python3-pyodbc/description DB API Module for ODBC A Python DB API 2 module for ODBC. This project provides an up-to-date, convenient interface to ODBC using native data types like datetime and decimal. endef -define Package/python3-pyodbc/description -$(call Package/python-pyodbc/description) - -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-pyodbc)) -$(eval $(call BuildPackage,python-pyodbc)) - $(eval $(call Py3Package,python3-pyodbc)) $(eval $(call BuildPackage,python3-pyodbc)) diff --git a/lang/python/python-aiohttp-cors/Makefile b/lang/python/python-aiohttp-cors/Makefile index b8c85f95..892a660c 100644 --- a/lang/python/python-aiohttp-cors/Makefile +++ b/lang/python/python-aiohttp-cors/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=aiohttp-cors PKG_VERSION:=0.7.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=aiohttp_cors PYPI_SOURCE_NAME:=aiohttp-cors @@ -32,7 +32,6 @@ define Package/python3-aiohttp-cors DEPENDS:= \ +python3-aiohttp \ +python3-light - VARIANT:=python3 endef define Package/python3-aiohttp-cors/description diff --git a/lang/python/python-aiohttp/Makefile b/lang/python/python-aiohttp/Makefile index d031acf7..f672175e 100644 --- a/lang/python/python-aiohttp/Makefile +++ b/lang/python/python-aiohttp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=aiohttp PKG_VERSION:=3.6.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=fc55b1fec0e4cc1134ffb09ea3970783ee2906dc5dfd7cd16917913f2cfed65b @@ -40,7 +40,6 @@ define Package/python3-aiohttp +python3-codecs \ +python3-cgi \ +python3-openssl - VARIANT:=python3 endef define Package/python3-aiohttp/description diff --git a/lang/python/python-appdirs/Makefile b/lang/python/python-appdirs/Makefile index d876e8b1..8cd958d3 100644 --- a/lang/python/python-appdirs/Makefile +++ b/lang/python/python-appdirs/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-appdirs PKG_VERSION:=1.4.3 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_MAINTAINER:=Karel Kočí PYPI_NAME:=appdirs @@ -22,13 +22,13 @@ define Package/python3-appdirs CATEGORY:=Languages SUBMENU:=Python URL:=https://github.com/ActiveState/appdirs - TITLE:=python3-appdirs + TITLE:=Determining platform-specific dirs DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python-appdirs/description - The Universal Character Encoding Detector + A small Python module for determining appropriate platform-specific + dirs, e.g. a "user data dir". endef $(eval $(call Py3Package,python3-appdirs)) diff --git a/lang/python/python-asn1crypto/Makefile b/lang/python/python-asn1crypto/Makefile index ce719f06..08f6aac2 100644 --- a/lang/python/python-asn1crypto/Makefile +++ b/lang/python/python-asn1crypto/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-asn1crypto PKG_VERSION:=1.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=asn1crypto PKG_HASH:=5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d @@ -29,7 +29,6 @@ define Package/python3-asn1crypto URL:=https://github.com/wbond/asn1crypto TITLE:=Fast pure Python lib for ASN1 structures DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-asn1crypto/description diff --git a/lang/python/python-astral/Makefile b/lang/python/python-astral/Makefile index 302eefc7..b5fe47d4 100644 --- a/lang/python/python-astral/Makefile +++ b/lang/python/python-astral/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-astral PKG_VERSION:=1.10.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=astral PKG_HASH:=d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1 @@ -20,47 +20,23 @@ PKG_MAINTAINER:=Josef Schlehofer include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-astral/Default +define Package/python3-astral SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Calculations for the position of the sun and moon URL:=https://github.com/sffjunkie/astral -endef - -define Package/python-astral -$(call Package/python-astral/Default) DEPENDS+= \ - +PACKAGE_python-astral:python-light \ - +PACKAGE_python-astral:python-pytz - VARIANT:=python -endef - -define Package/python3-astral -$(call Package/python-astral/Default) - DEPENDS+= \ - +PACKAGE_python3-astral:python3-light \ - +PACKAGE_python3-astral:python3-pytz - VARIANT:=python3 -endef - -define Package/python-astral/description -Astral is a python module for calculating the times of various aspects of the sun and moon. + +python3-light \ + +python3-pytz endef define Package/python3-astral/description -$(call Package/python-astral/description) -. -(Variant for Python3) +Astral is a python module for calculating the times of various aspects of the sun and moon. endef -$(eval $(call PyPackage,python-astral)) -$(eval $(call BuildPackage,python-astral)) -$(eval $(call BuildPackage,python-astral-src)) - $(eval $(call Py3Package,python3-astral)) $(eval $(call BuildPackage,python3-astral)) $(eval $(call BuildPackage,python3-astral-src)) diff --git a/lang/python/python-async-timeout/Makefile b/lang/python/python-async-timeout/Makefile index 50a761c6..cb66dd01 100644 --- a/lang/python/python-async-timeout/Makefile +++ b/lang/python/python-async-timeout/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=async-timeout PKG_VERSION:=3.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=async_timeout PYPI_SOURCE_NAME:=async-timeout @@ -32,7 +32,6 @@ define Package/python3-async-timeout DEPENDS:= \ +python3-light \ +python3-asyncio - VARIANT:=python3 endef define Package/python3-async-timeout/description diff --git a/lang/python/python-atomicwrites/Makefile b/lang/python/python-atomicwrites/Makefile index 315f2c33..e29d0ec7 100644 --- a/lang/python/python-atomicwrites/Makefile +++ b/lang/python/python-atomicwrites/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# Copyright (C) 2019-2020 CZ.NIC, z. s. p. o. (https://www.nic.cz/) # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-atomicwrites -PKG_VERSION:=1.3.0 +PKG_VERSION:=1.4.0 PKG_RELEASE:=1 PYPI_NAME:=atomicwrites -PKG_HASH:=75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6 +PKG_HASH:=ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT @@ -29,7 +29,6 @@ define Package/python3-atomicwrites TITLE:=Atomic file writes URL:=https://github.com/untitaker/python-atomicwrites DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-atomicwrites/description diff --git a/lang/python/python-attrs/Makefile b/lang/python/python-attrs/Makefile index 5936704c..240ec6be 100644 --- a/lang/python/python-attrs/Makefile +++ b/lang/python/python-attrs/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-attrs PKG_VERSION:=19.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=attrs PKG_HASH:=f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72 @@ -20,45 +20,23 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-attrs/Default +define Package/python3-attrs SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Classes Without Boilerplate URL:=https://www.attrs.org/ + DEPENDS:=+python3-light endef -define Package/python-attrs -$(call Package/python-attrs/Default) - DEPENDS:=+PACKAGE_python-attrs:python-light - VARIANT:=python -endef - -define Package/python3-attrs -$(call Package/python-attrs/Default) - DEPENDS:=+PACKAGE_python3-attrs:python3-light - VARIANT:=python3 -endef - -define Package/python-attrs/description +define Package/python3-attrs/description attrs is an MIT-licensed Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols. endef -define Package/python3-attrs/description -$(call Package/python-attrs/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-attrs)) -$(eval $(call BuildPackage,python-attrs)) -$(eval $(call BuildPackage,python-attrs-src)) - $(eval $(call Py3Package,python3-attrs)) $(eval $(call BuildPackage,python3-attrs)) $(eval $(call BuildPackage,python3-attrs-src)) diff --git a/lang/python/python-automat/Makefile b/lang/python/python-automat/Makefile index 804d3c88..248f7b70 100644 --- a/lang/python/python-automat/Makefile +++ b/lang/python/python-automat/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-automat PKG_VERSION:=20.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=Automat PKG_HASH:=7979803c74610e11ef0c0d68a2942b152df52da55336e0c9d58daf1831cbdf33 @@ -20,55 +20,27 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -PYTHON_PKG_SETUP_VARS:= \ - PKG_VERSION="$(PKG_VERSION)" PYTHON3_PKG_SETUP_VARS:= \ PKG_VERSION="$(PKG_VERSION)" -define Package/python-automat/Default +define Package/python3-automat SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Concise, idiomatic finite-state automata URL:=https://github.com/glyph/Automat -endef - -define Package/python-automat -$(call Package/python-automat/Default) DEPENDS:= \ - +PACKAGE_python-automat:python-light \ - +PACKAGE_python-automat:python-attrs \ - +PACKAGE_python-automat:python-six - VARIANT:=python -endef - -define Package/python3-automat -$(call Package/python-automat/Default) - DEPENDS:= \ - +PACKAGE_python3-automat:python3-light \ - +PACKAGE_python3-automat:python3-attrs \ - +PACKAGE_python3-automat:python3-six - VARIANT:=python3 -endef - -define Package/python-automat/description -Automat is a library for concise, idiomatic Python expression of -finite-state automata (particularly deterministic finite-state -transducers). + +python3-light \ + +python3-attrs \ + +python3-six endef define Package/python3-automat/description -$(call Package/python-automat/description) -. -(Variant for Python3) -endef - -define PyPackage/python-automat/filespec -+|$(PYTHON_PKG_DIR) --|$(PYTHON_PKG_DIR)/automat/_visualize.py +Automat is a library for concise, idiomatic Python expression of +finite-state automata (particularly deterministic finite-state +transducers). endef define Py3Package/python3-automat/filespec @@ -76,10 +48,6 @@ define Py3Package/python3-automat/filespec -|$(PYTHON3_PKG_DIR)/automat/_visualize.py endef -$(eval $(call PyPackage,python-automat)) -$(eval $(call BuildPackage,python-automat)) -$(eval $(call BuildPackage,python-automat-src)) - $(eval $(call Py3Package,python3-automat)) $(eval $(call BuildPackage,python3-automat)) $(eval $(call BuildPackage,python3-automat-src)) diff --git a/lang/python/python-awscli/Makefile b/lang/python/python-awscli/Makefile index 164ed090..c4818c20 100644 --- a/lang/python/python-awscli/Makefile +++ b/lang/python/python-awscli/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=awscli PKG_VERSION:=1.16.75 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=8d96ec0de325ea8271cc6aa95b7392bbf548ec4aabd3ffbcdc0619b64edd4a45 @@ -12,57 +12,28 @@ PKG_LICENSE:=MIT include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-awscli/Default +define Package/python3-awscli SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=awscli URL:=https://github.com/aws/aws-cli -endef - -define Package/python-awscli -$(call Package/python-awscli/Default) - DEPENDS:=+PACKAGE_python-awscli:python \ - +PACKAGE_python-awscli:python-yaml \ - +PACKAGE_python-awscli:python-pyasn1 \ - +PACKAGE_python-awscli:python-botocore \ - +PACKAGE_python-awscli:python-rsa \ - +PACKAGE_python-awscli:python-colorama \ - +PACKAGE_python-awscli:python-docutils \ - +PACKAGE_python-awscli:python-s3transfer - VARIANT:=python -endef - -define Package/python3-awscli -$(call Package/python-awscli/Default) - DEPENDS:=+PACKAGE_python3-awscli:python3 \ - +PACKAGE_python3-awscli:python3-yaml \ - +PACKAGE_python3-awscli:python3-pyasn1 \ - +PACKAGE_python3-awscli:python3-botocore \ - +PACKAGE_python3-awscli:python3-rsa \ - +PACKAGE_python3-awscli:python3-colorama \ - +PACKAGE_python3-awscli:python3-docutils \ - +PACKAGE_python3-awscli:python3-s3transfer - VARIANT:=python3 -endef - -define Package/python-awscli/description -This package provides a unified command line interface to Amazon Web Services. + DEPENDS:=+python3 \ + +python3-yaml \ + +python3-pyasn1 \ + +python3-botocore \ + +python3-rsa \ + +python3-colorama \ + +python3-docutils \ + +python3-s3transfer endef define Package/python3-awscli/description -$(call Package/python-awscli/description) -. -(Variant for Python3) +This package provides a unified command line interface to Amazon Web Services. endef -$(eval $(call PyPackage,python-awscli)) -$(eval $(call BuildPackage,python-awscli)) -$(eval $(call BuildPackage,python-awscli-src)) - $(eval $(call Py3Package,python3-awscli)) $(eval $(call BuildPackage,python3-awscli)) $(eval $(call BuildPackage,python3-awscli-src)) diff --git a/lang/python/python-boto3/Makefile b/lang/python/python-boto3/Makefile index 4f43b4e1..27f69b3c 100644 --- a/lang/python/python-boto3/Makefile +++ b/lang/python/python-boto3/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=boto3 PKG_VERSION:=1.9.135 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=5e5805992e873e5687b5ef3b4c56c386ccb4df1c3364f8b8601d289e2f275be1 @@ -25,7 +25,6 @@ define Package/python3-boto3 +python3-jmespath \ +python3-botocore \ +python3-s3transfer - VARIANT:=python3 endef define Package/python3-boto3/description diff --git a/lang/python/python-botocore/Makefile b/lang/python/python-botocore/Makefile index d230176b..739be112 100644 --- a/lang/python/python-botocore/Makefile +++ b/lang/python/python-botocore/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=botocore PKG_VERSION:=1.12.66 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=25c39ecc71356287cf79d66981ec77deca374e28043b19b2f818d48aa34272a1 @@ -12,54 +12,27 @@ PKG_LICENSE:=MIT include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-botocore/Default +define Package/python3-botocore SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=botocore URL:=https://github.com/boto/botocore + DEPENDS:=+python3 \ + +python3-urllib3 \ + +python3-docutils \ + +python3-dateutil \ + +python3-jmespath \ + +python3-requests endef -define Package/python-botocore -$(call Package/python-botocore/Default) - DEPENDS:=+PACKAGE_python-botocore:python \ - +PACKAGE_python-botocore:python-urllib3 \ - +PACKAGE_python-botocore:python-docutils \ - +PACKAGE_python-botocore:python-dateutil \ - +PACKAGE_python-botocore:python-jmespath \ - +PACKAGE_python-botocore:python-requests - VARIANT:=python -endef - -define Package/python3-botocore -$(call Package/python-botocore/Default) - DEPENDS:=+PACKAGE_python3-botocore:python3 \ - +PACKAGE_python3-botocore:python3-urllib3 \ - +PACKAGE_python3-botocore:python3-docutils \ - +PACKAGE_python3-botocore:python3-dateutil \ - +PACKAGE_python3-botocore:python3-jmespath \ - +PACKAGE_python3-botocore:python3-requests - VARIANT:=python3 -endef - -define Package/python-botocore/description +define Package/python3-botocore/description A low-level interface to a growing number of Amazon Web Services. The botocore package is the foundation for the AWS CLI as well as boto3. endef -define Package/python3-botocore/description -$(call Package/python-botocore/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-botocore)) -$(eval $(call BuildPackage,python-botocore)) -$(eval $(call BuildPackage,python-botocore-src)) - $(eval $(call Py3Package,python3-botocore)) $(eval $(call BuildPackage,python3-botocore)) $(eval $(call BuildPackage,python3-botocore-src)) diff --git a/lang/python/python-cached-property/Makefile b/lang/python/python-cached-property/Makefile new file mode 100644 index 00000000..cbe83de5 --- /dev/null +++ b/lang/python/python-cached-property/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-cached-property +PKG_VERSION:=1.5.1 +PKG_RELEASE:=2 + +PYPI_NAME:=cached-property +PKG_HASH:=9217a59f14a5682da7c4b8829deadbfc194ac22e9908ccf7c8820234e80a1504 + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +PYTHON3_PKG_SETUP_ARGS:= + +define Package/python3-cached-property + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=A decorator for caching properties in classes + URL:=https://github.com/pydanny/cached-property + DEPENDS:=+python3-light +endef + +define Package/python3-cached-property/description + A decorator for caching properties in classes. +endef + +$(eval $(call Py3Package,python3-cached-property)) +$(eval $(call BuildPackage,python3-cached-property)) +$(eval $(call BuildPackage,python3-cached-property-src)) diff --git a/lang/python/python-cachelib/Makefile b/lang/python/python-cachelib/Makefile index 52b6d93c..05731837 100644 --- a/lang/python/python-cachelib/Makefile +++ b/lang/python/python-cachelib/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cachelib PKG_VERSION:=0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=cachelib PKG_HASH:=8b889b509d372095357b8705966e1282d40835c4126d7c2b07fd414514d8ae8d @@ -26,7 +26,6 @@ define Package/python3-cachelib TITLE:=cachelib URL:=https://github.com/pallets/cachelib DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-cachelib/description diff --git a/lang/python/python-cachetools/Makefile b/lang/python/python-cachetools/Makefile index 6b7ae409..de81b48f 100644 --- a/lang/python/python-cachetools/Makefile +++ b/lang/python/python-cachetools/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cachetools PKG_VERSION:=3.1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=cachetools PKG_HASH:=8ea2d3ce97850f31e4a08b0e2b5e6c34997d7216a9d2c98e0f3978630d4da69a @@ -29,7 +29,6 @@ define Package/python3-cachetools TITLE:=Extensible memoizing collections and decorators URL:=https://github.com/tkem/cachetools DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-cachetools/description diff --git a/lang/python/python-certifi/Makefile b/lang/python/python-certifi/Makefile index 640099b7..35370caa 100644 --- a/lang/python/python-certifi/Makefile +++ b/lang/python/python-certifi/Makefile @@ -6,56 +6,34 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-certifi -PKG_VERSION:=2019.11.28 +PKG_VERSION:=2020.6.20 PKG_RELEASE:=1 -PKG_MAINTAINER:=Eneas U de Queiroz +PKG_MAINTAINER:=Eneas U de Queiroz PKG_LICENSE:=MPL-2.0 PKG_LICENSE_FILES:=LICENSE PYPI_NAME:=certifi -PKG_HASH:=25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f +PKG_HASH:=5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-certifi/Default +define Package/python3-certifi SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Python package for Mozilla's CA Bundle URL:=http://certifi.io/ + DEPENDS:=+python3-light endef -define Package/python-certifi - $(call Package/python-certifi/Default) - DEPENDS:=+PACKAGE_python-certifi:python-light - VARIANT:=python -endef - -define Package/python3-certifi - $(call Package/python-certifi/Default) - DEPENDS:=+PACKAGE_python3-certifi:python3-light - VARIANT:=python3 -endef - -define Package/python-certifi/description +define Package/python3-certifi/description Certifi is a carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. endef -define Package/python3-certifi/description -$(call Package/python-certifi/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-certifi)) -$(eval $(call BuildPackage,python-certifi)) -$(eval $(call BuildPackage,python-certifi-src)) - $(eval $(call Py3Package,python3-certifi)) $(eval $(call BuildPackage,python3-certifi)) $(eval $(call BuildPackage,python3-certifi-src)) diff --git a/lang/python/python-cffi/Makefile b/lang/python/python-cffi/Makefile index 8a973393..5bad6e65 100644 --- a/lang/python/python-cffi/Makefile +++ b/lang/python/python-cffi/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cffi PKG_VERSION:=1.14.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=cffi PKG_HASH:=2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6 @@ -20,48 +20,24 @@ PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean URL:=https://github.com/chardet/chardet -endef - -define Package/python-chardet -$(call Package/python-chardet/Default) - TITLE:=Universal encoding detector for Python 2 - DEPENDS:=+PACKAGE_python-chardet:python - VARIANT:=python -endef - -define Package/python3-chardet -$(call Package/python-chardet/Default) - TITLE:=Universal encoding detector for Python3 - DEPENDS:=+PACKAGE_python3-chardet:python3-light - VARIANT:=python3 -endef - -define Package/python-chardet/description - Universal encoding detector for Python 2 and 3 + TITLE:=Universal encoding detector + DEPENDS:=+python3-light endef define Package/python3-chardet/description -$(call Package/python-chardet/description) -. -(Variant for Python3) + Universal encoding detector for Python 2 and 3 endef define Py3Package/python3-chardet/install @@ -57,13 +38,10 @@ define Py3Package/python3-chardet/install $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ for bin in $(1)/usr/bin/*; do \ mv $$$$bin $$$${bin}3 ; \ + $(LN) $$$${bin##*/}3 $$$$bin ; \ done endef -$(eval $(call PyPackage,python-chardet)) -$(eval $(call BuildPackage,python-chardet)) -$(eval $(call BuildPackage,python-chardet-src)) - $(eval $(call Py3Package,python3-chardet)) $(eval $(call BuildPackage,python3-chardet)) $(eval $(call BuildPackage,python3-chardet-src)) diff --git a/lang/python/python-colorama/Makefile b/lang/python/python-colorama/Makefile index 61c862de..695f1824 100644 --- a/lang/python/python-colorama/Makefile +++ b/lang/python/python-colorama/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=colorama PKG_VERSION:=0.4.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d @@ -12,44 +12,22 @@ PKG_LICENSE:=MIT include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-colorama/Default +define Package/python3-colorama SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=colorama URL:=https://github.com/tartley/colorama + DEPENDS:=+python3 endef -define Package/python-colorama -$(call Package/python-colorama/Default) - DEPENDS:=+PACKAGE_python-colorama:python - VARIANT:=python -endef - -define Package/python3-colorama -$(call Package/python-colorama/Default) - DEPENDS:=+PACKAGE_python3-colorama:python3 - VARIANT:=python3 -endef - -define Package/python-colorama/description +define Package/python3-colorama/description Makes ANSI escape character sequences (for producing colored terminal text and cursor positioning) work under MS Windows. endef -define Package/python3-colorama/description -$(call Package/python-colorama/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-colorama)) -$(eval $(call BuildPackage,python-colorama)) -$(eval $(call BuildPackage,python-colorama-src)) - $(eval $(call Py3Package,python3-colorama)) $(eval $(call BuildPackage,python3-colorama)) $(eval $(call BuildPackage,python3-colorama-src)) diff --git a/lang/python/python-constantly/Makefile b/lang/python/python-constantly/Makefile index e26705f4..129a72b5 100644 --- a/lang/python/python-constantly/Makefile +++ b/lang/python/python-constantly/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-constantly PKG_VERSION:=15.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=constantly PKG_HASH:=586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35 @@ -20,45 +20,23 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-constantly/Default +define Package/python3-constantly SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Symbolic constants in Python URL:=https://github.com/twisted/constantly + DEPENDS:=+python3-light endef -define Package/python-constantly -$(call Package/python-constantly/Default) - DEPENDS:=+PACKAGE_python-constantly:python-light - VARIANT:=python -endef - -define Package/python3-constantly -$(call Package/python-constantly/Default) - DEPENDS:=+PACKAGE_python3-constantly:python3-light - VARIANT:=python3 -endef - -define Package/python-constantly/description +define Package/python3-constantly/description A library that provides symbolic constant support. It includes collections and constants with text, numeric, and bit flag values. Originally twisted.python.constants from the Twisted project. endef -define Package/python3-constantly/description -$(call Package/python-constantly/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-constantly)) -$(eval $(call BuildPackage,python-constantly)) -$(eval $(call BuildPackage,python-constantly-src)) - $(eval $(call Py3Package,python3-constantly)) $(eval $(call BuildPackage,python3-constantly)) $(eval $(call BuildPackage,python3-constantly-src)) diff --git a/lang/python/python-contextlib2/Makefile b/lang/python/python-contextlib2/Makefile index 04c256ce..d5e110a8 100644 --- a/lang/python/python-contextlib2/Makefile +++ b/lang/python/python-contextlib2/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-contextlib2 PKG_VERSION:=0.5.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Karel Kočí PYPI_NAME:=contextlib2 @@ -23,7 +23,6 @@ define Package/python3-contextlib2 URL:=http://contextlib2.readthedocs.org TITLE:=python3-contextlib2 DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python-contextlib2/description diff --git a/lang/python/python-crcmod/Makefile b/lang/python/python-crcmod/Makefile deleted file mode 100644 index 818fa72e..00000000 --- a/lang/python/python-crcmod/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-crcmod -PKG_VERSION:=1.7 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Micke Prag -PKG_LICENSE:=MIT - -PYPI_NAME:=crcmod -PKG_HASH:=dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e - -PKG_BUILD_DEPENDS:=python - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-crcmod - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=python-crcmod - URL:=http://crcmod.sourceforge.net/ - DEPENDS:=+python-light -endef - -define Package/python-crcmod/description - The software in this package is a Python module for generating objects that compute the Cyclic Redundancy Check (CRC). There is no attempt in this package to explain how the CRC works. There are a number of resources on the web that give a good explanation of the algorithms. Just do a Google search for "crc calculation" and browse till you find what you need. Another resource can be found in chapter 20 of the book "Numerical Recipes in C" by Press et. al. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") -endef - -define Package/python-crcmod/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,python-crcmod)) diff --git a/lang/python/python-crypto/Makefile b/lang/python/python-crypto/Makefile deleted file mode 100644 index 94eb78a4..00000000 --- a/lang/python/python-crypto/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright (C) 2009-2015, 2017-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-crypto -PKG_VERSION:=2.6.1 -PKG_RELEASE:=4 - -PYPI_NAME:=pycrypto -PKG_HASH:=f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c - -PKG_LICENSE:=Public Domain -PKG_LICENSE_FILES:=COPYRIGHT -PKG_CPE_ID:=cpe:/a:dlitz:pycrypto -PKG_MAINTAINER:=Jeffery To - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk -include ../python3-package.mk - -PYTHON_PKG_SETUP_ARGS:= -PYTHON_PKG_SETUP_VARS:= \ - CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" - -PYTHON3_PKG_SETUP_ARGS:= -PYTHON3_PKG_SETUP_VARS:= \ - CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" - -define Package/python-crypto/Default - SECTION:=lang-python - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Python Cryptography Toolkit - URL:=https://www.dlitz.net/software/pycrypto/ - DEPENDS:=+libgmp -endef - -define Package/python-crypto -$(call Package/python-crypto/Default) - DEPENDS+=+PACKAGE_python-crypto:python - VARIANT:=python -endef - -define Package/python3-crypto -$(call Package/python-crypto/Default) - DEPENDS+=+PACKAGE_python3-crypto:python3 - VARIANT:=python3 -endef - -define Package/python-crypto/description -A collection of both secure hash functions (such as MD5 and SHA), -and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.). -endef - -define Package/python3-crypto/description -$(call Package/python-crypto/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-crypto)) -$(eval $(call BuildPackage,python-crypto)) -$(eval $(call BuildPackage,python-crypto-src)) - -$(eval $(call Py3Package,python3-crypto)) -$(eval $(call BuildPackage,python3-crypto)) -$(eval $(call BuildPackage,python3-crypto-src)) diff --git a/lang/python/python-crypto/patches/001-no-host-paths.patch b/lang/python/python-crypto/patches/001-no-host-paths.patch deleted file mode 100644 index d481627a..00000000 --- a/lang/python/python-crypto/patches/001-no-host-paths.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -370,7 +370,7 @@ kw = {'name':"pycrypto", - 'ext_modules': plat_ext + [ - # _fastmath (uses GNU mp library) - Extension("Crypto.PublicKey._fastmath", -- include_dirs=['src/','/usr/include/'], -+ include_dirs=['src/'], - libraries=['gmp'], - sources=["src/_fastmath.c"]), - diff --git a/lang/python/python-crypto/patches/002-fix-endianness-detect.patch b/lang/python/python-crypto/patches/002-fix-endianness-detect.patch deleted file mode 100644 index 38e5a5b6..00000000 --- a/lang/python/python-crypto/patches/002-fix-endianness-detect.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -100,6 +100,10 @@ def PrintErr(*args, **kwd): - w(kwd.get("end", "\n")) - - def endianness_macro(): -+ if os.environ["CONFIG_BIG_ENDIAN"] == "y": -+ return ('PCT_BIG_ENDIAN', 1) -+ else: -+ return ('PCT_LITTLE_ENDIAN', 1) - s = struct.pack("@I", 0x33221100) - if s == "\x00\x11\x22\x33".encode(): # little endian - return ('PCT_LITTLE_ENDIAN', 1) diff --git a/lang/python/python-crypto/patches/003-omit-tests.patch b/lang/python/python-crypto/patches/003-omit-tests.patch deleted file mode 100644 index f72bcb07..00000000 --- a/lang/python/python-crypto/patches/003-omit-tests.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -357,16 +357,6 @@ kw = {'name':"pycrypto", - "Crypto.Random", - "Crypto.Random.Fortuna", - "Crypto.Random.OSRNG", -- "Crypto.SelfTest", -- "Crypto.SelfTest.Cipher", -- "Crypto.SelfTest.Hash", -- "Crypto.SelfTest.Protocol", -- "Crypto.SelfTest.PublicKey", -- "Crypto.SelfTest.Random", -- "Crypto.SelfTest.Random.Fortuna", -- "Crypto.SelfTest.Random.OSRNG", -- "Crypto.SelfTest.Util", -- "Crypto.SelfTest.Signature", - "Crypto.Protocol", - "Crypto.PublicKey", - "Crypto.Signature"], diff --git a/lang/python/python-crypto/patches/100-CVE-2013-7459.patch b/lang/python/python-crypto/patches/100-CVE-2013-7459.patch deleted file mode 100644 index db1f740b..00000000 --- a/lang/python/python-crypto/patches/100-CVE-2013-7459.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4 Mon Sep 17 00:00:00 2001 -From: Legrandin -Date: Sun, 22 Dec 2013 22:24:46 +0100 -Subject: [PATCH] Throw exception when IV is used with ECB or CTR - -The IV parameter is currently ignored when initializing -a cipher in ECB or CTR mode. - -For CTR mode, it is confusing: it takes some time to see -that a different parameter is needed (the counter). - -For ECB mode, it is outright dangerous. - -This patch forces an exception to be raised. ---- - lib/Crypto/SelfTest/Cipher/common.py | 31 +++++++++++++++++++++++-------- - src/block_template.c | 11 +++++++++++ - 2 files changed, 34 insertions(+), 8 deletions(-) - -diff --git a/lib/Crypto/SelfTest/Cipher/common.py b/lib/Crypto/SelfTest/Cipher/common.py -index 420b6ff..a5f8a88 100644 ---- a/lib/Crypto/SelfTest/Cipher/common.py -+++ b/lib/Crypto/SelfTest/Cipher/common.py -@@ -239,16 +239,30 @@ class RoundtripTest(unittest.TestCase): - return """%s .decrypt() output of .encrypt() should not be garbled""" % (self.module_name,) - - def runTest(self): -- for mode in (self.module.MODE_ECB, self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB, self.module.MODE_OPENPGP): -+ -+ ## ECB mode -+ mode = self.module.MODE_ECB -+ encryption_cipher = self.module.new(a2b_hex(self.key), mode) -+ ciphertext = encryption_cipher.encrypt(self.plaintext) -+ decryption_cipher = self.module.new(a2b_hex(self.key), mode) -+ decrypted_plaintext = decryption_cipher.decrypt(ciphertext) -+ self.assertEqual(self.plaintext, decrypted_plaintext) -+ -+ ## OPENPGP mode -+ mode = self.module.MODE_OPENPGP -+ encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) -+ eiv_ciphertext = encryption_cipher.encrypt(self.plaintext) -+ eiv = eiv_ciphertext[:self.module.block_size+2] -+ ciphertext = eiv_ciphertext[self.module.block_size+2:] -+ decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv) -+ decrypted_plaintext = decryption_cipher.decrypt(ciphertext) -+ self.assertEqual(self.plaintext, decrypted_plaintext) -+ -+ ## All other non-AEAD modes (but CTR) -+ for mode in (self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB): - encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) - ciphertext = encryption_cipher.encrypt(self.plaintext) -- -- if mode != self.module.MODE_OPENPGP: -- decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) -- else: -- eiv = ciphertext[:self.module.block_size+2] -- ciphertext = ciphertext[self.module.block_size+2:] -- decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv) -+ decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) - decrypted_plaintext = decryption_cipher.decrypt(ciphertext) - self.assertEqual(self.plaintext, decrypted_plaintext) - -diff --git a/src/block_template.c b/src/block_template.c -index f940e0e..d555ceb 100644 ---- a/src/block_template.c -+++ b/src/block_template.c -@@ -170,6 +170,17 @@ ALGnew(PyObject *self, PyObject *args, PyObject *kwdict) - "Key cannot be the null string"); - return NULL; - } -+ if (IVlen != 0 && mode == MODE_ECB) -+ { -+ PyErr_Format(PyExc_ValueError, "ECB mode does not use IV"); -+ return NULL; -+ } -+ if (IVlen != 0 && mode == MODE_CTR) -+ { -+ PyErr_Format(PyExc_ValueError, -+ "CTR mode needs counter parameter, not IV"); -+ return NULL; -+ } - if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR) - { - PyErr_Format(PyExc_ValueError, -From 58de28a5d32bc10e15766e5a59f41b07397cc6cb Mon Sep 17 00:00:00 2001 -From: Richard Mitchell -Date: Mon, 28 Apr 2014 16:58:27 +0100 -Subject: [PATCH] Fix speedtest run for ECB modes. - ---- - pct-speedtest.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/pct-speedtest.py b/pct-speedtest.py -index 4ce18be..c7b893a 100644 ---- a/pct-speedtest.py -+++ b/pct-speedtest.py -@@ -121,6 +121,8 @@ class Benchmark: - blocks = self.random_blocks(16384, 1000) - if mode is None: - cipher = module.new(key) -+ elif mode==module.MODE_ECB: -+ cipher = module.new(key, module.MODE_ECB) - else: - cipher = module.new(key, mode, iv) - diff --git a/lang/python/python-crypto/patches/101-CVE-2018-6594.patch b/lang/python/python-crypto/patches/101-CVE-2018-6594.patch deleted file mode 100644 index 8e8c5582..00000000 --- a/lang/python/python-crypto/patches/101-CVE-2018-6594.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/lib/Crypto/PublicKey/ElGamal.py -+++ b/lib/Crypto/PublicKey/ElGamal.py -@@ -153,33 +153,33 @@ def generate(bits, randfunc, progress_fu - if number.isPrime(obj.p, randfunc=randfunc): - break - # Generate generator g -- # See Algorithm 4.80 in Handbook of Applied Cryptography -- # Note that the order of the group is n=p-1=2q, where q is prime - if progress_func: - progress_func('g\n') - while 1: -+ # Choose a square residue; it will generate a cyclic group of order q. -+ obj.g = pow(number.getRandomRange(2, obj.p, randfunc), 2, obj.p) -+ - # We must avoid g=2 because of Bleichenbacher's attack described - # in "Generating ElGamal signatures without knowning the secret key", - # 1996 -- # -- obj.g = number.getRandomRange(3, obj.p, randfunc) -- safe = 1 -- if pow(obj.g, 2, obj.p)==1: -- safe=0 -- if safe and pow(obj.g, q, obj.p)==1: -- safe=0 -+ if obj.g in (1, 2): -+ continue -+ - # Discard g if it divides p-1 because of the attack described - # in Note 11.67 (iii) in HAC -- if safe and divmod(obj.p-1, obj.g)[1]==0: -- safe=0 -+ if (obj.p - 1) % obj.g == 0: -+ continue -+ - # g^{-1} must not divide p-1 because of Khadir's attack - # described in "Conditions of the generator for forging ElGamal - # signature", 2011 - ginv = number.inverse(obj.g, obj.p) -- if safe and divmod(obj.p-1, ginv)[1]==0: -- safe=0 -- if safe: -- break -+ if (obj.p - 1) % ginv == 0: -+ continue -+ -+ # Found -+ break -+ - # Generate private key x - if progress_func: - progress_func('x\n') diff --git a/lang/python/python-cryptodome/Makefile b/lang/python/python-cryptodome/Makefile index f6d1e88a..037ff861 100644 --- a/lang/python/python-cryptodome/Makefile +++ b/lang/python/python-cryptodome/Makefile @@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cryptodome -PKG_VERSION:=3.9.0 -PKG_RELEASE:=1 +PKG_VERSION:=3.9.7 +PKG_RELEASE:=3 PYPI_NAME:=pycryptodome -PKG_HASH:=dbeb08ad850056747aa7d5f33273b7ce0b9a77910604a1be7b7a6f2ef076213f +PKG_HASH:=f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2 PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE.rst @@ -18,55 +18,27 @@ PKG_CPE_ID:=cpe:/a:pycryptodome:pycryptodome include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -PYTHON_PKG_SETUP_ARGS:= -PYTHON_PKG_SETUP_VARS:= \ - CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" - PYTHON3_PKG_SETUP_ARGS:= PYTHON3_PKG_SETUP_VARS:= \ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" -define Package/python-cryptodome/Default +define Package/python3-cryptodome SECTION:=lang-python CATEGORY:=Languages SUBMENU:=Python TITLE:=A self-contained cryptographic library for Python URL:=https://www.pycryptodome.org/ - DEPENDS:=+libgmp + DEPENDS:=+libgmp +python3 + PROVIDES:=python3-crypto endef -define Package/python-cryptodome -$(call Package/python-cryptodome/Default) - DEPENDS+=+PACKAGE_python-cryptodome:python - VARIANT:=python - CONFLICTS:=python-crypto -endef - -define Package/python3-cryptodome -$(call Package/python-cryptodome/Default) - DEPENDS+=+PACKAGE_python3-cryptodome:python3 - VARIANT:=python3 - CONFLICTS:=python3-crypto -endef - -define Package/python-cryptodome/description +define Package/python3-cryptodome/description PyCryptodome is a self-contained Python package of low-level cryptographic primitives. endef -define Package/python3-cryptodome/description -$(call Package/python-cryptodome/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-cryptodome)) -$(eval $(call BuildPackage,python-cryptodome)) -$(eval $(call BuildPackage,python-cryptodome-src)) - $(eval $(call Py3Package,python3-cryptodome)) $(eval $(call BuildPackage,python3-cryptodome)) $(eval $(call BuildPackage,python3-cryptodome-src)) diff --git a/lang/python/python-cryptodomex/Makefile b/lang/python/python-cryptodomex/Makefile index 10c68e7d..562122cf 100644 --- a/lang/python/python-cryptodomex/Makefile +++ b/lang/python/python-cryptodomex/Makefile @@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cryptodomex -PKG_VERSION:=3.9.0 -PKG_RELEASE:=1 +PKG_VERSION:=3.9.7 +PKG_RELEASE:=2 PYPI_NAME:=pycryptodomex -PKG_HASH:=8b604f4fa1de456d6d19771b01c2823675a75a2c60e51a6b738f71fdfe865370 +PKG_HASH:=50163324834edd0c9ce3e4512ded3e221c969086e10fdd5d3fdcaadac5e24a78 PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE.rst @@ -17,53 +17,26 @@ PKG_MAINTAINER:=Richard Yu include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -PYTHON_PKG_SETUP_ARGS:= -PYTHON_PKG_SETUP_VARS:= \ - CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" - PYTHON3_PKG_SETUP_ARGS:= PYTHON3_PKG_SETUP_VARS:= \ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" -define Package/python-cryptodomex/Default +define Package/python3-cryptodomex SECTION:=lang-python CATEGORY:=Languages SUBMENU:=Python TITLE:=A self-contained cryptographic library for Python URL:=https://www.pycryptodome.org/ - DEPENDS:=+libgmp + DEPENDS:=+libgmp +python3 endef -define Package/python-cryptodomex -$(call Package/python-cryptodomex/Default) - DEPENDS+=+PACKAGE_python-cryptodomex:python - VARIANT:=python -endef - -define Package/python3-cryptodomex -$(call Package/python-cryptodomex/Default) - DEPENDS+=+PACKAGE_python3-cryptodomex:python3 - VARIANT:=python3 -endef - -define Package/python-cryptodomex/description +define Package/python3-cryptodomex/description PyCryptodome is a self-contained Python package of low-level cryptographic primitives. endef -define Package/python3-cryptodomex/description -$(call Package/python-cryptodomex/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-cryptodomex)) -$(eval $(call BuildPackage,python-cryptodomex)) -$(eval $(call BuildPackage,python-cryptodomex-src)) - $(eval $(call Py3Package,python3-cryptodomex)) $(eval $(call BuildPackage,python3-cryptodomex)) $(eval $(call BuildPackage,python3-cryptodomex-src)) diff --git a/lang/python/python-cryptography/Makefile b/lang/python/python-cryptography/Makefile index d7981d37..e5a9a1e0 100644 --- a/lang/python/python-cryptography/Makefile +++ b/lang/python/python-cryptography/Makefile @@ -8,71 +8,44 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cryptography -PKG_VERSION:=2.8 -PKG_RELEASE:=1 +PKG_VERSION:=2.9.2 +PKG_RELEASE:=2 PYPI_NAME:=cryptography -PKG_HASH:=3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651 +PKG_HASH:=a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229 PKG_LICENSE:=Apache-2.0 BSD-3-Clause PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean PKG_BUILD_DEPENDS:=libffi/host +PKG_BUILD_PARALLEL:=0 -HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi>=1.8,!=1.11.3" HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.8,!=1.11.3" include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-cryptography/Default +define Package/python3-cryptography SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Cryptographic recipes and primitives URL:=https://github.com/pyca/cryptography - DEPENDS:=+libopenssl + DEPENDS:= \ + +libopenssl \ + +python3 \ + +python3-cffi \ + +python3-six endef -define Package/python-cryptography -$(call Package/python-cryptography/Default) - DEPENDS+= \ - +PACKAGE_python-cryptography:python \ - +PACKAGE_python-cryptography:python-cffi \ - +PACKAGE_python-cryptography:python-enum34 \ - +PACKAGE_python-cryptography:python-ipaddress \ - +PACKAGE_python-cryptography:python-six - VARIANT:=python -endef - -define Package/python3-cryptography -$(call Package/python-cryptography/Default) - DEPENDS+= \ - +PACKAGE_python3-cryptography:python3 \ - +PACKAGE_python3-cryptography:python3-cffi \ - +PACKAGE_python3-cryptography:python3-six - VARIANT:=python3 -endef - -define Package/python-cryptography/description +define Package/python3-cryptography/description cryptography is a package which provides cryptographic recipes and primitives to Python developers. Our goal is for it to be your "cryptographic standard library". It supports Python 2.6-2.7, Python 3.3+, and PyPy 2.6+. endef -define Package/python3-cryptography/description -$(call Package/python-cryptography/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-cryptography)) -$(eval $(call BuildPackage,python-cryptography)) -$(eval $(call BuildPackage,python-cryptography-src)) - $(eval $(call Py3Package,python3-cryptography)) $(eval $(call BuildPackage,python3-cryptography)) $(eval $(call BuildPackage,python3-cryptography-src)) diff --git a/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch b/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch deleted file mode 100644 index ea257adb..00000000 --- a/lang/python/python-cryptography/patches/001-disable-setup-requirements.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -243,6 +243,7 @@ class DummyPyTest(test): - with open(os.path.join(base_dir, "README.rst")) as f: - long_description = f.read() - -+setup_requirements=[] - - setup( - name=about["__title__"], diff --git a/lang/python/python-curl/Makefile b/lang/python/python-curl/Makefile index 9ca4845f..e285967f 100644 --- a/lang/python/python-curl/Makefile +++ b/lang/python/python-curl/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pycurl PKG_VERSION:=7.43.0.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=ec7dd291545842295b7b56c12c90ffad2976cc7070c98d7b1517b7b6cd5994b3 @@ -17,67 +17,39 @@ PKG_LICENSE_FILES:=COPYING-LGPL include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-curl/Default +define Package/python3-curl CATEGORY:=Languages SECTION:=lang SUBMENU:=Python TITLE:=Python module interface to the cURL library URL:=http://pycurl.io/ - DEPENDS:=+libcurl -endef - -define Package/python-curl -$(call Package/python-curl/Default) - DEPENDS+=+PACKAGE_python-curl:python - VARIANT:=python -endef - -define Package/python-curl/description -PycURL is a Python interface to libcurl, the multiprotocol file transfer library. -endef - -define Package/python3-curl -$(call Package/python-curl/Default) - DEPENDS+=+PACKAGE_python3-curl:python3 - VARIANT:=python3 + DEPENDS:=+libcurl +python3 endef define Package/python3-curl/description -$(call Package/python-curl/description) -. -(Variant for Python3) +PycURL is a Python interface to libcurl, the multiprotocol file transfer library. endef -PYTHON_PKG_SETUP_ARGS:= PYTHON3_PKG_SETUP_ARGS:= ifdef CONFIG_LIBCURL_OPENSSL - PYTHON_PKG_SETUP_ARGS+=--with-openssl PYTHON3_PKG_SETUP_ARGS+=--with-openssl endif ifdef CONFIG_LIBCURL_GNUTLS - PYTHON_PKG_SETUP_ARGS+=--with-gnutls PYTHON3_PKG_SETUP_ARGS+=--with-gnutls endif ifdef CONFIG_LIBCURL_MBEDTLS - PYTHON_PKG_SETUP_ARGS+=--with-mbedtls PYTHON3_PKG_SETUP_ARGS+=--with-mbedtls endif ifdef CONFIG_LIBCURL_WOLFSSL - PYTHON_PKG_SETUP_ARGS+=--with-wolfssl PYTHON3_PKG_SETUP_ARGS+=--with-wolfssl endif -$(eval $(call PyPackage,python-curl)) -$(eval $(call BuildPackage,python-curl)) -$(eval $(call BuildPackage,python-curl-src)) - $(eval $(call Py3Package,python3-curl)) $(eval $(call BuildPackage,python3-curl)) $(eval $(call BuildPackage,python3-curl-src)) diff --git a/lang/python/python-dateutil/Makefile b/lang/python/python-dateutil/Makefile index 8b5601ea..87e0df87 100644 --- a/lang/python/python-dateutil/Makefile +++ b/lang/python/python-dateutil/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-dateutil PKG_VERSION:=2.8.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=BSD-2-Clause PYPI_NAME:=$(PKG_NAME) @@ -19,42 +19,21 @@ PKG_MAINTAINER:=Alexandru Ardelean include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-dateutil/Default +define Package/python3-dateutil SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Extensions to the standard Python datetime module URL:=https://dateutil.readthedocs.org/ -endef - -define Package/python-dateutil -$(call Package/python-dateutil/Default) - DEPENDS:=+PACKAGE_python-dateutil:python +PACKAGE_python-dateutil:python-six - VARIANT:=python -endef - -define Package/python-dateutil/description - Extensions to the standard Python datetime module -endef - -define Package/python3-dateutil -$(call Package/python-dateutil/Default) - DEPENDS:=+PACKAGE_python3-dateutil:python3 +PACKAGE_python3-dateutil:python3-six - VARIANT:=python3 + DEPENDS:=+python3 +python3-six endef define Package/python3-dateutil/description -$(call Package/python-dateutil/description) -. -(Variant for Python3) + Extensions to the standard Python datetime module endef -$(eval $(call PyPackage,python-dateutil)) -$(eval $(call BuildPackage,python-dateutil)) -$(eval $(call BuildPackage,python-dateutil-src)) $(eval $(call Py3Package,python3-dateutil)) $(eval $(call BuildPackage,python3-dateutil)) $(eval $(call BuildPackage,python3-dateutil-src)) diff --git a/lang/python/python-decorator/Makefile b/lang/python/python-decorator/Makefile index b8fdc456..27ae1a8c 100644 --- a/lang/python/python-decorator/Makefile +++ b/lang/python/python-decorator/Makefile @@ -5,16 +5,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-decorator -PKG_VERSION:=4.3.2 +PKG_VERSION:=4.4.2 PKG_RELEASE:=1 PKG_MAINTAINER:=Karel Kočí PKG_CPE_ID:=cpe:/a:python:decorator -PKG_SOURCE_URL:=https://codeload.github.com/micheles/decorator/tar.gz/$(PKG_VERSION)? -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=c053ec881270608a5aef624a45a7700ec76ceca9d96689506411e1f319085380 -PKG_BUILD_DIR:=$(BUILD_DIR)/decorator-$(PKG_VERSION) +PYPI_NAME:=decorator +PKG_HASH:=e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7 +include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -25,7 +24,6 @@ define Package/python3-decorator URL:=https://github.com/micheles/decorator TITLE:=python3-decodator DEPENDS:=+python3-light - VARIANT:=python3 endef $(eval $(call Py3Package,python3-decorator)) diff --git a/lang/python/python-defusedxml/Makefile b/lang/python/python-defusedxml/Makefile index 2057e0fa..144d3439 100644 --- a/lang/python/python-defusedxml/Makefile +++ b/lang/python/python-defusedxml/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-defusedxml PKG_VERSION:=0.6.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=Eneas U de Queiroz PKG_LICENSE:=Python-2.0 @@ -18,49 +18,24 @@ PKG_HASH:=f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-defusedxml/Default +define Package/python3-defusedxml SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=XML bomb protection for Python URL:=https://github.com/tiran/defusedxml -endef - -define Package/python-defusedxml - $(call Package/python-defusedxml/Default) DEPENDS:= \ - +PACKAGE_python-defusedxml:python-light \ - +PACKAGE_python-defusedxml:python-codecs \ - +PACKAGE_python-defusedxml:python-xml - VARIANT:=python + +python3-light \ + +python3-xml endef -define Package/python3-defusedxml - $(call Package/python-defusedxml/Default) - DEPENDS:= \ - +PACKAGE_python3-defusedxml:python3-light \ - +PACKAGE_python3-defusedxml:python3-xml - VARIANT:=python3 -endef - -define Package/python-defusedxml/description +define Package/python3-defusedxml/description The defusedxml package contains several Python-only workarounds and fixes for denial of service and other vulnerabilities in Python’s XML libraries. endef -define Package/python3-defusedxml/description -$(call Package/python-defusedxml/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-defusedxml)) -$(eval $(call BuildPackage,python-defusedxml)) -$(eval $(call BuildPackage,python-defusedxml-src)) - $(eval $(call Py3Package,python3-defusedxml)) $(eval $(call BuildPackage,python3-defusedxml)) $(eval $(call BuildPackage,python3-defusedxml-src)) diff --git a/lang/python/python-distro/Makefile b/lang/python/python-distro/Makefile new file mode 100644 index 00000000..bef80d63 --- /dev/null +++ b/lang/python/python-distro/Makefile @@ -0,0 +1,34 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-distro +PKG_VERSION:=1.5.0 +PKG_RELEASE:=3 + +PYPI_NAME:=distro +PKG_HASH:=0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92 + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-distro + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Distro - an OS platform information API + URL:=https://github.com/nir0s/distro + DEPENDS:=+python3-light +python3-logging +endef + +define Package/python3-distro/description + A much more elaborate, renewed alternative implementation for Python's + platform.linux_distribution() +endef + +$(eval $(call Py3Package,python3-distro)) +$(eval $(call BuildPackage,python3-distro)) +$(eval $(call BuildPackage,python3-distro-src)) diff --git a/lang/python/python-dns/Makefile b/lang/python/python-dns/Makefile index bb93b85e..2c71f078 100644 --- a/lang/python/python-dns/Makefile +++ b/lang/python/python-dns/Makefile @@ -9,58 +9,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-dns PKG_VERSION:=1.16.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 -PKG_SOURCE:=dnspython-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.dnspython.org/kits/1.16.0/ -PKG_HASH:=4bf5c5c12a4478ee7860ab176659cf64c4899ee76752d826b082f8af723c5cf9 +PYPI_NAME:=dnspython +PYPI_SOURCE_EXT:=zip +PKG_HASH:=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 PKG_LICENSE:=ISC PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Josef Schlehofer -PKG_CPE_ID:=cpe:/a:debian:python-dns - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dnspython-$(PKG_VERSION) +include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) - -define Package/python-dns/Default +define Package/python3-dns SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=dnspython URL:=http://www.dnspython.org/ -endef - -define Package/python-dns -$(call Package/python-dns/Default) - DEPENDS:=+PACKAGE_python-dns:python - VARIANT:=python -endef - -define Package/python-dns/description - dnspython is a DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone transfers, and dynamic updates. It supports TSIG authenticated messages and EDNS0. -endef - -define Package/python3-dns -$(call Package/python-dns/Default) - DEPENDS:=+PACKAGE_python3-dns:python3 - VARIANT:=python3 + DEPENDS:=+python3 endef define Package/python3-dns/description -$(call Package/python-dns/description) -. -(Variant for Python3) + dnspython is a DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone transfers, and dynamic updates. It supports TSIG authenticated messages and EDNS0. endef -$(eval $(call PyPackage,python-dns)) -$(eval $(call BuildPackage,python-dns)) -$(eval $(call BuildPackage,python-dns-src)) $(eval $(call Py3Package,python3-dns)) $(eval $(call BuildPackage,python3-dns)) $(eval $(call BuildPackage,python3-dns-src)) diff --git a/lang/python/python-docker/Makefile b/lang/python/python-docker/Makefile new file mode 100644 index 00000000..dde68829 --- /dev/null +++ b/lang/python/python-docker/Makefile @@ -0,0 +1,40 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-docker +PKG_VERSION:=4.2.2 +PKG_RELEASE:=1 + +PYPI_NAME:=docker +PKG_HASH:=26eebadce7e298f55b76a88c4f8802476c5eaddbdbe38dbc6cce8781c47c9b54 + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +PYTHON3_PKG_SETUP_ARGS:= + +define Package/python3-docker + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=A Python library for the Docker Engine API + URL:=https://github.com/docker/docker-py + DEPENDS:=\ + +python3-light +python3-distutils +python3-logging \ + +python3-openssl +python3-paramiko +python3-six +python3-requests \ + +python3-websocket-client +endef + +define Package/python3-docker/description + A Python library for the Docker Engine API. It lets you do anything the + docker command does, but from within Python apps – run containers manage + containers, manage Swarms, etc. +endef + +$(eval $(call Py3Package,python3-docker)) +$(eval $(call BuildPackage,python3-docker)) +$(eval $(call BuildPackage,python3-docker-src)) diff --git a/lang/python/python-dockerpty/Makefile b/lang/python/python-dockerpty/Makefile new file mode 100644 index 00000000..662e4c55 --- /dev/null +++ b/lang/python/python-dockerpty/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-dockerpty +PKG_VERSION:=0.4.1 +PKG_RELEASE:=3 + +PYPI_NAME:=dockerpty +PKG_HASH:=69a9d69d573a0daa31bcd1c0774eeed5c15c295fe719c61aca550ed1393156ce + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE.txt + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +PYTHON3_PKG_SETUP_ARGS:= + +define Package/python3-dockerpty + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python library to use the pseudo-tty of a docker container + URL:=https://github.com/d11wtq/dockerpty + DEPENDS:=+python3-light +python3-openssl +python3-six +endef + +define Package/python3-dockerpty/description + Python library to use the pseudo-tty of a docker container +endef + +$(eval $(call Py3Package,python3-dockerpty)) +$(eval $(call BuildPackage,python3-dockerpty)) +$(eval $(call BuildPackage,python3-dockerpty-src)) diff --git a/lang/python/python-docopt/Makefile b/lang/python/python-docopt/Makefile new file mode 100644 index 00000000..cba23945 --- /dev/null +++ b/lang/python/python-docopt/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-docopt +PKG_VERSION:=0.6.2 +PKG_RELEASE:=2 + +PYPI_NAME:=docopt +PKG_HASH:=49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491 + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE-MIT + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +PYTHON3_PKG_SETUP_ARGS:= + +define Package/python3-docopt + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Pythonic argument parser, that will make you smile + URL:=http://docopt.org/ + DEPENDS:=+python3-light +endef + +define Package/python3-docopt/description + Pythonic argument parser, that will make you smile +endef + +$(eval $(call Py3Package,python3-docopt)) +$(eval $(call BuildPackage,python3-docopt)) +$(eval $(call BuildPackage,python3-docopt-src)) diff --git a/lang/python/python-docutils/Makefile b/lang/python/python-docutils/Makefile index 060ef552..04e4d756 100644 --- a/lang/python/python-docutils/Makefile +++ b/lang/python/python-docutils/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=docutils PKG_VERSION:=0.14 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274 @@ -12,48 +12,25 @@ PKG_LICENSE:=MIT include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-docutils/Default +define Package/python3-docutils SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=docutils URL:=http://docutils.sourceforge.net + DEPENDS:=+python3 endef -define Package/python-docutils -$(call Package/python-docutils/Default) - DEPENDS:=+PACKAGE_python-docutils:python - VARIANT:=python -endef - -define Package/python3-docutils -$(call Package/python-docutils/Default) - DEPENDS:=+PACKAGE_python3-docutils:python3 - VARIANT:=python3 -endef - -define Package/python-docutils/description +define Package/python3-docutils/description Docutils is a modular system for processing documentation into useful formats, such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText, an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax. endef -define Package/python3-docutils/description -$(call Package/python-docutils/description) -. -(Variant for Python3) -endef - -PYTHON_PKG_SETUP_ARGS:= PYTHON3_PKG_SETUP_ARGS:= -$(eval $(call PyPackage,python-docutils)) -$(eval $(call BuildPackage,python-docutils)) -$(eval $(call BuildPackage,python-docutils-src)) - $(eval $(call Py3Package,python3-docutils)) $(eval $(call BuildPackage,python3-docutils)) $(eval $(call BuildPackage,python3-docutils-src)) diff --git a/lang/python/python-dotenv/Makefile b/lang/python/python-dotenv/Makefile new file mode 100644 index 00000000..f3e6e143 --- /dev/null +++ b/lang/python/python-dotenv/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-dotenv +PKG_VERSION:=0.13.0 +PKG_RELEASE:=3 + +PYPI_NAME:=python-dotenv +PKG_HASH:=3b9909bc96b0edc6b01586e1eed05e71174ef4e04c71da5786370cebea53ad74 + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-dotenv + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Add .env support to your django/flask apps in development and deployments + URL:=http://github.com/theskumar/python-dotenv + DEPENDS:=+python3-light +python3-logging +endef + +define Package/python3-dotenv/description + A Python library which reads the key-value pair from .env file and adds them + to environment variable. It is great for managing app settings during + development and in production using 12-factor principles. +endef + +$(eval $(call Py3Package,python3-dotenv)) +$(eval $(call BuildPackage,python3-dotenv)) +$(eval $(call BuildPackage,python3-dotenv-src)) diff --git a/lang/python/python-dpkt/Makefile b/lang/python/python-dpkt/Makefile deleted file mode 100644 index 1ca49080..00000000 --- a/lang/python/python-dpkt/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2017 Andrew McConachie -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-dpkt -PKG_VERSION:=1.9.2 -PKG_RELEASE:=1 - -PYPI_NAME:=dpkt -PKG_HASH:=52a92ecd5ca04d5bd852bb11cb2eac4bbe38b42a7c472e0d950eeb9f82a81e54 - -PKG_MAINTAINER:=Andrew McConachie -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-dpkt - SECTION:=language-python - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-dpkt - URL:=https://dpkt.readthedocs.io/en/latest/ - DEPENDS:=+python -endef - -define Package/python-dpkt/description - dpkt is a python module for fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols - https://pypi.python.org/pypi/dpkt - https://github.com/kbandla/dpkt -endef - -define Build/Compile - $(call Build/Compile/PyMod,,\ - install --prefix=/usr --root="$(PKG_INSTALL_DIR)" \ - ) -endef - -$(eval $(call PyPackage,python-dpkt)) -$(eval $(call BuildPackage,python-dpkt)) diff --git a/lang/python/python-egenix-mx-base/Makefile b/lang/python/python-egenix-mx-base/Makefile deleted file mode 100644 index dfb669b3..00000000 --- a/lang/python/python-egenix-mx-base/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-egenix-mx-base -PKG_VERSION:=3.2.9 -PKG_RELEASE:=4 - -PKG_SOURCE:=egenix-mx-base-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://downloads.egenix.com/python -PKG_HASH:=1c6b67688e7a231c6c1da09b7a6a2210745c3f2507bdda70e2639faedbf68977 -PKG_BUILD_DIR:=$(BUILD_DIR)/egenix-mx-base-$(PKG_VERSION) - -PKG_MAINTAINER:=Dmitry Trefilov -PKG_LICENSE:=eGenix -PKG_LICENSE_FILES:=LICENSE COPYRIGHT - -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-egenix-mx-base - SECTION:=lang - CATEGORY:=Languages - TITLE:=Egenix mxBase - SUBMENU:=Python - URL:=https://www.egenix.com/products/python/mxBase/ - DEPENDS:=+python-light - VARIANT:=python -endef - -define Package/python-egenix-mx-base/description - The eGenix.com mx Base Distribution for Python is a collection - of professional quality software tools which enhance Python's - usability in many important areas such as fast text searching, - date/time processing and high speed data types. -endef - -PYTHON_PKG_SETUP_ARGS:= - -$(eval $(call PyPackage,python-egenix-mx-base)) -$(eval $(call BuildPackage,python-egenix-mx-base)) -$(eval $(call BuildPackage,python-egenix-mx-base-src)) diff --git a/lang/python/python-enum34/Makefile b/lang/python/python-enum34/Makefile deleted file mode 100644 index f988e2fc..00000000 --- a/lang/python/python-enum34/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2015-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-enum34 -PKG_VERSION:=1.1.10 -PKG_RELEASE:=1 - -PYPI_NAME:=enum34 -PKG_HASH:=cce6a7477ed816bd2542d03d53db9f0db935dd013b70f336a95c73979289f248 - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=enum/LICENSE -PKG_MAINTAINER:=Jeffery To -PKG_CPE_ID:=cpe:/a:python:enum34 - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-enum34/Default - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Backported Python 3.4 enum - URL:=https://bitbucket.org/stoneleaf/enum34 -endef - -define Package/python-enum34 -$(call Package/python-enum34/Default) - DEPENDS:=+PACKAGE_python-enum34:python-light - VARIANT:=python -endef - -define Package/python-enum34/description -enum34 is the new Python stdlib enum module available in Python 3.4 -backported for previous versions of Python from 2.4 to 3.3. -endef - -define PyPackage/python-enum34/filespec -+|$(PYTHON_PKG_DIR) --|$(PYTHON_PKG_DIR)/enum/test.py -endef - -$(eval $(call PyPackage,python-enum34)) -$(eval $(call BuildPackage,python-enum34)) -$(eval $(call BuildPackage,python-enum34-src)) diff --git a/lang/python/python-enum34/patches/001-omit-docs.patch b/lang/python/python-enum34/patches/001-omit-docs.patch deleted file mode 100644 index 85faa0e8..00000000 --- a/lang/python/python-enum34/patches/001-omit-docs.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -71,15 +71,6 @@ data = dict( - version='1.1.10', - url='https://bitbucket.org/stoneleaf/enum34', - packages=packages, -- package_data={ -- 'enum' : [ -- 'LICENSE', -- 'README', -- 'doc/enum.rst', -- 'doc/enum.pdf', -- 'test.py', -- ] -- }, - license='BSD License', - description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4', - long_description=long_desc, diff --git a/lang/python/python-et_xmlfile/Makefile b/lang/python/python-et_xmlfile/Makefile index 426337d6..f1a41574 100644 --- a/lang/python/python-et_xmlfile/Makefile +++ b/lang/python/python-et_xmlfile/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-et_xmlfile PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Alexandru Ardelean , Eneas U de Queiroz PKG_LICENSE:=MIT @@ -17,49 +17,25 @@ PKG_HASH:=614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-et_xmlfile/Default +define Package/python3-et_xmlfile SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Low memory library for creating large XML files. URL:=https://bitbucket.org/openpyxl/et_xmlfile -endef - -define Package/python-et_xmlfile -$(call Package/python-et_xmlfile/Default) - DEPENDS:= \ - +PACKAGE_python-et_xmlfile:python-light \ - +PACKAGE_python-et_xmlfile:python-lxml - VARIANT:=python -endef - -define Package/python3-et_xmlfile -$(call Package/python-et_xmlfile/Default) DEPENDS:= \ +python3-light \ +python3-lxml - VARIANT:=python3 endef -define Package/python-et_xmlfile/description +define Package/python3-et_xmlfile/description An implementation of lxml.xmlfile for the standard library. It is based upon the xmlfile module from lxml with the aim of allowing code to be developed that will work with both libraries. endef -define Package/python3-et_xmlfile/description -$(call Package/python-et_xmlfile/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-et_xmlfile)) -$(eval $(call BuildPackage,python-et_xmlfile)) -$(eval $(call BuildPackage,python-et_xmlfile-src)) - $(eval $(call Py3Package,python3-et_xmlfile)) $(eval $(call BuildPackage,python3-et_xmlfile)) $(eval $(call BuildPackage,python3-et_xmlfile-src)) diff --git a/lang/python/python-evdev/Makefile b/lang/python/python-evdev/Makefile index 2f7ad030..0a64927c 100644 --- a/lang/python/python-evdev/Makefile +++ b/lang/python/python-evdev/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=python-evdev PKG_VERSION:=1.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=BSD-3-Clause PKG_MAINTAINER:=Paulo Costa , Alexandru Ardelean @@ -20,43 +20,21 @@ PKG_HASH:=b1c649b4fed7252711011da235782b2c260b32e004058d62473471e5cd30634d include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-evdev/Default +define Package/python3-evdev SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - URL:=https://github.com/gvalkov/python-evdev -endef - -define Package/python-evdev -$(call Package/python-evdev/Default) - TITLE:=python-evdev - DEPENDS:= \ - +PACKAGE_python-evdev:python-light \ - +PACKAGE_python-evdev:python-ctypes - VARIANT:=python -endef - -define Package/python3-evdev -$(call Package/python-evdev/Default) TITLE:=python3-evdev + URL:=https://github.com/gvalkov/python-evdev DEPENDS:= \ - +PACKAGE_python3-evdev:python3-light \ - +PACKAGE_python3-evdev:python3-ctypes - VARIANT:=python3 -endef - - -define Package/python-evdev/description - Bindings to the Linux input handling subsystem + +python3-light \ + +python3-ctypes endef define Package/python3-evdev/description -$(call Package/python-evdev/description) -. -(Variant for Python3) + Bindings to the Linux input handling subsystem endef LINUX_EVDEV_HEADERS="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h" @@ -66,12 +44,6 @@ PYTHON3_PKG_SETUP_GLOBAL_ARGS:= \ --evdev-headers="$(LINUX_EVDEV_HEADERS)" \ build_ext -PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS) - -$(eval $(call PyPackage,python-evdev)) -$(eval $(call BuildPackage,python-evdev)) -$(eval $(call BuildPackage,python-evdev-src)) - $(eval $(call Py3Package,python3-evdev)) $(eval $(call BuildPackage,python3-evdev)) $(eval $(call BuildPackage,python3-evdev-src)) diff --git a/lang/python/python-flask-login/Makefile b/lang/python/python-flask-login/Makefile index cc7b06c2..28362276 100644 --- a/lang/python/python-flask-login/Makefile +++ b/lang/python/python-flask-login/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-flask-login PKG_VERSION:=0.5.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=Flask-Login PKG_HASH:=6d33aef15b5bcead780acc339464aae8a6e28f13c90d8b1cf9de8b549d1c0b4b @@ -30,7 +30,6 @@ define Package/python3-flask-login TITLE:=User session management plugin for Flask URL:=https://github.com/maxcountryman/flask-login DEPENDS:=+python3-light +python3-flask - VARIANT:=python3 endef define Package/python3-flask-login/description diff --git a/lang/python/python-futures/Makefile b/lang/python/python-futures/Makefile deleted file mode 100644 index ba56053a..00000000 --- a/lang/python/python-futures/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=futures -PKG_VERSION:=3.2.0 -PKG_RELEASE:=1 - -PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265 - -PKG_MAINTAINER:=Daniel Danzberger -PKG_LICENSE:=MIT - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-futures - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=futures - URL:=https://github.com/agronholm/pythonfutures - DEPENDS:=+python - VARIANT:=python -endef - -define Package/python-futures/description - This is a backport of the concurrent.futures standard library module to Python 2. - It should not be installed on Python 3, although there should be no harm in doing so, - as the standard library takes precedence over third party libraries. -endef - -$(eval $(call PyPackage,python-futures)) -$(eval $(call BuildPackage,python-futures)) -$(eval $(call BuildPackage,python-futures-src)) diff --git a/lang/python/python-gmpy2/Makefile b/lang/python/python-gmpy2/Makefile index 81f602c7..46c49d7f 100644 --- a/lang/python/python-gmpy2/Makefile +++ b/lang/python/python-gmpy2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-gmpy2 PKG_VERSION:=2.0.8 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PYPI_NAME:=gmpy2 PYPI_SOURCE_EXT:=zip @@ -21,34 +21,20 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -PYTHON_PKG_SETUP_ARGS:=--nompfr PYTHON3_PKG_SETUP_ARGS:=--nompfr -define Package/python-gmpy2/Default +define Package/python3-gmpy2 SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=GMP/MPIR, MPFR, and MPC interface URL:=https://github.com/aleaxit/gmpy - DEPENDS:=+libgmp + DEPENDS:=+libgmp +python3-light endef -define Package/python-gmpy2 -$(call Package/python-gmpy2/Default) - DEPENDS+=+PACKAGE_python-gmpy2:python-light - VARIANT:=python -endef - -define Package/python3-gmpy2 -$(call Package/python-gmpy2/Default) - DEPENDS+=+PACKAGE_python3-gmpy2:python3-light - VARIANT:=python3 -endef - -define Package/python-gmpy2/description +define Package/python3-gmpy2/description gmpy2 is a C-coded Python extension module that supports multiple-precision arithmetic. gmpy2 is the successor to the original gmpy module. The gmpy module only supported the GMP multiple-precision library. gmpy2 adds support for the @@ -58,16 +44,6 @@ API and naming conventions to be more consistent and support the additional functionality. endef -define Package/python3-gmpy2/description -$(call Package/python-gmpy2/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-gmpy2)) -$(eval $(call BuildPackage,python-gmpy2)) -$(eval $(call BuildPackage,python-gmpy2-src)) - $(eval $(call Py3Package,python3-gmpy2)) $(eval $(call BuildPackage,python3-gmpy2)) $(eval $(call BuildPackage,python3-gmpy2-src)) diff --git a/lang/python/python-gnupg/Makefile b/lang/python/python-gnupg/Makefile index 54a827e9..6a4f99b2 100644 --- a/lang/python/python-gnupg/Makefile +++ b/lang/python/python-gnupg/Makefile @@ -5,77 +5,39 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-gnupg -PKG_VERSION:=0.4.4 -PKG_RELEASE:=2 +PKG_VERSION:=0.4.6 +PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=45daf020b370bda13a1429c859fcdff0b766c0576844211446f9266cae97fb0e +PKG_HASH:=3aa0884b3bd414652c2385b9df39e7b87272c2eca1b8fcc3089bc9e58652019a -PKG_LICENSE:=GPL-3.0-or-later -PKG_LICENSE_FILES:=LICENSE +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.txt PKG_MAINTAINER:=Daniel Golle -PKG_CPE_ID:=cpe:/a:python-gnupg_project:python-gnupg +PKG_CPE_ID:=cpe:/a:python:python-gnupg include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-gnupg/Default +define Package/python3-gnupg SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - URL:=https://gnupg.readthedocs.io/en/latest/ - DEPENDS:=+gnupg -endef - -define Package/python-gnupg -$(call Package/python-gnupg/Default) - TITLE:=python-pyodbc - DEPENDS+=+PACKAGE_python-gnupg:python-light - VARIANT:=python -endef - -define Package/python3-gnupg -$(call Package/python-gnupg/Default) - TITLE:=python3-gnupg - DEPENDS+=+PACKAGE_python3-gnupg:python3-light - VARIANT:=python3 -endef - -define Package/python-gnupg/description -A Python wrapper for GnuPG - -This module allows easy access to GnuPG.s key management, encryption -and signature functionality from Python programs, by interacting with -GnuPG through file descriptors. Input arguments are strictly checked -and sanitised, and therefore this module should be safe to use in -networked applications requiring direct user input. It is intended for -use on Windows, MacOS X, BSD, or Linux, with Python 2.6, Python 2.7, -Python 3.3, Python 3.4, or PyPy. + TITLE:=A wrapper for GnuPG + URL:=https://docs.red-dove.com/python-gnupg/ + DEPENDS:=+gnupg +python3-light +python3-logging endef define Package/python3-gnupg/description -$(call Package/python-gnupg/description) - -(Variant for Python3) + The gnupg module allows Python programs to make use of the + functionality provided by the GNU Privacy Guard (abbreviated GPG or + GnuPG). Using this module, Python programs can encrypt and decrypt + data, digitally sign documents and verify digital signatures, manage + (generate, list and delete) encryption keys, using Public Key + Infrastructure (PKI) encryption technology based on OpenPGP. endef -define PyBuild/Compile - $(call Build/Compile/PyMod,,\ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ - ) -endef - -define Py3Build/Compile - $(call Build/Compile/Py3Mod,,\ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ - ) -endef - - -$(eval $(call PyPackage,python-gnupg)) -$(eval $(call BuildPackage,python-gnupg)) - $(eval $(call Py3Package,python3-gnupg)) $(eval $(call BuildPackage,python3-gnupg)) +$(eval $(call BuildPackage,python3-gnupg-src)) diff --git a/lang/python/python-host.mk b/lang/python/python-host.mk deleted file mode 100644 index 44ecbbf8..00000000 --- a/lang/python/python-host.mk +++ /dev/null @@ -1,95 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile -# if `python-package.mk` is included, this will already be included - -ifneq ($(__python_host_mk_inc),1) -__python_host_mk_inc=1 - -# For PYTHON_VERSION -python_mk_path:=$(dir $(lastword $(MAKEFILE_LIST))) -include $(python_mk_path)python-version.mk - -HOST_PYTHON_DIR:=$(STAGING_DIR_HOSTPKG) -HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION) -HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION) - -HOST_PYTHON_PKG_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)/site-packages - -HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION) - -HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(HOST_PYTHON_PKG_DIR) - -define HostPython - if [ "$(strip $(3))" == "HOST" ]; then \ - export PYTHONPATH="$(HOST_PYTHONPATH)"; \ - export PYTHONDONTWRITEBYTECODE=0; \ - else \ - export PYTHONPATH="$(PYTHONPATH)"; \ - export PYTHONDONTWRITEBYTECODE=1; \ - export _python_sysroot="$(STAGING_DIR)"; \ - export _python_prefix="/usr"; \ - export _python_exec_prefix="/usr"; \ - fi; \ - export PYTHONOPTIMIZE=""; \ - $(1) \ - $(HOST_PYTHON_BIN) $(2); -endef - -define host_python_settings - ARCH="$(HOST_ARCH)" \ - CC="$(HOSTCC)" \ - CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ - CXX="$(HOSTCXX)" \ - LD="$(HOSTCC)" \ - LDSHARED="$(HOSTCC) -shared" \ - CFLAGS="$(HOST_CFLAGS)" \ - CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \ - LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \ - _PYTHON_HOST_PLATFORM=linux2 -endef - -# $(1) => commands to execute before running pythons script -# $(2) => python script and its arguments -# $(3) => additional variables -define Build/Compile/HostPyRunHost - $(call HostPython, \ - $(if $(1),$(1);) \ - $(call host_python_settings) \ - $(3) \ - , \ - $(2) \ - , \ - HOST \ - ) -endef - -# Note: I shamelessly copied this from Yousong's logic (from python-packages); -HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION) - -# $(1) => packages to install -define Build/Compile/HostPyPipInstall - $(call host_python_settings) \ - $(HOST_PYTHON_PIP) \ - --disable-pip-version-check \ - --cache-dir "$(DL_DIR)/pip-cache" \ - install \ - $(1) -endef - -# $(1) => build subdir -# $(2) => additional arguments to setup.py -# $(3) => additional variables -define Build/Compile/HostPyMod - $(call Build/Compile/HostPyRunHost, \ - cd $(HOST_BUILD_DIR)/$(strip $(1)), \ - ./setup.py $(2), \ - $(3)) -endef - -endif # __python_host_mk_inc diff --git a/lang/python/python-hyperlink/Makefile b/lang/python/python-hyperlink/Makefile index 869fc5a9..a91fa1cf 100644 --- a/lang/python/python-hyperlink/Makefile +++ b/lang/python/python-hyperlink/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-hyperlink PKG_VERSION:=19.0.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=hyperlink PKG_HASH:=4288e34705da077fada1111a24a0aa08bb1e76699c9ce49876af722441845654 @@ -20,49 +20,25 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-hyperlink/Default +define Package/python3-hyperlink SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Pure-Python immutable URLs URL:=https://github.com/python-hyper/hyperlink -endef - -define Package/python-hyperlink -$(call Package/python-hyperlink/Default) DEPENDS:= \ - +PACKAGE_python-hyperlink:python-light \ - +PACKAGE_python-hyperlink:python-idna - VARIANT:=python + +python3-light \ + +python3-idna endef -define Package/python3-hyperlink -$(call Package/python-hyperlink/Default) - DEPENDS:= \ - +PACKAGE_python3-hyperlink:python3-light \ - +PACKAGE_python3-hyperlink:python3-idna - VARIANT:=python3 -endef - -define Package/python-hyperlink/description +define Package/python3-hyperlink/description Hyperlink provides a pure-Python implementation of immutable URLs. Based on RFC 3986 and 3987, the Hyperlink URL makes working with both URIs and IRIs easy. endef -define Package/python3-hyperlink/description -$(call Package/python-hyperlink/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-hyperlink)) -$(eval $(call BuildPackage,python-hyperlink)) -$(eval $(call BuildPackage,python-hyperlink-src)) - $(eval $(call Py3Package,python3-hyperlink)) $(eval $(call BuildPackage,python3-hyperlink)) $(eval $(call BuildPackage,python3-hyperlink-src)) diff --git a/lang/python/python-idna/Makefile b/lang/python/python-idna/Makefile index 57b6d7ab..b8063002 100644 --- a/lang/python/python-idna/Makefile +++ b/lang/python/python-idna/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-idna -PKG_VERSION:=2.9 +PKG_VERSION:=2.10 PKG_RELEASE:=1 PYPI_NAME:=idna -PKG_HASH:=7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb +PKG_HASH:=b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE.rst @@ -20,50 +20,26 @@ PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-incremental/Default +define Package/python3-incremental SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Versions your Python projects URL:=https://github.com/twisted/incremental -endef - -define Package/python-incremental -$(call Package/python-incremental/Default) - DEPENDS:=+PACKAGE_python-incremental:python-light - VARIANT:=python -endef - -define Package/python3-incremental -$(call Package/python-incremental/Default) - DEPENDS:=+PACKAGE_python3-incremental:python3-light - VARIANT:=python3 -endef - -define Package/python-incremental/description -Incremental is a small library that versions your Python projects. + DEPENDS:=+python3-light endef define Package/python3-incremental/description -$(call Package/python-incremental/description) -. -(Variant for Python3) +Incremental is a small library that versions your Python projects. endef -$(eval $(call PyPackage,python-incremental)) -$(eval $(call BuildPackage,python-incremental)) -$(eval $(call BuildPackage,python-incremental-src)) - $(eval $(call Py3Package,python3-incremental)) $(eval $(call BuildPackage,python3-incremental)) $(eval $(call BuildPackage,python3-incremental-src)) diff --git a/lang/python/python-influxdb/Makefile b/lang/python/python-influxdb/Makefile index 3f7d5f5a..2b7bdf8e 100644 --- a/lang/python/python-influxdb/Makefile +++ b/lang/python/python-influxdb/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-influxdb PKG_VERSION:=5.2.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Karel Kočí PYPI_NAME:=influxdb @@ -24,7 +24,6 @@ define Package/python3-influxdb URL:=https://github.com/influxdb/influxdb-python TITLE:=python3-influxdb DEPENDS:=+python3-requests +python3-pytz +python3-six +python3-dateutil - VARIANT:=python3 endef define Package/python3-influxdb/description diff --git a/lang/python/python-intelhex/Makefile b/lang/python/python-intelhex/Makefile index bccb044f..91c2510c 100644 --- a/lang/python/python-intelhex/Makefile +++ b/lang/python/python-intelhex/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-intelhex PKG_VERSION:=2.2.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=IntelHex PYPI_SOURCE_NAME:=intelhex @@ -27,7 +27,6 @@ define Package/python3-intelhex TITLE:=python3-intelhex URL:=https://github.com/bialix/intelhex DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-intelhex/description diff --git a/lang/python/python-ipaddress/Makefile b/lang/python/python-ipaddress/Makefile deleted file mode 100644 index 664076be..00000000 --- a/lang/python/python-ipaddress/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (C) 2015-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-ipaddress -PKG_VERSION:=1.0.23 -PKG_RELEASE:=1 - -PYPI_NAME:=ipaddress -PKG_HASH:=b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2 - -PKG_LICENSE:=Python-2.0 -PKG_MAINTAINER:=Jeffery To - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-ipaddress/Default - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Python 3.3+'s ipaddress - URL:=https://github.com/phihag/ipaddress -endef - -define Package/python-ipaddress -$(call Package/python-ipaddress/Default) - DEPENDS:=+PACKAGE_python-ipaddress:python-light - VARIANT:=python -endef - -define Package/python-ipaddress/description -Python 3.3+'s ipaddress for Python 2.6, 2.7, 3.2. -endef - -$(eval $(call PyPackage,python-ipaddress)) -$(eval $(call BuildPackage,python-ipaddress)) -$(eval $(call BuildPackage,python-ipaddress-src)) diff --git a/lang/python/python-jdcal/Makefile b/lang/python/python-jdcal/Makefile index b674c822..c1da5c3d 100644 --- a/lang/python/python-jdcal/Makefile +++ b/lang/python/python-jdcal/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-jdcal PKG_VERSION:=1.4.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Alexandru Ardelean , Eneas U de Queiroz PKG_LICENSE:=BSD-2-Clause @@ -18,43 +18,21 @@ PKG_HASH:=472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-jdcal/Default +define Package/python3-jdcal SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Julian dates from proleptic Gregorian and Julian calendars URL:=https://github.com/phn/jdcal -endef - -define Package/python-jdcal -$(call Package/python-jdcal/Default) - DEPENDS:= +PACKAGE_python-jdcal:python-light - VARIANT:=python -endef - -define Package/python3-jdcal -$(call Package/python-jdcal/Default) - DEPENDS:= +PACKAGE_python3-jdcal:python3-light - VARIANT:=python3 -endef - -define Package/python-jdcal/description - This module contains functions for converting between Julian dates and calendar dates. + DEPENDS:= +python3-light endef define Package/python3-jdcal/description -$(call Package/python-jdcal/description) -. -(Variant for Python3) + This module contains functions for converting between Julian dates and calendar dates. endef -$(eval $(call PyPackage,python-jdcal)) -$(eval $(call BuildPackage,python-jdcal)) -$(eval $(call BuildPackage,python-jdcal-src)) - $(eval $(call Py3Package,python3-jdcal)) $(eval $(call BuildPackage,python3-jdcal)) $(eval $(call BuildPackage,python3-jdcal-src)) diff --git a/lang/python/python-jmespath/Makefile b/lang/python/python-jmespath/Makefile index e4d1494f..e74341e0 100644 --- a/lang/python/python-jmespath/Makefile +++ b/lang/python/python-jmespath/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=jmespath PKG_VERSION:=0.9.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64 @@ -12,44 +12,22 @@ PKG_LICENSE:=MIT include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-jmespath/Default +define Package/python3-jmespath SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=jmespath URL:=https://github.com/jmespath/jmespath.py + DEPENDS:=+python3 endef -define Package/python-jmespath -$(call Package/python-jmespath/Default) - DEPENDS:=+PACKAGE_python-jmespath:python - VARIANT:=python -endef - -define Package/python3-jmespath -$(call Package/python-jmespath/Default) - DEPENDS:=+PACKAGE_python3-jmespath:python3 - VARIANT:=python3 -endef - -define Package/python-jmespath/description +define Package/python3-jmespath/description JMESPath (pronounced “james path”) allows you to declaratively specify how to extract elements from a JSON document. endef -define Package/python3-jmespath/description -$(call Package/python-jmespath/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-jmespath)) -$(eval $(call BuildPackage,python-jmespath)) -$(eval $(call BuildPackage,python-jmespath-src)) - $(eval $(call Py3Package,python3-jmespath)) $(eval $(call BuildPackage,python3-jmespath)) $(eval $(call BuildPackage,python3-jmespath-src)) diff --git a/lang/python/python-jsonpath-ng/Makefile b/lang/python/python-jsonpath-ng/Makefile index 7059c27c..4988fbb3 100644 --- a/lang/python/python-jsonpath-ng/Makefile +++ b/lang/python/python-jsonpath-ng/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-jsonpath-ng PKG_VERSION:=1.4.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Karel Kočí PYPI_NAME:=jsonpath-ng @@ -23,7 +23,6 @@ define Package/python3-jsonpath-ng URL:=https://github.com/h2non/jsonpath-ng TITLE:=python3-jsonpath-ng DEPENDS:=+python3-ply +python3-six +python3-decorator - VARIANT:=python3 endef $(eval $(call Py3Package,python3-jsonpath-ng)) diff --git a/lang/python/python-jsonschema/Makefile b/lang/python/python-jsonschema/Makefile new file mode 100644 index 00000000..efcb76fc --- /dev/null +++ b/lang/python/python-jsonschema/Makefile @@ -0,0 +1,37 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-jsonschema +PKG_VERSION:=3.2.0 +PKG_RELEASE:=4 + +PYPI_NAME:=jsonschema +PKG_HASH:=c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools_scm + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-jsonschema + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=An implementation of JSON Schema validation + URL:=https://github.com/Julian/jsonschema + DEPENDS:=+python3-light +python3-attrs +python3-urllib \ + +python3-six +python3-pyrsistent +python3-setuptools +endef + +define Package/python3-jsonschema/description + jsonschema is an implementation of JSON Schema validation for Python. +endef + +$(eval $(call Py3Package,python3-jsonschema)) +$(eval $(call BuildPackage,python3-jsonschema)) +$(eval $(call BuildPackage,python3-jsonschema-src)) diff --git a/lang/python/python-ldap/Makefile b/lang/python/python-ldap/Makefile deleted file mode 100644 index 78080285..00000000 --- a/lang/python/python-ldap/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2016-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-ldap -PKG_VERSION:=3.1.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dmitry Trefilov -PKG_LICENSE:=Python-style -PKG_LICENSE_FILES:=LICENSE - -PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=41975e79406502c092732c57ef0c2c2eb318d91e8e765f81f5d4ab6c1db727c5 - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-ldap - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - DEPENDS:=+libopenldap +python - TITLE:=Python modules for implementing LDAP clients - URL:=https://python-ldap.org/ -endef - -define Package/python-ldap/description - python-ldap provides an object-oriented API to access LDAP directory - servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs - for that purpose. Additionally the package contains modules for - other LDAP-related stuff (e.g. processing LDIF, LDAPURLs, LDAPv3 - schema, LDAPv3 extended operations and controls, etc.). -endef - -define Build/Compile - $(call Build/Compile/PyMod,,build_ext \ - --include-dirs="$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/include/sasl" \ - --library-dirs="$(STAGING_DIR)/usr/lib:$(STAGING_DIR)/usr/lib/sasl2" \ - build_py \ - install --prefix="$(PKG_INSTALL_DIR)/usr") -endef - -define PyPackage/python-ldap/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call PyPackage,python-ldap)) -$(eval $(call BuildPackage,python-ldap)) diff --git a/lang/python/python-libmodbus/Makefile b/lang/python/python-libmodbus/Makefile index 2f393f44..8f582e6c 100644 --- a/lang/python/python-libmodbus/Makefile +++ b/lang/python/python-libmodbus/Makefile @@ -3,7 +3,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=python-libmodbus PKG_VERSION:=0.5.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=BSD-3-Clause PKG_MAINTAINER:=Daniel Golle @@ -13,46 +13,22 @@ PKG_HASH:=80f837304ffa8476145ea643f6b98aa94b205013a96f1e5173d7bdc776426aee include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-libmodbus/Default +define Package/python3-libmodbus SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - URL:=https://pypi.org/project/pylibmodbus -endef - -define Package/python-libmodbus -$(call Package/python-libmodbus/Default) - TITLE:=python-libmodbus - DEPENDS:=+libmodbus \ - +PACKAGE_python-libmodbus:python-light \ - +PACKAGE_python-libmodbus:python-cffi - VARIANT:=python -endef - -define Package/python3-libmodbus -$(call Package/python-libmodbus/Default) TITLE:=pylibmodbus + URL:=https://pypi.org/project/pylibmodbus DEPENDS:=+libmodbus \ - +PACKAGE_python3-libmodbus:python3-light \ - +PACKAGE_python3-libmodbus:python3-cffi - VARIANT:=python3 -endef - -define Package/python-libmodbus/description - Python Interface for libmodbus written with CFFI. + +python3-light \ + +python3-cffi endef define Package/python3-libmodbus/description -$(call Package/python-libmodbus/description) -. -(Variant for Python3) + Python Interface for libmodbus written with CFFI. endef -$(eval $(call PyPackage,python-libmodbus)) -$(eval $(call BuildPackage,python-libmodbus)) - $(eval $(call Py3Package,python3-libmodbus)) $(eval $(call BuildPackage,python3-libmodbus)) diff --git a/lang/python/python-lxml/Makefile b/lang/python/python-lxml/Makefile index 611168de..0c38979a 100644 --- a/lang/python/python-lxml/Makefile +++ b/lang/python/python-lxml/Makefile @@ -8,87 +8,39 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-lxml -PKG_VERSION:=4.4.2 +PKG_VERSION:=4.5.1 PKG_RELEASE:=1 PYPI_NAME:=lxml -PKG_HASH:=eff69ddbf3ad86375c344339371168640951c302450c5d3e9936e98d6459db06 +PKG_HASH:=27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2 -PKG_LICENSE:=BSD +PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSES.txt PKG_MAINTAINER:=Alexandru Ardelean PKG_CPE_ID:=cpe:/a:lxml:lxml include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-lxml/Default +define Package/python3-lxml SECTION:=lang CATEGORY:=Languages SUBMENU:=Python + TITLE:=Pythonic XML processing library URL:=https://lxml.de - DEPENDS:=+libxml2 +libxslt +libexslt -endef - -define Package/python-lxml -$(call Package/python-lxml/Default) - TITLE:=python-lxml - DEPENDS+=+PACKAGE_python-lxml:python-light +PACKAGE_python-lxml:python-codecs - VARIANT:=python -endef - -define Package/python3-lxml -$(call Package/python-lxml/Default) - TITLE:=python3-lxml - DEPENDS+=+PACKAGE_python3-lxml:python3-light - VARIANT:=python3 -endef - -define Package/python-lxml/description -The lxml XML toolkit is a Pythonic binding -for the C libraries libxml2 and libxslt. + DEPENDS:=+libxml2 +libxslt +libexslt +python3-light endef define Package/python3-lxml/description -$(call Package/python-lxml/description) -. -(Variant for Python3) + lxml is a Pythonic, mature binding for the libxml2 and libxslt + libraries. It provides safe and convenient access to these libraries + using the ElementTree API. + + It extends the ElementTree API significantly to offer support for + XPath, RelaxNG, XML Schema, XSLT, C14N and much more. endef -TARGET_LDFLAGS += -lxml2 -lxslt -lexslt - -define PyBuild/Compile - $(call Build/Compile/PyMod,, \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ - --static \ - --single-version-externally-managed \ - , \ - INCLUDE="$(STAGING_DIR)/usr/include/ $(STAGING_DIR)/usr/include/libxml2" \ - LIBRARY="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - ) -endef - -define Py3Build/Compile - $(call Build/Compile/Py3Mod,, \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ - --static \ - --single-version-externally-managed \ - , \ - INCLUDE="$(STAGING_DIR)/usr/include/ $(STAGING_DIR)/usr/include/libxml2" \ - LIBRARY="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - ) -endef - -$(eval $(call PyPackage,python-lxml)) -$(eval $(call BuildPackage,python-lxml)) -$(eval $(call BuildPackage,python-lxml-src)) - $(eval $(call Py3Package,python3-lxml)) $(eval $(call BuildPackage,python3-lxml)) $(eval $(call BuildPackage,python3-lxml-src)) diff --git a/lang/python/python-markdown/Makefile b/lang/python/python-markdown/Makefile index 90f80d45..3d04c94a 100644 --- a/lang/python/python-markdown/Makefile +++ b/lang/python/python-markdown/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-markdown PKG_VERSION:=3.2.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=Markdown PKG_HASH:=90fee683eeabe1a92e149f7ba74e5ccdc81cd397bd6c516d93a8da0ef90b6902 @@ -32,7 +32,6 @@ define Package/python3-markdown +python3-light \ +python3-setuptools \ +python3-logging - VARIANT:=python3 endef define Package/python3-markdown/description diff --git a/lang/python/python-more-itertools/Makefile b/lang/python/python-more-itertools/Makefile index 895aed57..e548d466 100644 --- a/lang/python/python-more-itertools/Makefile +++ b/lang/python/python-more-itertools/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-more-itertools -PKG_VERSION:=8.2.0 +PKG_VERSION:=8.4.0 PKG_RELEASE:=1 PYPI_NAME:=more-itertools -PKG_HASH:=b1ddb932186d8a6ac451e1d95844b382f55e12686d51ca0c68b6f61f2ab7a507 +PKG_HASH:=68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5 PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT @@ -29,7 +29,6 @@ define Package/python3-more-itertools TITLE:=More routines for operating on iterables, beyond itertools URL:=https://github.com/erikrose/more-itertools DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-more-itertools/description diff --git a/lang/python/python-multidict/Makefile b/lang/python/python-multidict/Makefile index fee85601..b757b2cd 100644 --- a/lang/python/python-multidict/Makefile +++ b/lang/python/python-multidict/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=multidict PKG_VERSION:=4.5.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=024b8129695a952ebd93373e45b5d341dbb87c17ce49637b34000093f243dd4f @@ -31,7 +31,6 @@ define Package/python3-multidict DEPENDS:= \ +python3-light \ +python3-attrs - VARIANT:=python3 endef define Package/python3-multidict/description diff --git a/lang/python/python-mysqlclient/Makefile b/lang/python/python-mysqlclient/Makefile index 47f4a1a5..f758600d 100644 --- a/lang/python/python-mysqlclient/Makefile +++ b/lang/python/python-mysqlclient/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-mysqlclient PKG_VERSION:=1.4.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-2.0 PYPI_NAME:=mysqlclient @@ -18,47 +18,24 @@ PKG_MAINTAINER:=Alexandru Ardelean include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk # python-mysqlclient needs iconv include $(INCLUDE_DIR)/nls.mk -define Package/python-mysqlclient/Default +define Package/python3-mysqlclient SUBMENU:=Python SECTION:=lang CATEGORY:=Languages + TITLE:=MySQL database adapter URL:=https://mysqlclient.readthedocs.io/ + DEPENDS:=+python3 +libmysqlclient endef -define Package/python-mysqlclient - $(call Package/python-mysqlclient/Default) - TITLE:=MySQL database adapter for Python - DEPENDS:=+PACKAGE_python-mysqlclient:python +libmysqlclient - VARIANT:=python -endef - -define Package/python3-mysqlclient - $(call Package/python-mysqlclient/Default) - TITLE:=MySQL database adapter for Python3 - DEPENDS:=+PACKAGE_python3-mysqlclient:python3 +libmysqlclient - VARIANT:=python3 -endef - -define Package/python-mysqlclient/description +define Package/python3-mysqlclient/description MySQLdb is an thread-compatible interface to the popular MySQL database server that provides the Python database API. endef -define Package/python3-mysqlclient/description -$(call Package/python-mysqlclient/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-mysqlclient)) -$(eval $(call BuildPackage,python-mysqlclient)) -$(eval $(call BuildPackage,python-mysqlclient-src)) - $(eval $(call Py3Package,python3-mysqlclient)) $(eval $(call BuildPackage,python3-mysqlclient)) $(eval $(call BuildPackage,python3-mysqlclient-src)) diff --git a/lang/python/python-netdisco/Makefile b/lang/python/python-netdisco/Makefile index 9c5ae54d..377afead 100644 --- a/lang/python/python-netdisco/Makefile +++ b/lang/python/python-netdisco/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-netdisco PKG_VERSION:=2.6.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=netdisco PKG_HASH:=2b3aca14a1807712a053f11fd80dc251dd821ee4899aefece515287981817762 @@ -32,7 +32,6 @@ define Package/python3-netdisco +python3-light \ +python3-requests \ +python3-zeroconf - VARIANT:=python3 endef define Package/python3-netdisco/description diff --git a/lang/python/python-oauthlib/Makefile b/lang/python/python-oauthlib/Makefile index ae157406..c2fe2598 100644 --- a/lang/python/python-oauthlib/Makefile +++ b/lang/python/python-oauthlib/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-oauthlib PKG_VERSION:=3.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Eneas U de Queiroz PKG_LICENSE:=BSD-3-Clause @@ -18,44 +18,22 @@ PKG_HASH:=bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-oauthlib/Default +define Package/python3-oauthlib SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=OAuth request-signing logic for Python URL:=https://github.com/oauthlib/oauthlib + DEPENDS:=+python3-light endef -define Package/python-oauthlib - $(call Package/python-oauthlib/Default) - DEPENDS:=+PACKAGE_python-oauthlib:python-light - VARIANT:=python -endef - -define Package/python3-oauthlib - $(call Package/python-oauthlib/Default) - DEPENDS:=+PACKAGE_python3-oauthlib:python3-light - VARIANT:=python3 -endef - -define Package/python-oauthlib/description +define Package/python3-oauthlib/description A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python endef -define Package/python3-oauthlib/description -$(call Package/python-oauthlib/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-oauthlib)) -$(eval $(call BuildPackage,python-oauthlib)) -$(eval $(call BuildPackage,python-oauthlib-src)) - $(eval $(call Py3Package,python3-oauthlib)) $(eval $(call BuildPackage,python3-oauthlib)) $(eval $(call BuildPackage,python3-oauthlib-src)) diff --git a/lang/python/python-package-install.sh b/lang/python/python-package-install.sh index 337727af..fa42f6f4 100644 --- a/lang/python/python-package-install.sh +++ b/lang/python/python-package-install.sh @@ -1,11 +1,6 @@ #!/bin/sh set -e -[ -z "$SOURCE_DATE_EPOCH" ] || { - PYTHONHASHSEED="$SOURCE_DATE_EPOCH" - export PYTHONHASHSEED -} - process_filespec() { local src_dir="$1" local dst_dir="$2" @@ -40,56 +35,11 @@ process_filespec() { ) } -delete_empty_dirs() { - local dst_dir="$1" - if [ -d "$dst_dir/usr" ] ; then - find "$dst_dir/usr" -empty -type d -delete - fi -} - -ver="$1" -src_dir="$2" -dst_dir="$3" -python="$4" -mode="$5" -filespec="$6" - -find "$src_dir" -name "*.exe" -delete +src_dir="$1" +dst_dir="$2" +filespec="$3" process_filespec "$src_dir" "$dst_dir" "$filespec" || { echo "process filespec error-ed" exit 1 } - -if [ "$mode" == "sources" ] ; then - # Copy only python source files - find "$dst_dir" -not -type d -not -name "*.py" -delete - - delete_empty_dirs "$dst_dir" - exit 0 -fi - -if [ "$ver" == "3" ] ; then - legacy="-b" -fi -# default max recursion is 10 -max_recursion_level=20 - -# XXX [So that you won't goof as I did] -# Note: Yes, I tried to use the -O & -OO flags here. -# However the generated byte-codes were not portable. -# So, we just stuck to un-optimized byte-codes, -# which is still way better/faster than running -# Python sources all the time. -$python -m compileall -r "$max_recursion_level" $legacy -d '/' "$dst_dir" || { - echo "python -m compileall err-ed" - exit 1 -} - -# Delete source files and pyc [ un-optimized bytecode files ] -# We may want to make this optimization thing configurable later, but not sure atm -find "$dst_dir" -type f -name "*.py" -delete - -delete_empty_dirs "$dst_dir" - -exit 0 diff --git a/lang/python/python-package.mk b/lang/python/python-package.mk deleted file mode 100644 index 019f4f02..00000000 --- a/lang/python/python-package.mk +++ /dev/null @@ -1,153 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile - -python_mk_path:=$(dir $(lastword $(MAKEFILE_LIST))) -include $(python_mk_path)python-host.mk - -PYTHON_DIR:=$(STAGING_DIR)/usr -PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin -PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION) -PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION) - -PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages - -PYTHON:=python$(PYTHON_VERSION) - -PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR) - -# These configure args are needed in detection of path to Python header files -# using autotools. -CONFIGURE_ARGS += \ - _python_sysroot="$(STAGING_DIR)" \ - _python_prefix="/usr" \ - _python_exec_prefix="/usr" - -PKG_USE_MIPS16:=0 -# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16 -# flags are inherited from the Python base package (via sysconfig module) -ifdef CONFIG_USE_MIPS16 - TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16 -endif - -define PyShebang -$(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python2," -i --follow-symlinks $(1) -endef - -define PyPackage - - define Package/$(1)-src - $(call Package/$(1)) - DEPENDS:= - CONFLICTS:= - PROVIDES:= - EXTRA_DEPENDS:= - TITLE+= (sources) - USERID:= - MENU:= - endef - - define Package/$(1)-src/description - $(call Package/$(1)/description). - (Contains the Python sources for this package). - endef - - # Add default PyPackage filespec none defined - ifndef PyPackage/$(1)/filespec - define PyPackage/$(1)/filespec - +|$(PYTHON_PKG_DIR) - endef - endif - - ifndef PyPackage/$(1)/install - define PyPackage/$(1)/install - if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \ - $(INSTALL_DIR) $$(1)/usr/bin ; \ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ ; \ - fi - endef - endif - - ifndef Package/$(1)/install - $(call shexport,PyPackage/$(1)/filespec) - - define Package/$(1)/install - $$(call PyPackage/$(1)/install,$$(1)) - $(SHELL) $(python_mk_path)python-package-install.sh "2" \ - "$(PKG_INSTALL_DIR)" "$$(1)" \ - "$(HOST_PYTHON_BIN)" "$$(2)" \ - "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)" && \ - if [ -d "$$(1)/usr/bin" ]; then \ - $(call PyShebang,$$(1)/usr/bin/*) ; \ - fi - endef - - define Package/$(1)-src/install - $$(call Package/$(1)/install,$$(1),sources) - endef - endif # Package/$(1)/install -endef - -# $(1) => commands to execute before running pythons script -# $(2) => python script and its arguments -# $(3) => additional variables -define Build/Compile/HostPyRunTarget - $(call HostPython, \ - $(if $(1),$(1);) \ - CC="$(TARGET_CC)" \ - CCSHARED="$(TARGET_CC) $(FPIC)" \ - CXX="$(TARGET_CXX)" \ - LD="$(TARGET_CC)" \ - LDSHARED="$(TARGET_CC) -shared" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \ - LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \ - _PYTHON_HOST_PLATFORM=linux2 \ - __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \ - $(3) \ - , \ - $(2) \ - ) -endef - -# $(1) => build subdir -# $(2) => additional arguments to setup.py -# $(3) => additional variables -define Build/Compile/PyMod - $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR) - $(call Build/Compile/HostPyRunTarget, \ - cd $(PKG_BUILD_DIR)/$(strip $(1)), \ - ./setup.py $(2), \ - $(3)) -endef - -PYTHON_PKG_SETUP_DIR ?= -PYTHON_PKG_SETUP_GLOBAL_ARGS ?= -PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed -PYTHON_PKG_SETUP_VARS ?= - -define PyBuild/Compile/Default - $(if $(HOST_PYTHON_PACKAGE_BUILD_DEPENDS), - $(call Build/Compile/HostPyPipInstall,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS)) - ) - $(call Build/Compile/PyMod, \ - $(PYTHON_PKG_SETUP_DIR), \ - $(PYTHON_PKG_SETUP_GLOBAL_ARGS) \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ - $(PYTHON_PKG_SETUP_ARGS), \ - $(PYTHON_PKG_SETUP_VARS) \ - ) -endef - -PyBuild/Compile=$(PyBuild/Compile/Default) - -ifeq ($(BUILD_VARIANT),python) -define Build/Compile - $(call PyBuild/Compile) -endef -endif # python diff --git a/lang/python/python-packages/Makefile b/lang/python/python-packages/Makefile deleted file mode 100644 index 1cc565f0..00000000 --- a/lang/python/python-packages/Makefile +++ /dev/null @@ -1,131 +0,0 @@ -# -# Copyright (C) 2016 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-packages -PKG_VERSION:=1.0 -PKG_RELEASE:=2 - -PKG_MAINTAINER:=Yousong Zhou - -# -# NOTE: move the host module installation to Host/Compile when -# HOST_CONFIG_DEPENDS is supported -# -# NOTE: PKG_CONFIG_DEPENDS cannot correctly track changes of string type config -# options, so you may want to do manual cleanup on config change. -# -PKG_CONFIG_DEPENDS:= \ - CONFIG_PACKAGE_python-packages-list-host \ - CONFIG_PACKAGE_python-packages-list \ - CONFIG_PACKAGE_python-packages-list-cleanup \ - CONFIG_PACKAGE_python-packages-envs \ - CONFIG_PACKAGE_python-packages-extra-deps \ - CONFIG_PACKAGE_python-packages-index-url \ - CONFIG_PACKAGE_python-packages-pip-opts \ - -PKG_BUILD_DEPENDS:=python python/host - -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-packages - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=A dummy package for packaging python modules with pip - DEPENDS:=@DEVEL +python -endef - -define Package/python-packages/config -if PACKAGE_python-packages -config PACKAGE_python-packages-list-host - string "List of python packages to install on host" -config PACKAGE_python-packages-list - string "List of python packages to install on target" -config PACKAGE_python-packages-list-cleanup - string "List of python packages to cleanup to avoid clash with existing packages" -config PACKAGE_python-packages-envs - string "Extra environment variables to pass on to pip and its children on target build" -config PACKAGE_python-packages-extra-deps - string "List of deps fulfilled but not tracked by the build system" -config PACKAGE_python-packages-index-url - string "Index URL passed to pip with --index-url" -config PACKAGE_python-packages-pip-opts - string "Additional arguments to pip command line" -endif -endef - -CONFIG_PACKAGE_python-packages-list-host:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-list-host)) -CONFIG_PACKAGE_python-packages-list:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-list)) -CONFIG_PACKAGE_python-packages-list-cleanup:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-list-cleanup)) -CONFIG_PACKAGE_python-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-envs)) -CONFIG_PACKAGE_python-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-extra-deps)) -CONFIG_PACKAGE_python-packages-index-url:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-index-url)) -CONFIG_PACKAGE_python-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-pip-opts)) - -HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION) - -decr=$(word $(1),0 1 2 3 4 5 6 7 8 9 10) -recur=$(if $(subst 0,,$(2)),$(call recur,$(1),$(call decr,$(2)),$(call $(1)$(2),$(3))),$(3)) -_req2dir1=$(subst >,gt,$(1)) -_req2dir2=$(subst <,lt,$(1)) -_req2dir3=$(subst >=,geq,$(1)) -_req2dir4=$(subst <=,leq,$(1)) -_req2dir5=$(subst ://,:::,$(1)) -_req2dir6=$(subst *,_,$(1)) -_req2dir7=$(subst ?,_,$(1)) -req2dir=$(call recur,_req2dir,7,$(1)) - -# --ignore-installed, it may happen that host pip will ignore target install if -# it was already installed as host module, e.g. cffi deps of cryptograph -HOST_PYTHON_PIP_INSTALL=$(HOST_PYTHON_PIP) install \ - --root=$(1) \ - --prefix=$(2) \ - --ignore-installed \ - --no-compile \ - $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url "$(CONFIG_PACKAGE_python-packages-index-url)") \ - $(if $(CONFIG_PACKAGE_python-packages-pip-opts), $(CONFIG_PACKAGE_python-packages-pip-opts)) \ - -HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"") -HOST_PYTHON_PIP_INSTALL_TARGET=$(call HOST_PYTHON_PIP_INSTALL,$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg)),/usr) -HOST_PYTHON_PIP_INSTALL_CLEANUP:=$(call HOST_PYTHON_PIP_INSTALL,$(PKG_INSTALL_DIR)/_cleanup,/usr) - -define Build/Compile - $(foreach pkg,$(CONFIG_PACKAGE_python-packages-list-host), - $(call Build/Compile/HostPyRunHost,,$(HOST_PYTHON_PIP_INSTALL_HOST) $(pkg)) - ) - $(foreach pkg,$(CONFIG_PACKAGE_python-packages-list), - $(call Build/Compile/HostPyRunTarget,,$(call HOST_PYTHON_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python-packages-envs)) - ) - $(foreach pkg,$(CONFIG_PACKAGE_python-packages-list-cleanup), - $(call Build/Compile/HostPyRunTarget,,$(HOST_PYTHON_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python-packages-envs)) - ) -endef - -define Package/python-packages/install - $(foreach pkg,$(CONFIG_PACKAGE_python-packages-list), - $(CP) "$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg))"/* $(1) - ) - - find "$(PKG_INSTALL_DIR)/_cleanup" -mindepth 1 -depth | while read sf; do \ - tf="$$$${sf#$(PKG_INSTALL_DIR)/_cleanup/}"; \ - tf="$(1)/$$$$tf"; \ - if [ -f "$$$$tf" -o -L "$$$$tf" ]; then \ - rm -vf "$$$$tf"; \ - elif [ -d "$$$$tf" ]; then \ - rmdir -v -p "$$$$tf" || true; \ - fi \ - done -endef - -define Package/python-packages/extra_provides - echo $(CONFIG_PACKAGE_python-packages-extra-deps) | tr ' ' '\n' -endef - -$(eval $(call BuildPackage,python-packages)) diff --git a/lang/python/python-packages/README.md b/lang/python/python-packages/README.md deleted file mode 100644 index 3c09d8eb..00000000 --- a/lang/python/python-packages/README.md +++ /dev/null @@ -1,72 +0,0 @@ -This package allows users to package python modules without creating package -Makefiles for each individual module and their dependencies. It provides a -way making packaging python packages faster and may also facilitate the process -of developing Makefiles for new python packages - -This is a raw DEVEL only package. Using it may entail a lot of implementation -details and you may need to resolve target dependencies and package details on -your own - -- Third party python packages may depend on features not included in e.g. - python-light -- Some python modules may require host install of another module to progress, - e.g. target cryptography requires host cffi -- Some python modules have external C library dependencies, e.g. pyOpenSSL - requires openssl libs -- Some packages may have an autoconf configure script whose arguments we - cannot control with pip and has to be passed on (hacked) by overriding some - environment variables - -## How it works - -1. Install host modules required for building target modules -2. Install each target module to separate directories -3. Install another copy of modules for cleanup purposes to make list of - installed files to be removed from target modules installed in step 2 - -Why should it be so - -1. Installing target cryptography requires host installation of cffi module -2. cryptography requires setuptools and pip will install its own copy with - --ignore-installed. When PACKAGE_python-setuptools is also selected, opkg - will complain of data file clashes if it was not removed here. - -Pip will handle dependency requirements of python modules, but external -dependencies like c libraries has to be prepared by the build system. The -issue is that there is currently no way to express such dependencies, thus may -cause build failure, e.g. pycrypto requires the presence of libgmp to build -successfully. - -## Tips - -If something goes wrong, we can add additional arguments to pip command -line to check the detailed build process. Some useful arguments may be - -- -v, for verbose output. Repeat this option if the current level of - verbosity is not enough -- --no-clean, for preserving pip build dir on build failure - -## Examples - -tornado (python-only module) - - CONFIG_PACKAGE_python-packages=y - CONFIG_PACKAGE_python-packages-list="tornado==4.4.2" - -cryptography (requires installation of host modules and cleanup on target modules) - - CONFIG_PACKAGE_python-packages=y - CONFIG_PACKAGE_python-packages-list-host="cffi" - CONFIG_PACKAGE_python-packages-list="cryptography" - CONFIG_PACKAGE_python-packages-list-cleanup="setuptools" - -pycrypto 2.7a1 (python module with autoconf configure script; depends on -libgmp; broken wmmintrin.h). 2.6.1 does not work because of a flaw in -the setup.py hardcoding host include directory - - CONFIG_PACKAGE_libgmp=y - CONFIG_PACKAGE_python-packages=y - CONFIG_PACKAGE_python-packages-list="https://github.com/dlitz/pycrypto/archive/v2.7a1.tar.gz" - CONFIG_PACKAGE_python-packages-envs="ac_cv_header_wmmintrin_h=no build_alias=$(GNU_HOST_NAME) host_alias=$(GNU_TARGET_NAME) target_alias=$(GNU_TARGET_NAME)" - CONFIG_PACKAGE_python-packages-extra-deps="libgmp.so.10" - diff --git a/lang/python/python-packaging/Makefile b/lang/python/python-packaging/Makefile new file mode 100644 index 00000000..c9b27a05 --- /dev/null +++ b/lang/python/python-packaging/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2020 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-packaging +PKG_VERSION:=20.4 +PKG_RELEASE:=1 + +PYPI_NAME:=packaging +PKG_HASH:=4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=Apache-2.0 BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-packaging + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Core utilities for Python packages + URL:=https://github.com/pypa/packaging + DEPENDS:=+python3-light +python3-pyparsing +python3-six +python3-logging +python3-distutils +endef + +define Package/python3-packaging/description + The packaging project includes version handling, specifiers, + markers, requirements, tags, utilities. +endef + +$(eval $(call Py3Package,python3-packaging)) +$(eval $(call BuildPackage,python3-packaging)) +$(eval $(call BuildPackage,python3-packaging-src)) diff --git a/lang/python/python-paho-mqtt/Makefile b/lang/python/python-paho-mqtt/Makefile index 51540292..0be206f2 100644 --- a/lang/python/python-paho-mqtt/Makefile +++ b/lang/python/python-paho-mqtt/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-paho-mqtt PKG_VERSION:=1.5.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Josef Schlehofer , Alexandru Ardelean PKG_LICENSE:=EPL-1.0 Eclipse Distribution License v1.0 @@ -26,7 +26,6 @@ define Package/python3-paho-mqtt TITLE:=python3-paho-mqtt URL:=http://eclipse.org/paho DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-paho-mqtt/description diff --git a/lang/python/python-paramiko/Makefile b/lang/python/python-paramiko/Makefile new file mode 100644 index 00000000..82005c1c --- /dev/null +++ b/lang/python/python-paramiko/Makefile @@ -0,0 +1,39 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-paramiko +PKG_VERSION:=2.7.1 +PKG_RELEASE:=2 + +PYPI_NAME:=paramiko +PKG_HASH:=920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +PYTHON3_PKG_SETUP_ARGS:= + +define Package/python3-paramiko + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=SSH2 protocol library + URL:=https://github.com/paramiko/paramiko/ + DEPENDS:=+python3-light +python3-logging +python3-bcrypt \ + +python3-cryptography +python3-openssl +python3-pynacl +endef + +define Package/python3-paramiko/description + Paramiko is a Python (2.7, 3.4+) implementation of the SSHv2 protocol, + providing both client and server functionality. While it leverages a Python + C extension for low level cryptography (Cryptography), Paramiko itself is a + pure Python interface around SSH networking concepts. +endef + +$(eval $(call Py3Package,python3-paramiko)) +$(eval $(call BuildPackage,python3-paramiko)) +$(eval $(call BuildPackage,python3-paramiko-src)) diff --git a/lang/python/python-parsley/Makefile b/lang/python/python-parsley/Makefile index 39fed358..7eaf15e1 100644 --- a/lang/python/python-parsley/Makefile +++ b/lang/python/python-parsley/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-parsley PKG_VERSION:=1.3 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PYPI_NAME:=Parsley PKG_HASH:=9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41 @@ -20,46 +20,23 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -PYTHON_PKG_SETUP_ARGS:= PYTHON3_PKG_SETUP_ARGS:= -define Package/python-parsley/Default +define Package/python3-parsley SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Parsing and pattern matching URL:=http://launchpad.net/parsley -endef - -define Package/python-parsley -$(call Package/python-parsley/Default) - DEPENDS:=+PACKAGE_python-parsley:python-light - VARIANT:=python -endef - -define Package/python3-parsley -$(call Package/python-parsley/Default) - DEPENDS:=+PACKAGE_python3-parsley:python3-light - VARIANT:=python3 -endef - -define Package/python-parsley/description -Parsing and pattern matching made easy. + DEPENDS:=+python3-light endef define Package/python3-parsley/description -$(call Package/python-parsley/description) -. -(Variant for Python3) +Parsing and pattern matching made easy. endef -$(eval $(call PyPackage,python-parsley)) -$(eval $(call BuildPackage,python-parsley)) -$(eval $(call BuildPackage,python-parsley-src)) - $(eval $(call Py3Package,python3-parsley)) $(eval $(call BuildPackage,python3-parsley)) $(eval $(call BuildPackage,python3-parsley-src)) diff --git a/lang/python/python-pcapy/Makefile b/lang/python/python-pcapy/Makefile deleted file mode 100644 index 5389146e..00000000 --- a/lang/python/python-pcapy/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-pcapy -PKG_VERSION:=0.11.4 -PKG_RELEASE:=2 - -PYPI_NAME:=pcapy -PKG_HASH:=aa239913678d7ba116e66057a37f914de7726aecd11d00db470127df115c4e78 - -PKG_MAINTAINER:=Andrew McConachie -PKG_LICENSE:=Apache-1.1 - -include ../pypi.mk -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-pcapy - SECTION:=language-python - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-pcapy - URL:=https://www.coresecurity.com/corelabs-research/open-source-tools/pcapy - DEPENDS:=+python +libpcap $(CXX_DEPENDS) -endef - -define Package/python-pcapy/description - Pcapy is a Python extension module that interfaces with the libpcap packet capture library. Pcapy enables python scripts to capture packets on the network. Pcapy is highly effective when used in conjunction with a packet-handling package such as Impacket, which is a collection of Python classes for constructing and dissecting network packets. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,\ - install --prefix=/usr --root="$(PKG_INSTALL_DIR)" \ - ) -endef - -$(eval $(call PyPackage,python-pcapy)) -$(eval $(call BuildPackage,python-pcapy)) diff --git a/lang/python/python-pcapy/patches/010-libcxx.patch b/lang/python/python-pcapy/patches/010-libcxx.patch deleted file mode 100644 index d27dbdd0..00000000 --- a/lang/python/python-pcapy/patches/010-libcxx.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index 4da69bc..165059b 100644 ---- a/setup.py -+++ b/setup.py -@@ -28,7 +28,7 @@ if sys.platform == 'win32': - library_dirs.append(r'c:\wpdpack\Lib') - libraries = ['wpcap', 'packet', 'ws2_32'] - else: -- libraries = ['pcap', 'stdc++'] -+ libraries = ['pcap'] - - - # end of user configurable parameters diff --git a/lang/python/python-pluggy/Makefile b/lang/python/python-pluggy/Makefile new file mode 100644 index 00000000..4ed250ea --- /dev/null +++ b/lang/python/python-pluggy/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2020 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-pluggy +PKG_VERSION:=0.13.1 +PKG_RELEASE:=3 + +PYPI_NAME:=pluggy +PKG_HASH:=15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-pluggy + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Plugin and hook calling mechanisms for Python + URL:=https://github.com/pytest-dev/pluggy + DEPENDS:=+python3-light +endef + +define Package/python3-pluggy/description + A minimalist production ready plugin system for python +endef + +$(eval $(call Py3Package,python3-pluggy)) +$(eval $(call BuildPackage,python3-pluggy)) +$(eval $(call BuildPackage,python3-pluggy-src)) diff --git a/lang/python/python-ply/Makefile b/lang/python/python-ply/Makefile index ea6457d7..6a0b283e 100644 --- a/lang/python/python-ply/Makefile +++ b/lang/python/python-ply/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-ply PKG_VERSION:=3.11 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=ply PKG_HASH:=00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3 @@ -20,44 +20,22 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-ply/Default +define Package/python3-ply SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=lex and yacc for Python URL:=http://www.dabeaz.com/ply/ + DEPENDS:=+python3-light endef -define Package/python-ply -$(call Package/python-ply/Default) - DEPENDS:=+PACKAGE_python-ply:python-light - VARIANT:=python -endef - -define Package/python3-ply -$(call Package/python-ply/Default) - DEPENDS:=+PACKAGE_python3-ply:python3-light - VARIANT:=python3 -endef - -define Package/python-ply/description +define Package/python3-ply/description PLY is a 100% Python implementation of the common parsing tools lex and yacc. endef -define Package/python3-ply/description -$(call Package/python-ply/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-ply)) -$(eval $(call BuildPackage,python-ply)) -$(eval $(call BuildPackage,python-ply-src)) - $(eval $(call Py3Package,python3-ply)) $(eval $(call BuildPackage,python3-ply)) $(eval $(call BuildPackage,python3-ply-src)) diff --git a/lang/python/python-psycopg2/Makefile b/lang/python/python-psycopg2/Makefile deleted file mode 100644 index b67d29ef..00000000 --- a/lang/python/python-psycopg2/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-psycopg2 -PKG_VERSION:=2.7.6.1 -PKG_RELEASE:=2 - -PYPI_NAME:=psycopg2 -PKG_HASH:=27959abe64ca1fc6d8cd11a71a1f421d8287831a3262bd4cacd43bbf43cc3c82 - -PKG_MAINTAINER:=Dmitry Trefilov -PKG_LICENSE:=LGPL-3.0-or-later -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=python/host - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-psycopg2 - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=PostgreSQL database adapter for Python - URL:=http://initd.org/psycopg/ - DEPENDS:=+python +libpq +python-egenix-mx-base -endef - -define Package/python-psycopg2/description - Psycopg is the most popular PostgreSQL adapter for the Python programming language -endef - -define Build/Compile - # The PATH var is required so that psycopg2's setup.py script finds pg_config - $(call Build/Compile/PyMod,., \ - install --prefix=/usr --root=$(PKG_INSTALL_DIR), \ - PATH=$(STAGING_DIR)/usr/bin:$(PATH)) -endef - -define Package/python-psycopg2/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call PyPackage,python-psycopg2)) -$(eval $(call BuildPackage,python-psycopg2)) diff --git a/lang/python/python-py/Makefile b/lang/python/python-py/Makefile index d6264fe1..8d792545 100644 --- a/lang/python/python-py/Makefile +++ b/lang/python/python-py/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-py PKG_VERSION:=1.8.1 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PYPI_NAME:=py PKG_HASH:=5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa @@ -18,12 +18,13 @@ PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm - define Package/python3-py SUBMENU:=Python SECTION:=lang @@ -31,7 +32,6 @@ define Package/python3-py TITLE:=py URL:=https://github.com/pytest-dev/py DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-py/description diff --git a/lang/python/python-pyasn1-modules/Makefile b/lang/python/python-pyasn1-modules/Makefile index 5261bece..8d82aa8c 100644 --- a/lang/python/python-pyasn1-modules/Makefile +++ b/lang/python/python-pyasn1-modules/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyasn1-modules PKG_VERSION:=0.2.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=pyasn1-modules PKG_HASH:=905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e @@ -20,48 +20,24 @@ PKG_MAINTAINER:=Jeffery To , Alexandru Ardelean , Alexandru Ardelean -HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="ply==3.10" +PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="ply==3.10" include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-pycparser/Default +define Package/python3-pycparser SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=C parser in Python URL:=https://github.com/eliben/pycparser -endef - -define Package/python-pycparser -$(call Package/python-pycparser/Default) DEPENDS:= \ - +PACKAGE_python-pycparser:python-light \ - +PACKAGE_python-pycparser:python-ply - VARIANT:=python + +python3-light \ + +python3-ply endef -define Package/python3-pycparser -$(call Package/python-pycparser/Default) - DEPENDS:= \ - +PACKAGE_python3-pycparser:python3-light \ - +PACKAGE_python3-pycparser:python3-ply - VARIANT:=python3 -endef - -define Package/python-pycparser/description +define Package/python3-pycparser/description pycparser is a parser for the C language, written in pure Python. It is a module designed to be easily integrated into applications that need to parse C source code. endef -define Package/python3-pycparser/description -$(call Package/python-pycparser/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-pycparser)) -$(eval $(call BuildPackage,python-pycparser)) -$(eval $(call BuildPackage,python-pycparser-src)) - $(eval $(call Py3Package,python3-pycparser)) $(eval $(call BuildPackage,python3-pycparser)) $(eval $(call BuildPackage,python3-pycparser-src)) diff --git a/lang/python/python-pynacl/Makefile b/lang/python/python-pynacl/Makefile new file mode 100644 index 00000000..69ed754d --- /dev/null +++ b/lang/python/python-pynacl/Makefile @@ -0,0 +1,40 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-pynacl +PKG_VERSION:=1.4.0 +PKG_RELEASE:=3 + +PYPI_NAME:=PyNaCl +PKG_HASH:=54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505 + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=libffi/host +PKG_BUILD_PARALLEL:=0 + +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.4.1" + +PYTHON3_PKG_SETUP_VARS:= SODIUM_INSTALL=system + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-pynacl + CATEGORY:=Languages + SECTION:=lang + SUBMENU:=Python + TITLE:=Python binding to the libsodium library + URL:=https://github.com/pyca/pynacl/ + DEPENDS:=+libsodium +python3-light +python3-cffi +python3-six +endef + +define Package/python3-pynacl/description + PyNaCl is a Python binding to libsodium, which is a fork of the Networking and Cryptography library. +endef + +$(eval $(call Py3Package,python3-pynacl)) +$(eval $(call BuildPackage,python3-pynacl)) +$(eval $(call BuildPackage,python3-pynacl-src)) diff --git a/lang/python/python-pyopenssl/Makefile b/lang/python/python-pyopenssl/Makefile index 53dccc30..6580e74f 100644 --- a/lang/python/python-pyopenssl/Makefile +++ b/lang/python/python-pyopenssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyopenssl PKG_VERSION:=19.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=pyOpenSSL PKG_HASH:=9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507 @@ -21,49 +21,24 @@ PKG_CPE_ID:=cpe:/a:pyopenssl_project:pyopenssl include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-pyopenssl/Default +define Package/python3-pyopenssl SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=OpenSSL wrapper URL:=https://pyopenssl.org/ -endef - -define Package/python-pyopenssl -$(call Package/python-pyopenssl/Default) DEPENDS:= \ - +PACKAGE_python-pyopenssl:python-light \ - +PACKAGE_python-pyopenssl:python-cryptography \ - +PACKAGE_python-pyopenssl:python-six - VARIANT:=python -endef - -define Package/python3-pyopenssl -$(call Package/python-pyopenssl/Default) - DEPENDS:= \ - +PACKAGE_python3-pyopenssl:python3-light \ - +PACKAGE_python3-pyopenssl:python3-cryptography \ - +PACKAGE_python3-pyopenssl:python3-six - VARIANT:=python3 -endef - -define Package/python-pyopenssl/description -Python wrapper module around the OpenSSL library + +python3-light \ + +python3-cryptography \ + +python3-six endef define Package/python3-pyopenssl/description -$(call Package/python-pyopenssl/description) -. -(Variant for Python3). +Python wrapper module around the OpenSSL library endef -$(eval $(call PyPackage,python-pyopenssl)) -$(eval $(call BuildPackage,python-pyopenssl)) -$(eval $(call BuildPackage,python-pyopenssl-src)) - $(eval $(call Py3Package,python3-pyopenssl)) $(eval $(call BuildPackage,python3-pyopenssl)) $(eval $(call BuildPackage,python3-pyopenssl-src)) diff --git a/lang/python/python-pyotp/Makefile b/lang/python/python-pyotp/Makefile index e04a92f7..9cda8ac6 100644 --- a/lang/python/python-pyotp/Makefile +++ b/lang/python/python-pyotp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pyotp PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=fc537e8acd985c5cbf51e11b7d53c42276fee017a73aec7c07380695671ca1a1 @@ -29,7 +29,6 @@ define Package/python3-pyotp TITLE:=Python One-Time Password Library URL:=https://github.com/pyauth/pyotp DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-pyotp/description diff --git a/lang/python/python-pyparsing/Makefile b/lang/python/python-pyparsing/Makefile index 55313639..0c4365c1 100644 --- a/lang/python/python-pyparsing/Makefile +++ b/lang/python/python-pyparsing/Makefile @@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyparsing -PKG_VERSION:=2.4.6 -PKG_RELEASE:=1 +PKG_VERSION:=2.4.7 +PKG_RELEASE:=2 PYPI_NAME:=pyparsing -PKG_HASH:=4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f +PKG_HASH:=c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1 PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT @@ -30,7 +30,6 @@ define Package/python3-pyparsing TITLE:=Library for constructing grammar directly in python URL:=https://github.com/pyparsing/pyparsing/ DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-pyparsing/description diff --git a/lang/python/python-pyptlib/Makefile b/lang/python/python-pyptlib/Makefile deleted file mode 100644 index 9c0403ab..00000000 --- a/lang/python/python-pyptlib/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2015, 2017-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-pyptlib -PKG_VERSION:=0.0.6 -PKG_RELEASE:=3 - -PYPI_NAME:=pyptlib -PKG_HASH:=b98472e3d9e8f4689d3913ca8f89afa5e6cc5383dcd8686987606166f9dac607 - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Jeffery To - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -define Package/python-pyptlib/Default - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Pluggable Transports for Tor - URL:=https://pypi.org/project/pyptlib/ -endef - -define Package/python-pyptlib -$(call Package/python-pyptlib/Default) - DEPENDS:=+PACKAGE_python-pyptlib:python-light - VARIANT:=python -endef - -define Package/python-pyptlib/description -A python implementation of the Pluggable Transports for Circumvention -specification for Tor -endef - -$(eval $(call PyPackage,python-pyptlib)) -$(eval $(call BuildPackage,python-pyptlib)) -$(eval $(call BuildPackage,python-pyptlib-src)) diff --git a/lang/python/python-pyrsistent/Makefile b/lang/python/python-pyrsistent/Makefile index 9121a7fe..b9ae85d7 100644 --- a/lang/python/python-pyrsistent/Makefile +++ b/lang/python/python-pyrsistent/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyrsistent -PKG_VERSION:=0.15.4 +PKG_VERSION:=0.16.0 PKG_RELEASE:=1 PYPI_NAME:=pyrsistent -PKG_HASH:=34b47fa169d6006b32e99d4b3c4031f155e6e68ebcc107d6454852e8e0ee6533 +PKG_HASH:=28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3 PKG_MAINTAINER:=Josef Schlehofer PKG_LICENSE:=MIT @@ -29,7 +29,6 @@ define Package/python3-pyrsistent TITLE:=Persistent/Functional/Immutable data structures URL:=https://github.com/tobgu/pyrsistent DEPENDS:=+python3-light +python3-six - VARIANT:=python3 endef define Package/python3-pyrsistent/description diff --git a/lang/python/python-pyserial/Makefile b/lang/python/python-pyserial/Makefile index ca80e6c4..e74cc880 100644 --- a/lang/python/python-pyserial/Makefile +++ b/lang/python/python-pyserial/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyserial PKG_VERSION:=3.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=pyserial PKG_HASH:=6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627 @@ -19,47 +19,24 @@ PKG_MAINTAINER:=Micke Prag include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-pyserial/Default +define Package/python3-pyserial SECTION:=lang-python CATEGORY:=Languages SUBMENU:=Python - URL:=https://github.com/pyserial/pyserial -endef - -define Package/python-pyserial -$(call Package/python-pyserial/Default) - TITLE:=python-pyserial - DEPENDS:=+PACKAGE_python-pyserial:python-light - VARIANT:=python -endef - -define Package/python3-pyserial -$(call Package/python-pyserial/Default) TITLE:=python3-pyserial - DEPENDS:=+PACKAGE_python3-pyserial:python3-light - VARIANT:=python3 + URL:=https://github.com/pyserial/pyserial + DEPENDS:=+python3-light endef -define Package/python-pyserial/description +define Package/python3-pyserial/description This module encapsulates the access for the serial port. It provides backends for Python running on Windows, OSX, Linux, BSD (possibly any POSIX compliant system) and IronPython. The module named "serial" automatically selects the appropriate backend. endef -define Package/python3-pyserial/description -$(call Package/python-pyserial/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-pyserial)) -$(eval $(call BuildPackage,python-pyserial)) -$(eval $(call BuildPackage,python-pyserial-src)) - $(eval $(call Py3Package,python3-pyserial)) $(eval $(call BuildPackage,python3-pyserial)) $(eval $(call BuildPackage,python3-pyserial-src)) diff --git a/lang/python/python-pytest/Makefile b/lang/python/python-pytest/Makefile new file mode 100644 index 00000000..8b1dadcb --- /dev/null +++ b/lang/python/python-pytest/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2020 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-pytest +PKG_VERSION:=5.4.2 +PKG_RELEASE:=2 + +PYPI_NAME:=pytest +PKG_HASH:=eb2b5e935f6a019317e455b6da83dd8650ac9ffd2ee73a7b657a30873d67a698 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-pytest + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python testing framework + URL:=https://docs.pytest.org/en/latest/ + DEPENDS:= \ + +python3-light \ + +python3-more-itertools \ + +python3-py \ + +python3-attrs \ + +python3-pluggy \ + +python3-packaging \ + +python3-wcwidth \ + +python3-decimal \ + +python3-logging \ + +python3-urllib +endef + +define Package/python3-pytest/description + The pytest framework makes it easy to write small tests, yet scales to support + complex functional testing for applications and libraries. +endef + +$(eval $(call Py3Package,python3-pytest)) +$(eval $(call BuildPackage,python3-pytest)) +$(eval $(call BuildPackage,python3-pytest-src)) diff --git a/lang/python/python-pytz/Makefile b/lang/python/python-pytz/Makefile index bdff0ac5..d3453752 100644 --- a/lang/python/python-pytz/Makefile +++ b/lang/python/python-pytz/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pytz -PKG_VERSION:=2019.3 +PKG_VERSION:=2020.1 PKG_RELEASE:=1 PYPI_NAME:=pytz -PKG_HASH:=b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be +PKG_HASH:=c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048 PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=MIT @@ -20,44 +20,21 @@ PKG_LICENSE_FILES:=LICENSE.txt include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-pytz/Default +define Package/python3-pytz SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - URL:=https://pythonhosted.org/pytz/ -endef - -define Package/python-pytz -$(call Package/python-pytz/Default) TITLE:=World timezone definitions, modern and historical - DEPENDS:=+PACKAGE_python-pytz:python-light - VARIANT:=python -endef - -define Package/python3-pytz -$(call Package/python-pytz/Default) - TITLE:=World timezone definitions, modern and historical for Python3 - DEPENDS:=+PACKAGE_python3-pytz:python3-light - VARIANT:=python3 -endef - -define Package/python-pytz/description - World timezone definitions, modern and historical + URL:=https://pythonhosted.org/pytz/ + DEPENDS:=+python3-light endef define Package/python3-pytz/description -$(call Package/python-pytz/description) -. -(Variant for Python3) + World timezone definitions, modern and historical endef -$(eval $(call PyPackage,python-pytz)) -$(eval $(call BuildPackage,python-pytz)) -$(eval $(call BuildPackage,python-pytz-src)) - $(eval $(call Py3Package,python3-pytz)) $(eval $(call BuildPackage,python3-pytz)) $(eval $(call BuildPackage,python3-pytz-src)) diff --git a/lang/python/python-qrcode/Makefile b/lang/python/python-qrcode/Makefile index 63c08db3..1e674f75 100644 --- a/lang/python/python-qrcode/Makefile +++ b/lang/python/python-qrcode/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-qrcode PKG_VERSION:=6.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=qrcode PKG_HASH:=505253854f607f2abf4d16092c61d4e9d511a3b4392e60bff957a68592b04369 @@ -18,51 +18,25 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-qrcode/Default +define Package/python3-qrcode SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=QR Code image generator URL:=https://github.com/lincolnloop/python-qrcode -endef - -define Package/python-qrcode -$(call Package/python-qrcode/Default) DEPENDS:= \ - +PACKAGE_python-qrcode:python \ - +PACKAGE_python-qrcode:python-setuptools \ - +PACKAGE_python-qrcode:python-six \ - +PACKAGE_python-qrcode:python-pillow - VARIANT:=python -endef - -define Package/python-qrcode/description - Pure python QR Code generator -endef - -define Package/python3-qrcode -$(call Package/python-qrcode/Default) - DEPENDS:= \ - +PACKAGE_python3-qrcode:python3 \ - +PACKAGE_python3-qrcode:python3-setuptools \ - +PACKAGE_python3-qrcode:python3-six \ - +PACKAGE_python3-qrcode:python3-pillow - VARIANT:=python3 + +python3 \ + +python3-setuptools \ + +python3-six \ + +python3-pillow endef define Package/python3-qrcode/description -$(call Package/python-qrcode/description) -. -(Variant for Python3) + Pure python QR Code generator endef -$(eval $(call PyPackage,python-qrcode)) -$(eval $(call BuildPackage,python-qrcode)) -$(eval $(call BuildPackage,python-qrcode-src)) - $(eval $(call Py3Package,python3-qrcode)) $(eval $(call BuildPackage,python3-qrcode)) $(eval $(call BuildPackage,python3-qrcode-src)) diff --git a/lang/python/python-rcssmin/Makefile b/lang/python/python-rcssmin/Makefile index 2a812920..ff4db1b0 100644 --- a/lang/python/python-rcssmin/Makefile +++ b/lang/python/python-rcssmin/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-rcssmin PKG_VERSION:=1.0.6 -PKG_RELEASE=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Alexandru Ardelean , Eneas U de Queiroz PKG_LICENSE:=Apache-2.0 @@ -18,33 +18,19 @@ PKG_HASH:=ca87b695d3d7864157773a61263e5abb96006e9ff0e021eff90cbe0e1ba18270 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-rcssmin/Default +define Package/python3-rcssmin SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Fast CSS minifier for Python URL:=http://opensource.perlig.de/rcssmin/ -endef - -define Package/python-rcssmin - $(call Package/python-rcssmin/Default) DEPENDS:= \ - +PACKAGE_python-rcssmin:python-light \ - +PACKAGE_python-rcssmin:python-codecs - VARIANT:=python + +python3-light endef -define Package/python3-rcssmin - $(call Package/python-rcssmin/Default) - DEPENDS:= \ - +PACKAGE_python3-rcssmin:python3-light - VARIANT:=python3 -endef - -define Package/python-rcssmin/description +define Package/python3-rcssmin/description This module is a re-implementation aiming for speed instead of maximum compression, so it can be used at runtime (rather than during a preprocessing step). RCSSmin does syntactical compression only (removing spaces, comments and possibly @@ -52,16 +38,6 @@ define Package/python-rcssmin/description collapsing redundant properties etc). endef -define Package/python3-rcssmin/description -$(call Package/python-rcssmin/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-rcssmin)) -$(eval $(call BuildPackage,python-rcssmin)) -$(eval $(call BuildPackage,python-rcssmin-src)) - $(eval $(call Py3Package,python3-rcssmin)) $(eval $(call BuildPackage,python3-rcssmin)) $(eval $(call BuildPackage,python3-rcssmin-src)) diff --git a/lang/python/python-requests-oauthlib/Makefile b/lang/python/python-requests-oauthlib/Makefile index 30b00d61..d77273f5 100644 --- a/lang/python/python-requests-oauthlib/Makefile +++ b/lang/python/python-requests-oauthlib/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-requests-oauthlib PKG_VERSION:=1.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Eneas U de Queiroz PKG_LICENSE:=ISC @@ -18,50 +18,25 @@ PKG_HASH:=b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-requests-oauthlib/Default +define Package/python3-requests-oauthlib SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=OAuthlib auth for Requests URL:=https://github.com/requests/requests-oauthlib -endef - -define Package/python-requests-oauthlib - $(call Package/python-requests-oauthlib/Default) DEPENDS:= \ - +PACKAGE_python-requests-oauthlib:python \ - +PACKAGE_python-requests-oauthlib:python-oauthlib \ - +PACKAGE_python-requests-oauthlib:python-requests - VARIANT:=python + +python3 \ + +python3-oauthlib \ + +python3-requests endef -define Package/python3-requests-oauthlib - $(call Package/python-requests-oauthlib/Default) - DEPENDS:= \ - +PACKAGE_python3-requests-oauthlib:python3 \ - +PACKAGE_python3-requests-oauthlib:python3-oauthlib \ - +PACKAGE_python3-requests-oauthlib:python3-requests - VARIANT:=python3 -endef - -define Package/python-requests-oauthlib/description +define Package/python3-requests-oauthlib/description This python package provides first-class OAuth library support for Requests. endef -define Package/python3-requests-oauthlib/description -$(call Package/python-requests-oauthlib/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-requests-oauthlib)) -$(eval $(call BuildPackage,python-requests-oauthlib)) -$(eval $(call BuildPackage,python-requests-oauthlib-src)) - $(eval $(call Py3Package,python3-requests-oauthlib)) $(eval $(call BuildPackage,python3-requests-oauthlib)) $(eval $(call BuildPackage,python3-requests-oauthlib-src)) diff --git a/lang/python/python-requests/Makefile b/lang/python/python-requests/Makefile index d7573ed9..5c412cdb 100644 --- a/lang/python/python-requests/Makefile +++ b/lang/python/python-requests/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-requests -PKG_VERSION:=2.23.0 +PKG_VERSION:=2.24.0 PKG_RELEASE:=1 PKG_MAINTAINER:=Josef Schlehofer , Alexandru Ardelean @@ -17,57 +17,30 @@ PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:python-requests:requests PYPI_NAME:=requests -PKG_HASH:=b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6 +PKG_HASH:=b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-requests/Default +define Package/python3-requests SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=HTTP library for Python URL:=https://2.python-requests.org/ -endef - -define Package/python-requests -$(call Package/python-requests/Default) DEPENDS:= \ - +PACKAGE_python-requests:python \ - +PACKAGE_python-requests:python-chardet \ - +PACKAGE_python-requests:python-idna \ - +PACKAGE_python-requests:python-urllib3 \ - +PACKAGE_python-requests:python-certifi - VARIANT:=python -endef - -define Package/python3-requests -$(call Package/python-requests/Default) - DEPENDS:= \ - +PACKAGE_python3-requests:python3-light \ - +PACKAGE_python3-requests:python3-chardet \ - +PACKAGE_python3-requests:python3-idna \ - +PACKAGE_python3-requests:python3-urllib3 \ - +PACKAGE_python3-requests:python3-certifi - VARIANT:=python3 -endef - -define Package/python-requests/description - Requests is the only Non-GMO HTTP library for Python, safe for human consumption + +python3-light \ + +python3-chardet \ + +python3-idna \ + +python3-urllib3 \ + +python3-certifi endef define Package/python3-requests/description -$(call Package/python-requests/description) -. -(Variant for Python3) + Requests is the only Non-GMO HTTP library for Python, safe for human consumption endef -$(eval $(call PyPackage,python-requests)) -$(eval $(call BuildPackage,python-requests)) -$(eval $(call BuildPackage,python-requests-src)) - $(eval $(call Py3Package,python3-requests)) $(eval $(call BuildPackage,python3-requests)) $(eval $(call BuildPackage,python3-requests-src)) diff --git a/lang/python/python-rsa/Makefile b/lang/python/python-rsa/Makefile index 9bdca772..456021ac 100644 --- a/lang/python/python-rsa/Makefile +++ b/lang/python/python-rsa/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rsa PKG_VERSION:=4.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487 @@ -12,45 +12,23 @@ PKG_LICENSE:=MIT include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-rsa/Default +define Package/python3-rsa SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=rsa URL:=https://stuvel.eu/rsa + DEPENDS:=+python3 +python3-pyasn1 endef -define Package/python-rsa -$(call Package/python-rsa/Default) - DEPENDS:=+PACKAGE_python-rsa:python +PACKAGE_python-rsa:python-pyasn1 - VARIANT:=python -endef - -define Package/python3-rsa -$(call Package/python-rsa/Default) - DEPENDS:=+PACKAGE_python3-rsa:python3 +PACKAGE_python3-rsa:python3-pyasn1 - VARIANT:=python3 -endef - -define Package/python-rsa/description +define Package/python3-rsa/description Is a pure-Python RSA implementation. It supports encryption and decryption, signing and verifying signatures, and key generation according to PKCS#1 version 1.5. It can be used as a Python library as well as on the commandline. endef -define Package/python3-rsa/description -$(call Package/python-rsa/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-rsa)) -$(eval $(call BuildPackage,python-rsa)) -$(eval $(call BuildPackage,python-rsa-src)) - $(eval $(call Py3Package,python3-rsa)) $(eval $(call BuildPackage,python3-rsa)) $(eval $(call BuildPackage,python3-rsa-src)) diff --git a/lang/python/python-s3transfer/Makefile b/lang/python/python-s3transfer/Makefile index 5ed85e9d..a6e04f9f 100644 --- a/lang/python/python-s3transfer/Makefile +++ b/lang/python/python-s3transfer/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=s3transfer PKG_VERSION:=0.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=f23d5cb7d862b104401d9021fc82e5fa0e0cf57b7660a1331425aab0c691d021 @@ -12,48 +12,23 @@ PKG_LICENSE:=MIT include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-s3transfer/Default +define Package/python3-s3transfer SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=s3transfer URL:=https://github.com/boto/s3transfer -endef - -define Package/python-s3transfer -$(call Package/python-s3transfer/Default) DEPENDS:= \ - +PACKAGE_python-s3transfer:python \ - +PACKAGE_python-s3transfer:python-botocore \ - +PACKAGE_python-s3transfer:python-futures - VARIANT:=python -endef - -define Package/python3-s3transfer -$(call Package/python-s3transfer/Default) - DEPENDS:= \ - +PACKAGE_python3-s3transfer:python3 \ - +PACKAGE_python3-s3transfer:python3-botocore - VARIANT:=python3 -endef - -define Package/python-s3transfer/description -S3transfer is a Python library for managing Amazon S3 transfers. + +python3 \ + +python3-botocore endef define Package/python3-s3transfer/description -$(call Package/python-s3transfer/description) -. -(Variant for Python3) +S3transfer is a Python library for managing Amazon S3 transfers. endef -$(eval $(call PyPackage,python-s3transfer)) -$(eval $(call BuildPackage,python-s3transfer)) -$(eval $(call BuildPackage,python-s3transfer-src)) - $(eval $(call Py3Package,python3-s3transfer)) $(eval $(call BuildPackage,python3-s3transfer)) $(eval $(call BuildPackage,python3-s3transfer-src)) diff --git a/lang/python/python-schedule/Makefile b/lang/python/python-schedule/Makefile index c7e4b6ee..6d28bd0e 100644 --- a/lang/python/python-schedule/Makefile +++ b/lang/python/python-schedule/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-schedule PKG_VERSION:=0.6.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=schedule PKG_HASH:=f9fb5181283de4db6e701d476dd01b6a3dd81c38462a54991ddbb9d26db857c9 @@ -29,7 +29,6 @@ define Package/python3-schedule TITLE:=Job scheduling for humans URL:=https://github.com/dbader/schedule DEPENDS:=+python3-light +python3-logging - VARIANT:=python3 endef define Package/python3-schedule/description diff --git a/lang/python/python-schema/Makefile b/lang/python/python-schema/Makefile index 4c96f39c..d62a515c 100644 --- a/lang/python/python-schema/Makefile +++ b/lang/python/python-schema/Makefile @@ -5,15 +5,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-schema -PKG_VERSION:=0.7.1 +PKG_VERSION:=0.7.2 PKG_RELEASE:=1 PKG_MAINTAINER:=Karel Kočí -PKG_SOURCE_URL:=https://codeload.github.com/keleshev/schema/tar.gz/v$(PKG_VERSION)? -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=0edc47b343450c116dd67267b6951b43916b2e6893e896da1eefb7a69ef7c83d -PKG_BUILD_DIR:=$(BUILD_DIR)/schema-$(PKG_VERSION) +PYPI_NAME:=schema +PKG_HASH:=b536f2375b49fdf56f36279addae98bd86a8afbd58b3c32ce363c464bed5fc1c +include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -24,7 +23,6 @@ define Package/python3-schema URL:=https://github.com/keleshev/schema TITLE:=python3-schema DEPENDS:=+python3-light +python3-contextlib2 - VARIANT:=python3 endef define Package/python3-schema/description diff --git a/lang/python/python-sentry-sdk/Makefile b/lang/python/python-sentry-sdk/Makefile index 34391662..21828109 100644 --- a/lang/python/python-sentry-sdk/Makefile +++ b/lang/python/python-sentry-sdk/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-sentry-sdk PKG_VERSION:=0.13.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=sentry-sdk PKG_HASH:=c6b919623e488134a728f16326c6f0bcdab7e3f59e7f4c472a90eea4d6d8fe82 @@ -33,7 +33,6 @@ define Package/python3-sentry-sdk +python3-light \ +python3-logging \ +python3-urllib3 - VARIANT:=python3 endef define Package/python3-sentry-sdk/description diff --git a/lang/python/python-service-identity/Makefile b/lang/python/python-service-identity/Makefile index dc99d4b7..8e1c1475 100644 --- a/lang/python/python-service-identity/Makefile +++ b/lang/python/python-service-identity/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-service-identity PKG_VERSION:=18.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=service_identity PKG_HASH:=0858a54aabc5b459d1aafa8a518ed2081a285087f349fe3e55197989232e2e2d @@ -20,55 +20,27 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-service-identity/Default +define Package/python3-service-identity SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Service identity verification URL:=https://service-identity.readthedocs.io/ -endef - -define Package/python-service-identity -$(call Package/python-service-identity/Default) DEPENDS:= \ - +PACKAGE_python-service-identity:python-light \ - +PACKAGE_python-service-identity:python-attrs \ - +PACKAGE_python-service-identity:python-cryptography \ - +PACKAGE_python-service-identity:python-ipaddress \ - +PACKAGE_python-service-identity:python-pyasn1 \ - +PACKAGE_python-service-identity:python-pyasn1-modules - VARIANT:=python + +python3-light \ + +python3-attrs \ + +python3-cryptography \ + +python3-pyasn1 \ + +python3-pyasn1-modules endef -define Package/python3-service-identity -$(call Package/python-service-identity/Default) - DEPENDS:= \ - +PACKAGE_python3-service-identity:python3-light \ - +PACKAGE_python3-service-identity:python3-attrs \ - +PACKAGE_python3-service-identity:python3-cryptography \ - +PACKAGE_python3-service-identity:python3-pyasn1 \ - +PACKAGE_python3-service-identity:python3-pyasn1-modules - VARIANT:=python3 -endef - -define Package/python-service-identity/description +define Package/python3-service-identity/description service_identity aspires to give you all the tools you need for verifying whether a certificate is valid for the intended purposes. endef -define Package/python3-service-identity/description -$(call Package/python-service-identity/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-service-identity)) -$(eval $(call BuildPackage,python-service-identity)) -$(eval $(call BuildPackage,python-service-identity-src)) - $(eval $(call Py3Package,python3-service-identity)) $(eval $(call BuildPackage,python3-service-identity)) $(eval $(call BuildPackage,python3-service-identity-src)) diff --git a/lang/python/python-simplejson/Makefile b/lang/python/python-simplejson/Makefile index d8a2558f..691075cb 100644 --- a/lang/python/python-simplejson/Makefile +++ b/lang/python/python-simplejson/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-simplejson PKG_VERSION:=3.17.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=MIT PKG_CPE_ID:=cpe:/a:simplejson_project:simplejson @@ -18,44 +18,20 @@ PKG_HASH:=2b4b2b738b3b99819a17feaf118265d0753d5536049ea570b3c43b51c4701e81 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-simplejson/Default +define Package/python3-simplejson SUBMENU:=Python SECTION:=lang CATEGORY:=Languages MAINTAINER:=Alexandru Ardelean + TITLE:=Simple, fast, extensible JSON encoder/decoder URL:=https://simplejson.readthedocs.org/ -endef - -define Package/python-simplejson -$(call Package/python-simplejson/Default) - TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2 - DEPENDS:=+PACKAGE_python-simplejson:python-light +PACKAGE_python-simplejson:python-decimal - VARIANT:=python -endef - -define Package/python3-simplejson -$(call Package/python-simplejson/Default) - TITLE:=Simple, fast, extensible JSON encoder/decoder for Python3 - DEPENDS:=+PACKAGE_python3-simplejson:python3-light +PACKAGE_python3-simplejson:python3-decimal - VARIANT:=python3 -endef - -define Package/python-simplejson/description - Simple, fast, extensible JSON encoder/decoder for Python + DEPENDS:=+python3-light +python3-decimal endef define Package/python3-simplejson/description -$(call Package/python-simplejson/description) -. -(Variant for Python3) -endef - -define PyPackage/python-simplejson/filespec -+|$(PYTHON_PKG_DIR) --|$(PYTHON_PKG_DIR)/simplejson/tests + Simple, fast, extensible JSON encoder/decoder for Python endef define Py3Package/python3-simplejson/filespec @@ -63,10 +39,6 @@ define Py3Package/python3-simplejson/filespec -|$(PYTHON3_PKG_DIR)/simplejson/tests endef -$(eval $(call PyPackage,python-simplejson)) -$(eval $(call BuildPackage,python-simplejson)) -$(eval $(call BuildPackage,python-simplejson-src)) - $(eval $(call Py3Package,python3-simplejson)) $(eval $(call BuildPackage,python3-simplejson)) $(eval $(call BuildPackage,python3-simplejson-src)) diff --git a/lang/python/python-six/Makefile b/lang/python/python-six/Makefile index 4125139d..805c4f02 100644 --- a/lang/python/python-six/Makefile +++ b/lang/python/python-six/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-six -PKG_VERSION:=1.14.0 +PKG_VERSION:=1.15.0 PKG_RELEASE:=1 PYPI_NAME:=six -PKG_HASH:=236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a +PKG_HASH:=30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE @@ -23,54 +23,32 @@ HOST_BUILD_DEPENDS:=python3/host include ../pypi.mk include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-six/Default +define Package/python3-six SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Python 2 and 3 compatibility library URL:=https://github.com/benjaminp/six + DEPENDS:=+python3-light endef -define Package/python-six -$(call Package/python-six/Default) - DEPENDS:=+PACKAGE_python-six:python-light - VARIANT:=python -endef - -define Package/python3-six -$(call Package/python-six/Default) - DEPENDS:=+PACKAGE_python3-six:python3-light - VARIANT:=python3 -endef - -define Package/python-six/description +define Package/python3-six/description Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided. endef -define Package/python3-six/description -$(call Package/python-six/description) -. -(Variant for Python3) -endef - define Host/Compile - $(call Build/Compile/HostPy3Mod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") + $(call HostPython3/ModSetup,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") endef Host/Install:= $(eval $(call HostBuild)) -$(eval $(call PyPackage,python-six)) -$(eval $(call BuildPackage,python-six)) -$(eval $(call BuildPackage,python-six-src)) - $(eval $(call Py3Package,python3-six)) $(eval $(call BuildPackage,python3-six)) $(eval $(call BuildPackage,python3-six-src)) diff --git a/lang/python/python-slugify/Makefile b/lang/python/python-slugify/Makefile index 537cee9b..906771eb 100644 --- a/lang/python/python-slugify/Makefile +++ b/lang/python/python-slugify/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-slugify PKG_VERSION:=4.0.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=a8fc3433821140e8f409a9831d13ae5deccd0b033d4744d94b31fea141bdd84c @@ -33,7 +33,6 @@ define Package/python3-slugify +python3-codecs \ +python3-setuptools \ +python3-text-unidecode - VARIANT:=python3 endef define Package/python3-slugify/description diff --git a/lang/python/python-sqlalchemy/Makefile b/lang/python/python-sqlalchemy/Makefile index f540fe3f..a25a523a 100644 --- a/lang/python/python-sqlalchemy/Makefile +++ b/lang/python/python-sqlalchemy/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-sqlalchemy PKG_VERSION:=1.3.13 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=SQLAlchemy PKG_HASH:=64a7b71846db6423807e96820993fa12a03b89127d278290ca25c0b11ed7b4fb @@ -34,7 +34,6 @@ define Package/python3-sqlalchemy +python3-urllib \ +python3-decimal \ +python3-logging - VARIANT:=python3 endef define Package/python3-sqlalchemy/description diff --git a/lang/python/python-stem/Makefile b/lang/python/python-stem/Makefile index 46c0dce7..12ca92b4 100644 --- a/lang/python/python-stem/Makefile +++ b/lang/python/python-stem/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-stem PKG_VERSION:=1.8.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=stem PKG_HASH:=a0b48ea6224e95f22aa34c0bc3415f0eb4667ddeae3dfb5e32a6920c185568c2 @@ -24,7 +24,6 @@ define Package/python3-stem TITLE:=A controller library for Tor URL:=https://stem.torproject.org/ DEPENDS:=+python3 - VARIANT:=python3 endef define Package/python3-stem/description diff --git a/lang/python/python-texttable/Makefile b/lang/python/python-texttable/Makefile new file mode 100644 index 00000000..e805b318 --- /dev/null +++ b/lang/python/python-texttable/Makefile @@ -0,0 +1,33 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-texttable +PKG_VERSION:=1.6.2 +PKG_RELEASE:=2 + +PYPI_NAME:=texttable +PKG_HASH:=eff3703781fbc7750125f50e10f001195174f13825a92a45e9403037d539b4f4 + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-texttable + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Module for creating simple ASCII tables + URL:=https://github.com/foutaise/texttable/ + DEPENDS:=+python3-light +python3-codecs +endef + +define Package/python3-texttable/description + Module for creating simple ASCII tables +endef + +$(eval $(call Py3Package,python3-texttable)) +$(eval $(call BuildPackage,python3-texttable)) +$(eval $(call BuildPackage,python3-texttable-src)) diff --git a/lang/python/python-twisted/Makefile b/lang/python/python-twisted/Makefile index e91743d7..935f34b3 100644 --- a/lang/python/python-twisted/Makefile +++ b/lang/python/python-twisted/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-twisted PKG_VERSION:=20.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PYPI_NAME:=Twisted PYPI_SOURCE_EXT:=tar.bz2 @@ -24,60 +24,29 @@ PKG_CPE_ID:=cpe:/a:twistedmatrix:twisted include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-twisted/Default +define Package/python3-twisted SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Asynchronous networking framework URL:=https://twistedmatrix.com/ -endef - -define Package/python-twisted -$(call Package/python-twisted/Default) DEPENDS:= \ - +PACKAGE_python-twisted:python-light \ - +PACKAGE_python-twisted:python-attrs \ - +PACKAGE_python-twisted:python-automat \ - +PACKAGE_python-twisted:python-constantly \ - +PACKAGE_python-twisted:python-incremental \ - +PACKAGE_python-twisted:python-hyperlink \ - +PACKAGE_python-twisted:python-setuptools \ - +PACKAGE_python-twisted:python-zope-interface - VARIANT:=python -endef - -define Package/python3-twisted -$(call Package/python-twisted/Default) - DEPENDS:= \ - +PACKAGE_python3-twisted:python3-light \ - +PACKAGE_python3-twisted:python3-attrs \ - +PACKAGE_python3-twisted:python3-automat \ - +PACKAGE_python3-twisted:python3-constantly \ - +PACKAGE_python3-twisted:python3-incremental \ - +PACKAGE_python3-twisted:python3-hyperlink \ - +PACKAGE_python3-twisted:python3-setuptools \ - +PACKAGE_python3-twisted:python3-zope-interface - VARIANT:=python3 -endef - -define Package/python-twisted/description -Twisted is a networking engine written in Python, supporting numerous -protocols. It contains a web server, numerous chat clients, chat servers, -mail servers, and more. + +python3-light \ + +python3-attrs \ + +python3-automat \ + +python3-constantly \ + +python3-incremental \ + +python3-hyperlink \ + +python3-setuptools \ + +python3-zope-interface endef define Package/python3-twisted/description -$(call Package/python-twisted/description) -. -(Variant for Python3) -endef - -define PyPackage/python-twisted/filespec -+|$(PYTHON_PKG_DIR) --|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py +Twisted is a networking engine written in Python, supporting numerous +protocols. It contains a web server, numerous chat clients, chat servers, +mail servers, and more. endef define Py3Package/python3-twisted/filespec @@ -90,13 +59,10 @@ define Py3Package/python3-twisted/install $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ for bin in $(1)/usr/bin/*; do \ mv $$$$bin $$$${bin}3 ; \ + $(LN) $$$${bin##*/}3 $$$$bin ; \ done endef -$(eval $(call PyPackage,python-twisted)) -$(eval $(call BuildPackage,python-twisted)) -$(eval $(call BuildPackage,python-twisted-src)) - $(eval $(call Py3Package,python3-twisted)) $(eval $(call BuildPackage,python3-twisted)) $(eval $(call BuildPackage,python3-twisted-src)) diff --git a/lang/python/python-txsocksx/Makefile b/lang/python/python-txsocksx/Makefile deleted file mode 100644 index 9a0e2db7..00000000 --- a/lang/python/python-txsocksx/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2015, 2017-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=python-txsocksx -PKG_VERSION:=1.15.0.2 -PKG_RELEASE:=4 - -PYPI_NAME:=txsocksx -PKG_HASH:=4f79b5225ce29709bfcee45e6f726e65b70fd6f1399d1898e54303dbd6f8065f - -PKG_LICENSE:=ISC -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Jeffery To - -include ../pypi.mk -include $(INCLUDE_DIR)/package.mk -include ../python-package.mk - -PYTHON_PKG_SETUP_VARS:= \ - PKG_VERSION="$(PKG_VERSION)" - -define Package/python-txsocksx/Default - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=SOCKS client endpoints for Twisted - URL:=https://github.com/habnabit/txsocksx -endef - -define Package/python-txsocksx -$(call Package/python-txsocksx/Default) - DEPENDS:= \ - +PACKAGE_python-txsocksx:python-light \ - +PACKAGE_python-txsocksx:python-parsley \ - +PACKAGE_python-txsocksx:python-twisted - VARIANT:=python -endef - -define Package/python-txsocksx/description -txsocksx is SOCKS4/4a and SOCKS5 client endpoints for Twisted 10.1 or -greater. -endef - -$(eval $(call PyPackage,python-txsocksx)) -$(eval $(call BuildPackage,python-txsocksx)) -$(eval $(call BuildPackage,python-txsocksx-src)) diff --git a/lang/python/python-txsocksx/patches/001-omit-tests.patch b/lang/python/python-txsocksx/patches/001-omit-tests.patch deleted file mode 100644 index 2bed548d..00000000 --- a/lang/python/python-txsocksx/patches/001-omit-tests.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -35,5 +35,5 @@ setup( - 'version_module_paths': ['txsocksx/_version.py'], - }, - install_requires=install_requires, -- packages=['txsocksx', 'txsocksx.test'], -+ packages=['txsocksx'], - ) diff --git a/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch b/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch deleted file mode 100644 index c7c2cbba..00000000 --- a/lang/python/python-txsocksx/patches/002-do-not-use-vcversioner.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -1,6 +1,8 @@ - # Copyright (c) Aaron Gallagher <_@habnab.it> - # See COPYING for details. - -+import os -+ - from setuptools import setup - - -@@ -30,10 +32,11 @@ setup( - ], - license='ISC', - -- setup_requires=['vcversioner>=1'], -- vcversioner={ -- 'version_module_paths': ['txsocksx/_version.py'], -- }, -+ #setup_requires=['vcversioner>=1'], -+ #vcversioner={ -+ # 'version_module_paths': ['txsocksx/_version.py'], -+ #}, -+ version=os.environ.get('PKG_VERSION'), - install_requires=install_requires, - packages=['txsocksx'], - ) diff --git a/lang/python/python-urllib3/Makefile b/lang/python/python-urllib3/Makefile index 7802c1ab..d3fd4132 100644 --- a/lang/python/python-urllib3/Makefile +++ b/lang/python/python-urllib3/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-urllib3 -PKG_VERSION:=1.25.7 +PKG_VERSION:=1.25.9 PKG_RELEASE:=1 PKG_MAINTAINER:=Josef Schlehofer @@ -17,47 +17,25 @@ PKG_LICENSE_FILES:=LICENSE.txt PKG_CPE_ID:=cpe:/a:urllib3_project:urllib3 PYPI_NAME:=urllib3 -PKG_HASH:=f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745 +PKG_HASH:=3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-urllib3/Default +define Package/python3-urllib3 SUBMENU:=Python SECTION:=lang CATEGORY:=Languages TITLE:=Sanity-friendly HTTP client URL:=https://urllib3.readthedocs.io/ -endef - -define Package/python-urllib3 -$(call Package/python-urllib3/Default) - DEPENDS:=+PACKAGE_python-urllib3:python - VARIANT:=python -endef - -define Package/python-urllib3/description - HTTP library with thread-safe connection pooling, file post, and more. -endef - -define Package/python3-urllib3 -$(call Package/python-urllib3/Default) - DEPENDS:=+PACKAGE_python3-urllib3:python3 - VARIANT:=python3 + DEPENDS:=+python3 endef define Package/python3-urllib3/description -$(call Package/python-urllib3/description) -. -(Variant for Python3) + HTTP library with thread-safe connection pooling, file post, and more. endef -$(eval $(call PyPackage,python-urllib3)) -$(eval $(call BuildPackage,python-urllib3)) -$(eval $(call BuildPackage,python-urllib3-src)) - $(eval $(call Py3Package,python3-urllib3)) $(eval $(call BuildPackage,python3-urllib3)) $(eval $(call BuildPackage,python3-urllib3-src)) diff --git a/lang/python/python-version.mk b/lang/python/python-version.mk deleted file mode 100644 index 2da2fa87..00000000 --- a/lang/python/python-version.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -PYTHON_VERSION:=2.7 -PYTHON_VERSION_MICRO:=17 - -PYTHON_SETUPTOOLS_PKG_RELEASE:=1 -PYTHON_PIP_PKG_RELEASE:=1 - -PYTHON_SETUPTOOLS_VERSION:=41.2.0 -PYTHON_PIP_VERSION:=19.2.3 diff --git a/lang/python/python-voluptuous-serialize/Makefile b/lang/python/python-voluptuous-serialize/Makefile index 8f73d473..693fe039 100644 --- a/lang/python/python-voluptuous-serialize/Makefile +++ b/lang/python/python-voluptuous-serialize/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=voluptuous-serialize PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=740cd00ce2ecf0f3345d550163fdd2f20de2e0a60c3c678450e68314c2f592f5 @@ -31,7 +31,6 @@ define Package/python3-voluptuous-serialize DEPENDS:= \ +python3-light \ +python3-voluptuous - VARIANT:=python3 endef define Package/python3-voluptuous-serialize/description diff --git a/lang/python/python-voluptuous/Makefile b/lang/python/python-voluptuous/Makefile index 910f82a5..a3d239f8 100644 --- a/lang/python/python-voluptuous/Makefile +++ b/lang/python/python-voluptuous/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-voluptuous PKG_VERSION:=0.11.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=voluptuous PKG_HASH:=2abc341dbc740c5e2302c7f9b8e2e243194fb4772585b991931cb5b22e9bf456 @@ -20,45 +20,22 @@ PKG_MAINTAINER:=Josef Schlehofer include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-voluptuous/Default +define Package/python3-voluptuous SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Data validation library URL:=https://github.com/alecthomas/voluptuous -endef - -define Package/python-voluptuous -$(call Package/python-voluptuous/Default) DEPENDS:= \ - +PACKAGE_python-voluptuous:python-light - VARIANT:=python -endef - -define Package/python3-voluptuous -$(call Package/python-voluptuous/Default) - DEPENDS:= \ - +PACKAGE_python3-voluptuous:python3-light - VARIANT:=python3 -endef - -define Package/python-voluptuous/description -It is primarily intended for validating data coming into Python as JSON, YAML, etc. + +python3-light endef define Package/python3-voluptuous/description -$(call Package/python-voluptuous/description) -. -(Variant for Python3) +It is primarily intended for validating data coming into Python as JSON, YAML, etc. endef -$(eval $(call PyPackage,python-voluptuous)) -$(eval $(call BuildPackage,python-voluptuous)) -$(eval $(call BuildPackage,python-voluptuous-src)) - $(eval $(call Py3Package,python3-voluptuous)) $(eval $(call BuildPackage,python3-voluptuous)) $(eval $(call BuildPackage,python3-voluptuous-src)) diff --git a/lang/python/python-wcwidth/Makefile b/lang/python/python-wcwidth/Makefile index 2c873146..ac9c8281 100644 --- a/lang/python/python-wcwidth/Makefile +++ b/lang/python/python-wcwidth/Makefile @@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-wcwidth -PKG_VERSION:=0.1.8 -PKG_RELEASE:=1 +PKG_VERSION:=0.1.9 +PKG_RELEASE:=2 PYPI_NAME:=wcwidth -PKG_HASH:=f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8 +PKG_HASH:=ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1 PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT @@ -30,7 +30,6 @@ define Package/python3-wcwidth TITLE:=Terminal width calculation library URL:=https://github.com/jquast/wcwidth DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-wcwidth/description diff --git a/lang/python/python-websocket-client/Makefile b/lang/python/python-websocket-client/Makefile new file mode 100644 index 00000000..ca2db934 --- /dev/null +++ b/lang/python/python-websocket-client/Makefile @@ -0,0 +1,36 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-websocket-client +PKG_VERSION:=0.57.0 +PKG_RELEASE:=2 + +PYPI_NAME:=websocket_client +PKG_HASH:=d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010 + +PKG_MAINTAINER:=Javier Marcet +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/python3-websocket-client + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=WebSocket client for Python. hybi13 is supported + URL:=https://github.com/websocket-client/websocket-client + DEPENDS:=+python3-light +python3-logging +python3-openssl +python3-six +endef + +define Package/python3-websocket-client/description + websocket-client module is WebSocket client for python. This provide the low + level APIs for WebSocket. All APIs are the synchronous functions. + + websocket-client supports only hybi-13. +endef + +$(eval $(call Py3Package,python3-websocket-client)) +$(eval $(call BuildPackage,python3-websocket-client)) +$(eval $(call BuildPackage,python3-websocket-client-src)) diff --git a/lang/python/python-yaml/Makefile b/lang/python/python-yaml/Makefile index 46eaeaeb..a26b5724 100644 --- a/lang/python/python-yaml/Makefile +++ b/lang/python/python-yaml/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-yaml -PKG_VERSION:=5.3 -PKG_RELEASE:=1 +PKG_VERSION:=5.3.1 +PKG_RELEASE:=2 PYPI_NAME:=PyYAML -PKG_HASH:=e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615 +PKG_HASH:=b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d PKG_MAINTAINER:=Josef Schlehofer PKG_LICENSE:=MIT @@ -21,51 +21,24 @@ PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-yaml/Default +define Package/python3-yaml SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=YAML parser and emitter for Python URL:=https://github.com/yaml/pyyaml - DEPENDS:=+libyaml -endef - -define Package/python-yaml -$(call Package/python-yaml/Default) - DEPENDS+= \ - +PACKAGE_python-yaml:python-light \ - +PACKAGE_python-yaml:python-codecs - VARIANT:=python -endef - -define Package/python3-yaml -$(call Package/python-yaml/Default) - DEPENDS+=+PACKAGE_python3-yaml:python3-light - VARIANT:=python3 -endef - -define Package/python-yaml/description - PyYAML is a YAML parser and emitter for the Python programming language. + DEPENDS:=+libyaml +python3-light endef define Package/python3-yaml/description -$(call Package/python-yaml/description) -. -(Variant for Python3) + PyYAML is a YAML parser and emitter for the Python programming language. endef -PYTHON_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml -PYTHON_PKG_SETUP_ARGS:= PYTHON3_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml PYTHON3_PKG_SETUP_ARGS:= -$(eval $(call PyPackage,python-yaml)) -$(eval $(call BuildPackage,python-yaml)) -$(eval $(call BuildPackage,python-yaml-src)) - $(eval $(call Py3Package,python3-yaml)) $(eval $(call BuildPackage,python3-yaml)) $(eval $(call BuildPackage,python3-yaml-src)) diff --git a/lang/python/python-yarl/Makefile b/lang/python/python-yarl/Makefile index 08ac4382..fce56c8d 100644 --- a/lang/python/python-yarl/Makefile +++ b/lang/python/python-yarl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=yarl PKG_VERSION:=1.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9 @@ -33,7 +33,6 @@ define Package/python3-yarl +python3-multidict \ +python3-urllib \ +python3-idna - VARIANT:=python3 endef define Package/python3-yarl/description diff --git a/lang/python/python-zeroconf/Makefile b/lang/python/python-zeroconf/Makefile index 8c629474..761abd15 100644 --- a/lang/python/python-zeroconf/Makefile +++ b/lang/python/python-zeroconf/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-zeroconf PKG_VERSION:=0.24.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=zeroconf PKG_HASH:=f66d38f16026097572939ab78b1f46a97f556bca415491eb0fd094d0b5827dfe @@ -32,7 +32,6 @@ define Package/python3-zeroconf +python3-light \ +python3-logging \ +python3-ifaddr - VARIANT:=python3 endef define Package/python3-zeroconf/description diff --git a/lang/python/python-zipp/Makefile b/lang/python/python-zipp/Makefile index a76c4fab..fede7f14 100644 --- a/lang/python/python-zipp/Makefile +++ b/lang/python/python-zipp/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-zipp PKG_VERSION:=3.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PYPI_NAME:=zipp PKG_HASH:=c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96 @@ -11,6 +11,9 @@ PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="setuptools_scm[toml] >= 3.4.1" + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -22,11 +25,8 @@ define Package/python3-zipp TITLE:=Zipfile object wrapper URL:=https://github.com/jaraco/zipp DEPENDS:=+python3-light - VARIANT:=python3 endef -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="setuptools_scm[toml] >= 3.4.1" - define Package/python3-zipp/description Backport of pathlib-compatible object wrapper for zip files endef diff --git a/lang/python/python-zope-interface/Makefile b/lang/python/python-zope-interface/Makefile index 06bda571..e92f2a83 100644 --- a/lang/python/python-zope-interface/Makefile +++ b/lang/python/python-zope-interface/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-zope-interface -PKG_VERSION:=5.0.1 +PKG_VERSION:=5.1.0 PKG_RELEASE:=1 PYPI_NAME:=zope.interface -PKG_HASH:=dd0bc4016ec9ffa6d327bf3ba2f044c3ff376880661e5cc38c622e1ae023076f +PKG_HASH:=40e4c42bd27ed3c11b2c983fecfb03356fae1209de10686d03c02c8696a1d90e PKG_LICENSE:=ZPL-2.1 PKG_LICENSE_FILES:=LICENSE.txt @@ -20,46 +20,24 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-zope-interface/Default +define Package/python3-zope-interface SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=Interfaces for Python URL:=https://github.com/zopefoundation/zope.interface + DEPENDS:=+python3-light endef -define Package/python-zope-interface -$(call Package/python-zope-interface/Default) - DEPENDS:=+PACKAGE_python-zope-interface:python-light - VARIANT:=python -endef - -define Package/python3-zope-interface -$(call Package/python-zope-interface/Default) - DEPENDS:=+PACKAGE_python3-zope-interface:python3-light - VARIANT:=python3 -endef - -define Package/python-zope-interface/description +define Package/python3-zope-interface/description This package provides an implementation of "object interfaces" for Python. Interfaces are a mechanism for labeling objects as conforming to a given API or contract. So, this package can be considered as implementation of the Design By Contract methodology support in Python. endef -define Package/python3-zope-interface/description -$(call Package/python-zope-interface/description) -. -(Variant for Python3) -endef - -$(eval $(call PyPackage,python-zope-interface)) -$(eval $(call BuildPackage,python-zope-interface)) -$(eval $(call BuildPackage,python-zope-interface-src)) - $(eval $(call Py3Package,python3-zope-interface)) $(eval $(call BuildPackage,python3-zope-interface)) $(eval $(call BuildPackage,python3-zope-interface-src)) diff --git a/lang/python/python/Config-python-light.in b/lang/python/python/Config-python-light.in deleted file mode 100644 index c6c20416..00000000 --- a/lang/python/python/Config-python-light.in +++ /dev/null @@ -1,7 +0,0 @@ -menu "Configuration" - -config PYTHON_BLUETOOTH_SUPPORT - bool "Enable Bluetooth support" - default n - -endmenu diff --git a/lang/python/python/Makefile b/lang/python/python/Makefile deleted file mode 100644 index c90617fc..00000000 --- a/lang/python/python/Makefile +++ /dev/null @@ -1,380 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -# For PYTHON_VERSION -include ../python-version.mk - -PKG_NAME:=python -PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) -PKG_RELEASE:=2 - -PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41 - -PKG_LICENSE:=Python/2.0 -PKG_LICENSE_FILES:=LICENSE Doc/copyright.rst Doc/license.rst Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Modules/expat/COPYING -PKG_CPE_ID:=cpe:/a:python:python - -PKG_MAINTAINER:=Alexandru Ardelean , Jeffery To - -# This file provides the necsessary host build variables -include ../python-host.mk - -# For PyPackage -include ../python-package.mk - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -HOST_BUILD_PARALLEL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) - -PKG_CONFIG_DEPENDS:= \ - CONFIG_PACKAGE_python-pkg-resources \ - CONFIG_PACKAGE_python-setuptools CONFIG_PACKAGE_python-pip \ - CONFIG_PYTHON_BLUETOOTH_SUPPORT - -PKG_BUILD_DEPENDS:=python/host -HOST_BUILD_DEPENDS:=bzip2/host expat/host - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/python/Default - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=Python $(PYTHON_VERSION) programming language - URL:=https://www.python.org/ -endef - -define Package/python/Default/description - Python is a dynamic object-oriented programming language that can be used - for many kinds of software development. It offers strong support for - integration with other languages and tools, comes with extensive standard - libraries, and can be learned in a few days. Many Python programmers - report substantial productivity gains and feel the language encourages - the development of higher quality, more maintainable code. -endef - -define Package/python-base -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) interpreter - DEPENDS:=+libpthread +zlib -endef - -define Package/python-base/description - This package contains only the interpreter and the bare minimum - for the interpreter to start. -endef - -define Package/python-light -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) light installation - DEPENDS:=+python-base +libffi +libbz2 +PYTHON_BLUETOOTH_SUPPORT:bluez-libs -endef - -define Package/python-light/config - source "$(SOURCE)/Config-python-light.in" -endef - -define Package/python-light/description - This package is essentially the python-base package plus - a few of the rarely used (and big) libraries stripped out - into separate packages. -endef - -PYTHON_LIB_FILES_DEL:= -PYTHON_PACKAGES:= -PYTHON_PACKAGES_DEPENDS:= -define PyBasePackage - PYTHON_PACKAGES+=$(1) - ifeq ($(3),) - PYTHON_PACKAGES_DEPENDS+=$(1) - endif - PYTHON_LIB_FILES_DEL+=$(2) - define PyPackage/$(1)/filespec - ifneq ($(2),) - $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file))) - -|/usr/lib/python$(PYTHON_VERSION)/*/test - -|/usr/lib/python$(PYTHON_VERSION)/*/tests - endif - endef - PyPackage/$(1)/install?=: -endef - -include ./files/python-package-*.mk - -define Package/python -$(call Package/python/Default) - DEPENDS:=+python-light $(foreach package,$(PYTHON_PACKAGES_DEPENDS),+$(package)) -endef - -define Package/python/description - This package contains the (almost) full Python install. - It's python-light + all other packages. -endef - -MAKE_FLAGS+=\ - CROSS_COMPILE=yes \ - LD="$(TARGET_CC)" \ - PGEN=pgen2 - -EXTRA_CFLAGS+= \ - -DNDEBUG -fno-inline -EXTRA_LDFLAGS+= \ - -L$(PKG_BUILD_DIR) - -ENABLE_IPV6:= -ifeq ($(CONFIG_IPV6),y) - ENABLE_IPV6 += --enable-ipv6 -endif - -PYTHON_FOR_BUILD:= \ - _PYTHON_PROJECT_BASE=$(PKG_BUILD_DIR) \ - _PYTHON_HOST_PLATFORM=linux2 \ - PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON_VERSION)" \ - _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \ - $(HOST_PYTHON_BIN) - -DISABLE_BLUETOOTH:= \ - ac_cv_header_bluetooth_bluetooth_h=no \ - ac_cv_header_bluetooth_h=no - -CONFIGURE_ARGS+= \ - --sysconfdir=/etc \ - --enable-shared \ - --without-cxx-main \ - --with-threads \ - --with-system-ffi \ - --with-ensurepip=no \ - --without-pymalloc \ - $(if $(CONFIG_PYTHON_BLUETOOTH_SUPPORT),,$(DISABLE_BLUETOOTH)) \ - PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \ - $(ENABLE_IPV6) \ - CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \ - OPT="$(TARGET_CFLAGS)" - -define Build/Prepare - $(call Build/Prepare/Default) - $(CP) ./files/config.site $(PKG_BUILD_DIR)/config.site -endef - -ifdef CONFIG_PACKAGE_python-setuptools -PYTHON_SETUPTOOLS_BUILD:=1 -endif - -ifdef CONFIG_PACKAGE_python-pkg-resources -PYTHON_SETUPTOOLS_BUILD:=1 -endif - -ifeq ($(PYTHON_SETUPTOOLS_BUILD),1) -define Build/Compile/python-setuptools - $(HOST_PYTHON_PIP) \ - --disable-pip-version-check \ - --cache-dir "$(DL_DIR)/pip-cache" \ - install \ - --ignore-installed \ - --root=$(PKG_BUILD_DIR)/install-setuptools \ - --prefix=/usr \ - $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON_SETUPTOOLS_VERSION)-py2.py3-none-any.whl - $(call PatchDir,$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages,./patches-setuptools,) -endef -endif # CONFIG_PACKAGE_python-setuptools - -ifdef CONFIG_PACKAGE_python-pip -define Build/Compile/python-pip - $(HOST_PYTHON_PIP) \ - --disable-pip-version-check \ - --cache-dir "$(DL_DIR)/pip-cache" \ - install \ - --ignore-installed \ - --root=$(PKG_BUILD_DIR)/install-pip \ - --prefix=/usr \ - $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON_PIP_VERSION)-py2.py3-none-any.whl - $(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON_VERSION)/site-packages,./patches-pip,) -endef -endif # CONFIG_PACKAGE_python-pip - -define Build/Compile - $(call Build/Compile/Default) - # Use host pip to install python-setuptools - $(call Build/Compile/python-setuptools) - $(call Build/Compile/python-pip) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig - $(INSTALL_DIR) $(2)/bin - $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ - $(1)/usr/include/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \ - $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \ - $(1)/usr/lib/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \ - $(1)/usr/lib/pkgconfig - $(INSTALL_BIN) \ - ./files/python-config.in \ - $(2)/bin/python$(PYTHON_VERSION)-config - $(SED) \ - 's|@EXENAME@|$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)|' \ - -e 's|@TARGET_PREFIX@|$(PYTHON_DIR)|' \ - $(2)/bin/python$(PYTHON_VERSION)-config - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \ - $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt/_sysconfigdatatarget.py -endef - -PYTHON_BASE_LIB_FILES:= \ - /usr/lib/python$(PYTHON_VERSION)/_abcoll.py \ - /usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \ - /usr/lib/python$(PYTHON_VERSION)/_weakrefset.py \ - /usr/lib/python$(PYTHON_VERSION)/abc.py \ - /usr/lib/python$(PYTHON_VERSION)/copy_reg.py \ - /usr/lib/python$(PYTHON_VERSION)/genericpath.py \ - /usr/lib/python$(PYTHON_VERSION)/linecache.py \ - /usr/lib/python$(PYTHON_VERSION)/posixpath.py \ - /usr/lib/python$(PYTHON_VERSION)/os.py \ - /usr/lib/python$(PYTHON_VERSION)/re.py \ - /usr/lib/python$(PYTHON_VERSION)/site.py \ - /usr/lib/python$(PYTHON_VERSION)/sre_compile.py \ - /usr/lib/python$(PYTHON_VERSION)/sre_constants.py \ - /usr/lib/python$(PYTHON_VERSION)/sre_parse.py \ - /usr/lib/python$(PYTHON_VERSION)/sysconfig.py \ - /usr/lib/python$(PYTHON_VERSION)/stat.py \ - /usr/lib/python$(PYTHON_VERSION)/traceback.py \ - /usr/lib/python$(PYTHON_VERSION)/types.py \ - /usr/lib/python$(PYTHON_VERSION)/UserDict.py \ - /usr/lib/python$(PYTHON_VERSION)/warnings.py - -PYTHON_LIB_FILES_DEL+=$(PYTHON_BASE_LIB_FILES) - -define PyPackage/python-base/filespec -+|/usr/bin/python$(PYTHON_VERSION) -$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON_BASE_LIB_FILES),+|$(lib_file))) -endef - -define PyPackage/python-light/filespec -+|/usr/lib/python$(PYTHON_VERSION) --|/usr/lib/python$(PYTHON_VERSION)/distutils/cygwinccompiler.py --|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst* --|/usr/lib/python$(PYTHON_VERSION)/ensurepip --|/usr/lib/python$(PYTHON_VERSION)/idlelib --|/usr/lib/python$(PYTHON_VERSION)/lib-tk --|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_testcapi.so --|/usr/lib/python$(PYTHON_VERSION)/pdb.doc --|/usr/lib/python$(PYTHON_VERSION)/test --|/usr/lib/python$(PYTHON_VERSION)/webbrowser.py --|/usr/lib/python$(PYTHON_VERSION)/*/test --|/usr/lib/python$(PYTHON_VERSION)/*/tests --|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so -$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON_LIB_FILES_DEL),-|$(lib_file))) -endef - -define PyPackage/python-base/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib - $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python - $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python2 - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/ -endef - -PyPackage/python-light/install:=: -PyPackage/python/install:=: - -define PyPackage/python/filespec --|$(PYTHON_PKG_DIR) -endef - -HOST_LDFLAGS += \ - -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib - -ifeq ($(HOST_OS),Linux) -HOST_LDFLAGS += \ - -Wl,--no-as-needed -lrt -endif - -ifeq ($(HOST_OS),Darwin) -HOST_CONFIGURE_VARS += \ - ac_cv_header_libintl_h=no -endif - -HOST_CONFIGURE_ARGS+= \ - --without-cxx-main \ - --without-pymalloc \ - --with-threads \ - --prefix=$(HOST_PYTHON_DIR) \ - --exec-prefix=$(HOST_PYTHON_DIR) \ - --with-system-expat=$(STAGING_DIR_HOSTPKG) \ - --with-ensurepip=upgrade \ - CONFIG_SITE= - -define Host/Configure - $(SED) 's/^ENABLE_USER_SITE = None$$$$/ENABLE_USER_SITE = False/' $(HOST_BUILD_DIR)/Lib/site.py - $(call Host/Configure/Default) -endef - -define Host/Compile - $(call Host/Compile/Default,python Parser/pgen sharedmods) -endef - -define Host/Install - $(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)),, - rm -rf \ - $(HOST_PYTHON_PKG_DIR)/easy_install.py \ - $(HOST_PYTHON_PKG_DIR)/pkg_resources \ - $(HOST_PYTHON_PKG_DIR)/setuptools \ - $(HOST_PYTHON_PKG_DIR)/setuptools-* \ - $(HOST_PYTHON_PKG_DIR)/.setuptools-patched* \ - $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_* - ) - $(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)),, - rm -rf \ - $(HOST_PYTHON_PKG_DIR)/pip \ - $(HOST_PYTHON_PKG_DIR)/pip-* \ - $(HOST_PYTHON_PKG_DIR)/.pip-patched* \ - $(HOST_PYTHON_PKG_DIR)/.pip_installed_* - ) - $(MAKE) -C $(HOST_BUILD_DIR) install - $(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON_DIR)/bin/pgen2 - $(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)),, - $(call HostPatchDir,$(HOST_PYTHON_PKG_DIR),./patches-setuptools,) - touch $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE) - ) - $(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)),, - $(call HostPatchDir,$(HOST_PYTHON_PKG_DIR),./patches-pip,) - touch $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE) - ) -endef - -$(eval $(call HostBuild)) - -$(foreach package, $(PYTHON_PACKAGES), \ - $(eval $(call PyPackage,$(package))) \ - $(eval $(call BuildPackage,$(package))) \ - $(eval $(call BuildPackage,$(package)-src)) \ -) - -$(eval $(call PyPackage,python-base)) -$(eval $(call PyPackage,python-light)) -$(eval $(call PyPackage,python)) - -$(eval $(call BuildPackage,python-base)) -$(eval $(call BuildPackage,python-light)) -$(eval $(call BuildPackage,python)) - -$(eval $(call BuildPackage,python-base-src)) -$(eval $(call BuildPackage,python-light-src)) diff --git a/lang/python/python/files/config.site b/lang/python/python/files/config.site deleted file mode 100644 index cfa56b89..00000000 --- a/lang/python/python/files/config.site +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/sh -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -ac_cv_file__dev_ptmx=yes -ac_cv_file__dev_ptc=no -ac_cv_buggy_getaddrinfo=no - diff --git a/lang/python/python/files/python-config.in b/lang/python/python/files/python-config.in deleted file mode 100644 index c4a9c27a..00000000 --- a/lang/python/python/files/python-config.in +++ /dev/null @@ -1,80 +0,0 @@ -#!@EXENAME@ - -import sys -import os -import getopt -from distutils import sysconfig - -# start changes -host_prefix = sysconfig.PREFIX - -target_prefix = '@TARGET_PREFIX@' - -target_data_dir = os.path.join(target_prefix, 'lib', 'python' + sysconfig.get_config_var('VERSION') + '-openwrt') -sys.path.append(target_data_dir) - -try: - from _sysconfigdatatarget import build_time_vars - sysconfig._config_vars = {} - sysconfig._config_vars.update(build_time_vars) -except ImportError: - print >>sys.stderr, "Could not import target data from %s" % (target_data_dir) - sys.exit(1) -# end changes -# plus .replace(host_prefix, target_prefix) below - -valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', - 'ldflags', 'help'] - -def exit_with_usage(code=1): - print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0], - '|'.join('--'+opt for opt in valid_opts)) - sys.exit(code) - -try: - opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) -except getopt.error: - exit_with_usage() - -if not opts: - exit_with_usage() - -pyver = sysconfig.get_config_var('VERSION') -getvar = sysconfig.get_config_var - -opt_flags = [flag for (flag, val) in opts] - -if '--help' in opt_flags: - exit_with_usage(code=0) - -for opt in opt_flags: - if opt == '--prefix': - #print sysconfig.PREFIX - print target_prefix - - elif opt == '--exec-prefix': - #print sysconfig.EXEC_PREFIX - print target_prefix - - elif opt in ('--includes', '--cflags'): - flags = ['-I' + sysconfig.get_python_inc(), - '-I' + sysconfig.get_python_inc(plat_specific=True)] - if opt == '--cflags': - flags.extend(getvar('CFLAGS').split()) - #print ' '.join(flags) - print ' '.join(flags).replace(host_prefix, target_prefix) - - elif opt in ('--libs', '--ldflags'): - libs = ['-lpython' + pyver] - libs += getvar('LIBS').split() - libs += getvar('SYSLIBS').split() - # add the prefix/lib/pythonX.Y/config dir, but only if there is no - # shared library in prefix/lib/. - if opt == '--ldflags': - if not getvar('Py_ENABLE_SHARED'): - libs.insert(0, '-L' + getvar('LIBPL')) - if not getvar('PYTHONFRAMEWORK'): - libs.extend(getvar('LINKFORSHARED').split()) - #print ' '.join(libs) - print ' '.join(libs).replace(host_prefix, target_prefix) - diff --git a/lang/python/python/files/python-package-codecs.mk b/lang/python/python/files/python-package-codecs.mk deleted file mode 100644 index 7d3c615f..00000000 --- a/lang/python/python/files/python-package-codecs.mk +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-codecs -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) codecs + unicode support - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-codecs, \ - /usr/lib/python$(PYTHON_VERSION)/encodings \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_cn.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_hk.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_iso2022.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_jp.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_kr.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_codecs_tw.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so \ -)) diff --git a/lang/python/python/files/python-package-compiler.mk b/lang/python/python/files/python-package-compiler.mk deleted file mode 100644 index c840ce10..00000000 --- a/lang/python/python/files/python-package-compiler.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-compiler -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) compiler module - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-compiler, \ - /usr/lib/python$(PYTHON_VERSION)/compiler \ -)) diff --git a/lang/python/python/files/python-package-ctypes.mk b/lang/python/python/files/python-package-ctypes.mk deleted file mode 100644 index 5c34b7a7..00000000 --- a/lang/python/python/files/python-package-ctypes.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-ctypes -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) ctypes module - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-ctypes, \ - /usr/lib/python$(PYTHON_VERSION)/ctypes \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ctypes.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ctypes_test.so \ -)) diff --git a/lang/python/python/files/python-package-db.mk b/lang/python/python/files/python-package-db.mk deleted file mode 100644 index a257820a..00000000 --- a/lang/python/python/files/python-package-db.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-db -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) db module - DEPENDS:=+python-light +libdb47 -endef - -$(eval $(call PyBasePackage,python-db, \ - /usr/lib/python$(PYTHON_VERSION)/bsddb \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bsddb.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/dbm.so \ -)) diff --git a/lang/python/python/files/python-package-decimal.mk b/lang/python/python/files/python-package-decimal.mk deleted file mode 100644 index 578486d8..00000000 --- a/lang/python/python/files/python-package-decimal.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-decimal -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) decimal module - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-decimal, \ - /usr/lib/python$(PYTHON_VERSION)/decimal.py \ -)) diff --git a/lang/python/python/files/python-package-dev.mk b/lang/python/python/files/python-package-dev.mk deleted file mode 100644 index 7c9e2198..00000000 --- a/lang/python/python/files/python-package-dev.mk +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-dev -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) development files - DEPENDS:=+python +python-lib2to3 -endef - -define PyPackage/python-dev/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/bin/python*config $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config/libpython$(PYTHON_VERSION).a $(1)/usr/lib -endef - -$(eval $(call PyBasePackage,python-dev, \ - /usr/lib/python$(PYTHON_VERSION)/config \ - /usr/include/python$(PYTHON_VERSION) \ - /usr/lib/pkgconfig \ - , \ - DO_NOT_ADD_TO_PACKAGE_DEPENDS \ -)) - diff --git a/lang/python/python/files/python-package-distutils.mk b/lang/python/python/files/python-package-distutils.mk deleted file mode 100644 index a139ddba..00000000 --- a/lang/python/python/files/python-package-distutils.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-distutils -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) distutils - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-distutils, \ - /usr/lib/python$(PYTHON_VERSION)/distutils \ -)) diff --git a/lang/python/python/files/python-package-email.mk b/lang/python/python/files/python-package-email.mk deleted file mode 100644 index 8c15583d..00000000 --- a/lang/python/python/files/python-package-email.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-email -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) email module - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-email, \ - /usr/lib/python$(PYTHON_VERSION)/email \ -)) diff --git a/lang/python/python/files/python-package-gdbm.mk b/lang/python/python/files/python-package-gdbm.mk deleted file mode 100644 index 23c7a293..00000000 --- a/lang/python/python/files/python-package-gdbm.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-gdbm -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) gdbm module - DEPENDS:=+python-light +libgdbm -endef - -$(eval $(call PyBasePackage,python-gdbm, \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so \ -)) diff --git a/lang/python/python/files/python-package-lib2to3.mk b/lang/python/python/files/python-package-lib2to3.mk deleted file mode 100644 index 925cfe20..00000000 --- a/lang/python/python/files/python-package-lib2to3.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-lib2to3 -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) lib2to3 module - DEPENDS:=+python -endef - -$(eval $(call PyBasePackage,python-lib2to3, \ - /usr/lib/python$(PYTHON_VERSION)/lib2to3 \ - , \ - DO_NOT_ADD_TO_PACKAGE_DEPENDS \ -)) diff --git a/lang/python/python/files/python-package-logging.mk b/lang/python/python/files/python-package-logging.mk deleted file mode 100644 index efef5314..00000000 --- a/lang/python/python/files/python-package-logging.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-logging -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) logging module - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-logging, \ - /usr/lib/python$(PYTHON_VERSION)/logging \ -)) diff --git a/lang/python/python/files/python-package-multiprocessing.mk b/lang/python/python/files/python-package-multiprocessing.mk deleted file mode 100644 index ccb55f59..00000000 --- a/lang/python/python/files/python-package-multiprocessing.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-multiprocessing -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) multiprocessing - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-multiprocessing, \ - /usr/lib/python$(PYTHON_VERSION)/multiprocessing \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_multiprocessing.so \ -)) diff --git a/lang/python/python/files/python-package-ncurses.mk b/lang/python/python/files/python-package-ncurses.mk deleted file mode 100644 index d952b503..00000000 --- a/lang/python/python/files/python-package-ncurses.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-ncurses -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) ncurses module - DEPENDS:=+python-light +libncurses -endef - -$(eval $(call PyBasePackage,python-ncurses, \ - /usr/lib/python$(PYTHON_VERSION)/curses \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses_panel.so \ -)) diff --git a/lang/python/python/files/python-package-openssl.mk b/lang/python/python/files/python-package-openssl.mk deleted file mode 100644 index dbf6fe18..00000000 --- a/lang/python/python/files/python-package-openssl.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-openssl -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) SSL module - DEPENDS:=+python-light +libopenssl -endef - -$(eval $(call PyBasePackage,python-openssl, \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_hashlib.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so \ -)) diff --git a/lang/python/python/files/python-package-pip.mk b/lang/python/python/files/python-package-pip.mk deleted file mode 100644 index 0a8b69a6..00000000 --- a/lang/python/python/files/python-package-pip.mk +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-pip -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) pip module - VERSION:=$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE) - LICENSE:=MIT - LICENSE_FILES:=LICENSE.txt -# CPE_ID:=cpe:/a:python:pip # not currently handled this way by uscan - DEPENDS:=+python +python-setuptools +python-pip-conf -endef - -define PyPackage/python-pip/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages - $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/* $(1)/usr/bin - $(CP) \ - $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON_VERSION)/site-packages/pip \ - $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON_VERSION)/site-packages/pip-$(PYTHON_PIP_VERSION).dist-info \ - $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/ -endef - -$(eval $(call PyBasePackage,python-pip, \ - , \ - DO_NOT_ADD_TO_PACKAGE_DEPENDS \ -)) diff --git a/lang/python/python/files/python-package-pkg-resources.mk b/lang/python/python/files/python-package-pkg-resources.mk deleted file mode 100644 index f0e819b5..00000000 --- a/lang/python/python/files/python-package-pkg-resources.mk +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (C) 2019 Alexandru Ardelean -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-pkg-resources -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) pkg_resources module (part of etuptools) - VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE) - LICENSE:=MIT - LICENSE_FILES:=LICENSE -# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan - DEPENDS:=+python -endef - -define PyPackage/python-pkg-resources/install - $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages - $(CP) \ - $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \ - $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages -endef - -$(eval $(call PyBasePackage,python-pkg-resources, \ - , \ - DO_NOT_ADD_TO_PACKAGE_DEPENDS \ -)) diff --git a/lang/python/python/files/python-package-pydoc.mk b/lang/python/python/files/python-package-pydoc.mk deleted file mode 100644 index 1e3c3852..00000000 --- a/lang/python/python/files/python-package-pydoc.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-pydoc -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) pydoc module - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-pydoc, \ - /usr/lib/python$(PYTHON_VERSION)/doctest.py \ - /usr/lib/python$(PYTHON_VERSION)/pydoc.py \ - /usr/lib/python$(PYTHON_VERSION)/pydoc_data \ -)) diff --git a/lang/python/python/files/python-package-setuptools.mk b/lang/python/python/files/python-package-setuptools.mk deleted file mode 100644 index 305a515b..00000000 --- a/lang/python/python/files/python-package-setuptools.mk +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-setuptools -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) setuptools module - VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE) - LICENSE:=MIT - LICENSE_FILES:=LICENSE -# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan - DEPENDS:=+python +python-pkg-resources -endef - -define PyPackage/python-setuptools/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages - $(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/* $(1)/usr/bin - $(CP) \ - $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools \ - $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools-$(PYTHON_SETUPTOOLS_VERSION).dist-info \ - $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \ - $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages -endef - -$(eval $(call PyBasePackage,python-setuptools, \ - , \ - DO_NOT_ADD_TO_PACKAGE_DEPENDS \ -)) diff --git a/lang/python/python/files/python-package-sqlite3.mk b/lang/python/python/files/python-package-sqlite3.mk deleted file mode 100644 index 22a6fbcd..00000000 --- a/lang/python/python/files/python-package-sqlite3.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-sqlite3 -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) sqlite3 module - DEPENDS:=+python-light +libsqlite3 -endef - -$(eval $(call PyBasePackage,python-sqlite3, \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so \ - /usr/lib/python$(PYTHON_VERSION)/sqlite3 \ -)) diff --git a/lang/python/python/files/python-package-unittest.mk b/lang/python/python/files/python-package-unittest.mk deleted file mode 100644 index 3c93f513..00000000 --- a/lang/python/python/files/python-package-unittest.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-unittest -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) unittest module - DEPENDS:=+python-light -endef - -$(eval $(call PyBasePackage,python-unittest, \ - /usr/lib/python$(PYTHON_VERSION)/unittest \ -)) diff --git a/lang/python/python/files/python-package-xml.mk b/lang/python/python/files/python-package-xml.mk deleted file mode 100644 index 28e734ea..00000000 --- a/lang/python/python/files/python-package-xml.mk +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Package/python-xml -$(call Package/python/Default) - TITLE:=Python $(PYTHON_VERSION) xml libs - DEPENDS:=+python-light +libexpat -endef - -$(eval $(call PyBasePackage,python-xml, \ - /usr/lib/python$(PYTHON_VERSION)/xml \ - /usr/lib/python$(PYTHON_VERSION)/xmllib.py \ - /usr/lib/python$(PYTHON_VERSION)/xmlrpclib.py \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/_elementtree.so \ - /usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so \ -)) diff --git a/lang/python/python/patches-setuptools/001-reproducible.patch b/lang/python/python/patches-setuptools/001-reproducible.patch deleted file mode 100644 index 32edc568..00000000 --- a/lang/python/python/patches-setuptools/001-reproducible.patch +++ /dev/null @@ -1,16 +0,0 @@ -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848136 -https://sources.debian.org/patches/python-setuptools/40.8.0-1/reproducible.diff/ - -Index: b/setuptools/command/easy_install.py -=================================================================== ---- a/setuptools/command/easy_install.py -+++ b/setuptools/command/easy_install.py -@@ -436,7 +436,7 @@ consider to install to another location, - for spec in self.args: - self.easy_install(spec, not self.no_deps) - if self.record: -- outputs = self.outputs -+ outputs = list(sorted(self.outputs)) - if self.root: # strip any package prefix - root_len = len(self.root) - for counter in range(len(outputs)): diff --git a/lang/python/python/patches-setuptools/002-sorted-requires.patch b/lang/python/python/patches-setuptools/002-sorted-requires.patch deleted file mode 100644 index 2ad4795b..00000000 --- a/lang/python/python/patches-setuptools/002-sorted-requires.patch +++ /dev/null @@ -1,16 +0,0 @@ -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804249 -https://sources.debian.org/patches/python-setuptools/40.8.0-1/sorted-requires.diff/ - -Index: b/setuptools/command/egg_info.py -=================================================================== ---- a/setuptools/command/egg_info.py -+++ b/setuptools/command/egg_info.py -@@ -621,7 +621,7 @@ def warn_depends_obsolete(cmd, basename, - def _write_requirements(stream, reqs): - lines = yield_lines(reqs or ()) - append_cr = lambda line: line + '\n' -- lines = map(append_cr, lines) -+ lines = map(append_cr, sorted(lines)) - stream.writelines(lines) - - diff --git a/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch b/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch deleted file mode 100644 index 15f34dcd..00000000 --- a/lang/python/python/patches-setuptools/003-PKG-INFO-output-reproducible.patch +++ /dev/null @@ -1,14 +0,0 @@ -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894215 -https://sources.debian.org/patches/python-setuptools/40.8.0-1/PKG-INFO-output-reproducible.diff/ - ---- a/setuptools/dist.py -+++ b/setuptools/dist.py -@@ -191,7 +191,7 @@ def write_pkg_file(self, file): - self.long_description_content_type - ) - if self.provides_extras: -- for extra in self.provides_extras: -+ for extra in sorted(self.provides_extras): - write_field('Provides-Extra', extra) - - diff --git a/lang/python/python/patches/001-enable-zlib.patch b/lang/python/python/patches/001-enable-zlib.patch deleted file mode 100644 index 5802e99f..00000000 --- a/lang/python/python/patches/001-enable-zlib.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001 -From: Alexandru Ardelean -Date: Thu, 25 Sep 2014 18:18:29 +0300 -Subject: [PATCH] enable zlib - ---- - Modules/Setup.dist | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/Modules/Setup.dist -+++ b/Modules/Setup.dist -@@ -464,7 +464,7 @@ GLHACK=-Dclear=__GLclear - # Andrew Kuchling's zlib module. - # This require zlib 1.1.3 (or later). - # See http://www.gzip.org/zlib/ --#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz -+zlib zlibmodule.c -lz - - # Interface to the Expat XML parser - # More information on Expat can be found at www.libexpat.org. diff --git a/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch b/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch deleted file mode 100644 index da48819a..00000000 --- a/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -543,7 +543,8 @@ class PyBuildExt(build_ext): - add_dir_to_list(dir_list, directory) - - if os.path.normpath(sys.prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ -+ and not cross_compiling: - # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework - # (PYTHONFRAMEWORK is set) to avoid # linking problems when - # building a framework with different architectures than diff --git a/lang/python/python/patches/003-do-not-compile-tests-at-build.patch b/lang/python/python/patches/003-do-not-compile-tests-at-build.patch deleted file mode 100644 index 6ea72a11..00000000 --- a/lang/python/python/patches/003-do-not-compile-tests-at-build.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1133,6 +1133,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL - done; \ - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -+ifeq (@COMPILE_ALL_TESTS@,yes) - if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ - $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ - $(DESTDIR)$(LIBDEST)/distutils/tests ; \ -@@ -1159,6 +1160,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt -+endif - - # Create the PLATDIR source directory, if one wasn't distributed.. - $(srcdir)/Lib/$(PLATDIR): diff --git a/lang/python/python/patches/004-do-not-write-bytes-codes.patch b/lang/python/python/patches/004-do-not-write-bytes-codes.patch deleted file mode 100644 index 06c265c0..00000000 --- a/lang/python/python/patches/004-do-not-write-bytes-codes.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Python/pythonrun.c -+++ b/Python/pythonrun.c -@@ -71,7 +71,7 @@ int Py_InteractiveFlag; /* Needed by Py_ - int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */ - int Py_NoSiteFlag; /* Suppress 'import site' */ - int Py_BytesWarningFlag; /* Warn on comparison between bytearray and unicode */ --int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */ -+int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.py[co]) */ - int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ - int Py_FrozenFlag; /* Needed by getpath.c */ - int Py_UnicodeFlag = 0; /* Needed by compile.c */ diff --git a/lang/python/python/patches/005-fix-bluetooth-support.patch b/lang/python/python/patches/005-fix-bluetooth-support.patch deleted file mode 100644 index 6448f63f..00000000 --- a/lang/python/python/patches/005-fix-bluetooth-support.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- a/configure -+++ b/configure -@@ -7084,7 +7084,7 @@ sys/param.h sys/poll.h sys/random.h sys/ - sys/termio.h sys/time.h \ - sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ - sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ --bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h -+linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -@@ -7306,6 +7306,24 @@ fi - fi - - -+# bluetooth/bluetooth.h has been known to not compile with -std=c99. -+# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 -+SAVE_CFLAGS=$CFLAGS -+CFLAGS="-std=c99 $CFLAGS" -+for ac_header in bluetooth/bluetooth.h -+do : -+ ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" -+if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_BLUETOOTH_BLUETOOTH_H 1 -+_ACEOF -+ -+fi -+ -+done -+ -+CFLAGS=$SAVE_CFLAGS -+ - # On Linux, netlink.h requires asm/types.h - for ac_header in linux/netlink.h - do : ---- a/configure.ac -+++ b/configure.ac -@@ -1739,10 +1739,17 @@ sys/param.h sys/poll.h sys/random.h sys/ - sys/termio.h sys/time.h \ - sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ - sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ --bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h) -+linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h) - AC_HEADER_DIRENT - AC_HEADER_MAJOR - -+# bluetooth/bluetooth.h has been known to not compile with -std=c99. -+# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 -+SAVE_CFLAGS=$CFLAGS -+CFLAGS="-std=c99 $CFLAGS" -+AC_CHECK_HEADERS(bluetooth/bluetooth.h) -+CFLAGS=$SAVE_CFLAGS -+ - # On Linux, netlink.h requires asm/types.h - AC_CHECK_HEADERS(linux/netlink.h,,,[ - #ifdef HAVE_ASM_TYPES_H diff --git a/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch b/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch deleted file mode 100644 index 806b7af3..00000000 --- a/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -500,13 +500,8 @@ class PyBuildExt(build_ext): - os.unlink(tmpfile) - - def detect_modules(self): -- # Ensure that /usr/local is always used -- if not cross_compiling: -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - if cross_compiling: - self.add_gcc_paths() -- self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. diff --git a/lang/python/python/patches/007-distutils-do-not-adjust-path.patch b/lang/python/python/patches/007-distutils-do-not-adjust-path.patch deleted file mode 100644 index 49fe9262..00000000 --- a/lang/python/python/patches/007-distutils-do-not-adjust-path.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Lib/distutils/command/build_scripts.py -+++ b/Lib/distutils/command/build_scripts.py -@@ -89,6 +89,7 @@ class build_scripts (Command): - adjust = 1 - post_interp = match.group(1) or '' - -+ adjust = 0 - if adjust: - log.info("copying and adjusting %s -> %s", script, - self.build_dir) diff --git a/lang/python/python/patches/008-distutils-use-python-sysroot.patch b/lang/python/python/patches/008-distutils-use-python-sysroot.patch deleted file mode 100644 index 4aeb7ff3..00000000 --- a/lang/python/python/patches/008-distutils-use-python-sysroot.patch +++ /dev/null @@ -1,50 +0,0 @@ -Adjust library/header paths for cross-compilation - -When cross-compiling third-party extensions, the get_python_inc() or -get_python_lib() can be called, to return the path to headers or -libraries. However, they use the sys.prefix of the host Python, which -returns incorrect paths when cross-compiling (paths pointing to host -headers and libraries). - -In order to fix this, we introduce the _python_sysroot, _python_prefix -and _python_exec_prefix variables, that allow to override these -values, and get correct header/library paths when cross-compiling -third-party Python modules. - -The _python_sysroot variable is also used to prefix the LIBDIR value -taken from the sysconfigdata module. - -Signed-off-by: Thomas Petazzoni - ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -19,8 +19,13 @@ import sys - from distutils.errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. --PREFIX = os.path.normpath(sys.prefix) --EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+if "_python_sysroot" in os.environ: -+ _sysroot=os.environ.get('_python_sysroot') -+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) -+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) -+else: -+ PREFIX = os.path.normpath(sys.prefix) -+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) - - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild9. If we're dealing with an x64 Windows build, ---- a/Lib/distutils/command/build_ext.py -+++ b/Lib/distutils/command/build_ext.py -@@ -240,7 +240,10 @@ class build_ext (Command): - if (sysconfig.get_config_var('Py_ENABLE_SHARED')): - if not sysconfig.python_build: - # building third party extensions -- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) -+ libdir = sysconfig.get_config_var('LIBDIR') -+ if "_python_sysroot" in os.environ: -+ libdir = os.environ.get("_python_sysroot") + libdir -+ self.library_dirs.append(libdir) - else: - # building python standard extensions - self.library_dirs.append('.') diff --git a/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch b/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch deleted file mode 100644 index a40aec8d..00000000 --- a/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -1129,6 +1129,7 @@ class PyBuildExt(build_ext): - if db_setup_debug: print "db lib: ", dblib, "not found" - - except db_found: -+ rt_dblib_dir = None if cross_compiling else dblib_dir - if db_setup_debug: - print "bsddb using BerkeleyDB lib:", db_ver, dblib - print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir -@@ -1143,7 +1144,7 @@ class PyBuildExt(build_ext): - exts.append(Extension('_bsddb', ['_bsddb.c'], - depends = ['bsddb.h'], - library_dirs=dblib_dir, -- runtime_library_dirs=dblib_dir, -+ runtime_library_dirs=rt_dblib_dir, - include_dirs=db_incs, - libraries=dblibs)) - else: -@@ -1354,10 +1355,11 @@ class PyBuildExt(build_ext): - break - elif cand == "bdb": - if db_incs is not None: -+ rt_dblib_dir = None if cross_compiling else dblib_dir - print "building dbm using bdb" - dbmext = Extension('dbm', ['dbmmodule.c'], - library_dirs=dblib_dir, -- runtime_library_dirs=dblib_dir, -+ runtime_library_dirs=rt_dblib_dir, - include_dirs=db_incs, - define_macros=[ - ('HAVE_BERKDB_H', None), diff --git a/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch b/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch deleted file mode 100644 index 925fa978..00000000 --- a/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -509,8 +509,9 @@ class PyBuildExt(build_ext): - # directly since an inconsistently reproducible issue comes up where - # the environment variable is not set even though the value were passed - # into configure and stored in the Makefile (issue found on OS X 10.3). -+ rt_lib_dirs = [] if cross_compiling else self.compiler.runtime_library_dirs - for env_var, arg_name, dir_list in ( -- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), -+ ('LDFLAGS', '-R', rt_lib_dirs), - ('LDFLAGS', '-L', self.compiler.library_dirs), - ('CPPFLAGS', '-I', self.compiler.include_dirs)): - env_val = sysconfig.get_config_var(env_var) diff --git a/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch b/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch deleted file mode 100644 index 282a6fbd..00000000 --- a/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Lib/py_compile.py -+++ b/Lib/py_compile.py -@@ -108,6 +108,7 @@ def compile(file, cfile=None, dfile=None - timestamp = long(os.fstat(f.fileno()).st_mtime) - except AttributeError: - timestamp = long(os.stat(file).st_mtime) -+ timestamp = long(os.getenv('SOURCE_DATE_EPOCH', timestamp)) - codestring = f.read() - try: - codeobject = __builtin__.compile(codestring, dfile or file,'exec') diff --git a/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch b/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch deleted file mode 100644 index f6891d73..00000000 --- a/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -634,6 +634,16 @@ regen-all: regen-opcode-targets regen-gr - ############################################################################ - # Special rules for object files - -+DATE_FMT = %b %d %Y -+TIME_FMT = %H:%M:%S -+ifdef SOURCE_DATE_EPOCH -+ BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)") -+ BUILD_TIME ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(TIME_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(TIME_FMT)" 2>/dev/null || date -u "+$(TIME_FMT)") -+else -+ BUILD_DATE ?= $(shell date "+$(DATE_FMT)") -+ BUILD_TIME ?= $(shell date "+$(TIME_FMT)") -+endif -+ - Modules/getbuildinfo.o: $(PARSER_OBJS) \ - $(OBJECT_OBJS) \ - $(PYTHON_OBJS) \ -@@ -642,6 +652,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ - $(MODOBJS) \ - $(srcdir)/Modules/getbuildinfo.c - $(CC) -c $(PY_CFLAGS) \ -+ -DDATE="\"$(BUILD_DATE)\"" \ -+ -DTIME="\"$(BUILD_TIME)\"" \ - -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \ - -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \ - -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ diff --git a/lang/python/python/patches/021-compileall-add-recursion-option.patch b/lang/python/python/patches/021-compileall-add-recursion-option.patch deleted file mode 100644 index 4a0485e0..00000000 --- a/lang/python/python/patches/021-compileall-add-recursion-option.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/Lib/compileall.py -+++ b/Lib/compileall.py -@@ -152,10 +152,10 @@ def main(): - """Script main program.""" - import getopt - try: -- opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:i:') -+ opts, args = getopt.getopt(sys.argv[1:], 'lr:fqd:x:i:') - except getopt.error, msg: - print msg -- print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \ -+ print "usage: python compileall.py [-l] [-r recursion] [-f] [-q] [-d destdir] " \ - "[-x regexp] [-i list] [directory|file ...]" - print - print "arguments: zero or more file and directory names to compile; " \ -@@ -164,6 +164,7 @@ def main(): - print - print "options:" - print "-l: don't recurse into subdirectories" -+ print "-r recursion: control the maximum recursion level" - print "-f: force rebuild even if timestamps are up-to-date" - print "-q: output only error messages" - print "-d destdir: directory to prepend to file paths for use in " \ -@@ -187,6 +188,7 @@ def main(): - flist = None - for o, a in opts: - if o == '-l': maxlevels = 0 -+ if o == '-r': maxlevels = int(a) - if o == '-d': ddir = a - if o == '-f': force = 1 - if o == '-q': quiet = 1 diff --git a/lang/python/python/patches/024-musl-find_library.patch b/lang/python/python/patches/024-musl-find_library.patch deleted file mode 100644 index 70b51595..00000000 --- a/lang/python/python/patches/024-musl-find_library.patch +++ /dev/null @@ -1,74 +0,0 @@ -https://bugs.python.org/issue21622 - -Based on the patch from Alpine Linux -https://git.alpinelinux.org/aports/tree/main/python2/musl-find_library.patch - ---- a/Lib/ctypes/util.py -+++ b/Lib/ctypes/util.py -@@ -86,6 +86,8 @@ if os.name == "posix" and sys.platform = - elif os.name == "posix": - # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump - import re, tempfile, errno -+ from glob import glob -+ musl_ldso = glob('/lib/ld-musl-*.so.1') - - def _findLib_gcc(name): - # Run GCC's linker with the -t (aka --trace) option and examine the -@@ -232,6 +234,57 @@ elif os.name == "posix": - def find_library(name, is64 = False): - return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) - -+ elif musl_ldso and os.path.isfile(musl_ldso[0]): -+ -+ def _is_elf(filepath): -+ try: -+ with open(filepath, 'rb') as fh: -+ return fh.read(4) == b'\x7fELF' -+ except: -+ return False -+ -+ def find_library(name): -+ # absolute name? -+ if os.path.isabs(name): -+ if _is_elf(name): -+ return name -+ else: -+ return None -+ -+ # special case for unified standard libs -+ stdlibs = ['libcrypt.so', 'libdl.so', 'libm.so', 'libpthread.so', 'libresolv.so', 'librt.so', 'libutil.so', 'libxnet.so'] -+ if name in stdlibs: -+ name = 'libc.so' -+ elif ('lib' + name + '.so') in stdlibs: -+ name = 'c' -+ -+ paths = [] -+ # read path list from /etc/ld-musl-$(ARCH).path -+ path_list = musl_ldso[0].replace('/lib/', '/etc/').replace('.so.1', '.path') -+ try: -+ with open(path_list, 'r') as fh: -+ paths = [path for line in fh for path in line.rstrip('\n').split(':') if path] -+ except: -+ paths = [] -+ # default path list if /etc/ld-musl-$(ARCH).path is empty or does not exist -+ if not paths: -+ paths = ['/lib', '/usr/local/lib', '/usr/lib'] -+ -+ # prepend paths from LD_LIBRARY_PATH -+ if 'LD_LIBRARY_PATH' in os.environ: -+ paths = os.environ['LD_LIBRARY_PATH'].split(':') + paths -+ -+ for d in paths: -+ f = os.path.join(d, name) -+ if _is_elf(f): -+ return os.path.basename(f) -+ -+ prefix = os.path.join(d, 'lib'+name) -+ for suffix in ['.so', '.so.*']: -+ for f in glob('{0}{1}'.format(prefix, suffix)): -+ if _is_elf(f): -+ return os.path.basename(f) -+ - else: - - def _findSoname_ldconfig(name): diff --git a/lang/python/python/patches/025-utime.patch b/lang/python/python/patches/025-utime.patch deleted file mode 100644 index 20d0310d..00000000 --- a/lang/python/python/patches/025-utime.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -3070,7 +3070,7 @@ done: - if (arg == Py_None) { - /* optional time values not given */ - Py_BEGIN_ALLOW_THREADS -- res = utime(path, NULL); -+ res = utimes(path, NULL); - Py_END_ALLOW_THREADS - } - else if (!PyTuple_Check(arg) || PyTuple_Size(arg) != 2) { diff --git a/lang/python/python/patches/026-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch b/lang/python/python/patches/026-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch deleted file mode 100644 index c72748d0..00000000 --- a/lang/python/python/patches/026-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch +++ /dev/null @@ -1,209 +0,0 @@ -From 2a9c3805ddedf282881ef7811a561c70b74f80b1 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Wed, 19 Sep 2018 07:25:48 +0100 -Subject: [PATCH] closes bpo-34585: Don't do runtime test to get float byte - order. (GH-9085) - -Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly. - -Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary. - -RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double. ---- - .../2018-09-18-16-28-31.bpo-34585.CGMu0h.rst | 3 + - configure.ac | 76 +++-------------- - m4/ax_c_float_words_bigendian.m4 | 83 +++++++++++++++++++ - 3 files changed, 99 insertions(+), 63 deletions(-) - create mode 100644 Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst - create mode 100644 m4/ax_c_float_words_bigendian.m4 - -diff --git a/Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst b/Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst -new file mode 100644 -index 0000000000000..01318e6e46a32 ---- /dev/null -+++ b/Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst -@@ -0,0 +1,3 @@ -+Check for floating-point byte order in configure.ac using compilation tests -+instead of executing code, so that these checks work in cross-compiled -+builds. -diff --git a/configure.ac b/configure.ac -index 03638f8ae9bc7..96331ec221be2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4206,74 +4206,24 @@ fi - # * Check for various properties of floating point * - # ************************************************** - --AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64) --AC_CACHE_VAL(ac_cv_little_endian_double, [ --AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0) -- return 0; -- else -- return 1; --} --]])], --[ac_cv_little_endian_double=yes], --[ac_cv_little_endian_double=no], --[ac_cv_little_endian_double=no])]) --AC_MSG_RESULT($ac_cv_little_endian_double) --if test "$ac_cv_little_endian_double" = yes --then -- AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1, -- [Define if C doubles are 64-bit IEEE 754 binary format, stored -- with the least significant byte first]) --fi -- --AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64) --AC_CACHE_VAL(ac_cv_big_endian_double, [ --AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0) -- return 0; -- else -- return 1; --} --]])], --[ac_cv_big_endian_double=yes], --[ac_cv_big_endian_double=no], --[ac_cv_big_endian_double=no])]) --AC_MSG_RESULT($ac_cv_big_endian_double) --if test "$ac_cv_big_endian_double" = yes -+AX_C_FLOAT_WORDS_BIGENDIAN -+if test "$ax_cv_c_float_words_bigendian" = "yes" - then - AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1, - [Define if C doubles are 64-bit IEEE 754 binary format, stored - with the most significant byte first]) --fi -- --# Some ARM platforms use a mixed-endian representation for doubles. --# While Python doesn't currently have full support for these platforms --# (see e.g., issue 1762561), we can at least make sure that float <-> string --# conversions work. --AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64) --AC_CACHE_VAL(ac_cv_mixed_endian_double, [ --AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0) -- return 0; -- else -- return 1; --} --]])], --[ac_cv_mixed_endian_double=yes], --[ac_cv_mixed_endian_double=no], --[ac_cv_mixed_endian_double=no])]) --AC_MSG_RESULT($ac_cv_mixed_endian_double) --if test "$ac_cv_mixed_endian_double" = yes -+elif test "$ax_cv_c_float_words_bigendian" = "no" - then -+ AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1, -+ [Define if C doubles are 64-bit IEEE 754 binary format, stored -+ with the least significant byte first]) -+else -+ # Some ARM platforms use a mixed-endian representation for doubles. -+ # While Python doesn't currently have full support for these platforms -+ # (see e.g., issue 1762561), we can at least make sure that float <-> string -+ # conversions work. -+ # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big -+ # or little, then it must be this? - AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1, - [Define if C doubles are 64-bit IEEE 754 binary format, stored - in ARM mixed-endian order (byte order 45670123)]) -diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4 -new file mode 100644 -index 0000000000000..216b90d803187 ---- /dev/null -+++ b/m4/ax_c_float_words_bigendian.m4 -@@ -0,0 +1,83 @@ -+# =============================================================================== -+# https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html -+# =============================================================================== -+# -+# SYNOPSIS -+# -+# AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN]) -+# -+# DESCRIPTION -+# -+# Checks the ordering of words within a multi-word float. This check is -+# necessary because on some systems (e.g. certain ARM systems), the float -+# word ordering can be different from the byte ordering. In a multi-word -+# float context, "big-endian" implies that the word containing the sign -+# bit is found in the memory location with the lowest address. This -+# implementation was inspired by the AC_C_BIGENDIAN macro in autoconf. -+# -+# The endianness is detected by first compiling C code that contains a -+# special double float value, then grepping the resulting object file for -+# certain strings of ASCII values. The double is specially crafted to have -+# a binary representation that corresponds with a simple string. In this -+# implementation, the string "noonsees" was selected because the -+# individual word values ("noon" and "sees") are palindromes, thus making -+# this test byte-order agnostic. If grep finds the string "noonsees" in -+# the object file, the target platform stores float words in big-endian -+# order. If grep finds "seesnoon", float words are in little-endian order. -+# If neither value is found, the user is instructed to specify the -+# ordering. -+# -+# LICENSE -+# -+# Copyright (c) 2008 Daniel Amelang -+# -+# Copying and distribution of this file, with or without modification, are -+# permitted in any medium without royalty provided the copyright notice -+# and this notice are preserved. This file is offered as-is, without any -+# warranty. -+ -+#serial 11 -+ -+AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN], -+ [AC_CACHE_CHECK(whether float word ordering is bigendian, -+ ax_cv_c_float_words_bigendian, [ -+ -+ax_cv_c_float_words_bigendian=unknown -+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -+ -+double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; -+ -+]])], [ -+ -+if grep noonsees conftest.$ac_objext >/dev/null ; then -+ ax_cv_c_float_words_bigendian=yes -+fi -+if grep seesnoon conftest.$ac_objext >/dev/null ; then -+ if test "$ax_cv_c_float_words_bigendian" = unknown; then -+ ax_cv_c_float_words_bigendian=no -+ else -+ ax_cv_c_float_words_bigendian=unknown -+ fi -+fi -+ -+])]) -+ -+case $ax_cv_c_float_words_bigendian in -+ yes) -+ m4_default([$1], -+ [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1, -+ [Define to 1 if your system stores words within floats -+ with the most significant word first])]) ;; -+ no) -+ $2 ;; -+ *) -+ m4_default([$3], -+ [AC_MSG_ERROR([ -+ -+Unknown float word ordering. You need to manually preset -+ax_cv_c_float_words_bigendian=no (or yes) according to your system. -+ -+ ])]) ;; -+esac -+ -+])# AX_C_FLOAT_WORDS_BIGENDIAN diff --git a/lang/python/python/patches/027-bpo-34585-run-autoconf-GH-9411-edited.patch b/lang/python/python/patches/027-bpo-34585-run-autoconf-GH-9411-edited.patch deleted file mode 100644 index 137ed9a2..00000000 --- a/lang/python/python/patches/027-bpo-34585-run-autoconf-GH-9411-edited.patch +++ /dev/null @@ -1,218 +0,0 @@ -From b3b8cb419e496629873fa7dda82a01863f58617a Mon Sep 17 00:00:00 2001 -From: Benjamin Peterson -Date: Tue, 18 Sep 2018 23:49:05 -0700 -Subject: [PATCH] run autoconf (GH-9411) - -Follow up to 2a9c3805ddedf282881ef7811a561c70b74f80b1 (bpo-34585). ---- - aclocal.m4 | 1 + - configure | 146 ++++++++++++++++---------------------------------- - pyconfig.h.in | 4 ++ - 3 files changed, 51 insertions(+), 100 deletions(-) - -diff --git a/aclocal.m4 b/aclocal.m4 -index 6a24d8e6b9c00..030e6877de9f7 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -288,3 +288,4 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) - AS_VAR_IF([$1], [""], [$5], [$4])dnl - ])dnl PKG_CHECK_VAR - -+m4_include([m4/ax_c_float_words_bigendian.m4]) -diff --git a/configure b/configure -index 7b0c734b5e25e..38546d6ca7b40 100755 ---- a/configure -+++ b/configure -@@ -13853,131 +13853,77 @@ fi - # * Check for various properties of floating point * - # ************************************************** - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5 --$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; } --if ${ac_cv_little_endian_double+:} false; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5 -+$as_echo_n "checking whether float word ordering is bigendian... " >&6; } -+if ${ax_cv_c_float_words_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 - else - --if test "$cross_compiling" = yes; then : -- ac_cv_little_endian_double=no --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ -+ax_cv_c_float_words_bigendian=unknown -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - --#include --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0) -- return 0; -- else -- return 1; --} - --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_little_endian_double=yes --else -- ac_cv_little_endian_double=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -+double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; - --fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5 --$as_echo "$ac_cv_little_endian_double" >&6; } --if test "$ac_cv_little_endian_double" = yes --then -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : - --$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h - -+if grep noonsees conftest.$ac_objext >/dev/null ; then -+ ax_cv_c_float_words_bigendian=yes -+fi -+if grep seesnoon conftest.$ac_objext >/dev/null ; then -+ if test "$ax_cv_c_float_words_bigendian" = unknown; then -+ ax_cv_c_float_words_bigendian=no -+ else -+ ax_cv_c_float_words_bigendian=unknown -+ fi - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5 --$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; } --if ${ac_cv_big_endian_double+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- --if test "$cross_compiling" = yes; then : -- ac_cv_big_endian_double=no --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --#include --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0) -- return 0; -- else -- return 1; --} - --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_big_endian_double=yes --else -- ac_cv_big_endian_double=no - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5 -+$as_echo "$ax_cv_c_float_words_bigendian" >&6; } - --fi -+case $ax_cv_c_float_words_bigendian in -+ yes) - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5 --$as_echo "$ac_cv_big_endian_double" >&6; } --if test "$ac_cv_big_endian_double" = yes --then -+$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h -+ ;; -+ no) -+ ;; -+ *) -+ as_fn_error $? " - --$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h -+Unknown float word ordering. You need to manually preset -+ax_cv_c_float_words_bigendian=no (or yes) according to your system. - --fi -+ " "$LINENO" 5 ;; -+esac - --# Some ARM platforms use a mixed-endian representation for doubles. --# While Python doesn't currently have full support for these platforms --# (see e.g., issue 1762561), we can at least make sure that float <-> string --# conversions work. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5 --$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; } --if ${ac_cv_mixed_endian_double+:} false; then : -- $as_echo_n "(cached) " >&6 --else - --if test "$cross_compiling" = yes; then : -- ac_cv_mixed_endian_double=no --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -+if test "$ax_cv_c_float_words_bigendian" = "yes" -+then - --#include --int main() { -- double x = 9006104071832581.0; -- if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0) -- return 0; -- else -- return 1; --} -+$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h - --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_mixed_endian_double=yes --else -- ac_cv_mixed_endian_double=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -+elif test "$ax_cv_c_float_words_bigendian" = "no" -+then - --fi -+$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5 --$as_echo "$ac_cv_mixed_endian_double" >&6; } --if test "$ac_cv_mixed_endian_double" = yes --then -+else -+ # Some ARM platforms use a mixed-endian representation for doubles. -+ # While Python doesn't currently have full support for these platforms -+ # (see e.g., issue 1762561), we can at least make sure that float <-> string -+ # conversions work. -+ # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big -+ # or little, then it must be this? - - $as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h - -diff --git a/pyconfig.h.in b/pyconfig.h.in -index 360f79994fafe..41e0479cad2e3 100644 ---- a/pyconfig.h.in -+++ b/pyconfig.h.in -@@ -30,6 +30,10 @@ - /* Define if --enable-ipv6 is specified */ - #undef ENABLE_IPV6 - -+/* Define to 1 if your system stores words within floats with the most -+ significant word first */ -+#undef FLOAT_WORDS_BIGENDIAN -+ - /* Define if flock needs to be linked with bsd library. */ - #undef FLOCK_NEEDS_LIBBSD - diff --git a/lang/python/python3-asgiref/Makefile b/lang/python/python3-asgiref/Makefile index 9c1078a3..6ef9727f 100644 --- a/lang/python/python3-asgiref/Makefile +++ b/lang/python/python3-asgiref/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asgiref -PKG_VERSION:=3.2.5 -PKG_RELEASE:=1 +PKG_VERSION:=3.2.7 +PKG_RELEASE:=2 PYPI_NAME:=asgiref -PKG_HASH:=c8f49dd3b42edcc51d09dd2eea8a92b3cfc987ff7e6486be734b4d0cbfd5d315 +PKG_HASH:=8036f90603c54e93521e5777b2b9a39ba1bad05773fcf2d208f0299d1df58ce5 PKG_MAINTAINER:=Peter Stadler PKG_LICENSE:=BSD-3-Clause @@ -22,7 +22,6 @@ define Package/python3-asgiref TITLE:=Standard for Python asynchronous web apps and servers. URL:=https://asgi.readthedocs.io/en/latest/ DEPENDS:=+python3-light +python3-logging +python3-asyncio - VARIANT:=python3 endef define Package/python3-asgiref/description diff --git a/lang/python/python3-bottle/Makefile b/lang/python/python3-bottle/Makefile index 5fc5bd0a..5caf2519 100644 --- a/lang/python/python3-bottle/Makefile +++ b/lang/python/python3-bottle/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python3-bottle PKG_VERSION:=0.12.17 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=bottle PKG_HASH:=e9eaa412a60cc3d42ceb42f58d15864d9ed1b92e9d630b8130c871c5bb16107c @@ -30,7 +30,6 @@ define Package/python3-bottle TITLE:=Fast and simple WSGI-framework for small web-applications URL:=https://bottlepy.org DEPENDS:=+python3 - VARIANT:=python3 endef define Package/python3-bottle/description diff --git a/lang/python/python3-django-cors-headers/Makefile b/lang/python/python3-django-cors-headers/Makefile index b7d87782..73a2cc54 100644 --- a/lang/python/python3-django-cors-headers/Makefile +++ b/lang/python/python3-django-cors-headers/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-cors-headers -PKG_VERSION:=3.2.1 -PKG_RELEASE:=2 +PKG_VERSION:=3.3.0 +PKG_RELEASE:=1 PYPI_NAME:=django-cors-headers -PKG_HASH:=a5960addecc04527ab26617e51b8ed42f0adab4594b24bb0f3c33e2bd3857c3f +PKG_HASH:=73d654950b5f5e7e4f67c05183d2169d4f7518ceb87734eb0d68f9e43be59f1c PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE @@ -22,7 +22,6 @@ define Package/python3-django-cors-headers TITLE:=Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS). URL:=https://github.com/ottoyiu/django-cors-headers DEPENDS:=+django +python3-urllib +python3-light - VARIANT:=python3 endef define Package/python3-django-cors-headers/description diff --git a/lang/python/python3-django-etesync-journal/Makefile b/lang/python/python3-django-etesync-journal/Makefile index 9c9787ba..50321db8 100644 --- a/lang/python/python3-django-etesync-journal/Makefile +++ b/lang/python/python3-django-etesync-journal/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=django-etesync-journal PKG_VERSION:=1.2.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=django-etesync-journal PKG_HASH:=1b481f592217186482be9faee686f0c132790db4177deb1f5152b73e99ac6338 @@ -22,7 +22,6 @@ define Package/python3-django-etesync-journal TITLE:=The server side implementation of the EteSync protocol. URL:=https://www.etesync.com/ DEPENDS:=+django +python3-django-restframework +python3-light - VARIANT:=python3 endef define Package/python3-django-etesync-journal/description diff --git a/lang/python/python3-drf-nested-routers/Makefile b/lang/python/python3-drf-nested-routers/Makefile index 3a42067d..4e0289d1 100644 --- a/lang/python/python3-drf-nested-routers/Makefile +++ b/lang/python/python3-drf-nested-routers/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=drf-nested-routers PKG_VERSION:=0.91 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=drf-nested-routers PKG_HASH:=46e5c3abc15c782cafafd7d75028e8f9121bbc6228e3599bbb48a3daa4585034 @@ -22,7 +22,6 @@ define Package/python3-drf-nested-routers TITLE:=Nested resources for the Django Rest Framework URL:=https://github.com/alanjds/drf-nested-routers DEPENDS:=+python3-django-restframework +django +python3-light - VARIANT:=python3 endef define Package/python3-drf-nested-routers/description diff --git a/lang/python/python3-find-stdlib-depends.sh b/lang/python/python3-find-stdlib-depends.sh new file mode 100644 index 00000000..609fac45 --- /dev/null +++ b/lang/python/python3-find-stdlib-depends.sh @@ -0,0 +1,434 @@ +#!/bin/sh + +# Packages data +# +# Notes: +# * python3-codecs: Also contains codecs for CJK encodings but we don't +# have a good way to check for uses +# * python3-openssl: Don't include hashlib as it supports several +# standard algorithms without requiring OpenSSL + +packages=" +python3-asyncio: asyncio +python3-cgi: cgi +python3-cgitb: cgitb +python3-codecs: unicodedata +python3-ctypes: ctypes +python3-dbm: dbm +python3-decimal: decimal +python3-distutils: distutils +python3-email: email +python3-gdbm: dbm.gnu +python3-logging: logging +python3-lzma: lzma +python3-multiprocessing: multiprocessing +python3-ncurses: ncurses +python3-openssl: ssl +python3-pydoc: doctest pydoc +python3-sqlite3: sqlite3 +python3-unittest: unittest +python3-urllib: urllib +python3-xml: xml xmlrpc +" + + +# Constants + +stdin_name="" +grep_dir_filters=" +-Ir +--include=*.py +--exclude=setup.py +--exclude=test_*.py +--exclude=*_test.py +--exclude-dir=test +--exclude-dir=tests +--exclude-dir=ipkg-* +--exclude-dir=.pkgdir +" + +log_level_notice=5 +log_level_info=6 +log_level_debug=7 + +# /usr/include/sysexits.h +ex_usage=64 +ex_noinput=66 +ex_unavailable=69 +ex_software=70 + +newline=" +" +oifs="$IFS" + + +# Defaults + +grep_output_default_max_count=3 +grep_output_default_color_when="auto" +grep_output_default_line_prefix="-HnT --label=$stdin_name" +grep_output_default_context_num=1 + +log_level_default="$log_level_info" + + +# Global variables + +log_level= +grep= +grep_output_options= +grep_output_description= +stdin= +output_name= +is_first_search= + + +# Logging + +log() { + printf '%s\n' "$*" +} + +can_log_notice() { + [ "$log_level" -ge "$log_level_notice" ] +} + +can_log_info() { + [ "$log_level" -ge "$log_level_info" ] +} + +can_log_debug() { + [ "$log_level" -ge "$log_level_debug" ] +} + +log_notice() { + if can_log_notice; then + log "$@" + fi +} + +log_info() { + if can_log_info; then + log "$@" + fi +} + +log_debug() { + if can_log_debug; then + log "$@" + fi +} + +log_error() { + printf '%s\n' "Error: $*" >&2 +} + + +# Usage + +usage() { + cat <<- EOF + Usage: ${0##*/} [OPTION]... [FILE]... + Search for imports of certain Python standard libraries in each FILE, + generate a list of suggested package dependencies. + + With no FILE, or when FILE is -, read standard input. + + Options: + -c WHEN use color in output; + WHEN is 'always', 'never', or 'auto' (default: '$grep_output_default_color_when') + -h display this help text and exit + -m NUM show max NUM matches per package per file (default: $grep_output_default_max_count); + use 0 to show all matches + -n NAME when one or no FILE is given, use NAME instead of FILE in + displayed information + -q show suggested dependencies only + -v show verbose output (also show all matches) + -x NUM show NUM lines of context (default: $grep_output_default_context_num) + + EOF +} + + +# Imports search + +get_package_modules() { + local line="$1" + local field_num=0 + local IFS=: + + for field in $line; do + # strip leading and trailing whitespace + field="${field#"${field%%[! ]*}"}" + field="${field%"${field##*[! ]}"}" + + # set variables in search_path() + if [ "$field_num" -eq 0 ]; then + package="$field" + field_num=1 + elif [ "$field_num" -eq 1 ]; then + modules="$field" + field_num=2 + else + field_num=3 + fi + done + + if [ "$field_num" -ne 2 ] || [ -z "$package" ] || [ -z "$modules" ]; then + log_error "invalid package data \"$line\"" + exit "$ex_software" + fi +} + +search_path_for_modules() { + local path="$1" + local path_is_dir="$2" + local path_is_stdin="$3" + local package="$4" + local modules="$5" + local modules_regex + local regex + local remove_dir_prefix + local grep_results + local IFS="$oifs" + + log_debug " Looking for modules in $package ($modules)" + + modules_regex=$(printf '%s' "$modules" | sed -e 's/\./\\./g' -e 's/\s\+/|/g') + regex="\b(import\s+($modules_regex)|from\s+($modules_regex)\S*\s+import)\b" + + if [ -n "$path_is_dir" ]; then + remove_dir_prefix="s|^\(\(\x1b[[0-9;]*[mK]\)*\)$path|\1|" + grep_results=$($grep $grep_output_options $grep_dir_filters -E "$regex" "$path") + + elif [ -n "$path_is_stdin" ]; then + grep_results=$(printf '%s\n' "$stdin" | $grep $grep_output_options -E "$regex") + + else + grep_results=$($grep $grep_output_options -E "$regex" "$path") + fi + + if [ "$?" -ne 0 ]; then + log_debug " No imports found" + log_debug "" + return 0 + fi + + log_info " Found imports for: $modules" + + if can_log_info; then + printf '%s\n' "$grep_results" | sed -e "$remove_dir_prefix" -e "s/^/ /" + fi + + log_info "" + + # set variable in search_path() + suggested="$suggested +$package" +} + +search_path() { + local path="$1" + local name="$2" + local path_is_dir + local path_is_stdin + local package + local modules + local suggested + local IFS="$newline" + + if [ "$path" = "-" ]; then + path_is_stdin=1 + + else + if ! [ -e "$path" ]; then + log_error "$path does not exist" + exit "$ex_noinput" + fi + + if [ -d "$path" ]; then + path="${path%/}/" + path_is_dir=1 + fi + fi + + log_info "" + log_info "Searching $name (showing $grep_output_description):" + log_info "" + + if [ -n "$path_is_stdin" ]; then + stdin="$(cat)" + fi + + for line in $packages; do + # strip leading whitespace + line="${line#"${line%%[! ]*}"}" + + # skip blank lines or comments (beginning with #) + if [ -z "$line" ] || [ "$line" != "${line###}" ]; then + continue + fi + + package= + modules= + + get_package_modules "$line" + search_path_for_modules "$path" "$path_is_dir" "$path_is_stdin" "$package" "$modules" + done + + log_notice "Suggested dependencies for $name:" + + if [ -z "$suggested" ]; then + suggested="(none)" + fi + IFS="$oifs" + for package in $suggested; do + log_notice " $package" + done + + log_notice "" +} + + +# Find GNU grep + +if ggrep --version 2>&1 | grep -q GNU; then + grep="ggrep" +elif grep --version 2>&1 | grep -q GNU; then + grep="grep" +else + log_error "cannot find GNU grep" + exit "$ex_unavailable" +fi + + +# Process environment variables + +case $PYTHON3_FIND_STDLIB_DEPENDS_LOG_LEVEL in + notice) + log_level="$log_level_notice" + ;; + info) + log_level="$log_level_info" + ;; + debug) + log_level="$log_level_debug" + ;; + *) + log_level="$log_level_default" + ;; +esac + +grep_output_max_count="${PYTHON3_FIND_STDLIB_DEPENDS_MAX_COUNT:-$grep_output_default_max_count}" +grep_output_color_when="${PYTHON3_FIND_STDLIB_DEPENDS_COLOR_WHEN:-$grep_output_default_color_when}" +grep_output_line_prefix="${PYTHON3_FIND_STDLIB_DEPENDS_LINE_PREFIX:-$grep_output_default_line_prefix}" +grep_output_context_num="${PYTHON3_FIND_STDLIB_DEPENDS_CONTEXT_NUM:-$grep_output_default_context_num}" + + +# Process command line options + +while getopts c:hm:n:qvx: OPT; do + case $OPT in + c) + grep_output_color_when="$OPTARG" + ;; + h) + usage + exit 0 + ;; + m) + grep_output_max_count="$OPTARG" + ;; + n) + output_name="$OPTARG" + ;; + q) + log_level="$log_level_notice" + ;; + v) + log_level="$log_level_debug" + ;; + x) + grep_output_context_num="$OPTARG" + ;; + \?) + usage + exit "$ex_usage" + ;; + esac +done + +shift $((OPTIND - 1)) + + +# Set up grep output options + +if can_log_info; then + if [ "$grep_output_color_when" = "auto" ]; then + if [ -t 1 ]; then + grep_output_color_when="always" + else + grep_output_color_when="never" + fi + fi + + if ! can_log_debug && [ "$grep_output_max_count" -gt 0 ]; then + grep_output_options="-m $grep_output_max_count" + + if [ "$grep_output_max_count" -eq 1 ]; then + grep_output_description="max 1 match per file" + else + grep_output_description="max $grep_output_max_count matches per file" + fi + + else + grep_output_description="all matches" + fi + + if [ "$grep_output_context_num" -gt 0 ]; then + grep_output_options="$grep_output_options -C $grep_output_context_num" + + if [ "$grep_output_context_num" -eq 1 ]; then + grep_output_description="$grep_output_description, 1 line of context" + else + grep_output_description="$grep_output_description, $grep_output_context_num lines of context" + fi + fi + + grep_output_options="$grep_output_options --color=$grep_output_color_when $grep_output_line_prefix" + +else + grep_output_options="-q" +fi + + +# Main + +if [ "$#" -gt 0 ]; then + is_first_search=1 + + if [ "$#" -gt 1 ]; then + output_name= + fi + + for path; do + if [ -z "$is_first_search" ]; then + log_info "====" + fi + + if [ -z "$output_name" ]; then + if [ "$path" = "-" ]; then + output_name="$stdin_name" + else + output_name="$path" + fi + fi + + search_path "$path" "$output_name" + + is_first_search= + output_name= + done + +else + search_path "-" "${output_name:-$stdin_name}" +fi diff --git a/lang/python/python3-host.mk b/lang/python/python3-host.mk index 403d0d28..81b0025b 100644 --- a/lang/python/python3-host.mk +++ b/lang/python/python3-host.mk @@ -5,12 +5,9 @@ # See /LICENSE for more information. # -# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile +# Note: include this file after `include $(TOPDIR)/rules.mk in your package Makefile # if `python3-package.mk` is included, this will already be included -ifneq ($(__python3_host_mk_inc),1) -__python3_host_mk_inc=1 - # For PYTHON3_VERSION python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST))) include $(python3_mk_path)python3-version.mk @@ -25,23 +22,7 @@ HOST_PYTHON3_BIN:=$(HOST_PYTHON3_DIR)/bin/python$(PYTHON3_VERSION) HOST_PYTHON3PATH:=$(HOST_PYTHON3_LIB_DIR):$(HOST_PYTHON3_PKG_DIR) -define HostPython3 - if [ "$(strip $(3))" == "HOST" ]; then \ - export PYTHONPATH="$(HOST_PYTHON3PATH)"; \ - export PYTHONDONTWRITEBYTECODE=0; \ - else \ - export PYTHONPATH="$(PYTHON3PATH)"; \ - export PYTHONDONTWRITEBYTECODE=1; \ - export _python_sysroot="$(STAGING_DIR)"; \ - export _python_prefix="/usr"; \ - export _python_exec_prefix="/usr"; \ - fi; \ - export PYTHONOPTIMIZE=""; \ - $(1) \ - $(HOST_PYTHON3_BIN) $(2); -endef - -define host_python3_settings +HOST_PYTHON3_VARS = \ ARCH="$(HOST_ARCH)" \ CC="$(HOSTCC)" \ CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ @@ -51,30 +32,27 @@ define host_python3_settings CFLAGS="$(HOST_CFLAGS)" \ CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \ LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \ - _PYTHON_HOST_PLATFORM=linux2 -endef + _PYTHON_HOST_PLATFORM=linux2 \ + PYTHONPATH="$(HOST_PYTHON3PATH)" \ + PYTHONDONTWRITEBYTECODE=0 \ + PYTHONOPTIMIZE="" -# $(1) => commands to execute before running pythons script +# $(1) => directory of python script # $(2) => python script and its arguments # $(3) => additional variables -define Build/Compile/HostPy3RunHost - $(call HostPython3, \ - $(if $(1),$(1);) \ - $(call host_python3_settings) \ - $(3) \ - , \ - $(2) \ - , \ - HOST \ - ) +define HostPython3/Run + cd "$(if $(strip $(1)),$(strip $(1)),.)" && \ + $(HOST_PYTHON3_VARS) \ + $(3) \ + $(HOST_PYTHON3_BIN) $(2) endef # Note: I shamelessly copied this from Yousong's logic (from python-packages); HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION) # $(1) => packages to install -define Build/Compile/HostPy3PipInstall - $(call host_python3_settings) \ +define HostPython3/PipInstall + $(HOST_PYTHON3_VARS) \ $(HOST_PYTHON3_PIP) \ --disable-pip-version-check \ --cache-dir "$(DL_DIR)/pip-cache" \ @@ -85,11 +63,9 @@ endef # $(1) => build subdir # $(2) => additional arguments to setup.py # $(3) => additional variables -define Build/Compile/HostPy3Mod - $(call Build/Compile/HostPy3RunHost, \ - cd $(HOST_BUILD_DIR)/$(strip $(1)), \ - ./setup.py $(2), \ +define HostPython3/ModSetup + $(call HostPython3/Run, \ + $(HOST_BUILD_DIR)/$(strip $(1)), \ + setup.py $(2), \ $(3)) endef - -endif # __python3_host_mk_inc diff --git a/lang/python/python3-maxminddb/Makefile b/lang/python/python3-maxminddb/Makefile index 7d96da49..e735e1ff 100644 --- a/lang/python/python3-maxminddb/Makefile +++ b/lang/python/python3-maxminddb/Makefile @@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=maxminddb -PKG_VERSION:=1.5.2 +PKG_VERSION:=1.5.4 PKG_RELEASE:=1 PYPI_NAME:=$(PKG_NAME) -PKG_HASH:=d0ce131d901eb11669996b49a59f410efd3da2c6dbe2c0094fe2fef8d85b6336 +PKG_HASH:=f4d28823d9ca23323d113dc7af8db2087aa4f657fafc64ff8f7a8afda871425b PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=Apache-2.0 @@ -30,7 +30,6 @@ define Package/python3-maxminddb TITLE:=Reader for the MaxMind DB format URL:=https://dev.maxmind.com/ DEPENDS:=+python3-light +libmaxminddb - VARIANT:=python3 endef define Package/python3-maxminddb/description diff --git a/lang/python/python3-netifaces/Makefile b/lang/python/python3-netifaces/Makefile index 11f1da33..02fc5c2b 100644 --- a/lang/python/python3-netifaces/Makefile +++ b/lang/python/python3-netifaces/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python3-netifaces PKG_VERSION:=0.10.9 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=netifaces PKG_HASH:=2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3 @@ -29,7 +29,6 @@ define Package/python3-netifaces TITLE:=Portable network interface information URL:=https://github.com/al45tair/netifaces DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-netifaces/description diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk index d20d1980..fdf2cb0a 100644 --- a/lang/python/python3-package.mk +++ b/lang/python/python3-package.mk @@ -5,12 +5,12 @@ # See /LICENSE for more information. # -# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile +# Note: include this file after `include $(TOPDIR)/rules.mk in your package Makefile + python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST))) include $(python3_mk_path)python3-host.mk PYTHON3_DIR:=$(STAGING_DIR)/usr -PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin PYTHON3_INC_DIR:=$(PYTHON3_DIR)/include/python$(PYTHON3_VERSION) PYTHON3_LIB_DIR:=$(PYTHON3_DIR)/lib/python$(PYTHON3_VERSION) @@ -27,19 +27,106 @@ CONFIGURE_ARGS += \ _python_prefix="/usr" \ _python_exec_prefix="/usr" -PKG_USE_MIPS16:=0 -# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16 -# flags are inherited from the Python base package (via sysconfig module) -ifdef CONFIG_USE_MIPS16 - TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16 -endif +PYTHON3_VARS = \ + CC="$(TARGET_CC)" \ + CCSHARED="$(TARGET_CC) $(FPIC)" \ + CXX="$(TARGET_CXX)" \ + LD="$(TARGET_CC)" \ + LDSHARED="$(TARGET_CC) -shared" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON3_VERSION)" \ + _PYTHON_HOST_PLATFORM=linux2 \ + __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \ + PYTHONPATH="$(PYTHON3PATH)" \ + PYTHONDONTWRITEBYTECODE=1 \ + PYTHONOPTIMIZE="" \ + _python_sysroot="$(STAGING_DIR)" \ + _python_prefix="/usr" \ + _python_exec_prefix="/usr" -define Py3Shebang -$(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python3," -i --follow-symlinks $(1) +# $(1) => directory of python script +# $(2) => python script and its arguments +# $(3) => additional variables +define Python3/Run + cd "$(if $(strip $(1)),$(strip $(1)),.)" && \ + $(PYTHON3_VARS) \ + $(3) \ + $(HOST_PYTHON3_BIN) $(2) +endef + +# $(1) => build subdir +# $(2) => additional arguments to setup.py +# $(3) => additional variables +define Python3/ModSetup + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) + $(call Python3/Run, \ + $(PKG_BUILD_DIR)/$(strip $(1)), \ + setup.py $(2), \ + $(3)) +endef + +define Python3/FixShebang + $(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python3," -i --follow-symlinks $(1) +endef + +# default max recursion is 10 +PYTHON3_COMPILEALL_MAX_RECURSION_LEVEL:=20 + +# $(1) => directory of python source files to compile +# +# XXX [So that you won't goof as I did] +# Note: Yes, I tried to use the -O & -OO flags here. +# However the generated byte-codes were not portable. +# So, we just stuck to un-optimized byte-codes, +# which is still way better/faster than running +# Python sources all the time. +# +# Setting a fixed hash seed value is less secure than using +# random seed values, but is necessary for reproducible builds +# (for now). +# +# Should revisit this when https://bugs.python.org/issue37596 +# (and other related reproducibility issues) are fixed. +define Python3/CompileAll + $(call Python3/Run,, \ + -m compileall -r "$(PYTHON3_COMPILEALL_MAX_RECURSION_LEVEL)" -b -d '/' $(1), + $(if $(SOURCE_DATE_EPOCH),PYTHONHASHSEED="$(SOURCE_DATE_EPOCH)") + ) +endef + +# $(1) => target directory +define Python3/DeleteSourceFiles + $(FIND) $(1) -type f -name '*.py' -delete +endef + +# $(1) => target directory +define Python3/DeleteNonSourceFiles + $(FIND) $(1) -not -type d -not -name '*.py' -delete +endef + +# $(1) => target directory +define Python3/DeleteEmptyDirs + $(FIND) $(1) -mindepth 1 -empty -type d -not -path '$(1)/CONTROL' -not -path '$(1)/CONTROL/*' -delete +endef + + +# Py3Package + +define Py3Package/filespec/Default ++|$(PYTHON3_PKG_DIR) +endef + +# $(1) => package name +# $(2) => src directory +# $(3) => dest directory +define Py3Package/ProcessFilespec + $(eval $(call shexport,Py3Package/$(1)/filespec)) + $(SHELL) $(python3_mk_path)python-package-install.sh \ + "$(2)" "$(3)" "$$$$$(call shvar,Py3Package/$(1)/filespec)" endef define Py3Package - define Package/$(1)-src $(call Package/$(1)) DEPENDS:= @@ -52,89 +139,68 @@ define Py3Package endef define Package/$(1)-src/description - $(call Package/$(1)/description). - (Contains the Python3 sources for this package). + $$(call Package/$(1)/description) + + This package contains the Python source files for $(1). + endef + + define Package/$(1)-src/config + depends on PACKAGE_$(1) endef # Add default PyPackage filespec none defined - ifndef Py3Package/$(1)/filespec - define Py3Package/$(1)/filespec - +|$(PYTHON3_PKG_DIR) - endef + ifeq ($(origin Py3Package/$(1)/filespec),undefined) + Py3Package/$(1)/filespec=$$(Py3Package/filespec/Default) endif ifndef Py3Package/$(1)/install define Py3Package/$(1)/install - if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \ - $(INSTALL_DIR) $$(1)/usr/bin ; \ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ ; \ - fi + if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \ + $(INSTALL_DIR) $$(1)/usr/bin ; \ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ ; \ + fi endef endif ifndef Package/$(1)/install - $(call shexport,Py3Package/$(1)/filespec) - - define Package/$(1)/install + define Package/$(1)/install $$(call Py3Package/$(1)/install,$$(1)) - $(SHELL) $(python3_mk_path)python-package-install.sh "3" \ - "$(PKG_INSTALL_DIR)" "$$(1)" \ - "$(HOST_PYTHON3_BIN)" "$$(2)" \ - "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" && \ - if [ -d "$$(1)/usr/bin" ]; then \ - $(call Py3Shebang,$$(1)/usr/bin/*) ; \ + $$(call Py3Package/ProcessFilespec,$(1),$(PKG_INSTALL_DIR),$$(1)) + $(FIND) $$(1) -name '*.exe' -delete + $$(call Python3/CompileAll,$$(1)) + $$(call Python3/DeleteSourceFiles,$$(1)) + $$(call Python3/DeleteEmptyDirs,$$(1)) + if [ -d "$$(1)/usr/bin" ]; then \ + $$(call Python3/FixShebang,$$(1)/usr/bin/*) ; \ fi - endef + endef - define Package/$(1)-src/install - $$(call Package/$(1)/install,$$(1),sources) - endef + define Package/$(1)-src/install + $$(call Py3Package/$(1)/install,$$(1)) + $$(call Py3Package/ProcessFilespec,$(1),$(PKG_INSTALL_DIR),$$(1)) + $$(call Python3/DeleteNonSourceFiles,$$(1)) + $$(call Python3/DeleteEmptyDirs,$$(1)) + endef endif # Package/$(1)/install endef -# $(1) => commands to execute before running pythons script -# $(2) => python script and its arguments -# $(3) => additional variables -define Build/Compile/HostPy3RunTarget - $(call HostPython3, \ - $(if $(1),$(1);) \ - CC="$(TARGET_CC)" \ - CCSHARED="$(TARGET_CC) $(FPIC)" \ - CXX="$(TARGET_CXX)" \ - LD="$(TARGET_CC)" \ - LDSHARED="$(TARGET_CC) -shared" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR)" \ - LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON3_VERSION)" \ - _PYTHON_HOST_PLATFORM=linux2 \ - __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \ - $(3) \ - , \ - $(2) \ - ) -endef -# $(1) => build subdir -# $(2) => additional arguments to setup.py -# $(3) => additional variables -define Build/Compile/Py3Mod - $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) - $(call Build/Compile/HostPy3RunTarget, \ - cd $(PKG_BUILD_DIR)/$(strip $(1)), \ - ./setup.py $(2), \ - $(3)) -endef +# Py3Build PYTHON3_PKG_SETUP_DIR ?= -PYTHON3_PKG_SETUP_GLOABL_ARGS ?= +PYTHON3_PKG_SETUP_GLOBAL_ARGS ?= PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed PYTHON3_PKG_SETUP_VARS ?= +define Py3Build/FindStdlibDepends + $(SHELL) $(python3_mk_path)python3-find-stdlib-depends.sh -n "$(PKG_NAME)" "$(PKG_BUILD_DIR)" +endef + define Py3Build/Compile/Default $(if $(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS), - $(call Build/Compile/HostPy3PipInstall,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS)) + $(call HostPython3/PipInstall,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS)) ) - $(call Build/Compile/Py3Mod, \ + $(call Python3/ModSetup, \ $(PYTHON3_PKG_SETUP_DIR), \ $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \ install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ @@ -143,10 +209,14 @@ define Py3Build/Compile/Default ) endef +Py3Build/Configure=$(Py3Build/Configure/Default) Py3Build/Compile=$(Py3Build/Compile/Default) -ifeq ($(BUILD_VARIANT),python3) -define Build/Compile - $(call Py3Build/Compile) -endef -endif # python3 +PYTHON3_PKG_BUILD ?= 1 + +ifeq ($(strip $(PYTHON3_PKG_BUILD)),1) + ifeq ($(PY3),stdlib) + Hooks/Configure/Post+=Py3Build/FindStdlibDepends + endif + Build/Compile=$(Py3Build/Compile) +endif diff --git a/lang/python/python3-packages/Makefile b/lang/python/python3-packages/Makefile index e3c8f622..b1b37dac 100644 --- a/lang/python/python3-packages/Makefile +++ b/lang/python/python3-packages/Makefile @@ -101,13 +101,13 @@ HOST_PYTHON3_PIP_INSTALL_CLEANUP:=$(call HOST_PYTHON3_PIP_INSTALL,$(PKG_INSTALL_ define Build/Compile $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-host), - $(call Build/Compile/HostPy3RunHost,,$(HOST_PYTHON3_PIP_INSTALL_HOST) $(pkg)) + $(call HostPython3/Run,,$(HOST_PYTHON3_PIP_INSTALL_HOST) $(pkg)) ) $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list), - $(call Build/Compile/HostPy3RunTarget,,$(call HOST_PYTHON3_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs)) + $(call Python3/Run,,$(call HOST_PYTHON3_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs)) ) $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-cleanup), - $(call Build/Compile/HostPy3RunTarget,,$(HOST_PYTHON3_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs)) + $(call Python3/Run,,$(HOST_PYTHON3_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs)) ) endef diff --git a/lang/python/python3-pyroute2/Makefile b/lang/python/python3-pyroute2/Makefile index 9430655f..4e08314d 100644 --- a/lang/python/python3-pyroute2/Makefile +++ b/lang/python/python3-pyroute2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python3-pyroute2 PKG_VERSION:=0.5.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=pyroute2 PKG_HASH:=963fce07da2841456d39e3b932b071f6de28d23dadfae014022d67a752916f98 @@ -35,7 +35,6 @@ define Package/python3-pyroute2 +python3-multiprocessing \ +python3-sqlite3 \ +python3-ctypes - VARIANT:=python3 endef define Package/python3-pyroute2/description diff --git a/lang/python/python3-speedtest-cli/Makefile b/lang/python/python3-speedtest-cli/Makefile index ec531164..9c87f8b4 100644 --- a/lang/python/python3-speedtest-cli/Makefile +++ b/lang/python/python3-speedtest-cli/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python3-speedtest-cli PKG_VERSION:=2.1.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=speedtest-cli PKG_HASH:=cf1d386222f94c324e3125ba9a0d187e46d4a13dca08c023bdb9a23096be2e54 @@ -23,7 +23,6 @@ define Package/python3-speedtest-cli URL:=https://github.com/sivel/speedtest-cli DEPENDS:=+python3-light +python3-pkg-resources +python3-xml +python3-email \ +python3-urllib +python3-codecs +python3-openssl - VARIANT:=python3 endef define Package/python3-speedtest-cli/description diff --git a/lang/python/python3-sqlparse/Makefile b/lang/python/python3-sqlparse/Makefile index c7d38625..508e0a50 100644 --- a/lang/python/python3-sqlparse/Makefile +++ b/lang/python/python3-sqlparse/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sqlparse PKG_VERSION:=0.3.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=sqlparse PKG_HASH:=e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548 @@ -22,7 +22,6 @@ define Package/python3-sqlparse TITLE:=Non-validating SQL parser module. URL:=https://github.com/andialbrecht/sqlparse DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python3-sqlparse/description diff --git a/lang/python/python3-unidecode/Makefile b/lang/python/python3-unidecode/Makefile index 044990f8..30265718 100644 --- a/lang/python/python3-unidecode/Makefile +++ b/lang/python/python3-unidecode/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python3-unidecode PKG_VERSION:=1.1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=Unidecode PKG_HASH:=2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8 @@ -29,7 +29,6 @@ define Package/python3-unidecode TITLE:=ASCII transliterations of Unicode text URL:=https://github.com/avian2/unidecode DEPENDS:=+python3-light - VARIANT:=python3 endef define Package/python-unidecode/description diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index 120c0837..e8f8fba0 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -8,12 +8,12 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MINOR:=8 -PYTHON3_VERSION_MICRO:=2 +PYTHON3_VERSION_MICRO:=3 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) -PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 -PYTHON3_PIP_PKG_RELEASE:=1 +PYTHON3_SETUPTOOLS_PKG_RELEASE:=3 +PYTHON3_PIP_PKG_RELEASE:=4 PYTHON3_SETUPTOOLS_VERSION:=41.2.0 PYTHON3_PIP_VERSION:=19.2.3 diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index b47530bf..87c40184 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -7,19 +7,16 @@ include $(TOPDIR)/rules.mk -# The file included below defines PYTHON_VERSION +# The file included below defines PYTHON3_VERSION include ../python3-version.mk -PYTHON_VERSION:=$(PYTHON3_VERSION) -PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO) - PKG_NAME:=python3 -PKG_RELEASE:=1 -PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) +PKG_RELEASE:=2 +PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=2646e7dc233362f59714c6193017bb2d6f7b38d6ab4a0cb5fbac5c36c4d845df +PKG_HASH:=dfab5ec723c218082fe3d5d7ae17ecbdebffa9a1aea4d64aa3a2ecdd2e795864 PKG_MAINTAINER:=Alexandru Ardelean , Jeffery To PKG_LICENSE:=Python/2.0 @@ -30,6 +27,7 @@ PKG_CPE_ID:=cpe:/a:python:python include ../python3-host.mk # For Py3Package +PYTHON3_PKG_BUILD:=0 include ../python3-package.mk PKG_FIXUP:=autoreconf @@ -55,7 +53,7 @@ define Package/python3/Default SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - TITLE:=Python $(PYTHON_VERSION) programming language + TITLE:=Python $(PYTHON3_VERSION) programming language URL:=https://www.python.org/ endef @@ -70,7 +68,7 @@ endef define Package/python3-base $(call Package/python3/Default) - TITLE:=Python $(PYTHON_VERSION) interpreter + TITLE:=Python $(PYTHON3_VERSION) interpreter DEPENDS:=+libpthread +zlib endef @@ -81,7 +79,7 @@ endef define Package/python3-light $(call Package/python3/Default) - TITLE:=Python $(PYTHON_VERSION) light installation + TITLE:=Python $(PYTHON3_VERSION) light installation DEPENDS:=+python3-base +libffi +libbz2 +PYTHON3_BLUETOOTH_SUPPORT:bluez-libs +libuuid endef @@ -108,8 +106,8 @@ define Py3BasePackage define Py3Package/$(1)/filespec ifneq ($(2),) $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file))) - -|/usr/lib/python$(PYTHON_VERSION)/*/test - -|/usr/lib/python$(PYTHON_VERSION)/*/tests + -|/usr/lib/python$(PYTHON3_VERSION)/*/test + -|/usr/lib/python$(PYTHON3_VERSION)/*/tests endif endef Py3Package/$(1)/install?=: @@ -127,6 +125,9 @@ define Package/python3/description It's python3-light + all other packages. endef +TARGET_CONFIGURE_OPTS+= \ + READELF="$(TARGET_CROSS)readelf" + MAKE_FLAGS+=\ CROSS_COMPILE=yes \ LD="$(TARGET_CC)" @@ -136,15 +137,10 @@ EXTRA_CFLAGS+= \ EXTRA_LDFLAGS+= \ -L$(PKG_BUILD_DIR) -ENABLE_IPV6:= -ifeq ($(CONFIG_IPV6),y) - ENABLE_IPV6 += --enable-ipv6 -endif - PYTHON_FOR_BUILD:= \ _PYTHON_PROJECT_BASE=$(PKG_BUILD_DIR) \ _PYTHON_HOST_PLATFORM=linux2 \ - PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON_VERSION)" \ + PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON3_VERSION)" \ _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \ $(HOST_PYTHON3_BIN) @@ -153,18 +149,18 @@ DISABLE_BLUETOOTH:= \ ac_cv_header_bluetooth_h=no CONFIGURE_ARGS+= \ - --sysconfdir=/etc \ + --enable-optimizations \ --enable-shared \ - --without-cxx-main \ - --with-threads \ --with-system-ffi \ - --with-ensurepip=no \ + --without-cxx-main \ + --without-ensurepip \ --without-pymalloc \ - $(if $(CONFIG_PYTHON3_BLUETOOTH_SUPPORT),,$(DISABLE_BLUETOOTH)) \ - PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \ - $(ENABLE_IPV6) \ + $(if $(CONFIG_IPV6),--enable-ipv6) \ + $(if $(findstring mips,$(CONFIG_ARCH)),,--with-lto) \ CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \ - OPT="$(TARGET_CFLAGS)" + OPT="$(TARGET_CFLAGS)" \ + PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \ + $(if $(CONFIG_PYTHON3_BLUETOOTH_SUPPORT),,$(DISABLE_BLUETOOTH)) define Build/Prepare $(call Build/Prepare/Default) @@ -218,71 +214,75 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig $(INSTALL_DIR) $(2)/bin $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ + $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON3_VERSION) \ $(1)/usr/include/ $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \ - $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION) \ + $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON3_VERSION).so* \ $(1)/usr/lib/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \ $(1)/usr/lib/pkgconfig $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \ + $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON3_VERSION)-config \ $(2)/bin/ $(SED) \ 's|^prefix_real=.*$$$$|prefix_real="$(PYTHON3_DIR)"|' \ - $(2)/bin/python$(PYTHON_VERSION)-config + $(2)/bin/python$(PYTHON3_VERSION)-config endef PYTHON3_BASE_LIB_FILES:= \ - /usr/lib/python$(PYTHON_VERSION)/encodings \ - /usr/lib/python$(PYTHON_VERSION)/_collections_abc.py \ - /usr/lib/python$(PYTHON_VERSION)/_sitebuiltins.py \ - /usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \ - /usr/lib/python$(PYTHON_VERSION)/_weakrefset.py \ - /usr/lib/python$(PYTHON_VERSION)/abc.py \ - /usr/lib/python$(PYTHON_VERSION)/codecs.py \ - /usr/lib/python$(PYTHON_VERSION)/genericpath.py \ - /usr/lib/python$(PYTHON_VERSION)/io.py \ - /usr/lib/python$(PYTHON_VERSION)/os.py \ - /usr/lib/python$(PYTHON_VERSION)/posixpath.py \ - /usr/lib/python$(PYTHON_VERSION)/site.py \ - /usr/lib/python$(PYTHON_VERSION)/sysconfig.py \ - /usr/lib/python$(PYTHON_VERSION)/stat.py + /usr/lib/python$(PYTHON3_VERSION)/encodings \ + /usr/lib/python$(PYTHON3_VERSION)/_collections_abc.py \ + /usr/lib/python$(PYTHON3_VERSION)/_sitebuiltins.py \ + /usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py \ + /usr/lib/python$(PYTHON3_VERSION)/_weakrefset.py \ + /usr/lib/python$(PYTHON3_VERSION)/abc.py \ + /usr/lib/python$(PYTHON3_VERSION)/codecs.py \ + /usr/lib/python$(PYTHON3_VERSION)/genericpath.py \ + /usr/lib/python$(PYTHON3_VERSION)/io.py \ + /usr/lib/python$(PYTHON3_VERSION)/os.py \ + /usr/lib/python$(PYTHON3_VERSION)/posixpath.py \ + /usr/lib/python$(PYTHON3_VERSION)/site.py \ + /usr/lib/python$(PYTHON3_VERSION)/sysconfig.py \ + /usr/lib/python$(PYTHON3_VERSION)/stat.py PYTHON3_LIB_FILES_DEL+=$(PYTHON3_BASE_LIB_FILES) define Py3Package/python3-base/filespec -+|/usr/bin/python$(PYTHON_VERSION) ++|/usr/bin/python$(PYTHON3_VERSION) $(subst $(space),$(newline),$(foreach lib_file,$(PYTHON3_BASE_LIB_FILES),+|$(lib_file))) endef define Py3Package/python3-light/filespec -+|/usr/lib/python$(PYTHON_VERSION) --|/usr/lib/python$(PYTHON_VERSION)/distutils/cygwinccompiler.py --|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst* --|/usr/lib/python$(PYTHON_VERSION)/ensurepip --|/usr/lib/python$(PYTHON_VERSION)/idlelib --|/usr/lib/python$(PYTHON_VERSION)/tkinter --|/usr/lib/python$(PYTHON_VERSION)/turtledemo --|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_test*.so --|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline*.so --|/usr/lib/python$(PYTHON_VERSION)/pdb.doc --|/usr/lib/python$(PYTHON_VERSION)/test --|/usr/lib/python$(PYTHON_VERSION)/webbrowser.py --|/usr/lib/python$(PYTHON_VERSION)/*/test --|/usr/lib/python$(PYTHON_VERSION)/*/tests --|/usr/lib/python$(PYTHON_VERSION)/_osx_support.py ++|/usr/lib/python$(PYTHON3_VERSION) +-|/usr/lib/python$(PYTHON3_VERSION)/distutils/cygwinccompiler.py +-|/usr/lib/python$(PYTHON3_VERSION)/distutils/command/wininst* +-|/usr/lib/python$(PYTHON3_VERSION)/ensurepip +-|/usr/lib/python$(PYTHON3_VERSION)/idlelib +-|/usr/lib/python$(PYTHON3_VERSION)/tkinter +-|/usr/lib/python$(PYTHON3_VERSION)/turtledemo +-|/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_test*.so +-|/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/readline*.so +-|/usr/lib/python$(PYTHON3_VERSION)/pdb.doc +-|/usr/lib/python$(PYTHON3_VERSION)/test +-|/usr/lib/python$(PYTHON3_VERSION)/webbrowser.py +-|/usr/lib/python$(PYTHON3_VERSION)/*/test +-|/usr/lib/python$(PYTHON3_VERSION)/*/tests +-|/usr/lib/python$(PYTHON3_VERSION)/_osx_support.py $(subst $(space),$(newline),$(foreach lib_file,$(PYTHON3_LIB_FILES_DEL),-|$(lib_file))) endef define Py3Package/python3-base/install # Adding the lib-dynload folder (even just empty) suppresses 2 warnings when starting Python - $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/lib-dynload/ + $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/lib-dynload/ $(INSTALL_DIR) $(1)/usr/bin - $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python3 - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/ + $(LN) python$(PYTHON3_VERSION) $(1)/usr/bin/python3 + $(LN) python$(PYTHON3_VERSION) $(1)/usr/bin/python + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON3_VERSION).so* $(1)/usr/lib/ + # This depends on being called before filespec is processed + $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py endef Py3Package/python3-light/install:=: @@ -306,13 +306,11 @@ HOST_CONFIGURE_VARS += \ endif HOST_CONFIGURE_ARGS+= \ + --enable-optimizations \ + --with-ensurepip=upgrade \ + --with-system-expat=$(STAGING_DIR_HOSTPKG) \ --without-cxx-main \ --without-pymalloc \ - --with-threads \ - --prefix=$(HOST_PYTHON3_DIR) \ - --exec-prefix=$(HOST_PYTHON3_DIR) \ - --with-system-expat=$(STAGING_DIR_HOSTPKG) \ - --with-ensurepip=upgrade \ CONFIG_SITE= define Host/Configure diff --git a/lang/python/python3/files/python3-package-dev.mk b/lang/python/python3/files/python3-package-dev.mk index 642bb0b5..e43ba523 100644 --- a/lang/python/python3/files/python3-package-dev.mk +++ b/lang/python/python3/files/python3-package-dev.mk @@ -15,12 +15,16 @@ define Py3Package/python3-dev/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON3_VERSION)-config $(1)/usr/bin $(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python3-config - $(LN) python$(PYTHON_VERSION)/config-$(PYTHON_VERSION)/libpython$(PYTHON3_VERSION).a $(1)/usr/lib/ + $(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python-config + $(LN) python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/libpython$(PYTHON3_VERSION).a $(1)/usr/lib/ + # This depends on being called before filespec is processed + $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile endef $(eval $(call Py3BasePackage,python3-dev, \ - /usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \ - /usr/include/python$(PYTHON_VERSION) \ + /usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION) \ + /usr/include/python$(PYTHON3_VERSION) \ /usr/lib/pkgconfig \ , \ DO_NOT_ADD_TO_PACKAGE_DEPENDS \ diff --git a/lang/python/python3/files/python3-package-openssl.mk b/lang/python/python3/files/python3-package-openssl.mk index 6971993f..4d13afd2 100644 --- a/lang/python/python3/files/python3-package-openssl.mk +++ b/lang/python/python3/files/python3-package-openssl.mk @@ -8,7 +8,7 @@ define Package/python3-openssl $(call Package/python3/Default) TITLE:=Python $(PYTHON3_VERSION) SSL module - DEPENDS:=+python3-light +libopenssl + DEPENDS:=+python3-light +libopenssl +ca-certs endef $(eval $(call Py3BasePackage,python3-openssl, \ diff --git a/lang/python/python3/files/python3-package-pip.mk b/lang/python/python3/files/python3-package-pip.mk index a27d40a4..8b547cee 100644 --- a/lang/python/python3/files/python3-package-pip.mk +++ b/lang/python/python3/files/python3-package-pip.mk @@ -17,7 +17,9 @@ endef define Py3Package/python3-pip/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages - $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/pip3* $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/pip$(PYTHON3_VERSION) $(1)/usr/bin + $(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip3 + $(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip $(CP) \ $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip \ $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip-$(PYTHON3_PIP_VERSION).dist-info \ diff --git a/lang/python/python3/files/python3-package-setuptools.mk b/lang/python/python3/files/python3-package-setuptools.mk index 64a86b81..4e5a7572 100644 --- a/lang/python/python3/files/python3-package-setuptools.mk +++ b/lang/python/python3/files/python3-package-setuptools.mk @@ -19,11 +19,15 @@ define Py3Package/python3-setuptools/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages $(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/easy_install-* $(1)/usr/bin $(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3 + $(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install $(CP) \ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \ $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages + $(CP) \ + $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools/site-patch.py \ + $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools/site-patch.py.txt find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete endef diff --git a/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch b/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch new file mode 100644 index 00000000..c284f011 --- /dev/null +++ b/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch @@ -0,0 +1,13 @@ +diff -Nurp a/pip/_vendor/pep517/wrappers.py b/pip/_vendor/pep517/wrappers.py +--- a/pip/_vendor/pep517/wrappers.py 2019-07-30 20:02:13.000000000 +0800 ++++ b/pip/_vendor/pep517/wrappers.py 2020-04-24 17:23:35.764905235 +0800 +@@ -10,6 +10,9 @@ from . import compat + + _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py') + ++if not os.path.isfile(_in_proc_script): ++ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc') ++ + + @contextmanager + def tempdir(): diff --git a/lang/python/python3/patches-setuptools/004-site-patch.patch b/lang/python/python3/patches-setuptools/004-site-patch.patch new file mode 100644 index 00000000..39b8c902 --- /dev/null +++ b/lang/python/python3/patches-setuptools/004-site-patch.patch @@ -0,0 +1,14 @@ +--- a/setuptools/command/easy_install.py ++++ b/setuptools/command/easy_install.py +@@ -1315,7 +1315,10 @@ class easy_install(Command): + return # already did it, or don't need to + + sitepy = os.path.join(self.install_dir, "site.py") +- source = resource_string("setuptools", "site-patch.py") ++ try: ++ source = resource_string("setuptools", "site-patch.py") ++ except FileNotFoundError: ++ source = resource_string("setuptools", "site-patch.py.txt") + source = source.decode('utf-8') + current = "" + diff --git a/lang/python/python3/patches/004-do-not-write-bytes-codes.patch b/lang/python/python3/patches/004-do-not-write-bytes-codes.patch index a67f5533..c0d78f4b 100644 --- a/lang/python/python3/patches/004-do-not-write-bytes-codes.patch +++ b/lang/python/python3/patches/004-do-not-write-bytes-codes.patch @@ -1,6 +1,6 @@ --- a/Python/initconfig.c +++ b/Python/initconfig.c -@@ -120,7 +120,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo +@@ -152,7 +152,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */ int Py_FrozenFlag = 0; /* Needed by getpath.c */ int Py_IgnoreEnvironmentFlag = 0; /* e.g. PYTHONPATH, PYTHONHOME */ diff --git a/lang/python/python3/patches/014-remove-platform-so-suffix.patch b/lang/python/python3/patches/014-remove-platform-so-suffix.patch index cc6a8511..aff0cec5 100644 --- a/lang/python/python3/patches/014-remove-platform-so-suffix.patch +++ b/lang/python/python3/patches/014-remove-platform-so-suffix.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -15142,7 +15142,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; +@@ -15174,7 +15174,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; $as_echo "$ABIFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 $as_echo_n "checking SOABI... " >&6; } @@ -11,7 +11,7 @@ --- a/configure.ac +++ b/configure.ac -@@ -4633,7 +4633,7 @@ AC_SUBST(SOABI) +@@ -4654,7 +4654,7 @@ AC_SUBST(SOABI) AC_MSG_CHECKING(ABIFLAGS) AC_MSG_RESULT($ABIFLAGS) AC_MSG_CHECKING(SOABI) diff --git a/lang/python/python3/patches/016-adjust-config-paths.patch b/lang/python/python3/patches/016-adjust-config-paths.patch index b8ea6ccf..849346dc 100644 --- a/lang/python/python3/patches/016-adjust-config-paths.patch +++ b/lang/python/python3/patches/016-adjust-config-paths.patch @@ -40,7 +40,7 @@ # Here are a couple of targets for MacOSX again, to install a full --- a/configure +++ b/configure -@@ -15181,7 +15181,7 @@ else +@@ -15213,7 +15213,7 @@ else fi @@ -51,7 +51,7 @@ LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" --- a/configure.ac +++ b/configure.ac -@@ -4667,7 +4667,7 @@ fi +@@ -4688,7 +4688,7 @@ fi dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) diff --git a/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch b/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch index 1edd215d..5cd1b94d 100644 --- a/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch +++ b/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch @@ -11,9 +11,6 @@ SSL_CTX_set_min/max_proto_version(). 2 files changed, 108 insertions(+), 30 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst -diff --git a/Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst b/Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst -new file mode 100644 -index 000000000000..e0a08464a1e1 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst @@ -0,0 +1,4 @@ @@ -21,11 +18,9 @@ index 000000000000..e0a08464a1e1 +1.1.0. The version specific TLS methods are emulated with TLS_method() plus +SSL_CTX_set_min/max_proto_version(). Pseudo random numbers are generated +with RAND_bytes(). -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index f50823e6947a..827026e3bf5c 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c -@@ -45,14 +45,6 @@ static PySocketModule_APIObject PySocketModule; +@@ -45,14 +45,6 @@ static PySocketModule_APIObject PySocket #include #endif @@ -48,7 +43,7 @@ index f50823e6947a..827026e3bf5c 100644 #define TLS_method SSLv23_method #define TLS_client_method SSLv23_client_method #define TLS_server_method SSLv23_server_method -@@ -896,7 +889,7 @@ _ssl_configure_hostname(PySSLSocket *self, const char* server_hostname) +@@ -896,7 +889,7 @@ _ssl_configure_hostname(PySSLSocket *sel goto error; } } else { @@ -57,7 +52,7 @@ index f50823e6947a..827026e3bf5c 100644 ASN1_STRING_length(ip))) { _setSSLError(NULL, 0, __FILE__, __LINE__); goto error; -@@ -1372,8 +1365,9 @@ _get_peer_alt_names (X509 *certificate) { +@@ -1372,8 +1365,9 @@ _get_peer_alt_names (X509 *certificate) goto fail; } PyTuple_SET_ITEM(t, 0, v); @@ -69,7 +64,7 @@ index f50823e6947a..827026e3bf5c 100644 if (v == NULL) { Py_DECREF(t); goto fail; -@@ -3031,44 +3025,124 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) +@@ -3078,44 +3072,124 @@ _ssl__SSLContext_impl(PyTypeObject *type long options; SSL_CTX *ctx = NULL; X509_VERIFY_PARAM *params; @@ -212,7 +207,7 @@ index f50823e6947a..827026e3bf5c 100644 _setSSLError(NULL, 0, __FILE__, __LINE__); return NULL; } -@@ -5241,7 +5315,7 @@ PySSL_RAND(int len, int pseudo) +@@ -5288,7 +5362,7 @@ PySSL_RAND(int len, int pseudo) if (bytes == NULL) return NULL; if (pseudo) { diff --git a/lang/python/python3/patches/021-openssl-deprecated.patch b/lang/python/python3/patches/021-openssl-deprecated.patch index f73ce80c..4dd33f62 100644 --- a/lang/python/python3/patches/021-openssl-deprecated.patch +++ b/lang/python/python3/patches/021-openssl-deprecated.patch @@ -1,6 +1,6 @@ --- a/Modules/_ssl.c +++ b/Modules/_ssl.c -@@ -201,6 +202,11 @@ static void _PySSLFixErrno(void) { +@@ -201,6 +201,11 @@ static void _PySSLFixErrno(void) { #define TLS_method SSLv23_method #define TLS_client_method SSLv23_client_method #define TLS_server_method SSLv23_server_method @@ -12,7 +12,7 @@ static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne) { -@@ -1677,7 +1683,7 @@ _decode_certificate(X509 *certificate) { +@@ -1724,7 +1729,7 @@ _decode_certificate(X509 *certificate) { Py_DECREF(sn_obj); (void) BIO_reset(biobuf); @@ -21,7 +21,7 @@ ASN1_TIME_print(biobuf, notBefore); len = BIO_gets(biobuf, buf, sizeof(buf)-1); if (len < 0) { -@@ -1694,7 +1700,7 @@ _decode_certificate(X509 *certificate) { +@@ -1741,7 +1746,7 @@ _decode_certificate(X509 *certificate) { Py_DECREF(pnotBefore); (void) BIO_reset(biobuf); @@ -30,7 +30,7 @@ ASN1_TIME_print(biobuf, notAfter); len = BIO_gets(biobuf, buf, sizeof(buf)-1); if (len < 0) { -@@ -3235,7 +3241,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) +@@ -3282,7 +3287,7 @@ _ssl__SSLContext_impl(PyTypeObject *type conservative and assume it wasn't fixed until release. We do this check at runtime to avoid problems from the dynamic linker. See #25672 for more on this. */ @@ -39,7 +39,7 @@ if (!(libver >= 0x10001000UL && libver < 0x1000108fUL) && !(libver >= 0x10000000UL && libver < 0x100000dfUL)) { SSL_CTX_set_mode(self->ctx, SSL_MODE_RELEASE_BUFFERS); -@@ -6403,10 +6409,10 @@ PyInit__ssl(void) +@@ -6450,10 +6455,10 @@ PyInit__ssl(void) return NULL; /* OpenSSL version */ @@ -52,7 +52,7 @@ r = PyLong_FromUnsignedLong(libver); if (r == NULL) return NULL; -@@ -6416,7 +6422,7 @@ PyInit__ssl(void) +@@ -6463,7 +6468,7 @@ PyInit__ssl(void) r = Py_BuildValue("IIIII", major, minor, fix, patch, status); if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION_INFO", r)) return NULL; diff --git a/lang/python/ruamel-yaml/Makefile b/lang/python/ruamel-yaml/Makefile index bf8119f6..389ce7d7 100644 --- a/lang/python/ruamel-yaml/Makefile +++ b/lang/python/ruamel-yaml/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruamel-yaml PKG_VERSION:=0.15.100 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=ruamel.yaml PKG_HASH:=8e42f3067a59e819935a2926e247170ed93c8f0b2ab64526f888e026854db2e4 @@ -20,45 +20,22 @@ PKG_LICENSE_FILES:=LICENSE include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/ruamel-yaml/Default +define Package/python3-ruamel-yaml SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=YAML 1.2 loader/dumper package for Python URL:=https://bitbucket.org/ruamel/yaml -endef - -define Package/python-ruamel-yaml -$(call Package/ruamel-yaml/Default) DEPENDS:= \ - +PACKAGE_python-ruamel-yaml:python-light - VARIANT:=python -endef - -define Package/python3-ruamel-yaml -$(call Package/ruamel-yaml/Default) - DEPENDS:= \ - +PACKAGE_python3-ruamel-yaml:python3-light - VARIANT:=python3 -endef - -define Package/ruamel-yaml/description -ruamel-yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order + +python3-light endef define Package/python3-ruamel-yaml/description -$(call Package/ruamel-yaml/description) -. -(Variant for Python3) +ruamel-yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order endef -$(eval $(call PyPackage,python-ruamel-yaml)) -$(eval $(call BuildPackage,python-ruamel-yaml)) -$(eval $(call BuildPackage,python-ruamel-yaml-src)) - $(eval $(call Py3Package,python3-ruamel-yaml)) $(eval $(call BuildPackage,python3-ruamel-yaml)) $(eval $(call BuildPackage,python3-ruamel-yaml-src)) diff --git a/lang/python/text-unidecode/Makefile b/lang/python/text-unidecode/Makefile index cb351c53..e77108f4 100644 --- a/lang/python/text-unidecode/Makefile +++ b/lang/python/text-unidecode/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-text-unidecode PKG_VERSION:=1.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=text-unidecode PKG_HASH:=bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93 @@ -20,45 +20,22 @@ PKG_MAINTAINER:=Josef Schlehofer include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-text-unidecode/Default +define Package/python3-text-unidecode SECTION:=lang CATEGORY:=Languages SUBMENU:=Python TITLE:=The most basic Text::Unidecode port URL:=https://github.com/kmike/text-unidecode/ -endef - -define Package/python-text-unidecode -$(call Package/python-text-unidecode/Default) DEPENDS:= \ - +PACKAGE_python-text-unidecode:python-light - VARIANT:=python -endef - -define Package/python3-text-unidecode -$(call Package/python-text-unidecode/Default) - DEPENDS:= \ - +PACKAGE_python3-text-unidecode:python3-light - VARIANT:=python3 -endef - -define Package/python-text-unidecode/description -text-unidecode is the most basic port of the Text::Unidecode Perl library. + +python3-light endef define Package/python3-text-unidecode/description -$(call Package/python-text-unidecode/description) -. -(Variant for Python3) +text-unidecode is the most basic port of the Text::Unidecode Perl library. endef -$(eval $(call PyPackage,python-text-unidecode)) -$(eval $(call BuildPackage,python-text-unidecode)) -$(eval $(call BuildPackage,python-text-unidecode-src)) - $(eval $(call Py3Package,python3-text-unidecode)) $(eval $(call BuildPackage,python3-text-unidecode)) $(eval $(call BuildPackage,python3-text-unidecode-src)) diff --git a/lang/python/vobject/Makefile b/lang/python/vobject/Makefile index 49e81e14..ebda4959 100644 --- a/lang/python/vobject/Makefile +++ b/lang/python/vobject/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vobject PKG_VERSION:=0.9.6.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=Apache-2.0 PYPI_NAME:=$(PKG_NAME) @@ -14,43 +14,21 @@ PKG_HASH:=96512aec74b90abb71f6b53898dd7fe47300cc940104c4f79148f0671f790101 include ../pypi.mk include $(INCLUDE_DIR)/package.mk -include ../python-package.mk include ../python3-package.mk -define Package/python-vobject/Default +define Package/python3-vobject SUBMENU:=Python SECTION:=lang CATEGORY:=Languages - MAINTAINER:=Daniel Dickinson TITLE:=VObject URL:=http://eventable.github.io/vobject/ -endef - -define Package/python-vobject -$(call Package/python-vobject/Default) - DEPENDS:=+PACKAGE_python-vobject:python +PACKAGE_python-vobject:python-dateutil - VARIANT:=python -endef - -define Package/python3-vobject -$(call Package/python-vobject/Default) - DEPENDS:=+PACKAGE_python3-vobject:python3 +PACKAGE_python3-vobject:python3-dateutil - VARIANT:=python3 -endef - -define Package/python-vobject/description - vCard and vCalendar support for Python + DEPENDS:=+python3 +python3-dateutil endef define Package/python3-vobject/description -$(call Package/python-vobject/description) -. -(Variant for Python3) + vCard and vCalendar support for Python endef -$(eval $(call PyPackage,python-vobject)) -$(eval $(call BuildPackage,python-vobject)) -$(eval $(call BuildPackage,python-vobject-src)) $(eval $(call Py3Package,python3-vobject)) $(eval $(call BuildPackage,python3-vobject)) $(eval $(call BuildPackage,python3-vobject-src)) diff --git a/lang/python/xmltodict/Makefile b/lang/python/xmltodict/Makefile index 78d9d6a5..44cf4cd5 100644 --- a/lang/python/xmltodict/Makefile +++ b/lang/python/xmltodict/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-xmltodict PKG_VERSION:=0.12.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=xmltodict PKG_HASH:=50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21 @@ -32,7 +32,6 @@ define Package/python3-xmltodict +python3-light \ +python3-xml \ +python3-urllib - VARIANT:=python3 endef define Package/python3-xmltodict/description diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 5ef50c43..d6aa2c76 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2006-2016 OpenWrt.org -# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca +# Copyright (C) 2017-2020 Luiz Angelo Daros de Luca # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby -PKG_VERSION:=2.5.1 +PKG_VERSION:=2.7.1 PKG_RELEASE:=1 # First two numbes @@ -19,10 +19,11 @@ PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/ -PKG_HASH:=886ac5eed41e3b5fc699be837b0087a6a5a3d10f464087560d2d21b3e71b754d +PKG_HASH:=b224f9844646cc92765df8288a46838511c1cec5b550d8874bd4686a904fcee7 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:ruby-lang:ruby PKG_BUILD_DEPENDS:=ruby/host PKG_INSTALL:=1 @@ -38,7 +39,7 @@ HOST_CONFIGURE_ARGS += \ --disable-install-rdoc \ --disable-install-capi \ --without-gmp \ - --with-out-ext=-test-/array/resize,-test-/bignum,-test-/bug-3571,-test-/bug-5832,-test-/bug_reporter,-test-/class,-test-/debug,-test-/dln/empty,-test-/exception,-test-/fatal,-test-/file,-test-/float,-test-/funcall,-test-/gvl/call_without_gvl,-test-/hash,-test-/integer,-test-/iseq_load,-test-/iter,-test-/load/dot.dot,-test-/marshal/compat,-test-/marshal/internal_ivar,-test-/marshal/usr,-test-/memory_status,-test-/method,-test-/notimplement,-test-/num2int,-test-/path_to_class,-test-/popen_deadlock,-test-/postponed_job,-test-/printf,-test-/proc,-test-/rational,-test-/recursion,-test-/st/foreach,-test-/st/numhash,-test-/st/update,-test-/string,-test-/struct,-test-/symbol,-test-/time,-test-/tracepoint,-test-/typeddata,-test-/vm,-test-/wait_for_single_fd,-test-/win32/console,-test-/win32/dln,-test-/win32/fd_setsize,bigdecimal,cgi/escape,continuation,coverage,dbm,etc,fcntl,fiber,fiddle,gdbm,io/console,io/nonblock,io/wait,json,json/generator,json/parser,mathn/complex,mathn/rational,nkf,objspace,openssl,pathname,pty,racc/cparse,rbconfig/sizeof,readline,ripper,rubyvm,sdbm,socket,syslog,win32,win32ole,win32/resolv,zlib + --with-out-ext=-test-/array/resize,-test-/bignum,-test-/bug-3571,-test-/bug-5832,-test-/bug_reporter,-test-/class,-test-/debug,-test-/dln/empty,-test-/exception,-test-/fatal,-test-/file,-test-/float,-test-/funcall,-test-/gvl/call_without_gvl,-test-/hash,-test-/integer,-test-/iseq_load,-test-/iter,-test-/load/dot.dot,-test-/marshal/compat,-test-/marshal/internal_ivar,-test-/marshal/usr,-test-/memory_status,-test-/method,-test-/notimplement,-test-/num2int,-test-/path_to_class,-test-/popen_deadlock,-test-/postponed_job,-test-/printf,-test-/proc,-test-/rational,-test-/recursion,-test-/st/foreach,-test-/st/numhash,-test-/st/update,-test-/string,-test-/struct,-test-/symbol,-test-/time,-test-/tracepoint,-test-/typeddata,-test-/vm,-test-/wait_for_single_fd,-test-/win32/console,-test-/win32/dln,-test-/win32/fd_setsize,bigdecimal,cgi/escape,continuation,coverage,dbm,etc,fcntl,fiber,fiddle,gdbm,io/console,json,json/generator,json/parser,mathn/complex,mathn/rational,nkf,objspace,pty,racc/cparse,rbconfig/sizeof,readline,rubyvm,sdbm,syslog,win32,win32ole,win32/resolv # Does not compile with this. Workaround is --without-gmp # https://bugs.ruby-lang.org/issues/11940 @@ -174,7 +175,7 @@ $(call Package/ruby/Default) SECTION:=libs CATEGORY:=Libraries TITLE+= (shared library) - DEPENDS+= +libpthread +librt +libgmp + DEPENDS+= +libpthread +librt +libgmp +zlib ABI_VERSION:=$(PKG_ABI_VERSION) endef define Package/libruby/install @@ -182,6 +183,21 @@ define Package/libruby/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/ endef +define Package/ruby-dev +$(call Package/ruby/Default) + TITLE+= (dev files) + DEPENDS:=+libruby ruby +endef +define Package/ruby-dev/description + Header files for compiling extension modules for the Ruby $(PKG_ABI_VERSION) +endef +define Package/ruby-dev/install + $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/include/ruby-$(PKG_ABI_VERSION) $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ruby-$(PKG_ABI_VERSION).pc $(1)/usr/lib/pkgconfig/ +endef + RUBY_STDLIB := define Package/ruby-stdlib $(call Package/ruby/Default) @@ -201,25 +217,38 @@ define Package/ruby-stdlib/install /bin/true endef +define Package/ruby-benchmark/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/benchmark.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/benchmark/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/benchmark-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/benchmark-*.gemspec +endef + define Package/ruby-bigdecimal/files /usr/lib/ruby/$(PKG_ABI_VERSION)/*/bigdecimal.so /usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal/ +/usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal.rb /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bigdecimal-*.gemspec endef -define Package/ruby-cgi/files -/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi -/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/*/cgi/escape.so +define Package/ruby-bundler/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/bundler.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/bundler/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/bundler-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bundler-*.gemspec endef -define Package/ruby-cmath/files -/usr/lib/ruby/$(PKG_ABI_VERSION)/cmath.rb -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/cmath-*.gemspec +define Package/ruby-cgi/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/cgi-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/cgi-*.gemspec +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/cgi/escape.so endef define Package/ruby-csv/files /usr/lib/ruby/$(PKG_ABI_VERSION)/csv.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/csv/ /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/csv-*.gemspec endef @@ -240,26 +269,22 @@ define Package/ruby-dbm/files endef define Package/ruby-debuglib/files -/usr/lib/ruby/$(PKG_ABI_VERSION)/profile.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/profiler.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/debug.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/benchmark.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/*/objspace.so endef -define Package/ruby-did-you-mean/files -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/did_you_mean-*.gemspec -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/ +define Package/ruby-delegate/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/delegate.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/delegate/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/delegate-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/delegate-*.gemspec endef -define Package/ruby-did-you-mean/files-excluded -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/benchmark -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/doc -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/evaluation -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/test -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/*.md -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/*.txt -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/.travis.yml + +define Package/ruby-did-you-mean/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/did_you_mean.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/did_you_mean/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/did_you_mean-*.gemspec endef define Package/ruby-digest/description @@ -338,9 +363,16 @@ endef define Package/ruby-fileutils/files /usr/lib/ruby/$(PKG_ABI_VERSION)/fileutils.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/fileutils-*/ /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/fileutils-*.gemspec endef +define Package/ruby-forwardable/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/forwardable-*.gemspec +endef + define Package/ruby-gdbm/files /usr/lib/ruby/$(PKG_ABI_VERSION)/*/gdbm.so /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/gdbm-*.gemspec @@ -367,6 +399,12 @@ define Package/ruby-gems/install $(call RubyBuildPackage/install,gems,$(1)) endef +define Package/ruby-getoptlong/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/getoptlong.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/getoptlong/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/getoptlong-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/getoptlong-*.gemspec +endef define Package/ruby-io-console/files /usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/console.so @@ -382,6 +420,8 @@ endef define Package/ruby-irb/files /usr/lib/ruby/$(PKG_ABI_VERSION)/irb /usr/lib/ruby/$(PKG_ABI_VERSION)/irb.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/irb-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/irb-*.gemspec endef define Package/ruby-irb/install $(INSTALL_DIR) $(1)/usr/bin @@ -401,14 +441,16 @@ endef define Package/ruby-logger/files /usr/lib/ruby/$(PKG_ABI_VERSION)/logger.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/logger/ /usr/lib/ruby/$(PKG_ABI_VERSION)/syslog/logger.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/*/syslog.so +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/logger-*.gemspec endef -define Package/ruby-math/files -/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb +define Package/ruby-matrix/files /usr/lib/ruby/$(PKG_ABI_VERSION)/matrix.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/matrix +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/matrix-*.gemspec endef define Package/ruby-minitest/files @@ -425,12 +467,8 @@ define Package/ruby-misc/files /usr/lib/ruby/$(PKG_ABI_VERSION)/English.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/abbrev.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/base64.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/delegate.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/coverage.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/expect.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/getoptlong.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/open3.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/securerandom.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/set.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/shellwords.rb @@ -449,18 +487,40 @@ endef define Package/ruby-multithread/files /usr/lib/ruby/$(PKG_ABI_VERSION)/monitor.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/timeout.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/mutex_m.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/sync.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/monitor.so /usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/wait.so /usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/nonblock.so endef +define Package/ruby-mutex_m/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/mutex_m.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/mutex_m-*.gemspec +endef + define Package/ruby-net/files /usr/lib/ruby/$(PKG_ABI_VERSION)/open-uri.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/net/* endef +define Package/ruby-net/files-excluded +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/pop.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/pop/* +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/smtp.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/smtp/* +endef + +define Package/ruby-net-pop/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/pop.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/pop/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-pop-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/net-pop-*.gemspec +endef + +define Package/ruby-net-smtp/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/smtp.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/smtp/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-smtp-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/net-smtp-*.gemspec +endef define Package/ruby-net-telnet/files /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/net-telnet-*.gemspec @@ -477,6 +537,20 @@ define Package/ruby-nkf/files /usr/lib/ruby/$(PKG_ABI_VERSION)/*/nkf.so endef +define Package/ruby-observer/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/observer.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/observer/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/observer-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/observer-*.gemspec +endef + +define Package/ruby-open3/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/open3.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/open3/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/open3-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/open3-*.gemspec +endef + define Package/ruby-openssl/files /usr/lib/ruby/$(PKG_ABI_VERSION)/openssl /usr/lib/ruby/$(PKG_ABI_VERSION)/openssl.rb @@ -490,11 +564,10 @@ define Package/ruby-optparse/files /usr/lib/ruby/$(PKG_ABI_VERSION)/optparse endef -define Package/ruby-patterns/files -/usr/lib/ruby/$(PKG_ABI_VERSION)/observer.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/singleton.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable +define Package/ruby-ostruct/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/ostruct-*.gemspec endef define Package/ruby-powerassert/files @@ -511,8 +584,16 @@ define Package/ruby-prettyprint/files /usr/lib/ruby/$(PKG_ABI_VERSION)/prettyprint.rb endef +define Package/ruby-prime/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/prime-*.gemspec +endef + define Package/ruby-pstore/files /usr/lib/ruby/$(PKG_ABI_VERSION)/pstore.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/pstore/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/pstore-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/pstore-*.gemspec endef define Package/ruby-psych/files @@ -523,8 +604,18 @@ define Package/ruby-psych/files endef define Package/ruby-racc/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/racc.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/racc /usr/lib/ruby/$(PKG_ABI_VERSION)/*/racc/*.so +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/racc-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/racc-*.gemspec +endef +define Package/ruby-racc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/racc $(1)/usr/bin/; + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/racc2y $(1)/usr/bin/; + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/y2racc $(1)/usr/bin/; + $(call RubyBuildPackage/install,racc,$(1)) endef define Package/ruby-rake/files @@ -552,11 +643,6 @@ define Package/ruby-rdoc/files /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rdoc-* /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rdoc-*.gemspec endef -define Package/ruby-rdoc/files-excluded -/usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/test_case.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/markup/formatter_test_case.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc/markup/text_formatter_test_case.rb -endef define Package/ruby-rdoc/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/ @@ -565,11 +651,27 @@ define Package/ruby-rdoc/install endef define Package/ruby-readline/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/readline.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/readline-0* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/readline-0*.gemspec +endef + +define Package/ruby-readline-ext/files /usr/lib/ruby/$(PKG_ABI_VERSION)/*/readline.so +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/readline-ext-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/readline-ext-*.gemspec +endef + +define Package/ruby-reline/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/reline.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/reline +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/reline-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/reline-*.gemspec endef define Package/ruby-rexml/files /usr/lib/ruby/$(PKG_ABI_VERSION)/rexml +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rexml-*.gemspec endef define Package/ruby-rinda/files @@ -585,11 +687,7 @@ endef define Package/ruby-rss/files /usr/lib/ruby/$(PKG_ABI_VERSION)/rss /usr/lib/ruby/$(PKG_ABI_VERSION)/rss.rb -endef - -define Package/ruby-scanf/files -/usr/lib/ruby/$(PKG_ABI_VERSION)/scanf.rb -/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/scanf-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rss-*.gemspec endef define Package/ruby-sdbm/files @@ -597,9 +695,11 @@ define Package/ruby-sdbm/files /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/sdbm-*.gemspec endef -define Package/ruby-shell/files -/usr/lib/ruby/$(PKG_ABI_VERSION)/shell.rb -/usr/lib/ruby/$(PKG_ABI_VERSION)/shell +define Package/ruby-singleton/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/singleton.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/singleton/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/singleton-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/singleton-*.gemspec endef define Package/ruby-socket/files @@ -634,6 +734,19 @@ define Package/ruby-time/files /usr/lib/ruby/$(PKG_ABI_VERSION)/time.rb endef +define Package/ruby-timeout/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/timeout.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/timeout/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/timeout-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/timeout-*.gemspec +endef + +define Package/ruby-tracer/files +/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/tracer-*.gemspec +endef + define Package/ruby-unicodenormalize/files /usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize endef @@ -641,6 +754,8 @@ endef define Package/ruby-uri/files /usr/lib/ruby/$(PKG_ABI_VERSION)/uri.rb /usr/lib/ruby/$(PKG_ABI_VERSION)/uri +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/uri-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/uri-*.gemspec endef define Package/ruby-webrick/files @@ -662,6 +777,8 @@ endef define Package/ruby-yaml/files /usr/lib/ruby/$(PKG_ABI_VERSION)/yaml /usr/lib/ruby/$(PKG_ABI_VERSION)/yaml.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/yaml-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/yaml-*.gemspec endef define Package/ruby-zlib/files @@ -739,68 +856,82 @@ endef $(eval $(call BuildPackage,libruby)) $(eval $(call BuildPackage,ruby)) +$(eval $(call BuildPackage,ruby-dev)) +$(eval $(call RubyBuildPackage,benchmark,Performance benchmarking library,)) $(eval $(call RubyBuildPackage,bigdecimal,Arbitrary-precision decimal floating-point library,)) +$(eval $(call RubyBuildPackage,bundler,Manage dependencies,+ruby-irb +ruby-openssl +ruby-readline)) $(eval $(call RubyBuildPackage,cgi,CGI support toolkit,+ruby-filelib +ruby-pstore +ruby-stringio)) -$(eval $(call RubyBuildPackage,cmath,Trigonometric and transcendental functions for complex numbers,)) -$(eval $(call RubyBuildPackage,csv,CSV Reading and Writing,+ruby-date +ruby-enc +ruby-misc +ruby-patterns +ruby-stringio)) +$(eval $(call RubyBuildPackage,csv,CSV Reading and Writing,+ruby-date +ruby-forwardable +ruby-misc +ruby-stringio +ruby-strscan)) $(eval $(call RubyBuildPackage,date,Comparable module for handling dates,)) $(eval $(call RubyBuildPackage,dbm,Wrapper for the UNIX-style Database Manager Library,+libdb47)) -$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-misc +ruby-prettyprint)) +$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-filelib +ruby-prettyprint +ruby-tracer)) +$(eval $(call RubyBuildPackage,delegate,lib to delegate method calls to an object,)) $(eval $(call RubyBuildPackage,did-you-mean,did you mean? experience,+ruby-misc)) $(eval $(call RubyBuildPackage,digest,Digest Library,+RUBY_DIGEST_USE_OPENSSL:libopenssl)) -$(eval $(call RubyBuildPackage,drb,distributed object system,+ruby-filelib +ruby-ipaddr +ruby-patterns)) +$(eval $(call RubyBuildPackage,drb,distributed object system,+ruby-filelib +ruby-ipaddr +ruby-observer +ruby-singleton)) $(eval $(call RubyBuildPackage,enc,character re-coding library charset (small subset),)) $(eval $(call RubyBuildPackage,enc-extra,character re-coding library charset (extra subset),+ruby-enc)) $(eval $(call RubyBuildPackage,erb,(embedded interpreter),+ruby-cgi +ruby-strscan)) -$(eval $(call RubyBuildPackage,etc,Access to information typically stored in UNIX /etc directory,)) +$(eval $(call RubyBuildPackage,etc,Access info typically stored in /etc,)) $(eval $(call RubyBuildPackage,fcntl,Loads constants defined in the OS fcntl.h C header file,)) $(eval $(call RubyBuildPackage,fiddle,Libffi wrapper for Ruby,+libffi)) -$(eval $(call RubyBuildPackage,filelib,file utils library,+ruby-fileutils +ruby-misc)) -$(eval $(call RubyBuildPackage,fileutils,File utility methods for copying moving removing etc,+ruby-enc +ruby-etc)) +$(eval $(call RubyBuildPackage,filelib,file utils library,+ruby-fileutils)) +$(eval $(call RubyBuildPackage,fileutils,File utility methods for copying moving removing etc,+ruby-enc +ruby-etc +ruby-rbconfig +ruby-socket)) +$(eval $(call RubyBuildPackage,forwardable,delegation of methods to a object,)) $(eval $(call RubyBuildPackage,gdbm,Ruby extension for GNU dbm,+libgdbm)) -$(eval $(call RubyBuildPackage,gems,gems packet management,+ruby-net +ruby-rdoc)) +$(eval $(call RubyBuildPackage,gems,gems packet management,+ruby-net +ruby-open3 +ruby-rdoc)) +$(eval $(call RubyBuildPackage,getoptlong,implementation of getoptLong,)) $(eval $(call RubyBuildPackage,io-console,Console interface,)) $(eval $(call RubyBuildPackage,ipaddr,Set of methods to manipulate an IP address,+ruby-socket)) -$(eval $(call RubyBuildPackage,irb,(interactive shell),+ruby-debuglib +ruby-filelib)) -$(eval $(call RubyBuildPackage,json,JSON Implementation for Ruby,+ruby-date +ruby-misc)) +$(eval $(call RubyBuildPackage,irb,(interactive shell),+ruby-gems +ruby-reline +ruby-tracer)) +$(eval $(call RubyBuildPackage,json,JSON Implementation for Ruby,+ruby-date +ruby-ostruct)) $(eval $(call RubyBuildPackage,logger,logger and syslog library,+ruby-multithread)) -$(eval $(call RubyBuildPackage,math,math library,+ruby-patterns +ruby-misc)) -$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-gems)) -$(eval $(call RubyBuildPackage,misc,standard libraries subset (miscellaneous files),)) -$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse +ruby-rbconfig)) -$(eval $(call RubyBuildPackage,multithread,multithread library,+ruby-misc)) -$(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-time +ruby-digest +ruby-filelib +ruby-socket +ruby-stringio +ruby-strscan +ruby-uri)) +$(eval $(call RubyBuildPackage,matrix,implementation of Matrix and Vector classes,)) +$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-gems +ruby-mutex_m)) +$(eval $(call RubyBuildPackage,misc,standard libraries subset (miscellaneous files),+ruby-delegate)) +$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse)) +$(eval $(call RubyBuildPackage,multithread,multithread library,)) +$(eval $(call RubyBuildPackage,mutex_m,extend objects to be handled like a Mutex,)) +$(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-time +ruby-digest +ruby-filelib +ruby-stringio +ruby-strscan +ruby-uri)) +$(eval $(call RubyBuildPackage,net-pop,POP3 lib,+ruby-net +ruby-openssl)) +$(eval $(call RubyBuildPackage,net-smtp,SMTP lib,+ruby-net +ruby-openssl)) $(eval $(call RubyBuildPackage,net-telnet,telnet client,+ruby-net)) $(eval $(call RubyBuildPackage,nkf,Network Kanji Filter,+ruby-enc)) -$(eval $(call RubyBuildPackage,openssl,SSL TLS and general purpose cryptography,+ruby-enc +ruby-multithread +ruby-stringio +libopenssl)) +$(eval $(call RubyBuildPackage,observer,Observer design pattern,)) +$(eval $(call RubyBuildPackage,open3,popen with stderr,)) +$(eval $(call RubyBuildPackage,openssl,SSL TLS and general purpose cryptography,+ruby-digest +ruby-enc +ruby-ipaddr +ruby-stringio +libopenssl)) +$(eval $(call RubyBuildPackage,ostruct,build custom data structures,)) $(eval $(call RubyBuildPackage,optparse,command-line option analysis,+ruby-misc +ruby-time)) -$(eval $(call RubyBuildPackage,patterns,design patterns implementation,)) $(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-prettyprint +ruby-ripper)) $(eval $(call RubyBuildPackage,prettyprint,PrettyPrint library,+ruby-etc)) +$(eval $(call RubyBuildPackage,prime,Prime numbers and factorization library,+ruby-forwardable +ruby-singleton)) $(eval $(call RubyBuildPackage,pstore,file based persistence,+ruby-digest +ruby-enc)) $(eval $(call RubyBuildPackage,psych,YAML parser and emitter,+ruby-bigdecimal +ruby-date +ruby-enc +ruby-stringio +ruby-strscan +libyaml)) -$(eval $(call RubyBuildPackage,racc,LALR parser generator,)) -$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-fileutils +ruby-multithread +ruby-optparse +ruby-patterns +ruby-rbconfig)) +$(eval $(call RubyBuildPackage,racc,LALR parser generator,+ruby-forwardable +ruby-optparse +ruby-rbconfig +ruby-stringio +ruby-strscan)) +$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-fileutils +ruby-optparse +ruby-ostruct +ruby-singleton)) $(eval $(call RubyBuildPackage,rbconfig,RbConfig,)) -$(eval $(call RubyBuildPackage,rdoc,RDoc produces HTML and command-line documentation for Ruby projects,+ruby-debuglib +ruby-did-you-mean +ruby-erb +ruby-json +ruby-racc +ruby-rake +ruby-ripper +ruby-yaml +ruby-zlib)) -$(eval $(call RubyBuildPackage,readline,support for readline,+libncurses +libreadline)) -$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-enc +ruby-misc +ruby-patterns +ruby-stringio)) -$(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb)) +$(eval $(call RubyBuildPackage,rdoc,RDoc produces HTML and command-line documentation for Ruby projects,+ruby-did-you-mean +ruby-erb +ruby-json +ruby-prettyprint +ruby-racc +ruby-rake +ruby-ripper +ruby-yaml +ruby-zlib)) +$(eval $(call RubyBuildPackage,readline,loads readline-ext(native) or reline(ruby),+ruby-reline)) +$(eval $(call RubyBuildPackage,readline-ext,support for native GNU readline,+libncurses +libreadline)) +$(eval $(call RubyBuildPackage,reline,alternative to readline-ext in pure ruby,+ruby-fiddle +ruby-filelib +ruby-forwardable +ruby-io-console)) +$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-enc +ruby-forwardable +ruby-misc +ruby-prettyprint +ruby-stringio +ruby-strscan)) +$(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb +ruby-forwardable)) $(eval $(call RubyBuildPackage,ripper,script parser,)) $(eval $(call RubyBuildPackage,rss,RSS toolkit,+ruby-net +ruby-nkf +ruby-rexml)) -$(eval $(call RubyBuildPackage,scanf,Implementation of the C function scanf(3),)) $(eval $(call RubyBuildPackage,sdbm,simple file-based key-value dbm implementation,)) -$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-patterns +ruby-multithread)) -$(eval $(call RubyBuildPackage,socket,socket support,+ruby-multithread)) +$(eval $(call RubyBuildPackage,singleton,Singleton pattern,)) +$(eval $(call RubyBuildPackage,socket,socket support,+ruby-misc +ruby-multithread +ruby-timeout)) $(eval $(call RubyBuildPackage,stringio,Pseudo `IO` class from/to `String`,)) $(eval $(call RubyBuildPackage,strscan,Lexical scanning operations on a String,)) $(eval $(call RubyBuildPackage,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-rexml +ruby-yaml)) $(eval $(call RubyBuildPackage,time,Extends Time with additional methods for parsing and converting Times,+ruby-date)) +$(eval $(call RubyBuildPackage,timeout,Auto-terminate potentially long-running operations,)) +$(eval $(call RubyBuildPackage,tracer,Outputs a source level execution trace of a Ruby program,)) $(eval $(call RubyBuildPackage,unicodenormalize,String additions for Unicode normalization,+ruby-enc +ruby-enc-extra)) $(eval $(call RubyBuildPackage,uri,library to handle URI,+ruby-enc)) -$(eval $(call RubyBuildPackage,webrick,HTTP server toolkit,+ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig)) +$(eval $(call RubyBuildPackage,webrick,HTTP server toolkit,+ruby-erb +ruby-net +ruby-singleton)) $(eval $(call RubyBuildPackage,xmlrpc,XML-RPC toolkit,+ruby-rexml +ruby-webrick)) $(eval $(call RubyBuildPackage,yaml,YAML toolkit,+ruby-dbm +ruby-pstore +ruby-psych)) -$(eval $(call RubyBuildPackage,zlib,compression/decompression library interface,+zlib)) +$(eval $(call RubyBuildPackage,zlib,compression/decompression library interface,)) $(eval $(call BuildPackage,ruby-stdlib)) $(eval $(call HostBuild)) diff --git a/lang/ruby/patches/100-musl.patch b/lang/ruby/patches/100-musl.patch new file mode 100644 index 00000000..ce6a3380 --- /dev/null +++ b/lang/ruby/patches/100-musl.patch @@ -0,0 +1,24 @@ +--- a/coroutine/copy/Context.h ++++ b/coroutine/copy/Context.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #define COROUTINE __attribute__((noreturn)) void + +--- a/configure.ac ++++ b/configure.ac +@@ -2344,7 +2344,10 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [ + rb_cv_coroutine=copy + ], + [*], [ +- rb_cv_coroutine=ucontext ++ AC_CHECK_FUNCS([getcontext swapcontext makecontext], ++ [rb_cv_coroutine=ucontext], ++ [rb_cv_coroutine=copy; break] ++ ) + ] + ) + AC_MSG_RESULT(${rb_cv_coroutine}) diff --git a/lang/ruby/ruby_find_pkgsdeps b/lang/ruby/ruby_find_pkgsdeps index d9acf370..8210756c 100644 --- a/lang/ruby/ruby_find_pkgsdeps +++ b/lang/ruby/ruby_find_pkgsdeps @@ -22,11 +22,12 @@ end require_regex=/^require ["']([^"']+)["'].*/ require_regex_ignore=/^require ([a-zA-Z\$]|["']$|.*\/$)/ -require_ignore=%w{drb/invokemethod16 foo rubygems/defaults/operating_system win32console java Win32API +require_ignore=%w{foo rubygems/defaults/operating_system win32console java Win32API builder/xchar json/pure simplecov win32/sspi rdoc/markdown/literals_1_8 enumerator win32/resolv rbtree - nqxml/streamingparser nqxml/treeparser xmlscan/parser xmlscan/scanner xmltreebuilder xml/parser xmlparser xml/encoding-ja xmlencoding-ja + xmlscan/parser xmlscan/scanner xmltreebuilder xml/parser xmlparser xml/encoding-ja xmlencoding-ja iconv uconv win32ole gettext/po_parser gettext/mo libxml psych.jar psych_jars jar-dependencies thread minitest/proveit - bundler pry + bundler pry bcrypt net/http/pipeline capistrano/version rubygems/builder rubygems/format diff/lcs graphviz + win32api racc/cparse-jruby.jar profile profiler } builtin_enc=[ @@ -85,7 +86,7 @@ packages.each do next end if not require_regex =~ line - $stderr.puts "Unknown require: '#{line}' at file #{file}:#{lineno}" + puts "Unknown require: '#{line}' at file #{file}:#{lineno}" failed=true end require=line.gsub(require_regex,"\\1") @@ -114,11 +115,13 @@ packages.each do end exit(1) if failed -# Add deps from .so +# From ruby source: grep -E 'rb_require' -R . | grep -E '\.c:.*rb_require.*' +# Add dependencies of ruby files from ruby lib.so package_files.each do |(pkg,files)| files.each do |file| case file - when /\/nkf\.so$/ - files_requires[file]= files_requires[file] + ["enc/encdb"] + when /\/nkf\.so$/ ; files_requires[file]=files_requires[file] + ["enc/encdb"] + when /\/objspace\.so$/; files_requires[file]=files_requires[file] + ["tempfile"] # dump_output from ext/objspace/objspace_dump.c + when /\/openssl\.so$/; files_requires[file]=files_requires[file] + ["digest"] # Init_ossl_digest from ext/openssl/ossl_digest.c end end; end @@ -139,10 +142,12 @@ weak_dependency.merge!({ "ruby-debuglib"=>["ruby-readline"], #debug.rb "ruby-drb"=>["ruby-openssl"], #drb/ssl.rb "ruby-irb"=>["ruby-rdoc", "ruby-readline"], #irb/cmd/help.rb -"ruby-gems"=>["ruby-openssl","ruby-io-console","ruby-webrick"], #rubygems/commands/cert_command.rb rubygems/user_interaction.rb rubygems/server.rb +"ruby-gems"=>["ruby-openssl","ruby-io-console","ruby-webrick", #rubygems/commands/cert_command.rb rubygems/user_interaction.rb rubygems/server.rb + "ruby-bundler"], #rubygems.rb "ruby-mkmf"=>["ruby-webrick"], #un.rb "ruby-net"=>["ruby-openssl","ruby-io-console","ruby-zlib"], #net/*.rb "ruby-optparse"=>["ruby-uri","ruby-datetime"], #optparse/date.rb optparse/uri.rb +"ruby-racc"=>["ruby-gems"], #/usr/bin/racc* "ruby-rake"=>["ruby-net","ruby-gems"], #rake/contrib/ftptools.rb /usr/bin/rake "ruby-rdoc"=>["ruby-gems","ruby-readline","ruby-webrick", #/usr/bin/rdoc and others "ruby-io-console"], #rdoc/stats/normal.rb @@ -196,11 +201,17 @@ begin package_dependencies.each do |(pkg,deps)| next if deps.empty? + deps.each {|dep| puts "#{pkg}: #{dep} also depends on #{pkg}" if package_dependencies[dep].include?(pkg) } deps_new = deps.collect {|dep| [dep] + package_dependencies[dep] }.inject([],:+).uniq.sort if not deps == deps_new puts "#{pkg}: #{deps.join(",")}" puts "#{pkg}: #{deps_new.join(",")}" package_dependencies[pkg]=deps_new + + if deps_new.include?(pkg) + $stderr.puts "#{pkg}: Circular dependency detected (#1)!" + exit 1 + end changed=true end end @@ -216,7 +227,7 @@ puts "Checking for mutual dependencies..." package_dependencies.each do |(pkg,deps)| if deps.include? pkg - $stderr.puts "#{pkg}: Cycle dependency detected! " + $stderr.puts "#{pkg}: Circular dependency detected (#2)!" failed = true end end diff --git a/lang/ruby/ruby_missingfiles b/lang/ruby/ruby_missingfiles index b76745d2..55dee779 100644 --- a/lang/ruby/ruby_missingfiles +++ b/lang/ruby/ruby_missingfiles @@ -6,10 +6,8 @@ function list_staging_files { cd "$1"; find \ \( \( -name "root-*" -or -name "packages" -or -name "stamp" -or -name "pkginfo" -or -name "host" -or -name man \) -prune \) -or -true \ - \( -path "*ruby*" -or -name "erb" -or -name "gem" -or -name "irb" -or -name "rake" -or -name "rdoc" -or -name "ri" -or -name "testrb" \) \ - -not -path "*/usr/include/*" -not -path "*/usr/lib/pkgconfig/*" -not -path "*/usr/lib/lib*.a" \ + \( -path "*ruby*" -or -name "erb" -or -name "gem" -or -name "irb" -or -name "rake" -or -name "rdoc" -or -name "ri" -or -name "testrb" -or -name "racc" -or -name "racc2y" -or -name "y2racc" \) \ -not -path "*/usr/lib/ruby/gems/*/cache/*" \ - -not -path "*/usr/lib/libruby.so" \ -not -name "*test_case.rb" \ -not -name "*.rdoc" \ -not -name "*.doc" \ @@ -32,10 +30,16 @@ function list_ipkg_files { } -echo " Installed in Staging Packages" +set -e : ${1:?First arg is staging_dir} : ${2:?Second and following args are ruby ipkg packages} STAGING_DIR=$1; shift +(cd "$STAGING_DIR" ) +if ! [ -e "$1" ]; then + echo "$1 does not exist!" + exit 1 +fi +printf '%-62s %-62s\n' "Installed in Staging" "From Packages Files" diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@") diff --git a/lang/tcl/Makefile b/lang/tcl/Makefile index e0c0c9e2..0dc6fd0d 100644 --- a/lang/tcl/Makefile +++ b/lang/tcl/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2015 OpenWrt.org +# Copyright (C) 2006-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,31 +8,34 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcl -PKG_VERSION:=8.6.4 -PKG_RELEASE:=1 +TCL_MAJOR_VERSION:=8.6 +PKG_VERSION:=${TCL_MAJOR_VERSION}.9 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION)-src.tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=9e6ed94c981c1d0c5f5fefb8112d06c6bf4d050a7327e95e71d417c416519c8d - +PKG_HASH:=ad0cd2de2c87b9ba8086b43957a0de3eb2eb565c7159d5f53ccbba3feb915f4e PKG_LICENSE:=TCL PKG_LICENSE_FILES:=license.terms PKG_MAINTAINER:=Joe Mistachkin +PKG_CPE_ID:=cpe:/a:tcl_tk:tcl_tk PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION) PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk define Package/tcl SUBMENU:=Tcl SECTION:=lang CATEGORY:=Languages - DEPENDS:=+libpthread @BROKEN + DEPENDS:=+libpthread +zlib TITLE:=The Tcl language - URL:=http://www.tcl.tk/ + URL:=https://www.tcl.tk/ endef define Package/tcl/description @@ -54,12 +57,25 @@ CONFIGURE_ARGS += \ MAKE_PATH := unix +define Build/Prepare + $(call Build/Prepare/Default) + rm -rf $(PKG_BUILD_DIR)/pkgs/* +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/tclConfig.sh $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/tclooConfig.sh $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/tcl.pc \ + $(1)/usr/lib/pkgconfig + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/tcl.pc + $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/tcl.pc endef define Package/tcl/install @@ -68,6 +84,27 @@ define Package/tcl/install $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin + + $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/tcl8 $(1)/usr/lib/ + $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/tcl$(TCL_MAJOR_VERSION) $(1)/usr/lib/ + $(LN) tclsh$(TCL_MAJOR_VERSION) $(1)/usr/bin/tclsh endef +define Host/Configure + $(call Host/Configure/Default,$(1),$(2),$(CONFIGURE_PATH)/$(3)) +endef + +define Host/Compile + +$(HOST_MAKE_VARS) \ + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/$(MAKE_PATH) \ + $(HOST_MAKE_FLAGS) \ + $(1) +endef + +define Host/Install + $(call Host/Compile,install) + (cd $(HOST_BUILD_PREFIX)/bin; test -f tclsh || ln -s tclsh$(TCL_MAJOR_VERSION) tclsh) +endef + +$(eval $(call HostBuild)) $(eval $(call BuildPackage,tcl)) diff --git a/lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch b/lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch deleted file mode 100644 index 1db8f073..00000000 --- a/lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/unix/Makefile.in -+++ b/unix/Makefile.in -@@ -817,15 +817,15 @@ install-tzdata: tclsh - @echo "Installing time zone data" - @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ -- ./tclsh $(TOOL_DIR)/installData.tcl \ -- $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata -+ #./tclsh $(TOOL_DIR)/installData.tcl \ -+ # $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata - - install-msgs: tclsh - @echo "Installing message catalogs" - @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ -- ./tclsh $(TOOL_DIR)/installData.tcl \ -- $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs -+ #./tclsh $(TOOL_DIR)/installData.tcl \ -+ # $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs - - install-doc: doc - @for i in "$(MAN_INSTALL_DIR)" "$(MAN1_INSTALL_DIR)" "$(MAN3_INSTALL_DIR)" "$(MANN_INSTALL_DIR)" ; \ diff --git a/lang/tcl/patches/200-fix_mips_build.patch b/lang/tcl/patches/200-fix_mips_build.patch deleted file mode 100644 index 48485ca6..00000000 --- a/lang/tcl/patches/200-fix_mips_build.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/generic/tclStrToD.c -+++ b/generic/tclStrToD.c -@@ -73,7 +73,7 @@ typedef unsigned int fpu_control_t __att - * MIPS floating-point units need special settings in control registers - * to use gradual underflow as we expect. - */ --#if defined(__mips) -+#if defined(__sgi) && defined(_COMPILER_VERSION) - #include - #endif - /* -@@ -2166,7 +2166,7 @@ TclInitDoubleConversion(void) - } bitwhack; - #endif - --#if defined(__mips) -+#if defined(__sgi) && defined(_COMPILER_VERSION) - union fpc_csr mipsCR; - - mipsCR.fc_word = get_fpc_csr(); diff --git a/lang/uuid/Makefile b/lang/uuid/Makefile index 9d9b4dee..d1ca4077 100644 --- a/lang/uuid/Makefile +++ b/lang/uuid/Makefile @@ -32,6 +32,7 @@ define Package/uuid TITLE:=uuid URL:=https://github.com/Tieske/uuid DEPENDS:=+lua +luasocket + PKGARCH:=all endef define Package/uuid/description diff --git a/lang/vala/Makefile b/lang/vala/Makefile index 6337b407..ba7b9157 100644 --- a/lang/vala/Makefile +++ b/lang/vala/Makefile @@ -8,86 +8,45 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vala -PKG_VERSION:=0.34.5 +PKG_VERSION:=0.48.6 PKG_RELEASE:=1 -PKG_LICENSE:=LGPL-2.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNOME/vala/0.34/ -PKG_HASH:=3fd4ba371778bc87da42827b8d23f1f42b0629759a9a1c40c9683dfb7e73fae5 +PKG_SOURCE_URL:=@GNOME/vala/0.48 +PKG_HASH:=d18d08ed030ce0e0f044f4c15c9df3c25b15beaf8700e45e43b736a6debf9707 -PKG_BUILD_DEPENDS:=glib2 glib2/host vala/host +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_HOST_ONLY:=1 HOST_BUILD_DEPENDS:=glib2/host +HOST_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/host-build.mk -TARGET_LDFLAGS+=\ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - define Package/vala SECTION:=lang CATEGORY:=Languages TITLE:=C-sharp like language for the GObject system URL:=https://wiki.gnome.org/Projects/Vala - MAINTAINER:=Gergely Kiss - DEPENDS:=+glib2 +libpthread + BUILDONLY:=1 endef define Package/vala/description -Vala is a C-sharp like language for the GObject system. This package contains -the Vala-to-C compiler. + Vala is a C-sharp like language for the GObject system. This package contains + the Vala-to-C compiler for host. endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef +HOST_CONFIGURE_ARGS += \ + --disable-coverage \ + --disable-debug \ + --disable-valadoc \ + --without-cgraph -define Build/InstallDev - $(INSTALL_DIR) \ - $(1)/usr/share/vala-0.34/vapi \ - $(1)/usr/lib \ - $(1)/usr/lib/pkgconfig - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/share/vala-0.34/vapi/* \ - $(1)/usr/share/vala-0.34/vapi - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/libvala-0.34.{so*,la} \ - $(1)/usr/lib - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ - $(1)/usr/lib/pkgconfig -endef - -define Package/vala/install - $(INSTALL_DIR) \ - $(1)/usr/share/vala-0.34/vapi \ - $(1)/usr/lib \ - $(1)/usr/lib/pkgconfig \ - $(1)/usr/bin - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/share/vala-0.34/vapi/* \ - $(1)/usr/share/vala-0.34/vapi - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/libvala-0.34.{so*,la} \ - $(1)/usr/lib - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/{vala,vala-0.34,valac,valac-0.34,vapicheck,vapicheck-0.34,vapigen,vapigen-0.34,vala-gen-introspect,vala-gen-introspect-0.34} \ - $(1)/usr/bin - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ - $(1)/usr/lib/pkgconfig -endef +HOST_LDFLAGS += \ + -Wl,--rpath-link=$(STAGING_DIR_HOSTPKG)/lib $(eval $(call HostBuild)) $(eval $(call BuildPackage,vala)) diff --git a/libs/afalg_engine/Config.in b/libs/afalg_engine/Config.in new file mode 100644 index 00000000..ed67f520 --- /dev/null +++ b/libs/afalg_engine/Config.in @@ -0,0 +1,43 @@ +if PACKAGE_libopenssl-afalg_sync + comment "Build Options" + + config AFALG_DIGESTS + bool "Build support for digest acceleration" + help + Digests are fast in software, and accessing AF_ALG adds latency, so + you'll need a large request (16KB) just to match software speed. + This increases memory usage, and has problems when process fork + with open digest contexts (openssh will not work because of it). + + config AFALG_FALLBACK + bool "Enable software fallback feature" + default y + help + Use software to fulfill small requests. Using AF_ALG adds latency, + which makes it slow to perform small requests. Enabling this + option overcomes this problem, at the cost of increased memory + and CPU usage. This is a new, experimental feature; if you + encounter any problem, this is the first option to disable. + The fallback will fail if you enable this engine alongside + devcrypto, so you'll not be able to install both at the same + time if this option is enabled. + + config AFALG_UPDATE_CTR_IV + bool "Don't rely on kernel to update CTR IV" + default y + help + Don't count on the kernel driver to update the CTR-mode counter + (IV). At least one driver does not update the IV as a workaround + for DMA issues. With this option turned on, the engine will keep + track of the counter, and the IV will be sent with every update. + If fallback is enabled, then the counter needs to be updated by + the engine anyway, and sent with the request everytime there's a + switch from software to hardware, so this won't bring much gain in + that case. + + config AFALG_ZERO_COPY + bool "Use Zero-Copy Mode" + help + Uses a Zero-Copy interface. Even though it is supposed to improve + performance, actual measurements indicate otherwise. +endif diff --git a/libs/afalg_engine/Makefile b/libs/afalg_engine/Makefile new file mode 100644 index 00000000..c312c4a8 --- /dev/null +++ b/libs/afalg_engine/Makefile @@ -0,0 +1,71 @@ +# Copyright (C) 2019 Eneas Ulir de Queiroz +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=afalg_engine +PKG_VERSION:=1.2.0-beta.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/cotequeiroz/afalg_engine/archive/v$(PKG_VERSION) +PKG_HASH:=6f0da98a3c12eaf50331ac7cd81f7b8800abf54b96fd73bd3e37cc50fd3d2ba8 + +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_CONFIG_DEPENDS:= \ + CONFIG_AFALG_DIGESTS \ + CONFIG_AFALG_FALLBACK \ + CONFIG_AFALG_UPDATE_CTR_IV \ + CONFIG_AFALG_ZERO_COPY + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +ENGINES_DIR:=engines-1.1 + +define Package/libopenssl-afalg_sync + SECTION:=libs + CATEGORY:=Libraries + SUBMENU:=SSL + MDEPENDS:=libopenssl + TITLE:=AF_ALG engine using sync crypto API + URL:=https://github.com/cotequeiroz/afalg_engine + DEPENDS:=libopenssl @OPENSSL_ENGINE @!OPENSSL_ENGINE_BUILTIN_AFALG \ + +libopenssl-conf +kmod-crypto-user + CONFLICTS:=libopenssl-afalg $(if $(CONFIG_AFALG_FALLBACK),libopenssl-devcrypto) + MENU:=1 +endef + +define Package/libopenssl-afalg_sync/description + This is an alternate AF_ALG engine for openssl, based on the devcrypto + engine, but using the AF_ALG interface instead of /dev/crypto + + It is different than the AF_ALG engine that ships with OpenSSL: + - it is faster + - it uses sync calls, instead of async + - it suports more algorithms +endef + +define Package/libopenssl-afalg_sync/config + source "$(SOURCE)/Config.in" +endef + +CMAKE_OPTIONS += \ + -DOPENSSL_ENGINES_DIR=/usr/lib/$(ENGINES_DIR) \ + -DDIGESTS=$(if $(CONFIG_AFALG_DIGESTS),ON,OFF) \ + -DFALLBACK=$(if $(CONFIG_AFALG_FALLBACK),ON,OFF) \ + -DUPDATE_CTR_IV=$(if $(CONFIG_AFALG_UPDATE_CTR_IV),ON,OFF) \ + -DUSE_ZERO_COPY=$(if $(CONFIG_AFALG_ZERO_COPY),ON,OFF) + +define Package/libopenssl-afalg_sync/install + $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so \ + $(1)/usr/lib/$(ENGINES_DIR)/ +endef + +$(eval $(call BuildPackage,libopenssl-afalg_sync)) diff --git a/libs/alsa-lib/Makefile b/libs/alsa-lib/Makefile index 4c682622..82c4e2b0 100644 --- a/libs/alsa-lib/Makefile +++ b/libs/alsa-lib/Makefile @@ -8,24 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=alsa-lib -PKG_VERSION:=1.1.6 +PKG_VERSION:=1.2.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \ http://distfiles.gentoo.org/distfiles/ +PKG_HASH:=d8e853d8805574777bbe40937812ad1419c9ea7210e176f0def3e6ed255ab3ec -PKG_HASH:=5f2cd274b272cae0d0d111e8a9e363f08783329157e8dd68b3de0c096de6d724 PKG_MAINTAINER:=Ted Hess , \ Peter Wagner -PKG_LICENSE:=LGPLv2.1 GPLv2 -PKG_LICENSE_FILES:=COPYING aserver/COPYING - PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 -PKG_CHECK_FORMAT_SECURITY:=0 include $(INCLUDE_DIR)/package.mk @@ -35,6 +32,8 @@ define Package/alsa-lib TITLE:=ALSA (Advanced Linux Sound Architecture) library URL:=http://www.alsa-project.org/ DEPENDS:=@AUDIO_SUPPORT +kmod-sound-core +libpthread +librt + LICENSE:=LGPL-2.1-or-later + LICENSE_FILES:=COPYING endef define Package/alsa-lib/description @@ -42,14 +41,32 @@ define Package/alsa-lib/description You must have enabled the ALSA support in the kernel. endef +define Package/aserver + SECTION:=sound + CATEGORY:=Sound + TITLE:=ALSA (Advanced Linux Sound Architecture) server + URL:=http://www.alsa-project.org/ + DEPENDS:=+alsa-lib + LICENSE:=GPL-2.0-or-later + LICENSE_FILES:=aserver/COPYING +endef + +define Package/aserver/description + This is the aserver application for ALSA. +endef + +define Package/alsa-lib/conffiles +/etc/asound.conf +endef + TARGET_CFLAGS += $(FPIC) CONFIGURE_ARGS+= \ --disable-python \ --disable-debug \ --without-debug \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - --with-versioned=no + --without-versioned \ + $(SOFT_FLOAT_CONFIG_OPTION) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ @@ -61,6 +78,9 @@ define Build/InstallDev $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libasound.{la,so*} \ $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libatopology.{la,so*} \ + $(1)/usr/lib/ $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc \ $(1)/usr/lib/pkgconfig/ @@ -76,6 +96,9 @@ define Package/alsa-lib/install $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* \ $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libatopology.so.* \ + $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/share/alsa/{cards,pcm} $(INSTALL_DATA) \ @@ -89,4 +112,10 @@ define Package/alsa-lib/install $(1)/usr/share/alsa/cards/ endef +define Package/aserver/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aserver $(1)/usr/bin +endef + $(eval $(call BuildPackage,alsa-lib)) +$(eval $(call BuildPackage,aserver)) diff --git a/libs/alsa-lib/patches/100-link_fix.patch b/libs/alsa-lib/patches/100-link_fix.patch index 2869dbf6..9a3258c7 100644 --- a/libs/alsa-lib/patches/100-link_fix.patch +++ b/libs/alsa-lib/patches/100-link_fix.patch @@ -1,8 +1,8 @@ --- a/src/Makefile.in +++ b/src/Makefile.in -@@ -421,7 +421,7 @@ clean-libLTLIBRARIES: - rm -f $${locs}; \ +@@ -490,7 +490,7 @@ clean-libLTLIBRARIES: } + libasound.la: $(libasound_la_OBJECTS) $(libasound_la_DEPENDENCIES) $(EXTRA_libasound_la_DEPENDENCIES) - $(AM_V_CCLD)$(libasound_la_LINK) -rpath $(libdir) $(libasound_la_OBJECTS) $(libasound_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libasound_la_LINK) -rpath $(DESTDIR)$(libdir) $(libasound_la_OBJECTS) $(libasound_la_LIBADD) $(LIBS) @@ -11,9 +11,9 @@ -rm -f *.$(OBJEXT) --- a/src/pcm/scopes/Makefile.in +++ b/src/pcm/scopes/Makefile.in -@@ -348,7 +348,7 @@ clean-pkglibLTLIBRARIES: - rm -f $${locs}; \ +@@ -410,7 +410,7 @@ clean-pkglibLTLIBRARIES: } + scope-level.la: $(scope_level_la_OBJECTS) $(scope_level_la_DEPENDENCIES) $(EXTRA_scope_level_la_DEPENDENCIES) - $(AM_V_CCLD)$(scope_level_la_LINK) -rpath $(pkglibdir) $(scope_level_la_OBJECTS) $(scope_level_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(scope_level_la_LINK) -rpath $(DESTDIR)$(pkglibdir) $(scope_level_la_OBJECTS) $(scope_level_la_LIBADD) $(LIBS) diff --git a/libs/alsa-lib/patches/200-usleep.patch b/libs/alsa-lib/patches/200-usleep.patch new file mode 100644 index 00000000..86badc20 --- /dev/null +++ b/libs/alsa-lib/patches/200-usleep.patch @@ -0,0 +1,34 @@ +--- a/src/pcm/pcm_shm.c ++++ b/src/pcm/pcm_shm.c +@@ -45,6 +45,14 @@ + #include + #include "aserver.h" + ++#if _POSIX_C_SOURCE >= 200809L ++#define usleep(a) \ ++ do { \ ++ const struct timespec req = {0, a * 1000}; \ ++ nanosleep(&req, NULL); \ ++ } while(0) ++#endif ++ + #ifndef PIC + /* entry for static linking */ + const char *_snd_module_pcm_shm = ""; +--- a/src/ucm/ucm_local.h ++++ b/src/ucm/ucm_local.h +@@ -53,6 +53,14 @@ + #define SEQUENCE_ELEMENT_TYPE_CSET_TLV 6 + #define SEQUENCE_ELEMENT_TYPE_CMPT_SEQ 7 + ++#if _POSIX_C_SOURCE >= 200809L ++#define usleep(a) \ ++ do { \ ++ const struct timespec req = {0, a * 1000}; \ ++ nanosleep(&req, NULL); \ ++ } while(0) ++#endif ++ + struct ucm_value { + struct list_head list; + char *name; diff --git a/libs/apr-util/Makefile b/libs/apr-util/Makefile index e9af160d..c5cdb347 100644 --- a/libs/apr-util/Makefile +++ b/libs/apr-util/Makefile @@ -8,75 +8,162 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apr-util -PKG_VERSION:=1.6.0 -PKG_RELEASE:=1 +PKG_VERSION:=1.6.1 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@APACHE/apr/ -PKG_HASH:=8474c93fa74b56ac6ca87449abe3e155723d5f534727f3f33283f6631a48ca4c -PKG_MAINTAINER:=Thomas Heil -PKG_LICENSE:=Apache License +PKG_HASH:=d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b +PKG_MAINTAINER:=Thomas Heil , \ + Sebastian Kemper + +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_CPE_ID:=cpe:/a:apache:apr-util + +PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS := \ + CONFIG_PACKAGE_libaprutil-crypto-openssl \ + CONFIG_PACKAGE_libaprutil-dbd-mysql \ + CONFIG_PACKAGE_libaprutil-dbd-odbc \ + CONFIG_PACKAGE_libaprutil-dbd-pgsql \ + CONFIG_PACKAGE_libaprutil-dbd-sqlite3 \ + CONFIG_PACKAGE_libaprutil-dbm-gdbm \ + CONFIG_PACKAGE_libaprutil-ldap PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk -define Package/libaprutil +define Package/libaprutil/Default SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libapr +libexpat +libsqlite3 +libuuid $(ICONV_DEPENDS) - TITLE:=Apache Portable Runtime Utility Library URL:=http://apr.apache.org/ endef -TARGET_CFLAGS += $(FPIC) -TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE +define Package/libaprutil +$(call Package/libaprutil/Default) + DEPENDS:=+libapr +libexpat +libuuid $(ICONV_DEPENDS) + TITLE:=Apache Portable Runtime Utility Library +endef CONFIGURE_ARGS += \ - --with-pgsql=no \ --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \ --with-expat="$(STAGING_DIR)/usr" \ - --without-sqlite2 \ - --with-sqlite3="$(STAGING_DIR)/usr" + --with-iconv="$(ICONV_PREFIX)" \ + --without-sqlite2 -ifdef $(CONFIG_BUILD_NLS) - CONFIGURE_ARGS += --with-iconv="$(ICONV_PREFIX)" +ifneq ($(CONFIG_PACKAGE_libaprutil-crypto-openssl),) +CONFIGURE_ARGS += --with-crypto --with-openssl="$(STAGING_DIR)/usr" else - CONFIGURE_ARGS += --without-iconv +CONFIGURE_ARGS += --without-crypto +endif + +ifneq ($(CONFIG_PACKAGE_libaprutil-dbd-mysql),) +CONFIGURE_ARGS += --with-mysql="$(STAGING_DIR)/usr" +else +CONFIGURE_ARGS += --without-mysql +endif + +ifneq ($(CONFIG_PACKAGE_libaprutil-dbd-odbc),) +CONFIGURE_ARGS += --with-odbc="$(STAGING_DIR)/usr" +else +CONFIGURE_ARGS += --without-odbc +endif + +ifneq ($(CONFIG_PACKAGE_libaprutil-dbd-pgsql),) +CONFIGURE_ARGS += --with-pgsql="$(STAGING_DIR)/usr" +else +CONFIGURE_ARGS += --without-pgsql +endif + +ifneq ($(CONFIG_PACKAGE_libaprutil-dbd-sqlite3),) +CONFIGURE_ARGS += --with-sqlite3="$(STAGING_DIR)/usr" +else +CONFIGURE_ARGS += --without-sqlite3 +endif + +ifneq ($(CONFIG_PACKAGE_libaprutil-dbm-gdbm),) +CONFIGURE_ARGS += --with-gdbm="$(STAGING_DIR)/usr" +else +CONFIGURE_ARGS += --without-gdbm +endif + +ifneq ($(CONFIG_PACKAGE_libaprutil-ldap),) +CONFIGURE_ARGS += \ + --with-ldap \ + --with-ldap-include="$(STAGING_DIR)/usr/include" \ + --with-ldap-lib="$(STAGING_DIR)/usr/lib" +else +CONFIGURE_ARGS += \ + --without-ldap endif CONFIGURE_VARS += \ - ac_cv_file_dbd_apr_dbd_mysql_c=no \ ac_cv_path_ODBC_CONFIG= \ + apu_cv_weak_symbols=yes \ APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1" -MAKE_FLAGS += \ - APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt" +ifeq ($(CONFIG_USE_GLIBC)$(CONFIG_USE_MUSL),y) +CONFIGURE_VARS += \ + apu_cv_explicit_bzero=yes +endif + +define Package/libaprutil/install/driver + $(INSTALL_DIR) $(1)/usr/lib/apr-util-1 + $(CP) $(PKG_INSTALL_DIR)/usr/lib/apr-util-1/apr_$(2)*.so \ + $(1)/usr/lib/apr-util-1 +endef + +define Package/libaprutil/Driver +define Package/libaprutil-$(subst _,-,$(1)) +$(call Package/libaprutil/Default) + TITLE:=libaprutil - $(2) driver + DEPENDS:=libaprutil $(patsubst +%,+PACKAGE_libaprutil-$(subst _,-,$(1)):%,$(3)) +endef +define Package/libaprutil-$(subst _,-,$(1))/install +$(foreach d,$(1),$(call Package/libaprutil/install/driver,$$(1),$(d));) +endef +$$(eval $$(call BuildPackage,libaprutil-$(subst _,-,$(1)))) +endef + +# PKG_CONFIG_DEPENDS trigger configure, but the compile afterward may be +# incomplete if the build directory is not cleaned before. This is not a +# general observation, yet it is valid for apr-util :/ +define Build/Compile + $(call Build/Compile/Default,clean all) +endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1/ $(1)/usr/lib $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/apu-1-config \ - $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \ - $(1)/usr/include/apr-1/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.{la,a,so*} \ - $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-util-1.pc \ - $(1)/usr/lib/pkgconfig/ - $(SED) 's, -e \"s -I$$$$prefix/lib g\",,g' $(1)/usr/bin/apu-1-config - $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apu-1-config - $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apu-1-config - $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apu-1-config - $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apu-1-config + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 \ + $(1)/usr/lib/apr-util-1 $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/bin/apu-1-config $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* $(1)/usr/include/apr-1 + $(CP) $(PKG_INSTALL_DIR)/usr/lib/apr-util-1/apr_*.{a,so} \ + $(1)/usr/lib/apr-util-1 2>/dev/null || : + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.{a,so*} \ + $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-util-1.pc \ + $(1)/usr/lib/pkgconfig + $(SED) '/^prefix=\|^exec_prefix=/s|/usr|$(STAGING_DIR)/usr|' \ + $(1)/usr/bin/apu-1-config endef define Package/libaprutil/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.so.* $(1)/usr/lib endef $(eval $(call BuildPackage,libaprutil)) +$(eval $(call Package/libaprutil/Driver,crypto_openssl,OpenSSL,+libopenssl)) +$(eval $(call Package/libaprutil/Driver,dbd_mysql,MySQL,+libmariadb)) +$(eval $(call Package/libaprutil/Driver,dbd_odbc,ODBC,+unixodbc)) +$(eval $(call Package/libaprutil/Driver,dbd_pgsql,PostgreSQL,+libpq)) +$(eval $(call Package/libaprutil/Driver,dbd_sqlite3,SQLite3,+libsqlite3)) +$(eval $(call Package/libaprutil/Driver,dbm_gdbm,GDBM dbm,+libgdbm)) +$(eval $(call Package/libaprutil/Driver,ldap,LDAP,+libopenldap)) diff --git a/libs/apr-util/patches/001-automake-compat.patch b/libs/apr-util/patches/001-automake-compat.patch deleted file mode 100644 index 20c4cf2b..00000000 --- a/libs/apr-util/patches/001-automake-compat.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -8,6 +8,7 @@ APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VER - APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@ - - srcdir = @srcdir@ -+top_builddir = @top_builddir@ - VPATH = @srcdir@ - - INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@ ---- a/configure.in -+++ b/configure.in -@@ -41,6 +41,8 @@ AC_SUBST(APU_CONFIG_LOCATION) - AC_CANONICAL_SYSTEM - - AC_PROG_INSTALL -+AC_PROG_LIBTOOL -+LT_INIT - - # Use -no-install or -no-fast-install to link the test - # programs on all platforms but Darwin, where it would cause diff --git a/libs/apr-util/patches/002-fix-gdbm-error-handling.patch b/libs/apr-util/patches/002-fix-gdbm-error-handling.patch new file mode 100644 index 00000000..92a4738e --- /dev/null +++ b/libs/apr-util/patches/002-fix-gdbm-error-handling.patch @@ -0,0 +1,79 @@ +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889170 +# needs to be submitted upstream +--- apr-util.orig/dbm/apr_dbm_gdbm.c ++++ apr-util/dbm/apr_dbm_gdbm.c +@@ -36,13 +36,22 @@ + static apr_status_t g2s(int gerr) + { + if (gerr == -1) { +- /* ### need to fix this */ +- return APR_EGENERAL; ++ return APR_OS_START_USEERR + gdbm_errno; + } + + return APR_SUCCESS; + } + ++static apr_status_t gdat2s(datum d) ++{ ++ if (d.dptr == NULL) { ++ return APR_OS_START_USEERR + gdbm_errno; ++ } ++ ++ return APR_SUCCESS; ++} ++ ++ + static apr_status_t datum_cleanup(void *dptr) + { + if (dptr) +@@ -55,19 +64,15 @@ static apr_status_t set_error(apr_dbm_t + { + apr_status_t rv = APR_SUCCESS; + +- /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */ +- +- if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) { ++ if (dbm_said == APR_SUCCESS) { ++ dbm->errcode = GDBM_NO_ERROR; + dbm->errmsg = NULL; + } + else { ++ dbm->errcode = dbm_said; + dbm->errmsg = gdbm_strerror(gdbm_errno); +- rv = APR_EGENERAL; /* ### need something better */ + } + +- /* captured it. clear it now. */ +- gdbm_errno = GDBM_NO_ERROR; +- + return rv; + } + +@@ -144,7 +149,7 @@ static apr_status_t vt_gdbm_fetch(apr_db + + /* store the error info into DBM, and return a status code. Also, note + that *pvalue should have been cleared on error. */ +- return set_error(dbm, APR_SUCCESS); ++ return set_error(dbm, gdat2s(rd)); + } + + static apr_status_t vt_gdbm_store(apr_dbm_t *dbm, apr_datum_t key, +@@ -203,7 +208,7 @@ static apr_status_t vt_gdbm_firstkey(apr + apr_pool_cleanup_null); + + /* store any error info into DBM, and return a status code. */ +- return set_error(dbm, APR_SUCCESS); ++ return set_error(dbm, gdat2s(rd)); + } + + static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey) +@@ -223,7 +228,7 @@ static apr_status_t vt_gdbm_nextkey(apr_ + apr_pool_cleanup_null); + + /* store any error info into DBM, and return a status code. */ +- return set_error(dbm, APR_SUCCESS); ++ return set_error(dbm, gdat2s(rd)); + } + + static void vt_gdbm_freedatum(apr_dbm_t *dbm, apr_datum_t data) diff --git a/libs/apr-util/patches/003-support_mariadb.patch b/libs/apr-util/patches/003-support_mariadb.patch new file mode 100644 index 00000000..1086e193 --- /dev/null +++ b/libs/apr-util/patches/003-support_mariadb.patch @@ -0,0 +1,125 @@ +# patch by Kris Karas fom +# https://bz.apache.org/bugzilla/attachment.cgi?id=35326&action=diff +--- a/build/dbd.m4 ++++ b/build/dbd.m4 +@@ -163,10 +163,15 @@ AC_DEFUN([APU_CHECK_DBD_MYSQL], [ + old_cppflags="$CPPFLAGS" + old_ldflags="$LDFLAGS" + ++ my_library="mysqlclient" ++ + AC_ARG_WITH([mysql], APR_HELP_STRING([--with-mysql=DIR], [enable MySQL DBD driver]), + [ + if test "$withval" = "yes"; then + AC_PATH_PROG([MYSQL_CONFIG],[mysql_config]) ++ if test "x$MYSQL_CONFIG" = "x"; then ++ AC_PATH_PROG([MYSQL_CONFIG],[mariadb_config]) ++ fi + if test "x$MYSQL_CONFIG" != 'x'; then + mysql_CPPFLAGS="`$MYSQL_CONFIG --include`" + mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[[^ ]]\+//g'`" +@@ -174,32 +179,40 @@ AC_DEFUN([APU_CHECK_DBD_MYSQL], [ + + APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS]) + APR_ADDTO(LIBS, [$mysql_LIBS]) ++ ++ if $MYSQL_CONFIG --libs_r | grep -q mariadb; then ++ my_library="mariadb" ++ fi + fi + +- AC_CHECK_HEADERS([mysql.h my_global.h my_sys.h], +- AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]), +- [apu_have_mysql=0; break], +- [#include ]) +- if test "$apu_have_mysql" = "0"; then +- AC_CHECK_HEADERS([mysql/mysql.h mysql/my_global.h mysql/my_sys.h], +- AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]), +- [apu_have_mysql=0; break], +- [#include ]) ++ AC_CHECK_HEADERS([mysql.h errmsg.h], [apu_have_mysql=1], [apu_have_mysql=0; break]) ++ if test "$apr_have_mysql" = "0"; then ++ AC_CHECK_HEADERS([mysql/mysql.h mysql/errmsg.h], [apu_have_mysql=1], [apu_have_mysql=0; break]) + fi +- if test "$apu_have_mysql" != "0" && test "x$MYSQL_CONFIG" != 'x'; then +- APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$mysql_CPPFLAGS]) ++ if test "$apr_have_mysql" = "1"; then ++ AC_CHECK_HEADERS([my_global.h my_sys.h mysql/my_global.h mysql/my_sys.h]) ++ AC_CHECK_LIB($my_library, mysql_init,, [apu_have_mysql=0]) ++ fi ++ if test "$apu_have_mysql" = "1" && test "x$MYSQL_CONFIG" != 'x'; then ++ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$mysql_CPPFLAGS]) + fi + elif test "$withval" = "no"; then + : + else + AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin]) ++ if test "x$MYSQL_CONFIG" = "x"; then ++ AC_PATH_PROG([MYSQL_CONFIG],[mariadb_config],,[$withval/bin]) ++ fi + if test "x$MYSQL_CONFIG" != 'x'; then +- mysql_CPPFLAGS="`$MYSQL_CONFIG --include`" +- mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[[^ ]]\+//g'`" +- mysql_LIBS="`$MYSQL_CONFIG --libs_r`" ++ mysql_CPPFLAGS="`$MYSQL_CONFIG --include`" ++ mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[[^ ]]\+//g'`" ++ mysql_LIBS="`$MYSQL_CONFIG --libs_r`" ++ if $MYSQL_CONFIG --libs_r | grep -q mariadb; then ++ my_library="mariadb" ++ fi + else +- mysql_CPPFLAGS="-I$withval/include" +- mysql_LDFLAGS="-L$withval/lib " ++ mysql_CPPFLAGS="-I$withval/include" ++ mysql_LDFLAGS="-L$withval/lib " + fi + + APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS]) +@@ -207,18 +220,15 @@ AC_DEFUN([APU_CHECK_DBD_MYSQL], [ + APR_ADDTO(LIBS, [$mysql_LIBS]) + + AC_MSG_NOTICE(checking for mysql in $withval) +- AC_CHECK_HEADERS([mysql.h my_global.h my_sys.h], +- AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]), +- [apu_have_mysql=0; break], +- [#include ]) +- +- if test "$apu_have_mysql" != "1"; then +- AC_CHECK_HEADERS([mysql/mysql.h mysql/my_global.h mysql/my_sys.h], +- AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]), +- [apu_have_mysql=0; break], +- [#include ]) ++ AC_CHECK_HEADERS([mysql.h errmsg.h], [apu_have_mysql=1], [apu_have_mysql=0; break]) ++ if test "$apr_have_mysql" = "0"; then ++ AC_CHECK_HEADERS([mysql/mysql.h mysql/errmsg.h], [apu_have_mysql=1], [apu_have_mysql=0; break]) ++ fi ++ if test "$apr_have_mysql" = "1"; then ++ AC_CHECK_HEADERS([my_global.h my_sys.h mysql/my_global.h mysql/my_sys.h]) ++ AC_CHECK_LIB($my_library, mysql_init,, [apu_have_mysql=0]) + fi +- if test "$apu_have_mysql" != "0"; then ++ if test "$apu_have_mysql" = "1"; then + APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$mysql_CPPFLAGS]) + fi + fi +@@ -229,7 +239,7 @@ AC_DEFUN([APU_CHECK_DBD_MYSQL], [ + dnl Since we have already done the AC_CHECK_LIB tests, if we have it, + dnl we know the library is there. + if test "$apu_have_mysql" = "1"; then +- APR_ADDTO(LDADD_dbd_mysql, [$mysql_LDFLAGS -lmysqlclient $mysql_LIBS]) ++ APR_ADDTO(LDADD_dbd_mysql, [$mysql_LDFLAGS -l$my_library $mysql_LIBS]) + fi + AC_SUBST(LDADD_dbd_mysql) + +--- a/dbd/apr_dbd_mysql.c ++++ b/dbd/apr_dbd_mysql.c +@@ -1262,7 +1262,9 @@ static apr_status_t thread_end(void *dat + + static void dbd_mysql_init(apr_pool_t *pool) + { ++#if MYSQL_VERSION_ID < 100000 + my_init(); ++#endif + mysql_thread_init(); + + /* FIXME: this is a guess; find out what it really does */ diff --git a/libs/apr-util/patches/004-avoid_ldap_by_defaut.patch b/libs/apr-util/patches/004-avoid_ldap_by_defaut.patch new file mode 100644 index 00000000..a086f2e4 --- /dev/null +++ b/libs/apr-util/patches/004-avoid_ldap_by_defaut.patch @@ -0,0 +1,34 @@ +From: Ryan Niebur +Subject: by default --avoid-ldap since apache2 is the only user, and we don't + want to add extra dependencies to other apr-utils rdepends + +--- a/apu-config.in ++++ b/apu-config.in +@@ -30,7 +30,8 @@ includedir="@includedir@" + LIBS="@APRUTIL_EXPORT_LIBS@" + INCLUDES="@APRUTIL_INCLUDES@" + LDFLAGS="@APRUTIL_LDFLAGS@" +-LDAP_LIBS="@LDADD_ldap@" ++ORIG_LDAP_LIBS="@LDADD_ldap@" ++LDAP_LIBS="" + DBM_LIBS="@LDADD_dbm_db@ @LDADD_dbm_gdbm@ @LDADD_dbm_ndbm@" + + APRUTIL_LIBNAME="@APRUTIL_LIBNAME@" +@@ -55,7 +56,7 @@ Known values for OPTION are: + --includedir print location where headers are installed + --ldflags print linker flags + --libs print library information +- --avoid-ldap do not include ldap library information with --libs ++ --avoid-ldap do not include ldap library information with --libs (default on OpenWrt) + --ldap-libs print library information to link with ldap + --avoid-dbm do not include DBM library information with --libs + --dbm-libs print additional library information to link with DBM +@@ -121,7 +122,7 @@ while test $# -gt 0; do + flags="$flags $LDAP_LIBS $DBM_LIBS $LIBS" + ;; + --ldap-libs) +- flags="$flags $LDAP_LIBS" ++ flags="$flags $ORIG_LDAP_LIBS" + ;; + --dbm-libs) + flags="$flags $DBM_LIBS" diff --git a/libs/apr-util/patches/005-apu_config_dont_list_indep_libs.patch b/libs/apr-util/patches/005-apu_config_dont_list_indep_libs.patch new file mode 100644 index 00000000..7f4b5653 --- /dev/null +++ b/libs/apr-util/patches/005-apu_config_dont_list_indep_libs.patch @@ -0,0 +1,31 @@ +From: Peter Samuelson +Subject: Prevent recursive linking of dependent libraries by apr-util users. + +--- + apr-util.pc.in | 5 +++-- + apu-config.in | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +--- a/apr-util.pc.in ++++ b/apr-util.pc.in +@@ -8,6 +8,7 @@ Name: APR Utils + Description: Companion library for APR + Version: @APRUTIL_DOTTED_VERSION@ + # assume that apr-util requires libapr of same major version +-Requires: apr-@APRUTIL_MAJOR_VERSION@ +-Libs: -L${libdir} -l@APRUTIL_LIBNAME@ @LDADD_ldap@ @APRUTIL_EXPORT_LIBS@ ++Requires.private: apr-@APRUTIL_MAJOR_VERSION@ ++Libs: -L${libdir} -l@APRUTIL_LIBNAME@ @LDADD_ldap@ ++Libs.private: @APRUTIL_EXPORT_LIBS@ + Cflags: -I${includedir} +--- a/apu-config.in ++++ b/apu-config.in +@@ -27,7 +27,7 @@ bindir="@bindir@" + libdir="@libdir@" + includedir="@includedir@" + +-LIBS="@APRUTIL_EXPORT_LIBS@" ++LIBS= + INCLUDES="@APRUTIL_INCLUDES@" + LDFLAGS="@APRUTIL_LDFLAGS@" + ORIG_LDAP_LIBS="@LDADD_ldap@" diff --git a/libs/apr-util/patches/006-avoid_db_by-default.patch b/libs/apr-util/patches/006-avoid_db_by-default.patch new file mode 100644 index 00000000..033bbbf7 --- /dev/null +++ b/libs/apr-util/patches/006-avoid_db_by-default.patch @@ -0,0 +1,35 @@ +From: Stefan Fritsch +Subject: Make apu-config not output dbm libs by default. See #622081 + +--- a/apu-config.in ++++ b/apu-config.in +@@ -32,7 +32,8 @@ INCLUDES="@APRUTIL_INCLUDES@" + LDFLAGS="@APRUTIL_LDFLAGS@" + ORIG_LDAP_LIBS="@LDADD_ldap@" + LDAP_LIBS="" +-DBM_LIBS="@LDADD_dbm_db@ @LDADD_dbm_gdbm@ @LDADD_dbm_ndbm@" ++ORIG_DBM_LIBS="@LDADD_dbm_db@ @LDADD_dbm_gdbm@ @LDADD_dbm_ndbm@" ++DBM_LIBS="" + + APRUTIL_LIBNAME="@APRUTIL_LIBNAME@" + +@@ -58,8 +59,8 @@ Known values for OPTION are: + --libs print library information + --avoid-ldap do not include ldap library information with --libs (default on OpenWrt) + --ldap-libs print library information to link with ldap +- --avoid-dbm do not include DBM library information with --libs +- --dbm-libs print additional library information to link with DBM ++ --avoid-dbm do not include DBM library information with --libs (default on OpenWrt) ++ --dbm-libs print library information to link with DBM + --srcdir print APR-util source directory + --link-ld print link switch(es) for linking to APR-util + --link-libtool print the libtool inputs for linking to APR-util +@@ -125,7 +126,7 @@ while test $# -gt 0; do + flags="$flags $ORIG_LDAP_LIBS" + ;; + --dbm-libs) +- flags="$flags $DBM_LIBS" ++ flags="$flags $ORIG_DBM_LIBS" + ;; + --includedir) + if test "$location" = "installed"; then diff --git a/libs/apr/Makefile b/libs/apr/Makefile index 9d2c076c..41cf7b77 100644 --- a/libs/apr/Makefile +++ b/libs/apr/Makefile @@ -8,17 +8,24 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apr -PKG_VERSION:=1.6.2 +PKG_VERSION:=1.7.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@APACHE/apr/ -PKG_HASH:=09109cea377bab0028bba19a92b5b0e89603df9eab05c0f7dbd4dd83d48dcebd -PKG_MAINTAINER:=Thomas Heil -PKG_LICENSE:=Apache License +PKG_HASH:=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea + +PKG_MAINTAINER:=Thomas Heil , \ + Sebastian Kemper + +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_CPE_ID:=cpe:/a:apache:apr + +PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh PKG_INSTALL:=1 @@ -29,51 +36,67 @@ define Package/libapr CATEGORY:=Libraries DEPENDS:=+libpthread +librt +libuuid TITLE:=Apache Portable Runtime Library - URL:=http://apr.apache.org/ + URL:=https://apr.apache.org/ endef -TARGET_CFLAGS += $(FPIC) -TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE - CONFIGURE_ARGS += \ --with-devrandom=/dev/urandom \ - --disable-dso \ $(call autoconf_bool,CONFIG_IPV6,ipv6) # XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure +# XXX: don't set apr_cv_use_lfs64=yes, see +# https://www.openwall.com/lists/musl/2020/02/03/18 +# XXX: the atomic builtins used require 8-byte intrinsics, which are available +# on all 64-bit architectures and some arm as well as x86 32-bit platforms CONFIGURE_VARS += \ + ap_cv_atomic_builtins=$(if $(CONFIG_ARCH_64BIT),yes,no) \ + ac_cv_file__dev_zero=yes \ + ac_cv_func_pthread_mutexattr_setpshared=yes \ + ac_cv_func_sem_open=yes \ + ac_cv_func_setpgrp_void=yes \ + ac_cv_mmap__dev_zero=yes \ + ac_cv_negative_eai=yes \ + ac_cv_o_nonblock_inherited=no \ ac_cv_sizeof_struct_iovec=1 \ ac_cv_struct_rlimit=yes \ - apr_cv_process_shared_works=no \ - apr_cv_mutex_robust_shared=no \ - apr_cv_tcp_nodelay_with_cork=yes \ - apr_cv_use_lfs64=yes \ - LDFLAGS="$$$$LDFLAGS -lpthread" \ + apr_cv_accept4=yes \ + apr_cv_dup3=yes \ + apr_cv_epoll=yes \ + apr_cv_epoll_create1=yes \ + apr_cv_gai_addrconfig=yes \ + apr_cv_mutex_recursive=yes \ + apr_cv_mutex_robust_shared=yes \ + apr_cv_process_shared_works=yes \ + apr_cv_pthreads_lib=-lpthread \ + apr_cv_sock_cloexec=yes \ + apr_cv_tcp_nodelay_with_cork=yes + +ifeq ($(call qstrip,$(CONFIG_LIBC)),musl) +CONFIGURE_VARS += \ + ac_cv_strerror_r_rc_int=yes +endif define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 $(1)/usr/lib $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1 - $(CP) $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \ - $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \ - $(1)/usr/include/apr-1/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{la,a,so*} \ - $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc \ - $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/build-1/* \ - $(1)/usr/share/build-1/ - $(SED) 's,^datadir=\"/usr/share\",datadir=\"$(STAGING_DIR)/usr/share\",g' $(1)/usr/bin/apr-1-config - $(SED) 's,^installbuilddir=\"/usr/share/build-1\",installbuilddir=\"$(STAGING_DIR)/usr/share/build-1\",g' $(1)/usr/bin/apr-1-config - $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apr-1-config - $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apr-1-config - $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apr-1-config - $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apr-1-config - $(SED) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' $(1)/usr/share/build-1/apr_rules.mk + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 \ + $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1 + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \ + $(1)/usr/bin + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \ + $(1)/usr/include/apr-1 + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{a,so*} $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc \ + $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/share/build-1/* $(1)/usr/share/build-1 + $(SED) '/^prefix=\|^exec_prefix=/s|/usr|$(STAGING_DIR)/usr|' \ + $(1)/usr/bin/apr-1-config + $(SED) '/^datadir=/s|/usr|$$$${prefix}|' $(1)/usr/bin/apr-1-config + $(SED) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' \ + $(1)/usr/share/build-1/apr_rules.mk endef define Package/libapr/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib endef $(eval $(call BuildPackage,libapr)) diff --git a/libs/apr/patches/001-autoconf-compat.patch b/libs/apr/patches/001-autoconf-compat.patch deleted file mode 100644 index acc94fc3..00000000 --- a/libs/apr/patches/001-autoconf-compat.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: apr-1.5.2/Makefile.in -=================================================================== ---- apr-1.5.2.orig/Makefile.in -+++ apr-1.5.2/Makefile.in -@@ -3,6 +3,7 @@ srcdir=@srcdir@ - VPATH=@srcdir@ - top_srcdir=@apr_srcdir@ - top_blddir=@apr_builddir@ -+top_builddir=@top_builddir@ - - # - # APR (Apache Portable Runtime) library Makefile. -Index: apr-1.5.2/configure.in -=================================================================== ---- apr-1.5.2.orig/configure.in -+++ apr-1.5.2/configure.in -@@ -245,9 +245,6 @@ case $host in - gcc $CFLAGS $CPPFLAGS -o $LIBTOOL.exe $LIBTOOL.c - ;; - *) -- if test "x$LTFLAGS" = "x"; then -- LTFLAGS='--silent' -- fi - if test "$experimental_libtool" = "yes"; then - # Use a custom-made libtool replacement - echo "using jlibtool" diff --git a/libs/apr/patches/001-cross-compile.patch b/libs/apr/patches/001-cross-compile.patch new file mode 100644 index 00000000..7fdb952f --- /dev/null +++ b/libs/apr/patches/001-cross-compile.patch @@ -0,0 +1,56 @@ +Fix cross-compilation + +Patch was backported from Apache httpd: +http://svn.apache.org/viewvc?view=revision&revision=1327907 +http://svn.apache.org/viewvc?view=revision&revision=1328390 +http://svn.apache.org/viewvc?view=revision&revision=1328714 + +Patch submitted upstream: +https://issues.apache.org/bugzilla/show_bug.cgi?id=57058 + +Signed-off-by: Bernd Kuhls + +--- a/configure.in ++++ b/configure.in +@@ -118,6 +118,16 @@ AC_CANONICAL_SYSTEM + echo "Configuring APR library" + echo "Platform: $host" + ++dnl In case of cross compilation we set CC_FOR_BUILD to cc unless ++dnl we got already CC_FOR_BUILD from environment. ++if test "x${build_alias}" != "x${host_alias}"; then ++ if test "x${CC_FOR_BUILD}" = "x"; then ++ CC_FOR_BUILD=cc ++ fi ++fi ++AC_SUBST(CC_FOR_BUILD) ++AC_SUBST(CFLAGS_FOR_BUILD) ++ + dnl Some initial steps for configuration. We setup the default directory + dnl and which files are to be configured. + +--- a/Makefile.in ++++ b/Makefile.in +@@ -8,6 +8,8 @@ top_blddir=@apr_builddir@ + # APR (Apache Portable Runtime) library Makefile. + # + CPP = @CPP@ ++CC_FOR_BUILD = @CC_FOR_BUILD@ ++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + + # get substituted into some targets + APR_MAJOR_VERSION=@APR_MAJOR_VERSION@ +@@ -136,8 +138,13 @@ tools/gen_test_char.lo: tools/gen_test_c + $(APR_MKDIR) tools + $(LT_COMPILE) + ++ifdef CC_FOR_BUILD ++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS) ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $< ++else + tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) + $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) ++endif + + include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ + $(APR_MKDIR) include/private diff --git a/libs/apr/patches/002-sys-param-h.patch b/libs/apr/patches/002-sys-param-h.patch new file mode 100644 index 00000000..220f427f --- /dev/null +++ b/libs/apr/patches/002-sys-param-h.patch @@ -0,0 +1,37 @@ +Fix PATH_MAX detection by including sys/param.h if available + +Patch sent upstream: +https://bz.apache.org/bugzilla/show_bug.cgi?id=63782 + +Signed-off-by: Bernd Kuhls + +--- a/configure.in ++++ b/configure.in +@@ -1596,6 +1596,7 @@ AC_SUBST(stdlibh) + AC_SUBST(stringh) + AC_SUBST(stringsh) + AC_SUBST(sys_ioctlh) ++AC_SUBST(sys_paramh) + AC_SUBST(sys_sendfileh) + AC_SUBST(sys_signalh) + AC_SUBST(sys_socketh) +--- a/include/apr.h.in ++++ b/include/apr.h.in +@@ -95,6 +95,7 @@ + #define APR_HAVE_STRINGS_H @stringsh@ + #define APR_HAVE_INTTYPES_H @inttypesh@ + #define APR_HAVE_SYS_IOCTL_H @sys_ioctlh@ ++#define APR_HAVE_SYS_PARAM_H @sys_paramh@ + #define APR_HAVE_SYS_SENDFILE_H @sys_sendfileh@ + #define APR_HAVE_SYS_SIGNAL_H @sys_signalh@ + #define APR_HAVE_SYS_SOCKET_H @sys_socketh@ +@@ -218,6 +219,9 @@ + #ifdef __cplusplus + extern "C" { + #endif ++#if APR_HAVE_SYS_PARAM_H ++#include ++#endif + + /** + * @addtogroup apr_platform diff --git a/libs/apr/patches/101-fix_apr_time_now.patch b/libs/apr/patches/101-fix_apr_time_now.patch deleted file mode 100644 index 6ad14a37..00000000 --- a/libs/apr/patches/101-fix_apr_time_now.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://dev.openwrt.org/ticket/9287 - ---- a/time/unix/time.c -+++ b/time/unix/time.c -@@ -75,7 +75,7 @@ APR_DECLARE(apr_time_t) apr_time_now(voi - { - struct timeval tv; - gettimeofday(&tv, NULL); -- return tv.tv_sec * APR_USEC_PER_SEC + tv.tv_usec; -+ return tv.tv_sec * (apr_time_t)APR_USEC_PER_SEC + (apr_time_t)tv.tv_usec; - } - - static void explode_time(apr_time_exp_t *xt, apr_time_t t, diff --git a/libs/apr/patches/201-upgrade-and-fix-1.5.1.patch b/libs/apr/patches/201-upgrade-and-fix-1.5.1.patch deleted file mode 100644 index 87cd546d..00000000 --- a/libs/apr/patches/201-upgrade-and-fix-1.5.1.patch +++ /dev/null @@ -1,51 +0,0 @@ -Makefile.in: fix cross compiling failed - -The tools/gen_test_char was invoked at build time, -and it didn't work for the cross compiling, so we -compile it with $BUILDCC. - -Remove the 'tools' dir creation, it always existed. -And it caused gen_test_char unexpected rebuilt at -do_install time. - -Upstream-Status: inappropriate [oe specific] - -Signed-off-by: Hongxu Jia ---- - Makefile.in | 10 ++-------- - 1 file changed, 2 insertions(+), 8 deletions(-) - -Index: apr-1.5.2/Makefile.in -=================================================================== ---- apr-1.5.2.orig/Makefile.in -+++ apr-1.5.2/Makefile.in -@@ -20,7 +20,7 @@ INCDIR=./include - OSDIR=$(top_srcdir)/include/arch/@OSDIR@ - DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@ - INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEFAULT_OSDIR@ -I$(top_srcdir)/include -I$(top_srcdir)/include/private -I$(top_blddir)/include/private -- -+BUILDCC=gcc - # - # Macros for target determination - # -@@ -47,7 +47,6 @@ LT_VERSION = @LT_VERSION@ - - CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \ - build/apr_rules.out tools/gen_test_char@EXEEXT@ \ -- tools/gen_test_char.o tools/gen_test_char.lo \ - include/private/apr_escape_test_char.h - DISTCLEAN_TARGETS = config.cache config.log config.status \ - include/apr.h include/arch/unix/apr_private.h \ -@@ -135,9 +134,9 @@ tools/gen_test_char.lo: tools/gen_test_c - $(APR_MKDIR) tools - $(LT_COMPILE) - --tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) -- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) -- -+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c -+ $(BUILDCC) $(CFLAGS_FOR_BUILD) $< -o $@ -+ - include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ - $(APR_MKDIR) include/private - tools/gen_test_char@EXEEXT@ > $@ diff --git a/libs/apr/patches/301-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/libs/apr/patches/301-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch new file mode 100644 index 00000000..ff0dc108 --- /dev/null +++ b/libs/apr/patches/301-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch @@ -0,0 +1,73 @@ +From f4d6e45ed5d2ccffd1af4c2ccdf7099ba0dce137 Mon Sep 17 00:00:00 2001 +From: Dengke Du +Date: Wed, 14 Dec 2016 18:13:08 +0800 +Subject: [PATCH 6/7] apr: fix off_t size doesn't match in glibc when cross + compiling + +In configure.in, it contains the following: + + APR_CHECK_SIZEOF_EXTENDED([#include ], off_t, 8) + +the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4, +it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross +compiling enable. + +So it was hardcoded for cross compiling, we should detect it dynamic based on +the sysroot's glibc. We change it to the following: + + AC_CHECK_SIZEOF(off_t) + +The same for the following hardcoded types for cross compiling: + + pid_t 8 + ssize_t 8 + size_t 8 + off_t 8 + +Change the above correspondingly. + +Signed-off-by: Dengke Du + +Upstream-Status: Pending +--- + configure.in | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/configure.in ++++ b/configure.in +@@ -1809,7 +1809,7 @@ else + socklen_t_value="int" + fi + +-APR_CHECK_SIZEOF_EXTENDED([#include ], pid_t, 8) ++AC_CHECK_SIZEOF(pid_t) + + if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then + pid_t_fmt='#define APR_PID_T_FMT "hd"' +@@ -1881,7 +1881,7 @@ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, u + APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"]) + ]) + +-APR_CHECK_SIZEOF_EXTENDED([#include ], ssize_t, 8) ++AC_CHECK_SIZEOF(ssize_t) + + dnl the else cases below should no longer occur; + AC_MSG_CHECKING([which format to use for apr_ssize_t]) +@@ -1899,7 +1899,7 @@ fi + + ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\"" + +-APR_CHECK_SIZEOF_EXTENDED([#include ], size_t, 8) ++AC_CHECK_SIZEOF(size_t) + + # else cases below should no longer occur; + AC_MSG_CHECKING([which format to use for apr_size_t]) +@@ -1917,7 +1917,7 @@ fi + + size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\"" + +-APR_CHECK_SIZEOF_EXTENDED([#include ], off_t, 8) ++AC_CHECK_SIZEOF(off_t) + + if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then + # Enable LFS diff --git a/libs/apr/patches/302-add-cache-for-strerror_r.patch b/libs/apr/patches/302-add-cache-for-strerror_r.patch new file mode 100644 index 00000000..c25175d5 --- /dev/null +++ b/libs/apr/patches/302-add-cache-for-strerror_r.patch @@ -0,0 +1,30 @@ +--- a/build/apr_common.m4 ++++ b/build/apr_common.m4 +@@ -526,8 +526,9 @@ dnl string. + dnl + dnl + AC_DEFUN([APR_CHECK_STRERROR_R_RC], [ +-AC_MSG_CHECKING(for type of return code from strerror_r) +-AC_TRY_RUN([ ++AC_CACHE_CHECK([whether return code from strerror_r has type int], ++[ac_cv_strerror_r_rc_int], ++[AC_TRY_RUN([ + #include + #include + #include +@@ -543,14 +544,10 @@ main() + }], [ + ac_cv_strerror_r_rc_int=yes ], [ + ac_cv_strerror_r_rc_int=no ], [ +- ac_cv_strerror_r_rc_int=no ] ) ++ ac_cv_strerror_r_rc_int=no ] ) ] ) + if test "x$ac_cv_strerror_r_rc_int" = xyes; then + AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int]) +- msg="int" +-else +- msg="pointer" + fi +-AC_MSG_RESULT([$msg]) + ] ) + + dnl diff --git a/libs/apr/patches/303-add-cache-for-mmap-zero.patch b/libs/apr/patches/303-add-cache-for-mmap-zero.patch new file mode 100644 index 00000000..482b99ca --- /dev/null +++ b/libs/apr/patches/303-add-cache-for-mmap-zero.patch @@ -0,0 +1,25 @@ +--- a/configure.in ++++ b/configure.in +@@ -1191,8 +1191,9 @@ AC_CHECK_FILE(/dev/zero) + # Not all systems can mmap /dev/zero (such as HP-UX). Check for that. + if test "$ac_cv_func_mmap" = "yes" && + test "$ac_cv_file__dev_zero" = "yes"; then +- AC_MSG_CHECKING(for mmap that can map /dev/zero) +- AC_TRY_RUN([ ++ AC_CACHE_CHECK([for mmap that can map /dev/zero], ++ [ac_cv_mmap__dev_zero], ++ [AC_TRY_RUN([ + #include + #include + #include +@@ -1215,9 +1216,7 @@ if test "$ac_cv_func_mmap" = "yes" && + return 3; + } + return 0; +- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no]) +- +- AC_MSG_RESULT($ac_cv_file__dev_zero) ++ }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])]) + fi + + # Now we determine which one is our anonymous shmem preference. diff --git a/libs/avahi/Makefile b/libs/avahi/Makefile index d020c1e6..023af27b 100644 --- a/libs/avahi/Makefile +++ b/libs/avahi/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=avahi PKG_VERSION:=0.8 -PKG_RELEASE:=1 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \ @@ -251,7 +251,6 @@ $(call Package/avahi/Default/description) endef TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE -TARGET_LDFLAGS += $(if $(CONFIG_SSP_SUPPORT),-lssp_nonshared) CONFIGURE_ARGS += \ --enable-shared \ @@ -289,6 +288,7 @@ CONFIGURE_ARGS += \ --with-distro=none \ --with-avahi-user=nobody \ --with-avahi-group=nogroup \ + --with-avahi-priv-access-group=nogroup \ --with-autoipd-user=nobody \ --with-autoipd-group=nogroup @@ -320,13 +320,6 @@ endif endif $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-core.pc -ifneq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd),) -ifeq ($(BUILD_VARIANT),dbus) - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-client.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/avahi-compat-libdns_sd.pc -endif -endif endef define Package/libavahi/install diff --git a/libs/avahi/patches/010-pkgconfig.patch b/libs/avahi/patches/010-pkgconfig.patch new file mode 100644 index 00000000..c03622de --- /dev/null +++ b/libs/avahi/patches/010-pkgconfig.patch @@ -0,0 +1,206 @@ +From 229b216d274977967790e6e2cfe13dd38effa2cf Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Mon, 16 Sep 2019 18:04:58 -0700 +Subject: [PATCH] pkgconfig: Match the first three parameters + +For consistency between projects. Might also fix several cross compilation +cases. + +Signed-off-by: Rosen Penev +--- + avahi-client.pc.in | 4 ++-- + avahi-compat-howl.pc.in | 4 ++-- + avahi-compat-libdns_sd.pc.in | 4 ++-- + avahi-core.pc.in | 4 ++-- + avahi-glib.pc.in | 4 ++-- + avahi-gobject.pc.in | 4 ++-- + avahi-libevent.pc.in | 4 ++-- + avahi-qt3.pc.in | 4 ++-- + avahi-qt4.pc.in | 4 ++-- + avahi-qt5.pc.in | 4 ++-- + avahi-sharp.pc.in | 2 +- + avahi-ui-gtk3.pc.in | 4 ++-- + avahi-ui-sharp.pc.in | 2 +- + avahi-ui.pc.in | 4 ++-- + 14 files changed, 26 insertions(+), 26 deletions(-) + +diff --git a/avahi-client.pc.in b/avahi-client.pc.in +index 65ee8d84..1e1bd249 100644 +--- a/avahi-client.pc.in ++++ b/avahi-client.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-client +diff --git a/avahi-compat-howl.pc.in b/avahi-compat-howl.pc.in +index b3cd02a7..1bb42c6b 100644 +--- a/avahi-compat-howl.pc.in ++++ b/avahi-compat-howl.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include/avahi-compat-howl/ + + Name: avahi-compat-howl +diff --git a/avahi-compat-libdns_sd.pc.in b/avahi-compat-libdns_sd.pc.in +index d6196325..d4778a17 100644 +--- a/avahi-compat-libdns_sd.pc.in ++++ b/avahi-compat-libdns_sd.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include/avahi-compat-libdns_sd/ + + Name: avahi-compat-libdns_sd +diff --git a/avahi-core.pc.in b/avahi-core.pc.in +index 52491b41..73412d45 100644 +--- a/avahi-core.pc.in ++++ b/avahi-core.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-core +diff --git a/avahi-glib.pc.in b/avahi-glib.pc.in +index f163e899..3d0ff9fc 100644 +--- a/avahi-glib.pc.in ++++ b/avahi-glib.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-glib +diff --git a/avahi-gobject.pc.in b/avahi-gobject.pc.in +index bf382003..88146744 100644 +--- a/avahi-gobject.pc.in ++++ b/avahi-gobject.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-gobject +diff --git a/avahi-libevent.pc.in b/avahi-libevent.pc.in +index a1dca01b..59b35e8e 100644 +--- a/avahi-libevent.pc.in ++++ b/avahi-libevent.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-libevent +diff --git a/avahi-qt3.pc.in b/avahi-qt3.pc.in +index c18f0809..d4fb4b88 100644 +--- a/avahi-qt3.pc.in ++++ b/avahi-qt3.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-qt3 +diff --git a/avahi-qt4.pc.in b/avahi-qt4.pc.in +index f62f7171..aefc135a 100644 +--- a/avahi-qt4.pc.in ++++ b/avahi-qt4.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-qt4 +diff --git a/avahi-qt5.pc.in b/avahi-qt5.pc.in +index 71548baf..fffe192a 100644 +--- a/avahi-qt5.pc.in ++++ b/avahi-qt5.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-qt5 +diff --git a/avahi-sharp.pc.in b/avahi-sharp.pc.in +index 3cc78b60..4d4c15df 100644 +--- a/avahi-sharp.pc.in ++++ b/avahi-sharp.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ + exec_prefix=@prefix@ +-libdir=@libdir@ ++libdir=${exec_prefix}/lib + + Name: avahi-sharp + Description: Mono bindings for the Avahi mDNS/DNS-SD stack +diff --git a/avahi-ui-gtk3.pc.in b/avahi-ui-gtk3.pc.in +index 27c4322d..56159481 100644 +--- a/avahi-ui-gtk3.pc.in ++++ b/avahi-ui-gtk3.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-ui +diff --git a/avahi-ui-sharp.pc.in b/avahi-ui-sharp.pc.in +index cdc35e0d..d448b241 100644 +--- a/avahi-ui-sharp.pc.in ++++ b/avahi-ui-sharp.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ + exec_prefix=@prefix@ +-libdir=@libdir@ ++libdir=${exec_prefix}/lib + + Name: avahi-ui-sharp + Description: Mono bindings for the Avahi mDNS/DNS-SD stack +diff --git a/avahi-ui.pc.in b/avahi-ui.pc.in +index 9edeea96..0dab729a 100644 +--- a/avahi-ui.pc.in ++++ b/avahi-ui.pc.in +@@ -1,6 +1,6 @@ + prefix=@prefix@ +-exec_prefix=${prefix} +-libdir=@libdir@ ++exec_prefix=@prefix@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: avahi-ui diff --git a/libs/avro/Makefile b/libs/avro/Makefile deleted file mode 100644 index d2aa7605..00000000 --- a/libs/avro/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# avro - Makefile for Apache Avro library -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=avro-c -PKG_VERSION:=1.8.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@APACHE/avro/avro-$(PKG_VERSION)/c -PKG_HASH:=4639982b2b8fbd91fc7128fef672207129c959bb7900dd64b077ce4206edf10e - -PKG_MAINTAINER:=John Clark - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/avro-c - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=+jansson +zlib +liblzma - TITLE:=Apache Avro C Library - URL:=https://avro.apache.org -endef - -define Package/avro-c/description - This package contains the Apache Avro C library. -endef - -CMAKE_OPTIONS += \ - -DCMAKE_BUILD_TYPE:STRING=MINSIZEREL - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{lib,include} - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.{a,so*} $(1)/usr/lib/ -endef - -define Package/avro-c/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavro.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,avro-c)) - diff --git a/libs/boost/Makefile b/libs/boost/Makefile index 90518c17..5c188bf1 100644 --- a/libs/boost/Makefile +++ b/libs/boost/Makefile @@ -11,13 +11,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=boost -PKG_VERSION:=1.71.0 -PKG_SOURCE_VERSION:=1_71_0 -PKG_RELEASE:=4 +PKG_VERSION:=1.73.0 +PKG_SOURCE_VERSION:=1_73_0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/ -PKG_HASH:=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee +PKG_HASH:=4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 PKG_MAINTAINER:=Carlos M. Ferreira PKG_LICENSE:=BSL-1.0 @@ -43,7 +43,7 @@ define Package/boost/Default endef define Package/boost/description -This package provides the Boost v1.71.0 libraries. +This package provides the Boost v1.73.0 libraries. Boost is a set of free, peer-reviewed, portable C++ source libraries. This package provides the following run-time libraries: @@ -64,7 +64,6 @@ This package provides the following run-time libraries: - log - math - program_options - - python - python3 - random - regex @@ -77,13 +76,10 @@ This package provides the following run-time libraries: - wave There are many more header-only libraries supported by Boost. -See more at http://www.boost.org/doc/libs/1_71_0/ +See more at http://www.boost.org/doc/libs/1_72_0/ endef -PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3 - -include ../../lang/python/python-version.mk -BOOST_PYTHON_VER=$(PYTHON_VERSION) +PKG_BUILD_DEPENDS:=boost/host PACKAGE_python3:python3 include ../../lang/python/python3-version.mk BOOST_PYTHON3_VER=$(PYTHON3_VERSION) @@ -120,7 +116,7 @@ define Package/boost/config # Invisible config dependency config boost-context-exclude bool - default y if (TARGET_arc700 || TARGET_archs38 || TARGET_octeon || TARGET_octeontx) + default y if (TARGET_arc770 || TARGET_archs38 || TARGET_octeon || TARGET_octeontx) default n config boost-coroutine-exclude @@ -130,7 +126,7 @@ define Package/boost/config config boost-fiber-exclude bool - default y if (TARGET_ar7 || TARGET_brcm47xx_generic || TARGET_brcm47xx_legacy || TARGET_lantiq_ase || TARGET_rb532 || mips32 || mips64 || boost-coroutine-exclude) + default y if boost-coroutine-exclude default n menu "Select Boost Options" @@ -283,10 +279,10 @@ define Package/boost/config $(foreach lib,$(BOOST_LIBS), \ config PACKAGE_boost-$(lib) - prompt "Boost $(lib) $(if $(findstring python,$(lib)),$(paren_left)v$(if $(findstring 3,$(lib)),$(BOOST_PYTHON3_VER),$(BOOST_PYTHON_VER))$(paren_right) ,)library." + prompt "Boost $(lib) $(if $(findstring python3,$(lib)),$(paren_left)v$(BOOST_PYTHON3_VER)$(paren_right) ,)library." default m if ALL $(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\ - $(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)\ + $(if $(findstring python3,$(lib)),depends on PACKAGE_python3,)\ $(if $(findstring fiber,$(lib)),depends on !boost-fiber-exclude,)\ $(if $(findstring context,$(lib)),depends on !boost-context-exclude,) $(if $(findstring coroutine,$(lib)),depends on !boost-coroutine-exclude,) @@ -346,7 +342,6 @@ $(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem r $(eval $(call DefineBoostLibrary,math)) #$(eval $(call DefineBoostLibrary,mpi,,)) # OpenMPI does no exist in OpenWRT at this time. $(eval $(call DefineBoostLibrary,program_options)) -$(eval $(call DefineBoostLibrary,python,,,PACKAGE_python)) $(eval $(call DefineBoostLibrary,python3,,,PACKAGE_python3)) $(eval $(call DefineBoostLibrary,random,system)) $(eval $(call DefineBoostLibrary,regex)) @@ -425,7 +420,7 @@ define Build/Compile $(if $(CONFIG_PACKAGE_boost-test),,--without-test) \ --without-python \ $(foreach lib,$(BOOST_LIBS), \ - $(if $(findstring python,$(lib)),, \ + $(if $(findstring python3,$(lib)),, \ $(if $(CONFIG_PACKAGE_boost-$(lib)),, \ $(if $(findstring wserialization,$(lib)),,--without-$(lib)) \ ) \ @@ -437,32 +432,6 @@ define Build/Compile $(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \ -sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \ install ;\ - $(if $(CONFIG_PACKAGE_boost-python), \ - echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : \"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" \"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" \"$(TARGET_LDFLAGS)\" ;" > \ - tools/build/src/user-config.jam ; \ - echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \ - tools/build/src/user-config.jam; \ - b2 -a \ - $(CONFIGURE_ARGS) \ - --ignore-site-config \ - --toolset=gcc abi=$(BOOST_ABI) \ - --disable-long-double \ - $(if $(CONFIG_boost-variant-release), variant=release,) \ - $(if $(CONFIG_boost-variant-debug), variant=debug,) \ - $(if $(CONFIG_boost-variant-profile), variant=profile,) \ - $(if $(CONFIG_boost-use-name-tags),--layout=tagged,--layout=system) \ - $(if $(CONFIG_boost-build-type-complete),--build-type=complete,--build-type=minimal) \ - $(if $(CONFIG_boost-shared-libs),link=shared,) \ - $(if $(CONFIG_boost-static-libs),link=static,) \ - $(if $(CONFIG_boost-static-and-shared-libs),link=static$(comma)shared,) \ - $(if $(CONFIG_boost-runtime-shared),runtime-link=shared,) \ - $(if $(CONFIG_boost-runtime-static),runtime-link=static,) \ - $(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \ - $(if $(CONFIG_boost-single-thread),threading=single,) \ - threading=multi \ - --with-python \ - install ;\ - ,) \ $(if $(CONFIG_PACKAGE_boost-python3), \ echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : \"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" \"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" \"$(TARGET_LDFLAGS)\" ;" > \ tools/build/src/user-config.jam ; \ @@ -513,10 +482,7 @@ endef define Package/boost/Default/install $(INSTALL_DIR) $(1)/usr/lib - $(if $(findstring python,$(2)), $(if $(findstring 3,$(2)), \ - $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python3*.so* $(1)/usr/lib/ , \ - $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python2*.so* $(1)/usr/lib/ ), \ - $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/ ) + $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/ endef define Package/boost-test/install diff --git a/libs/boost/patches/001-uclibc-asio.patch b/libs/boost/patches/001-uclibc-asio.patch index b7732d0e..07efd130 100644 --- a/libs/boost/patches/001-uclibc-asio.patch +++ b/libs/boost/patches/001-uclibc-asio.patch @@ -1,3 +1,28 @@ +From 95d82acc57bb7d8bae431f7a6ce0707aac3ef33f Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Thu, 5 Sep 2019 19:41:13 -0700 +Subject: [PATCH] Use eventfd() function with uClibc + +The Boost eventfd code either directly makes the eventfd system call +using __NR_eventfd (when __GLIBC_MINOR is less than 8), or otherwise +uses the eventfd() function provided by the C library. + +However, since uClibc pretends to be glibc 2.2, the Boost eventfd code +directly uses the system call. While it works fine on most +architectures, it doesn't on ARC since __NR_eventfd is not defined on +this architecture. However, eventfd() is properly implemented. + +So, this patch adjusts the logic used by Boost to consider uClibc as a +C library providing the eventfd() function. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Rosen Penev +--- + a/boost/asio/detail/impl/eventfd_select_interrupter.ipp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/boost/asio/detail/impl/eventfd_select_interrupter.ipp b/boost/asio/detail/impl/eventfd_select_interrupter.ipp +index 38d4b2a61..e16cc8b00 100644 --- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp +++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp @@ -23,11 +23,11 @@ @@ -15,7 +40,7 @@ #include #include #include -@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_sele +@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_select_interrupter() void eventfd_select_interrupter::open_descriptors() { @@ -32,7 +57,7 @@ # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK) write_descriptor_ = read_descriptor_ = ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK); -@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_de +@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_descriptors() ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC); } } diff --git a/libs/boost/patches/002-outcome-assert.patch b/libs/boost/patches/002-outcome-assert.patch new file mode 100644 index 00000000..aa996fd6 --- /dev/null +++ b/libs/boost/patches/002-outcome-assert.patch @@ -0,0 +1,11 @@ +--- a/boost/outcome/experimental/status-code/status_code_ptr.hpp 2020-04-28 09:23:14.792565200 +0100 ++++ b/boost/outcome/experimental/status-code/status_code_ptr.hpp 2020-04-28 09:24:34.311741000 +0100 +@@ -103,7 +103,7 @@ + #endif + virtual void _do_erased_copy(status_code &dst, const status_code &src, size_t /*unused*/) const override // NOLINT + { +- assert(dst.domain() == *this); ++ // Note that dst will not have its domain set + assert(src.domain() == *this); + auto &d = static_cast<_mycode &>(dst); // NOLINT + const auto &_s = static_cast(src); // NOLINT diff --git a/libs/boost/patches/002-utime-filesystem.patch b/libs/boost/patches/002-utime-filesystem.patch deleted file mode 100644 index 2a778af3..00000000 --- a/libs/boost/patches/002-utime-filesystem.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 83b989ecee478be083db8dc0cc7a5387615bd3cb Mon Sep 17 00:00:00 2001 -From: Andrey Semashev -Date: Wed, 31 Jul 2019 16:28:05 +0300 -Subject: [PATCH] Added support for utimensat for better POSIX.1-2008 - compliance. - -POSIX.1-2008 marks utime as obsolete and replaces it with utimensat. -uClibc-ng has an option for removing utime, including the corresponding -header. - -Closes https://github.com/boostorg/filesystem/pull/115. ---- - libs/filesystem/src/operations.cpp | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -diff --git a/src/operations.cpp b/src/operations.cpp -index 9bba1cf7a..038109d35 100644 ---- a/libs/filesystem/src/operations.cpp -+++ b/libs/filesystem/src/operations.cpp -@@ -62,7 +62,7 @@ - #endif - - #ifndef _POSIX_PTHREAD_SEMANTICS --# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this -+# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r() needs this - #endif - - #include -@@ -119,7 +119,9 @@ using std::wstring; - # include - # include - # include --# include -+# if _POSIX_C_SOURCE < 200809L -+# include -+# endif - # include "limits.h" - - # else // BOOST_WINDOW_API -@@ -1451,6 +1453,22 @@ namespace detail - system::error_code* ec) - { - # ifdef BOOST_POSIX_API -+# if _POSIX_C_SOURCE >= 200809L -+ -+ struct timespec times[2] = {}; -+ -+ // Keep the last access time unchanged -+ times[0].tv_nsec = UTIME_OMIT; -+ -+ times[1].tv_sec = new_time; -+ -+ if (BOOST_UNLIKELY(::utimensat(AT_FDCWD, p.c_str(), times, 0) != 0)) -+ { -+ error(BOOST_ERRNO, p, ec, "boost::filesystem::last_write_time"); -+ return; -+ } -+ -+# else // _POSIX_C_SOURCE >= 200809L - - struct stat path_stat; - if (error(::stat(p.c_str(), &path_stat)!= 0, -@@ -1462,6 +1480,8 @@ namespace detail - error(::utime(p.c_str(), &buf)!= 0 ? BOOST_ERRNO : 0, - p, ec, "boost::filesystem::last_write_time"); - -+# endif // _POSIX_C_SOURCE >= 200809L -+ - # else - - handle_wrapper hw( diff --git a/libs/boost/patches/003-beast-coroutines.patch b/libs/boost/patches/003-beast-coroutines.patch new file mode 100644 index 00000000..58ea5030 --- /dev/null +++ b/libs/boost/patches/003-beast-coroutines.patch @@ -0,0 +1,1465 @@ +--- a/boost/beast/core/detail/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/core/detail/impl/read.hpp 2020-05-02 13:50:11.141761700 -0400 +@@ -214,7 +214,7 @@ + class AsyncReadStream, + class DynamicBuffer, + class CompletionCondition, +- class ReadHandler, ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler, + class> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read( +diff -aruN a/boost/beast/core/detail/is_invocable.hpp b/boost/beast/core/detail/is_invocable.hpp +--- a/boost/beast/core/detail/is_invocable.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/core/detail/is_invocable.hpp 2020-05-02 13:50:11.141761700 -0400 +@@ -10,6 +10,8 @@ + #ifndef BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP + #define BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP + ++#include ++#include + #include + #include + +@@ -51,6 +53,26 @@ + }; + /** @} */ + ++template ++struct is_completion_token_for : std::false_type ++{ ++}; ++ ++struct any_initiation ++{ ++ template ++ void operator()(AnyArgs&&...); ++}; ++ ++template ++struct is_completion_token_for< ++ CompletionToken, R(Args...), boost::void_t( ++ any_initiation(), std::declval()) ++ )>> : std::true_type ++{ ++}; ++ + } // detail + } // beast + } // boost +diff -aruN a/boost/beast/core/detail/read.hpp b/boost/beast/core/detail/read.hpp +--- a/boost/beast/core/detail/read.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/core/detail/read.hpp 2020-05-02 13:50:11.142761711 -0400 +@@ -219,7 +219,7 @@ + class AsyncReadStream, + class DynamicBuffer, + class CompletionCondition, +- class ReadHandler ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler + #if ! BOOST_BEAST_DOXYGEN + , class = typename std::enable_if< + is_async_read_stream::value && +diff -aruN a/boost/beast/core/detect_ssl.hpp b/boost/beast/core/detect_ssl.hpp +--- a/boost/beast/core/detect_ssl.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/core/detect_ssl.hpp 2020-05-02 13:50:11.143761722 -0400 +@@ -374,13 +374,13 @@ + void operator()( + DetectHandler&& h, + AsyncReadStream* s, // references are passed as pointers +- DynamicBuffer& b) ++ DynamicBuffer* b) + { + detect_ssl_op< + typename std::decay::type, + AsyncReadStream, + DynamicBuffer>( +- std::forward(h), *s, b); ++ std::forward(h), *s, *b); + } + }; + +@@ -439,7 +439,7 @@ + detail::run_detect_ssl_op{}, + token, + &stream, // pass the reference by pointer +- buffer); ++ &buffer); + } + + //] +diff -aruN a/boost/beast/core/impl/basic_stream.hpp b/boost/beast/core/impl/basic_stream.hpp +--- a/boost/beast/core/impl/basic_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/core/impl/basic_stream.hpp 2020-05-02 13:50:11.144761733 -0400 +@@ -776,7 +776,7 @@ + //------------------------------------------------------------------------------ + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(ConnectHandler) + basic_stream:: + async_connect( +@@ -795,7 +795,7 @@ + template + template< + class EndpointSequence, +- class RangeConnectHandler, ++ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler, + class> + BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,void(error_code, typename Protocol::endpoint)) + basic_stream:: +@@ -817,7 +817,7 @@ + template< + class EndpointSequence, + class ConnectCondition, +- class RangeConnectHandler, ++ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler, + class> + BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,void (error_code, typename Protocol::endpoint)) + basic_stream:: +@@ -839,7 +839,7 @@ + template + template< + class Iterator, +- class IteratorConnectHandler> ++ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler> + BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator)) + basic_stream:: + async_connect( +@@ -860,7 +860,7 @@ + template< + class Iterator, + class ConnectCondition, +- class IteratorConnectHandler> ++ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler> + BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator)) + basic_stream:: + async_connect( +@@ -881,7 +881,7 @@ + //------------------------------------------------------------------------------ + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + basic_stream:: + async_read_some( +@@ -901,7 +901,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + basic_stream:: + async_write_some( +diff -aruN a/boost/beast/core/impl/buffered_read_stream.hpp b/boost/beast/core/impl/buffered_read_stream.hpp +--- a/boost/beast/core/impl/buffered_read_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/core/impl/buffered_read_stream.hpp 2020-05-02 13:50:11.144761733 -0400 +@@ -110,7 +110,7 @@ + operator()( + ReadHandler&& h, + buffered_read_stream* s, +- Buffers const& b) ++ Buffers const* b) + { + // If you get an error on the following line it means + // that your handler does not meet the documented type +@@ -124,7 +124,7 @@ + read_op< + Buffers, + typename std::decay::type>( +- std::forward(h), *s, b); ++ std::forward(h), *s, *b); + } + }; + +@@ -141,7 +141,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + buffered_read_stream:: + async_write_some( +@@ -153,7 +153,7 @@ + static_assert(net::is_const_buffer_sequence< + ConstBufferSequence>::value, + "ConstBufferSequence type requirements not met"); +- static_assert(detail::is_invocable::value, + "WriteHandler type requirements not met"); + return next_layer_.async_write_some(buffers, +@@ -212,7 +212,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + buffered_read_stream:: + async_read_some( +@@ -233,7 +233,7 @@ + typename ops::run_read_op{}, + handler, + this, +- buffers); ++ &buffers); + } + + } // beast +diff -aruN a/boost/beast/core/impl/flat_stream.hpp b/boost/beast/core/impl/flat_stream.hpp +--- a/boost/beast/core/impl/flat_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/core/impl/flat_stream.hpp 2020-05-02 13:50:11.145761743 -0400 +@@ -144,7 +144,7 @@ + template + template< + class MutableBufferSequence, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + flat_stream:: + async_read_some( +@@ -225,7 +225,7 @@ + template + template< + class ConstBufferSequence, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + flat_stream:: + async_write_some( +diff -aruN a/boost/beast/_experimental/http/impl/icy_stream.hpp b/boost/beast/_experimental/http/impl/icy_stream.hpp +--- a/boost/beast/_experimental/http/impl/icy_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/_experimental/http/impl/icy_stream.hpp 2020-05-02 13:50:11.146761754 -0400 +@@ -259,7 +259,7 @@ + template + template< + class MutableBufferSequence, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + icy_stream:: + async_read_some( +@@ -311,7 +311,7 @@ + template + template< + class MutableBufferSequence, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + icy_stream:: + async_write_some( +diff -aruN a/boost/beast/_experimental/test/impl/stream.hpp b/boost/beast/_experimental/test/impl/stream.hpp +--- a/boost/beast/_experimental/test/impl/stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/_experimental/test/impl/stream.hpp 2020-05-02 13:50:11.147761765 -0400 +@@ -306,7 +306,7 @@ + return 0; + } + +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + stream:: + async_read_some( +@@ -386,7 +386,7 @@ + return n; + } + +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + stream:: + async_write_some( +diff -aruN a/boost/beast/http/field.hpp b/boost/beast/http/field.hpp +--- a/boost/beast/http/field.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/http/field.hpp 2020-05-02 13:50:11.149761786 -0400 +@@ -396,12 +396,9 @@ + string_to_field(string_view s); + + /// Write the text for a field name to an output stream. +-inline ++BOOST_BEAST_DECL + std::ostream& +-operator<<(std::ostream& os, field f) +-{ +- return os << to_string(f); +-} ++operator<<(std::ostream& os, field f); + + } // http + } // beast +diff -aruN a/boost/beast/http/impl/field.ipp b/boost/beast/http/impl/field.ipp +--- a/boost/beast/http/impl/field.ipp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/http/impl/field.ipp 2020-05-02 13:50:11.150761798 -0400 +@@ -11,10 +11,12 @@ + #define BOOST_BEAST_HTTP_IMPL_FIELD_IPP + + #include ++#include + #include + #include + #include +-#include ++#include ++ + + namespace boost { + namespace beast { +@@ -565,6 +567,12 @@ + return detail::get_field_table().string_to_field(s); + } + ++std::ostream& ++operator<<(std::ostream& os, field f) ++{ ++ return os << to_string(f); ++} ++ + } // http + } // beast + } // boost +diff -aruN a/boost/beast/http/impl/file_body_win32.hpp b/boost/beast/http/impl/file_body_win32.hpp +--- a/boost/beast/http/impl/file_body_win32.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/http/impl/file_body_win32.hpp 2020-05-02 13:50:11.150761798 -0400 +@@ -597,7 +597,7 @@ + template< + class Protocol, class Executor, + bool isRequest, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write_some( + net::basic_stream_socket< +diff -aruN a/boost/beast/http/impl/read.hpp b/boost/beast/http/impl/read.hpp +--- a/boost/beast/http/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/http/impl/read.hpp 2020-05-02 13:50:11.150761798 -0400 +@@ -304,7 +304,7 @@ + class AsyncReadStream, + class DynamicBuffer, + bool isRequest, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read_some( + AsyncReadStream& stream, +@@ -373,7 +373,7 @@ + class AsyncReadStream, + class DynamicBuffer, + bool isRequest, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read_header( + AsyncReadStream& stream, +@@ -443,7 +443,7 @@ + class AsyncReadStream, + class DynamicBuffer, + bool isRequest, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read( + AsyncReadStream& stream, +@@ -531,7 +531,7 @@ + class AsyncReadStream, + class DynamicBuffer, + bool isRequest, class Body, class Allocator, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read( + AsyncReadStream& stream, +diff -aruN a/boost/beast/http/impl/write.hpp b/boost/beast/http/impl/write.hpp +--- a/boost/beast/http/impl/write.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/http/impl/write.hpp 2020-05-02 13:50:11.150761798 -0400 +@@ -463,7 +463,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write_some_impl( + AsyncWriteStream& stream, +@@ -526,7 +526,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write_some( + AsyncWriteStream& stream, +@@ -608,7 +608,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write_header( + AsyncWriteStream& stream, +@@ -681,7 +681,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write( + AsyncWriteStream& stream, +@@ -801,7 +801,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write( + AsyncWriteStream& stream, +@@ -830,7 +830,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write( + AsyncWriteStream& stream, +diff -aruN a/boost/beast/http/span_body.hpp b/boost/beast/http/span_body.hpp +--- a/boost/beast/http/span_body.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/http/span_body.hpp 2020-05-02 13:50:11.151761808 -0400 +@@ -36,8 +36,10 @@ + struct span_body + { + private: +- static_assert(std::is_pod::value, +- "POD requirements not met"); ++ static_assert( ++ std::is_trivial::value && ++ std::is_standard_layout::value, ++ "POD requirements not met"); + + public: + /** The type of container used for the body +diff -aruN a/boost/beast/ssl/ssl_stream.hpp b/boost/beast/ssl/ssl_stream.hpp +--- a/boost/beast/ssl/ssl_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/ssl/ssl_stream.hpp 2020-05-02 13:50:11.151761808 -0400 +@@ -555,7 +555,7 @@ + need to ensure that all data is written before the asynchronous operation + completes. + */ +- template ++ template + BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, void(boost::system::error_code, std::size_t)) + async_write_some(ConstBufferSequence const& buffers, + BOOST_ASIO_MOVE_ARG(WriteHandler) handler) +@@ -636,7 +636,7 @@ + if you need to ensure that the requested amount of data is read before + the asynchronous operation completes. + */ +- template ++ template + BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void(boost::system::error_code, std::size_t)) + async_read_some(MutableBufferSequence const& buffers, + BOOST_ASIO_MOVE_ARG(ReadHandler) handler) +diff -aruN a/boost/beast/version.hpp b/boost/beast/version.hpp +--- a/boost/beast/version.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/version.hpp 2020-05-02 13:50:11.151761808 -0400 +@@ -20,7 +20,7 @@ + This is a simple integer that is incremented by one every + time a set of code changes is merged to the develop branch. + */ +-#define BOOST_BEAST_VERSION 290 ++#define BOOST_BEAST_VERSION 292 + + #define BOOST_BEAST_VERSION_STRING "Boost.Beast/" BOOST_STRINGIZE(BOOST_BEAST_VERSION) + +diff -aruN a/boost/beast/websocket/impl/accept.hpp b/boost/beast/websocket/impl/accept.hpp +--- a/boost/beast/websocket/impl/accept.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/websocket/impl/accept.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -542,7 +542,7 @@ + + template + template< +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept( +@@ -564,7 +564,7 @@ + template + template< + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept_ex( +@@ -590,7 +590,7 @@ + template + template< + class ConstBufferSequence, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept( +@@ -621,7 +621,7 @@ + template< + class ConstBufferSequence, + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept_ex( +@@ -654,7 +654,7 @@ + template + template< + class Body, class Allocator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept( +@@ -678,7 +678,7 @@ + template< + class Body, class Allocator, + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept_ex( +diff -aruN a/boost/beast/websocket/impl/close.hpp b/boost/beast/websocket/impl/close.hpp +--- a/boost/beast/websocket/impl/close.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/websocket/impl/close.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -382,7 +382,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(CloseHandler) + stream:: + async_close(close_reason const& cr, CloseHandler&& handler) +diff -aruN a/boost/beast/websocket/impl/handshake.hpp b/boost/beast/websocket/impl/handshake.hpp +--- a/boost/beast/websocket/impl/handshake.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/websocket/impl/handshake.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -268,7 +268,7 @@ + //------------------------------------------------------------------------------ + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(HandshakeHandler) + stream:: + async_handshake( +@@ -293,7 +293,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(HandshakeHandler) + stream:: + async_handshake( +diff -aruN a/boost/beast/websocket/impl/ping.hpp b/boost/beast/websocket/impl/ping.hpp +--- a/boost/beast/websocket/impl/ping.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/websocket/impl/ping.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -288,7 +288,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(WriteHandler) + stream:: + async_ping(ping_data const& payload, WriteHandler&& handler) +@@ -306,7 +306,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(WriteHandler) + stream:: + async_pong(ping_data const& payload, WriteHandler&& handler) +diff -aruN a/boost/beast/websocket/impl/read.hpp b/boost/beast/websocket/impl/read.hpp +--- a/boost/beast/websocket/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/websocket/impl/read.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -804,7 +804,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + stream:: + async_read(DynamicBuffer& buffer, ReadHandler&& handler) +@@ -878,7 +878,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + stream:: + async_read_some( +@@ -1263,7 +1263,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + stream:: + async_read_some( +diff -aruN a/boost/beast/websocket/impl/write.hpp b/boost/beast/websocket/impl/write.hpp +--- a/boost/beast/websocket/impl/write.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/websocket/impl/write.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -700,7 +700,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + stream:: + async_write_some(bool fin, +@@ -756,7 +756,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + stream:: + async_write( +diff -aruN a/boost/beast/websocket/stream.hpp b/boost/beast/websocket/stream.hpp +--- a/boost/beast/websocket/stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/boost/beast/websocket/stream.hpp 2020-05-02 13:50:11.154761841 -0400 +@@ -2634,7 +2634,7 @@ + + template< + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + async_accept_ex( + ResponseDecorator const& decorator, +@@ -2643,7 +2643,7 @@ + template< + class ConstBufferSequence, + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + async_accept_ex( + ConstBufferSequence const& buffers, +@@ -2656,7 +2656,7 @@ + template< + class Body, class Allocator, + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + async_accept_ex( + http::request ++ template + typename net::async_result::return_type + async_read(AsyncReadStream& stream, net::mutable_buffer buffer, ReadHandler&& handler) + { +diff -aruN a/libs/beast/test/beast/core/basic_stream.cpp b/libs/beast/test/beast/core/basic_stream.cpp +--- a/libs/beast/test/beast/core/basic_stream.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/core/basic_stream.cpp 2020-05-02 13:51:02.470315892 -0400 +@@ -30,6 +30,13 @@ + #include + #include + ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#include ++#include ++#endif ++ ++ + namespace boost { + namespace beast { + +@@ -258,7 +265,7 @@ + { + string_view s_; + net::ip::tcp::socket socket_; +- ++ + public: + session( + string_view s, +@@ -1297,6 +1304,52 @@ + + //-------------------------------------------------------------------------- + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompilation( ++ basic_stream& stream, ++ net::mutable_buffer outbuf, ++ net::const_buffer inbuf, ++ net::ip::tcp::resolver::results_type resolve_results) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_read_some(outbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_write_some(inbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_connect( ++ resolve_results.begin(), ++ resolve_results.end(), ++ net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_connect( ++ resolve_results, ++ net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_connect( ++ resolve_results.begin()->endpoint(), ++ net::use_awaitable))>); ++ ++ auto comparison_function = [](error_code&, net::ip::tcp::endpoint) { return true; }; ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_connect( ++ resolve_results.begin(), ++ resolve_results.end(), ++ comparison_function, ++ net::use_awaitable))>); ++ } ++#endif ++ + void + run() + { +@@ -1307,6 +1360,11 @@ + testMembers(); + testJavadocs(); + testIssue1589(); ++ ++#if BOOST_ASIO_HAS_CO_AWAIT ++ // test for compilation success only ++ boost::ignore_unused(&basic_stream_test::testAwaitableCompilation); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/core/buffered_read_stream.cpp b/libs/beast/test/beast/core/buffered_read_stream.cpp +--- a/libs/beast/test/beast/core/buffered_read_stream.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/core/buffered_read_stream.cpp 2020-05-02 13:51:02.470315892 -0400 +@@ -21,6 +21,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -211,6 +214,22 @@ + } + }; + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ buffered_read_stream& stream, ++ net::mutable_buffer rxbuf, ++ net::const_buffer txbuf) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_read_some(rxbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_write_some(txbuf, net::use_awaitable))>); ++ } ++#endif ++ + void run() override + { + testSpecialMembers(); +@@ -221,6 +240,10 @@ + }); + + testAsyncLoop(); ++ ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&buffered_read_stream_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/core/detect_ssl.cpp b/libs/beast/test/beast/core/detect_ssl.cpp +--- a/libs/beast/test/beast/core/detect_ssl.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/core/detect_ssl.cpp 2020-05-02 13:51:02.470315892 -0400 +@@ -16,6 +16,11 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#include ++#include ++#endif + namespace boost { + namespace beast { + +@@ -166,12 +171,25 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles(test::stream& stream, flat_buffer& b) ++ { ++ static_assert( ++ std::is_same_v< ++ net::awaitable, decltype( ++ async_detect_ssl(stream, b, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { + testDetect(); + testRead(); + testAsyncRead(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&detect_ssl_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/core/flat_stream.cpp b/libs/beast/test/beast/core/flat_stream.cpp +--- a/libs/beast/test/beast/core/flat_stream.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/core/flat_stream.cpp 2020-05-02 13:51:02.471315902 -0400 +@@ -17,6 +17,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -208,11 +211,30 @@ + check({1,2,3,4}, 3, 3, true); + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ flat_stream& stream, ++ net::mutable_buffer rxbuf, ++ net::const_buffer txbuf) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_read_some(rxbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_write_some(txbuf, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { + testMembers(); + testSplit(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&flat_stream_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/core/stream_traits.cpp b/libs/beast/test/beast/core/stream_traits.cpp +--- a/libs/beast/test/beast/core/stream_traits.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/core/stream_traits.cpp 2020-05-02 13:51:02.471315902 -0400 +@@ -214,14 +214,14 @@ + struct async_read_stream + { + net::io_context::executor_type get_executor() noexcept; +- template ++ template + void async_read_some(MutableBufferSequence const&, ReadHandler&&); + }; + + struct async_write_stream + { + net::io_context::executor_type get_executor() noexcept; +- template ++ template + void async_write_some(ConstBufferSequence const&, WriteHandler&&); + }; + +@@ -232,9 +232,9 @@ + struct async_stream : async_read_stream, async_write_stream + { + net::io_context::executor_type get_executor() noexcept; +- template ++ template + void async_read_some(MutableBufferSequence const&, ReadHandler&&); +- template ++ template + void async_write_some(ConstBufferSequence const&, WriteHandler&&); + }; + +diff -aruN a/libs/beast/test/beast/http/CMakeLists.txt b/libs/beast/test/beast/http/CMakeLists.txt +--- a/libs/beast/test/beast/http/CMakeLists.txt 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/http/CMakeLists.txt 2020-05-02 13:51:02.472315914 -0400 +@@ -26,6 +26,7 @@ + empty_body.cpp + error.cpp + field.cpp ++ field_compiles.cpp + fields.cpp + file_body.cpp + message.cpp +diff -aruN a/libs/beast/test/beast/http/field_compiles.cpp b/libs/beast/test/beast/http/field_compiles.cpp +--- a/libs/beast/test/beast/http/field_compiles.cpp 1969-12-31 19:00:00.000000000 -0500 ++++ b/libs/beast/test/beast/http/field_compiles.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -0,0 +1,11 @@ ++// ++// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) ++// ++// Distributed under the Boost Software License, Version 1.0. (See accompanying ++// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ++// ++// Official repository: https://github.com/boostorg/beast ++// ++ ++// Test that header file is self-contained. ++#include +diff -aruN a/libs/beast/test/beast/http/Jamfile b/libs/beast/test/beast/http/Jamfile +--- a/libs/beast/test/beast/http/Jamfile 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/http/Jamfile 2020-05-02 13:51:02.472315914 -0400 +@@ -16,6 +16,7 @@ + dynamic_body.cpp + error.cpp + field.cpp ++ field_compiles.cpp + fields.cpp + file_body.cpp + message.cpp +diff -aruN a/libs/beast/test/beast/http/read.cpp b/libs/beast/test/beast/http/read.cpp +--- a/libs/beast/test/beast/http/read.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/http/read.cpp 2020-05-02 13:51:02.472315914 -0400 +@@ -25,6 +25,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -529,6 +532,49 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ test::stream& stream, ++ flat_buffer& dynbuf, ++ parser& request_parser, ++ request& request, ++ parser& response_parser, ++ response& response) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read(stream, dynbuf, request, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read(stream, dynbuf, request_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read(stream, dynbuf, response, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read(stream, dynbuf, response_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read_some(stream, dynbuf, request_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read_some(stream, dynbuf, response_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read_header(stream, dynbuf, request_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read_header(stream, dynbuf, response_parser, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -552,6 +598,9 @@ + testRegression430(); + testReadGrind(); + testAsioHandlerInvoke(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&read_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/http/write.cpp b/libs/beast/test/beast/http/write.cpp +--- a/libs/beast/test/beast/http/write.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/http/write.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -26,6 +26,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -994,6 +997,59 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ test::stream& stream, ++ serializer& request_serializer, ++ request& req, ++ request const& creq, ++ serializer& response_serializer, ++ response& resp, ++ response const& cresp) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, request_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, response_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, req, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, creq, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, resp, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, cresp, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write_some(stream, request_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write_some(stream, response_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write_header(stream, request_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write_header(stream, response_serializer, net::use_awaitable))>); ++ } ++#endif ++ ++ + void + run() override + { +@@ -1017,6 +1073,9 @@ + }); + testAsioHandlerInvoke(); + testBodyWriters(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&write_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/websocket/accept.cpp b/libs/beast/test/beast/websocket/accept.cpp +--- a/libs/beast/test/beast/websocket/accept.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/websocket/accept.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -14,7 +14,9 @@ + #include + #include + #include "test.hpp" +- ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + namespace boost { + namespace beast { + namespace websocket { +@@ -810,6 +812,27 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ http::request& req, ++ net::mutable_buffer buf ++ ) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_accept(net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_accept(req, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_accept(buf, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -820,6 +843,9 @@ + testInvalidInputs(); + testEndOfStream(); + testAsync(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&accept_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/websocket/close.cpp b/libs/beast/test/beast/websocket/close.cpp +--- a/libs/beast/test/beast/websocket/close.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/websocket/close.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -16,6 +16,9 @@ + + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -735,6 +738,15 @@ + } + }; + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles(stream& s, close_reason cr ) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_close(cr, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -742,6 +754,9 @@ + testTimeout(); + testSuspend(); + testMoveOnly(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&close_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/websocket/handshake.cpp b/libs/beast/test/beast/websocket/handshake.cpp +--- a/libs/beast/test/beast/websocket/handshake.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/websocket/handshake.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -18,6 +18,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -704,6 +707,23 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ std::string host, ++ std::string port, ++ response_type& resp) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_handshake(host, port, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_handshake(resp, host, port, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -714,6 +734,9 @@ + testMoveOnly(); + testAsync(); + testIssue1460(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&handshake_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/websocket/ping.cpp b/libs/beast/test/beast/websocket/ping.cpp +--- a/libs/beast/test/beast/websocket/ping.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/websocket/ping.cpp 2020-05-02 13:51:02.474315935 -0400 +@@ -18,6 +18,10 @@ + #include + #include + ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif ++ + namespace boost { + namespace beast { + namespace websocket { +@@ -483,12 +487,30 @@ + } + }; + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ ping_data& pdat) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_ping(pdat, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_pong(pdat, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { + testPing(); + testSuspend(); + testMoveOnly(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&ping_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/websocket/read2.cpp b/libs/beast/test/beast/websocket/read2.cpp +--- a/libs/beast/test/beast/websocket/read2.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/websocket/read2.cpp 2020-05-02 13:51:02.474315935 -0400 +@@ -14,6 +14,10 @@ + + #include + ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif ++ + #include + #if BOOST_WORKAROUND(BOOST_GCC, < 80200) + #define BOOST_BEAST_SYMBOL_HIDDEN __attribute__ ((visibility("hidden"))) +@@ -673,10 +677,34 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ flat_buffer& dynbuf, ++ net::mutable_buffer buf, ++ std::size_t limit) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_read(dynbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_read_some(buf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_read_some(dynbuf, limit, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { + testRead(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&read2_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/libs/beast/test/beast/websocket/write.cpp b/libs/beast/test/beast/websocket/write.cpp +--- a/libs/beast/test/beast/websocket/write.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/libs/beast/test/beast/websocket/write.cpp 2020-05-02 13:51:02.474315935 -0400 +@@ -13,6 +13,10 @@ + #include + #include + ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif ++ + #include "test.hpp" + + namespace boost { +@@ -716,6 +720,22 @@ + BEAST_EXPECT(n1 < n0 + s.size()); + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ net::mutable_buffer buf, ++ bool fin) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_write(buf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_write_some(fin, buf, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -726,6 +746,9 @@ + testMoveOnly(); + testIssue300(); + testIssue1666(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&write_test::testAwaitableCompiles); ++#endif + } + }; + diff --git a/libs/boost/patches/101-uclibc-ng-math.patch b/libs/boost/patches/101-uclibc-ng-math.patch deleted file mode 100644 index 0d166860..00000000 --- a/libs/boost/patches/101-uclibc-ng-math.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/boost/math/tools/roots.hpp -+++ b/boost/math/tools/roots.hpp -@@ -665,8 +665,8 @@ namespace detail - inline T discriminant(T const & a, T const & b, T const & c) - { - T w = 4*a*c; -- T e = std::fma(-c, 4*a, w); -- T f = std::fma(b, b, -w); -+ T e = fma(-c, 4*a, w); -+ T f = fma(b, b, -w); - return f + e; - } - } -@@ -674,7 +674,6 @@ namespace detail - template - auto quadratic_roots(T const& a, T const& b, T const& c) - { -- using std::copysign; - using std::sqrt; - if constexpr (std::is_integral::value) - { diff --git a/libs/c-ares/Makefile b/libs/c-ares/Makefile index a0189968..dcc3789e 100644 --- a/libs/c-ares/Makefile +++ b/libs/c-ares/Makefile @@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=c-ares -PKG_VERSION:=1.14.0 +PKG_VERSION:=1.16.1 PKG_RELEASE:=1 PKG_LICENSE:=MIT +PKG_CPE_ID:=cpe:/a:c-ares_project:c-ares PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://c-ares.haxx.se/download -PKG_HASH:=45d3c1fd29263ceec2afc8ff9cd06d5f8f889636eb4e80ce3cc7f0eaf7aadc6e +PKG_HASH:=d08312d0ecc3bd48eee0a4cc0d2137c9f194e0a28de2028928c0f6cae85f86ce PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/libs/cereal/Makefile b/libs/cereal/Makefile new file mode 100644 index 00000000..b0e0a8a5 --- /dev/null +++ b/libs/cereal/Makefile @@ -0,0 +1,48 @@ +# +# Copyright © 2020 David Woodhouse +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cereal +PKG_VERSION:=1.3.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/USCiLab/cereal/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=329ea3e3130b026c03a4acc50e168e7daff4e6e661bc6a7dfec0d77b570851d5 + +PKG_MAINTAINER:=David Woodhouse +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +CMAKE_OPTIONS += \ + -DCMAKE_CXX_FLAGS=-latomic \ + -DJUST_INSTALL_CEREAL=ON \ + -DSKIP_PORTABILITY_TEST=ON \ + -DSKIP_PERFORMANCE_COMPARISON=ON \ + -DWITH_WERROR=OFF + +define Package/cereal + BUILDONLY:=1 + SECTION:=devel + CATEGORY:=Development + SUBMENU:=Libraries + TITLE:=Cereal is a library of C++ header files for serialization + URL:=https://github.com/USCilab/cereal +endef + + +define Package/cereal/description + Cereal is a library of C++ headers for serialization +endef + +$(eval $(call BuildPackage,cereal)) diff --git a/libs/check/Makefile b/libs/check/Makefile index 2e042968..d1363b73 100644 --- a/libs/check/Makefile +++ b/libs/check/Makefile @@ -8,20 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=check -PKG_VERSION:=0.12.0 +PKG_VERSION:=0.15.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/libcheck/check/releases/download/$(PKG_VERSION) -PKG_HASH:=464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234 +PKG_HASH:=aea2e3c68fa6e1e92378e744b1c0db350ccda4b6bd0d19530d0ae185b3d1ac60 -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING.LESSER PKG_MAINTAINER:=Eduardo Abinader +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING.LESSER -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/check SECTION:=libs @@ -39,19 +41,9 @@ define Package/check/description code editors and IDEs. endef -TARGET_CFLAGS += $(FPIC) -CONFIGURE_VARS += \ - hw_cv_func_snprintf_c99=yes \ - hw_cv_func_vsnprintf_c99=yes \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/check*.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/check.pc $(1)/usr/lib/pkgconfig/ -endef +CMAKE_OPTIONS += \ + -DBUILD_TESTING=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON define Package/check/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/libs/classpath/Makefile b/libs/classpath/Makefile deleted file mode 100644 index b795ec9d..00000000 --- a/libs/classpath/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=classpath -PKG_VERSION:=0.99 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Dana H. Myers - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@GNU/classpath -PKG_HASH:=f929297f8ae9b613a1a167e231566861893260651d913ad9b6c11933895fecc8 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/classpath - SECTION:=libs - CATEGORY:=Libraries - TITLE:=GNU Classpath - URL:=http://www.gnu.org/software/classpath/ - DEPENDS:=+alsa-lib +libgmp +libmagic -endef - -define Package/classpath/Description - GNU Classpath, Essential Libraries for Java, is a GNU project - to create free core class libraries for use with virtual - machines and compilers for the java programming language. -endef - -define Package/classpath-tools - SECTION:=libs - CATEGORY:=Libraries - TITLE:=GNU Classpath tools - URL:=http://www.gnu.org/software/classpath/ -endef - -define Download/antlr - URL:=http://www.antlr.org/download - FILE:=antlr-3.4-complete.jar - HASH:=9d3e866b610460664522520f73b81777b5626fb0a282a5952b9800b751550bf7 -endef -$(eval $(call Download,antlr)) - -CONFIGURE_ARGS += \ - --with-gmp="$(STAGING_DIR)/usr" \ - --without-x \ - --disable-gtk-peer \ - --disable-qt-peer \ - --disable-dssi \ - --disable-plugin \ - --disable-gconf-peer \ - --disable-gjdoc \ - --disable-examples \ - --with-antlr-jar=$(DL_DIR)/antlr-3.4-complete.jar - -define Package/classpath/install - $(INSTALL_DIR) \ - $(1)/usr/lib/classpath \ - $(1)/usr/share/classpath - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/security \ - $(PKG_INSTALL_DIR)/usr/lib/logging.properties \ - $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/classpath/*.so* $(1)/usr/lib/classpath/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/classpath/glibj.zip $(1)/usr/share/classpath/ -endef - -define Package/classpath-tools/install - $(INSTALL_DIR) \ - $(1)/usr/bin \ - $(1)/usr/share/classpath - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/classpath/tools.zip $(1)/usr/share/classpath/ -endef - -define Build/InstallDev - $(CP) $(PKG_INSTALL_DIR)/* $(1)/ -endef - -$(eval $(call BuildPackage,classpath)) -$(eval $(call BuildPackage,classpath-tools)) diff --git a/libs/classpath/patches/010-double-memleak.patch b/libs/classpath/patches/010-double-memleak.patch deleted file mode 100644 index 02ec5ad8..00000000 --- a/libs/classpath/patches/010-double-memleak.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- classpath-0.99.orig/native/fdlibm/dtoa.c 2007-09-27 05:33:38.000000000 -0700 -+++ classpath-0.99/native/fdlibm/dtoa.c 2014-12-21 14:22:42.451713851 -0800 -@@ -883,6 +883,16 @@ ret1: - return s0; - } - -+void free_Bigints(struct _Jv_Bigint *p) -+{ -+ struct _Jv_Bigint *l = p; -+ while (l) -+ { -+ struct _Jv_Bigint *next = l->_next; -+ free (l); -+ l = next; -+ } -+} - - _VOID - _DEFUN (_dtoa, -@@ -905,16 +915,15 @@ _DEFUN (_dtoa, - p = _dtoa_r (&reent, _d, mode, ndigits, decpt, sign, rve, float_type); - strcpy (buf, p); - -- for (i = 0; i < reent._result_k; ++i) -+ for (i = 0; i < reent._max_k; ++i) - { -- struct _Jv_Bigint *l = reent._freelist[i]; -- while (l) -- { -- struct _Jv_Bigint *next = l->_next; -- free (l); -- l = next; -- } -+ free_Bigints(reent._freelist[i]); - } - if (reent._freelist) - free (reent._freelist); -+ -+ if (reent._result) -+ free(reent._result); -+ -+ free_Bigints(reent._p5s); - } ---- classpath-0.99.orig/native/jni/java-lang/java_lang_VMDouble.c 2008-02-08 09:42:57.000000000 -0800 -+++ classpath-0.99/native/jni/java-lang/java_lang_VMDouble.c 2014-12-21 14:35:50.733800626 -0800 -@@ -158,6 +158,17 @@ Java_java_lang_VMDouble_longBitsToDouble - return val.d; - } - -+static void free_Bigints(struct _Jv_Bigint *p) -+{ -+ struct _Jv_Bigint *l = p; -+ while (l) -+ { -+ struct _Jv_Bigint *next = l->_next; -+ free (l); -+ l = next; -+ } -+} -+ - /** - * Parse a double from a char array. - */ -@@ -167,7 +178,7 @@ parseDoubleFromChars(JNIEnv * env, const - char *endptr; - jdouble val = 0.0; - const char *p = buf, *end, *last_non_ws, *temp; -- int ok = 1; -+ int i, ok = 1; - - #ifdef DEBUG - fprintf (stderr, "java.lang.VMDouble.parseDouble (%s)\n", buf); -@@ -224,6 +235,18 @@ parseDoubleFromChars(JNIEnv * env, const - - val = _strtod_r (&reent, p, &endptr); - -+ for (i = 0; i < reent._max_k; ++i) -+ { -+ free_Bigints(reent._freelist[i]); -+ } -+ if (reent._freelist) -+ free (reent._freelist); -+ -+ if (reent._result) -+ free (reent._result); -+ -+ free_Bigints(reent._p5s); -+ - #ifdef DEBUG - fprintf (stderr, "java.lang.VMDouble.parseDouble val = %g\n", val); - fprintf (stderr, "java.lang.VMDouble.parseDouble %p != %p ???\n", diff --git a/libs/confuse/Makefile b/libs/confuse/Makefile index 5378d612..34a17e10 100644 --- a/libs/confuse/Makefile +++ b/libs/confuse/Makefile @@ -8,16 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=confuse -PKG_VERSION:=3.2.1 +PKG_VERSION:=3.2.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/martinh/libconfuse/releases/download/v$(PKG_VERSION) -PKG_HASH:=23c63272baf2ef4e2cbbafad2cf57de7eb81f006ec347c00b954819824add25e +PKG_HASH:=a9240b653d02e8cfc52db48e8c4224426e528e1faa09b65e8ca08a197fad210b PKG_MAINTAINER:= PKG_LICENSE:=ISC - -PKG_FIXUP:=autoreconf +PKG_CPE_ID:=cpe:/a:libconfuse_project:libconfuse include $(INCLUDE_DIR)/package.mk diff --git a/libs/cyrus-sasl/Makefile b/libs/cyrus-sasl/Makefile index 912eadd8..f0ae3c21 100644 --- a/libs/cyrus-sasl/Makefile +++ b/libs/cyrus-sasl/Makefile @@ -8,19 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cyrus-sasl -PKG_VERSION_BASE:=2.1.27 -PKG_VERSION:=$(PKG_VERSION_BASE)-rc7 -PKG_RELEASE:=1 +PKG_VERSION:=2.1.27 +PKG_RELEASE:=3 PKG_MAINTAINER:=W. Michael Petullo PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.cyrusimap.org/releases/ -PKG_HASH:=c1846b80e80286c94941a1e27974bba759b171ccad25d5b49bd8d9deab10f54b -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION_BASE) +PKG_HASH:=26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5 PKG_LICENSE:=BSD-4c BSD PKG_LICENSE_FILES:=COPYING cmulocal/COPYING saslauthd/COPYING +PKG_CPE_ID:=cpe:/a:cmu:cyrus-sasl PKG_FIXUP:=autoreconf PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config @@ -102,11 +101,13 @@ define Build/InstallDev ln -sf libsasl2.so $(1)/usr/lib/libsasl.so $(INSTALL_DIR) $(1)/usr/lib/sasl2 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(1)/usr/lib/sasl2/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsasl2.pc $(1)/usr/lib/pkgconfig/ endef define Package/libsasl2/install $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/sasl2 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so* $(1)/usr/lib/sasl2/ endef diff --git a/libs/czmq/Makefile b/libs/czmq/Makefile new file mode 100644 index 00000000..8442c5ce --- /dev/null +++ b/libs/czmq/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=czmq +PKG_VERSION:=4.2.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/zeromq/czmq/releases/download/v$(PKG_VERSION)/ +PKG_HASH:=cfab29c2b3cc8a845749758a51e1dd5f5160c1ef57e2a41ea96e4c2dcc8feceb + +PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf + +PKG_LICENSE:=MPLv2 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jan Pavlinec + +PKG_ABI_VERSION:=4 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/autotools.mk + +define Package/czmq + SECTION:=libs + CATEGORY:=Libraries + TITLE:=CZMQ High-level C binding for ZeroMQ + URL:=http://czmq.zeromq.org + ABI_VERSION:=$(PKG_ABI_VERSION) + DEPENDS:=+libzmq +libuuid +libpcre +libmicrohttpd +liblz4 +libcurl +endef + +define Package/czmq/description + High-level C binding for ZeroMQ which is high-performance asynchronous messaging + library, aimed at use in distributed or concurrent applications. +endef + +TARGET_CFLAGS += --std=c99 +CONFIGURE_ARGS += --without-docs + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ +endef + +define Package/czmq/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zmakecert $(1)/usr/bin/zmakecert + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/ + $(LN) /usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/libczmq.so + $(LN) /usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/libczmq.so.$(PKG_ABI_VERSION) +endef + +$(eval $(call BuildPackage,czmq)) diff --git a/libs/dtc/Makefile b/libs/dtc/Makefile index 27b0c33d..fe388eca 100644 --- a/libs/dtc/Makefile +++ b/libs/dtc/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2016 Yousong Zhou +# Copyright (C) 2016-2019 Yousong Zhou # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dtc -PKG_VERSION:=1.4.6 -PKG_RELEASE:=2 +PKG_VERSION:=1.6.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=382302bfcc3c40734be80ac620983971d911ec4cde798f551873f3eb008c7b7e +PKG_HASH:=10503b0217e1b07933e29e8d347a00015b2431bea5f59afe0bed3af30340c82d PKG_SOURCE_URL:=@KERNEL/software/utils/dtc PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=GPL @@ -25,7 +25,7 @@ define Package/dtc SECTION:=utils CATEGORY:=Utilities TITLE:=Device Tree Compiler - URL:=http://devicetree.org/Device_Tree_Compiler + URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git endef define Package/dtc/description @@ -45,7 +45,8 @@ define Package/fdt-utils SECTION:=utils CATEGORY:=Utilities TITLE:=Flat Device Tree Utilities - URL:=http://devicetree.org/Device_Tree_Compiler + URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git + DEPENDS:=+libfdt endef define Package/fdt-utils/install @@ -62,7 +63,7 @@ define Package/libfdt SECTION:=libs CATEGORY:=Libraries TITLE:=a utility library for reading and manipulating dtb files - URL:=http://devicetree.org/Device_Tree_Compiler + URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git endef define Package/libfdt/description @@ -74,14 +75,13 @@ define Package/libfdt/install $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib endef -TARGET_CFLAGS += \ - $(FPIC) - # NO_PYTHON is for disabling pylibfdt MAKE_FLAGS += \ PREFIX= \ NO_PYTHON=1 \ - CFLAGS="$(TARGET_CFLAGS)" + NO_VALGRIND=1 \ + NO_YAML=1 \ + EXTRA_CFLAGS=$(EXTRA_CFLAGS) \ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib diff --git a/libs/dtndht/Makefile b/libs/dtndht/Makefile index 2b79e490..5846249e 100644 --- a/libs/dtndht/Makefile +++ b/libs/dtndht/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dtndht PKG_VERSION:=0.2.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases @@ -33,6 +33,8 @@ define Package/dtndht/description A library with DHT functions for DTN name lookups. endef +TARGET_CFLAGS += -std=gnu89 + define Build/InstallDev $(INSTALL_DIR) $(1) $(CP) $(PKG_INSTALL_DIR)/* $(1)/ diff --git a/libs/elektra/Makefile b/libs/elektra/Makefile index f57e02c8..35164627 100644 --- a/libs/elektra/Makefile +++ b/libs/elektra/Makefile @@ -14,11 +14,11 @@ PKG_MAINTAINER:=Harald Geyer PKG_NAME:=elektra PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE.md -PKG_VERSION:=0.8.21 +PKG_VERSION:=0.9.2 PKG_RELEASE:=1 # Use this for official releasees -PKG_HASH:=51892570f18d1667d0da4d0908a091e41b41c20db9835765677109a3d150cd26 +PKG_HASH:=6f2fcf8aaed8863e1cc323265ca2617751ca50dac974b43a0811bcfd4a511f2e PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://ftp.libelektra.org/ftp/elektra/releases @@ -29,18 +29,18 @@ PKG_SOURCE_URL:=http://ftp.libelektra.org/ftp/elektra/releases #PKG_SOURCE_VERSION:=e97efb29a94f3a49cb952d06552fcf53708ea8c7 #PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_BUILD_DEPENDS:=elektra/host swig/host +PKG_BUILD_DEPENDS:= lua include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk +include $(INCLUDE_DIR)/nls.mk define Package/libelektra/Default SECTION:=libs CATEGORY:=Libraries TITLE:=Elektra URL:=http://www.libelektra.org/ - SUBMENU:=libelektra + SUBMENU:=LibElektra endef define Package/libelektra/Default-description @@ -93,15 +93,14 @@ endef define Package/libelektra-plugins $(call Package/libelektra/Default) TITLE:=Useful elektra plugins - DEPENDS:=+libelektra-core + DEPENDS:=+libelektra-core $(ICONV_DEPENDS) endef define CONTENT_ELEKTRA_PLUGINS_TEXT -base64 boolean cachefilter camel ccode conditionals csvstorage -date directoryvalue enum file filecheck glob hexcode hidden -hosts iconv ipaddr keytometa line lineendings list mathcheck -mini network null path profile range shell syslog uname -validation +base64 conditionals csvstorage date file filecheck glob hexcode +hexnumber hidden hosts iconv ipaddr keytometa line lineendings list +mathcheck macaddr mini network null path profile quickdump +range reference rgbcolor shell syslog type uname unit validation endef CONTENT_ELEKTRA_PLUGINS = $(strip $(CONTENT_ELEKTRA_PLUGINS_TEXT)) @@ -121,7 +120,7 @@ define Package/libelektra-cpp DEPENDS:=+libelektra-core +libstdcpp endef -CONTENT_ELEKTRA_CPP=dump regexstore struct type +CONTENT_ELEKTRA_CPP=ccode directoryvalue dump define Package/libelektra-cpp/description $(call Package/libelektra/Default-description) @@ -147,7 +146,7 @@ endef define Package/libelektra-crypto $(call Package/libelektra/Default) TITLE:=Elektra crypto plugin - DEPENDS:=+libelektra-core +libopenssl + DEPENDS:=+libelektra-core +libgcrypt endef define Package/libelektra-crypto/description @@ -232,17 +231,10 @@ $(call Package/libelektra/Default-description) This package contains support for storing the key database as yaml files. endef - -define Package/libelektra-python2 +define Package/libelektra-zmq $(call Package/libelektra/Default) - TITLE:=Elektra python2 plugin - DEPENDS:=+libelektra-core +python-light +libstdcpp -endef - -define Package/libelektra-python2/description -$(call Package/libelektra/Default-description) - -This package adds python2 support to elektra. + TITLE:=Elektra ZeroMQ transport plugins + DEPENDS:=+libelektra-core +libzmq endef define Package/libelektra-python3 @@ -260,7 +252,7 @@ endef define Package/libelektra-lua $(call Package/libelektra/Default) TITLE:=Elektra lua plugin - DEPENDS:=+libelektra-core +lua +libstdcpp + DEPENDS:=+libelektra-core +lua5.3 +libstdcpp endef define Package/libelektra-lua/description @@ -276,9 +268,9 @@ define Package/libelektra-extra endef define CONTENT_EXTRA_PLUGINS_TEXT -blockresolver c constants counter desktop dini dpkg error -fcrypt fstab logchange mozprefs passwd rename required -simplespeclang timeofday tracer +blockresolver c constants counter desktop dpkg error fcrypt +fstab logchange mozprefs passwd process rename +timeofday tracer yamlsmith endef CONTENT_ELEKTRA_EXTRA:=$(strip $(CONTENT_EXTRA_PLUGINS_TEXT)) @@ -292,6 +284,8 @@ are included in this package. Currently this includes: $(CONTENT_EXTRA_PLUGINS_TEXT) endef +CMAKE_BINARY_SUBDIR=build + CMAKE_OPTIONS = \ -DTARGET_PLUGIN_FOLDER="" \ -DBUILD_FULL=OFF \ @@ -302,35 +296,35 @@ CMAKE_OPTIONS = \ -DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \ -DKDB_DEFAULT_STORAGE=ini \ -DENABLE_OPTIMIZATIONS=OFF \ - -DPLUGINS="ALL;-multifile" - -CMAKE_HOST_OPTIONS = \ - -DCMAKE_SKIP_RPATH=FALSE \ - -DCMAKE_INSTALL_RPATH=$(STAGING_DIR_HOST)/lib/ \ - -DINSTALL_BUILD_TOOLS=ON \ - -DBUILD_STATIC=OFF \ - -DBUILD_DOCUMENTATION=OFF \ - -DINSTALL_SYSTEM_FILES=OFF \ - -DFORCE_IN_SOURCE_BUILD=ON \ - -DBUILD_TESTING=OFF \ - -DPLUGINS="ALL;-python2;-python" \ - -DTOOLS="gen;kdb" + -DPLUGINS="ALL;-multifile;-simpleini;-internalnotification" \ + -DIconv_INCLUDE_DIR="$(ICONV_PREFIX)/include" \ + -DIconv_LIBRARY="$(ICONV_PREFIX)/lib/libiconv.$(if $(CONFIG_BUILD_NLS),so,a)" \ + -DBINDINGS="MAINTAINED;-intercept_env;-intercept_fs;-io_uv;-io_ev;-io_glib" define Package/libelektra-core/install $(INSTALL_DIR) $(1)/etc/kdb/ $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-core.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ease.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-globbing.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-highlevel.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-invoke.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-io.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-kdb.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-merge.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-meta.so* $(1)/usr/lib/ + #The next is excluded because of an upstream bug + #$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-notification.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-opts.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-plugin.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-pluginprocess.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-proposal.so* $(1)/usr/lib/ #The next is only supported with glibc, so skip it. #$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektraintercept-* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_fm_pb_b.so $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-utility.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-cache.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-mmapstorage.so $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ni.so $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ini.so $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-sync.so $(1)/usr/lib/ @@ -371,7 +365,7 @@ endef define Package/libelektra-crypto/install $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-crypto_openssl.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-crypto.so $(1)/usr/lib/ endef define Package/libelektra-curlget/install @@ -382,6 +376,7 @@ endef define Package/libelektra-dbus/install $(INSTALL_DIR) $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbus.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbusrecv.so $(1)/usr/lib/ endef define Package/libelektra-xerces/install @@ -404,9 +399,10 @@ define Package/libelektra-yamlcpp/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yamlcpp.so $(1)/usr/lib/ endef -define Package/libelektra-python2/install +define Package/libelektra-zmq/install $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python2.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-zeromqsend.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-zeromqrecv.so $(1)/usr/lib/ endef define Package/libelektra-python3/install @@ -431,8 +427,6 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ endef - -$(eval $(call HostBuild)) $(eval $(call BuildPackage,libelektra-core)) $(eval $(call BuildPackage,elektra-kdb)) $(eval $(call BuildPackage,libelektra-resolvers)) @@ -446,7 +440,7 @@ $(eval $(call BuildPackage,libelektra-xerces)) $(eval $(call BuildPackage,libelektra-yamlcpp)) $(eval $(call BuildPackage,libelektra-xml)) $(eval $(call BuildPackage,libelektra-yajl)) -$(eval $(call BuildPackage,libelektra-python2)) $(eval $(call BuildPackage,libelektra-python3)) $(eval $(call BuildPackage,libelektra-lua)) +$(eval $(call BuildPackage,libelektra-zmq)) $(eval $(call BuildPackage,libelektra-extra)) diff --git a/libs/eventlog/Makefile b/libs/eventlog/Makefile deleted file mode 100644 index f24ace52..00000000 --- a/libs/eventlog/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=eventlog -PKG_VERSION:=0.2.12 -PKG_RELEASE:=2 - -PKG_MAINTAINER:=W. Michael Petullo - -PKG_SOURCE_URL:=https://my.balabit.com/downloads/eventlog/0.2/ -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_HASH:=494dac8e01dc5ce323df2ad554d94874938dab51aa025987677b2bc6906a9c66 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/libeventlog - SECTION:=libs - CATEGORY:=Libraries - TITLE:=A new API to format and send structured log messages. -endef - -define Package/eventlog/description - A new API to format and send structured log messages. It supports multiple message - representations (plain, XML attributes and XML tags) and multiple output methods - (local syslogd). -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/libeventlog/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libeventlog)) diff --git a/libs/faad2/Makefile b/libs/faad2/Makefile index f2df769c..a4b573d5 100644 --- a/libs/faad2/Makefile +++ b/libs/faad2/Makefile @@ -6,16 +6,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=faad2 -PKG_VERSION:=2.8.6 +PKG_VERSION:=2.9.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/faac/faad2-src/$(PKG_NAME)-2.8.0 -PKG_HASH:=654977adbf62eb81f4fca00152aca58ce3b6dd157181b9edd7bed687a7c73f21 +PKG_SOURCE_URL:=https://codeload.github.com/knik0/faad2/tar.gz/2_9_2? +PKG_HASH:=9728b2b94f94ab49363cd229e7377fbe6ef3c311c5cd80da662d53ddb0ee091d +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2_9_2 + PKG_MAINTAINER:=Ted Hess +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:audiocoding:freeware_advanced_audio_decoder_2 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -56,17 +62,14 @@ $(call Package/faad2/Default/description) This package contains the library. endef -TARGET_CFLAGS += $(FPIC) -CONFIGURE_ARGS+= --without-xmms +TARGET_CFLAGS += \ + $(if $(CONFIG_BUILD_PATENTED),,-DLC_ONLY_DECODER) \ + $(if $(CONFIG_SOFT_FLOAT),-DFIXED_POINT) -ifeq ($(CONFIG_SOFT_FLOAT),y) - TARGET_CFLAGS+= -DFIXED_POINT - CONFIGURE_ARGS+= -nfp -endif - -ifeq ($(CONFIG_USE_UCLIBC),y) - CONFIGURE_VARS+= CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log" -endif +CONFIGURE_ARGS += \ + --without-drm \ + --without-mpeg4ip \ + --without-xmms define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/libs/faad2/patches/030-sbr-ps-dec.patch b/libs/faad2/patches/030-sbr-ps-dec.patch new file mode 100644 index 00000000..19710c38 --- /dev/null +++ b/libs/faad2/patches/030-sbr-ps-dec.patch @@ -0,0 +1,20 @@ +--- a/libfaad/common.h ++++ b/libfaad/common.h +@@ -120,8 +120,7 @@ extern "C" { + #undef DRM_PS + #undef ALLOW_SMALL_FRAMELENGTH + #undef ERROR_RESILIENCE +-#endif +- ++#else + #define SBR_DEC + //#define SBR_LOW_POWER + #define PS_DEC +@@ -129,6 +128,7 @@ extern "C" { + #ifdef SBR_LOW_POWER + #undef PS_DEC + #endif ++#endif + + /* FIXED POINT: No MAIN decoding */ + #ifdef FIXED_POINT diff --git a/libs/fcgi/Makefile b/libs/fcgi/Makefile deleted file mode 100644 index afa66dfc..00000000 --- a/libs/fcgi/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# -# Copyright (C) 2007-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fcgi -PKG_VERSION:=2.4.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.fastcgi.com/dist/ -PKG_HASH:=66fc45c6b36a21bf2fbbb68e90f780cc21a9da1fffbae75e76d2b4402d3f05b9 - -PKG_FIXUP:=libtool-ucxx - -PKG_MAINTAINER:=Jacob Siverskog - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk - -define Package/fcgi/Default - SECTION:=libs - CATEGORY:=Libraries - URL:=http://www.fastcgi.com/ -endef - -define Package/fcgi - $(call Package/fcgi/Default) - MENU:=1 - DEPENDS:= +libpthread - TITLE:=Shared library of FastCGI -endef - -define Package/fcgixx - $(call Package/fcgi/Default) - DEPENDS:=fcgi $(CXX_DEPENDS) - TITLE:=Shared library of FastCGI++ -endef - -define Package/fcgi/description - FastCGI is a language independent, scalable, open extension to - CGI that provides high performance without the limitations of - server specific APIs. -endef - -TARGET_CFLAGS += $(FPIC) - -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - -CONFIGURE_VARS += \ - LIBS="-lm" \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/fcgi{app,_config,misc,o,os,_stdio}.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi{,++}.{a,so*} $(1)/usr/lib/ -endef - -define Package/fcgi/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgi-fcgi $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so.* $(1)/usr/lib/ -endef - -define Package/fcgixx/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi++.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,fcgi)) -$(eval $(call BuildPackage,fcgixx)) diff --git a/libs/fcgi/patches/100-fcgio-int-type-fix.patch b/libs/fcgi/patches/100-fcgio-int-type-fix.patch deleted file mode 100644 index 0fbfbfd2..00000000 --- a/libs/fcgi/patches/100-fcgio-int-type-fix.patch +++ /dev/null @@ -1,38 +0,0 @@ -Index: fcgi-2.4.0/include/fcgio.h -=================================================================== ---- fcgi-2.4.0.orig/include/fcgio.h 2007-07-17 13:30:28.000000000 +0200 -+++ fcgi-2.4.0/include/fcgio.h 2007-07-17 13:30:28.000000000 +0200 -@@ -77,10 +77,10 @@ - virtual int sync(); - - // Remove and return the current character. -- virtual int uflow(); -+ virtual int_type uflow(); - - // Fill the get area (if buffered) and return the current character. -- virtual int underflow(); -+ virtual int_type underflow(); - - // Use a buffer. The only reasons that a buffer would be useful is - // to support the use of the unget()/putback() or seek() methods. Using -diff -urN fcgi-2.4.0/libfcgi/fcgio.cpp fcgi-2.4.0.new/libfcgi/fcgio.cpp ---- fcgi-2.4.0/libfcgi/fcgio.cpp 2002-02-24 21:12:22.000000000 +0100 -+++ fcgi-2.4.0.new/libfcgi/fcgio.cpp 2007-08-28 11:22:22.000000000 +0200 -@@ -89,7 +89,7 @@ - } - - // uflow() removes the char, underflow() doesn't --int fcgi_streambuf::uflow() -+std::basic_streambuf::int_type fcgi_streambuf::uflow() - { - int rv = underflow(); - if (this->bufsize) gbump(1); -@@ -97,7 +97,7 @@ - } - - // Note that the expected behaviour when there is no buffer varies --int fcgi_streambuf::underflow() -+std::basic_streambuf::int_type fcgi_streambuf::underflow() - { - if (this->bufsize) - { diff --git a/libs/fcgi/patches/110-no_examples.patch b/libs/fcgi/patches/110-no_examples.patch deleted file mode 100644 index 8c14e8ad..00000000 --- a/libs/fcgi/patches/110-no_examples.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urN fcgi-2.4.0/Makefile.am fcgi-2.4.0.new/Makefile.am ---- fcgi-2.4.0/Makefile.am 2001-12-22 14:05:39.000000000 +0100 -+++ fcgi-2.4.0.new/Makefile.am 2007-08-28 11:05:10.000000000 +0200 -@@ -4,7 +4,7 @@ - # $Id: Makefile.am,v 1.7 2001/12/22 13:05:39 robs Exp $ - # - --SUBDIRS = libfcgi cgi-fcgi examples include -+SUBDIRS = libfcgi cgi-fcgi include - - include_HEADERS = fcgi_config.h - -diff -urN fcgi-2.4.0/Makefile.in fcgi-2.4.0.new/Makefile.in ---- fcgi-2.4.0/Makefile.in 2003-01-19 18:21:15.000000000 +0100 -+++ fcgi-2.4.0.new/Makefile.in 2007-08-28 11:04:55.000000000 +0200 -@@ -93,7 +93,7 @@ - am__quote = @am__quote@ - install_sh = @install_sh@ - --SUBDIRS = libfcgi cgi-fcgi examples include -+SUBDIRS = libfcgi cgi-fcgi include - - include_HEADERS = fcgi_config.h - diff --git a/libs/fcgi/patches/120-stdio.patch b/libs/fcgi/patches/120-stdio.patch deleted file mode 100644 index 94c78943..00000000 --- a/libs/fcgi/patches/120-stdio.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: fcgi-2.4.0/libfcgi/fcgio.cpp -=================================================================== ---- fcgi-2.4.0.orig/libfcgi/fcgio.cpp 2014-05-15 10:43:15.153971782 +0200 -+++ fcgi-2.4.0/libfcgi/fcgio.cpp 2014-05-15 10:44:44.037974020 +0200 -@@ -23,6 +23,7 @@ - #endif - - #include -+#include - #include "fcgio.h" - - using std::streambuf; diff --git a/libs/fftw3/Makefile b/libs/fftw3/Makefile deleted file mode 100644 index 492b1165..00000000 --- a/libs/fftw3/Makefile +++ /dev/null @@ -1,121 +0,0 @@ -# -# Copyright (C) 2007-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fftw3 -PKG_VERSION:=3.3.7 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0+ - -PKG_SOURCE:=fftw-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.fftw.org -PKG_HASH:=3b609b7feba5230e8f6dd8d245ddbefac324c5a6ae4186947670d9ac2cd25573 - -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/fftw-$(PKG_VERSION) -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/fftw3 - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=@!avr32 +libpthread - VARIANT:=double - TITLE:=Fast Fourier transform library - URL:=http://www.fftw.org/ - MAINTAINER:=Vladimir Ulrich -endef - -define Package/fftw3f - $(call Package/fftw3) - VARIANT:=single - TITLE+= (single precision) -endef - -define Package/fftw3l - $(call Package/fftw3) - DEPENDS:=@BROKEN - VARIANT:=long-double - TITLE+= (long-double precision) -endef - -define Package/fftw3/description - FFTW is a collection of fast C routines for computing the - Discrete Fourier Transform in one or more dimensions. It - includes complex, real, and parallel transforms, and can - handle arbitrary array sizes efficiently. -endef - -define Package/fftw3f/description - $(call Package/fftw3/description) - - This package contains the single precision library. -endef - -define Package/fftw3l/description - $(call Package/fftw3/description) - - This package contains the long-double precision library. -endef - -TARGET_CFLAGS += $(FPIC) - -CONFIGURE_ARGS += \ - --prefix=/usr \ - --without-libiconv-prefix \ - --without-libintl-prefix \ - --enable-shared \ - --enable-threads \ - --enable-type-prefix \ - --disable-debug \ - --disable-fortran \ - --disable-doc - -ifeq ($(BUILD_VARIANT), single) -CONFIGURE_ARGS += \ - $(if $(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),--enable-neon) \ - --enable-single -endif - -ifeq ($(BUILD_VARIANT), long-double) -CONFIGURE_ARGS += \ - --enable-long-double -endif - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/fftw3.h $(1)/usr/include - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.{a,la} $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.so* $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ -endef - -define Package/fftw3/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3.so* $(1)/usr/lib/ -endef - -define Package/fftw3f/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3f.so* $(1)/usr/lib/ -endef - -define Package/fftw3l/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3l.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,fftw3)) -$(eval $(call BuildPackage,fftw3f)) -$(eval $(call BuildPackage,fftw3l)) diff --git a/libs/fftw3/patches/001-makefile.patch b/libs/fftw3/patches/001-makefile.patch deleted file mode 100644 index 6f56fa6a..00000000 --- a/libs/fftw3/patches/001-makefile.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -241,7 +241,7 @@ - CTAGS = ctags - CSCOPE = cscope - DIST_SUBDIRS = support genfft kernel simd-support dft rdft reodft api \ -- libbench2 . threads tests mpi doc tools m4 -+ libbench2 . threads mpi doc tools m4 - am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/fftw.pc.in AUTHORS COPYING ChangeLog INSTALL NEWS \ - README TODO compile config.guess config.sub install-sh \ -@@ -470,7 +470,7 @@ - # tools are available, such as fig2dev in maintainer mode) - @BUILD_DOC_TRUE@DOCDIR = doc - SUBDIRS = support $(GENFFT) kernel simd-support dft rdft reodft api \ --libbench2 $(CHICKEN_EGG) tests mpi $(DOCDIR) tools m4 -+libbench2 $(CHICKEN_EGG) mpi m4 - - EXTRA_DIST = COPYRIGHT bootstrap.sh CONVENTIONS fftw.pc.in - SIMD_LIBS = \ diff --git a/libs/file/Makefile b/libs/file/Makefile index e35b98b3..34d02743 100644 --- a/libs/file/Makefile +++ b/libs/file/Makefile @@ -8,20 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=file -PKG_VERSION:=5.25 -PKG_RELEASE:=2 +PKG_VERSION:=5.39 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://sources.lede-project.org/ \ - http://pkgs.fedoraproject.org/lookaside/pkgs/file/ \ - http://download.openpkg.org/components/cache/file/ \ +PKG_SOURCE_URL:=http://download.openpkg.org/components/cache/file/ \ ftp://ftp.astron.com/pub/file/ -PKG_HASH:=3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca +PKG_HASH:=f05d286a76d9556243d0cb05814929c2ecf3a5ba07963f8f70bfaaa70517fad1 -PKG_LICENSE:=BSD-2c +PKG_MAINTAINER:=Marko Ratkaj +PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -29,8 +27,7 @@ include $(INCLUDE_DIR)/package.mk define Package/file/Default TITLE:=File type determination - URL:=ftp://ftp.astron.com/pub/file/ - MAINTAINER:=Marko Ratkaj + URL:=https://darwinsys.com/file/ endef define Package/file @@ -46,17 +43,25 @@ $(call Package/file/Default) SECTION:=libs CATEGORY:=Libraries TITLE+= library - DEPENDS:=+zlib + DEPENDS:=+zlib +liblzma +libbz2 endef +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ + --enable-bzlib \ + --enable-xzlib \ + --enable-zlib \ + --disable-libseccomp \ + --disable-rpath \ + --disable-warnings \ + --without-pic MAKE_PATH := src -TARGET_CFLAGS += $(FPIC) - define Build/Compile/magic ( cd $(PKG_BUILD_DIR)/magic/Magdir; \ for f in `ls`; do \ @@ -86,9 +91,6 @@ define Package/file/install $(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic $(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/ - - # For some reason both "magic" and "magic.mgc" MUST exist - ln -sf magic $(1)/usr/share/misc/magic.mgc endef define Package/libmagic/install diff --git a/libs/flac/Makefile b/libs/flac/Makefile index 28e9a462..95412107 100644 --- a/libs/flac/Makefile +++ b/libs/flac/Makefile @@ -8,20 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=flac -PKG_VERSION:=1.3.2 +PKG_VERSION:=1.3.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://downloads.xiph.org/releases/flac/ -PKG_HASH:=91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f +PKG_SOURCE_URL:=https://downloads.xiph.org/releases/flac/ +PKG_HASH:=213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748 + PKG_MAINTAINER:=Ted Hess - -PKG_INSTALL:=1 - PKG_LICENSE:=GFDL-1.2 GPL-2 LGPL-2.1 BSD-3-Clause PKG_LICENSE_FILES:=README COPYING.FDL COPYING.GPL COPYING.LGPL COPYING.Xiph +PKG_CPE_ID:=cpe:/a:flac_project:flac PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_REMOVE_FILES:=autogen.sh aclocal.m4 include $(INCLUDE_DIR)/package.mk @@ -36,15 +37,18 @@ endef CONFIGURE_ARGS += \ --disable-cpplibs \ --disable-sse \ - --disable-3dnow \ --disable-altivec \ --disable-doxgen-docs \ --disable-local-xmms-plugin \ --disable-xmms-plugin \ --disable-ogg \ --disable-oggtest \ + --disable-thorough-tests \ + --disable-examples \ + --disable-rpath \ $(if $(CONFIG_DEBUG),--enable-debug) \ - --enable-static + --enable-static \ + --without-pic TARGET_CFLAGS += $(FPIC) diff --git a/libs/flac/patches/001-no-docs-and-examples.patch b/libs/flac/patches/001-no-docs-and-examples.patch index 7c34288c..c844771d 100644 --- a/libs/flac/patches/001-no-docs-and-examples.patch +++ b/libs/flac/patches/001-no-docs-and-examples.patch @@ -4,11 +4,11 @@ ACLOCAL_AMFLAGS = -I m4 --SUBDIRS = doc include m4 man src examples test build objs microbench +-SUBDIRS = doc include m4 man src test build objs microbench +SUBDIRS = include m4 src build objs - EXTRA_DIST = \ - COPYING.FDL \ + if EXAMPLES + SUBDIRS += examples --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,11 +30,6 @@ SUBDIRS = \ diff --git a/libs/flac/patches/005-gcc_debug_options.patch b/libs/flac/patches/005-gcc_debug_options.patch deleted file mode 100644 index ea7db8e1..00000000 --- a/libs/flac/patches/005-gcc_debug_options.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -386,10 +386,11 @@ fi - - if test "x$debug" = xtrue; then - CPPFLAGS="-DDEBUG $CPPFLAGS" -- CFLAGS="-g $CFLAGS" -+ CFLAGS=$(echo "$CFLAGS" | sed 's/-g[0-9]*//') -+ CFLAGS="-g3 $CFLAGS" - else - CPPFLAGS="-DNDEBUG $CPPFLAGS" -- CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//') -+ CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g[0-9]*//') - CFLAGS="-O3 -funroll-loops $CFLAGS" - fi - diff --git a/libs/flac/patches/010-automake-compat.patch b/libs/flac/patches/010-automake-compat.patch deleted file mode 100644 index 83180480..00000000 --- a/libs/flac/patches/010-automake-compat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -33,6 +33,8 @@ ACLOCAL_AMFLAGS = -I m4 - - SUBDIRS = include m4 src build objs - -+ACLOCAL_AMFLAGS = -I m4 -+ - EXTRA_DIST = \ - COPYING.FDL \ - COPYING.GPL \ diff --git a/libs/flac/patches/010-utime.patch b/libs/flac/patches/010-utime.patch new file mode 100644 index 00000000..0c1d1702 --- /dev/null +++ b/libs/flac/patches/010-utime.patch @@ -0,0 +1,118 @@ +Return-Path: +Received: from localhost.localdomain (76-14-106-55.rk.wavecable.com. [76.14.106.55]) + by smtp.gmail.com with ESMTPSA id f19sm148509170pfk.180.2019.08.09.13.01.06 + for + (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); + Fri, 09 Aug 2019 13:01:06 -0700 (PDT) +From: Rosen Penev +To: flac-dev@xiph.org +Subject: [PATCH] Switch to utimensat for newer POSIX versions +Date: Fri, 9 Aug 2019 13:01:05 -0700 +Message-Id: <20190809200105.1443-1-rosenp@gmail.com> +X-Mailer: git-send-email 2.17.1 + +Some libcs like uClibc-ng can optionally disable deprecated functions. +utime is one of them. When done so, both the header and the function go +missing. + +This fixes flac_utime to work in such a situation. +--- + include/share/compat.h | 10 +++++++++- + src/libFLAC/metadata_iterators.c | 9 +++++++-- + src/share/grabbag/file.c | 9 +++++++-- + 3 files changed, 23 insertions(+), 5 deletions(-) + +diff --git a/include/share/compat.h b/include/share/compat.h +index f3041655..a063c083 100644 +--- a/include/share/compat.h ++++ b/include/share/compat.h +@@ -112,9 +112,13 @@ + #include /* for utime() */ + #endif + #else ++#if _POSIX_C_SOURCE >= 200809L ++#include ++#else + #include /* some flavors of BSD (like OS X) require this to get time_t */ + #include /* for utime() */ + #endif ++#endif + + #if defined _MSC_VER + # if _MSC_VER >= 1800 +@@ -160,11 +164,15 @@ + + #define flac_fopen fopen + #define flac_chmod chmod +-#define flac_utime utime + #define flac_unlink unlink + #define flac_rename rename + #define flac_stat stat + ++#if _POSIX_C_SOURCE >= 200809L ++#define flac_utime(a, b) utimensat (AT_FDCWD, a, *b, 0) ++#else ++#define flac_utime utime ++#endif + #endif + + #ifdef _WIN32 +diff --git a/src/libFLAC/metadata_iterators.c b/src/libFLAC/metadata_iterators.c +index 352a6c7a..d5255eb9 100644 +--- a/src/libFLAC/metadata_iterators.c ++++ b/src/libFLAC/metadata_iterators.c +@@ -3422,13 +3422,18 @@ FLAC__bool get_file_stats_(const char *filename, struct flac_stat_s *stats) + + void set_file_stats_(const char *filename, struct flac_stat_s *stats) + { +- struct utimbuf srctime; +- + FLAC__ASSERT(0 != filename); + FLAC__ASSERT(0 != stats); + ++#if _POSIX_C_SOURCE >= 200809L ++ struct timespec srctime[2] = {}; ++ srctime[0].tv_sec = stats->st_atime; ++ srctime[1].tv_sec = stats->st_mtime; ++#else ++ struct utimbuf srctime; + srctime.actime = stats->st_atime; + srctime.modtime = stats->st_mtime; ++#endif + (void)flac_chmod(filename, stats->st_mode); + (void)flac_utime(filename, &srctime); + #if !defined _MSC_VER && !defined __BORLANDC__ && !defined __MINGW32__ +diff --git a/src/share/grabbag/file.c b/src/share/grabbag/file.c +index 2c67bebf..edd835a6 100644 +--- a/src/share/grabbag/file.c ++++ b/src/share/grabbag/file.c +@@ -27,7 +27,6 @@ + #include /* for _O_BINARY */ + #else + #include /* some flavors of BSD (like OS X) require this to get time_t */ +-#include /* for utime() */ + #endif + #if defined __EMX__ + #include /* for setmode(), O_BINARY */ +@@ -53,11 +52,17 @@ + void grabbag__file_copy_metadata(const char *srcpath, const char *destpath) + { + struct flac_stat_s srcstat; +- struct utimbuf srctime; + + if(0 == flac_stat(srcpath, &srcstat)) { ++#if _POSIX_C_SOURCE >= 200809L ++ struct timespec srctime[2] = {}; ++ srctime[0].tv_sec = srcstat.st_atime; ++ srctime[1].tv_sec = srcstat.st_mtime; ++#else ++ struct utimbuf srctime; + srctime.actime = srcstat.st_atime; + srctime.modtime = srcstat.st_mtime; ++#endif + (void)flac_chmod(destpath, srcstat.st_mode); + (void)flac_utime(destpath, &srctime); + } +-- +2.17.1 + diff --git a/libs/freetype/Makefile b/libs/freetype/Makefile index 1c777a50..87922e0d 100644 --- a/libs/freetype/Makefile +++ b/libs/freetype/Makefile @@ -8,29 +8,31 @@ include $(TOPDIR)/rules.mk PKG_NAME:=freetype -PKG_VERSION:=2.9 +PKG_VERSION:=2.10.2 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/freetype -PKG_HASH:=e6ffba3c8cef93f557d1f767d7bc3dee860ac7a3aaff588a521e081bc36f4c8a +PKG_HASH:=1543d61025d2e6312e0a1c563652555f17378a204a61e99928c9fcef030a2d8b -PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB -PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h PKG_MAINTAINER:=Val Kulkov +PKG_LICENSE:=FTL GPL-2.0-only MIT ZLIB GPL-3.0-or-later +PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h builds/unix/config.sub builds/unix/config.guess builds/unix/libtool +PKG_CPE_ID:=cpe:/a:freetype:freetype2 -PKG_FIXUP:=autoreconf -PKG_LIBTOOL_PATHS:=builds/unix +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +CMAKE_BINARY_SUBDIR:=build -include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/libfreetype SECTION:=libs CATEGORY:=Libraries TITLE:=A free, high-quality and portable font engine URL:=http://www.freetype.org/ - DEPENDS:=+zlib +libbz2 +libpng + DEPENDS:=+zlib +libpng endef define Package/libfreetype/description @@ -40,42 +42,18 @@ define Package/libfreetype/description efficient and ubiquitous products. endef -TARGET_CFLAGS += $(FPIC) - -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --with-bzip2=yes \ - --with-zlib=yes \ - --with-png=yes - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(1)/bin/ - $(INSTALL_DIR) $(2)/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(2)/bin/ - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(1)/usr/lib/pkgconfig/ - - $(SED) \ - 's,/usr/include,$$$${prefix}/include,g; \ - s,/usr/lib,$$$${exec_prefix}/lib,g' \ - $(1)/usr/lib/pkgconfig/freetype2.pc -endef - +CMAKE_OPTIONS += \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=ON \ + -DFT_WITH_ZLIB=ON \ + -DFT_WITH_BZIP2=OFF \ + -DFT_WITH_PNG=ON \ + -DFT_WITH_HARFBUZZ=OFF \ + -DFT_WITH_BROTLI=OFF define Package/libfreetype/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/ endef -$(eval $(call HostBuild)) $(eval $(call BuildPackage,libfreetype)) diff --git a/libs/gdbm/Makefile b/libs/gdbm/Makefile index dac4d5e8..11f8c049 100644 --- a/libs/gdbm/Makefile +++ b/libs/gdbm/Makefile @@ -8,30 +8,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdbm -PKG_VERSION:=1.11 -PKG_RELEASE:=1 +PKG_VERSION:=1.18.1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/gdbm -PKG_HASH:=8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3 +PKG_HASH:=86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Marcel Denia +PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf gettext-version -PKG_REMOVE_FILES:=Makefile compat/Makefile doc/Makefile export/Makefile src/Makefile tests/Makefile +PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=0 -PKG_BUILD_DEPENDS:=gettext-full/host - include $(INCLUDE_DIR)/package.mk define Package/libgdbm SECTION:=libs CATEGORY:=Libraries TITLE:=GNU database manager - URL:=http://www.gnu.org/software/gdbm/ + URL:=https://www.gnu.org/software/gdbm/ endef define Package/libgdbm/description @@ -40,11 +37,9 @@ define Package/libgdbm/description works similar to the standard UNIX dbm routines. endef -TARGET_CFLAGS += $(FPIC) - CONFIGURE_ARGS += \ --enable-shared \ - --enable-static \ + --enable-static define Build/Compile +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ diff --git a/libs/gdbm/patches/999-001-fix-multiple-def-gcc-10.patch b/libs/gdbm/patches/999-001-fix-multiple-def-gcc-10.patch new file mode 100644 index 00000000..5ccb395f --- /dev/null +++ b/libs/gdbm/patches/999-001-fix-multiple-def-gcc-10.patch @@ -0,0 +1,11 @@ +--- a/src/parseopt.c ++++ b/src/parseopt.c +@@ -255,8 +255,6 @@ print_option_descr (const char *descr, s + } + + char *parseopt_program_name; +-char *parseopt_program_doc; +-char *parseopt_program_args; + const char *program_bug_address = "<" PACKAGE_BUGREPORT ">"; + void (*parseopt_help_hook) (FILE *stream); + diff --git a/libs/getdns/Makefile b/libs/getdns/Makefile index 3954a452..f8b41a2c 100644 --- a/libs/getdns/Makefile +++ b/libs/getdns/Makefile @@ -5,26 +5,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=getdns -PKG_VERSION:=1.4.2 +PKG_VERSION:=1.6.0 PKG_RELEASE:=1 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=David Mora +PKG_MAINTAINER:=Jonathan Underwood PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://getdnsapi.net/dist/ -PKG_HASH:=1685b82dfe297cffc4bae08a773cdc88a3edf9a4e5a1ea27d8764bb5affc0e80 +PKG_HASH:=40e5737471a3902ba8304b0fd63aa7c95802f66ebbc6eae53c487c8e8a380f4a -PKG_FIXUP:=autoreconf - -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:= \ CONFIG_GETDNS_ENABLE_STUB_ONLY \ - CONFIG_GETDNS_ENABLE_IDN_LIBIDN2 - + CONFIG_GETDNS_ENABLE_IDN_LIBIDN2 + include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/getdns/Default TITLE:=getdns @@ -41,7 +41,7 @@ define Package/getdns endef define Package/getdns/description - This package contains the getdns library (libgetdns). + This package contains the getdns library (libgetdns). This package also contains the "getdns_query" command line wrapper for getdns exposing the features of this implementation (both in the official API and the additional API functions). endef @@ -49,26 +49,25 @@ define Package/getdns/config source "$(SOURCE)/Config.in" endef -CONFIGURE_ARGS += \ - $(if $(CONFIG_GETDNS_ENABLE_STUB_ONLY), --enable-stub-only, ) \ - --without-libidn \ - $(if $(CONFIG_GETDNS_ENABLE_IDN_LIBIDN2), , --without-libidn2 ) \ - --with-ssl="$(STAGING_DIR)/usr" \ +# CMAKE options for GetDNS are described in this document: +# https://getdnsapi.net/quick-start/cmake-quick-start/ +CMAKE_OPTIONS += -DBUILD_LIBEV=OFF +CMAKE_OPTIONS += -DBUILD_LIBEVENT2=OFF +CMAKE_OPTIONS += -DBUILD_LIBUV=OFF + +CMAKE_OPTIONS += -DENABLE_STUB_ONLY=$(if $(CONFIG_GETDNS_ENABLE_STUB_ONLY),ON,OFF) +CMAKE_OPTIONS += -DUSE_LIBIDN2=$(if $(CONFIG_GETDNS_ENABLE_IDN_LIBIDN2),ON,OFF) + +# getdns will use libbsd for the functions inet_pton, inet_ntop, strlcpy if +# present, otherwise it will use builtin code for these functions. In order to +# force the use of the built in code and remove the libbsd dependency disable +# the test for libbsd. +CMAKE_OPTIONS += -DCMAKE_DISABLE_FIND_PACKAGE_BSD=ON -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/getdns/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/getdns/getdns*.h $(1)/usr/include/getdns/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgetdns*.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/getdns*.pc $(1)/usr/lib/pkgconfig/ -endef - - define Package/getdns/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgetdns.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getdns_query $(1)/usr/sbin/getdns_query endef diff --git a/libs/getdns/patches/001-Bugfix-399-Reinclude-linux-sysctl.h-in-getentropy_li.patch b/libs/getdns/patches/001-Bugfix-399-Reinclude-linux-sysctl.h-in-getentropy_li.patch deleted file mode 100644 index 72997d4f..00000000 --- a/libs/getdns/patches/001-Bugfix-399-Reinclude-linux-sysctl.h-in-getentropy_li.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 05bce5263735b77f91078a930ec55b9cf181d999 Mon Sep 17 00:00:00 2001 -From: Willem Toorop -Date: Sun, 13 May 2018 11:59:14 +0200 -Subject: [PATCH] Bugfix #399: Reinclude in getentropy_linux.c - ---- - src/compat/getentropy_linux.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/compat/getentropy_linux.c b/src/compat/getentropy_linux.c -index 744783c..abb28f4 100644 ---- a/src/compat/getentropy_linux.c -+++ b/src/compat/getentropy_linux.c -@@ -62,6 +62,7 @@ - - #include - #include -+#include - #ifdef HAVE_GETAUXVAL - #include - #endif --- -2.14.1 - - diff --git a/libs/getdns/patches/getdns-1.6.0-fix-crosscompile.patch b/libs/getdns/patches/getdns-1.6.0-fix-crosscompile.patch new file mode 100644 index 00000000..71b5a0d1 --- /dev/null +++ b/libs/getdns/patches/getdns-1.6.0-fix-crosscompile.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt 2020-07-01 00:06:07.784792469 +0100 ++++ b/CMakeLists.txt 2020-07-01 00:07:09.232511018 +0100 +@@ -520,7 +520,7 @@ + res = strptime(\"20070207111842\", \"%Y%m%d%H%M%S\", &tm);\n + if (!res) return 1; return 0; }") + +-if (HAVE_STRPTIME) ++if (HAVE_STRPTIME AND NOT CMAKE_CROSSCOMPILING) + check_c_source_runs("${STRPTIME_TEST_SOURCE}" STRPTIME_WORKS) + endif () + diff --git a/libs/giflib/Makefile b/libs/giflib/Makefile index b59e37ff..2f8eb4c5 100644 --- a/libs/giflib/Makefile +++ b/libs/giflib/Makefile @@ -23,7 +23,6 @@ PKG_CPE_ID:=cpe:/a:giflib_project:giflib PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk define Package/giflib @@ -75,6 +74,5 @@ define Package/giflib-utils/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin endef -$(eval $(call HostBuild)) $(eval $(call BuildPackage,giflib)) $(eval $(call BuildPackage,giflib-utils)) diff --git a/libs/glpk/Makefile b/libs/glpk/Makefile deleted file mode 100644 index d4531357..00000000 --- a/libs/glpk/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2010-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=glpk -PKG_VERSION:=4.63 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=914d27f1a51c2bf4a51f1bd4a507f875fcca99db7b219380b836a25b29b3e7f6 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Daniel Golle - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/libglpk - SECTION:=libs - CATEGORY:=Libraries - TITLE:=The GNU Linear Programming Kit - URL:=http://www.gnu.org/software/glpk/ -endef - -define Package/libglpk/description - The GLPK (GNU Linear Programming Kit) package is intended for solving - large-scale linear programming (LP), mixed integer programming (MIP), - and other related problems. It is a set of routines written in ANSI C - and organized in the form of a callable library. -endef - -define Package/glpsol - SECTION:=libs - CATEGORY:=Libraries - TITLE:=The GNU Linear Programming Kit (glpsol) - URL:=http://www.gnu.org/software/glpk/ - DEPENDS:=libglpk -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/ -endef - -define Package/libglpk/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ -endef - -define Package/glpsol/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/glpsol $(1)/usr/bin -endef - -$(eval $(call BuildPackage,libglpk)) -$(eval $(call BuildPackage,glpsol)) diff --git a/libs/gnutls/Config.in b/libs/gnutls/Config.in index 562d6789..88dbc7a9 100644 --- a/libs/gnutls/Config.in +++ b/libs/gnutls/Config.in @@ -23,10 +23,6 @@ config GNUTLS_HEARTBEAT bool "enable DTLS heartbeat support" default y -config GNUTLS_OPENPGP - bool "enable OPENPGP authentication support" - default n - config GNUTLS_SRP bool "enable SRP authentication support" default n diff --git a/libs/gnutls/Makefile b/libs/gnutls/Makefile index 54e63865..d2b5224f 100644 --- a/libs/gnutls/Makefile +++ b/libs/gnutls/Makefile @@ -8,20 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnutls -PKG_VERSION:=3.5.19 +PKG_VERSION:=3.6.14 PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5 -PKG_HASH:=1936eb64f03aaefd6eb16cef0567457777618573826b94d03376bb6a4afadc44 +PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6 +PKG_HASH:=5630751adec7025b8ef955af4d141d00d252a985769f51b4059e5affa3d39d63 #PKG_FIXUP:=autoreconf gettext-version PKG_MAINTAINER:=Nikos Mavrogiannopoulos -PKG_LICENSE:=LGPLv2.1+ +PKG_LICENSE:=LGPL-2.1-or-later +PKG_CPE_ID:=cpe:/a:gnu:gnutls PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_LIBTOOL_PATHS:=. lib -PKG_CHECK_FORMAT_SECURITY:=0 PKG_CONFIG_DEPENDS:= \ CONFIG_GNUTLS_ALPN \ @@ -31,7 +32,6 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_GNUTLS_EXT_LIBTASN1 \ CONFIG_GNUTLS_HEARTBEAT \ CONFIG_GNUTLS_OCSP \ - CONFIG_GNUTLS_OPENPGP \ CONFIG_GNUTLS_PKCS11 \ CONFIG_GNUTLS_PSK \ CONFIG_GNUTLS_SRP \ @@ -96,7 +96,7 @@ endef define Package/libgnutls $(call Package/gnutls/Default) TITLE+= (library) - DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev + DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev +libatomic endef define Package/libgnutls/description @@ -104,23 +104,31 @@ $(call Package/gnutls/Default/description) This package contains the GnuTLS shared library, needed by other programs. endef - +# We disable the configuration file (system-priority-file) because +# the use of configuration increases the non-shared memory used by +# the library and we don't provide an openwrt-specific configuration +# anyway. CONFIGURE_ARGS+= \ --enable-shared \ --enable-static \ - --disable-rpath \ - --disable-libdane \ - --with-included-unistring \ - --disable-guile \ - --disable-nls \ - --without-idn \ - --without-zlib \ - --enable-local-libopts \ --disable-doc \ + --disable-gcc-warnings \ + --disable-guile \ + --disable-rpath \ + --disable-seccomp-tests \ --disable-tests \ + --disable-valgrind-tests \ + \ + --disable-libdane \ + --disable-ssl2-support \ + --disable-ssl3-support \ + --enable-local-libopts \ + --without-idn \ --with-default-trust-store-dir=/etc/ssl/certs/ \ - --disable-crywrap \ - --with-librt-prefix="$(LIBRT_ROOT_DIR)/" + --with-included-unistring \ + --with-librt-prefix="$(LIBRT_ROOT_DIR)/" \ + --with-pic \ + --with-system-priority-file="" ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1),y) CONFIGURE_ARGS += --with-included-libtasn1 @@ -154,10 +162,6 @@ ifneq ($(CONFIG_GNUTLS_PSK),y) CONFIGURE_ARGS += --disable-psk-authentication endif -ifneq ($(CONFIG_GNUTLS_OPENPGP),y) -CONFIGURE_ARGS += --disable-openpgp-authentication -endif - ifneq ($(CONFIG_GNUTLS_ANON),y) CONFIGURE_ARGS += --disable-anon-authentication endif @@ -174,8 +178,6 @@ ifeq ($(CONFIG_GNUTLS_CRYPTODEV),y) CONFIGURE_ARGS += --enable-cryptodev endif -TARGET_CFLAGS += $(FPIC) - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig $(CP) \ diff --git a/libs/google-authenticator-libpam/Makefile b/libs/google-authenticator-libpam/Makefile new file mode 100644 index 00000000..f7e3c0fe --- /dev/null +++ b/libs/google-authenticator-libpam/Makefile @@ -0,0 +1,51 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=google-authenticator-libpam +PKG_VERSION:=1.09 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/google/google-authenticator-libpam/tar.gz/$(PKG_VERSION)? +PKG_HASH:=ab1d7983413dc2f11de2efa903e5c326af8cb9ea37765dacb39949417f7cd037 + +PKG_MAINTAINER:=Lucian Cristian +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/google-authenticator-libpam + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libpam +libqrencode + TITLE:=Google Authenticator PAM module + URL:=https://github.com/google/google-authenticator-libpam +endef + +define Package/google-authenticator-libpam/description + Google Authenticator PAM module +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/lib/security + $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/* $(1)/lib/security/ +endef + +define Package/google-authenticator-libpam/install + $(INSTALL_DIR) $(1)/usr/lib/security + $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/*.so* \ + $(1)/usr/lib/security/ + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,google-authenticator-libpam)) diff --git a/libs/h2o/Makefile b/libs/h2o/Makefile new file mode 100644 index 00000000..31a9cda0 --- /dev/null +++ b/libs/h2o/Makefile @@ -0,0 +1,54 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=h2o +PKG_VERSION:=2.2.6 +PKG_RELEASE:=5 + +PKG_SOURCE_URL:=https://codeload.github.com/h2o/h2o/tar.gz/v${PKG_VERSION}? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=f8cbc1b530d85ff098f6efc2c3fdbc5e29baffb30614caac59d5c710f7bda201 + +PKG_MAINTAINER:=James Taylor + #include + #include ++#include + #include "h2o/cache.h" + #include "h2o/memory.h" + #include "h2o/openssl_backport.h" +@@ -45,7 +44,11 @@ + + #if OPENSSL_VERSION_NUMBER >= 0x10002000L + #define H2O_USE_ALPN 1 ++#ifndef OPENSSL_NO_NEXTPROTONEG + #define H2O_USE_NPN 1 ++#else ++#define H2O_USE_NPN 0 ++#endif + #elif OPENSSL_VERSION_NUMBER >= 0x10001000L + #define H2O_USE_ALPN 0 + #define H2O_USE_NPN 1 diff --git a/libs/h2o/patches/200-libh2o-evloop_wslay-link.patch b/libs/h2o/patches/200-libh2o-evloop_wslay-link.patch new file mode 100644 index 00000000..3b0a85fb --- /dev/null +++ b/libs/h2o/patches/200-libh2o-evloop_wslay-link.patch @@ -0,0 +1,45 @@ +From f7d5cb83826c7e2b1a3dc618b434d85df130a4d5 Mon Sep 17 00:00:00 2001 +From: James Taylor +Date: Tue, 10 Dec 2019 21:58:45 +1100 +Subject: [PATCH] Explicitly link against WSLAY when available + +When other libraries attempt to link against libh2o and libh2o-evloop that was +compiled with libwslay available, there are errors from missing symbols +associated with code which makes use of the wslay library. To rectify this, +explicitly link against libwslay during the build process. + +Fixes #2105 + +Signed-off-by: James Taylor +--- + CMakeLists.txt | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a68613081..13c2f8a9f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -519,13 +519,21 @@ SET_TARGET_PROPERTIES(libh2o PROPERTIES + OUTPUT_NAME h2o + VERSION ${LIBRARY_VERSION} + SOVERSION ${LIBRARY_SOVERSION}) +-TARGET_LINK_LIBRARIES(libh2o ${LIBUV_LIBRARIES} ${EXTRA_LIBS}) ++IF (WSLAY_FOUND) ++ TARGET_LINK_LIBRARIES(libh2o ${WSLAY_LIBRARIES} ${LIBUV_LIBRARIES} ${EXTRA_LIBS}) ++ELSE () ++ TARGET_LINK_LIBRARIES(libh2o ${LIBUV_LIBRARIES} ${EXTRA_LIBS}) ++ENDIF (WSLAY_FOUND) + SET_TARGET_PROPERTIES(libh2o-evloop PROPERTIES + OUTPUT_NAME h2o-evloop + COMPILE_FLAGS "-DH2O_USE_LIBUV=0" + VERSION ${LIBRARY_VERSION} + SOVERSION ${LIBRARY_SOVERSION}) +-TARGET_LINK_LIBRARIES(libh2o-evloop ${EXTRA_LIBS}) ++IF (WSLAY_FOUND) ++ TARGET_LINK_LIBRARIES(libh2o-evloop ${WSLAY_LIBRARIES} ${EXTRA_LIBS}) ++ELSE () ++ TARGET_LINK_LIBRARIES(libh2o-evloop ${EXTRA_LIBS}) ++ENDIF (WSLAY_FOUND) + + TARGET_INCLUDE_DIRECTORIES(libh2o PUBLIC ${OPENSSL_INCLUDE_DIR}) + TARGET_INCLUDE_DIRECTORIES(libh2o-evloop PUBLIC ${OPENSSL_INCLUDE_DIR}) diff --git a/libs/h2o/patches/300-picotls-chacha-detect.patch b/libs/h2o/patches/300-picotls-chacha-detect.patch new file mode 100644 index 00000000..5fc79328 --- /dev/null +++ b/libs/h2o/patches/300-picotls-chacha-detect.patch @@ -0,0 +1,17 @@ +--- a/deps/picotls/include/picotls/openssl.h ++++ b/deps/picotls/include/picotls/openssl.h +@@ -26,11 +26,14 @@ + #include + #include + #include ++#include + #include "../picotls.h" + + #if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) + #define PTLS_OPENSSL_HAVE_CHACHA20_POLY1305 + #endif ++#endif + + extern ptls_key_exchange_algorithm_t ptls_openssl_secp256r1; + extern ptls_key_exchange_algorithm_t *ptls_openssl_key_exchanges[]; diff --git a/libs/h2o/patches/400-backtrace-detection.patch b/libs/h2o/patches/400-backtrace-detection.patch new file mode 100644 index 00000000..c32edfc5 --- /dev/null +++ b/libs/h2o/patches/400-backtrace-detection.patch @@ -0,0 +1,74 @@ +From 03dbd6757d043581b5d250107b6f1cda6ae203a9 Mon Sep 17 00:00:00 2001 +From: Frederik Deweerdt +Date: Wed, 25 Oct 2017 13:52:28 -0700 +Subject: [PATCH] Autodetect backtrace and backtrace_symbols_fd + +--- + CMakeLists.txt | 13 +++++++++++++ + src/main.c | 10 ++++++---- + 2 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index abfab1f19..2a26fb98a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,6 +58,19 @@ __sync_add_and_fetch(&a, 1); + return 0; + }" ARCH_SUPPORTS_64BIT_ATOMICS) + ++CHECK_C_SOURCE_COMPILES(" ++#include ++int main(void) { ++void *p[10]; ++int ret = backtrace(p, 10); ++backtrace_symbols_fd(p, ret, 2); ++return 0; ++}" LIBC_HAS_BACKTRACE) ++ ++IF (LIBC_HAS_BACKTRACE) ++ ADD_DEFINITIONS("-DLIBC_HAS_BACKTRACE") ++ENDIF () ++ + SET(WITH_BUNDLED_SSL_DEFAULT "ON") + IF ((NOT UNIX) OR CYGWIN) + SET(WITH_BUNDLED_SSL_DEFAULT "OFF") +diff --git a/src/main.c b/src/main.c +index 7c346af18..edc7d5eb3 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -48,7 +48,7 @@ + #include + #include + #include +-#ifdef __GLIBC__ ++#ifdef LIBC_HAS_BACKTRACE + #include + #endif + #if H2O_USE_PICOTLS +@@ -1435,7 +1435,8 @@ static void on_sigterm(int signo) + notify_all_threads(); + } + +-#ifdef __GLIBC__ ++#ifdef LIBC_HAS_BACKTRACE ++ + static int popen_crash_handler(void) + { + char *cmd_fullpath = h2o_configurator_get_cmd_path(conf.crash_handler), *argv[] = {cmd_fullpath, NULL}; +@@ -1487,13 +1488,14 @@ static void on_sigfatal(int signo) + + raise(signo); + } +-#endif ++ ++#endif /* LIBC_HAS_BACKTRACE */ + + static void setup_signal_handlers(void) + { + h2o_set_signal_handler(SIGTERM, on_sigterm); + h2o_set_signal_handler(SIGPIPE, SIG_IGN); +-#ifdef __GLIBC__ ++#ifdef LIBC_HAS_BACKTRACE + if ((crash_handler_fd = popen_crash_handler()) == -1) + crash_handler_fd = 2; + h2o_set_signal_handler(SIGABRT, on_sigfatal); diff --git a/libs/h2o/patches/500-openssl.patch b/libs/h2o/patches/500-openssl.patch new file mode 100644 index 00000000..a9c2fd83 --- /dev/null +++ b/libs/h2o/patches/500-openssl.patch @@ -0,0 +1,96 @@ +--- a/deps/neverbleed/neverbleed.c ++++ b/deps/neverbleed/neverbleed.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/deps/picotls/lib/openssl.c ++++ b/deps/picotls/lib/openssl.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -941,7 +942,7 @@ int ptls_openssl_encrypt_ticket(ptls_buffer_t *buf, ptls_iovec_t src, + + Exit: + if (cctx != NULL) +- EVP_CIPHER_CTX_cleanup(cctx); ++ EVP_CIPHER_CTX_reset(cctx); + if (hctx != NULL) + HMAC_CTX_free(hctx); + return ret; +@@ -1011,7 +1012,7 @@ int ptls_openssl_decrypt_ticket(ptls_buffer_t *buf, ptls_iovec_t src, + + Exit: + if (cctx != NULL) +- EVP_CIPHER_CTX_cleanup(cctx); ++ EVP_CIPHER_CTX_reset(cctx); + if (hctx != NULL) + HMAC_CTX_free(hctx); + return ret; +--- a/src/main.c ++++ b/src/main.c +@@ -45,6 +45,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1825,7 +1826,7 @@ static h2o_iovec_t on_extra_status(void *unused, h2o_globalconf_t *_conf, h2o_re + " \"listeners\": %zu,\n" + " \"worker-threads\": %zu,\n" + " \"num-sessions\": %lu", +- SSLeay_version(SSLEAY_VERSION), current_time, restart_time, (uint64_t)(now - conf.launch_time), generation, ++ OpenSSL_version(OPENSSL_VERSION), current_time, restart_time, (uint64_t)(now - conf.launch_time), generation, + num_connections(0), conf.max_connections, conf.num_listeners, conf.num_threads, num_sessions(0)); + assert(ret.len < BUFSIZE); + +@@ -2006,7 +2007,7 @@ int main(int argc, char **argv) + break; + case 'v': + printf("h2o version " H2O_VERSION "\n"); +- printf("OpenSSL: %s\n", SSLeay_version(SSLEAY_VERSION)); ++ printf("OpenSSL: %s\n", OpenSSL_version(OPENSSL_VERSION)); + #if H2O_USE_MRUBY + printf( + "mruby: YES\n"); /* TODO determine the way to obtain the version of mruby (that is being linked dynamically) */ +--- a/src/ssl.c ++++ b/src/ssl.c +@@ -911,6 +911,7 @@ void ssl_setup_session_resumption(SSL_CTX **contexts, size_t num_contexts) + #endif + } + ++#if OPENSSL_VERSION_NUMBER < 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER) + static pthread_mutex_t *mutexes; + + static void lock_callback(int mode, int n, const char *file, int line) +@@ -937,9 +938,11 @@ static int add_lock_callback(int *num, int amount, int type, const char *file, i + + return __sync_add_and_fetch(num, amount); + } ++#endif + + void init_openssl(void) + { ++#if OPENSSL_VERSION_NUMBER < 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER) + int nlocks = CRYPTO_num_locks(), i; + mutexes = h2o_mem_alloc(sizeof(*mutexes) * nlocks); + for (i = 0; i != nlocks; ++i) +@@ -953,6 +956,7 @@ void init_openssl(void) + SSL_load_error_strings(); + SSL_library_init(); + OpenSSL_add_all_algorithms(); ++#endif + + cache_init_defaults(); + #if H2O_USE_SESSION_TICKETS diff --git a/libs/h2o/patches/600-engine.patch b/libs/h2o/patches/600-engine.patch new file mode 100644 index 00000000..f36fa3b8 --- /dev/null +++ b/libs/h2o/patches/600-engine.patch @@ -0,0 +1,28 @@ +--- a/deps/neverbleed/neverbleed.c ++++ b/deps/neverbleed/neverbleed.c +@@ -1486,6 +1486,7 @@ int neverbleed_init(neverbleed_t *nb, char *errbuf) + close(pipe_fds[0]); + pipe_fds[0] = -1; + ++#ifndef OPENSSL_NO_ENGINE + /* setup engine */ + if ((nb->engine = ENGINE_new()) == NULL || !ENGINE_set_id(nb->engine, "neverbleed") || + !ENGINE_set_name(nb->engine, "privilege separation software engine") || !ENGINE_set_RSA(nb->engine, rsa_method) +@@ -1497,6 +1498,7 @@ int neverbleed_init(neverbleed_t *nb, char *errbuf) + goto Fail; + } + ENGINE_add(nb->engine); ++#endif + + /* setup thread key */ + pthread_key_create(&nb->thread_key, dispose_thread_data); +@@ -1515,7 +1517,9 @@ Fail: + if (listen_fd != -1) + close(listen_fd); + if (nb->engine != NULL) { ++#ifndef OPENSSL_NO_ENGINE + ENGINE_free(nb->engine); ++#endif + nb->engine = NULL; + } + return -1; diff --git a/libs/hiredis/Makefile b/libs/hiredis/Makefile index 1f0aa016..6b8150d6 100644 --- a/libs/hiredis/Makefile +++ b/libs/hiredis/Makefile @@ -8,20 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hiredis -PKG_VERSION:=0.13.3 +PKG_VERSION:=0.14.1 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/redis/hiredis.git -PKG_SOURCE_VERSION:=010756025e8cefd1bc66c6d4ed3b1648ef6f1f95 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=ac774e318215cbfad4b8e493a84b4fe9a03f9882828ea01eac5357f28b5e9cd4 +PKG_SOURCE_URL:=https://codeload.github.com/redis/hiredis/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=2663b2aed9fd430507e30fc5e63274ee40cdd1a296026e22eafd7d99b01c8913 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Daniel Golle +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/libs/hiredis/patches/001-lvalue_fix.patch b/libs/hiredis/patches/001-lvalue_fix.patch deleted file mode 100644 index bf29f508..00000000 --- a/libs/hiredis/patches/001-lvalue_fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: hiredis-0.13.3/hiredis.h -=================================================================== ---- hiredis-0.13.3.orig/hiredis.h -+++ hiredis-0.13.3/hiredis.h -@@ -98,7 +98,7 @@ - * then GNU strerror_r returned an internal static buffer and we \ - * need to copy the result into our private buffer. */ \ - if (err_str != (buf)) { \ -- buf[(len)] = '\0'; \ -+ (buf)[(len)] = '\0'; \ - strncat((buf), err_str, ((len) - 1)); \ - } \ - } while (0) diff --git a/libs/hiredis/patches/010-fix_pkconfig_file.patch b/libs/hiredis/patches/010-fix_pkconfig_file.patch new file mode 100644 index 00000000..95577762 --- /dev/null +++ b/libs/hiredis/patches/010-fix_pkconfig_file.patch @@ -0,0 +1,34 @@ +commit f96d9f9d2e3ba39352035e6ac26463243484d404 +Author: Sebastian Kemper +Date: Sun Jan 13 19:25:52 2019 +0100 + + Setup .pc file to allow use for cross-compiling + + The Makefile is currently creating the pkg-config file using static lib + and include dir statements. Change that so that projects that + cross-compile hiredis can use pkg-config to setup other programs + depending on it. + + Note: these projects (like OpenWrt) call pkg-config with arguments to + overwrite some variables in the .pc file, namely: + + --define-variable=prefix=<...> + --define-variable=exec_prefix=<...> + + Signed-off-by: Sebastian Kemper + +diff --git a/Makefile b/Makefile +index 07b8a83..14d21de 100644 +--- a/Makefile ++++ b/Makefile +@@ -166,8 +166,8 @@ $(PKGCONFNAME): hiredis.h + @echo "Generating $@ for pkgconfig..." + @echo prefix=$(PREFIX) > $@ + @echo exec_prefix=\$${prefix} >> $@ +- @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@ +- @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@ ++ @echo libdir=\$${exec_prefix}/$(LIBRARY_PATH) >> $@ ++ @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@ + @echo >> $@ + @echo Name: hiredis >> $@ + @echo Description: Minimalistic C client library for Redis. >> $@ diff --git a/libs/ibrcommon/Makefile b/libs/ibrcommon/Makefile index 54fb7a6a..dfa2e591 100644 --- a/libs/ibrcommon/Makefile +++ b/libs/ibrcommon/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ibrcommon PKG_VERSION:=1.0.1 -PKG_RELEASE:=2 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases @@ -20,12 +20,13 @@ PKG_LICENSE:=Apache-2.0 PKG_INSTALL:=1 PKG_FIXUP:=libtool +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/ibrcommon SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libstdcpp +libpthread +librt +libnl +libopenssl + DEPENDS:=$(CXX_DEPENDS) +librt +libnl +libopenssl TITLE:=IBR Common C++ Library endef diff --git a/libs/ibrcommon/patches/010-build-with-openssl-1.1.patch b/libs/ibrcommon/patches/010-build-with-openssl-1.1.patch new file mode 100644 index 00000000..c987e197 --- /dev/null +++ b/libs/ibrcommon/patches/010-build-with-openssl-1.1.patch @@ -0,0 +1,353 @@ +From fe7ae129b8be052e5178b07e76e19ede21b13261 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Tue, 22 May 2018 16:40:20 -0300 +Subject: [PATCH] ibrcommon: added openssl 1.1 compatibility + +This patch adds compatibility to openssl 1.1.0. + +Signed-off-by: Eneas U de Queiroz +--- + ibrcommon/ssl/HMacStream.cpp | 11 ++++---- + ibrcommon/ssl/HMacStream.h | 2 +- + ibrcommon/ssl/RSASHA256Stream.cpp | 28 +++++++++--------- + ibrcommon/ssl/RSASHA256Stream.h | 2 +- + ibrcommon/ssl/iostreamBIO.cpp | 44 ++++++++++++++++++++++------- + ibrcommon/ssl/openssl_compat.h | 38 +++++++++++++++++++++++++ + 6 files changed, 95 insertions(+), 30 deletions(-) + create mode 100644 ibrcommon/ssl/openssl_compat.h + +diff --git a/ibrcommon/ssl/HMacStream.cpp b/ibrcommon/ssl/HMacStream.cpp +index e5d317e3..66d8ce42 100644 +--- a/ibrcommon/ssl/HMacStream.cpp ++++ b/ibrcommon/ssl/HMacStream.cpp +@@ -20,29 +20,30 @@ + */ + + #include "ibrcommon/ssl/HMacStream.h" ++#include "openssl_compat.h" + + namespace ibrcommon + { + HMacStream::HMacStream(const unsigned char * const key, const int key_size) + : HashStream(EVP_MAX_MD_SIZE, BUFF_SIZE), key_(key), key_size_(key_size) + { +- HMAC_CTX_init(&ctx_); +- HMAC_Init_ex(&ctx_, key_, key_size_, EVP_sha1(), NULL); ++ ctx_ = HMAC_CTX_new(); ++ HMAC_Init_ex(ctx_, key_, key_size_, EVP_sha1(), NULL); + } + + HMacStream::~HMacStream() + { +- HMAC_CTX_cleanup(&ctx_); ++ HMAC_CTX_free(ctx_); + } + + void HMacStream::update(char *buf, const size_t size) + { + // hashing +- HMAC_Update(&ctx_, (unsigned char*)buf, size); ++ HMAC_Update(ctx_, (unsigned char*)buf, size); + } + + void HMacStream::finalize(char * hash, unsigned int &size) + { +- HMAC_Final(&ctx_, (unsigned char*)hash, &size); ++ HMAC_Final(ctx_, (unsigned char*)hash, &size); + } + } +diff --git a/ibrcommon/ssl/HMacStream.h b/ibrcommon/ssl/HMacStream.h +index 7dcea168..d04bceb8 100644 +--- a/ibrcommon/ssl/HMacStream.h ++++ b/ibrcommon/ssl/HMacStream.h +@@ -44,7 +44,7 @@ namespace ibrcommon + const unsigned char * const key_; + const int key_size_; + +- HMAC_CTX ctx_; ++ HMAC_CTX* ctx_; + }; + } + +diff --git a/ibrcommon/ssl/RSASHA256Stream.cpp b/ibrcommon/ssl/RSASHA256Stream.cpp +index d94430ed..d25c5d2f 100644 +--- a/ibrcommon/ssl/RSASHA256Stream.cpp ++++ b/ibrcommon/ssl/RSASHA256Stream.cpp +@@ -21,6 +21,7 @@ + + #include "ibrcommon/ssl/RSASHA256Stream.h" + #include "ibrcommon/Logger.h" ++#include "openssl_compat.h" + #include + + namespace ibrcommon +@@ -30,11 +31,11 @@ namespace ibrcommon + { + // Initialize get pointer. This should be zero so that underflow is called upon first read. + setp(&out_buf_[0], &out_buf_[BUFF_SIZE - 1]); +- EVP_MD_CTX_init(&_ctx); ++ _ctx = EVP_MD_CTX_new(); + + if (!_verify) + { +- if (!EVP_SignInit_ex(&_ctx, EVP_sha256(), NULL)) ++ if (!EVP_SignInit_ex(_ctx, EVP_sha256(), NULL)) + { + IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to initialize the signature function" << IBRCOMMON_LOGGER_ENDL; + ERR_print_errors_fp(stderr); +@@ -42,7 +43,7 @@ namespace ibrcommon + } + else + { +- if (!EVP_VerifyInit_ex(&_ctx, EVP_sha256(), NULL)) ++ if (!EVP_VerifyInit_ex(_ctx, EVP_sha256(), NULL)) + { + IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to initialize the verification function" << IBRCOMMON_LOGGER_ENDL; + ERR_print_errors_fp(stderr); +@@ -52,18 +53,19 @@ namespace ibrcommon + + RSASHA256Stream::~RSASHA256Stream() + { +- EVP_MD_CTX_cleanup(&_ctx); ++ EVP_MD_CTX_free(_ctx); + } + + void RSASHA256Stream::reset() + { +- EVP_MD_CTX_cleanup(&_ctx); +- +- EVP_MD_CTX_init(&_ctx); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ EVP_MD_CTX_cleanup(_ctx); ++#endif ++ EVP_MD_CTX_init(_ctx); + + if (!_verify) + { +- if (!EVP_SignInit_ex(&_ctx, EVP_sha256(), NULL)) ++ if (!EVP_SignInit_ex(_ctx, EVP_sha256(), NULL)) + { + IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to initialize the signature function" << IBRCOMMON_LOGGER_ENDL; + ERR_print_errors_fp(stderr); +@@ -71,7 +73,7 @@ namespace ibrcommon + } + else + { +- if (!EVP_VerifyInit_ex(&_ctx, EVP_sha256(), NULL)) ++ if (!EVP_VerifyInit_ex(_ctx, EVP_sha256(), NULL)) + { + IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to initialize the verfication function" << IBRCOMMON_LOGGER_ENDL; + ERR_print_errors_fp(stderr); +@@ -91,7 +93,7 @@ namespace ibrcommon + std::vector sign(EVP_PKEY_size(_pkey)); + unsigned int size = EVP_PKEY_size(_pkey); + +- _return_code = EVP_SignFinal(&_ctx, &sign[0], &size, _pkey); ++ _return_code = EVP_SignFinal(_ctx, &sign[0], &size, _pkey); + + _sign = std::string((const char*)&sign[0], size); + +@@ -107,7 +109,7 @@ namespace ibrcommon + if (!_sign_valid) + { + sync(); +- _return_code = EVP_VerifyFinal(&_ctx, reinterpret_cast(their_sign.c_str()), static_cast(their_sign.size()), _pkey); ++ _return_code = EVP_VerifyFinal(_ctx, reinterpret_cast(their_sign.c_str()), static_cast(their_sign.size()), _pkey); + _sign_valid = true; + } + return _return_code; +@@ -145,7 +147,7 @@ namespace ibrcommon + if (!_verify) + // hashing + { +- if (!EVP_SignUpdate(&_ctx, &out_buf_[0], iend - ibegin)) ++ if (!EVP_SignUpdate(_ctx, &out_buf_[0], iend - ibegin)) + { + IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to feed data into the signature function" << IBRCOMMON_LOGGER_ENDL; + ERR_print_errors_fp(stderr); +@@ -153,7 +155,7 @@ namespace ibrcommon + } + else + { +- if (!EVP_VerifyUpdate(&_ctx, &out_buf_[0], iend - ibegin)) ++ if (!EVP_VerifyUpdate(_ctx, &out_buf_[0], iend - ibegin)) + { + IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to feed data into the verification function" << IBRCOMMON_LOGGER_ENDL; + ERR_print_errors_fp(stderr); +diff --git a/ibrcommon/ssl/RSASHA256Stream.h b/ibrcommon/ssl/RSASHA256Stream.h +index 344f8e10..6f3a1168 100644 +--- a/ibrcommon/ssl/RSASHA256Stream.h ++++ b/ibrcommon/ssl/RSASHA256Stream.h +@@ -106,7 +106,7 @@ namespace ibrcommon + + /** the context in which the streamed data will be feed into for + calculation of the hash/signature */ +- EVP_MD_CTX _ctx; ++ EVP_MD_CTX * _ctx; + + /** tells if the context needs to be finalized to get a valid signature or + verification */ +diff --git a/ibrcommon/ssl/iostreamBIO.cpp b/ibrcommon/ssl/iostreamBIO.cpp +index 18c1b55c..ea6c63eb 100644 +--- a/ibrcommon/ssl/iostreamBIO.cpp ++++ b/ibrcommon/ssl/iostreamBIO.cpp +@@ -23,6 +23,7 @@ + + #include "ibrcommon/Logger.h" + ++#include "openssl_compat.h" + #include + + namespace ibrcommon +@@ -42,7 +43,20 @@ static int create(BIO *bio); + //static int destroy(BIO *bio); + //static long (*callback_ctrl)(BIO *, int, bio_info_cb *); + +- ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++BIO_METHOD * BIO_iostream_method() ++{ ++ static BIO_METHOD *iostream_method = NULL; ++ if (iostream_method) { ++ iostream_method = BIO_meth_new(iostreamBIO::type, iostreamBIO::name); ++ BIO_meth_set_write(iostream_method, bwrite); ++ BIO_meth_set_read(iostream_method, bread); ++ BIO_meth_set_ctrl(iostream_method, ctrl); ++ BIO_meth_set_create(iostream_method, create); ++ } ++ return iostream_method; ++} ++#else + static BIO_METHOD iostream_method = + { + iostreamBIO::type, +@@ -56,12 +70,17 @@ static BIO_METHOD iostream_method = + NULL,//destroy, + NULL//callback_ctrl + }; ++BIO_METHOD * BIO_iostream_method() ++{ ++ return &iostream_method; ++} ++#endif + + iostreamBIO::iostreamBIO(iostream *stream) + : _stream(stream) + { + /* create BIO */ +- _bio = BIO_new(&iostream_method); ++ _bio = BIO_new(BIO_iostream_method()); + if(!_bio){ + /* creation failed, throw exception */ + char err_buf[ERR_BUF_SIZE]; +@@ -72,7 +91,7 @@ iostreamBIO::iostreamBIO(iostream *stream) + } + + /* save the iostream in the bio object */ +- _bio->ptr = stream; ++ BIO_set_data(_bio, (void *) stream); + } + + BIO * iostreamBIO::getBIO(){ +@@ -81,10 +100,10 @@ BIO * iostreamBIO::getBIO(){ + + static int create(BIO *bio) + { +- bio->ptr = NULL; +- /* (from openssl memory bio) */ +- bio->shutdown=1; +- bio->init=1; ++ BIO_set_data(bio, NULL); ++ BIO_set_shutdown(bio, 1); ++ BIO_set_init(bio, 1); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + /* from bss_mem.c (openssl): + * bio->num is used to hold the value to return on 'empty', if it is + * 0, should_retry is not set +@@ -93,6 +112,7 @@ static int create(BIO *bio) + * it is set to 0 since the underlying stream is blocking + */ + bio->num= 0; ++#endif + + return 1; + } +@@ -102,7 +122,7 @@ static int create(BIO *bio) + static long ctrl(BIO *bio, int cmd, long num, void *) + { + long ret; +- iostream *stream = reinterpret_cast(bio->ptr); ++ iostream *stream = reinterpret_cast(BIO_get_data(bio)); + + IBRCOMMON_LOGGER_DEBUG_TAG("iostreamBIO", 90) << "ctrl called, cmd: " << cmd << ", num: " << num << "." << IBRCOMMON_LOGGER_ENDL; + +@@ -147,8 +167,12 @@ static long ctrl(BIO *bio, int cmd, long num, void *) + + static int bread(BIO *bio, char *buf, int len) + { +- iostream *stream = reinterpret_cast(bio->ptr); ++ iostream *stream = reinterpret_cast(BIO_get_data(bio)); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ int num_bytes = 0; ++#else + int num_bytes = bio->num; ++#endif + + try{ + /* make sure to read at least 1 byte and then read as much as we can */ +@@ -170,7 +194,7 @@ static int bwrite(BIO *bio, const char *buf, int len) + if(len == 0){ + return 0; + } +- iostream *stream = reinterpret_cast(bio->ptr); ++ iostream *stream = reinterpret_cast(BIO_get_data(bio)); + + /* write the data */ + try{ +diff --git a/ibrcommon/ssl/openssl_compat.h b/ibrcommon/ssl/openssl_compat.h +new file mode 100644 +index 00000000..e491677f +--- /dev/null ++++ b/ibrcommon/ssl/openssl_compat.h +@@ -0,0 +1,38 @@ ++#ifndef OPENSSL_COMPAT_H ++#define OPENSSL_COMPAT_H ++ ++#include ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ ++#include ++#include ++ ++static inline EVP_MD_CTX * EVP_MD_CTX_new() ++{ ++ EVP_MD_CTX *ctx; ++ ++ ctx = (EVP_MD_CTX *) OPENSSL_malloc(sizeof(EVP_MD_CTX)); ++ EVP_MD_CTX_init(ctx); ++ return ctx; ++} ++#define EVP_MD_CTX_free(c) if (c != NULL) OPENSSL_free(c) ++ ++static inline HMAC_CTX * HMAC_CTX_new() ++{ ++ HMAC_CTX *ctx; ++ ++ ctx = (HMAC_CTX *) OPENSSL_malloc(sizeof(HMAC_CTX)); ++ HMAC_CTX_init(ctx); ++ return ctx; ++} ++#define HMAC_CTX_free(c) if (c != NULL) OPENSSL_free(c) ++ ++#define BIO_get_data(b) b->ptr ++#define BIO_set_data(b, v) b->ptr=v ++#define BIO_set_shutdown(b, v) b->shutdown=v ++#define BIO_set_init(b, v) b->init=v ++ ++#endif /* OPENSSL_VERSION_NUMBER */ ++ ++#endif /* OPENSSL_COMPAT_H */ ++ +-- +2.16.1 + diff --git a/libs/ibrcommon/patches/020-openssl-deprecated.patch b/libs/ibrcommon/patches/020-openssl-deprecated.patch new file mode 100644 index 00000000..e69a82ff --- /dev/null +++ b/libs/ibrcommon/patches/020-openssl-deprecated.patch @@ -0,0 +1,25 @@ +--- a/ibrcommon/ssl/TLSStream.cpp ++++ b/ibrcommon/ssl/TLSStream.cpp +@@ -259,16 +259,22 @@ namespace ibrcommon + /* openssl initialization */ + /* the if block is needed because SSL_library_init() is not reentrant */ + if(!_SSL_initialized){ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_load_error_strings(); + SSL_library_init(); + ERR_load_BIO_strings(); + ERR_load_SSL_strings(); ++#endif + _SSL_initialized = true; + } + + + /* create ssl context and throw exception if it fails */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + _ssl_ctx = SSL_CTX_new(TLSv1_method()); ++#else ++ _ssl_ctx = SSL_CTX_new(TLS_method()); ++#endif + if(!_ssl_ctx){ + char err_buf[ERR_BUF_SIZE]; + ERR_error_string_n(ERR_get_error(), err_buf, ERR_BUF_SIZE); diff --git a/libs/ibrdtn/Makefile b/libs/ibrdtn/Makefile index a510c786..c4aceba1 100644 --- a/libs/ibrdtn/Makefile +++ b/libs/ibrdtn/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ibrdtn PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases @@ -20,6 +20,7 @@ PKG_LICENSE:=Apache-2.0 PKG_INSTALL:=1 PKG_FIXUP:=libtool +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/ibrdtn diff --git a/libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch b/libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch new file mode 100644 index 00000000..fe535089 --- /dev/null +++ b/libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch @@ -0,0 +1,25 @@ +From 199c86591edc7e82b92903efecadc4f69ea63370 Mon Sep 17 00:00:00 2001 +From: Johannes Morgenroth +Date: Tue, 1 Jan 2019 11:25:50 +0100 +Subject: [PATCH] Add operator!=() to Bundle::block_elem + +Alternative implementations of libstdcpp as uclibc++ use it in +the algorithm implemenetations. +--- + ibrdtn/data/Bundle.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h +index 036a2a6fb..9bbc066d7 100644 +--- a/ibrdtn/data/Bundle.h ++++ b/ibrdtn/data/Bundle.h +@@ -69,6 +69,9 @@ namespace dtn + bool operator==(const dtn::data::block_t &type) const { + return (**this) == type; + } ++ bool operator!=(const dtn::data::block_t &type) const { ++ return !((**this) == type); ++ } + }; + + typedef std::list block_list; diff --git a/libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch b/libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch new file mode 100644 index 00000000..d1e2c588 --- /dev/null +++ b/libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch @@ -0,0 +1,22 @@ +From 6945698778caf7cdaace9ce8dae82162dbe2ee9f Mon Sep 17 00:00:00 2001 +From: Johannes Morgenroth +Date: Thu, 3 Jan 2019 07:26:51 +0100 +Subject: [PATCH] Use const iterator in const function of MemoryBundleSet + +--- + ibrdtn/data/MemoryBundleSet.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ibrdtn/data/MemoryBundleSet.cpp b/ibrdtn/data/MemoryBundleSet.cpp +index 987342e6d..b67fdd393 100644 +--- a/ibrdtn/data/MemoryBundleSet.cpp ++++ b/ibrdtn/data/MemoryBundleSet.cpp +@@ -134,7 +134,7 @@ namespace dtn + // the bundles set. This happen if the MemoryBundleSet gets deserialized. + if (!_consistent) return true; + +- bundle_set::iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle)); ++ bundle_set::const_iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle)); + return (iter != _bundles.end()); + } + diff --git a/libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch b/libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch new file mode 100644 index 00000000..0e29a132 --- /dev/null +++ b/libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch @@ -0,0 +1,41 @@ +From 1395d849d73147319ee422d2ce34de0bcb90e6f8 Mon Sep 17 00:00:00 2001 +From: Johannes Morgenroth +Date: Thu, 3 Jan 2019 07:34:14 +0100 +Subject: [PATCH] Use std::streamoff instead of std::streampos + +--- + ibrdtn/data/BundleMerger.cpp | 2 +- + ibrdtn/data/Dictionary.cpp | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ibrdtn/data/BundleMerger.cpp b/ibrdtn/data/BundleMerger.cpp +index 1cd20c522..b71a0849b 100644 +--- a/ibrdtn/data/BundleMerger.cpp ++++ b/ibrdtn/data/BundleMerger.cpp +@@ -119,7 +119,7 @@ namespace dtn + } + + ibrcommon::BLOB::iostream stream = c._blob.iostream(); +- (*stream).seekp(obj.fragmentoffset.get()); ++ (*stream).seekp(obj.fragmentoffset.get()); + + const dtn::data::PayloadBlock &p = obj.find(); + const Length plength = p.getLength(); +diff --git a/ibrdtn/data/Dictionary.cpp b/ibrdtn/data/Dictionary.cpp +index 6299e66f3..208f90488 100644 +--- a/ibrdtn/data/Dictionary.cpp ++++ b/ibrdtn/data/Dictionary.cpp +@@ -154,11 +154,11 @@ namespace dtn + { + char buffer[1024]; + +- _bytestream.seekg(scheme.get()); ++ _bytestream.seekg(scheme.get()); + _bytestream.get(buffer, 1024, '\0'); + std::string scheme_str(buffer); + +- _bytestream.seekg(ssp.get()); ++ _bytestream.seekg(ssp.get()); + _bytestream.get(buffer, 1024, '\0'); + std::string ssp_str(buffer); + diff --git a/libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch b/libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch new file mode 100644 index 00000000..df9f27f1 --- /dev/null +++ b/libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch @@ -0,0 +1,53 @@ +From a5b9c2feeaabbd90c9734c5d865d471eed0d5e3a Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Thu, 28 Mar 2019 01:55:15 -0700 +Subject: [PATCH] Add operator!=() to BundleID and MetaBundle + +Needed for uClibc++. + +Signed-off-by: Rosen Penev +--- + ibrdtn/data/Bundle.cpp | 10 ++++++++++ + ibrdtn/data/Bundle.h | 2 ++ + 2 files changed, 12 insertions(+) + +diff --git a/ibrdtn/data/Bundle.cpp b/ibrdtn/data/Bundle.cpp +index f515860..943544e 100644 +--- a/ibrdtn/data/Bundle.cpp ++++ b/ibrdtn/data/Bundle.cpp +@@ -71,11 +71,21 @@ namespace dtn + return other == (const PrimaryBlock&)(*this); + } + ++ bool Bundle::operator!=(const BundleID& other) const ++ { ++ return other != (const PrimaryBlock&)(*this); ++ } ++ + bool Bundle::operator==(const MetaBundle& other) const + { + return other == (const PrimaryBlock&)(*this); + } + ++ bool Bundle::operator!=(const MetaBundle& other) const ++ { ++ return other != (const PrimaryBlock&)(*this); ++ } ++ + bool Bundle::operator!=(const Bundle& other) const + { + return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other; +diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h +index 9bbc066..6a4ea47 100644 +--- a/ibrdtn/data/Bundle.h ++++ b/ibrdtn/data/Bundle.h +@@ -97,7 +97,9 @@ namespace dtn + virtual ~Bundle(); + + bool operator==(const BundleID& other) const; ++ bool operator!=(const BundleID& other) const; + bool operator==(const MetaBundle& other) const; ++ bool operator!=(const MetaBundle& other) const; + + bool operator==(const Bundle& other) const; + bool operator!=(const Bundle& other) const; diff --git a/libs/icu/Makefile b/libs/icu/Makefile index 277ab05a..76d611ab 100644 --- a/libs/icu/Makefile +++ b/libs/icu/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icu4c -MAJOR_VERSION:=65 +MAJOR_VERSION:=66 MINOR_VERSION:=1 PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION) -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(MAJOR_VERSION)_$(MINOR_VERSION)-src.tgz PKG_SOURCE_URL:=https://github.com/unicode-org/icu/releases/download/release-$(MAJOR_VERSION)-$(MINOR_VERSION) -PKG_HASH:=53e37466b3d6d6d01ead029e3567d873a43a5d1c668ed2278e253b683136d948 +PKG_HASH:=52a3f2209ab95559c1cf0a14f24338001f389615bf00e2585ef3dbc43ecf0a2e PKG_LICENSE:=ICU PKG_LICENSE_FILES:=LICENSE @@ -137,6 +137,8 @@ define Host/Install $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/icupkg $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgdata $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/bin/ $(CP) $(HOST_BUILD_DIR)/lib/*.so* $(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)/lib/ + $(RM) $(STAGING_DIR_HOSTPKG)/share/icu/current + (cd $(STAGING_DIR_HOSTPKG)/share/icu;$(LN) $(PKG_VERSION) current) endef define Package/icu/install diff --git a/libs/icu/patches/020-ICU-20958_CVE-2020-10531.patch b/libs/icu/patches/020-ICU-20958_CVE-2020-10531.patch new file mode 100644 index 00000000..a64e9306 --- /dev/null +++ b/libs/icu/patches/020-ICU-20958_CVE-2020-10531.patch @@ -0,0 +1,118 @@ +From 1d824ede675782fcf9367e4bbcba1d998cdc33f1 Mon Sep 17 00:00:00 2001 +From: Frank Tang +Date: Sat, 1 Feb 2020 02:39:04 +0000 +Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append + +See #971 +--- + icu4c/source/common/unistr.cpp | 6 ++- + icu4c/source/test/intltest/ustrtest.cpp | 62 +++++++++++++++++++++++++ + icu4c/source/test/intltest/ustrtest.h | 1 + + 3 files changed, 68 insertions(+), 1 deletion(-) + +diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp +index 901bb3358ba..077b4d6ef20 100644 +--- a/common/unistr.cpp ++++ b/common/unistr.cpp +@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng + } + + int32_t oldLength = length(); +- int32_t newLength = oldLength + srcLength; ++ int32_t newLength; ++ if (uprv_add32_overflow(oldLength, srcLength, &newLength)) { ++ setToBogus(); ++ return *this; ++ } + + // Check for append onto ourself + const UChar* oldArray = getArrayStart(); +diff --git a/icu4c/source/test/intltest/ustrtest.cpp b/icu4c/source/test/intltest/ustrtest.cpp +index b6515ea813c..ad38bdf53a3 100644 +--- a/test/intltest/ustrtest.cpp ++++ b/test/intltest/ustrtest.cpp +@@ -67,6 +67,7 @@ void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* & + TESTCASE_AUTO(TestWCharPointers); + TESTCASE_AUTO(TestNullPointers); + TESTCASE_AUTO(TestUnicodeStringInsertAppendToSelf); ++ TESTCASE_AUTO(TestLargeAppend); + TESTCASE_AUTO_END; + } + +@@ -2310,3 +2311,64 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() { + str.insert(2, sub); + assertEquals("", u"abbcdcde", str); + } ++ ++void UnicodeStringTest::TestLargeAppend() { ++ if(quick) return; ++ ++ IcuTestErrorCode status(*this, "TestLargeAppend"); ++ // Make a large UnicodeString ++ int32_t len = 0xAFFFFFF; ++ UnicodeString str; ++ char16_t *buf = str.getBuffer(len); ++ // A fast way to set buffer to valid Unicode. ++ // 4E4E is a valid unicode character ++ uprv_memset(buf, 0x4e, len * 2); ++ str.releaseBuffer(len); ++ UnicodeString dest; ++ // Append it 16 times ++ // 0xAFFFFFF times 16 is 0xA4FFFFF1, ++ // which is greater than INT32_MAX, which is 0x7FFFFFFF. ++ int64_t total = 0; ++ for (int32_t i = 0; i < 16; i++) { ++ dest.append(str); ++ total += len; ++ if (total <= INT32_MAX) { ++ assertFalse("dest is not bogus", dest.isBogus()); ++ } else { ++ assertTrue("dest should be bogus", dest.isBogus()); ++ } ++ } ++ dest.remove(); ++ total = 0; ++ for (int32_t i = 0; i < 16; i++) { ++ dest.append(str); ++ total += len; ++ if (total + len <= INT32_MAX) { ++ assertFalse("dest is not bogus", dest.isBogus()); ++ } else if (total <= INT32_MAX) { ++ // Check that a string of exactly the maximum size works ++ UnicodeString str2; ++ int32_t remain = INT32_MAX - total; ++ char16_t *buf2 = str2.getBuffer(remain); ++ if (buf2 == nullptr) { ++ // if somehow memory allocation fail, return the test ++ return; ++ } ++ uprv_memset(buf2, 0x4e, remain * 2); ++ str2.releaseBuffer(remain); ++ dest.append(str2); ++ total += remain; ++ assertEquals("When a string of exactly the maximum size works", (int64_t)INT32_MAX, total); ++ assertEquals("When a string of exactly the maximum size works", INT32_MAX, dest.length()); ++ assertFalse("dest is not bogus", dest.isBogus()); ++ ++ // Check that a string size+1 goes bogus ++ str2.truncate(1); ++ dest.append(str2); ++ total++; ++ assertTrue("dest should be bogus", dest.isBogus()); ++ } else { ++ assertTrue("dest should be bogus", dest.isBogus()); ++ } ++ } ++} +diff --git a/icu4c/source/test/intltest/ustrtest.h b/icu4c/source/test/intltest/ustrtest.h +index 218befdcc68..4a356a92c7a 100644 +--- a/test/intltest/ustrtest.h ++++ b/test/intltest/ustrtest.h +@@ -97,6 +97,7 @@ class UnicodeStringTest: public IntlTest { + void TestWCharPointers(); + void TestNullPointers(); + void TestUnicodeStringInsertAppendToSelf(); ++ void TestLargeAppend(); + }; + + #endif diff --git a/libs/ipfs-http-client/Makefile b/libs/ipfs-http-client/Makefile new file mode 100644 index 00000000..7b7cc04b --- /dev/null +++ b/libs/ipfs-http-client/Makefile @@ -0,0 +1,82 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipfs-http-client +PKG_RELEASE:=3 + +PKG_MAINTAINER:=Leonid Esman +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.MIT + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/vasild/cpp-ipfs-http-client.git +PKG_SOURCE_DATE:=2019-11-05 +PKG_SOURCE_VERSION:=763e59ad698f3e3846f85df11e01c18ef3fbc401 +PKG_MIRROR_HASH:=a2b5721faf0d43ddb4a892245ef382666149c83f3f97e558e1a6acf2402fb9fd + +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=nlohmannjson + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/ipfs-http-client/Default/description + IPFS (the InterPlanetary File System) is the Distributed Web. + Specs, docs, sources, links: https://ipfs.io/ and https://github.com/ipfs. + This is Vasil Dimov's C++ IPFS HTTP API client library. +endef + +define Package/libipfs-http-client + SECTION:=libs + CATEGORY:=Libraries + TITLE:=IPFS client library + URL:=https://github.com/vasild/cpp-ipfs-http-client + DEPENDS:= +libcurl +libstdcpp +libatomic +endef + +define Package/libipfs-http-client/description + $(call Package/ipfs-http-client/Default/description) + This package contains shared library. +endef + +define Package/ipfs-http-client-tests + SECTION:=utils + CATEGORY:=Utilities + TITLE:=IPFS client library tests + URL:=https://github.com/vasild/cpp-ipfs-http-client + DEPENDS:=+libipfs-http-client +libcurl +endef + +define Package/ipfs-http-client-tests/description + $(call Package/ipfs-http-client/Default/description) + This package contains library tests. +endef + +CMAKE_OPTIONS += \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=ON + +define Package/libipfs-http-client/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipfs-http-client.so* $(1)/usr/lib +endef + +define Package/ipfs-http-client-tests/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/block $(1)/usr/bin/ipfs-block + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/config $(1)/usr/bin/ipfs-config + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/dht $(1)/usr/bin/ipfs-dht + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/files $(1)/usr/bin/ipfs-files + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/generic $(1)/usr/bin/ipfs-generic + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/key $(1)/usr/bin/ipfs-key + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/name $(1)/usr/bin/ipfs-name + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/object $(1)/usr/bin/ipfs-object + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/pin $(1)/usr/bin/ipfs-pin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/swarm $(1)/usr/bin/ipfs-swarm +endef + +$(eval $(call BuildPackage,libipfs-http-client)) +$(eval $(call BuildPackage,ipfs-http-client-tests)) diff --git a/libs/ipfs-http-client/patches/001-add-srv-addr.patch b/libs/ipfs-http-client/patches/001-add-srv-addr.patch new file mode 100644 index 00000000..21ff7464 --- /dev/null +++ b/libs/ipfs-http-client/patches/001-add-srv-addr.patch @@ -0,0 +1,247 @@ +--- a/test/block.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/block.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -24,9 +24,16 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + /** [ipfs::Client::BlockPut] */ + ipfs::Json block; +--- a/test/config.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/config.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -23,9 +23,16 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + /** [ipfs::Client::ConfigSet] */ + client.ConfigSet("Datastore.StorageMax", "20GB"); +--- a/test/dht.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/dht.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -23,9 +23,16 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + ipfs::Json add_result; + client.FilesAdd( +--- a/test/error.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/error.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -35,16 +35,23 @@ + } + } // namespace ipfs + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client_cant_connect("localhost", 57); ++ ipfs::Client client_cant_connect(srvaddr, 57); + + ipfs::test::must_fail("client.Version()", [&client_cant_connect]() { + ipfs::Json version; + client_cant_connect.Version(&version); + }); + +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + std::string object_id; + client.ObjectNew(&object_id); +--- a/test/files.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/files.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -24,9 +24,16 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + /** [ipfs::Client::FilesGet] */ + std::stringstream contents; +--- a/test/generic.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/generic.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -24,16 +24,23 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { + /** [ipfs::Client::Client] */ +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + /** [ipfs::Client::Client] */ + + ipfs::Client clientA(client); + clientA = client; + ipfs::Client clientB(std::move(clientA)); +- ipfs::Client clientC("localhost", 5001); ++ ipfs::Client clientC(srvaddr, 5001); + clientC = std::move(clientB); + + #pragma GCC diagnostic push +--- a/test/key.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/key.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -26,9 +26,16 @@ + + using Json = nlohmann::json; + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + /** [ipfs::Client::KeyGen] */ + std::string key_id; +--- a/test/name.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/name.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -24,9 +24,16 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + // We need a key here, so as not to clobber the "self" key. + std::string key_id; +--- a/test/object.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/object.cc 2019-11-22 18:16:58.245249328 +0300 +@@ -24,9 +24,16 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + /** [ipfs::Client::ObjectNew] */ + std::string object_id; +--- a/test/pin.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/pin.cc 2019-11-23 23:09:57.507400418 +0300 +@@ -23,9 +23,16 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + std::string object_id; + +--- a/test/swarm.cc 2019-11-22 18:16:53.973272202 +0300 ++++ b/test/swarm.cc 2019-11-23 23:10:07.199342933 +0300 +@@ -23,9 +23,16 @@ + #include + #include + +-int main(int, char**) { ++int main(int argc, char** argv) { ++ char addr127001[]="127.0.0.1"; ++ char *srvaddr; ++ if (argc<2) ++ srvaddr=addr127001; ++ else ++ srvaddr=argv[1]; ++ + try { +- ipfs::Client client("localhost", 5001); ++ ipfs::Client client(srvaddr, 5001); + + /** [ipfs::Client::SwarmAddrs] */ + ipfs::Json addresses; diff --git a/libs/jansson/Makefile b/libs/jansson/Makefile deleted file mode 100644 index fdc013fc..00000000 --- a/libs/jansson/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2011-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=jansson -PKG_VERSION:=2.10 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.digip.org/jansson/releases/ -PKG_HASH:=241125a55f739cd713808c4e0089986b8c3da746da8b384952912ad659fa2f5a - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/jansson - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Jansson library - URL:=http://www.digip.org/jansson/ - MAINTAINER:=Gergely Kiss -endef - -define Package/jansson/description - Jansson is a C library for encoding, decoding and manipulating JSON data -endef - -TARGET_CFLAGS += $(FPIC) -TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -lm - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{lib,include} - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson* $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ -endef - -define Package/jansson/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,jansson)) diff --git a/libs/jose/Makefile b/libs/jose/Makefile new file mode 100644 index 00000000..20b9c2f7 --- /dev/null +++ b/libs/jose/Makefile @@ -0,0 +1,74 @@ +# +# Author: Tibor Dudlák +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=jose +PKG_VERSION:=10 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/ +PKG_HASH:=5c9cdcfb535c4d9f781393d7530521c72b1dd81caa9934cab6dd752cc7efcd72 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/libjose + SECTION:=libs + TITLE:=Provides a full crypto stack including key generation, signing and encryption. + DEPENDS:=+zlib +jansson +libopenssl +libpthread + URL:=https://github.com/latchset/jose + MAINTAINER:=Tibor Dudlák +endef + +define Package/jose + SECTION:=utils + TITLE:=Provides a full crypto stack including key generation, signing and encryption. + DEPENDS:=+libjose + URL:=https://github.com/latchset/jose + MAINTAINER:=Tibor Dudlák +endef + +define Package/jose/description + jose is a command line utility for performing various tasks on JSON + Object Signing and Encryption (JOSE) objects. José provides a full + crypto stack including key generation, signing and encryption. +endef + +define Package/libjose/description + libjose is a library for performing various tasks on JSON + Object Signing and Encryption (JOSE) objects. José provides a full + crypto stack including key generation, signing and encryption. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME) + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/include/$(PKG_NAME)/*.h $(1)/usr/include/$(PKG_NAME) + $(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig +endef + +define Package/libjose/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib/ +endef + +define Package/jose/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libjose)) +$(eval $(call BuildPackage,jose)) diff --git a/libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch b/libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch new file mode 100644 index 00000000..50757603 --- /dev/null +++ b/libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch @@ -0,0 +1,33 @@ +From 198f7207427ad7f569aa3592ea16e2bb400db040 Mon Sep 17 00:00:00 2001 +From: Nathaniel McCallum +Date: Fri, 29 Sep 2017 14:49:57 -0400 +Subject: [PATCH] Fix minor FILE* leak + +--- + cmd/jwe/pwd.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/cmd/jwe/pwd.h b/cmd/jwe/pwd.h +index 0b5be54..2f021eb 100644 +--- a/cmd/jwe/pwd.h ++++ b/cmd/jwe/pwd.h +@@ -57,8 +57,10 @@ jwe_getpass(const char *prompt) + nf.c_lflag &= ~ECHO; + nf.c_lflag |= ECHONL; + +- if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) ++ if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) { ++ fclose(tty); + return NULL; ++ } + + fprintf(tty, "%s", prompt); + +@@ -72,6 +74,7 @@ jwe_getpass(const char *prompt) + } + + tcsetattr(fileno(tty), TCSANOW, &of); ++ fclose(tty); + return pwd; + } + #endif diff --git a/libs/jose/patches/020-openssl-deprecated.patch b/libs/jose/patches/020-openssl-deprecated.patch new file mode 100644 index 00000000..bcee0dfa --- /dev/null +++ b/libs/jose/patches/020-openssl-deprecated.patch @@ -0,0 +1,21 @@ +--- a/lib/openssl/compat.h ++++ b/lib/openssl/compat.h +@@ -17,6 +17,7 @@ + + #pragma once + ++#include + #include + #include + #include +--- a/lib/openssl/misc.c ++++ b/lib/openssl/misc.c +@@ -185,6 +185,8 @@ add_entity(json_t *root, json_t *obj, const char *plural, ...) + static void __attribute__((constructor)) + constructor(void) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + OpenSSL_add_all_algorithms(); ++#endif + RAND_poll(); + } diff --git a/libs/json-glib/Makefile b/libs/json-glib/Makefile new file mode 100644 index 00000000..a2235ecb --- /dev/null +++ b/libs/json-glib/Makefile @@ -0,0 +1,83 @@ +# +# Copyright (C) 2020 Sebastian Kemper +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=json-glib +PKG_VERSION:=1.4.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNOME/json-glib/1.4 +PKG_HASH:=720c5f4379513dc11fd97dc75336eb0c0d3338c53128044d9fabec4374f4bc47 + +PKG_INSTALL:=1 + +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Sebastian Kemper + +PKG_BUILD_DEPENDS:=glib2/host meson/host + +OPENWRT_VERBOSE:=c + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../../devel/meson/meson.mk + +define Package/json-glib + SECTION:=libs + CATEGORY:=Libraries + TITLE:=JSON GLib Library + URL:=https://wiki.gnome.org/Projects/JsonGlib + DEPENDS:=+glib2 +endef + +define Package/json-glib/description +JSON-GLib is a library providing serialization and deserialization +support for the JavaScript Object Notation (JSON) format described by +RFC 4627. +endef + +MESON_ARGS += \ + -Ddocs=false \ + -Dintrospection=false \ + -Dman=false + +# Disable installed-tests; this also indirectly removes +# build_aux/gen-installed-test.py calls (copied from Gentoo) +define Build/Prepare + $(call Build/Prepare/Default) + $(SED) 's/install: true/install: false/g' \ + $(PKG_BUILD_DIR)/json-glib/tests/meson.build + $(SED) '/install_data/d' \ + $(PKG_BUILD_DIR)/json-glib/tests/meson.build + $(SED) '/error=format=2/d' $(PKG_BUILD_DIR)/meson.build +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/json-glib-1.0/json-glib + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/json-glib-1.0/json-glib/*.h \ + $(1)/usr/include/json-glib-1.0/json-glib + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-glib-1.0.so* \ + $(1)/usr/lib + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-glib-1.0.pc \ + $(1)/usr/lib/pkgconfig +endef + +define Package/json-glib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-glib-1.0.so.* \ + $(1)/usr/lib +endef + +$(eval $(call BuildPackage,json-glib)) diff --git a/libs/jsoncpp/Makefile b/libs/jsoncpp/Makefile new file mode 100644 index 00000000..0eb1f898 --- /dev/null +++ b/libs/jsoncpp/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2019 Daniel Engberg +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=jsoncpp +PKG_VERSION:=1.9.2 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)? +PKG_HASH:=77a402fb577b2e0e5d0bdc1cf9c65278915cdb25171e3452c68b6da8a561f8f0 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 + +PKG_BUILD_DEPENDS:=meson/host + +include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk + +HOSTCC=$(HOSTCC_NOCACHE) +HOSTCXX=$(HOSTCXX_NOCACHE) + +define Package/jsoncpp + SECTION:=libs + CATEGORY:=Libraries + TITLE:=jsoncpp + URL:=https://github.com/open-source-parsers/jsoncpp + DEPENDS:=+libstdcpp +endef + +define Package/jsoncpp/description + JsonCpp is a C++ library that allows manipulating + JSON values, including serialization and + deserialization to and from strings. It can also + preserve existing comment in + unserialization/serialization steps, making it a + convenient format to store user input files. +endef + +MESON_ARGS += \ + -Db_lto=true + +TARGET_LDFLAGS += -Wl,--gc-sections + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/jsoncpp.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/jsoncpp/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,jsoncpp)) diff --git a/libs/keyutils/Makefile b/libs/keyutils/Makefile index f88e4f48..7c8390e0 100644 --- a/libs/keyutils/Makefile +++ b/libs/keyutils/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keyutils -PKG_VERSION:=1.6 -PKG_RELEASE:=3 +PKG_VERSION:=1.6.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://people.redhat.com/dhowells/keyutils/ -PKG_HASH:=d3aef20cec0005c0fa6b4be40079885567473185b1a57b629b030e67942c7115 +PKG_HASH:=c8b15722ae51d95b9ad76cc6d49a4c2cc19b0c60f72f61fb9bf43eea7cbd64ce PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/libs/leptonica/Makefile b/libs/leptonica/Makefile new file mode 100644 index 00000000..6fff834e --- /dev/null +++ b/libs/leptonica/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2019 Valentín Kivachuk +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=leptonica +PKG_VERSION:=1.78.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.leptonica.org/source/ +PKG_HASH:=e2ed2e81e7a22ddf45d2c05f0bc8b9ae7450545d995bfe28517ba408d14a5a88 + +PKG_MAINTAINER:=Valentín Kivachuk +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=leptonica-license.txt + +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libleptonica + SECTION:=libs + CATEGORY:=Libraries + TITLE:=A library for efficient image processing and image analysis operations + URL:=http://www.leptonica.org/ + DEPENDS:=+giflib +libjpeg +libpng +libtiff +libwebp +zlib +endef + +TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -O3 +TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/leptonica $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblept.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lept.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libleptonica/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblept.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libleptonica)) diff --git a/libs/libaio/Makefile b/libs/libaio/Makefile index 349dcda7..463b9657 100644 --- a/libs/libaio/Makefile +++ b/libs/libaio/Makefile @@ -8,16 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libaio -PKG_VERSION:=0.3.110 -PKG_RELEASE:=1 +PKG_VERSION:=0.3.112 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/liba/libaio/ -PKG_HASH:=e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e -PKG_MAINTAINER:=Steven Barth -PKG_LICENSE:=LGPL-2.1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://releases.pagure.org/libaio +PKG_HASH:=ab0462f2c9d546683e5147b1ce9c195fe95d07fac5bf362f6c01637955c3b492 +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-only +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -28,26 +32,6 @@ define Package/libaio URL:=http://lse.sourceforge.net/io/aio.html endef -define Build/Configure -endef - -LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC) - -TARGET_CFLAGS += $(FPIC) - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - ARCH="$(ARCH)" \ - CC="$(TARGET_CROSS)gcc" \ - LD="$(TARGET_CROSS)ld" \ - CFLAGS="$(LIBAIO_CFLAGS)" \ - all - $(MAKE) -C $(PKG_BUILD_DIR) \ - prefix="$(PKG_INSTALL_DIR)/usr" \ - install -endef - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libaio.h $(1)/usr/include/ diff --git a/libs/libaio/patches/001_arches.patch b/libs/libaio/patches/001_arches.patch index 4130af38..a0b801c4 100644 --- a/libs/libaio/patches/001_arches.patch +++ b/libs/libaio/patches/001_arches.patch @@ -1,112 +1,45 @@ +Description: Add/fix support for m68k, mips, paris, sparc +Author: Guillem Jover +Origin: vendor +Forwarded: no +Last-Update: 2014-10-09 + + --- - harness/main.c | 10 ++ + harness/main.c | 10 +++++++++ src/libaio.h | 1 - src/syscall-m68k.h | 78 +++++++++++++++++ - src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++ - src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++ - src/syscall-sparc.h | 20 +++- - src/syscall.h | 6 + - 7 files changed, 479 insertions(+), 5 deletions(-) + src/syscall-m68k.h | 5 ++++ + src/syscall-mips.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/syscall-parisc.h | 6 +++++ + src/syscall.h | 6 +++++ + 6 files changed, 82 insertions(+) --- /dev/null +++ b/src/syscall-m68k.h -@@ -0,0 +1,78 @@ +@@ -0,0 +1,5 @@ +#define __NR_io_setup 241 +#define __NR_io_destroy 242 +#define __NR_io_getevents 243 +#define __NR_io_submit 244 +#define __NR_io_cancel 245 -+ -+#define io_syscall1(type,fname,sname,atype,a) \ -+type fname(atype a) \ -+{ \ -+register long __res __asm__ ("%d0") = __NR_##sname; \ -+register long __a __asm__ ("%d1") = (long)(a); \ -+__asm__ __volatile__ ("trap #0" \ -+ : "+d" (__res) \ -+ : "d" (__a) ); \ -+return (type) __res; \ -+} -+ -+#define io_syscall2(type,fname,sname,atype,a,btype,b) \ -+type fname(atype a,btype b) \ -+{ \ -+register long __res __asm__ ("%d0") = __NR_##sname; \ -+register long __a __asm__ ("%d1") = (long)(a); \ -+register long __b __asm__ ("%d2") = (long)(b); \ -+__asm__ __volatile__ ("trap #0" \ -+ : "+d" (__res) \ -+ : "d" (__a), "d" (__b) \ -+ ); \ -+return (type) __res; \ -+} -+ -+#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ -+type fname(atype a,btype b,ctype c) \ -+{ \ -+register long __res __asm__ ("%d0") = __NR_##sname; \ -+register long __a __asm__ ("%d1") = (long)(a); \ -+register long __b __asm__ ("%d2") = (long)(b); \ -+register long __c __asm__ ("%d3") = (long)(c); \ -+__asm__ __volatile__ ("trap #0" \ -+ : "+d" (__res) \ -+ : "d" (__a), "d" (__b), \ -+ "d" (__c) \ -+ ); \ -+return (type) __res; \ -+} -+ -+#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ -+type fname (atype a, btype b, ctype c, dtype d) \ -+{ \ -+register long __res __asm__ ("%d0") = __NR_##sname; \ -+register long __a __asm__ ("%d1") = (long)(a); \ -+register long __b __asm__ ("%d2") = (long)(b); \ -+register long __c __asm__ ("%d3") = (long)(c); \ -+register long __d __asm__ ("%d4") = (long)(d); \ -+__asm__ __volatile__ ("trap #0" \ -+ : "+d" (__res) \ -+ : "d" (__a), "d" (__b), \ -+ "d" (__c), "d" (__d) \ -+ ); \ -+return (type) __res; \ -+} -+ -+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ -+type fname (atype a,btype b,ctype c,dtype d,etype e) \ -+{ \ -+register long __res __asm__ ("%d0") = __NR_##sname; \ -+register long __a __asm__ ("%d1") = (long)(a); \ -+register long __b __asm__ ("%d2") = (long)(b); \ -+register long __c __asm__ ("%d3") = (long)(c); \ -+register long __d __asm__ ("%d4") = (long)(d); \ -+register long __e __asm__ ("%d5") = (long)(e); \ -+__asm__ __volatile__ ("trap #0" \ -+ : "+d" (__res) \ -+ : "d" (__a), "d" (__b), \ -+ "d" (__c), "d" (__d), "d" (__e) \ -+ ); \ -+return (type) __res; \ -+} -+ --- a/src/syscall.h +++ b/src/syscall.h -@@ -28,6 +28,12 @@ +@@ -27,6 +27,12 @@ + #include "syscall-arm.h" + #elif defined(__sparc__) #include "syscall-sparc.h" - #elif defined(__aarch64__) - #include "syscall-arm64.h" +#elif defined(__m68k__) +#include "syscall-m68k.h" +#elif defined(__hppa__) +#include "syscall-parisc.h" +#elif defined(__mips__) +#include "syscall-mips.h" - #else - #warning "using generic syscall method" + #elif defined(__aarch64__) || defined(__riscv) #include "syscall-generic.h" + #else --- /dev/null +++ b/src/syscall-mips.h -@@ -0,0 +1,223 @@ +@@ -0,0 +1,54 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive @@ -114,9 +47,6 @@ + * + * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle + * Copyright (C) 1999, 2000 Silicon Graphics, Inc. -+ * -+ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto -+ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A + */ + +#ifndef _MIPS_SIM_ABI32 @@ -164,331 +94,25 @@ +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ -+ -+#define io_syscall1(type,fname,sname,atype,a) \ -+type fname(atype a) \ -+{ \ -+ register unsigned long __a0 asm("$4") = (unsigned long) a; \ -+ register unsigned long __a3 asm("$7"); \ -+ unsigned long __v0; \ -+ \ -+ __asm__ volatile ( \ -+ ".set\tnoreorder\n\t" \ -+ "li\t$2, %3\t\t\t# " #fname "\n\t" \ -+ "syscall\n\t" \ -+ "move\t%0, $2\n\t" \ -+ ".set\treorder" \ -+ : "=&r" (__v0), "=r" (__a3) \ -+ : "r" (__a0), "i" (__NR_##sname) \ -+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ -+ "memory"); \ -+ \ -+ if (__a3 == 0) \ -+ return (type) __v0; \ -+ return (type) -1; \ -+} -+ -+#define io_syscall2(type,fname,sname,atype,a,btype,b) \ -+type fname(atype a, btype b) \ -+{ \ -+ register unsigned long __a0 asm("$4") = (unsigned long) a; \ -+ register unsigned long __a1 asm("$5") = (unsigned long) b; \ -+ register unsigned long __a3 asm("$7"); \ -+ unsigned long __v0; \ -+ \ -+ __asm__ volatile ( \ -+ ".set\tnoreorder\n\t" \ -+ "li\t$2, %4\t\t\t# " #fname "\n\t" \ -+ "syscall\n\t" \ -+ "move\t%0, $2\n\t" \ -+ ".set\treorder" \ -+ : "=&r" (__v0), "=r" (__a3) \ -+ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \ -+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ -+ "memory"); \ -+ \ -+ if (__a3 == 0) \ -+ return (type) __v0; \ -+ return (type) -1; \ -+} -+ -+#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ -+type fname(atype a, btype b, ctype c) \ -+{ \ -+ register unsigned long __a0 asm("$4") = (unsigned long) a; \ -+ register unsigned long __a1 asm("$5") = (unsigned long) b; \ -+ register unsigned long __a2 asm("$6") = (unsigned long) c; \ -+ register unsigned long __a3 asm("$7"); \ -+ unsigned long __v0; \ -+ \ -+ __asm__ volatile ( \ -+ ".set\tnoreorder\n\t" \ -+ "li\t$2, %5\t\t\t# " #fname "\n\t" \ -+ "syscall\n\t" \ -+ "move\t%0, $2\n\t" \ -+ ".set\treorder" \ -+ : "=&r" (__v0), "=r" (__a3) \ -+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ -+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ -+ "memory"); \ -+ \ -+ if (__a3 == 0) \ -+ return (type) __v0; \ -+ return (type) -1; \ -+} -+ -+#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ -+type fname(atype a, btype b, ctype c, dtype d) \ -+{ \ -+ register unsigned long __a0 asm("$4") = (unsigned long) a; \ -+ register unsigned long __a1 asm("$5") = (unsigned long) b; \ -+ register unsigned long __a2 asm("$6") = (unsigned long) c; \ -+ register unsigned long __a3 asm("$7") = (unsigned long) d; \ -+ unsigned long __v0; \ -+ \ -+ __asm__ volatile ( \ -+ ".set\tnoreorder\n\t" \ -+ "li\t$2, %5\t\t\t# " #fname "\n\t" \ -+ "syscall\n\t" \ -+ "move\t%0, $2\n\t" \ -+ ".set\treorder" \ -+ : "=&r" (__v0), "+r" (__a3) \ -+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ -+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ -+ "memory"); \ -+ \ -+ if (__a3 == 0) \ -+ return (type) __v0; \ -+ return (type) -1; \ -+} -+ -+#if (_MIPS_SIM == _MIPS_SIM_ABI32) -+ -+/* -+ * Using those means your brain needs more than an oil change ;-) -+ */ -+ -+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ -+type fname(atype a, btype b, ctype c, dtype d, etype e) \ -+{ \ -+ register unsigned long __a0 asm("$4") = (unsigned long) a; \ -+ register unsigned long __a1 asm("$5") = (unsigned long) b; \ -+ register unsigned long __a2 asm("$6") = (unsigned long) c; \ -+ register unsigned long __a3 asm("$7") = (unsigned long) d; \ -+ unsigned long __v0; \ -+ \ -+ __asm__ volatile ( \ -+ ".set\tnoreorder\n\t" \ -+ "lw\t$2, %6\n\t" \ -+ "subu\t$29, 32\n\t" \ -+ "sw\t$2, 16($29)\n\t" \ -+ "li\t$2, %5\t\t\t# " #fname "\n\t" \ -+ "syscall\n\t" \ -+ "move\t%0, $2\n\t" \ -+ "addiu\t$29, 32\n\t" \ -+ ".set\treorder" \ -+ : "=&r" (__v0), "+r" (__a3) \ -+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \ -+ "m" ((unsigned long)e) \ -+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ -+ "memory"); \ -+ \ -+ if (__a3 == 0) \ -+ return (type) __v0; \ -+ return (type) -1; \ -+} -+ -+#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ -+ -+#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) -+ -+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ -+type fname (atype a,btype b,ctype c,dtype d,etype e) \ -+{ \ -+ register unsigned long __a0 asm("$4") = (unsigned long) a; \ -+ register unsigned long __a1 asm("$5") = (unsigned long) b; \ -+ register unsigned long __a2 asm("$6") = (unsigned long) c; \ -+ register unsigned long __a3 asm("$7") = (unsigned long) d; \ -+ register unsigned long __a4 asm("$8") = (unsigned long) e; \ -+ unsigned long __v0; \ -+ \ -+ __asm__ volatile ( \ -+ ".set\tnoreorder\n\t" \ -+ "li\t$2, %6\t\t\t# " #fname "\n\t" \ -+ "syscall\n\t" \ -+ "move\t%0, $2\n\t" \ -+ ".set\treorder" \ -+ : "=&r" (__v0), "+r" (__a3) \ -+ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \ -+ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ -+ "memory"); \ -+ \ -+ if (__a3 == 0) \ -+ return (type) __v0; \ -+ return (type) -1; \ -+} -+ -+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ -+ --- a/src/libaio.h +++ b/src/libaio.h -@@ -66,6 +66,7 @@ typedef enum io_iocb_cmd { +@@ -72,6 +72,7 @@ typedef enum io_iocb_cmd { /* big endian, 64 bits */ #elif defined(__powerpc64__) || defined(__s390x__) || \ + (defined(__hppa__) && defined(__arch64__)) || \ (defined(__sparc__) && defined(__arch64__)) || \ - (defined(__aarch64__) && defined(__AARCH64EB__)) - #define PADDED(x, y) unsigned y; x + (defined(__aarch64__) && defined(__AARCH64EB__)) || \ + (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ --- /dev/null +++ b/src/syscall-parisc.h -@@ -0,0 +1,146 @@ -+/* -+ * Linux system call numbers. -+ * -+ * Cary Coutant says that we should just use another syscall gateway -+ * page to avoid clashing with the HPUX space, and I think he's right: -+ * it will would keep a branch out of our syscall entry path, at the -+ * very least. If we decide to change it later, we can ``just'' tweak -+ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be -+ * 1024 or something. Oh, and recompile libc. =) -+ * -+ * 64-bit HPUX binaries get the syscall gateway address passed in a register -+ * from the kernel at startup, which seems a sane strategy. -+ */ -+ +@@ -0,0 +1,6 @@ +#define __NR_Linux 0 +#define __NR_io_setup (__NR_Linux + 215) +#define __NR_io_destroy (__NR_Linux + 216) +#define __NR_io_getevents (__NR_Linux + 217) +#define __NR_io_submit (__NR_Linux + 218) +#define __NR_io_cancel (__NR_Linux + 219) -+ -+#define SYS_ify(syscall_name) __NR_##syscall_name -+ -+/* Assume all syscalls are done from PIC code just to be -+ * safe. The worst case scenario is that you lose a register -+ * and save/restore r19 across the syscall. */ -+#define PIC -+ -+/* Definition taken from glibc 2.3.3 -+ * sysdeps/unix/sysv/linux/hppa/sysdep.h -+ */ -+ -+#ifdef PIC -+/* WARNING: CANNOT BE USED IN A NOP! */ -+# define K_STW_ASM_PIC " copy %%r19, %%r4\n" -+# define K_LDW_ASM_PIC " copy %%r4, %%r19\n" -+# define K_USING_GR4 "%r4", -+#else -+# define K_STW_ASM_PIC " \n" -+# define K_LDW_ASM_PIC " \n" -+# define K_USING_GR4 -+#endif -+ -+/* GCC has to be warned that a syscall may clobber all the ABI -+ registers listed as "caller-saves", see page 8, Table 2 -+ in section 2.2.6 of the PA-RISC RUN-TIME architecture -+ document. However! r28 is the result and will conflict with -+ the clobber list so it is left out. Also the input arguments -+ registers r20 -> r26 will conflict with the list so they -+ are treated specially. Although r19 is clobbered by the syscall -+ we cannot say this because it would violate ABI, thus we say -+ r4 is clobbered and use that register to save/restore r19 -+ across the syscall. */ -+ -+#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \ -+ "%r20", "%r29", "%r31" -+ -+#undef K_INLINE_SYSCALL -+#define K_INLINE_SYSCALL(name, nr, args...) ({ \ -+ long __sys_res; \ -+ { \ -+ register unsigned long __res __asm__("r28"); \ -+ K_LOAD_ARGS_##nr(args) \ -+ /* FIXME: HACK stw/ldw r19 around syscall */ \ -+ __asm__ volatile( \ -+ K_STW_ASM_PIC \ -+ " ble 0x100(%%sr2, %%r0)\n" \ -+ " ldi %1, %%r20\n" \ -+ K_LDW_ASM_PIC \ -+ : "=r" (__res) \ -+ : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \ -+ : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \ -+ ); \ -+ __sys_res = (long)__res; \ -+ } \ -+ __sys_res; \ -+}) -+ -+#define K_LOAD_ARGS_0() -+#define K_LOAD_ARGS_1(r26) \ -+ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ -+ K_LOAD_ARGS_0() -+#define K_LOAD_ARGS_2(r26,r25) \ -+ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ -+ K_LOAD_ARGS_1(r26) -+#define K_LOAD_ARGS_3(r26,r25,r24) \ -+ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ -+ K_LOAD_ARGS_2(r26,r25) -+#define K_LOAD_ARGS_4(r26,r25,r24,r23) \ -+ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ -+ K_LOAD_ARGS_3(r26,r25,r24) -+#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \ -+ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ -+ K_LOAD_ARGS_4(r26,r25,r24,r23) -+#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ -+ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ -+ K_LOAD_ARGS_5(r26,r25,r24,r23,r22) -+ -+/* Even with zero args we use r20 for the syscall number */ -+#define K_ASM_ARGS_0 -+#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26) -+#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25) -+#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24) -+#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23) -+#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22) -+#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21) -+ -+/* The registers not listed as inputs but clobbered */ -+#define K_CLOB_ARGS_6 -+#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21" -+#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22" -+#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23" -+#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24" -+#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25" -+#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26" -+ -+#define io_syscall1(type,fname,sname,type1,arg1) \ -+type fname(type1 arg1) \ -+{ \ -+ return K_INLINE_SYSCALL(sname, 1, arg1); \ -+} -+ -+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -+type fname(type1 arg1, type2 arg2) \ -+{ \ -+ return K_INLINE_SYSCALL(sname, 2, arg1, arg2); \ -+} -+ -+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -+type fname(type1 arg1, type2 arg2, type3 arg3) \ -+{ \ -+ return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3); \ -+} -+ -+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -+{ \ -+ return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4); \ -+} -+ -+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ -+{ \ -+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ -+} -+ --- a/harness/main.c +++ b/harness/main.c @@ -12,7 +12,17 @@ @@ -509,58 +133,3 @@ #else //#warning Not really sure where kernel memory is. Guessing. #define KERNEL_RW_POINTER ((void *)0xffffffff81000000) ---- a/src/syscall-sparc.h -+++ b/src/syscall-sparc.h -@@ -20,7 +20,9 @@ __asm__ __volatile__ ("t 0x10\n\t" \ - : "=r" (__res), "=&r" (__o0) \ - : "1" (__o0), "r" (__g1) \ - : "cc"); \ --return (type) __res; \ -+if (__res < -255 || __res >= 0) \ -+ return (type) __res; \ -+return -1; \ - } - - #define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -@@ -38,7 +40,9 @@ __asm__ __volatile__ ("t 0x10\n\t" \ - : "=r" (__res), "=&r" (__o0) \ - : "1" (__o0), "r" (__o1), "r" (__g1) \ - : "cc"); \ --return (type) __res; \ -+if (__res < -255 || __res >= 0) \ -+ return (type) __res; \ -+return -1; \ - } - - #define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -@@ -57,7 +61,9 @@ __asm__ __volatile__ ("t 0x10\n\t" \ - : "=r" (__res), "=&r" (__o0) \ - : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ - : "cc"); \ --return (type) __res; \ -+if (__res < -255 || __res >= 0) \ -+ return (type) __res; \ -+return -1; \ - } - - #define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -@@ -77,7 +83,9 @@ __asm__ __volatile__ ("t 0x10\n\t" \ - : "=r" (__res), "=&r" (__o0) \ - : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ - : "cc"); \ --return (type) __res; \ -+if (__res < -255 || __res >= 0) \ -+ return (type) __res; \ -+return -1; \ - } - - #define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ -@@ -99,5 +107,7 @@ __asm__ __volatile__ ("t 0x10\n\t" \ - : "=r" (__res), "=&r" (__o0) \ - : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ - : "cc"); \ --return (type) __res; \ -+if (__res < -255 || __res >= 0) \ -+ return (type) __res; \ -+return -1; \ - } diff --git a/libs/libaio/patches/002_arches_sh.patch b/libs/libaio/patches/002_arches_sh.patch index ddf9a113..b8886363 100644 --- a/libs/libaio/patches/002_arches_sh.patch +++ b/libs/libaio/patches/002_arches_sh.patch @@ -1,17 +1,16 @@ -From: Nobuhiro Iwamatsu -Subject: Add SH supprt - -The test-suite logs can be found at: - - +Author: Nobuhiro Iwamatsu +Description: Add SH supprt + The test-suite logs can be found at: + . + --- - harness/main.c | 2 - - src/libaio.h | 4 ++ - src/syscall-sh.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/syscall.h | 2 + - 4 files changed, 84 insertions(+), 2 deletions(-) + harness/main.c | 2 +- + src/libaio.h | 4 +++- + src/syscall-sh.h | 6 ++++++ + src/syscall.h | 2 ++ + 4 files changed, 12 insertions(+), 2 deletions(-) --- a/harness/main.c @@ -27,113 +26,41 @@ The test-suite logs can be found at: #define KERNEL_RW_POINTER ((void *)0x10100000) --- a/src/libaio.h +++ b/src/libaio.h -@@ -51,7 +51,8 @@ typedef enum io_iocb_cmd { +@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd { /* little endian, 32 bits */ #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \ - defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \ + (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \ + defined(__bfin__) || defined(__MIPSEL__) || \ - defined(__cris__) - #define PADDED(x, y) x; unsigned y - #define PADDEDptr(x, y) x; unsigned y -@@ -76,6 +77,7 @@ typedef enum io_iocb_cmd { + defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \ + (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ + __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4) +@@ -84,6 +85,7 @@ typedef enum io_iocb_cmd { /* big endian, 32 bits */ #elif defined(__PPC__) || defined(__s390__) || \ (defined(__arm__) && defined(__ARMEB__)) || \ + (defined(__sh__) && defined (__BIG_ENDIAN__)) || \ defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \ - defined(__hppa__) || defined(__frv__) || defined(__avr32__) - #define PADDED(x, y) unsigned y; x + defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \ + (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ --- /dev/null +++ b/src/syscall-sh.h -@@ -0,0 +1,78 @@ +@@ -0,0 +1,6 @@ +/* Copy from ./arch/sh/include/asm/unistd_32.h */ +#define __NR_io_setup 245 +#define __NR_io_destroy 246 +#define __NR_io_getevents 247 +#define __NR_io_submit 248 +#define __NR_io_cancel 249 -+ -+#define io_syscall1(type,fname,sname,type1,arg1) \ -+type fname(type1 arg1) \ -+{ \ -+register long __sc0 __asm__ ("r3") = __NR_##sname; \ -+register long __sc4 __asm__ ("r4") = (long) arg1; \ -+__asm__ __volatile__ ("trapa #0x11" \ -+ : "=z" (__sc0) \ -+ : "0" (__sc0), "r" (__sc4) \ -+ : "memory"); \ -+ return (type) __sc0;\ -+} -+ -+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -+type fname(type1 arg1,type2 arg2) \ -+{ \ -+register long __sc0 __asm__ ("r3") = __NR_##sname; \ -+register long __sc4 __asm__ ("r4") = (long) arg1; \ -+register long __sc5 __asm__ ("r5") = (long) arg2; \ -+ __asm__ __volatile__ ("trapa #0x12" \ -+ : "=z" (__sc0) \ -+ : "0" (__sc0), "r" (__sc4), "r" (__sc5) \ -+ : "memory"); \ -+ return (type) __sc0;\ -+} -+ -+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -+type fname(type1 arg1,type2 arg2,type3 arg3) \ -+{ \ -+register long __sc0 __asm__ ("r3") = __NR_##sname; \ -+register long __sc4 __asm__ ("r4") = (long) arg1; \ -+register long __sc5 __asm__ ("r5") = (long) arg2; \ -+register long __sc6 __asm__ ("r6") = (long) arg3; \ -+ __asm__ __volatile__ ("trapa #0x13" \ -+ : "=z" (__sc0) \ -+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) \ -+ : "memory"); \ -+ return (type) __sc0;\ -+} -+ -+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -+{ \ -+register long __sc0 __asm__ ("r3") = __NR_##sname; \ -+register long __sc4 __asm__ ("r4") = (long) arg1; \ -+register long __sc5 __asm__ ("r5") = (long) arg2; \ -+register long __sc6 __asm__ ("r6") = (long) arg3; \ -+register long __sc7 __asm__ ("r7") = (long) arg4; \ -+__asm__ __volatile__ ("trapa #0x14" \ -+ : "=z" (__sc0) \ -+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), \ -+ "r" (__sc7) \ -+ : "memory" ); \ -+ return (type) __sc0;\ -+} -+ -+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ -+{ \ -+register long __sc3 __asm__ ("r3") = __NR_##sname; \ -+register long __sc4 __asm__ ("r4") = (long) arg1; \ -+register long __sc5 __asm__ ("r5") = (long) arg2; \ -+register long __sc6 __asm__ ("r6") = (long) arg3; \ -+register long __sc7 __asm__ ("r7") = (long) arg4; \ -+register long __sc0 __asm__ ("r0") = (long) arg5; \ -+__asm__ __volatile__ ("trapa #0x15" \ -+ : "=z" (__sc0) \ -+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \ -+ "r" (__sc3) \ -+ : "memory" ); \ -+ return (type) __sc0;\ -+} --- a/src/syscall.h +++ b/src/syscall.h -@@ -34,6 +34,8 @@ +@@ -33,6 +33,8 @@ #include "syscall-parisc.h" #elif defined(__mips__) #include "syscall-mips.h" +#elif defined(__sh__) +#include "syscall-sh.h" - #else - #warning "using generic syscall method" + #elif defined(__aarch64__) || defined(__riscv) #include "syscall-generic.h" + #else diff --git a/libs/libaio/patches/003_arches_mips_fix_padding.patch b/libs/libaio/patches/003_arches_mips_fix_padding.patch new file mode 100644 index 00000000..4e0a1187 --- /dev/null +++ b/libs/libaio/patches/003_arches_mips_fix_padding.patch @@ -0,0 +1,38 @@ +Description: Fix structure padding for mips64 +Author: Guillem Jover +Forwarded: no +Last-Update: 2014-07-23 + + +--- + src/libaio.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/src/libaio.h ++++ b/src/libaio.h +@@ -53,7 +53,8 @@ typedef enum io_iocb_cmd { + /* little endian, 32 bits */ + #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \ + (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \ +- defined(__bfin__) || defined(__MIPSEL__) || \ ++ defined(__bfin__) || \ ++ (defined(__MIPSEL__) && !defined(__mips64)) || \ + defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \ + (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ + __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4) +@@ -63,6 +64,7 @@ typedef enum io_iocb_cmd { + + /* little endian, 64 bits */ + #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \ ++ (defined(__mips64) && defined(__MIPSEL__)) || \ + (defined(__aarch64__) && defined(__AARCH64EL__)) || \ + (defined(__riscv) && __riscv_xlen == 64) || \ + (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ +@@ -75,6 +77,7 @@ typedef enum io_iocb_cmd { + #elif defined(__powerpc64__) || defined(__s390x__) || \ + (defined(__hppa__) && defined(__arch64__)) || \ + (defined(__sparc__) && defined(__arch64__)) || \ ++ (defined(__mips64) && defined(__MIPSEB__)) || \ + (defined(__aarch64__) && defined(__AARCH64EB__)) || \ + (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ + __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8) diff --git a/libs/libaio/patches/003_arches_sparc64.patch b/libs/libaio/patches/003_arches_sparc64.patch deleted file mode 100644 index c685f5ec..00000000 --- a/libs/libaio/patches/003_arches_sparc64.patch +++ /dev/null @@ -1,117 +0,0 @@ ---- - src/syscall-sparc64.h | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++ - src/syscall.h | 2 + - 2 files changed, 100 insertions(+) - ---- a/src/syscall.h -+++ b/src/syscall.h -@@ -24,6 +24,8 @@ - #include "syscall-alpha.h" - #elif defined(__arm__) - #include "syscall-arm.h" -+#elif defined(__sparc__) && defined(__arch64__) -+#include "syscall-sparc64.h" - #elif defined(__sparc__) - #include "syscall-sparc.h" - #elif defined(__aarch64__) ---- /dev/null -+++ b/src/syscall-sparc64.h -@@ -0,0 +1,98 @@ -+#define __NR_io_setup 268 -+#define __NR_io_destroy 269 -+#define __NR_io_submit 270 -+#define __NR_io_cancel 271 -+#define __NR_io_getevents 272 -+ -+#define io_syscall1(type,fname,sname,type1,arg1) \ -+type fname(type1 arg1) \ -+{ \ -+ unsigned long __res; \ -+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ -+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ -+ __asm__ __volatile__("t 0x6d\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "movcc %%xcc, %%o0, %0\n" \ -+ "1:" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__g1) \ -+ : "cc"); \ -+ return (type) __res; \ -+} -+ -+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -+type fname(type1 arg1, type2 arg2) \ -+{ \ -+ unsigned long __res; \ -+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ -+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ -+ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \ -+ __asm__ __volatile__("t 0x6d\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "movcc %%xcc, %%o0, %0\n" \ -+ "1:" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__o1), "r" (__g1) \ -+ : "cc"); \ -+ return (type) __res; \ -+} -+ -+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -+type fname(type1 arg1, type2 arg2, type3 arg3) \ -+{ \ -+ unsigned long __res; \ -+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ -+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ -+ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \ -+ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \ -+ __asm__ __volatile__("t 0x6d\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "movcc %%xcc, %%o0, %0\n" \ -+ "1:" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__o1), "r" (__o2), \ -+ "r" (__g1) \ -+ : "cc"); \ -+ return (type) __res; \ -+} -+ -+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -+{ \ -+ unsigned long __res; \ -+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ -+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ -+ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \ -+ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \ -+ register unsigned long __o3 __asm__("o3") = (unsigned long) arg4; \ -+ __asm__ __volatile__("t 0x6d\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "movcc %%xcc, %%o0, %0\n" \ -+ "1:" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__o1), "r" (__o2), \ -+ "r" (__o3), "r" (__g1) \ -+ : "cc"); \ -+ return (type) __res; \ -+} -+ -+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ -+{ \ -+ unsigned long __res; \ -+ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ -+ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ -+ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \ -+ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \ -+ register unsigned long __o3 __asm__("o3") = (unsigned long) arg4; \ -+ register unsigned long __o4 __asm__("o4") = (unsigned long) arg5; \ -+ __asm__ __volatile__("t 0x6d\n\t" \ -+ "sub %%g0, %%o0, %0\n\t" \ -+ "movcc %%xcc, %%o0, %0\n" \ -+ "1:" \ -+ : "=r" (__res), "=&r" (__o0) \ -+ : "1" (__o0), "r" (__o1), "r" (__o2), \ -+ "r" (__o3), "r" (__o4), "r" (__g1) \ -+ : "cc"); \ -+ return (type) __res; \ -+} diff --git a/libs/libaio/patches/004_arches_x32.patch b/libs/libaio/patches/004_arches_x32.patch index 8d315f27..75d3566c 100644 --- a/libs/libaio/patches/004_arches_x32.patch +++ b/libs/libaio/patches/004_arches_x32.patch @@ -1,8 +1,19 @@ -Index: libaio-0.3.109/src/syscall-x86_64.h -=================================================================== ---- libaio-0.3.109.orig/src/syscall-x86_64.h 2009-10-09 11:17:02.000000000 -0700 -+++ libaio-0.3.109/src/syscall-x86_64.h 2013-03-03 07:15:13.000000000 -0800 -@@ -1,8 +1,18 @@ +Description: Add support for x32 (from the Yocto project) +Author: Daniel Schepler +Origin: vendor +Forwarded: no +Bug-Debian: 702183 +Last-Update: 2013-05-06 + + +--- + harness/main.c | 2 +- + src/syscall-x86_64.h | 10 ++++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +--- a/src/syscall-x86_64.h ++++ b/src/syscall-x86_64.h +@@ -1,5 +1,15 @@ +#ifndef __NR_io_setup #define __NR_io_setup 206 +#endif @@ -18,42 +29,8 @@ Index: libaio-0.3.109/src/syscall-x86_64.h +#ifndef __NR_io_cancel #define __NR_io_cancel 210 +#endif - - #define __syscall_clobber "r11","rcx","memory" - #define __syscall "syscall" -@@ -42,10 +52,11 @@ - type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - { \ - long __res; \ --__asm__ volatile ("movq %5,%%r10 ;" __syscall \ -+register long __a4 asm ("r10") = (long) arg4; \ -+__asm__ volatile (__syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ -- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \ -+ "d" ((long)(arg3)),"r" (__a4)); \ - return __res; \ - } - -@@ -54,10 +65,11 @@ - type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ - { \ - long __res; \ --__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \ -+register long __a4 asm ("r10") = (long) arg4; \ -+register long __a5 asm ("r8") = (long) arg5; \ -+__asm__ volatile (__syscall \ - : "=a" (__res) \ - : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ -- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \ -- __syscall_clobber,"r8","r10" ); \ -+ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \ - return __res; \ - } -Index: libaio-0.3.109/harness/main.c -=================================================================== ---- libaio-0.3.109.orig/harness/main.c 2013-03-03 06:58:51.000000000 -0800 -+++ libaio-0.3.109/harness/main.c 2013-03-03 07:23:40.000000000 -0800 +--- a/harness/main.c ++++ b/harness/main.c @@ -14,7 +14,7 @@ #if __LP64__ == 0 #if defined(__i386__) || defined(__powerpc__) || defined(__mips__) diff --git a/libs/libaio/patches/005_arches_mips.patch b/libs/libaio/patches/005_arches_mips.patch deleted file mode 100644 index 1bd0971a..00000000 --- a/libs/libaio/patches/005_arches_mips.patch +++ /dev/null @@ -1,63 +0,0 @@ -Description: Fix mips/mipsel syscall wrappers to return correct error values. -Author: Jurica Stanojkovic -Forwarded: no -Last-Update: 2012-09-24 - - -diff -upNr a/src/syscall-mips.h b/src/syscall-mips.h ---- a/src/syscall-mips.h 2012-09-13 11:46:35.652286733 +0200 -+++ b/src/syscall-mips.h 2012-09-13 16:09:17.964407909 +0200 -@@ -76,7 +76,7 @@ type fname(atype a) \ - \ - if (__a3 == 0) \ - return (type) __v0; \ -- return (type) -1; \ -+ return (type) 0 - __v0; \ - } - - #define io_syscall2(type,fname,sname,atype,a,btype,b) \ -@@ -100,7 +100,7 @@ type fname(atype a, btype b) \ - \ - if (__a3 == 0) \ - return (type) __v0; \ -- return (type) -1; \ -+ return (type) 0 - __v0; \ - } - - #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ -@@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \ - \ - if (__a3 == 0) \ - return (type) __v0; \ -- return (type) -1; \ -+ return (type) 0 - __v0; \ - } - - #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ -@@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt - \ - if (__a3 == 0) \ - return (type) __v0; \ -- return (type) -1; \ -+ return (type) 0 - __v0; \ - } - - #if (_MIPS_SIM == _MIPS_SIM_ABI32) -@@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt - \ - if (__a3 == 0) \ - return (type) __v0; \ -- return (type) -1; \ -+ return (type) 0 - __v0; \ - } - - #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ -@@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp - \ - if (__a3 == 0) \ - return (type) __v0; \ -- return (type) -1; \ -+ return (type) 0 - __v0; \ - } - - #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ diff --git a/libs/libaio/patches/006_arches_mips_fix_padding.patch b/libs/libaio/patches/006_arches_mips_fix_padding.patch deleted file mode 100644 index 06bd00fb..00000000 --- a/libs/libaio/patches/006_arches_mips_fix_padding.patch +++ /dev/null @@ -1,37 +0,0 @@ -Description: Fix structure padding for mips64 -Author: Guillem Jover -Forwarded: no -Last-Update: 2014-07-23 - ---- - src/libaio.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/src/libaio.h -+++ b/src/libaio.h -@@ -52,7 +52,8 @@ typedef enum io_iocb_cmd { - /* little endian, 32 bits */ - #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \ - (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \ -- defined(__bfin__) || defined(__MIPSEL__) || \ -+ defined(__bfin__) || \ -+ (defined(__MIPSEL__) && !defined(__mips64)) || \ - defined(__cris__) - #define PADDED(x, y) x; unsigned y - #define PADDEDptr(x, y) x; unsigned y -@@ -60,6 +61,7 @@ typedef enum io_iocb_cmd { - - /* little endian, 64 bits */ - #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \ -+ (defined(__mips64) && defined(__MIPSEL__)) || \ - (defined(__aarch64__) && defined(__AARCH64EL__)) - #define PADDED(x, y) x, y - #define PADDEDptr(x, y) x -@@ -69,6 +71,7 @@ typedef enum io_iocb_cmd { - #elif defined(__powerpc64__) || defined(__s390x__) || \ - (defined(__hppa__) && defined(__arch64__)) || \ - (defined(__sparc__) && defined(__arch64__)) || \ -+ (defined(__mips64) && defined(__MIPSEB__)) || \ - (defined(__aarch64__) && defined(__AARCH64EB__)) - #define PADDED(x, y) unsigned y; x - #define PADDEDptr(x,y) x diff --git a/libs/libantlr3c/Makefile b/libs/libantlr3c/Makefile index 5c2d7cf6..c7a52e70 100644 --- a/libs/libantlr3c/Makefile +++ b/libs/libantlr3c/Makefile @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libantlr3c -PKG_VERSION:=3.2 +PKG_VERSION:=3.4 PKG_RELEASE:=1 -PKG_HASH:=2ccfb8a8bdd3d6c1d60742ff3a5a954af6d5a8d7f8901c87229fc6fa540ac99a +PKG_HASH:=ca914a97f1a2d2f2c8e1fca12d3df65310ff0286d35c48b7ae5f11dcc8b2eb52 -PKG_SOURCE_URL:=http://www.antlr3.org/download/C +PKG_SOURCE_URL:=https://www.antlr3.org/download/C PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_MAINTAINER:=Espen Jürgensen @@ -26,7 +27,7 @@ define Package/libantlr3c SECTION:=libs CATEGORY:=Libraries TITLE:=libantlr3c - URL:=http://www.antlr3.org/ + URL:=https://www.antlr3.org/ endef define Package/libantlr3c/description diff --git a/libs/libarchive/Makefile b/libs/libarchive/Makefile index 090af68e..819ecc64 100644 --- a/libs/libarchive/Makefile +++ b/libs/libarchive/Makefile @@ -8,64 +8,82 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libarchive -PKG_VERSION:=3.3.2 +PKG_VERSION:=3.4.3 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.libarchive.org/downloads -PKG_HASH:=ed2dbd6954792b2c054ccf8ec4b330a54b85904a80cef477a1c74643ddafa0ce +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://www.libarchive.org/downloads +PKG_HASH:=0bfc3fd40491768a88af8d9b86bf04a9e95b6d41a94f9292dbc0ec342288c05f + PKG_MAINTAINER:=Johannes Morgenroth PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:libarchive:libarchive PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk define Package/libarchive/Default - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=+zlib +liblzma +libbz2 +libexpat - TITLE:=Multi-format archive and compression library - URL:=http://www.libarchive.org/ + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+zlib +liblzma +libbz2 +libexpat + TITLE:=Multi-format archive and compression library + URL:=https://www.libarchive.org/ endef define Package/libarchive - $(call Package/libarchive/Default) - DEPENDS += +libopenssl + $(call Package/libarchive/Default) + DEPENDS += +libopenssl endef define Package/libarchive-noopenssl - $(call Package/libarchive/Default) - TITLE += (without OpenSSL dependency) - VARIANT:=noopenssl + $(call Package/libarchive/Default) + TITLE += (without OpenSSL dependency) + VARIANT:=noopenssl +endef + +define Package/bsdtar/Default + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Compression + TITLE:=tar BSD variant + URL:=https://www.libarchive.org/ endef define Package/bsdtar - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Compression - DEPENDS:=+libarchive-noopenssl - TITLE:=BSD variant that supports various file compression formats - URL:=http://www.libarchive.org/ + $(call Package/bsdtar/Default) + DEPENDS:= +libarchive +endef + +define Package/bsdtar-noopenssl + $(call Package/bsdtar/Default) + TITLE += (without OpenSSL dependency) + DEPENDS:= +libarchive-noopenssl + VARIANT:=noopenssl endef define Package/bsdtar/description - Reads a variety of formats including tar, pax, zip, xar, lha, ar, - cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip, - xar, ar, ISO, mtree and shar archives. Automatically handles - archives compressed with gzip, bzip2, lzip, xz, lzma or compress. + Reads a variety of formats including tar, pax, zip, xar, lha, ar, + cab, mtree, rar, warc, 7z and ISO images. Writes tar, pax, zip, + xar, ar, ISO, mtree and shar archives. Automatically handles + archives compressed with gzip, bzip2, lzip, xz, lzma or compress. endef CONFIGURE_ARGS += \ - --disable-bsdcpio \ --enable-bsdtar=shared \ + --disable-bsdcpio \ + --disable-rpath \ --disable-acl \ --disable-xattr \ + --without-cng \ + --without-iconv \ + --without-lz4 \ + --without-lzo2 \ --without-nettle \ --without-xml2 \ - --without-lz4 \ - --without-cng \ + --without-zstd ifeq ($(BUILD_VARIANT),noopenssl) CONFIGURE_ARGS += --without-openssl @@ -91,7 +109,9 @@ define Package/bsdtar/install endef Package/libarchive-noopenssl/install = $(Package/libarchive/install) +Package/bsdtar-noopenssl/install = $(Package/bsdtar/install) $(eval $(call BuildPackage,libarchive)) $(eval $(call BuildPackage,libarchive-noopenssl)) $(eval $(call BuildPackage,bsdtar)) +$(eval $(call BuildPackage,bsdtar-noopenssl)) diff --git a/libs/libartnet/Makefile b/libs/libartnet/Makefile deleted file mode 100644 index c3a57d56..00000000 --- a/libs/libartnet/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2010-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libartnet -PKG_VERSION:=1.1.2 -PKG_RELEASE:=1.1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/OpenLightingProject/libartnet/releases/download/1.1.2 -PKG_HASH:=19cdda434e208a81ddd138377f11046364438e40e34542ae101d6aa3fcaec696 - -PKG_MAINTAINER:=Martijn Zilverschoon - -PKG_LICENSE:=GPL-2.1 -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/libartnet - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Libartnet is an implementation of the ArtNet protocol. - URL:=http://www.openlighting.org/libartnet-main/ -endef - -define Package/libartnet/description - Libartnet is an implementation of the ArtNet protocol. ArtNet allows the - transmission of DMX and related data over IP networks. -endef - -define Build/Configure - $(call Build/Configure/Default) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Build/InstallDev - mkdir -p $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/artnet $(1)/usr/include/ - mkdir -p $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libartnet.{so,so.1,so.1.0.0} $(1)/usr/lib/ -endef - - -define Package/libartnet/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libartnet.{so,so.1,so.1.0.0} $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libartnet)) diff --git a/libs/libartnet/patches/001-bswap_16.patch b/libs/libartnet/patches/001-bswap_16.patch deleted file mode 100644 index 9c9be5f1..00000000 --- a/libs/libartnet/patches/001-bswap_16.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/artnet/private.h -+++ b/artnet/private.h -@@ -100,7 +100,9 @@ extern uint16_t HIGH_BYTE; - #endif - - // byte ordering macros -+#ifndef bswap_16 - #define bswap_16(x) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) -+#endif - - // htols : convert short from host to little endian order - #ifdef WIN32 diff --git a/libs/libaudiofile/Makefile b/libs/libaudiofile/Makefile deleted file mode 100644 index 41754463..00000000 --- a/libs/libaudiofile/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=audiofile -PKG_VERSION:=0.3.6 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/0.3 -PKG_HASH:=ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782 - -PKG_MAINTAINER:=Ted Hess - -PKG_FIXUP:=autoreconf -PKG_INSTALL=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/libaudiofile - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Audio File library - URL:=http://audiofile.68k.org/ - DEPENDS:=+libflac +libstdcpp -endef - -define Package/libaudiofile/description - The audiofile library allows the processing of audio data to and from audio - files of many common formats (currently AIFF, AIFF-C, WAVE, NeXT/Sun, BICS, - FLAC, ALAC, and raw data). -endef - -CONFIGURE_ARGS+= \ - --enable-shared \ - --enable-static \ - --disable-docs \ - --disable-coverage \ - --disable-examples - - -TARGET_CFLAGS+= $(FPIC) - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/{af_vfs,audiofile,aupvlist}.h \ - $(1)/usr/include/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.{la,a,so*} \ - $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/audiofile.pc \ - $(1)/usr/lib/pkgconfig/ -endef - -define Package/libaudiofile/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so.* \ - $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libaudiofile)) diff --git a/libs/libaudiofile/patches/010-gcc6-fix-left-shift-negative-number.patch b/libs/libaudiofile/patches/010-gcc6-fix-left-shift-negative-number.patch deleted file mode 100644 index ebbe7000..00000000 --- a/libs/libaudiofile/patches/010-gcc6-fix-left-shift-negative-number.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Fix FTBFS with GCC 6 -Author: Michael Schwendt -Origin: vendor, https://github.com/mpruett/audiofile/pull/27 -Bug-Debian: https://bugs.debian.org/812055 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ - ---- a/libaudiofile/modules/SimpleModule.h -+++ b/libaudiofile/modules/SimpleModule.h -@@ -123,7 +123,7 @@ struct signConverter - typedef typename IntTypes::UnsignedType UnsignedType; - - static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; -- static const int kMinSignedValue = -1 << kScaleBits; -+ static const int kMinSignedValue = 0-(1U< - { diff --git a/libs/libaudiofile/patches/020-remove-tests-examples-docs.patch b/libs/libaudiofile/patches/020-remove-tests-examples-docs.patch deleted file mode 100644 index dc4a8b9a..00000000 --- a/libs/libaudiofile/patches/020-remove-tests-examples-docs.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -159,12 +159,8 @@ AC_CONFIG_FILES([ - audiofile.pc - audiofile-uninstalled.pc - sfcommands/Makefile -- test/Makefile -- gtest/Makefile -- examples/Makefile - libaudiofile/Makefile - libaudiofile/alac/Makefile - libaudiofile/modules/Makefile -- docs/Makefile - Makefile]) - AC_OUTPUT ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,6 +1,6 @@ - ## Process this file with automake to produce Makefile.in - --SUBDIRS = gtest libaudiofile sfcommands test examples docs -+SUBDIRS = libaudiofile sfcommands - - EXTRA_DIST = \ - ACKNOWLEDGEMENTS \ diff --git a/libs/libaudiofile/patches/030-CVE-2015-7747.patch b/libs/libaudiofile/patches/030-CVE-2015-7747.patch deleted file mode 100644 index d3d38445..00000000 --- a/libs/libaudiofile/patches/030-CVE-2015-7747.patch +++ /dev/null @@ -1,19 +0,0 @@ -Description: fix buffer overflow when changing both sample format and - number of channels -Origin: backport, https://github.com/mpruett/audiofile/pull/25 -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/audiofile/+bug/1502721 -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801102 - -Index: audiofile-0.3.6/libaudiofile/modules/ModuleState.cpp -=================================================================== ---- audiofile-0.3.6.orig/libaudiofile/modules/ModuleState.cpp 2015-10-20 08:00:58.036128202 -0400 -+++ audiofile-0.3.6/libaudiofile/modules/ModuleState.cpp 2015-10-20 08:00:58.036128202 -0400 -@@ -402,7 +402,7 @@ - addModule(new Transform(outfc, in.pcm, out.pcm)); - - if (in.channelCount != out.channelCount) -- addModule(new ApplyChannelMatrix(infc, isReading, -+ addModule(new ApplyChannelMatrix(outfc, isReading, - in.channelCount, out.channelCount, - in.pcm.minClip, in.pcm.maxClip, - track->channelMatrix)); diff --git a/libs/libaudiofile/patches/110-Always-check-the-number-of-coefficients.patch b/libs/libaudiofile/patches/110-Always-check-the-number-of-coefficients.patch deleted file mode 100644 index 292fdfee..00000000 --- a/libs/libaudiofile/patches/110-Always-check-the-number-of-coefficients.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c48e4c6503f7dabd41f11d4c9c7b7f8960e7f2c0 Mon Sep 17 00:00:00 2001 -From: Antonio Larrosa -Date: Mon, 6 Mar 2017 12:51:22 +0100 -Subject: [PATCH] Always check the number of coefficients - -When building the library with NDEBUG, asserts are eliminated -so it's better to always check that the number of coefficients -is inside the array range. - -This fixes the 00191-audiofile-indexoob issue in #41 ---- - libaudiofile/WAVE.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp -index 0e81cf7..61f9541 100644 ---- a/libaudiofile/WAVE.cpp -+++ b/libaudiofile/WAVE.cpp -@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) - - /* numCoefficients should be at least 7. */ - assert(numCoefficients >= 7 && numCoefficients <= 255); -+ if (numCoefficients < 7 || numCoefficients > 255) -+ { -+ _af_error(AF_BAD_HEADER, -+ "Bad number of coefficients"); -+ return AF_FAIL; -+ } - - m_msadpcmNumCoefficients = numCoefficients; - --- -2.11.0 - diff --git a/libs/libaudiofile/patches/120-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch b/libs/libaudiofile/patches/120-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch deleted file mode 100644 index 83b0e064..00000000 --- a/libs/libaudiofile/patches/120-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 25eb00ce913452c2e614548d7df93070bf0d066f Mon Sep 17 00:00:00 2001 -From: Antonio Larrosa -Date: Mon, 6 Mar 2017 18:02:31 +0100 -Subject: [PATCH] clamp index values to fix index overflow in IMA.cpp - -This fixes #33 -(also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=1026981 -and https://blogs.gentoo.org/ago/2017/02/20/audiofile-global-buffer-overflow-in-decodesample-ima-cpp/) ---- - libaudiofile/modules/IMA.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libaudiofile/modules/IMA.cpp b/libaudiofile/modules/IMA.cpp -index 7476d44..df4aad6 100644 ---- a/libaudiofile/modules/IMA.cpp -+++ b/libaudiofile/modules/IMA.cpp -@@ -169,7 +169,7 @@ int IMA::decodeBlockWAVE(const uint8_t *encoded, int16_t *decoded) - if (encoded[1] & 0x80) - m_adpcmState[c].previousValue -= 0x10000; - -- m_adpcmState[c].index = encoded[2]; -+ m_adpcmState[c].index = clamp(encoded[2], 0, 88); - - *decoded++ = m_adpcmState[c].previousValue; - -@@ -210,7 +210,7 @@ int IMA::decodeBlockQT(const uint8_t *encoded, int16_t *decoded) - predictor -= 0x10000; - - state.previousValue = clamp(predictor, MIN_INT16, MAX_INT16); -- state.index = encoded[1] & 0x7f; -+ state.index = clamp(encoded[1] & 0x7f, 0, 88); - encoded += 2; - - for (int n=0; n -Date: Mon, 6 Mar 2017 13:54:52 +0100 -Subject: [PATCH] Check for multiplication overflow in sfconvert - -Checks that a multiplication doesn't overflow when -calculating the buffer size, and if it overflows, -reduce the buffer size instead of failing. - -This fixes the 00192-audiofile-signintoverflow-sfconvert case -in #41 ---- - sfcommands/sfconvert.c | 34 ++++++++++++++++++++++++++++++++-- - 1 file changed, 32 insertions(+), 2 deletions(-) - -diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c -index 80a1bc4..970a3e4 100644 ---- a/sfcommands/sfconvert.c -+++ b/sfcommands/sfconvert.c -@@ -45,6 +45,33 @@ void printusage (void); - void usageerror (void); - bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid); - -+int firstBitSet(int x) -+{ -+ int position=0; -+ while (x!=0) -+ { -+ x>>=1; -+ ++position; -+ } -+ return position; -+} -+ -+#ifndef __has_builtin -+#define __has_builtin(x) 0 -+#endif -+ -+int multiplyCheckOverflow(int a, int b, int *result) -+{ -+#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) -+ return __builtin_mul_overflow(a, b, result); -+#else -+ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits -+ return true; -+ *result = a * b; -+ return false; -+#endif -+} -+ - int main (int argc, char **argv) - { - if (argc == 2) -@@ -323,8 +350,11 @@ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid) - { - int frameSize = afGetVirtualFrameSize(infile, trackid, 1); - -- const int kBufferFrameCount = 65536; -- void *buffer = malloc(kBufferFrameCount * frameSize); -+ int kBufferFrameCount = 65536; -+ int bufferSize; -+ while (multiplyCheckOverflow(kBufferFrameCount, frameSize, &bufferSize)) -+ kBufferFrameCount /= 2; -+ void *buffer = malloc(bufferSize); - - AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK); - AFframecount totalFramesWritten = 0; --- -2.11.0 - diff --git a/libs/libaudiofile/patches/140-Actually-fail-when-error-occurs-in-parseFormat.patch b/libs/libaudiofile/patches/140-Actually-fail-when-error-occurs-in-parseFormat.patch deleted file mode 100644 index 6bb57316..00000000 --- a/libs/libaudiofile/patches/140-Actually-fail-when-error-occurs-in-parseFormat.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a2e9eab8ea87c4ffc494d839ebb4ea145eb9f2e6 Mon Sep 17 00:00:00 2001 -From: Antonio Larrosa -Date: Mon, 6 Mar 2017 18:59:26 +0100 -Subject: [PATCH] Actually fail when error occurs in parseFormat - -When there's an unsupported number of bits per sample or an invalid -number of samples per block, don't only print an error message using -the error handler, but actually stop parsing the file. - -This fixes #35 (also reported at -https://bugzilla.opensuse.org/show_bug.cgi?id=1026983 and -https://blogs.gentoo.org/ago/2017/02/20/audiofile-heap-based-buffer-overflow-in-imadecodeblockwave-ima-cpp/ -) ---- - libaudiofile/WAVE.cpp | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/libaudiofile/WAVE.cpp -+++ b/libaudiofile/WAVE.cpp -@@ -332,6 +332,7 @@ status WAVEFile::parseFormat(const Tag & - { - _af_error(AF_BAD_NOT_IMPLEMENTED, - "IMA ADPCM compression supports only 4 bits per sample"); -+ return AF_FAIL; - } - - int bytesPerBlock = (samplesPerBlock + 14) / 8 * 4 * channelCount; -@@ -339,6 +340,7 @@ status WAVEFile::parseFormat(const Tag & - { - _af_error(AF_BAD_CODEC_CONFIG, - "Invalid samples per block for IMA ADPCM compression"); -+ return AF_FAIL; - } - - track->f.sampleWidth = 16; diff --git a/libs/libaudiofile/patches/150-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch b/libs/libaudiofile/patches/150-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch deleted file mode 100644 index 84be8b80..00000000 --- a/libs/libaudiofile/patches/150-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch +++ /dev/null @@ -1,120 +0,0 @@ -From beacc44eb8cdf6d58717ec1a5103c5141f1b37f9 Mon Sep 17 00:00:00 2001 -From: Antonio Larrosa -Date: Mon, 6 Mar 2017 13:43:53 +0100 -Subject: [PATCH] Check for multiplication overflow in MSADPCM decodeSample - -Check for multiplication overflow (using __builtin_mul_overflow -if available) in MSADPCM.cpp decodeSample and return an empty -decoded block if an error occurs. - -This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41 ---- - libaudiofile/modules/BlockCodec.cpp | 5 ++-- - libaudiofile/modules/MSADPCM.cpp | 47 +++++++++++++++++++++++++++++++++---- - 2 files changed, 46 insertions(+), 6 deletions(-) - -diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp -index 45925e8..4731be1 100644 ---- a/libaudiofile/modules/BlockCodec.cpp -+++ b/libaudiofile/modules/BlockCodec.cpp -@@ -52,8 +52,9 @@ void BlockCodec::runPull() - // Decompress into m_outChunk. - for (int i=0; i(m_inChunk->buffer) + i * m_bytesPerPacket, -- static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount); -+ if (decodeBlock(static_cast(m_inChunk->buffer) + i * m_bytesPerPacket, -+ static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount)==0) -+ break; - - framesRead += m_framesPerPacket; - } -diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp -index 8ea3c85..ef9c38c 100644 ---- a/libaudiofile/modules/MSADPCM.cpp -+++ b/libaudiofile/modules/MSADPCM.cpp -@@ -101,24 +101,60 @@ static const int16_t adaptationTable[] = - 768, 614, 512, 409, 307, 230, 230, 230 - }; - -+int firstBitSet(int x) -+{ -+ int position=0; -+ while (x!=0) -+ { -+ x>>=1; -+ ++position; -+ } -+ return position; -+} -+ -+#ifndef __has_builtin -+#define __has_builtin(x) 0 -+#endif -+ -+int multiplyCheckOverflow(int a, int b, int *result) -+{ -+#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) -+ return __builtin_mul_overflow(a, b, result); -+#else -+ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits -+ return true; -+ *result = a * b; -+ return false; -+#endif -+} -+ -+ - // Compute a linear PCM value from the given differential coded value. - static int16_t decodeSample(ms_adpcm_state &state, -- uint8_t code, const int16_t *coefficient) -+ uint8_t code, const int16_t *coefficient, bool *ok=NULL) - { - int linearSample = (state.sample1 * coefficient[0] + - state.sample2 * coefficient[1]) >> 8; -+ int delta; - - linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta; - - linearSample = clamp(linearSample, MIN_INT16, MAX_INT16); - -- int delta = (state.delta * adaptationTable[code]) >> 8; -+ if (multiplyCheckOverflow(state.delta, adaptationTable[code], &delta)) -+ { -+ if (ok) *ok=false; -+ _af_error(AF_BAD_COMPRESSION, "Error decoding sample"); -+ return 0; -+ } -+ delta >>= 8; - if (delta < 16) - delta = 16; - - state.delta = delta; - state.sample2 = state.sample1; - state.sample1 = linearSample; -+ if (ok) *ok=true; - - return static_cast(linearSample); - } -@@ -212,13 +248,16 @@ int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded) - { - uint8_t code; - int16_t newSample; -+ bool ok; - - code = *encoded >> 4; -- newSample = decodeSample(*state[0], code, coefficient[0]); -+ newSample = decodeSample(*state[0], code, coefficient[0], &ok); -+ if (!ok) return 0; - *decoded++ = newSample; - - code = *encoded & 0x0f; -- newSample = decodeSample(*state[1], code, coefficient[1]); -+ newSample = decodeSample(*state[1], code, coefficient[1], &ok); -+ if (!ok) return 0; - *decoded++ = newSample; - - encoded++; --- -2.11.0 - diff --git a/libs/libaudiofile/patches/160-Fix-signature-of-multiplyCheckOverflow.patch b/libs/libaudiofile/patches/160-Fix-signature-of-multiplyCheckOverflow.patch deleted file mode 100644 index d667ba85..00000000 --- a/libs/libaudiofile/patches/160-Fix-signature-of-multiplyCheckOverflow.patch +++ /dev/null @@ -1,40 +0,0 @@ -From ce536d707b8e2a26baca77320398c45238224ca7 Mon Sep 17 00:00:00 2001 -From: Antonio Larrosa -Date: Fri, 10 Mar 2017 15:40:02 +0100 -Subject: [PATCH] Fix signature of multiplyCheckOverflow. It returns a bool, - not an int - ---- - libaudiofile/modules/MSADPCM.cpp | 2 +- - sfcommands/sfconvert.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp -index ef9c38c..d8c9553 100644 ---- a/libaudiofile/modules/MSADPCM.cpp -+++ b/libaudiofile/modules/MSADPCM.cpp -@@ -116,7 +116,7 @@ int firstBitSet(int x) - #define __has_builtin(x) 0 - #endif - --int multiplyCheckOverflow(int a, int b, int *result) -+bool multiplyCheckOverflow(int a, int b, int *result) - { - #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) - return __builtin_mul_overflow(a, b, result); -diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c -index 970a3e4..367f7a5 100644 ---- a/sfcommands/sfconvert.c -+++ b/sfcommands/sfconvert.c -@@ -60,7 +60,7 @@ int firstBitSet(int x) - #define __has_builtin(x) 0 - #endif - --int multiplyCheckOverflow(int a, int b, int *result) -+bool multiplyCheckOverflow(int a, int b, int *result) - { - #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) - return __builtin_mul_overflow(a, b, result); --- -2.11.0 - diff --git a/libs/libaudiofile/patches/170-Check-for-division-by-zero-in-BlockCodec.patch b/libs/libaudiofile/patches/170-Check-for-division-by-zero-in-BlockCodec.patch deleted file mode 100644 index e0011339..00000000 --- a/libs/libaudiofile/patches/170-Check-for-division-by-zero-in-BlockCodec.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Antonio Larrosa -Date: Thu, 9 Mar 2017 10:21:18 +0100 -Subject: Check for division by zero in BlockCodec::runPull - ---- - libaudiofile/modules/BlockCodec.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp -index 4731be1..eb2fb4d 100644 ---- a/libaudiofile/modules/BlockCodec.cpp -+++ b/libaudiofile/modules/BlockCodec.cpp -@@ -47,7 +47,7 @@ void BlockCodec::runPull() - - // Read the compressed data. - ssize_t bytesRead = read(m_inChunk->buffer, m_bytesPerPacket * blockCount); -- int blocksRead = bytesRead >= 0 ? bytesRead / m_bytesPerPacket : 0; -+ int blocksRead = (bytesRead >= 0 && m_bytesPerPacket > 0) ? bytesRead / m_bytesPerPacket : 0; - - // Decompress into m_outChunk. - for (int i=0; i -PKG_LICENSE:=LGPL-2.0+ -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/libavl - SECTION:=libs - CATEGORY:=Libraries - TITLE:=AVLTree (this is not GNU libavl) - URL:=https://packages.debian.org/wheezy/libavl1 -endef - -define Package/libavl/description - AVLTree is a small implementation of AVL trees for the C programming language. -endef - -TARGET_CFLAGS += $(FPIC) - -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/avl.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavl.so* $(1)/usr/lib/ -endef - -define Package/libavl/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavl.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libavl)) diff --git a/libs/libavl/patches/010-update_GNUmakefile.patch b/libs/libavl/patches/010-update_GNUmakefile.patch deleted file mode 100644 index 30139491..00000000 --- a/libs/libavl/patches/010-update_GNUmakefile.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- a/GNUmakefile 2002-11-15 19:57:48.000000000 +0100 -+++ a/GNUmakefile 2014-10-02 16:03:02.864803002 +0200 -@@ -6,7 +6,7 @@ - LDCONFIG ?= /sbin/ldconfig - - # Some suggestions: (-mcpu= generates i386 compatible code) --CFLAGS ?= -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w -+CFLAGS ?= -O2 -pipe -Wall -Werror - #CFLAGS = -O2 -fomit-frame-pointer -pipe -march=i586 -Wall -g - #CFLAGS = -O6 -fomit-frame-pointer -pipe -march=i586 -Wall -ansi -pedantic - #CFLAGS = -O6 -fomit-frame-pointer -pipe -march=i686 -Wall -ansi -pedantic -@@ -15,10 +15,9 @@ - #CFLAGS = -g -pg -a -pipe -march=i686 -Wall - #LDFLAGS = -s - --prefix ?= /usr/local -+prefix ?= /usr - libdir ?= $(prefix)/lib - includedir ?= $(prefix)/include --includedir ?= /usr/include - - PROGRAMS = avlsort setdiff - LIBRARY = libavl.so.1.5 -@@ -34,16 +33,17 @@ - $(CC) $(LDFLAGS) $^ -o $@ $(LIBS) - - $(LIBRARY): avl.o -- $(CC) -nostdlib -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc -+ $(CC) -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc - - clean: - $(RM) *.o $(PROGRAMS) libavl.* - - install: all - $(INSTALL) -d $(DESTDIR)$(libdir) -- $(INSTALL) avl.h $(DESTDIR)$(includedir) -- $(INSTALL) $(LIBRARIES) $(DESTDIR)$(libdir) -- for i in $(LIBRARIES); do\ -+ $(INSTALL) -d $(DESTDIR)$(includedir) -+ $(INSTALL) -m 644 avl.h $(DESTDIR)$(includedir) -+ $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(libdir) -+ for i in $(LIBRARY); do\ - $(LN) -sf $$i $(DESTDIR)$(libdir)/$${i%.*};\ - $(LN) -sf $${i%.*} $(DESTDIR)$(libdir)/$${i%.*.*};\ - done diff --git a/libs/libcanfestival/Makefile b/libs/libcanfestival/Makefile deleted file mode 100644 index 29594699..00000000 --- a/libs/libcanfestival/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libcanfestival -PKG_RELEASE:=6 - -PKG_SOURCE_VERSION:=8bfe0ac00cdb -PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3/archive/$(PKG_SOURCE_VERSION).tar.bz2?_dummyfilename= -PKG_SOURCE:=CanFestival-3-$(PKG_SOURCE_VERSION).tar.bz2 -PKG_HASH:=0bee7aaef266fc579922ca159b7acbe9cdc9a936ac1f30402814844b007f7185 -PKG_SOURCE_SUBDIR:=CanFestival-3-$(PKG_SOURCE_VERSION) - -PKG_MAINTAINER:=Anton Glukhov - -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=LICENCE - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) - -TAR_OPTIONS+= -m -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/libcanfestival - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Free software CANopen library - URL:=http://canfestival.org - DEPENDS:=+libpthread +librt -endef - -define Package/libcanfestival/description - CanFestival library -endef - -TARGET_CFLAGS += $(FPIC) - -CONFIGURE_ARGS := \ - --cc=$(TARGET_CC) \ - --cxx=$(TARGET_CXX) \ - --ld=$(TARGET_CC) \ - --arch=$(ARCH) \ - --binutils=$(TARGET_CROSS) \ - --os=Linux \ - --kerneldir=$(LINUX_DIR) \ - --prefix=/usr \ - --target=unix \ - --can=socket \ - --timers=unix \ - --debug=ERR \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ -endef - -define Package/libcanfestival/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcanfestival_can_socket.so $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libcanfestival)) diff --git a/libs/libcanfestival/patches/001-sigval-ref-fix.patch b/libs/libcanfestival/patches/001-sigval-ref-fix.patch deleted file mode 100644 index 7e15ff16..00000000 --- a/libs/libcanfestival/patches/001-sigval-ref-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/timers_unix/timers_unix.c -+++ b/drivers/timers_unix/timers_unix.c -@@ -33,7 +33,7 @@ - } - } - --void timer_notify(sigval_t val) -+void timer_notify(void) - { - if(gettimeofday(&last_sig,NULL)) { - perror("gettimeofday()"); diff --git a/libs/libcanfestival/patches/002-makefile-gcc-linker.patch b/libs/libcanfestival/patches/002-makefile-gcc-linker.patch deleted file mode 100644 index 129743f0..00000000 --- a/libs/libcanfestival/patches/002-makefile-gcc-linker.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/examples/TestMasterMicroMod/Makefile.in -+++ b/examples/TestMasterMicroMod/Makefile.in -@@ -56,7 +56,7 @@ - - - $(TESTMASTERMICROMOD): $(OBJS) -- $(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) -+ $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) - - - TestMaster.c: TestMaster.od ---- a/examples/TestMasterSlave/Makefile.in -+++ b/examples/TestMasterSlave/Makefile.in -@@ -65,7 +65,7 @@ - - - $(TESTMASTERSLAVE): $(OBJS) -- $(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) -+ $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) - - TestSlave.c: TestSlave.od - $(MAKE) -C ../../objdictgen gnosis ---- a/examples/CANOpenShell/Makefile.in -+++ b/examples/CANOpenShell/Makefile.in -@@ -64,7 +64,7 @@ - $(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a - - $(CANOPENSHELL): $(OBJS) -- $(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) -+ $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) - mkdir -p Debug; cp $(CANOPENSHELL) Debug - - CANOpenShellMasterOD.c: CANOpenShellMasterOD.od diff --git a/libs/libcanfestival/patches/003-makefile-skip-examples.patch b/libs/libcanfestival/patches/003-makefile-skip-examples.patch deleted file mode 100644 index e52fc6ab..00000000 --- a/libs/libcanfestival/patches/003-makefile-skip-examples.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -21,7 +21,7 @@ - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # - --all: objdictedit canfestival examples -+all: objdictedit canfestival - - examples: canfestival driver - $(MAKE) -C examples all -@@ -44,7 +44,7 @@ driver: - install: canfestival driver - $(MAKE) -C drivers $@ - $(MAKE) -C src $@ -- $(MAKE) -C examples $@ -+ #$(MAKE) -C examples $@ - $(MAKE) -C objdictgen $@ - ldconfig - diff --git a/libs/libcanfestival/patches/004-override-cflags.patch b/libs/libcanfestival/patches/004-override-cflags.patch deleted file mode 100644 index 8dfb3960..00000000 --- a/libs/libcanfestival/patches/004-override-cflags.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/drivers/can_socket/Makefile.in -+++ b/drivers/can_socket/Makefile.in -@@ -23,7 +23,7 @@ - - CC = SUB_CC - OPT_CFLAGS = -O2 --CFLAGS = SUB_OPT_CFLAGS -+CFLAGS ?= SUB_OPT_CFLAGS - PROG_CFLAGS = SUB_PROG_CFLAGS - PREFIX = SUB_PREFIX - TARGET = SUB_TARGET ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -101,7 +101,7 @@ uninstall: - rm -rf $(DESTDIR)$(PREFIX)/include/canfestival - - else --CFLAGS = SUB_OPT_CFLAGS -+CFLAGS ?= SUB_OPT_CFLAGS - - ifeq ($(TARGET),none) - canfestival: libcanfestival.o ---- a/drivers/unix/Makefile.in -+++ b/drivers/unix/Makefile.in -@@ -85,7 +85,7 @@ install: - - - else --CFLAGS = SUB_OPT_CFLAGS -+CFLAGS ?= SUB_OPT_CFLAGS - - driver: libcanfestival_$(TARGET).a - ---- a/drivers/timers_unix/Makefile.in -+++ b/drivers/timers_unix/Makefile.in -@@ -23,7 +23,7 @@ - - CC = SUB_CC - OPT_CFLAGS = -O2 --CFLAGS = SUB_OPT_CFLAGS -+CFLAGS ?= SUB_OPT_CFLAGS - PROG_CFLAGS = SUB_PROG_CFLAGS - OS_NAME = SUB_OS_NAME - ARCH_NAME = SUB_ARCH_NAME diff --git a/libs/libcap-ng/Makefile b/libs/libcap-ng/Makefile new file mode 100644 index 00000000..04d480f2 --- /dev/null +++ b/libs/libcap-ng/Makefile @@ -0,0 +1,90 @@ +# +# Copyright (C) 2020 Lucian Cristian +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libcap-ng +PKG_VERSION:=0.7.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://people.redhat.com/sgrubb/libcap-ng +PKG_HASH:=a84ca7b4e0444283ed269b7a29f5b6187f647c82e2b876636b49b9a744f0ffbf + +PKG_MAINTAINER:=Lucian CRISTIAN +PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later +PKG_LICENSE_FILES:=License + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/libcap-ng/Default + TITLE:=POSIX capabilities library + SECTION:=libs + CATEGORY:=Libraries + URL:=https://people.redhat.com/sgrubb/libcap-ng/index.html +endef + +define Package/libcap-ng/description/Default + POSIX capabilities library +endef + +define Package/libcap-ng + $(call Package/libcap-ng/Default) + TITLE += library +endef + +define Package/libcap-ng-bin + $(call Package/libcap-ng/Default) + TITLE += binaries + DEPENDS += libcap-ng +endef + +define Package/libcap-ng-bin/description + $(call Package/libcap-ng/description/Default) + . + This package contains the libcap-ng utilities. +endef + +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed $(FPIC) +TARGET_CFLAGS += -flto + +CONFIGURE_VARS += \ + ac_cv_prog_swig_found=no + +CONFIGURE_ARGS += \ + --prefix=/usr \ + --without-python \ + --without-python3 + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcap-ng.{so*,a} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcap-ng.pc $(1)/usr/lib/pkgconfig/ + $(INSTALL_DIR) $(1)/usr/share/aclocal + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/cap-ng.m4\ + $(1)/usr/share/aclocal +endef + +define Package/libcap-ng/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcap-ng.so* $(1)/usr/lib/ +endef + +define Package/libcap-ng-bin/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,libcap-ng)) +$(eval $(call BuildPackage,libcap-ng-bin)) diff --git a/libs/libcap-ng/patches/add_library_if_header_found.patch b/libs/libcap-ng/patches/add_library_if_header_found.patch new file mode 100644 index 00000000..fbeee1cd --- /dev/null +++ b/libs/libcap-ng/patches/add_library_if_header_found.patch @@ -0,0 +1,30 @@ +From 2c855b76362d1027abea967ac253cae8a7c160c3 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Wed, 6 May 2020 17:38:05 -0400 +Subject: [PATCH] configure.ac: add library if header found (#10) + +If the pthread.h header is found, make sure library containing +"pthread_atfork" is added to the list of libraries against which to link. +On some hosts (e.g. openSUSE 15.1) "-lpthread" needs to be explicitly added +in order for the code to compile correctly. + +Signed-off-by: Trevor Woerner +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 9d6aca3..4fbe4d3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -56,7 +56,9 @@ AC_CHECK_HEADERS(sys/xattr.h, [], [ + AC_CHECK_HEADERS(attr/xattr.h, [], [AC_MSG_WARN(attr/xattr.h not found, disabling file system capabilities.)]) + ]) + AC_CHECK_HEADERS(linux/securebits.h, [], []) +-AC_CHECK_HEADERS(pthread.h, [], [AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)]) ++AC_CHECK_HEADERS(pthread.h, ++ [AC_SEARCH_LIBS(pthread_atfork, pthread)], ++ [AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)]) + + AC_C_CONST + AC_C_INLINE diff --git a/libs/libcap-ng/patches/fix-includes.patch b/libs/libcap-ng/patches/fix-includes.patch new file mode 100644 index 00000000..8fbd984b --- /dev/null +++ b/libs/libcap-ng/patches/fix-includes.patch @@ -0,0 +1,11 @@ +diff -ru libcap-ng-0.7.4.orig/src/cap-ng.c libcap-ng-0.7.4/src/cap-ng.c +--- libcap-ng-0.7.4.orig/src/cap-ng.c 2014-04-24 15:41:43.000000000 -0300 ++++ libcap-ng-0.7.4/src/cap-ng.c 2015-04-15 08:45:10.783335463 -0300 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + #ifdef HAVE_SYSCALL_H + #include diff --git a/libs/libcap-ng/patches/fix_build_without_threads.patch b/libs/libcap-ng/patches/fix_build_without_threads.patch new file mode 100644 index 00000000..39a2555d --- /dev/null +++ b/libs/libcap-ng/patches/fix_build_without_threads.patch @@ -0,0 +1,26 @@ +From 9b5597dc780a9da292f9142899a992cfc6ca081d Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Thu, 7 May 2020 00:19:18 +0200 +Subject: [PATCH] src/cap-ng.c: fix build without threads (#13) + +Put pthread_atfork under #ifdef HAVE_PTHREAD_H block + +Signed-off-by: Fabrice Fontaine +--- + src/cap-ng.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/cap-ng.c b/src/cap-ng.c +index 35fcd7a..97a3dbd 100644 +--- a/src/cap-ng.c ++++ b/src/cap-ng.c +@@ -166,7 +166,9 @@ static void deinit(void) + static void init_lib(void) __attribute__ ((constructor)); + static void init_lib(void) + { ++#ifdef HAVE_PTHREAD_H + pthread_atfork(NULL, NULL, deinit); ++#endif + } + + static void init(void) diff --git a/libs/libcap/Makefile b/libs/libcap/Makefile index 3126f6cc..33483e93 100644 --- a/libs/libcap/Makefile +++ b/libs/libcap/Makefile @@ -8,45 +8,58 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcap -PKG_VERSION:=2.26 +PKG_VERSION:=2.36 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2 -PKG_HASH:=b630b7c484271b3ba867680d6a14b10a86cfa67247a14631b14c06731d5a458b +PKG_HASH:=5048c849bdbbe24d2ca59463142cb279abec5edf3ab6731ab35a596bcf538a49 PKG_MAINTAINER:=Paul Wassi -PKG_LICENSE:=GPL-2.0 +PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=License PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/kernel.mk -define Package/libcap +define Package/libcap/Default TITLE:=Linux capabilities library SECTION:=libs CATEGORY:=Libraries URL:=https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/ endef -define Package/libcap/config - if PACKAGE_libcap +define Package/libcap/description/Default + Linux capabilities +endef - config PACKAGE_libcap-bin - bool "install libcap executables" - help - Install capsh, getcap, getpcaps, setcap into the target image. - default n +define Package/libcap + $(call Package/libcap/Default) + TITLE += library +endef +define Package/libcap-bin + $(call Package/libcap/Default) + TITLE += binaries + DEPENDS += libcap +endef + +define Package/libcap-bin/description + $(call Package/libcap/description/Default) + . + This package contains the libcap utilities. +endef + +define Package/libcap-bin/config + if PACKAGE_libcap-bin config PACKAGE_libcap-bin-capsh-shell string "capsh shell" - depends on PACKAGE_libcap-bin help Set the capsh shell. default "/bin/sh" - endif endef @@ -57,6 +70,7 @@ MAKE_FLAGS += \ LD="$(TARGET_CC) -Wl,-x -shared" \ LDFLAGS="$(TARGET_LDFLAGS)" \ INDENT="| true" \ + GOLANG="no" \ PAM_CAP="no" \ RAISE_SETFCAP="no" \ DYNAMIC="yes" \ @@ -66,23 +80,37 @@ ifneq ($(CONFIG_PACKAGE_libcap-bin-capsh-shell),) TARGET_CFLAGS += -DSHELL='\"$(CONFIG_PACKAGE_libcap-bin-capsh-shell)\"' endif +TARGET_CFLAGS += $(if $(CONFIG_USE_MUSL),-Dpthread_yield=sched_yield) + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/sys - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/sys/*.h $(1)/usr/include/sys/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libcap.{so*,a} $(1)/usr/lib/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/libpsx.a $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/pkgconfig/libcap.pc $(1)/usr/lib/pkgconfig/ + $(SED) 's,exec_prefix=,exec_prefix=/usr,g' $(1)/usr/lib/pkgconfig/libcap.pc + $(SED) 's,/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcap.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libcap.pc + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/pkgconfig/libpsx.pc $(1)/usr/lib/pkgconfig/ + $(SED) 's,exec_prefix=,exec_prefix=/usr,g' $(1)/usr/lib/pkgconfig/libpsx.pc + $(SED) 's,/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libpsx.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libpsx.pc endef define Package/libcap/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libcap.so* $(1)/usr/lib/ -ifneq ($(CONFIG_PACKAGE_libcap-bin),) +endef + +define Package/libcap-bin/install $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/sbin/capsh $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/getcap $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/getpcaps $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/sbin/setcap $(1)/usr/sbin/ -endif endef $(eval $(call BuildPackage,libcap)) +$(eval $(call BuildPackage,libcap-bin)) diff --git a/libs/libcap/patches/100-portability.patch b/libs/libcap/patches/100-portability.patch deleted file mode 100644 index 735a9739..00000000 --- a/libs/libcap/patches/100-portability.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/libcap/_makenames.c -+++ b/libcap/_makenames.c -@@ -7,7 +7,6 @@ - - #include - #include --#include - - /* - * #include 'sed' generated array -@@ -22,7 +21,7 @@ struct { - }; - - /* this should be more than big enough (factor of three at least) */ --const char *pointers[8*sizeof(struct __user_cap_data_struct)]; -+const char *pointers[8*12]; - - int main(void) - { diff --git a/libs/libcap/patches/200-change-hardcoded-shell-to-sh.patch b/libs/libcap/patches/200-change-hardcoded-shell-to-sh.patch deleted file mode 100644 index 27865ff6..00000000 --- a/libs/libcap/patches/200-change-hardcoded-shell-to-sh.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/progs/capsh.c -+++ b/progs/capsh.c -@@ -24,6 +24,9 @@ - #include - #include - -+#ifndef SHELL -+#define SHELL "/bin/sh" -+#endif - #define MAX_GROUPS 100 /* max number of supplementary groups for user */ - - static char *binary(unsigned long value) -@@ -692,10 +695,10 @@ int main(int argc, char *argv[], char *envp[]) - } else if (!strcmp("--print", argv[i])) { - arg_print(); - } else if ((!strcmp("--", argv[i])) || (!strcmp("==", argv[i]))) { -- argv[i] = strdup(argv[i][0] == '-' ? "/bin/bash" : argv[0]); -+ argv[i] = strdup(argv[i][0] == '-' ? SHELL : argv[0]); - argv[argc] = NULL; - execve(argv[i], argv+i, envp); -- fprintf(stderr, "execve /bin/bash failed!\n"); -+ fprintf(stderr, "execve " SHELL " failed!\n"); - exit(1); - } else { - usage: -@@ -720,7 +723,7 @@ int main(int argc, char *argv[], char *envp[]) - " --killit= send signal(n) to child\n" - " --forkfor= fork and make child sleep for sec\n" - " == re-exec(capsh) with args as for --\n" -- " -- remaing arguments are for /bin/bash\n" -+ " -- remaing arguments are for " SHELL "\n" - " (without -- [%s] will simply exit(0))\n", - argv[0], argv[0]); - diff --git a/libs/libcap/patches/300-disable-tests.patch b/libs/libcap/patches/300-disable-tests.patch new file mode 100644 index 00000000..9eb116ec --- /dev/null +++ b/libs/libcap/patches/300-disable-tests.patch @@ -0,0 +1,10 @@ +--- a/Makefile ++++ b/Makefile +@@ -16,7 +16,6 @@ endif + ifeq ($(GOLANG),yes) + $(MAKE) -C go $@ + endif +- $(MAKE) -C tests $@ + $(MAKE) -C progs $@ + $(MAKE) -C doc $@ + $(MAKE) -C kdebug $@ diff --git a/libs/libcgroup/Makefile b/libs/libcgroup/Makefile new file mode 100644 index 00000000..2545c78c --- /dev/null +++ b/libs/libcgroup/Makefile @@ -0,0 +1,65 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libcgroup +PKG_VERSION:=0.41 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/libcg +PKG_HASH:=e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libcgroup + TITLE:=CGroup config and exec library + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+USE_MUSL:musl-fts +@KERNEL_CGROUPS +endef + +define Package/cgroup-tools + TITLE:=CGroup config and exec tools + DEPENDS:=+libcgroup + CATEGORY:=Utilities +endef + +define Package/libcgroup/description + Helpers utils for working with cgroups. +endef + +CONFIGURE_ARGS += \ + --enable-tools \ + --enable-shared \ + --disable-daemon \ + --disable-pam + +TARGET_LDFLAGS += $(if $(CONFIG_USE_MUSL),-lfts) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/include/libcgroup.h $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/libcgroup $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcgroup.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libcgroup/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.so* $(1)/usr/lib +endef + +define Package/cgroup-tools/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,libcgroup)) +$(eval $(call BuildPackage,cgroup-tools)) diff --git a/libs/libcgroup/patches/010-cdefs.patch b/libs/libcgroup/patches/010-cdefs.patch new file mode 100644 index 00000000..c40cbb57 --- /dev/null +++ b/libs/libcgroup/patches/010-cdefs.patch @@ -0,0 +1,240 @@ +--- a/include/libcgroup/config.h ++++ b/include/libcgroup/config.h +@@ -5,12 +5,10 @@ + #error "Only should be included directly." + #endif + +-#ifndef SWIG +-#include ++#ifdef __cplusplus ++extern "C" { + #endif + +-__BEGIN_DECLS +- + /** + * @defgroup group_config 5. Configuration + * @{ +@@ -107,6 +105,8 @@ int cgroup_config_create_template_group( + * @} + * @} + */ +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /*_LIBCGROUP_CONFIG_H*/ +--- a/include/libcgroup/error.h ++++ b/include/libcgroup/error.h +@@ -5,12 +5,10 @@ + #error "Only should be included directly." + #endif + +-#ifndef SWIG +-#include ++#ifdef __cplusplus ++extern "C" { + #endif + +-__BEGIN_DECLS +- + /** + * @defgroup group_errors 6. Error handling + * @{ +@@ -99,6 +97,8 @@ int cgroup_get_last_errno(void); + * @} + * @} + */ +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* _LIBCGROUP_INIT_H */ +--- a/include/libcgroup/groups.h ++++ b/include/libcgroup/groups.h +@@ -6,12 +6,13 @@ + #endif + + #ifndef SWIG +-#include + #include + #include + #endif + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /** + * Flags for cgroup_delete_cgroup_ext(). +@@ -577,6 +578,8 @@ char *cgroup_get_cgroup_name(struct cgroup *cgroup); + */ + + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* _LIBCGROUP_GROUPS_H */ +--- a/include/libcgroup/init.h ++++ b/include/libcgroup/init.h +@@ -5,12 +5,10 @@ + #error "Only should be included directly." + #endif + +-#ifndef SWIG +-#include ++#ifdef __cplusplus ++extern "C" { + #endif + +-__BEGIN_DECLS +- + /** + * @defgroup group_init 1. Initialization + * @{ +@@ -58,6 +56,8 @@ int cgroup_get_subsys_mount_point(const char *controller, char **mount_point); + * @} + * @} + */ +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* _LIBCGROUP_INIT_H */ +--- a/include/libcgroup/iterators.h ++++ b/include/libcgroup/iterators.h +@@ -8,10 +8,11 @@ + #ifndef SWIG + #include + #include +-#include + #endif + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /** + * @defgroup group_iterators 3. Iterators +@@ -423,6 +424,8 @@ int cgroup_get_subsys_mount_point_end(void **handle); + * @} + */ + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* _LIBCGROUP_ITERATORS_H */ +--- a/include/libcgroup/log.h ++++ b/include/libcgroup/log.h +@@ -5,13 +5,11 @@ + #error "Only should be included directly." + #endif + +-#ifndef SWIG +-#include +-#endif +- + #include + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /** + * @defgroup group_log 7. Logging +@@ -142,6 +140,8 @@ extern int cgroup_parse_log_level_str(const char *levelstr); + * @} + * @} + */ +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* _LIBCGROUP_LOG_H */ +--- a/include/libcgroup/tasks.h ++++ b/include/libcgroup/tasks.h +@@ -8,11 +8,12 @@ + #include + + #ifndef SWIG +-#include + #include + #endif + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /** Flags for cgroup_change_cgroup_uid_gid(). */ + enum cgflags { +@@ -204,6 +205,8 @@ int cgroup_register_unchanged_process(pid_t pid, int flags); + * @} + * @} + */ +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* _LIBCGROUP_TASKS_H */ +--- a/src/daemon/cgrulesengd.h ++++ b/src/daemon/cgrulesengd.h +@@ -15,9 +15,9 @@ + #ifndef _CGRULESENGD_H + #define _CGRULESENGD_H + +-#include +- +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + #include "config.h" + #include "libcgroup.h" +@@ -119,7 +119,9 @@ void cgre_flash_templates(int signum); + */ + void cgre_catch_term(int signum); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* _CGRULESENGD_H */ + +--- a/src/libcgroup-internal.h ++++ b/src/libcgroup-internal.h +@@ -16,7 +16,9 @@ + + #define __LIBCG_INTERNAL + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + #include "config.h" + #include +@@ -279,6 +281,8 @@ extern void cgroup_dictionary_iterator_end(void **handle); + */ + int cg_chmod_path(const char *path, mode_t mode, int owner_is_umask); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif diff --git a/libs/libcoap/Makefile b/libs/libcoap/Makefile index 4f49adcc..4fe5475b 100644 --- a/libs/libcoap/Makefile +++ b/libs/libcoap/Makefile @@ -8,24 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcoap -PKG_VERSION:=v4.1.2 +PKG_VERSION:=4.2.1 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/obgm/libcoap -PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_SOURCE_VERSION:=fa5248603049ddf95cc84608aad569120763bf2b -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=0ab4bc9569a78904743cc3074fd1c0fc9c78c85fd510fef5145dd872523619e6 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/obgm/libcoap/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=29a0394a265d3febee41e5e2dc03d34292a0aede37f5f80334e529ac0dab2321 PKG_MAINTAINER:=Anton Glukhov -PKG_LICENSE:=GPL-2.0+ BSD-2-Clause +PKG_LICENSE:=GPL-2.0-or-later BSD-2-Clause PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -33,7 +29,8 @@ define Package/libcoap SECTION:=libs CATEGORY:=Libraries TITLE:=CoAP (RFC 7252) library - URL:=http://libcoap.net/ + URL:=https://libcoap.net/ + ABI_VERSION:=2 endef define Package/libcoap/description @@ -66,11 +63,11 @@ TARGET_CFLAGS += $(FPIC) CONFIGURE_ARGS += \ --enable-examples \ - --disable-documentation - -ifeq ($(CONFIG_BIG_ENDIAN),y) -TARGET_CFLAGS += -DWORDS_BIGENDIAN -endif + --disable-documentation \ + --disable-doxygen \ + --disable-dtls \ + --disable-gcov \ + --disable-tests define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include @@ -82,7 +79,7 @@ endef define Package/libcoap/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-$(ABI_VERSION).so* $(1)/usr/lib/ endef define Package/coap-client/install diff --git a/libs/libconfig/Makefile b/libs/libconfig/Makefile new file mode 100644 index 00000000..fe7c5f57 --- /dev/null +++ b/libs/libconfig/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2008-2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libconfig +PKG_VERSION:=1.7.2 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://hyperrealm.github.io/libconfig/dist/ +PKG_HASH:=7c3c7a9c73ff3302084386e96f903eb62ce06953bb1666235fac74363a16fad9 + +PKG_MAINTAINER:=Felix Fietkau +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING.LIB + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libconfig + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Configuration File Library + URL:=https://hyperrealm.github.io/libconfig/ + ABI_VERSION:=11 +endef + +define Package/libconfig/description + Libconfig is a simple library for manipulating structured configuration + files. This file format is more compact and more readable than XML. And + unlike XML, it is type-aware, so it is not necessary to do string + parsing in application code. + + Libconfig is very compact -- just 38K for the stripped C shared + library (less than one-fourth the size of the expat XML parser library) + and 66K for the stripped C++ shared library. This makes it well-suited + for memory-constrained systems like handheld devices. +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-static \ + --disable-cxx + +define Build/InstallDev + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +define Package/libconfig/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libconfig)) diff --git a/libs/libcups/Makefile b/libs/libcups/Makefile new file mode 100644 index 00000000..1966b0bc --- /dev/null +++ b/libs/libcups/Makefile @@ -0,0 +1,97 @@ +# +# Copyright (C) 2006-2012 OpenWrt.org +# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cups +PKG_VERSION:=2.2.12 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz +PKG_SOURCE_URL:=https://github.com/apple/cups/releases/download/v$(PKG_VERSION)/ +PKG_HASH:=0f61ab449e4748a24c6ab355b481ff7691247a140d327b2b7526fce34b7f9aa8 +PKG_MAINTAINER:=Luiz Angelo Daros de Luca +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=LICENSE.txt +PKG_CPE_ID:=cpe:/a:apple:cups + +include $(INCLUDE_DIR)/package.mk + +define Package/libcups/Default + URL:=http://www.cups.org/ + SUBMENU:=Printing +endef + +define Package/libcups +$(call Package/cups/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+zlib +libpthread +libpng +libjpeg +libusb-1.0 + TITLE:=Common UNIX Printing System - Core library +endef + +define Package/libcups/description + Common UNIX Printing System - Core library +endef + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +CONFIGURE_ARGS+=--with-cups-user="nobody" \ + --with-cups-group="nogroup" \ + --with-components="core" \ + --with-pdftops="none" \ + --without-perl \ + --without-python \ + --without-php \ + --enable-shared \ + --enable-image \ + --enable-libusb \ + --disable-acl \ + --disable-dbus \ + --disable-dnssd \ + --disable-launchd \ + --disable-ldap \ + --disable-pam \ + --disable-slp \ + --disable-gnutls \ + --disable-openssl \ + --disable-cdsassl \ + --disable-ssl \ + --disable-gssapi \ + --disable-tiff \ + UNAME="Linux" \ + LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/cups \ + $(TARGET_CONFIGURE_OPTS) \ + DSTROOT="$(PKG_INSTALL_DIR)" \ + STRIP="/bin/true" \ + libcups.so.2 install-libs install-headers + $(MAKE) -C $(PKG_BUILD_DIR)/filter \ + $(TARGET_CONFIGURE_OPTS) \ + DSTROOT="$(PKG_INSTALL_DIR)" \ + STRIP="/bin/true" \ + libcupsimage.so.2 install-libs install-headers + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cups-config $(PKG_INSTALL_DIR)/usr/bin +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(1)/usr/bin/ + $(INSTALL_DIR) $(2)/bin + $(LN) $(STAGING_DIR)/usr/bin/cups-config $(2)/bin + + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib*/libcups*.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libcups)) diff --git a/libs/libdaq/Makefile b/libs/libdaq/Makefile index ebf4063f..2f37f00c 100644 --- a/libs/libdaq/Makefile +++ b/libs/libdaq/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libdaq -PKG_VERSION:=2.0.6 -PKG_RELEASE:=2 +PKG_VERSION:=2.2.2 +PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \ - @SF/snort +PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/ PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz -PKG_HASH:=d41da5f7793e66044e6927dd868c0525e7ee4ec1a3515bf74ef9a30cd9273af0 +PKG_HASH:=7cd818cabb1ad35360e83076e54775f07165ee71407dc672d147e27d3cd37f7b PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=W. Michael Petullo +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -43,14 +44,6 @@ CONFIGURE_ARGS+= \ --with-libpcap-includes="$(STAGING_DIR)/usr/include" \ --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \ -define Build/Compile - $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) -endef - -define Build/Install - $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR) -endef - define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include/ diff --git a/libs/libdaq/patches/001-compile.patch b/libs/libdaq/patches/001-compile.patch index 82df2591..d5a2882d 100644 --- a/libs/libdaq/patches/001-compile.patch +++ b/libs/libdaq/patches/001-compile.patch @@ -1,6 +1,7 @@ ---- a/configure -+++ b/configure -@@ -13552,10 +13552,11 @@ if ${daq_cv_libpcap_version_1x+:} false; +diff -u --recursive daq-2.2.2-vanilla/configure daq-2.2.2/configure +--- daq-2.2.2-vanilla/configure 2017-07-05 15:58:03.000000000 -0400 ++++ daq-2.2.2/configure 2018-09-01 17:18:56.774898034 -0400 +@@ -13244,10 +13244,11 @@ else if test "$cross_compiling" = yes; then : diff --git a/libs/libdaq/patches/100-musl-compat.patch b/libs/libdaq/patches/100-musl-compat.patch index c510564c..6a1aa8f9 100644 --- a/libs/libdaq/patches/100-musl-compat.patch +++ b/libs/libdaq/patches/100-musl-compat.patch @@ -1,5 +1,6 @@ ---- a/os-daq-modules/daq_ipfw.c -+++ b/os-daq-modules/daq_ipfw.c +diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_ipfw.c daq-2.2.2/os-daq-modules/daq_ipfw.c +--- daq-2.2.2-vanilla/os-daq-modules/daq_ipfw.c 2017-02-08 17:04:18.000000000 -0500 ++++ daq-2.2.2/os-daq-modules/daq_ipfw.c 2018-09-01 17:21:10.608181841 -0400 @@ -23,10 +23,10 @@ #include #include @@ -12,8 +13,9 @@ #include #include ---- a/os-daq-modules/daq_ipq.c -+++ b/os-daq-modules/daq_ipq.c +diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_ipq.c daq-2.2.2/os-daq-modules/daq_ipq.c +--- daq-2.2.2-vanilla/os-daq-modules/daq_ipq.c 2017-02-08 17:04:18.000000000 -0500 ++++ daq-2.2.2/os-daq-modules/daq_ipq.c 2018-09-01 17:21:23.162208457 -0400 @@ -24,10 +24,10 @@ #include #include @@ -26,8 +28,9 @@ #include ---- a/os-daq-modules/daq_nfq.c -+++ b/os-daq-modules/daq_nfq.c +diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_nfq.c daq-2.2.2/os-daq-modules/daq_nfq.c +--- daq-2.2.2-vanilla/os-daq-modules/daq_nfq.c 2017-02-08 17:04:18.000000000 -0500 ++++ daq-2.2.2/os-daq-modules/daq_nfq.c 2018-09-01 17:21:35.202233988 -0400 @@ -24,10 +24,10 @@ #include #include diff --git a/libs/libdmapsharing/Makefile b/libs/libdmapsharing/Makefile index 3c61d3df..18701a9c 100644 --- a/libs/libdmapsharing/Makefile +++ b/libs/libdmapsharing/Makefile @@ -10,33 +10,31 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libdmapsharing -PKG_VERSION:=2.9.39 +PKG_VERSION:=3.9.8 PKG_RELEASE:=1 -PKG_MAINTAINER:=W. Michael Petullo - -PKG_LICENSE:=LGPLv2.1 -PKG_LICENSE_FILES:=COPYING - PKG_SOURCE:=libdmapsharing-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.flyn.org/projects/libdmapsharing/ -PKG_HASH:=a90dc0681ae81700e46efc539f70edb6edd936b782a9a695434bea660a43a5ef +PKG_SOURCE_URL:=https://www.flyn.org/projects/libdmapsharing/ +PKG_HASH:=66f154602cf4f444ff3de70be74ae75b932f512c031d21374257d349f11f9710 + +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=glib2/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk -TARGET_LDFLAGS+= \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - define Package/libdmapsharing SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libsoup +mdnsresponder +gstreamer1 +gst1-plugins-base +libgst1app + DEPENDS:=+libsoup +mdnsresponder +gstreamer1-plugins-base +gst1-mod-app TITLE:=libdmapsharing - URL:=http://www.flyn.org/projects/libdmapsharing/ + URL:=https://www.flyn.org/projects/libdmapsharing/ endef define Package/libdmapsharing/decription @@ -51,7 +49,7 @@ CONFIGURE_ARGS += \ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/libdmapsharing-3.0/ \ + $(PKG_INSTALL_DIR)/usr/include/libdmapsharing-4.0/ \ $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib/ $(CP) \ diff --git a/libs/libdmapsharing/patches/001-disable_pixbuf.patch b/libs/libdmapsharing/patches/001-disable_pixbuf.patch index fcc84535..cefe1be0 100644 --- a/libs/libdmapsharing/patches/001-disable_pixbuf.patch +++ b/libs/libdmapsharing/patches/001-disable_pixbuf.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -117,18 +117,7 @@ dnl make GOBJECT_CFLAGS and GOBJECT_LIBS +@@ -126,18 +126,7 @@ dnl make GOBJECT_CFLAGS and GOBJECT_LIBS AC_SUBST(GOBJECT_CFLAGS) AC_SUBST(GOBJECT_LIBS) diff --git a/libs/libdnet/patches/001-compile.patch b/libs/libdnet/patches/001-compile.patch deleted file mode 100644 index 54223c90..00000000 --- a/libs/libdnet/patches/001-compile.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/config/config.sub -+++ b/config/config.sub -@@ -228,7 +228,7 @@ case $basic_machine in - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ -@@ -290,7 +290,7 @@ case $basic_machine in - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -+ | avr-* | avr32-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ - | clipper-* | cydra-* \ diff --git a/libs/libdouble-conversion/Makefile b/libs/libdouble-conversion/Makefile deleted file mode 100644 index 5a061f91..00000000 --- a/libs/libdouble-conversion/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libdouble-conversion -PKG_VERSION:=2.0 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=0d25506a2e7fb52928963313343e0237e890059e -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=7466f634421f3136174cbc2b00635788509a3312894de28367f31d891fd401ad -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/google/double-conversion.git -PKG_LICENSE_FILES:=COPYING LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/libdouble-conversion - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles - URL:=https://github.com/google/double-conversion - DEPENDS:=+libstdcpp -endef - -define Package/libdouble-conversion/description - double-conversion provides binary-decimal and decimal-binary routines for IEEE doubles. - - The library consists of efficient conversion routines that have been extracted - from the V8 JavaScript engine. The code has been refactored and improved so that - it can be used more easily in other projects. -endef - -CMAKE_OPTIONS += \ - -DBUILD_SHARED_LIBS=ON \ - -DBUILD_TESTING=OFF - -define Build/InstallDev - $(INSTALL_DIR) \ - $(1)/usr/lib \ - $(1)/usr/include/double-conversion - - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/* \ - $(1)/usr/include/ - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \ - $(1)/usr/lib/ -endef - -define Package/libdouble-conversion/install - $(INSTALL_DIR) \ - $(1)/usr/lib - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \ - $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libdouble-conversion)) diff --git a/libs/libdrm/Makefile b/libs/libdrm/Makefile index e0da214f..5e3e1947 100644 --- a/libs/libdrm/Makefile +++ b/libs/libdrm/Makefile @@ -6,42 +6,55 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libdrm -PKG_VERSION:=2.4.70 +PKG_VERSION:=2.4.101 PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://dri.freedesktop.org/libdrm -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_HASH:=b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b +PKG_SOURCE_URL:=https://dri.freedesktop.org/libdrm +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=ddf31baa8e49473624860bd166ce654dc349873f7a6c7b3305964249315c78a7 + +PKG_MAINTAINER:=Lucian Cristian +PKG_LICENSE:=BSD-3-Clause PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=meson/host include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk define Package/libdrm SECTION:=libs CATEGORY:=Libraries - DEPENDS:= + DEPENDS:=+libpciaccess TITLE:=libdrm - URL:=http://dri.freedesktop.org/ + URL:=https://dri.freedesktop.org/ endef -CONFIGURE_ARGS += \ - --disable-udev \ - --enable-kms \ - --disable-intel \ - --disable-radeon \ - --disable-amdgpu \ - --disable-nouveau \ - --disable-vmwgfx \ - --disable-omap-experimental-api \ - --disable-exynos-experimental-api \ - --disable-freedreno \ - --disable-freedreno-kgsl \ - --disable-tegra-experimental-api \ - --disable-vc4 \ - --disable-cairo-tests \ - --disable-manpages \ - --disable-valgrind +define Package/libdrm/description + LIBDRM is the cross-driver middleware which allows user-space applications + (such as Mesa and 2D drivers) to communicate with the Kernel by the means + of the DRI protocol. +endef + +MESON_ARGS += \ + -Dlibkms=false \ + -Dintel=false \ + -Dradeon=false \ + -Damdgpu=false \ + -Dnouveau=false \ + -Dvmwgfx=false \ + -Domap=false \ + -Dexynos=false \ + -Dfreedreno=false \ + -Dtegra=false \ + -Dvc4=false \ + -Detnaviv=false \ + -Dcairo-tests=false \ + -Dman-pages=false \ + -Dvalgrind=false \ + -Dfreedreno-kgsl=false \ + -Dinstall-test-programs=false \ + -Dudev=false define Build/InstallDev $(INSTALL_DIR) \ diff --git a/libs/libdrm/patches/000-remove-dep-on-pthread-stubs.patch b/libs/libdrm/patches/000-remove-dep-on-pthread-stubs.patch deleted file mode 100644 index 5da56a2f..00000000 --- a/libs/libdrm/patches/000-remove-dep-on-pthread-stubs.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- a/configure 2016-07-23 15:19:06.000000000 +0200 -+++ b/configure 2016-08-27 01:11:02.440530337 +0200 -@@ -13334,98 +13334,6 @@ - fi - fi - --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREADSTUBS" >&5 --$as_echo_n "checking for PTHREADSTUBS... " >&6; } -- --if test -n "$PTHREADSTUBS_CFLAGS"; then -- pkg_cv_PTHREADSTUBS_CFLAGS="$PTHREADSTUBS_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pthread-stubs\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "pthread-stubs") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_PTHREADSTUBS_CFLAGS=`$PKG_CONFIG --cflags "pthread-stubs" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$PTHREADSTUBS_LIBS"; then -- pkg_cv_PTHREADSTUBS_LIBS="$PTHREADSTUBS_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pthread-stubs\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "pthread-stubs") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_PTHREADSTUBS_LIBS=`$PKG_CONFIG --libs "pthread-stubs" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- PTHREADSTUBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pthread-stubs" 2>&1` -- else -- PTHREADSTUBS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pthread-stubs" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$PTHREADSTUBS_PKG_ERRORS" >&5 -- -- as_fn_error $? "Package requirements (pthread-stubs) were not met: -- --$PTHREADSTUBS_PKG_ERRORS -- --Consider adjusting the PKG_CONFIG_PATH environment variable if you --installed software in a non-standard prefix. -- --Alternatively, you may set the environment variables PTHREADSTUBS_CFLAGS --and PTHREADSTUBS_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details." "$LINENO" 5 --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it --is in your PATH or set the PKG_CONFIG environment variable to the full --path to pkg-config. -- --Alternatively, you may set the environment variables PTHREADSTUBS_CFLAGS --and PTHREADSTUBS_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details. -- --To get pkg-config, see . --See \`config.log' for more details" "$LINENO" 5; } --else -- PTHREADSTUBS_CFLAGS=$pkg_cv_PTHREADSTUBS_CFLAGS -- PTHREADSTUBS_LIBS=$pkg_cv_PTHREADSTUBS_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- --fi -- -- - - pkgconfigdir=${libdir}/pkgconfig - diff --git a/libs/libebml/Makefile b/libs/libebml/Makefile new file mode 100644 index 00000000..15e86aac --- /dev/null +++ b/libs/libebml/Makefile @@ -0,0 +1,49 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libebml +PKG_VERSION:=1.3.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/Matroska-Org/libebml/tar.gz/release-$(PKG_VERSION)? +PKG_HASH:=2562bb9bc3248e956a6ed1148eafe4d7d68759257133083c212d14faa8709d1e +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION) + +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=LICENSE.LGPL + +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libebml + SECTION:=libs + CATEGORY:=Libraries + TITLE:=a C++ libary to parse EBML files + URL:=https://github.com/Matroska-Org/libebml + DEPENDS:=+libstdcpp + BUILDONLY:=1 +endef + +define Package/libebml/description + a C++ libary to parse EBML files + Specifications may be rendered at http://matroska-org.github.io/libebml/ +endef + +CMAKE_OPTIONS += \ + -DDISABLE_PKGCONFIG=OFF \ + -DDISABLE_CMAKE_CONFIG=OFF \ + -DENABLE_WIN32_IO=OFF + +TARGET_CFLAGS += -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + +$(eval $(call BuildPackage,libebml)) diff --git a/libs/libedit/Makefile b/libs/libedit/Makefile index b27435a2..aeed1564 100644 --- a/libs/libedit/Makefile +++ b/libs/libedit/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libedit -PKG_VERSION:=20170329-3.1 +PKG_VERSION:=20191231-3.1 PKG_RELEASE:=1 PKG_MAINTAINER:=Daniel Salzman @@ -16,9 +16,8 @@ PKG_LICENSE:=BSD-3-Clause PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thrysoee.dk/editline/ -PKG_HASH:=91f2d90fbd2a048ff6dad7131d9a39e690fd8a8fd982a353f1333dd4017dd4be +PKG_HASH:=dbb82cb7e116a5f8025d35ef5b4f7d4a3cdd0a3909a146a39112095a2d229071 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libesmtp/Makefile b/libs/libesmtp/Makefile index a9cc4dd5..843e55a9 100644 --- a/libs/libesmtp/Makefile +++ b/libs/libesmtp/Makefile @@ -9,18 +9,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libesmtp PKG_VERSION:=1.0.6 -PKG_RELEASE:=3 +PKG_RELEASE:=5 PKG_MAINTAINER:=Othmar Truniger -PKG_LICENSE:=LGPL-2.0+ +PKG_LICENSE:=LGPL-2.0-or-later PKG_LICENSE_FILES:=COPYING -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/tru7/libesmtp.git -PKG_SOURCE_VERSION=10e9a6df9f76da610941addf71b9a3cbf94f2e9f -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=6f703766be05cc0cd861790ee041d1c2910b6d6e7bb8805ed739839c7801bfcc +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://brianstafford.info/libesmtp +PKG_HASH:=d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -31,7 +28,7 @@ define Package/libesmtp SECTION:=libs CATEGORY:=Libraries TITLE:=A Library for Posting Electronic Mail - URL:=https://github.com/tru7/libesmtp.git + URL:=http://brianstafford.info/libesmtp/ DEPENDS:=+libpthread +libopenssl endef diff --git a/libs/libesmtp/patches/100-openssl-1.1.patch b/libs/libesmtp/patches/100-openssl-1.1.patch new file mode 100644 index 00000000..cf02c15e --- /dev/null +++ b/libs/libesmtp/patches/100-openssl-1.1.patch @@ -0,0 +1,92 @@ +diff --git a/configure b/configure +index d586ca2..ee39284 100755 +--- a/configure ++++ b/configure +@@ -11896,9 +11896,9 @@ fi + + fi + if test x$with_openssl != xno ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 +-$as_echo_n "checking for SSL_library_init in -lssl... " >&6; } +-if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 ++$as_echo_n "checking for SSL_new in -lssl... " >&6; } ++if test "${ac_cv_lib_ssl_SSL_new+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -11913,27 +11913,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char SSL_library_init (); ++char SSL_new (); + int + main () + { +-return SSL_library_init (); ++return SSL_new (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_ssl_SSL_library_init=yes ++ ac_cv_lib_ssl_SSL_new=yes + else +- ac_cv_lib_ssl_SSL_library_init=no ++ ac_cv_lib_ssl_SSL_new=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 +-$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } +-if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5 ++$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; } ++if test "x$ac_cv_lib_ssl_SSL_new" = x""yes; then : + + with_openssl=yes + LIBS="-lssl -lcrypto $LIBS" +diff --git a/smtp-tls.c b/smtp-tls.c +index 9a66806..5bdc191 100644 +--- a/smtp-tls.c ++++ b/smtp-tls.c +@@ -64,10 +64,12 @@ openssl_mutexcb (int mode, int n, + const char *file __attribute__ ((unused)), + int line __attribute__ ((unused))) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (mode & CRYPTO_LOCK) + pthread_mutex_lock (&openssl_mutex[n]); + else + pthread_mutex_unlock (&openssl_mutex[n]); ++#endif + } + #endif + +@@ -76,7 +78,7 @@ starttls_init (void) + { + if (tls_init) + return 1; +- ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + #ifdef USE_PTHREADS + /* Set up mutexes for the OpenSSL library */ + if (openssl_mutex == NULL) +@@ -94,9 +96,12 @@ starttls_init (void) + CRYPTO_set_locking_callback (openssl_mutexcb); + } + #endif +- tls_init = 1; + SSL_load_error_strings (); + SSL_library_init (); ++#else ++ OPENSSL_init_ssl(0, NULL); ++#endif ++ tls_init = 1; + return 1; + } + diff --git a/libs/libesmtp/patches/200-add-TLSv1_1-TLSv1_2-support.patch b/libs/libesmtp/patches/200-add-TLSv1_1-TLSv1_2-support.patch new file mode 100644 index 00000000..c1e50e7b --- /dev/null +++ b/libs/libesmtp/patches/200-add-TLSv1_1-TLSv1_2-support.patch @@ -0,0 +1,36 @@ +Description: Add TLSv1.1 and TLSv1.2 support +Origin: vendor +Bug-Debian: https://bugs.debian.org/802658 +Forwarded: yes +Author: Salvatore Bonaccorso +Last-Update: 2015-11-07 + +--- a/smtp-tls.c ++++ b/smtp-tls.c +@@ -197,11 +197,24 @@ starttls_create_ctx (smtp_session_t sess + ckf_t status; + + /* The decision not to support SSL v2 and v3 but instead to use only +- TLSv1 is deliberate. This is in line with the intentions of RFC ++ TLSv1.X is deliberate. This is in line with the intentions of RFC + 3207. Servers typically support SSL as well as TLS because some + versions of Netscape do not support TLS. I am assuming that all + currently deployed servers correctly support TLS. */ +- ctx = SSL_CTX_new (TLSv1_client_method ()); ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \ ++ !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_IS_BORINGSSL) ++ ctx = SSL_CTX_new (TLS_client_method ()); ++#else ++ ctx = SSL_CTX_new (SSLv23_client_method ()); ++#endif ++ ++#ifdef OPENSSL_NO_SSL3 ++ SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3); ++#endif ++ ++#ifdef OPENSSL_NO_SSL2 ++ SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2); ++#endif + + /* Load our keys and certificates. To avoid messing with configuration + variables etc, use fixed paths for the certificate store. These are diff --git a/libs/libestr/Makefile b/libs/libestr/Makefile index 35af1e28..9fc362a2 100644 --- a/libs/libestr/Makefile +++ b/libs/libestr/Makefile @@ -8,19 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libestr -PKG_VERSION:=0.1.10 -PKG_RELEASE:=2 +PKG_VERSION:=0.1.11 +PKG_RELEASE:=3 PKG_SOURCE_URL:=http://libestr.adiscon.com/files/download/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=bd655e126e750edd18544b88eb1568d200a424a0c23f665eb14bbece07ac703c +PKG_HASH:=46632b2785ff4a231dcf241eeb0dcb5fc0c7d4da8ee49cf5687722cdbe8b2024 -PKG_MAINTAINER:=Dov Murik -PKG_LICENSE:=LGPL-2.1+ +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libev/Makefile b/libs/libev/Makefile index cf9e111d..52027874 100644 --- a/libs/libev/Makefile +++ b/libs/libev/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libev -PKG_VERSION:=4.22 +PKG_VERSION:=4.31 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/ -PKG_HASH:=736079e8ac543c74d59af73f9c52737b3bfec9601f020bf25a87a4f4d0f01bd6 +PKG_HASH:=ed855d2b52118e32c0c1a6a32bd18c97f9e6711ca511f5ee12de3b9eccc66e5a PKG_LICENSE:=BSD-2-Clause PKG_MAINTAINER:=Karl Palsson diff --git a/libs/libevdev/Makefile b/libs/libevdev/Makefile index c0847a6f..6014d11d 100644 --- a/libs/libevdev/Makefile +++ b/libs/libevdev/Makefile @@ -5,27 +5,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libevdev -PKG_VERSION:=1.5.6 -PKG_RELEASE:=1 +PKG_VERSION:=1.9.0 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://www.freedesktop.org/software/libevdev/ -PKG_HASH:=ecec7e9d66b1d3692f10b3b20aa97fb25e874a784c5552a7b1698091fef5a688 +PKG_SOURCE_URL:=https://www.freedesktop.org/software/libevdev/ +PKG_HASH:=e7e18a64264f2dea19b6c50a481f8c062529d42919ccda0bc861495bce28eb9e +PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Daniel Golle -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=meson/host include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk define Package/libevdev SECTION:=libs CATEGORY:=Libraries TITLE:=a wrapper library for evdev devices - URL:=http://www.freedesktop.org/wiki/Software/libevdev/ + URL:=https://www.freedesktop.org/wiki/Software/libevdev/ endef define Package/libevdev/description @@ -37,11 +38,16 @@ define Package/libevdev/description evdev devices, thus making direct access unnecessary. endef +MESON_ARGS += \ + -Dtests=disabled \ + -Ddocumentation=disabled \ + -Dcoverity=false + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ endef diff --git a/libs/libevdev/patches/010-libevdev-events-fix-compilation-with-older-kernels.patch b/libs/libevdev/patches/010-libevdev-events-fix-compilation-with-older-kernels.patch new file mode 100644 index 00000000..c890936d --- /dev/null +++ b/libs/libevdev/patches/010-libevdev-events-fix-compilation-with-older-kernels.patch @@ -0,0 +1,49 @@ +From e7a2927d5e44209ff61405c9beb3d188eeedc3f6 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Sun, 26 Apr 2020 20:27:58 -0700 +Subject: [PATCH] libevdev-events: fix compilation with older kernels + +input_event_(u)sec was introduced in kernel 4.16. Older kernels do not +have this. + +Signed-off-by: Rosen Penev +--- + tools/libevdev-events.c | 5 +++++ + tools/mouse-dpi-tool.c | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/tools/libevdev-events.c b/tools/libevdev-events.c +index 547513e..e5940c9 100644 +--- a/tools/libevdev-events.c ++++ b/tools/libevdev-events.c +@@ -33,6 +33,11 @@ + + #include "libevdev/libevdev.h" + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + static void + print_abs_bits(struct libevdev *dev, int axis) + { +diff --git a/tools/mouse-dpi-tool.c b/tools/mouse-dpi-tool.c +index 9961f3a..c4830e7 100644 +--- a/tools/mouse-dpi-tool.c ++++ b/tools/mouse-dpi-tool.c +@@ -37,6 +37,11 @@ + + #include "libevdev/libevdev.h" + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + #define min(a, b) (((a) < (b)) ? (a) : (b)) + #define max(a, b) (((a) > (b)) ? (a) : (b)) + +-- +2.25.3 + diff --git a/libs/libevdev/patches/010-no-clock-monotonic-raw-in-uclibc.patch b/libs/libevdev/patches/010-no-clock-monotonic-raw-in-uclibc.patch deleted file mode 100644 index a11ac1e4..00000000 --- a/libs/libevdev/patches/010-no-clock-monotonic-raw-in-uclibc.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/test/test-libevdev-init.c -+++ b/test/test-libevdev-init.c -@@ -32,6 +32,11 @@ - #include - #include "test-common.h" - -+/* work-around CLOCK_MONOTONIC_RAW definition missing in uClibc */ -+#ifndef CLOCK_MONOTONIC_RAW -+#define CLOCK_MONOTONIC_RAW 4 -+#endif -+ - START_TEST(test_new_device) - { - struct libevdev *dev; diff --git a/libs/libevhtp/Makefile b/libs/libevhtp/Makefile index 09e82223..772c6d5b 100644 --- a/libs/libevhtp/Makefile +++ b/libs/libevhtp/Makefile @@ -11,28 +11,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libevhtp -PKG_VERSION:=1.1.6 -PKG_RELEASE:=1 +PKG_VERSION:=1.2.18 +PKG_RELEASE:=3 +# This package is building a static library, used by seafile-server +# Every time the built library changes (metadata changes are exempt), +# seafile-server needs a release bump to ensure the update is used. + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/criticalstack/libevhtp/tar.gz/$(PKG_VERSION)? +PKG_HASH:=316ede0d672be3ae6fe489d4ac1c8c53a1db7d4fe05edaff3c7c853933e02795 + +PKG_MAINTAINER:=Eneas U de Queiroz , Jeffery To PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://chromium.googlesource.com/external/github.com/ellzey/libevhtp -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=91071e2f20749cd469b87ac2ef1c158dc2a6806f -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=c9c4415539e78ac9021a8507cd16b9101564dd03286bc84428cc1ee11f0df1fd +PKG_BUILD_DEPENDS:=libevent2 oniguruma +CMAKE_INSTALL:=1 -PKG_INSTALL:=1 +PKG_CONFIG_DEPENDS:=LIBEVHTP_BUILD_DEPENDS include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/libevhtp SECTION:=libs CATEGORY:=Libraries TITLE:=A more flexible replacement for libevent's httpd API - MAINTAINER:=Gergely Kiss - URL:=https://github.com/ellzey/libevhtp - DEPENDS:=+libevent2 +libevent2-openssl +libevent2-pthreads +libopenssl +libpthread + URL:=https://github.com/criticalstack/libevhtp endef define Package/libevhtp/description @@ -41,12 +46,21 @@ define Package/libevhtp/description meaning the developer never thought of it being used for creating a full-fledged HTTP service. endef -include $(INCLUDE_DIR)/cmake.mk +define Package/libevhtp/config +config LIBEVHTP_BUILD_DEPENDS + bool + default PACKAGE_libevhtp + +config LIBEVHTP_BUILD_SELECT + tristate + default m if LIBEVHTP_BUILD_DEPENDS + select PACKAGE_libevent2-openssl + select PACKAGE_libevent2-pthreads +endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{include,lib} - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,^\(include\|lib\)dir=,\0$(STAGING_DIR)/usr/\1,' "$(1)/usr/lib/pkgconfig/evhtp.pc" endef $(eval $(call BuildPackage,libevhtp)) diff --git a/libs/libevhtp/patches/010-openssl-thread.patch b/libs/libevhtp/patches/010-openssl-thread.patch new file mode 100644 index 00000000..4dea38c7 --- /dev/null +++ b/libs/libevhtp/patches/010-openssl-thread.patch @@ -0,0 +1,29 @@ +--- a/evhtp.c ++++ b/evhtp.c +@@ -2863,7 +2863,7 @@ htp__accept_cb_(struct evconnlistener * serv, int fd, struct sockaddr * s, int s + } /* htp__accept_cb_ */ + + #ifndef EVHTP_DISABLE_SSL +-#ifndef EVHTP_DISABLE_EVTHR ++#if !defined(EVHTP_DISABLE_EVTHR) && (OPENSSL_VERSION_NUMBER < 0x10100000L) + + #ifndef WIN32 + #define _HTP_tid (unsigned long)pthread_self() +@@ -4575,7 +4575,7 @@ htp__use_threads_(evhtp_t * htp, + htp->thread_init_cb = init_cb; + htp->thread_exit_cb = exit_cb; + +-#ifndef EVHTP_DISABLE_SSL ++#if !defined(EVHTP_DISABLE_EVTHR) && (OPENSSL_VERSION_NUMBER < 0x10100000L) + evhtp_ssl_use_threads(); + #endif + +@@ -4723,7 +4723,7 @@ evhtp_set_post_accept_cb(evhtp_t * htp, evhtp_post_accept_cb cb, void * arg) + } + + #ifndef EVHTP_DISABLE_SSL +-#ifndef EVHTP_DISABLE_EVTHR ++#if !defined(EVHTP_DISABLE_EVTHR) && (OPENSSL_VERSION_NUMBER < 0x10100000L) + int + evhtp_ssl_use_threads(void) + { diff --git a/libs/libevhtp/patches/010-strcmp-endianness-fix.patch b/libs/libevhtp/patches/010-strcmp-endianness-fix.patch deleted file mode 100644 index 072b76b0..00000000 --- a/libs/libevhtp/patches/010-strcmp-endianness-fix.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -rupN libevhtp-1.2.9.orig/htparse/htparse.c libevhtp-1.2.9/htparse/htparse.c ---- libevhtp-1.2.9.orig/htparse/htparse.c 2014-03-23 12:50:50.000000000 +0100 -+++ libevhtp-1.2.9/htparse/htparse.c 2014-12-09 01:12:22.242001241 +0100 -@@ -197,6 +197,7 @@ static const char * method_strmap[] = { - - #define _MIN_READ(a, b) ((a) < (b) ? (a) : (b)) - -+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - #define _str3_cmp(m, c0, c1, c2, c3) \ - *(uint32_t *)m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) - -@@ -226,6 +227,37 @@ static const char * method_strmap[] = { - *(uint32_t *)m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \ - && ((uint32_t *)m)[1] == ((c7 << 24) | (c6 << 16) | (c5 << 8) | c4) \ - && m[8] == c8 -+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+#define _str3_cmp(m, c0, c1, c2, c3) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) -+ -+#define _str3Ocmp(m, c0, c1, c2, c3) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) -+ -+#define _str4cmp(m, c0, c1, c2, c3) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) -+ -+#define _str5cmp(m, c0, c1, c2, c3, c4) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && m[4] == c4 -+ -+#define _str6cmp(m, c0, c1, c2, c3, c4, c5) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && (((uint32_t *)m)[1] & 0xffff0000) == ((c4 << 24) | c5 << 16) -+ -+#define _str7_cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7) -+ -+#define _str8cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7) -+ -+#define _str9cmp(m, c0, c1, c2, c3, c4, c5, c6, c7, c8) \ -+ *(uint32_t *)m == ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3) \ -+ && ((uint32_t *)m)[1] == ((c4 << 24) | (c5 << 16) | (c6 << 8) | c7) \ -+ && m[8] == c8 -+#endif - - #define __HTPARSE_GENHOOK(__n) \ - static inline int hook_ ## __n ## _run(htparser * p, htparse_hooks * hooks) { \ diff --git a/libs/libexif/Makefile b/libs/libexif/Makefile index badfc350..d80ad721 100644 --- a/libs/libexif/Makefile +++ b/libs/libexif/Makefile @@ -17,6 +17,7 @@ PKG_HASH:=16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:libexif:libexif PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/libs/libextractor/Makefile b/libs/libextractor/Makefile index 5bb2baac..d1f15a58 100644 --- a/libs/libextractor/Makefile +++ b/libs/libextractor/Makefile @@ -6,17 +6,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libextractor -PKG_VERSION:=1.6 -PKG_RELEASE:=1 +PKG_VERSION:=1.9 +PKG_RELEASE:=2 # ToDo: # - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=26d4adca2e381d2a0c8b3037ec85e094ac5d40485623794466cfc176f5bbf69d +PKG_HASH:=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff -PKG_LICENSE:=GPL-3.0 +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Daniel Golle diff --git a/libs/libextractor/patches/010-musl.patch b/libs/libextractor/patches/010-musl.patch new file mode 100644 index 00000000..5786f3b6 --- /dev/null +++ b/libs/libextractor/patches/010-musl.patch @@ -0,0 +1,13 @@ +diff --git a/src/common/le_architecture.h b/src/common/le_architecture.h +index b863ddb..713acdd 100644 +--- a/src/common/le_architecture.h ++++ b/src/common/le_architecture.h +@@ -26,6 +26,8 @@ + + #if WINDOWS + #include /* #define BYTE_ORDER */ ++#else ++#include + #endif + + /* This is copied directly from GNUnet headers */ diff --git a/libs/libfastjson/Makefile b/libs/libfastjson/Makefile index e8974e02..c54e7efc 100644 --- a/libs/libfastjson/Makefile +++ b/libs/libfastjson/Makefile @@ -8,21 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libfastjson -PKG_VERSION:=0.99.2 -PKG_RELEASE:=2 +PKG_VERSION:=0.99.8 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=66676a4c8de8c5399dfe1cfd064d140afca58e3d8187bae0a3dccdf83165d9d1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/rsyslog/libfastjson.git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_SOURCE_URL:=http://download.rsyslog.com/libfastjson +PKG_HASH:=3544c757668b4a257825b3cbc26f800f59ef3c1ff2a260f40f96b48ab1d59e07 PKG_MAINTAINER:=Dov Murik PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile index be1763c9..af6b525c 100644 --- a/libs/libffi/Makefile +++ b/libs/libffi/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libffi -PKG_VERSION:=3.2.1 -PKG_RELEASE:=3 +PKG_VERSION:=3.3 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/ -PKG_HASH:=d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37 +PKG_SOURCE_URL:=https://sourceware.org/pub/libffi/ +PKG_HASH:=72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 include $(INCLUDE_DIR)/package.mk @@ -46,14 +46,19 @@ A layer must exist above libffi that handles type conversions for values passed between the two languages. endef -CONFIGURE_PATH = build -CONFIGURE_CMD = ../configure -MAKE_PATH = build +HOST_CONFIGURE_ARGS += \ + --disable-debug \ + --disable-docs \ + --disable-multi-os-directory \ + --disable-raw-api \ + --disable-structs -define Build/Configure - mkdir -p $(PKG_BUILD_DIR)/build - $(Build/Configure/Default) -endef +CONFIGURE_ARGS += \ + --disable-debug \ + --disable-docs \ + --disable-multi-os-directory \ + --disable-raw-api \ + --disable-structs define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/pkgconfig @@ -63,11 +68,11 @@ define Build/InstallDev $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ $(1)/usr/lib/pkgconfig/ - sed -i -e 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr/lib/pkgconfig/libffi.pc + $(SED) 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr/lib/pkgconfig/libffi.pc $(INSTALL_DIR) $(1)/usr/include $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)-$(PKG_VERSION)/include/*.h \ + $(PKG_INSTALL_DIR)/usr/include/*.h \ $(1)/usr/include/ endef @@ -78,15 +83,5 @@ define Package/libffi/install $(1)/usr/lib/ endef -define Host/Install - $(call Host/Install/Default) - # Adjust host libffi headers ; the default rule does - # not seem to install them to the proper include folder - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include - $(CP) \ - $(STAGING_DIR_HOSTPKG)/lib/libffi-$(PKG_VERSION)/include/*.h \ - $(STAGING_DIR_HOSTPKG)/include -endef - $(eval $(call HostBuild)) $(eval $(call BuildPackage,libffi)) diff --git a/libs/libffi/patches/002-fix-toolexeclibdir-path.patch b/libs/libffi/patches/002-fix-toolexeclibdir-path.patch deleted file mode 100644 index f79c1323..00000000 --- a/libs/libffi/patches/002-fix-toolexeclibdir-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -rupN libffi-3.2.1.orig/configure libffi-3.2.1/configure ---- libffi-3.2.1.orig/configure 2014-11-12 12:59:57.000000000 +0100 -+++ libffi-3.2.1/configure 2016-05-11 17:14:58.606625260 +0200 -@@ -18725,12 +18725,6 @@ if test "x$GCC" = "xyes"; then - toolexecdir="${libdir}"/gcc-lib/'$(target_alias)' - toolexeclibdir="${libdir}" - fi -- multi_os_directory=`$CC $CFLAGS -print-multi-os-directory` -- case $multi_os_directory in -- .) ;; # Avoid trailing /. -- ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; -- esac -- - else - toolexeclibdir="${libdir}" - fi -diff -rupN libffi-3.2.1.orig/configure.ac libffi-3.2.1/configure.ac ---- libffi-3.2.1.orig/configure.ac 2014-11-12 12:56:51.000000000 +0100 -+++ libffi-3.2.1/configure.ac 2016-05-11 17:15:19.694626266 +0200 -@@ -601,11 +601,6 @@ if test "x$GCC" = "xyes"; then - toolexecdir="${libdir}"/gcc-lib/'$(target_alias)' - toolexeclibdir="${libdir}" - fi -- multi_os_directory=`$CC $CFLAGS -print-multi-os-directory` -- case $multi_os_directory in -- .) ;; # Avoid trailing /. -- ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; -- esac - AC_SUBST(toolexecdir) - else - toolexeclibdir="${libdir}" diff --git a/libs/libffi/patches/100-fix_mips_softfloat.patch b/libs/libffi/patches/100-fix_mips_softfloat.patch index 09b91eff..c3f70242 100644 --- a/libs/libffi/patches/100-fix_mips_softfloat.patch +++ b/libs/libffi/patches/100-fix_mips_softfloat.patch @@ -1,149 +1,18 @@ -From bfeac1b2d18b12c1c3c64a41a09c90f93d0ed4ca Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Mon, 15 Aug 2016 15:00:13 +0800 -Subject: [PATCH] mips: fix MIPS softfloat build issue +From 76c0cfea70f78586231d7994492396eebfb12d5f Mon Sep 17 00:00:00 2001 +From: Carl Hurd +Date: Fri, 29 Nov 2019 14:46:11 -0500 +Subject: [PATCH] Fixed missed #ifndef for __mips_soft_float (#442) -The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi: -fix MIPS softfloat build issue with current binutils" - -Signed-off-by: Felix Fietkau -Signed-off-by: Yousong Zhou +Thank you! --- - src/mips/n32.S | 17 +++++++++++++++++ - src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) + src/mips/o32.S | 2 ++ + 1 file changed, 2 insertions(+) -diff --git a/src/mips/n32.S b/src/mips/n32.S -index c6985d3..8f25994 100644 ---- a/src/mips/n32.S -+++ b/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1< +Date: Thu, 28 Nov 2019 12:42:41 +0000 +Subject: [PATCH] powerpc: fix build failure on power7 and older (#532) + +Build failure looks as: +``` +libtool: compile: powerpc-unknown-linux-gnu-gcc \ + -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ... +In file included from src/powerpc/ffi.c:33: +src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target + 65 | typedef __int128 float128; + | ^~~~~~~~ +``` + +The fix avoids using __int128 in favour of aligned char[16]. + +Closes: https://github.com/libffi/libffi/issues/531 +Signed-off-by: Sergei Trofimovich +--- + src/powerpc/ffi_powerpc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h +index 5ee2a709..8e2f2f0e 100644 +--- a/src/powerpc/ffi_powerpc.h ++++ b/src/powerpc/ffi_powerpc.h +@@ -62,7 +62,7 @@ typedef _Float128 float128; + #elif defined(__FLOAT128__) + typedef __float128 float128; + #else +-typedef __int128 float128; ++typedef char float128[16] __attribute__((aligned(16))); + #endif + + void FFI_HIDDEN ffi_closure_SYSV (void); diff --git a/libs/libfmt/Makefile b/libs/libfmt/Makefile index d3c07e63..68c93274 100644 --- a/libs/libfmt/Makefile +++ b/libs/libfmt/Makefile @@ -8,18 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libfmt -PKG_VERSION:=4.1.0 +PKG_VERSION:=6.2.1 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/fmtlib/fmt.git -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_MIRROR_HASH:=112c964c1537fbc2f3a993f405547fc57b0f3d1524c808006920c53fab42c233 +PKG_SOURCE_NAME:=fmt +PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/fmtlib/$(PKG_SOURCE_NAME)/tar.gz/$(PKG_VERSION)? +PKG_HASH:=5edf8b0f32135ad5fafb3064de26d063571e95e8ae46829c2f4f4b52696bbff0 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=Othmar Truniger -PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE.rst CMAKE_INSTALL:=1 @@ -44,20 +43,15 @@ define Package/libfmt/description It can be used as a safe alternative to printf or as a fast alternative to IOStreams. endef +define Build/InstallDev + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/fmt.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/fmt.pc +endef + define Package/libfmt/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfmt.so* $(1)/usr/lib/ endef -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/fmt - $(CP) $(PKG_INSTALL_DIR)/usr/include/fmt/*.h $(1)/usr/include/fmt/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfmt.so* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/lib/cmake - $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/* $(1)/usr/lib/cmake/ -endef - $(eval $(call BuildPackage,libfmt)) diff --git a/libs/libfstrm/Makefile b/libs/libfstrm/Makefile new file mode 100644 index 00000000..baa4d235 --- /dev/null +++ b/libs/libfstrm/Makefile @@ -0,0 +1,61 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libfstrm +PKG_VERSION:=0.6.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=fstrm-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://dl.farsightsecurity.com/dist/fstrm/ +PKG_HASH:=a7049089eb0861ecaa21150a05613caa6dee4e8545b91191eff2269caa923910 + +PKG_BUILD_DIR:=$(BUILD_DIR)/fstrm-$(PKG_VERSION) + +PKG_MAINTAINER:=James Taylor +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libfstrm + SECTION:=libs + CATEGORY:=Libraries + TITLE:=C implementation of the Frame Streams data transport protocol + URL:=https://github.com/farsightsec/fstrm +endef + +define Package/libfstrm/description +fstrm is an optimized C implementation of Frame Streams that includes a fast, + lockless circular queue implementation and exposes library interfaces for + setting up a dedicated Frame Streams I/O thread and asynchronously submitting + data frames for transport from worker threads. It was originally written to + facilitate the addition of high speed binary logging to DNS servers written + in C using the dnstap log format. +endef + +CONFIGURE_ARGS+= \ + --disable-programs + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/include/fstrm + $(CP) $(PKG_INSTALL_DIR)/usr/include/fstrm/*.h $(1)/usr/include/fstrm/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfstrm.{a,so*} $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libfstrm.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libfstrm/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfstrm.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libfstrm)) diff --git a/libs/libftdi/Makefile b/libs/libftdi/Makefile index ba9b09a4..6d3c1b9a 100644 --- a/libs/libftdi/Makefile +++ b/libs/libftdi/Makefile @@ -9,17 +9,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libftdi PKG_VERSION:=0.20 -PKG_RELEASE:=4 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/ PKG_HASH:=3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e -PKG_MAINTAINER:=Álvaro Fernández Rojas +PKG_MAINTAINER:=Álvaro Fernández Rojas PKG_LICENSE:=LGPL-2.0 PKG_LICENSE_FILES:=COPYING.LIB -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 include $(INCLUDE_DIR)/package.mk @@ -39,19 +40,18 @@ define Package/libftdi/description The library is linked with your program in userspace, no kernel driver required. endef +CMAKE_OPTIONS += \ + -DBoost_NO_BOOST_CMAKE=ON \ + -DEXAMPLES=OFF + define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi.pc $(1)/usr/lib/pkgconfig/libftdi.pc - $(SED) \ - 's,/usr/include,$$$${prefix}/include,g' \ - $(1)/usr/lib/pkgconfig/libftdi.pc - $(SED) \ - 's,/usr/lib,$$$${prefix}/lib,g' \ - $(1)/usr/lib/pkgconfig/libftdi.pc + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdi.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdi.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdi.pc + $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdipp.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdipp.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdipp.pc endef define Package/libftdi/install diff --git a/libs/libftdi1/Makefile b/libs/libftdi1/Makefile index 35c3bf00..4087d6b1 100644 --- a/libs/libftdi1/Makefile +++ b/libs/libftdi1/Makefile @@ -9,21 +9,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libftdi1 PKG_VERSION:=1.4 -PKG_RELEASE:=1 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/ PKG_HASH:=ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681cb31b74 -PKG_MAINTAINER:=Álvaro Fernández Rojas -PKG_LICENSE:=LGPL-2.0 +PKG_MAINTAINER:=Álvaro Fernández Rojas +PKG_LICENSE:=LGPL-2.1-only PKG_LICENSE_FILES:=COPYING.LIB -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 -CMAKE_OPTIONS:=-DBUILD_TESTS=OFF - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -60,21 +59,20 @@ define Package/ftdi_eeprom/description read. Otherwise, you will still get the old values. endef +CMAKE_OPTIONS += \ + -DBoost_NO_BOOST_CMAKE=ON \ + -DBUILD_TESTS=OFF \ + -DDOCUMENTATION=OFF \ + -DEXAMPLES=OFF + define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/libftdi1/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/libftdi1/ftdi.h $(1)/usr/include/libftdi1/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi1.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/cmake/libftdi1 - $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libftdi1/* $(1)/usr/lib/cmake/libftdi1/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi1.pc $(1)/usr/lib/pkgconfig/libftdi1.pc - $(SED) \ - 's,/usr/include,$$$${prefix}/include,g' \ - $(1)/usr/lib/pkgconfig/libftdi1.pc - $(SED) \ - 's,/usr/lib,$$$${prefix}/lib,g' \ - $(1)/usr/lib/pkgconfig/libftdi1.pc + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdi1.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdi1.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdi1.pc + $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdipp1.pc endef define Package/libftdi1/install diff --git a/libs/libftdi1/patches/101-use-findSWIG.patch b/libs/libftdi1/patches/101-use-findSWIG.patch new file mode 100644 index 00000000..91542ca2 --- /dev/null +++ b/libs/libftdi1/patches/101-use-findSWIG.patch @@ -0,0 +1,11 @@ +--- a/python/CMakeLists.txt ++++ b/python/CMakeLists.txt +@@ -3,7 +3,7 @@ option ( LINK_PYTHON_LIBRARY "Link again + + if ( PYTHON_BINDINGS ) + # workaround for cmake bug #0013449 +- if ( NOT DEFINED CMAKE_FIND_ROOT_PATH ) ++ if ( NOT DEFINED CMAKE_FIND_ROOT_PATH OR CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0 ) + find_package ( SWIG ) + else () + find_program ( SWIG_EXECUTABLE NAMES swig2.0 swig ) diff --git a/libs/libfuse3/Makefile b/libs/libfuse3/Makefile new file mode 100644 index 00000000..3caf1d7b --- /dev/null +++ b/libs/libfuse3/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=libfuse3 +PKG_VERSION:=3.9.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=fuse-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/fuse-$(PKG_VERSION) +PKG_HASH:=1bafcfd6c66ba35b7b0beb822532a9106eb8409ad6cde988888fde85f89be645 +PKG_BUILD_DIR:=$(BUILD_DIR)/fuse-$(PKG_VERSION) + +PKG_MAINTAINER:= +PKG_CPE_ID:=cpe:/a:fuse_project:fuse + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=meson/host + +include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk + +define Package/libfuse3 + TITLE:=FUSE3 library + URL:=https://github.com/libfuse/libfuse + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+kmod-fuse +libpthread + SUBMENU:=Filesystem + ABI_VERSION:=1 + LICENSE:=LGPL-2.1-only + LICENSE_FILES:=LGPL2.txt +endef + +define Package/libfuse3/description + fuse3 (Filesystem in UserSpacE) + This package contains the fuse3 shared libraries, needed by other programs. + - libfuse3 +endef + +MESON_ARGS += \ + -Ddisable-mtab=true \ + -Dutils=false \ + -Dexamples=false \ + -Duseroot=false + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/fuse3 + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/fuse3/*.h $(1)/usr/include/fuse3 + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse3.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse3.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libfuse3/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse3.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libfuse3)) diff --git a/libs/libgabe/Makefile b/libs/libgabe/Makefile new file mode 100644 index 00000000..9c748811 --- /dev/null +++ b/libs/libgabe/Makefile @@ -0,0 +1,47 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libgabe +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/schanzen/libgabe/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=2a8c151a90c9ad8eaad073c8ad1482d66875e3433b0b4fd1e08424c0fc89e877 + +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=GPLv2 +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libgabe + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+glib2 +libgcrypt +libgmp +libpbc + TITLE:=Ciphertext-Policy Attribute-Based Encryption + URL:=https://github.com/schanzen/libgabe +endef + +define Package/libgabe/description + This is a fork of the libbswabe library by John Bethencourt + (http://hms.isi.jhu.edu/acsc/cpabe/) replacing openssl with libgcrypt + and fixing some bugs. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + +define Package/libgabe/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libgabe)) diff --git a/libs/libgabe/patches/010-shared-library.patch b/libs/libgabe/patches/010-shared-library.patch new file mode 100644 index 00000000..45247562 --- /dev/null +++ b/libs/libgabe/patches/010-shared-library.patch @@ -0,0 +1,51 @@ +From 9a0e73c5f6cbcf825eced89d26273a24f7266522 Mon Sep 17 00:00:00 2001 +From: "Schanzenbach, Martin" +Date: Sun, 30 Sep 2018 20:38:37 +0200 +Subject: [PATCH] shared library + +--- + Makefile.in | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index f23bf90..c8c19fa 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -18,13 +18,12 @@ LDFLAGS = @LDFLAGS@ \ + + DISTNAME = @PACKAGE_TARNAME@-@PACKAGE_VERSION@ + +-all: libgabe.a TAGS ++all: libgabe.so TAGS + + # compilation and library making + +-libgabe.a: core.o misc.o +- rm -f $@ +- ar rc $@ $^ ++libgabe.so: core.o misc.o ++ $(CC) -shared -o $@ $^ + + # test: test.o libgabe.a + # $(CC) -o $@ $(LDFLAGS) $^ +@@ -44,14 +43,14 @@ dist: AUTHORS COPYING INSTALL NEWS README \ + tar zc $(DISTNAME) > $(DISTNAME).tar.gz + rm -rf $(DISTNAME) + +-install: libgabe.a gabe.h ++install: libgabe.so gabe.h + $(top_srcdir)/mkinstalldirs -m 755 $(DESTDIR)$(libdir) + $(top_srcdir)/mkinstalldirs -m 755 $(DESTDIR)$(includedir) +- $(top_srcdir)/install-sh -m 755 libgabe.a $(DESTDIR)$(libdir) ++ $(top_srcdir)/install-sh -m 755 libgabe.so $(DESTDIR)$(libdir) + $(top_srcdir)/install-sh -m 644 gabe.h $(DESTDIR)$(includedir) + + uninstall: +- /bin/rm -f $(DESTDIR)$(libdir)/libgabe.a ++ /bin/rm -f $(DESTDIR)$(libdir)/libgabe.so + /bin/rm -f $(DESTDIR)$(includedir)/gabe.h + + # development and meta stuff +-- +2.17.1 + diff --git a/libs/libgd/Makefile b/libs/libgd/Makefile index 8d4fc08a..012eb438 100644 --- a/libs/libgd/Makefile +++ b/libs/libgd/Makefile @@ -8,36 +8,58 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libgd -PKG_VERSION:=2.2.5 -PKG_RELEASE:=1 +PKG_VERSION:=2.3.0 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/releases/download/gd-$(PKG_VERSION)/ -PKG_HASH:=8c302ccbf467faec732f0741a859eef4ecae22fea2d2ab87467be940842bde51 +PKG_HASH:=ecd9155b9a417fb3f837f29e5966323796de247789163761dd72dbf83bfcac58 + PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:libgd:libgd -PKG_FIXUP:=autoreconf - -PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk -define Package/libgd +define Package/libgd/default SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libjpeg +libpng +LIBGD_TIFF:libtiff +LIBGD_FREETYPE:libfreetype + DEPENDS:=+libjpeg +libpng +libwebp +LIBGD_TIFF:libtiff +LIBGD_FREETYPE:libfreetype TITLE:=The GD graphics library - URL:=http://www.libgd.org/ - MENU:=1 + URL:=https://libgd.github.io/ endef -define Package/libgd/description +define Package/libgd + $(call Package/libgd/default) + MENU:=1 + DEPENDS+=+LIBGD_TIFF:libtiff +LIBGD_FREETYPE:libfreetype + VARIANT:=default +endef + +define Package/libgd-full + $(call Package/libgd/default) + DEPENDS+=+libtiff +libfreetype + TITLE+=(full) + VARIANT:=full +endef + +define Package/libgd/description/default GD is an open source code library for the dynamic creation of images by programmers. GD creates PNG, JPEG and GIF images, among other formats. endef +Package/libgd/description=$(Package/libgd/description/default) + +define Package/libgd-full/description + $(call Package/libgd/description/default) + . + This variant of the libgd package is compiled will all features enabled. +endef + define Package/libgd/config if PACKAGE_libgd config LIBGD_TIFF @@ -55,56 +77,50 @@ define Package/libgd/config endif endef -TARGET_CFLAGS += $(FPIC) +TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --disable-rpath \ - --without-x \ - --without-fontconfig \ - --with-jpeg=$(STAGING_DIR)/usr \ - --with-png=$(STAGING_DIR)/usr \ - --without-xpm +CMAKE_OPTIONS += \ + -DENABLE_FONTCONFIG=OFF \ + -DENABLE_ICONV=OFF \ + -DENABLE_JPEG=ON \ + -DENABLE_LIQ=OFF \ + -DENABLE_PNG=ON \ + -DENABLE_TIFF=$(if $(CONFIG_LIBGD_TIFF),ON,OFF) \ + -DENABLE_WEBP=ON \ + -DENABLE_XPM=OFF \ + -DZLIB_INCLUDE_DIR="$(STAGING_DIR)/usr" + +ifeq ($(BUILD_VARIANT),full) + CMAKE_OPTIONS += \ + -DENABLE_TIFF=ON \ + -DFREETYPE_INCLUDE_DIRS=$(STAGING_DIR)/usr/include/freetype2/ \ + -DENABLE_FREETYPE=ON -ifdef CONFIG_LIBGD_TIFF - CONFIGURE_ARGS+= \ - --with-tiff=$(STAGING_DIR)/usr else - CONFIGURE_ARGS+= \ - --without-tiff -endif ifdef CONFIG_LIBGD_FREETYPE - CONFIGURE_ARGS+= \ - --with-freetype=$(STAGING_DIR)/usr + CMAKE_OPTIONS += \ + -DFREETYPE_INCLUDE_DIRS=$(STAGING_DIR)/usr/include/freetype2/ \ + -DENABLE_FREETYPE=ON else - CONFIGURE_ARGS+= \ - --without-freetype + CMAKE_OPTIONS += \ + -DENABLE_FREETYPE=OFF endif -CONFIGURE_VARS += \ - ac_cv_header_iconv_h=no +endif define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/ - $(SED) \ - 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \ - $(1)/usr/bin/gdlib-config - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_color_map,_errors,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx,pp}.h \ - $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,la,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(2)/bin - $(LN) ../../usr/bin/gdlib-config $(2)/bin/ + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,/usr/lib,$(STAGING_DIR)/usr/lib,g' $(1)/usr/lib/pkgconfig/gdlib.pc + $(SED) 's,/usr/include,$(STAGING_DIR)/include,g' $(1)/usr/lib/pkgconfig/gdlib.pc endef define Package/libgd/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so* $(1)/usr/lib/ endef +Package/libgd-full/install=$(Package/libgd/install) + $(eval $(call BuildPackage,libgd)) +$(eval $(call BuildPackage,libgd-full)) diff --git a/libs/libgd/patches/010-getlib.patch b/libs/libgd/patches/010-getlib.patch new file mode 100644 index 00000000..00027e5a --- /dev/null +++ b/libs/libgd/patches/010-getlib.patch @@ -0,0 +1,61 @@ +From 635dd9a3065ed88e1741e6b963044b80e913f96a Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 24 Mar 2020 08:01:01 +0100 +Subject: [PATCH] distribute getlib.sh + +--- + config/getlib.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + create mode 100755 config/getlib.sh + +diff --git a/config/getlib.sh b/config/getlib.sh +new file mode 100755 +index 0000000..4835cf6 +--- /dev/null ++++ b/config/getlib.sh +@@ -0,0 +1,42 @@ ++#!/bin/sh ++ ++GETVER="${0%/*}/getver.pl" ++GDLIB_MAJOR=$("${GETVER}" MAJOR) ++GDLIB_MINOR=$("${GETVER}" MINOR) ++GDLIB_REVISION=$("${GETVER}" RELEASE) ++ ++# Dynamic library version information ++# See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info ++ ++GDLIB_LT_CURRENT=3 ++# This is the version where the soname (current above) changes. We use it ++# to reset the revision base back to zero. It's a bit of a pain, but some ++# systems restrict the revision range below to [0..255] (like OS X). ++GDLIB_PREV_MAJOR=2 ++GDLIB_PREV_MINOR=2 ++# This isn't 100% correct, but it tends to be a close enough approximation ++# for how we manage the codebase. It's rare to do a release that doesn't ++# modify the library since this project is centered around the library. ++GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION )) ++GDLIB_LT_AGE=0 ++ ++# The first three fields we feed into libtool and the OS target determines how ++# they get used. The last two fields we feed into cmake. We use the same rules ++# as Linux SONAME versioning in libtool, but cmake should handle it for us. ++case $1 in ++CURRENT) ++ printf '%s' "${GDLIB_LT_CURRENT}" ++ ;; ++REVISION) ++ printf '%s' "${GDLIB_LT_REVISION}" ++ ;; ++AGE) ++ printf '%s' "${GDLIB_LT_AGE}" ++ ;; ++VERSION) ++ printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE )).${GDLIB_LT_AGE}.${GDLIB_LT_REVISION}" ++ ;; ++SONAME) ++ printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE ))" ++ ;; ++esac +-- +2.25.1 + diff --git a/libs/libgd/patches/100-no-cxx.patch b/libs/libgd/patches/100-no-cxx.patch new file mode 100644 index 00000000..790ddd4c --- /dev/null +++ b/libs/libgd/patches/100-no-cxx.patch @@ -0,0 +1,28 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -22,8 +22,6 @@ SET (LIBGD_SRC_FILES + gd_io_dp.c + gd_io_file.c + gd_io_ss.c +- gd_io_stream.cxx +- gd_io_stream.h + gd_jpeg.c + gd_matrix.c + gd_nnquant.c +@@ -59,8 +57,6 @@ SET (LIBGD_SRC_FILES + gdhelpers.c + gdhelpers.h + gdkanji.c +- gdpp.cxx +- gdpp.h + gdtables.c + gdxpm.c + jisx0208.h +@@ -198,7 +194,6 @@ install(FILES + gdfonts.h + gdfontt.h + gdfx.h +- gdpp.h + DESTINATION include) + + CONFIGURE_FILE(../config/gdlib.pc.cmake gdlib.pc @ONLY) diff --git a/libs/libgd/patches/101-gdlib-config.patch b/libs/libgd/patches/101-gdlib-config.patch deleted file mode 100644 index b0d82b72..00000000 --- a/libs/libgd/patches/101-gdlib-config.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/config/gdlib-config.in -+++ b/config/gdlib-config.in -@@ -74,7 +74,7 @@ while test $# -gt 0; do - echo @LDFLAGS@ - ;; - --libs) -- echo -lgd @LIBS@ @LIBICONV@ -+ echo -lgd @LIBS@ - ;; - --cflags|--includes) - echo -I@includedir@ -@@ -87,7 +87,7 @@ while test $# -gt 0; do - echo "includedir: $includedir" - echo "cflags: -I@includedir@" - echo "ldflags: @LDFLAGS@" -- echo "libs: @LIBS@ @LIBICONV@" -+ echo "libs: @LIBS@" - echo "libdir: $libdir" - echo "features: @FEATURES@" - ;; diff --git a/libs/libgd/patches/102-gdlib-pc-in.patch b/libs/libgd/patches/102-gdlib-pc-in.patch deleted file mode 100644 index 79baeb3e..00000000 --- a/libs/libgd/patches/102-gdlib-pc-in.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/config/gdlib.pc.in -+++ b/config/gdlib.pc.in -@@ -7,5 +7,5 @@ Name: gd - Description: GD graphics library - Version: @VERSION@ - Cflags: -I${includedir} --Libs.private: @LIBS@ @LIBICONV@ -+Libs.private: @LIBS@ - Libs: -L${libdir} -lgd diff --git a/libs/libgd/patches/200-uclibc-ceill.patch b/libs/libgd/patches/200-uclibc-ceill.patch deleted file mode 100644 index 1b4fc8e3..00000000 --- a/libs/libgd/patches/200-uclibc-ceill.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/src/gd_bmp.c -+++ b/src/gd_bmp.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - #include "gd.h" - #include "gdhelpers.h" - #include "bmp.h" -@@ -49,6 +50,13 @@ static int bmp_read_rle(gdImagePtr im, g - - #define BMP_DEBUG(s) - -+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LONG_DOUBLE_MATH__) -+long double ceill(long double x) -+{ -+ return (long double)ceil((double)x); -+} -+#endif -+ - static int gdBMPPutWord(gdIOCtx *out, int w) - { - /* Byte order is little-endian */ diff --git a/libs/libgd/patches/220-exclude_host_headers.patch b/libs/libgd/patches/220-exclude_host_headers.patch new file mode 100644 index 00000000..3e6fc6c9 --- /dev/null +++ b/libs/libgd/patches/220-exclude_host_headers.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,8 +94,6 @@ else (USE_EXT_GD) + GV_LT(VERSION GDLIB_LIB_VERSION) + MESSAGE(STATUS "gd shared lib version ${GDLIB_LIB_SOVERSION} (${GDLIB_LIB_VERSION})") + +- SET(CMAKE_REQUIRED_INCLUDES "/usr/include" "/usr/local/include") +- + include(CheckIncludeFiles) + include(CheckIncludeFile) + diff --git a/libs/libgee/Makefile b/libs/libgee/Makefile index 645bf307..7797592a 100644 --- a/libs/libgee/Makefile +++ b/libs/libgee/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2009-2015 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -8,27 +6,24 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libgee -PKG_VERSION:=0.20.0 +PKG_VERSION:=0.20.3 PKG_RELEASE:=1 -PKG_MAINTAINER:=W. Michael Petullo +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNOME/libgee/0.20 +PKG_HASH:=d0b5edefc88cbca5f1709d19fa62aef490922c6577a14ac4e7b085507911a5de -PKG_LICENSE:=LGPL-2.1 +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNOME/libgee/0.20/ -PKG_HASH:=21308ba3ed77646dda2e724c0e8d5a2f8d101fb05e078975a532d7887223c2bb - -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=vala/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk -TARGET_LDFLAGS+= \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - define Package/libgee SECTION:=libs CATEGORY:=Libraries @@ -42,7 +37,12 @@ define Package/libgee/decription endef CONFIGURE_ARGS += \ - --disable-doc + --disable-benchmark \ + --disable-coverage \ + --disable-doc \ + --disable-internal-asserts \ + --disable-introspection \ + --disable-vala-fatal-warnings define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ @@ -57,10 +57,10 @@ define Build/InstallDev $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ $(1)/usr/lib/pkgconfig/ - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi/ + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/vala-`$(STAGING_DIR_HOSTPKG)/bin/valac --api-version`/vapi/ $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/share/vala/vapi/* \ - $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi + $(STAGING_DIR_HOSTPKG)/share/vala-`$(STAGING_DIR_HOSTPKG)/bin/valac --api-version`/vapi endef define Package/libgee/install diff --git a/libs/libgee/patches/libgee-0.18.0-no-introspection.patch b/libs/libgee/patches/libgee-0.18.0-no-introspection.patch deleted file mode 100644 index fd30e450..00000000 --- a/libs/libgee/patches/libgee-0.18.0-no-introspection.patch +++ /dev/null @@ -1,102 +0,0 @@ -diff -u --recursive libgee-0.20.0-vanilla/configure.ac libgee-0.20.0/configure.ac ---- libgee-0.20.0-vanilla/configure.ac 2018-01-07 20:42:52.827537620 -0500 -+++ libgee-0.20.0/configure.ac 2018-01-07 20:43:25.128645499 -0500 -@@ -65,11 +65,6 @@ - enable_consistency_check=$enableval, enable_consistency_check=no) - AS_IF([test "x$enable_consistency_check" != xno], [VALA_ADD_VALAFLAGS(-D CONSISTENCY_CHECKS)]) - --AX_REQUIRE_DEFINED([GOBJECT_INTROSPECTION_CHECK]) --GOBJECT_INTROSPECTION_CHECK([0.9.0]) -- --VALA_CHECK([0.25.1]) -- - AC_OUTPUT([Makefile - gee-0.8.pc - benchmark/Makefile -diff -u --recursive libgee-0.20.0-vanilla/gee/Makefile.am libgee-0.20.0/gee/Makefile.am ---- libgee-0.20.0-vanilla/gee/Makefile.am 2018-01-07 20:42:52.829537627 -0500 -+++ libgee-0.20.0/gee/Makefile.am 2018-01-07 20:43:48.332722990 -0500 -@@ -146,29 +146,6 @@ - gee-0.8.vapi \ - $(NULL) - --if HAVE_INTROSPECTION --girdir = @INTROSPECTION_GIRDIR@ -- --dist_gir_DATA = \ -- Gee-0.8.gir \ -- $(NULL) -- --typelibdir = @INTROSPECTION_TYPELIBDIR@ --typelib_DATA = \ -- Gee-0.8.typelib \ -- $(NULL) -- --# Extract dlname from libfolks.la; see bug #658002. --# This is what g-ir-scanner does. --libgee_dlname = \ -- `$(SED) -nE "s/^dlname='([A-Za-z0-9.+-]+)'/\1/p" libgee-0.8.la` --INTROSPECTION_COMPILER_ARGS= \ -- -l $(libgee_dlname) --Gee-0.8.gir: libgee_0_8_la_vala.stamp --Gee-0.8.typelib: Gee-0.8.gir libgee-0.8.la -- @INTROSPECTION_COMPILER@ $(INTROSPECTION_COMPILER_ARGS) -o $@ $^ --endif -- - MOSTLYCLEANFILES = \ - $(libgee_0_8_la_VALASOURCES:.vala=.c) \ - libgee_0_8_la_vala.stamp \ -diff -u --recursive libgee-0.20.0-vanilla/gee/Makefile.in libgee-0.20.0/gee/Makefile.in ---- libgee-0.20.0-vanilla/gee/Makefile.in 2018-01-07 20:42:52.830537630 -0500 -+++ libgee-0.20.0/gee/Makefile.in 2018-01-07 20:44:18.433823516 -0500 -@@ -297,14 +297,6 @@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ --INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ --INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ --INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ --INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ --INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ --INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ --INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ --INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ - LCOV = @LCOV@ - LD = @LD@ - LDFLAGS = @LDFLAGS@ -@@ -544,25 +536,6 @@ - gee-0.8.vapi \ - $(NULL) - --@HAVE_INTROSPECTION_TRUE@girdir = @INTROSPECTION_GIRDIR@ --@HAVE_INTROSPECTION_TRUE@dist_gir_DATA = \ --@HAVE_INTROSPECTION_TRUE@ Gee-0.8.gir \ --@HAVE_INTROSPECTION_TRUE@ $(NULL) -- --@HAVE_INTROSPECTION_TRUE@typelibdir = @INTROSPECTION_TYPELIBDIR@ --@HAVE_INTROSPECTION_TRUE@typelib_DATA = \ --@HAVE_INTROSPECTION_TRUE@ Gee-0.8.typelib \ --@HAVE_INTROSPECTION_TRUE@ $(NULL) -- -- --# Extract dlname from libfolks.la; see bug #658002. --# This is what g-ir-scanner does. --@HAVE_INTROSPECTION_TRUE@libgee_dlname = \ --@HAVE_INTROSPECTION_TRUE@ `$(SED) -nE "s/^dlname='([A-Za-z0-9.+-]+)'/\1/p" libgee-0.8.la` -- --@HAVE_INTROSPECTION_TRUE@INTROSPECTION_COMPILER_ARGS = \ --@HAVE_INTROSPECTION_TRUE@ -l $(libgee_dlname) -- - MOSTLYCLEANFILES = \ - $(libgee_0_8_la_VALASOURCES:.vala=.c) \ - libgee_0_8_la_vala.stamp \ -@@ -1621,9 +1594,6 @@ - - $(libgee_0_8_la_VALASOURCES:.vala=.c): libgee_0_8_la_vala.stamp - gee-0.8.vapi gee-internals-0.8.vapi gee.h gee-internals.h: libgee_0_8_la_vala.stamp --@HAVE_INTROSPECTION_TRUE@Gee-0.8.gir: libgee_0_8_la_vala.stamp --@HAVE_INTROSPECTION_TRUE@Gee-0.8.typelib: Gee-0.8.gir libgee-0.8.la --@HAVE_INTROSPECTION_TRUE@ @INTROSPECTION_COMPILER@ $(INTROSPECTION_COMPILER_ARGS) -o $@ $^ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libs/libglog/Makefile b/libs/libglog/Makefile deleted file mode 100644 index 2ab3263a..00000000 --- a/libs/libglog/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=glog -PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/google/glog.git -PKG_SOURCE_VERSION:=v0.3.5 -PKG_MIRROR_HASH:=4677fba927e2d9cdcbc518c34c88465260d506d88072ea16217a8171310b9a1c - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_LICENSE_FILE:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/glog - SECTION:=libs - CATEGORY:=Libraries - TITLE:=C++ implementation of the Google logging module - DEPENDS:= +libstdcpp +libpthread - URL:=https://github.com/google/glog - MAINTAINER:=Amir Sabbaghi -endef - -define Package/glog/description - This repository contains a C++ implementation of the Google logging - module. Documentation for the implementation is in doc/. -endef - -TARGET_CXXFLAGS+=-std=c++11 -TARGET_LDFLAGS+=-lpthread - -define Build/Configure - $(call Build/Configure/Default,) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/glog - $(CP) $(PKG_INSTALL_DIR)/usr/include/glog/*.h $(1)/usr/include/glog - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libglog.{a,so*} $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libglog.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/glog/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libglog.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,glog)) diff --git a/libs/libgpg-error/Makefile b/libs/libgpg-error/Makefile index 8a18cd18..0e66164e 100644 --- a/libs/libgpg-error/Makefile +++ b/libs/libgpg-error/Makefile @@ -8,22 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libgpg-error -PKG_VERSION:=1.36 -PKG_RELEASE:=3 +PKG_VERSION:=1.37 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://mirrors.dotsrc.org/gcrypt/libgpg-error \ http://ring.ksc.gr.jp/archives/net/gnupg/libgpg-error \ https://www.gnupg.org/ftp/gcrypt/libgpg-error -PKG_HASH:=babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c +PKG_HASH:=b32d6ff72a73cf79797f7f2d039e95e9c6f92f0c1450215410840ab62aea9763 PKG_MAINTAINER:=W. Michael Petullo PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libgpg-error/patches/020-gawk5-support.patch b/libs/libgpg-error/patches/020-gawk5-support.patch deleted file mode 100644 index 17e88164..00000000 --- a/libs/libgpg-error/patches/020-gawk5-support.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Mon, 15 Apr 2019 15:10:44 +0900 -Subject: [PATCH] awk: Prepare for Gawk 5.0. - -* src/Makefile.am: Use pkg_namespace (instead of namespace). -* src/mkerrnos.awk: Likewise. -* lang/cl/mkerrcodes.awk: Don't escape # in regexp. -* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto. - --- - -In Gawk 5.0, regexp routines are replaced by Gnulib implementation, -which only allows escaping specific characters. - -GnuPG-bug-id: 4459 -Reported-by: Marius Schamschula -Signed-off-by: NIIBE Yutaka ---- - lang/cl/mkerrcodes.awk | 2 +- - src/Makefile.am | 2 +- - src/mkerrcodes.awk | 2 +- - src/mkerrcodes1.awk | 2 +- - src/mkerrcodes2.awk | 2 +- - src/mkerrnos.awk | 2 +- - src/mkstrtable.awk | 10 +++++----- - 7 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk -index ae29043..9a1fc18 100644 ---- a/lang/cl/mkerrcodes.awk -+++ b/lang/cl/mkerrcodes.awk -@@ -122,7 +122,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/Makefile.am b/src/Makefile.am -index ce1b882..f2590cb 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile - - errnos-sym.h: Makefile mkstrtable.awk errnos.in - $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ -- -v prefix=GPG_ERR_ -v namespace=errnos_ \ -+ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \ - $(srcdir)/errnos.in >$@ - - -diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk -index 46d436c..e9c857c 100644 ---- a/src/mkerrcodes.awk -+++ b/src/mkerrcodes.awk -@@ -85,7 +85,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk -index a771a73..4578e29 100644 ---- a/src/mkerrcodes1.awk -+++ b/src/mkerrcodes1.awk -@@ -81,7 +81,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk -index ea58503..188f7a4 100644 ---- a/src/mkerrcodes2.awk -+++ b/src/mkerrcodes2.awk -@@ -91,7 +91,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk -index f79df66..15b1aad 100644 ---- a/src/mkerrnos.awk -+++ b/src/mkerrnos.awk -@@ -83,7 +83,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk -index c9de9c1..285e45f 100644 ---- a/src/mkstrtable.awk -+++ b/src/mkstrtable.awk -@@ -77,7 +77,7 @@ - # - # The variable prefix can be used to prepend a string to each message. - # --# The variable namespace can be used to prepend a string to each -+# The variable pkg_namespace can be used to prepend a string to each - # variable and macro name. - - BEGIN { -@@ -102,7 +102,7 @@ header { - print "/* The purpose of this complex string table is to produce"; - print " optimal code with a minimum of relocations. */"; - print ""; -- print "static const char " namespace "msgstr[] = "; -+ print "static const char " pkg_namespace "msgstr[] = "; - header = 0; - } - else -@@ -110,7 +110,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -@@ -150,7 +150,7 @@ END { - else - print " gettext_noop (\"" last_msgstr "\");"; - print ""; -- print "static const int " namespace "msgidx[] ="; -+ print "static const int " pkg_namespace "msgidx[] ="; - print " {"; - for (i = 0; i < coded_msgs; i++) - print " " pos[i] ","; -@@ -158,7 +158,7 @@ END { - print " };"; - print ""; - print "static GPG_ERR_INLINE int"; -- print namespace "msgidxof (int code)"; -+ print pkg_namespace "msgidxof (int code)"; - print "{"; - print " return (0 ? 0"; - --- -2.21.0 - diff --git a/libs/libgphoto2/Makefile b/libs/libgphoto2/Makefile index 6f3ca92a..269be287 100644 --- a/libs/libgphoto2/Makefile +++ b/libs/libgphoto2/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2006-2012 OpenWrt.org -# Copyright (C) 2017 Leonardo Medici +# Copyright (C) 2017-2019 Leonardo Medici # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,20 +9,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libgphoto2 -PKG_VERSION:=2.5.17 +PKG_VERSION:=2.5.25 PKG_RELEASE:=1 PORT_VERSION:=0.12.0 -PKG_MAINTAINER:=Leonardo Medici PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/gphoto -PKG_HASH:=417464f0a313fa937e8a71cdf18a371cf01e750830195cd63ae31da0d092b555 -PKG_LICENSE:=LGPL-2.1 +PKG_HASH:=7c0e98f438c2b128186afe16ce7833a12fa36f87d01467e837b9d27e7a167f3a + +PKG_MAINTAINER:=Leonardo Medici +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_LIBTOOL_PATHS:=. libgphoto2_port PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -434,7 +436,7 @@ CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --disable-rpath \ - --with-camlibs="all" \ + --with-camlibs="all,outdated" \ --with-gdlib=no \ --with-libexif=no \ --with-libusb=no \ @@ -476,7 +478,7 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.{a,so*} $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgphoto2.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgphoto2{,_port}.pc $(1)/usr/lib/pkgconfig/ $(SED) 's,-I$$$${prefix}/include/gphoto2,,g' $(1)/usr/bin/gphoto2{,-port}-config $(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gphoto2{,-port}-config # remove annoying recursive symlink diff --git a/libs/libgphoto2/patches/001-automake-compat.patch b/libs/libgphoto2/patches/001-automake-compat.patch index 4614d7bd..7e1d89d8 100644 --- a/libs/libgphoto2/patches/001-automake-compat.patch +++ b/libs/libgphoto2/patches/001-automake-compat.patch @@ -1,7 +1,7 @@ -Index: libgphoto2-2.5.17/configure.ac +Index: libgphoto2-2.5.19/configure.ac =================================================================== ---- libgphoto2-2.5.17.orig/configure.ac -+++ libgphoto2-2.5.17/configure.ac +--- libgphoto2-2.5.19.orig/configure.ac ++++ libgphoto2-2.5.19/configure.ac @@ -209,7 +209,6 @@ ALL_LINGUAS="cs da de es eu fr hu it ja GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}],[The gPhoto Team],[${MAIL_GPHOTO_TRANSLATION}]) AM_GNU_GETTEXT_VERSION([0.14.1]) @@ -10,10 +10,10 @@ Index: libgphoto2-2.5.17/configure.ac AM_ICONV() GP_GETTEXT_FLAGS() -Index: libgphoto2-2.5.17/libgphoto2_port/configure.ac +Index: libgphoto2-2.5.19/libgphoto2_port/configure.ac =================================================================== ---- libgphoto2-2.5.17.orig/libgphoto2_port/configure.ac -+++ libgphoto2-2.5.17/libgphoto2_port/configure.ac +--- libgphoto2-2.5.19.orig/libgphoto2_port/configure.ac ++++ libgphoto2-2.5.19/libgphoto2_port/configure.ac @@ -124,7 +124,6 @@ GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2 ALL_LINGUAS="cs da de es eu fi fr it ja nl pl pt_BR ru sk sr sv uk vi zh_CN zh_TW" AM_GNU_GETTEXT_VERSION([0.14.1]) diff --git a/libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch b/libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch index 944a4c30..80145f82 100644 --- a/libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch +++ b/libs/libgphoto2/patches/002-no-docs-examples-test-translations.patch @@ -1,7 +1,7 @@ -Index: libgphoto2-2.5.17/Makefile.am +Index: libgphoto2-2.5.19/Makefile.am =================================================================== ---- libgphoto2-2.5.17.orig/Makefile.am -+++ libgphoto2-2.5.17/Makefile.am +--- libgphoto2-2.5.19.orig/Makefile.am ++++ libgphoto2-2.5.19/Makefile.am @@ -8,7 +8,7 @@ bin_SCRIPTS = gphoto2-config EXTRA_DIST = HACKING MAINTAINERS TESTERS installcheck.mk @@ -11,10 +11,10 @@ Index: libgphoto2-2.5.17/Makefile.am EXTRA_DIST += libgphoto2.pc.in pkgconfig_DATA = libgphoto2.pc -Index: libgphoto2-2.5.17/Makefile.in +Index: libgphoto2-2.5.19/Makefile.in =================================================================== ---- libgphoto2-2.5.17.orig/Makefile.in -+++ libgphoto2-2.5.17/Makefile.in +--- libgphoto2-2.5.19.orig/Makefile.in ++++ libgphoto2-2.5.19/Makefile.in @@ -482,7 +482,7 @@ EXTRA_DIST = HACKING MAINTAINERS TESTERS INSTALL README.in README README.packaging @@ -24,10 +24,10 @@ Index: libgphoto2-2.5.17/Makefile.in pkgconfig_DATA = libgphoto2.pc noinst_DATA = libgphoto2-uninstalled.pc doc_DATA = AUTHORS COPYING NEWS ABOUT-NLS ChangeLog README \ -Index: libgphoto2-2.5.17/configure.ac +Index: libgphoto2-2.5.19/configure.ac =================================================================== ---- libgphoto2-2.5.17.orig/configure.ac -+++ libgphoto2-2.5.17/configure.ac +--- libgphoto2-2.5.19.orig/configure.ac ++++ libgphoto2-2.5.19/configure.ac @@ -635,20 +635,11 @@ gphoto-m4/Makefile libgphoto2/Makefile libgphoto2.pc @@ -49,10 +49,10 @@ Index: libgphoto2-2.5.17/configure.ac ],[ dnl This relies on this code being called for each of the above files dnl with ac_file set to the filename. -Index: libgphoto2-2.5.17/libgphoto2_port/Makefile.am +Index: libgphoto2-2.5.19/libgphoto2_port/Makefile.am =================================================================== ---- libgphoto2-2.5.17.orig/libgphoto2_port/Makefile.am -+++ libgphoto2-2.5.17/libgphoto2_port/Makefile.am +--- libgphoto2-2.5.19.orig/libgphoto2_port/Makefile.am ++++ libgphoto2-2.5.19/libgphoto2_port/Makefile.am @@ -25,7 +25,7 @@ udevscript_PROGRAMS = bin_SCRIPTS = gphoto2-port-config @@ -62,10 +62,10 @@ Index: libgphoto2-2.5.17/libgphoto2_port/Makefile.am ######################################################################## -Index: libgphoto2-2.5.17/libgphoto2_port/Makefile.in +Index: libgphoto2-2.5.19/libgphoto2_port/Makefile.in =================================================================== ---- libgphoto2-2.5.17.orig/libgphoto2_port/Makefile.in -+++ libgphoto2-2.5.17/libgphoto2_port/Makefile.in +--- libgphoto2-2.5.19.orig/libgphoto2_port/Makefile.in ++++ libgphoto2-2.5.19/libgphoto2_port/Makefile.in @@ -574,7 +574,7 @@ EXTRA_LTLIBRARIES = disk.la ptpip.la ser bin_SCRIPTS = gphoto2-port-config @@ -75,10 +75,10 @@ Index: libgphoto2-2.5.17/libgphoto2_port/Makefile.in ######################################################################## # All iolibs are defined as EXTRA_LTLIBRARIES. This requires that -Index: libgphoto2-2.5.17/libgphoto2_port/configure.ac +Index: libgphoto2-2.5.19/libgphoto2_port/configure.ac =================================================================== ---- libgphoto2-2.5.17.orig/libgphoto2_port/configure.ac -+++ libgphoto2-2.5.17/libgphoto2_port/configure.ac +--- libgphoto2-2.5.19.orig/libgphoto2_port/configure.ac ++++ libgphoto2-2.5.19/libgphoto2_port/configure.ac @@ -512,13 +512,10 @@ AC_SUBST([AM_LDFLAGS]) # --------------------------------------------------------------------------- AC_CONFIG_FILES([ diff --git a/libs/libgpiod/Makefile b/libs/libgpiod/Makefile index c12107f6..11bf13ae 100644 --- a/libs/libgpiod/Makefile +++ b/libs/libgpiod/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 Michael Heimpold +# Copyright (C) 2018-2019 Michael Heimpold # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,33 +8,43 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libgpiod -PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 +PKG_VERSION:=1.4.1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/libs/libgpiod/ -PKG_HASH:=972924195367f5fb045c023d65340c4b7dfc8764499516be446553865208dedc +PKG_HASH:=21ae8fd1f8dafc2eb2ba50e652390cf533d21351419a7426255895cb52e21b1c -PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Michael Heimpold PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PYTHON3_PKG_BUILD:=0 include $(INCLUDE_DIR)/package.mk +include ../../lang/python/python3-package.mk ifneq ($(CONFIG_PACKAGE_gpiod-tools),) CONFIGURE_ARGS += --enable-tools endif +ifneq ($(CONFIG_PACKAGE_python3-gpiod),) +CONFIGURE_ARGS += --enable-bindings-python +CONFIGURE_VARS += \ + PYTHON="$(STAGING_DIR_HOSTPKG)/bin/$(PYTHON3)" \ + PYTHON_CPPFLAGS="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --includes)" \ + PYTHON_LIBS="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --libs)" +endif + define Package/libgpiod SECTION:=libs CATEGORY:=Libraries URL:=https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git TITLE:=Library for interacting with Linux's GPIO character device - DEPENDS:=@GPIO_SUPPORT @(LINUX_4_9||LINUX_4_14) + DEPENDS:=@GPIO_SUPPORT endef define Package/libgpiod/description @@ -54,6 +64,19 @@ define Package/gpiod-tools/description (gpiod stands for GPIO device). endef +define Package/python3-gpiod + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python bindings for libgpiod + URL:=https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git + DEPENDS:=+python3-light +libgpiod +endef + +define Package/python3-gpiod/description + This package contains the Python bindings for libgpiod. +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/gpiod.h $(1)/usr/include/ @@ -67,7 +90,7 @@ endef define Package/libgpiod/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpiod.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpiod.so.* $(1)/usr/lib/ endef define Package/gpiod-tools/install @@ -75,5 +98,11 @@ define Package/gpiod-tools/install $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ endef +define Package/python3-gpiod/install + $(INSTALL_DIR) $(1)/$(PYTHON3_PKG_DIR) + $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/gpiod.so $(1)/$(PYTHON3_PKG_DIR) +endef + $(eval $(call BuildPackage,libgpiod)) $(eval $(call BuildPackage,gpiod-tools)) +$(eval $(call BuildPackage,python3-gpiod)) diff --git a/libs/libhttp-parser/Makefile b/libs/libhttp-parser/Makefile index 8743c379..4af400b0 100644 --- a/libs/libhttp-parser/Makefile +++ b/libs/libhttp-parser/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libhttp-parser -PKG_VERSION:=2.9.2 -PKG_RELEASE:=2 +PKG_VERSION:=2.9.4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/nodejs/http-parser/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=5199500e352584852c95c13423edc5f0cb329297c81dd69c3c8f52a75496da08 +PKG_HASH:=467b9e30fd0979ee301065e70f637d525c28193449e1b13fbcb1b1fab3ad224f PKG_BUILD_DIR:=$(BUILD_DIR)/http-parser-$(PKG_VERSION) PKG_MAINTAINER:=Ramanathan Sivagurunathan , Hirokazu MORIKAWA diff --git a/libs/libhttp-parser/patches/000-fix_darwin_error.patch b/libs/libhttp-parser/patches/000-fix_darwin_error.patch index 6937b5e5..98290e06 100644 --- a/libs/libhttp-parser/patches/000-fix_darwin_error.patch +++ b/libs/libhttp-parser/patches/000-fix_darwin_error.patch @@ -3,7 +3,7 @@ @@ -25,11 +25,7 @@ SOMAJOR = 2 SOMINOR = 9 - SOREV = 2 + SOREV = 4 -ifeq (darwin,$(PLATFORM)) -SOEXT ?= dylib -SONAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOEXT) @@ -36,8 +36,8 @@ + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h + $(INSTALL) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) - ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) - ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) + ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) install-strip: library - $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h @@ -46,6 +46,6 @@ + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h + $(INSTALL) -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) - ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) - ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) + ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) diff --git a/libs/libical/Makefile b/libs/libical/Makefile index 2d47f75a..b2a551c7 100644 --- a/libs/libical/Makefile +++ b/libs/libical/Makefile @@ -8,51 +8,40 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libical -PKG_VERSION:=1.0 +PKG_VERSION:=3.0.6 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=7c39b3448e4927a2de2775d853f52b3aaeb42400970a3db0b01a78987e6ec0b7 -PKG_SOURCE_URL:=@SF/freeassociation +PKG_HASH:=5c8a21c2b732ece4a33e5c862970b4f35a8548bbcda50de5695f6fc211ac4d97 +PKG_SOURCE_URL:=https://github.com/libical/libical/releases/download/v$(PKG_VERSION)/ -PKG_LICENSE:=LGPL-2.1 MPL-1.0 +PKG_MAINTAINER:=Jose Zapater +PKG_LICENSE:=LGPL-2.1-or-later MPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill -PKG_FIXUP:=libtool -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/libical SECTION:=libs CATEGORY:=Libraries - TITLE:=iCal (RFC 2445) library - URL:=http://www.nabber.org/projects/ical/ + TITLE:=An implementation of iCalendar protocols and data formats + URL:=http://libical.github.io/libical/ DEPENDS:=+libpthread endef define Package/libical/description - This package provides a a read/write library of classes for object oriented - languages (Initial goals of PHP and Python) that implement and enforce the iCal - standard (RFC 2445). + Libical is an Open Source implementation of the iCalendar protocols and protocol + data units. The iCalendar specification describes how calendar clients can + communicate with calendar servers so users can store their calendar data and + arrange meetings with other users. + Libical implements RFC2445, RFC2446 and some of RFC2447. endef -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --disable-cxx \ - --disable-java \ - --disable-python \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/{ical.h,libical} $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libical{,ss,vcal}.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libical.pc $(1)/usr/lib/pkgconfig/ -endef +CMAKE_OPTIONS += -DWITH_CXX_BINDINGS=false -DICAL_BUILD_DOCS=false -DICAL_GLIB=false define Package/libical/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/libs/libical/patches/001-disable-icu-and-bdb-support.patch b/libs/libical/patches/001-disable-icu-and-bdb-support.patch new file mode 100644 index 00000000..0f508763 --- /dev/null +++ b/libs/libical/patches/001-disable-icu-and-bdb-support.patch @@ -0,0 +1,81 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -170,43 +170,43 @@ endif() + # libicu is highly recommended for RSCALE support + # libicu can be found at http://www.icu-project.org + # RSCALE info at http://tools.ietf.org/html/rfc7529 +-find_package(ICU) +-set_package_properties(ICU PROPERTIES +- TYPE RECOMMENDED +- PURPOSE "For RSCALE (RFC7529) support" +-) +-add_feature_info( +- "RSCALE support (RFC7529)" +- ICU_FOUND +- "build in RSCALE support" +-) +-if(ICU_FOUND) +- set(REQUIRES_PRIVATE_ICU "Requires.private: icu-i18n") #for libical.pc +- set(HAVE_LIBICU 1) +- if(ICU_MAJOR_VERSION VERSION_GREATER 50) +- set(HAVE_ICU_DANGI TRUE) +- else() +- set(HAVE_ICU_DANGI FALSE) +- endif() +-endif() +-if(ICU_I18N_FOUND) +- set(HAVE_LIBICU_I18N 1) +-endif() ++# find_package(ICU) ++# set_package_properties(ICU PROPERTIES ++# TYPE RECOMMENDED ++# PURPOSE "For RSCALE (RFC7529) support" ++# ) ++# add_feature_info( ++# "RSCALE support (RFC7529)" ++# ICU_FOUND ++# "build in RSCALE support" ++# ) ++# if(ICU_FOUND) ++# set(REQUIRES_PRIVATE_ICU "Requires.private: icu-i18n") #for libical.pc ++# set(HAVE_LIBICU 1) ++# if(ICU_MAJOR_VERSION VERSION_GREATER 50) ++# set(HAVE_ICU_DANGI TRUE) ++# else() ++# set(HAVE_ICU_DANGI FALSE) ++# endif() ++# endif() ++# if(ICU_I18N_FOUND) ++# set(HAVE_LIBICU_I18N 1) ++# endif() + + # compile in Berkeley DB support +-find_package(BDB) +-set_package_properties(BDB PROPERTIES +- TYPE OPTIONAL +- PURPOSE "For Berkeley DB storage support" +-) +-add_feature_info( +- "Berkeley DB storage support" +- BDB_FOUND +- "build in support for Berkeley DB storage" +-) +-if(BDB_FOUND) +- set(HAVE_BDB True) +-endif() ++# find_package(BDB) ++# set_package_properties(BDB PROPERTIES ++# TYPE OPTIONAL ++# PURPOSE "For Berkeley DB storage support" ++# ) ++# add_feature_info( ++# "Berkeley DB storage support" ++# BDB_FOUND ++# "build in support for Berkeley DB storage" ++# ) ++# if(BDB_FOUND) ++# set(HAVE_BDB True) ++# endif() + + # MSVC specific definitions + if(WIN32) diff --git a/libs/libid3tag/Makefile b/libs/libid3tag/Makefile index 9c104965..5bac2575 100644 --- a/libs/libid3tag/Makefile +++ b/libs/libid3tag/Makefile @@ -18,6 +18,7 @@ PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=GPL-2 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:media-libs:libid3tag PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -41,6 +42,11 @@ TARGET_CFLAGS += $(FPIC) CONFIGURE_VARS += CC="$(TARGET_CC) $(TARGET_CFLAGS)" +define Build/Prepare + $(call Build/Prepare/Default) + $(SED) 's,@VERSION@,$(PKG_VERSION),g' $(PKG_BUILD_DIR)/id3tag.pc +endef + define Build/Configure $(call Build/Configure/Default, \ --enable-shared \ @@ -55,6 +61,8 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/id3tag.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_BUILD_DIR)/id3tag.pc $(1)/usr/lib/pkgconfig/ endef define Package/libid3tag/install diff --git a/libs/libid3tag/src/id3tag.pc b/libs/libid3tag/src/id3tag.pc new file mode 100644 index 00000000..d31f1dad --- /dev/null +++ b/libs/libid3tag/src/id3tag.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: id3tag +Description: ID3 tag reading library +Requires: +Version: @VERSION@ +Libs: -L${libdir} -lid3tag -lz +Cflags: -I${includedir} diff --git a/libs/libidn/Makefile b/libs/libidn/Makefile index 6425244f..ea32aab9 100644 --- a/libs/libidn/Makefile +++ b/libs/libidn/Makefile @@ -9,13 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libidn PKG_VERSION:=1.35 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Kevin Darbyshire-Bryant +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/libidn PKG_HASH:=f11af1005b46b7b15d057d7f107315a1ad46935c7fcdf243c16e46ec14f0fe1e -PKG_LICENSE:=GPL-2.0+ GPL-3.0+ LGPL-2.1+ LGPL-3.0+ Apache-2.0 +PKG_LICENSE:=GPL-2.0-or-later GPL-3.0-or-later LGPL-2.1-or-later LGPL-3.0-or-later Apache-2.0 PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv2 COPYING.LESSERv3 java/LICENSE-2.0.txt PKG_INSTALL:=1 diff --git a/libs/libidn2/Makefile b/libs/libidn2/Makefile index c023b529..84baf329 100644 --- a/libs/libidn2/Makefile +++ b/libs/libidn2/Makefile @@ -8,17 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libidn2 -PKG_VERSION:=2.0.4 +PKG_VERSION:=2.3.0 PKG_RELEASE:=1 -PKG_MAINTAINER:=Kevin Darbyshire-Bryant -PKG_LICENSE:=GPL-2.0-or-later LGPL-3.0-or-later -PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYING.LESSERv3 PKG_SOURCE_URL:=@GNU/libidn PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=644b6b03b285fb0ace02d241d59483d98bc462729d8bb3608d5cad5532f3d2f0 +PKG_HASH:=e1cb1db3d2e249a6a3eb6f0946777c2e892d5c5dc7bd91c74394fc3a01cab8b5 + +PKG_MAINTAINER:= +PKG_CPE_ID:=cpe:/a:libidn2_project:libidn2 PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -42,6 +43,8 @@ define Package/idn2 SUBMENU:=IP Addresses and Names TITLE:=GNU IDN2 (Internationalized Domain Name) tool DEPENDS:=+libidn2 + LICENSE:=GPL-2.0-or-later + LICENSE_FILES:=COPYINGv2 endef define Package/idn2/description @@ -57,6 +60,8 @@ define Package/libidn2 DEPENDS:=+libunistring $(ICONV_DEPENDS) $(INTL_DEPENDS) TITLE:=International domain name library (IDNA2008, Punycode and TR46) URL:=https://www.gnu.org/software/libidn/#libidn2 + LICENSE:=LGPL-3.0-or-later + LICENSE_FILES:=COPYING.LESSERv3 endef define Package/libidn2/description diff --git a/libs/libiio/Makefile b/libs/libiio/Makefile index 2c0048c9..09259be7 100644 --- a/libs/libiio/Makefile +++ b/libs/libiio/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libiio -PKG_VERSION:=0.14 -PKG_RELEASE:=2 +PKG_VERSION:=0.19 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/analogdevicesinc/libiio/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=12063db7a9366aa00bfd789db30afaddb29686bc29b3ce1e5d4adfe1c3b42527 +PKG_HASH:=81c414d5c47b715d9bc9275b9fabbfd9e9483e60c035f3001b5977932049595d PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING.txt @@ -52,6 +52,7 @@ define Package/libiio TITLE:=Library for interfacing with Linux IIO devices URL:=https://github.com/analogdevicesinc/libiio DEPENDS:=\ + +zlib \ +LIBIIO_USB_BACKEND:libusb-1.0 \ +LIBIIO_NETWORK_BACKEND:libavahi-client \ +LIBIIO_XML_BACKEND:libxml2 @@ -132,7 +133,7 @@ endef define Package/libiio/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiio.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiio.so.* $(1)/usr/lib/ endef define Package/iiod/install diff --git a/libs/libiio/patches/0001-Update-channel-type-and-modifier-lists.patch b/libs/libiio/patches/0001-Update-channel-type-and-modifier-lists.patch new file mode 100644 index 00000000..96630bea --- /dev/null +++ b/libs/libiio/patches/0001-Update-channel-type-and-modifier-lists.patch @@ -0,0 +1,80 @@ +From 98ba73179f6db323b68a8d59e90c2d7c39a16736 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0tetiar?= +Date: Tue, 3 Mar 2020 18:27:42 +0100 +Subject: [PATCH] Update channel type and modifier lists +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Update the channel type and modifier lists against Linux 5.4.22. + +Signed-off-by: Petr Štetiar +--- + channel.c | 10 ++++++++++ + iio.h | 10 ++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/channel.c b/channel.c +index 302592dfc764..407ce632fcc7 100644 +--- a/channel.c ++++ b/channel.c +@@ -56,6 +56,9 @@ static const char * const iio_chan_type_name_spec[] = { + [IIO_COUNT] = "count", + [IIO_INDEX] = "index", + [IIO_GRAVITY] = "gravity", ++ [IIO_POSITIONRELATIVE] = "positionrelative", ++ [IIO_PHASE] = "phase", ++ [IIO_MASSCONCENTRATION] = "massconcentration", + }; + + static const char * const modifier_names[] = { +@@ -79,6 +82,7 @@ static const char * const modifier_names[] = { + [IIO_MOD_LIGHT_GREEN] = "green", + [IIO_MOD_LIGHT_BLUE] = "blue", + [IIO_MOD_LIGHT_UV] = "uv", ++ [IIO_MOD_LIGHT_DUV] = "duv", + [IIO_MOD_QUATERNION] = "quaternion", + [IIO_MOD_TEMP_AMBIENT] = "ambient", + [IIO_MOD_TEMP_OBJECT] = "object", +@@ -94,7 +98,13 @@ static const char * const modifier_names[] = { + [IIO_MOD_I] = "i", + [IIO_MOD_Q] = "q", + [IIO_MOD_CO2] = "co2", ++ [IIO_MOD_ETHANOL] = "ethanol", ++ [IIO_MOD_H2] = "h2", + [IIO_MOD_VOC] = "voc", ++ [IIO_MOD_PM1] = "pm1", ++ [IIO_MOD_PM2P5] = "pm2p5", ++ [IIO_MOD_PM4] = "pm4", ++ [IIO_MOD_PM10] = "pm10", + }; + + /* +diff --git a/iio.h b/iio.h +index 5c11fcefe5c2..5afc28ea0197 100644 +--- a/iio.h ++++ b/iio.h +@@ -125,6 +125,9 @@ enum iio_chan_type { + IIO_COUNT, + IIO_INDEX, + IIO_GRAVITY, ++ IIO_POSITIONRELATIVE, ++ IIO_PHASE, ++ IIO_MASSCONCENTRATION, + IIO_CHAN_TYPE_UNKNOWN = INT_MAX + }; + +@@ -173,6 +176,13 @@ enum iio_modifier { + IIO_MOD_CO2, + IIO_MOD_VOC, + IIO_MOD_LIGHT_UV, ++ IIO_MOD_LIGHT_DUV, ++ IIO_MOD_PM1, ++ IIO_MOD_PM2P5, ++ IIO_MOD_PM4, ++ IIO_MOD_PM10, ++ IIO_MOD_ETHANOL, ++ IIO_MOD_H2, + }; + + /* ---------------------------------------------------------------------------*/ diff --git a/libs/libimobiledevice/Makefile b/libs/libimobiledevice/Makefile index b0d49838..84a56cce 100644 --- a/libs/libimobiledevice/Makefile +++ b/libs/libimobiledevice/Makefile @@ -8,30 +8,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libimobiledevice -PKG_VERSION:=1.2.1 -PKG_RELEASE:=2 +PKG_VERSION:=1.3.0 +PKG_RELEASE:=1 -PKG_MAINTAINER:=Lukasz Baj -PKG_LICENSE:=LGPL-2.1+ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://www.libimobiledevice.org/downloads +PKG_HASH:=53f2640c6365cd9f302a6248f531822dc94a6cced3f17128d4479a77bd75b0f6 + +PKG_MAINTAINER:=Rosen Penev +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING.LESSER -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=13bf235cac2201747de11652cf14fe2714ca0718 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=4e8892b27f20216f86d69b36ad2229fca87cdf0a10f8d3e145d01841a492562a - -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../../lang/python/python-package.mk define Package/libimobiledevice/Default TITLE:=A library that talks to Apple devices. - URL:=http://www.libimobiledevice.org/ + URL:=https://www.libimobiledevice.org/ + SUBMENU:=libimobiledevice endef define Package/libimobiledevice/Default/description @@ -43,7 +39,9 @@ define Package/libimobiledevice $(call Package/libimobiledevice/Default) SECTION:=libs CATEGORY:=Libraries - DEPENDS:=$(ICONV_DEPENDS) +libplist +libusbmuxd +libopenssl + DEPENDS:=+libplist +libusbmuxd +libopenssl + LICENSE:=LGPL-2.1-or-later + LICENSE_FILES:=COPYING.LESSER endef define Package/libimobiledevice/description @@ -55,6 +53,8 @@ define Package/libimobiledevice-utils SECTION:=utils CATEGORY:=Utilities DEPENDS:=+libimobiledevice + LICENSE:=GPL-2.0-or-later + ICENSE_FILES:=COPYING endef define Package/libimobiledevice-utils/description @@ -62,30 +62,22 @@ define Package/libimobiledevice-utils/description This package contains the libimobiledevice utilities. endef -CONFIGURE_VARS += \ - libusbmuxd_CFLAGS="-I$(STAGING_DIR)/usr/include" \ - libusbmuxd_LIBS="-L$(STAGING_DIR)/usr/lib -lusbmuxd" \ - openssl_CFLAGS=" " \ - openssl_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" - CONFIGURE_ARGS += \ - --without-cython \ - --disable-largefile - -TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + --disable-static \ + --without-cython define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libimobiledevice $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimobiledevice.{a,la,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimobiledevice-1.0.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libimobiledevice-*.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libimobiledevice-1.0.pc $(1)/usr/lib/pkgconfig/ endef define Package/libimobiledevice/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimobiledevice.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimobiledevice-1.0.so.* $(1)/usr/lib/ endef define Package/libimobiledevice-utils/install diff --git a/libs/libimobiledevice/patches/020-config.patch b/libs/libimobiledevice/patches/020-config.patch new file mode 100644 index 00000000..da65a725 --- /dev/null +++ b/libs/libimobiledevice/patches/020-config.patch @@ -0,0 +1,11 @@ +--- a/common/userpref.c ++++ b/common/userpref.c +@@ -159,7 +159,7 @@ const char *userpref_get_config_dir() + #ifdef __APPLE__ + base_config_dir = strdup("/var/db"); + #else +- base_config_dir = strdup("/var/lib"); ++ base_config_dir = strdup("/etc"); + #endif + #endif + __config_dir = string_concat(base_config_dir, DIR_SEP_S, USERPREF_CONFIG_DIR, NULL); diff --git a/libs/libinput/Makefile b/libs/libinput/Makefile index a90d13c5..c5e5e1d2 100644 --- a/libs/libinput/Makefile +++ b/libs/libinput/Makefile @@ -5,25 +5,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libinput -PKG_VERSION:=1.7.3 +PKG_VERSION:=1.15.5 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.freedesktop.org/software/libinput/ -PKG_HASH:=096d612d2711f0caa2de544976ff3729e6233511ab373808644cc2dd5affcb1d +PKG_HASH:=a90efc8f423c3094f2f9f372fb92381b2f3aad62e8b5882a8abe333aa8249c97 +PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Daniel Golle -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=meson/host include $(INCLUDE_DIR)/package.mk - -TARGET_CFLAGS+= -std=gnu99 - -CONFIGURE_ARGS += --disable-libwacom --disable-tests --disable-documentation +include ../../devel/meson/meson.mk define Package/libinput SECTION:=libs @@ -41,11 +38,21 @@ define Package/libinput/description need to provide the common set of functionality that users expect. endef +MESON_ARGS += \ + -Depoll-dir=no \ + -Dlibwacom=false \ + -Ddebug-gui=false \ + -Dtests=false \ + -Dinstall-tests=false \ + -Ddocumentation=false \ + -Dcoverity=false \ + -Dzshcompletiondir=no + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ endef diff --git a/libs/libinput/patches/001-no-locale.patch b/libs/libinput/patches/001-no-locale.patch deleted file mode 100644 index adf9abeb..00000000 --- a/libs/libinput/patches/001-no-locale.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/src/libinput-util.c -+++ b/src/libinput-util.c -@@ -31,7 +31,6 @@ - #include "config.h" - - #include --#include - #include - #include - #include ---- a/src/libinput-util.h -+++ b/src/libinput-util.h -@@ -30,7 +30,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -448,16 +447,8 @@ safe_atod(const char *str, double *val) - { - char *endptr; - double v; -- locale_t c_locale; - -- /* Create a "C" locale to force strtod to use '.' as separator */ -- c_locale = newlocale(LC_NUMERIC_MASK, "C", (locale_t)0); -- if (c_locale == (locale_t)0) -- return false; -- -- errno = 0; -- v = strtod_l(str, &endptr, c_locale); -- freelocale(c_locale); -+ v = strtod(str, &endptr); - if (errno > 0) - return false; - if (str == endptr) diff --git a/libs/libinput/patches/002-static_assert.patch b/libs/libinput/patches/002-static_assert.patch deleted file mode 100644 index e5b12448..00000000 --- a/libs/libinput/patches/002-static_assert.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/evdev-tablet.c -+++ b/src/evdev-tablet.c -@@ -1204,9 +1204,11 @@ static void - tablet_mark_all_axes_changed(struct tablet_dispatch *tablet, - struct libinput_tablet_tool *tool) - { -+#if 0 - static_assert(sizeof(tablet->changed_axes) == - sizeof(tool->axis_caps), - "Mismatching array sizes"); -+#endif - - memcpy(tablet->changed_axes, - tool->axis_caps, diff --git a/libs/libirecovery/Makefile b/libs/libirecovery/Makefile new file mode 100644 index 00000000..8d82ef00 --- /dev/null +++ b/libs/libirecovery/Makefile @@ -0,0 +1,84 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libirecovery +PKG_VERSION:=1.0.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://www.libimobiledevice.org/downloads +PKG_HASH:=cda0aba10a5b6fc2e1d83946b009e3e64d0be36912a986e35ad6d34b504ad9b4 + +PKG_MAINTAINER:=Rosen Penev +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libirecovery/Default + URL:=https://github.com/libimobiledevice/libirecovery + SUBMENU:=libimobiledevice +endef + +define Package/libirecovery/Default/description + libirecovery is a cross-platform library which implements communication + to iBoot/iBSS found on Apple's iOS devices via USB. +endef + +define Package/libirecovery + $(call Package/libirecovery/Default) + TITLE:=A library that talks to Apple iBoot/iBSS + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libreadline +libusb-1.0 +endef + +define Package/libirecovery/description + $(call Package/libirecovery/Default/description) +endef + +define Package/irecovery + $(call Package/libirecovery/Default) + TITLE:=A utility that talks to Apple iBoot/iBSS + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libirecovery +endef + +define Package/irecovery/description + $(call Package/libirecovery/Default/description) + This package contains the libirecovery utilities. +endef + +CONFIGURE_ARGS += \ + --disable-static \ + --without-udev + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/libirecovery.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libirecovery-1.0.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libirecovery-1.0.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libirecovery/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libirecovery-1.0.so.* $(1)/usr/lib/ +endef + +define Package/irecovery/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/irecovery $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libirecovery)) +$(eval $(call BuildPackage,irecovery)) diff --git a/libs/libjpeg/Makefile b/libs/libjpeg/Makefile index 4c73d4c1..cc3c919e 100644 --- a/libs/libjpeg/Makefile +++ b/libs/libjpeg/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=jpeg -PKG_VERSION:=9a -PKG_RELEASE:=1 +PKG_VERSION:=9c +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.ijg.org/files -PKG_HASH:=3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7 +PKG_HASH:=650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=IJG @@ -74,6 +74,8 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libjpeg.pc $(1)/usr/lib/pkgconfig/ endef define Package/libjpeg/install diff --git a/libs/liblo/Makefile b/libs/liblo/Makefile index 95a08393..20d55369 100644 --- a/libs/liblo/Makefile +++ b/libs/liblo/Makefile @@ -8,20 +8,24 @@ include $(TOPDIR)/rules.mk PKG_NAME:=liblo -PKG_VERSION:=0.28 -PKG_RELEASE:=1 +PKG_VERSION:=0.31 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/liblo -PKG_HASH:=da94a9b67b93625354dd89ff7fe31e5297fc9400b6eaf7378c82ee1caf7db909 +PKG_HASH:=2b4f446e1220dcd624ecd8405248b08b7601e9a0d87a0b94730c2907dbccc750 -PKG_LICENSE:=LGPL-2.1+ +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 +CMAKE_SOURCE_SUBDIR:=cmake +PKG_BUILD_PARALLEL:=1 +PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_liblo-utils include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/liblo/Default TITLE:=Lightweight Open Sound Control (OSC) @@ -44,17 +48,13 @@ $(call Package/liblo/Default) DEPENDS:= +liblo endef -TARGET_CFLAGS += \ - -Wno-error=maybe-uninitialized \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/lo $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblo.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/liblo.pc $(1)/usr/lib/pkgconfig/ -endef +CMAKE_OPTIONS += \ + -DWITH_TOOLS=O$(if $(CONFIG_PACKAGE_liblo-utils),N,FF) \ + -DWITH_TESTS=OFF \ + -DWITH_EXAMPLES=OFF \ + -DWITH_CPP_TESTS=OFF \ + -DWITH_STATIC=OFF \ + -DTHREADING=ON define Package/liblo/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/libs/liblo/patches/001-fix-musl-include.patch b/libs/liblo/patches/001-fix-musl-include.patch deleted file mode 100644 index f974bd3d..00000000 --- a/libs/liblo/patches/001-fix-musl-include.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/server.c -+++ b/src/server.c -@@ -48,7 +48,7 @@ - #include - #include - #ifdef HAVE_POLL --#include -+#include - #endif - #include - #include diff --git a/libs/liblo/patches/010-index.patch b/libs/liblo/patches/010-index.patch new file mode 100644 index 00000000..f3f86609 --- /dev/null +++ b/libs/liblo/patches/010-index.patch @@ -0,0 +1,15 @@ +--- a/src/server.c ++++ b/src/server.c +@@ -2013,11 +2013,8 @@ static void dispatch_method(lo_server s, const char *path, + + tmp = (char*) malloc(strlen(it->path + len) + 1); + strcpy(tmp, it->path + len); +-#if defined(WIN32) || defined(_MSC_VER) + sec = strchr(tmp, '/'); +-#else +- sec = index(tmp, '/'); +-#endif ++ + if (sec) + *sec = '\0'; + slend = sl; diff --git a/libs/liblo/patches/020-usleep.patch b/libs/liblo/patches/020-usleep.patch new file mode 100644 index 00000000..b0bf17f7 --- /dev/null +++ b/libs/liblo/patches/020-usleep.patch @@ -0,0 +1,20 @@ +--- a/src/tools/oscsendfile.c ++++ b/src/tools/oscsendfile.c +@@ -354,7 +354,7 @@ int send_file(lo_address target, double speed) { + lo_timetag_now(&tt_now); + double wait_time = timetag_diff(*tt_last, tt_now); + if (wait_time > 0.) { +- usleep(wait_time * 1000000); ++ sleep(wait_time); + } + if (b) { + ret = lo_send_bundle(target, b); +@@ -376,7 +376,7 @@ int send_file(lo_address target, double speed) { + lo_timetag_now(&tt_now); + double wait_time = timetag_diff(*tt_last, tt_now); + if (wait_time > 0.) { +- usleep(wait_time * 1000000); ++ sleep(wait_time); + } + lo_send_bundle(target, b); + } diff --git a/libs/liblz4/Config.in b/libs/liblz4/Config.in new file mode 100644 index 00000000..d66fb7dc --- /dev/null +++ b/libs/liblz4/Config.in @@ -0,0 +1,7 @@ +config LZ4_OPTIMIZE_SPEED + bool "Optimize for speed" + depends on PACKAGE_liblz4 + help + This enables additional optimization and + increases performance considerably at + the expense of binary size. diff --git a/libs/liblz4/Makefile b/libs/liblz4/Makefile index 9112a1bc..6f338382 100644 --- a/libs/liblz4/Makefile +++ b/libs/liblz4/Makefile @@ -7,30 +7,38 @@ include $(TOPDIR)/rules.mk -# Although liblz4 exports a major.minor.patch version, it isn't always -# incremented for new releases. Check the NEWS file and instead use a -# release tag when appropriate. (eg: PKG_VERSION:=r131) PKG_NAME:=liblz4 -PKG_VERSION:=v1.7.5 +PKG_VERSION:=1.9.2 PKG_RELEASE:=1 -PKG_LICENSE:=BSD-2-Clause +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/lz4/lz4/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc +PKG_BUILD_DIR:=$(BUILD_DIR)/lz4-$(PKG_VERSION) + PKG_MAINTAINER:=Darik Horn -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=afb362b970816e06dac4997d26dd7d2cdb83168510228d174d25b1044b271e18 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/lz4/lz4.git -PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 +CMAKE_SOURCE_SUBDIR:=contrib/cmake_unofficial include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/lz4/Default + SUBMENU:=Compression + URL:=https://www.lz4.org/ +endef define Package/liblz4 - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Extremely fast compression - URL:=http://www.lz4.org/ +$(call Package/lz4/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Extremely fast compression + LICENSE:=BSD-2-Clause + LICENSE_FILES:=LICENSE lib/LICENSE + ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION))) + MENU:=1 endef define Package/liblz4/description @@ -38,23 +46,45 @@ define Package/liblz4/description even faster decoder. This package provides the liblz4 shared library. endef -TARGET_CFLAGS += $(FPIC) - -define Build/Compile - $(MAKE) -C "$(PKG_BUILD_DIR)/lib" $(MAKE_INSTALL_FLAGS) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - PREFIX="$(CONFIGURE_PREFIX)" \ - install +define Package/liblz4/config + source "$(SOURCE)/Config.in" endef -define Build/InstallDev - $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +define Package/lz4 +$(call Package/lz4/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Extremely fast compression + LICENSE:=GPL-2.0-or-later + LICENSE_FILES:=LICENSE programs/COPYING + DEPENDS:=+liblz4 endef +define Package/lz4/description + LZ4 - Fast real-time compression algorithm. + This package provides the lz4 binaries. +endef + +CMAKE_OPTIONS += \ + -DCMAKE_INSTALL_MANDIR=/dev/null \ + -DLZ4_BUILD_LEGACY_LZ4C=OFF + +ifeq ($(CONFIG_LZ4_OPTIMIZE_SPEED),y) + TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3 +endif + +TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections + define Package/liblz4/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so.$(ABI_VERSION)* $(1)/usr/lib/ +endef + +define Package/lz4/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/{lz4,lz4cat,unlz4} $(1)/usr/bin/ endef $(eval $(call BuildPackage,liblz4)) +$(eval $(call BuildPackage,lz4)) diff --git a/libs/liblz4/patches/010-utime.patch b/libs/liblz4/patches/010-utime.patch new file mode 100644 index 00000000..6c21c332 --- /dev/null +++ b/libs/liblz4/patches/010-utime.patch @@ -0,0 +1,72 @@ +From e9d5a3cbbb47eb0f785a409d836225b592b250f3 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Tue, 30 Jul 2019 22:13:51 -0700 +Subject: [PATCH] util.h: Remove deprecated utime for non-Windows + +utime was deprecated in POSIX 2008. +--- + programs/platform.h | 2 +- + programs/util.h | 17 ++++++++++++++++- + 2 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/programs/platform.h b/programs/platform.h +index c0b38402..7e2cb58f 100644 +--- a/programs/platform.h ++++ b/programs/platform.h +@@ -86,7 +86,7 @@ extern "C" { + # else + # if defined(__linux__) || defined(__linux) + # ifndef _POSIX_C_SOURCE +-# define _POSIX_C_SOURCE 200112L /* use feature test macro */ ++# define _POSIX_C_SOURCE 200809L /* use feature test macro */ + # endif + # endif + # include /* declares _POSIX_VERSION */ +diff --git a/programs/util.h b/programs/util.h +index 1dd515ce..112dddbf 100644 +--- a/programs/util.h ++++ b/programs/util.h +@@ -37,12 +37,17 @@ extern "C" { + #include + #include /* stat, utime */ + #include /* stat */ +-#if defined(_MSC_VER) ++#if defined(_WIN32) + # include /* utime */ + # include /* _chmod */ + #else + # include /* chown, stat */ ++#if PLATFORM_POSIX_VERSION < 200809L + # include /* utime */ ++#else ++# include /* AT_FDCWD */ ++# include /* for utimensat */ ++#endif + #endif + #include /* time */ + #include /* INT_MAX */ +@@ -287,14 +292,24 @@ UTIL_STATIC int UTIL_isRegFile(const char* infilename); + UTIL_STATIC int UTIL_setFileStat(const char *filename, stat_t *statbuf) + { + int res = 0; ++#if defined(_WIN32) || (PLATFORM_POSIX_VERSION < 200809L) + struct utimbuf timebuf; ++#else ++ struct timespec timebuf[2] = {}; ++#endif + + if (!UTIL_isRegFile(filename)) + return -1; + ++#if defined(_WIN32) || (PLATFORM_POSIX_VERSION < 200809L) + timebuf.actime = time(NULL); + timebuf.modtime = statbuf->st_mtime; + res += utime(filename, &timebuf); /* set access and modification times */ ++#else ++ timebuf[0].tv_nsec = UTIME_NOW; ++ timebuf[1].tv_sec = statbuf->st_mtime; ++ res += utimensat(AT_FDCWD, filename, timebuf, 0); /* set access and modification times */ ++#endif + + #if !defined(_WIN32) + res += chown(filename, statbuf->st_uid, statbuf->st_gid); /* Copy ownership */ diff --git a/libs/libmad/Makefile b/libs/libmad/Makefile index 4ae75256..59e24a3c 100644 --- a/libs/libmad/Makefile +++ b/libs/libmad/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmad PKG_VERSION:=0.15.1b -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/mad \ @@ -19,6 +19,7 @@ PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:underbit:mad_libmad PKG_FIXUP:=autoreconf diff --git a/libs/libmad/patches/101-CVE-2017-8374-length-check.patch b/libs/libmad/patches/101-CVE-2017-8374-length-check.patch new file mode 100644 index 00000000..80e48469 --- /dev/null +++ b/libs/libmad/patches/101-CVE-2017-8374-length-check.patch @@ -0,0 +1,817 @@ +From: Kurt Roeckx +Date: Sun, 28 Jan 2018 19:26:36 +0100 +Subject: Check the size before reading with mad_bit_read + +There are various cases where it attemps to read past the end of the buffer +using mad_bit_read(). Most functions didn't even know the size of the buffer +they were reading from. + +Index: libmad-0.15.1b/bit.c +=================================================================== +--- libmad-0.15.1b.orig/bit.c ++++ libmad-0.15.1b/bit.c +@@ -138,6 +138,9 @@ unsigned long mad_bit_read(struct mad_bi + { + register unsigned long value; + ++ if (len == 0) ++ return 0; ++ + if (bitptr->left == CHAR_BIT) + bitptr->cache = *bitptr->byte; + +Index: libmad-0.15.1b/frame.c +=================================================================== +--- libmad-0.15.1b.orig/frame.c ++++ libmad-0.15.1b/frame.c +@@ -120,11 +120,18 @@ static + int decode_header(struct mad_header *header, struct mad_stream *stream) + { + unsigned int index; ++ struct mad_bitptr bufend_ptr; + + header->flags = 0; + header->private_bits = 0; + ++ mad_bit_init(&bufend_ptr, stream->bufend); ++ + /* header() */ ++ if (mad_bit_length(&stream->ptr, &bufend_ptr) < 32) { ++ stream->error = MAD_ERROR_BUFLEN; ++ return -1; ++ } + + /* syncword */ + mad_bit_skip(&stream->ptr, 11); +@@ -225,8 +232,13 @@ int decode_header(struct mad_header *hea + /* error_check() */ + + /* crc_check */ +- if (header->flags & MAD_FLAG_PROTECTION) ++ if (header->flags & MAD_FLAG_PROTECTION) { ++ if (mad_bit_length(&stream->ptr, &bufend_ptr) < 16) { ++ stream->error = MAD_ERROR_BUFLEN; ++ return -1; ++ } + header->crc_target = mad_bit_read(&stream->ptr, 16); ++ } + + return 0; + } +@@ -338,7 +350,7 @@ int mad_header_decode(struct mad_header + stream->error = MAD_ERROR_BUFLEN; + goto fail; + } +- else if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { ++ else if ((end - ptr >= 2) && !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { + /* mark point where frame sync word was expected */ + stream->this_frame = ptr; + stream->next_frame = ptr + 1; +@@ -361,6 +373,8 @@ int mad_header_decode(struct mad_header + ptr = mad_bit_nextbyte(&stream->ptr); + } + ++ stream->error = MAD_ERROR_NONE; ++ + /* begin processing */ + stream->this_frame = ptr; + stream->next_frame = ptr + 1; /* possibly bogus sync word */ +@@ -413,7 +427,7 @@ int mad_header_decode(struct mad_header + /* check that a valid frame header follows this frame */ + + ptr = stream->next_frame; +- if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { ++ if ((end - ptr >= 2) && !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { + ptr = stream->next_frame = stream->this_frame + 1; + goto sync; + } +Index: libmad-0.15.1b/layer12.c +=================================================================== +--- libmad-0.15.1b.orig/layer12.c ++++ libmad-0.15.1b/layer12.c +@@ -72,10 +72,18 @@ mad_fixed_t const linear_table[14] = { + * DESCRIPTION: decode one requantized Layer I sample from a bitstream + */ + static +-mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb) ++mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb, struct mad_stream *stream) + { + mad_fixed_t sample; ++ struct mad_bitptr frameend_ptr; + ++ mad_bit_init(&frameend_ptr, stream->next_frame); ++ ++ if (mad_bit_length(ptr, &frameend_ptr) < nb) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return 0; ++ } + sample = mad_bit_read(ptr, nb); + + /* invert most significant bit, extend sign, then scale to fixed format */ +@@ -106,6 +114,10 @@ int mad_layer_I(struct mad_stream *strea + struct mad_header *header = &frame->header; + unsigned int nch, bound, ch, s, sb, nb; + unsigned char allocation[2][32], scalefactor[2][32]; ++ struct mad_bitptr bufend_ptr, frameend_ptr; ++ ++ mad_bit_init(&bufend_ptr, stream->bufend); ++ mad_bit_init(&frameend_ptr, stream->next_frame); + + nch = MAD_NCHANNELS(header); + +@@ -118,6 +130,11 @@ int mad_layer_I(struct mad_stream *strea + /* check CRC word */ + + if (header->flags & MAD_FLAG_PROTECTION) { ++ if (mad_bit_length(&stream->ptr, &bufend_ptr) ++ < 4 * (bound * nch + (32 - bound))) { ++ stream->error = MAD_ERROR_BADCRC; ++ return -1; ++ } + header->crc_check = + mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)), + header->crc_check); +@@ -133,6 +150,11 @@ int mad_layer_I(struct mad_stream *strea + + for (sb = 0; sb < bound; ++sb) { + for (ch = 0; ch < nch; ++ch) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 4) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + nb = mad_bit_read(&stream->ptr, 4); + + if (nb == 15) { +@@ -145,6 +167,11 @@ int mad_layer_I(struct mad_stream *strea + } + + for (sb = bound; sb < 32; ++sb) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 4) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + nb = mad_bit_read(&stream->ptr, 4); + + if (nb == 15) { +@@ -161,6 +188,11 @@ int mad_layer_I(struct mad_stream *strea + for (sb = 0; sb < 32; ++sb) { + for (ch = 0; ch < nch; ++ch) { + if (allocation[ch][sb]) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6); + + # if defined(OPT_STRICT) +@@ -185,8 +217,10 @@ int mad_layer_I(struct mad_stream *strea + for (ch = 0; ch < nch; ++ch) { + nb = allocation[ch][sb]; + frame->sbsample[ch][s][sb] = nb ? +- mad_f_mul(I_sample(&stream->ptr, nb), ++ mad_f_mul(I_sample(&stream->ptr, nb, stream), + sf_table[scalefactor[ch][sb]]) : 0; ++ if (stream->error != 0) ++ return -1; + } + } + +@@ -194,7 +228,14 @@ int mad_layer_I(struct mad_stream *strea + if ((nb = allocation[0][sb])) { + mad_fixed_t sample; + +- sample = I_sample(&stream->ptr, nb); ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nb) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } ++ sample = I_sample(&stream->ptr, nb, stream); ++ if (stream->error != 0) ++ return -1; + + for (ch = 0; ch < nch; ++ch) { + frame->sbsample[ch][s][sb] = +@@ -280,13 +321,21 @@ struct quantclass { + static + void II_samples(struct mad_bitptr *ptr, + struct quantclass const *quantclass, +- mad_fixed_t output[3]) ++ mad_fixed_t output[3], struct mad_stream *stream) + { + unsigned int nb, s, sample[3]; ++ struct mad_bitptr frameend_ptr; ++ ++ mad_bit_init(&frameend_ptr, stream->next_frame); + + if ((nb = quantclass->group)) { + unsigned int c, nlevels; + ++ if (mad_bit_length(ptr, &frameend_ptr) < quantclass->bits) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return; ++ } + /* degrouping */ + c = mad_bit_read(ptr, quantclass->bits); + nlevels = quantclass->nlevels; +@@ -299,8 +348,14 @@ void II_samples(struct mad_bitptr *ptr, + else { + nb = quantclass->bits; + +- for (s = 0; s < 3; ++s) ++ for (s = 0; s < 3; ++s) { ++ if (mad_bit_length(ptr, &frameend_ptr) < nb) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return; ++ } + sample[s] = mad_bit_read(ptr, nb); ++ } + } + + for (s = 0; s < 3; ++s) { +@@ -336,6 +391,9 @@ int mad_layer_II(struct mad_stream *stre + unsigned char const *offsets; + unsigned char allocation[2][32], scfsi[2][32], scalefactor[2][32][3]; + mad_fixed_t samples[3]; ++ struct mad_bitptr frameend_ptr; ++ ++ mad_bit_init(&frameend_ptr, stream->next_frame); + + nch = MAD_NCHANNELS(header); + +@@ -402,13 +460,24 @@ int mad_layer_II(struct mad_stream *stre + for (sb = 0; sb < bound; ++sb) { + nbal = bitalloc_table[offsets[sb]].nbal; + +- for (ch = 0; ch < nch; ++ch) ++ for (ch = 0; ch < nch; ++ch) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nbal) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + allocation[ch][sb] = mad_bit_read(&stream->ptr, nbal); ++ } + } + + for (sb = bound; sb < sblimit; ++sb) { + nbal = bitalloc_table[offsets[sb]].nbal; + ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nbal) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + allocation[0][sb] = + allocation[1][sb] = mad_bit_read(&stream->ptr, nbal); + } +@@ -417,8 +486,14 @@ int mad_layer_II(struct mad_stream *stre + + for (sb = 0; sb < sblimit; ++sb) { + for (ch = 0; ch < nch; ++ch) { +- if (allocation[ch][sb]) ++ if (allocation[ch][sb]) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 2) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2); ++ } + } + } + +@@ -441,6 +516,11 @@ int mad_layer_II(struct mad_stream *stre + for (sb = 0; sb < sblimit; ++sb) { + for (ch = 0; ch < nch; ++ch) { + if (allocation[ch][sb]) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6); + + switch (scfsi[ch][sb]) { +@@ -451,11 +531,21 @@ int mad_layer_II(struct mad_stream *stre + break; + + case 0: ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6); + /* fall through */ + + case 1: + case 3: ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6); + } + +@@ -487,7 +577,9 @@ int mad_layer_II(struct mad_stream *stre + if ((index = allocation[ch][sb])) { + index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; + +- II_samples(&stream->ptr, &qc_table[index], samples); ++ II_samples(&stream->ptr, &qc_table[index], samples, stream); ++ if (stream->error != 0) ++ return -1; + + for (s = 0; s < 3; ++s) { + frame->sbsample[ch][3 * gr + s][sb] = +@@ -505,7 +597,9 @@ int mad_layer_II(struct mad_stream *stre + if ((index = allocation[0][sb])) { + index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; + +- II_samples(&stream->ptr, &qc_table[index], samples); ++ II_samples(&stream->ptr, &qc_table[index], samples, stream); ++ if (stream->error != 0) ++ return -1; + + for (ch = 0; ch < nch; ++ch) { + for (s = 0; s < 3; ++s) { +Index: libmad-0.15.1b/layer3.c +=================================================================== +--- libmad-0.15.1b.orig/layer3.c ++++ libmad-0.15.1b/layer3.c +@@ -598,7 +598,8 @@ enum mad_error III_sideinfo(struct mad_b + static + unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, + struct channel *channel, +- struct channel *gr1ch, int mode_extension) ++ struct channel *gr1ch, int mode_extension, ++ unsigned int bits_left, unsigned int *part2_length) + { + struct mad_bitptr start; + unsigned int scalefac_compress, index, slen[4], part, n, i; +@@ -644,8 +645,12 @@ unsigned int III_scalefactors_lsf(struct + + n = 0; + for (part = 0; part < 4; ++part) { +- for (i = 0; i < nsfb[part]; ++i) ++ for (i = 0; i < nsfb[part]; ++i) { ++ if (bits_left < slen[part]) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[n++] = mad_bit_read(ptr, slen[part]); ++ bits_left -= slen[part]; ++ } + } + + while (n < 39) +@@ -690,7 +695,10 @@ unsigned int III_scalefactors_lsf(struct + max = (1 << slen[part]) - 1; + + for (i = 0; i < nsfb[part]; ++i) { ++ if (bits_left < slen[part]) ++ return MAD_ERROR_BADSCFSI; + is_pos = mad_bit_read(ptr, slen[part]); ++ bits_left -= slen[part]; + + channel->scalefac[n] = is_pos; + gr1ch->scalefac[n++] = (is_pos == max); +@@ -703,7 +711,8 @@ unsigned int III_scalefactors_lsf(struct + } + } + +- return mad_bit_length(&start, ptr); ++ *part2_length = mad_bit_length(&start, ptr); ++ return MAD_ERROR_NONE; + } + + /* +@@ -712,7 +721,8 @@ unsigned int III_scalefactors_lsf(struct + */ + static + unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel, +- struct channel const *gr0ch, unsigned int scfsi) ++ struct channel const *gr0ch, unsigned int scfsi, ++ unsigned int bits_left, unsigned int *part2_length) + { + struct mad_bitptr start; + unsigned int slen1, slen2, sfbi; +@@ -728,12 +738,20 @@ unsigned int III_scalefactors(struct mad + sfbi = 0; + + nsfb = (channel->flags & mixed_block_flag) ? 8 + 3 * 3 : 6 * 3; +- while (nsfb--) ++ while (nsfb--) { ++ if (bits_left < slen1) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi++] = mad_bit_read(ptr, slen1); ++ bits_left -= slen1; ++ } + + nsfb = 6 * 3; +- while (nsfb--) ++ while (nsfb--) { ++ if (bits_left < slen2) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi++] = mad_bit_read(ptr, slen2); ++ bits_left -= slen2; ++ } + + nsfb = 1 * 3; + while (nsfb--) +@@ -745,8 +763,12 @@ unsigned int III_scalefactors(struct mad + channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; + } + else { +- for (sfbi = 0; sfbi < 6; ++sfbi) ++ for (sfbi = 0; sfbi < 6; ++sfbi) { ++ if (bits_left < slen1) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); ++ bits_left -= slen1; ++ } + } + + if (scfsi & 0x4) { +@@ -754,8 +776,12 @@ unsigned int III_scalefactors(struct mad + channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; + } + else { +- for (sfbi = 6; sfbi < 11; ++sfbi) ++ for (sfbi = 6; sfbi < 11; ++sfbi) { ++ if (bits_left < slen1) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); ++ bits_left -= slen1; ++ } + } + + if (scfsi & 0x2) { +@@ -763,8 +789,12 @@ unsigned int III_scalefactors(struct mad + channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; + } + else { +- for (sfbi = 11; sfbi < 16; ++sfbi) ++ for (sfbi = 11; sfbi < 16; ++sfbi) { ++ if (bits_left < slen2) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); ++ bits_left -= slen2; ++ } + } + + if (scfsi & 0x1) { +@@ -772,14 +802,19 @@ unsigned int III_scalefactors(struct mad + channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; + } + else { +- for (sfbi = 16; sfbi < 21; ++sfbi) ++ for (sfbi = 16; sfbi < 21; ++sfbi) { ++ if (bits_left < slen2) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); ++ bits_left -= slen2; ++ } + } + + channel->scalefac[21] = 0; + } + +- return mad_bit_length(&start, ptr); ++ *part2_length = mad_bit_length(&start, ptr); ++ return MAD_ERROR_NONE; + } + + /* +@@ -933,19 +968,17 @@ static + enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576], + struct channel *channel, + unsigned char const *sfbwidth, +- unsigned int part2_length) ++ signed int part3_length) + { + signed int exponents[39], exp; + signed int const *expptr; + struct mad_bitptr peek; +- signed int bits_left, cachesz; ++ signed int bits_left, cachesz, fakebits; + register mad_fixed_t *xrptr; + mad_fixed_t const *sfbound; + register unsigned long bitcache; + +- bits_left = (signed) channel->part2_3_length - (signed) part2_length; +- if (bits_left < 0) +- return MAD_ERROR_BADPART3LEN; ++ bits_left = part3_length; + + III_exponents(channel, sfbwidth, exponents); + +@@ -956,8 +989,12 @@ enum mad_error III_huffdecode(struct mad + cachesz = mad_bit_bitsleft(&peek); + cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7; + ++ if (bits_left < cachesz) { ++ cachesz = bits_left; ++ } + bitcache = mad_bit_read(&peek, cachesz); + bits_left -= cachesz; ++ fakebits = 0; + + xrptr = &xr[0]; + +@@ -986,7 +1023,7 @@ enum mad_error III_huffdecode(struct mad + + big_values = channel->big_values; + +- while (big_values-- && cachesz + bits_left > 0) { ++ while (big_values-- && cachesz + bits_left - fakebits > 0) { + union huffpair const *pair; + unsigned int clumpsz, value; + register mad_fixed_t requantized; +@@ -1023,10 +1060,19 @@ enum mad_error III_huffdecode(struct mad + unsigned int bits; + + bits = ((32 - 1 - 21) + (21 - cachesz)) & ~7; ++ if (bits_left < bits) { ++ bits = bits_left; ++ } + bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); + cachesz += bits; + bits_left -= bits; + } ++ if (cachesz < 21) { ++ unsigned int bits = 21 - cachesz; ++ bitcache <<= bits; ++ cachesz += bits; ++ fakebits += bits; ++ } + + /* hcod (0..19) */ + +@@ -1041,6 +1087,8 @@ enum mad_error III_huffdecode(struct mad + } + + cachesz -= pair->value.hlen; ++ if (cachesz < fakebits) ++ return MAD_ERROR_BADHUFFDATA; + + if (linbits) { + /* x (0..14) */ +@@ -1054,10 +1102,15 @@ enum mad_error III_huffdecode(struct mad + + case 15: + if (cachesz < linbits + 2) { +- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); +- cachesz += 16; +- bits_left -= 16; ++ unsigned int bits = 16; ++ if (bits_left < 16) ++ bits = bits_left; ++ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); ++ cachesz += bits; ++ bits_left -= bits; + } ++ if (cachesz - fakebits < linbits) ++ return MAD_ERROR_BADHUFFDATA; + + value += MASK(bitcache, cachesz, linbits); + cachesz -= linbits; +@@ -1074,6 +1127,8 @@ enum mad_error III_huffdecode(struct mad + } + + x_final: ++ if (cachesz - fakebits < 1) ++ return MAD_ERROR_BADHUFFDATA; + xrptr[0] = MASK1BIT(bitcache, cachesz--) ? + -requantized : requantized; + } +@@ -1089,10 +1144,15 @@ enum mad_error III_huffdecode(struct mad + + case 15: + if (cachesz < linbits + 1) { +- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); +- cachesz += 16; +- bits_left -= 16; ++ unsigned int bits = 16; ++ if (bits_left < 16) ++ bits = bits_left; ++ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); ++ cachesz += bits; ++ bits_left -= bits; + } ++ if (cachesz - fakebits < linbits) ++ return MAD_ERROR_BADHUFFDATA; + + value += MASK(bitcache, cachesz, linbits); + cachesz -= linbits; +@@ -1109,6 +1169,8 @@ enum mad_error III_huffdecode(struct mad + } + + y_final: ++ if (cachesz - fakebits < 1) ++ return MAD_ERROR_BADHUFFDATA; + xrptr[1] = MASK1BIT(bitcache, cachesz--) ? + -requantized : requantized; + } +@@ -1128,6 +1190,8 @@ enum mad_error III_huffdecode(struct mad + requantized = reqcache[value] = III_requantize(value, exp); + } + ++ if (cachesz - fakebits < 1) ++ return MAD_ERROR_BADHUFFDATA; + xrptr[0] = MASK1BIT(bitcache, cachesz--) ? + -requantized : requantized; + } +@@ -1146,6 +1210,8 @@ enum mad_error III_huffdecode(struct mad + requantized = reqcache[value] = III_requantize(value, exp); + } + ++ if (cachesz - fakebits < 1) ++ return MAD_ERROR_BADHUFFDATA; + xrptr[1] = MASK1BIT(bitcache, cachesz--) ? + -requantized : requantized; + } +@@ -1155,9 +1221,6 @@ enum mad_error III_huffdecode(struct mad + } + } + +- if (cachesz + bits_left < 0) +- return MAD_ERROR_BADHUFFDATA; /* big_values overrun */ +- + /* count1 */ + { + union huffquad const *table; +@@ -1167,15 +1230,24 @@ enum mad_error III_huffdecode(struct mad + + requantized = III_requantize(1, exp); + +- while (cachesz + bits_left > 0 && xrptr <= &xr[572]) { ++ while (cachesz + bits_left - fakebits > 0 && xrptr <= &xr[572]) { + union huffquad const *quad; + + /* hcod (1..6) */ + + if (cachesz < 10) { +- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); +- cachesz += 16; +- bits_left -= 16; ++ unsigned int bits = 16; ++ if (bits_left < 16) ++ bits = bits_left; ++ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); ++ cachesz += bits; ++ bits_left -= bits; ++ } ++ if (cachesz < 10) { ++ unsigned int bits = 10 - cachesz; ++ bitcache <<= bits; ++ cachesz += bits; ++ fakebits += bits; + } + + quad = &table[MASK(bitcache, cachesz, 4)]; +@@ -1188,6 +1260,11 @@ enum mad_error III_huffdecode(struct mad + MASK(bitcache, cachesz, quad->ptr.bits)]; + } + ++ if (cachesz - fakebits < quad->value.hlen + quad->value.v ++ + quad->value.w + quad->value.x + quad->value.y) ++ /* We don't have enough bits to read one more entry, consider them ++ * stuffing bits. */ ++ break; + cachesz -= quad->value.hlen; + + if (xrptr == sfbound) { +@@ -1236,22 +1313,8 @@ enum mad_error III_huffdecode(struct mad + + xrptr += 2; + } +- +- if (cachesz + bits_left < 0) { +-# if 0 && defined(DEBUG) +- fprintf(stderr, "huffman count1 overrun (%d bits)\n", +- -(cachesz + bits_left)); +-# endif +- +- /* technically the bitstream is misformatted, but apparently +- some encoders are just a bit sloppy with stuffing bits */ +- +- xrptr -= 4; +- } + } + +- assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT); +- + # if 0 && defined(DEBUG) + if (bits_left < 0) + fprintf(stderr, "read %d bits too many\n", -bits_left); +@@ -2348,10 +2411,11 @@ void III_freqinver(mad_fixed_t sample[18 + */ + static + enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, +- struct sideinfo *si, unsigned int nch) ++ struct sideinfo *si, unsigned int nch, unsigned int md_len) + { + struct mad_header *header = &frame->header; + unsigned int sfreqi, ngr, gr; ++ int bits_left = md_len * CHAR_BIT; + + { + unsigned int sfreq; +@@ -2383,6 +2447,7 @@ enum mad_error III_decode(struct mad_bit + for (ch = 0; ch < nch; ++ch) { + struct channel *channel = &granule->ch[ch]; + unsigned int part2_length; ++ unsigned int part3_length; + + sfbwidth[ch] = sfbwidth_table[sfreqi].l; + if (channel->block_type == 2) { +@@ -2391,18 +2456,30 @@ enum mad_error III_decode(struct mad_bit + } + + if (header->flags & MAD_FLAG_LSF_EXT) { +- part2_length = III_scalefactors_lsf(ptr, channel, ++ error = III_scalefactors_lsf(ptr, channel, + ch == 0 ? 0 : &si->gr[1].ch[1], +- header->mode_extension); ++ header->mode_extension, bits_left, &part2_length); + } + else { +- part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch], +- gr == 0 ? 0 : si->scfsi[ch]); ++ error = III_scalefactors(ptr, channel, &si->gr[0].ch[ch], ++ gr == 0 ? 0 : si->scfsi[ch], bits_left, &part2_length); + } ++ if (error) ++ return error; ++ ++ bits_left -= part2_length; + +- error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length); ++ if (part2_length > channel->part2_3_length) ++ return MAD_ERROR_BADPART3LEN; ++ ++ part3_length = channel->part2_3_length - part2_length; ++ if (part3_length > bits_left) ++ return MAD_ERROR_BADPART3LEN; ++ ++ error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part3_length); + if (error) + return error; ++ bits_left -= part3_length; + } + + /* joint stereo processing */ +@@ -2519,11 +2596,13 @@ int mad_layer_III(struct mad_stream *str + unsigned int nch, priv_bitlen, next_md_begin = 0; + unsigned int si_len, data_bitlen, md_len; + unsigned int frame_space, frame_used, frame_free; +- struct mad_bitptr ptr; ++ struct mad_bitptr ptr, bufend_ptr; + struct sideinfo si; + enum mad_error error; + int result = 0; + ++ mad_bit_init(&bufend_ptr, stream->bufend); ++ + /* allocate Layer III dynamic structures */ + + if (stream->main_data == 0) { +@@ -2587,14 +2666,15 @@ int mad_layer_III(struct mad_stream *str + unsigned long header; + + mad_bit_init(&peek, stream->next_frame); ++ if (mad_bit_length(&peek, &bufend_ptr) >= 57) { ++ header = mad_bit_read(&peek, 32); ++ if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) { ++ if (!(header & 0x00010000L)) /* protection_bit */ ++ mad_bit_skip(&peek, 16); /* crc_check */ + +- header = mad_bit_read(&peek, 32); +- if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) { +- if (!(header & 0x00010000L)) /* protection_bit */ +- mad_bit_skip(&peek, 16); /* crc_check */ +- +- next_md_begin = +- mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8); ++ next_md_begin = ++ mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8); ++ } + } + + mad_bit_finish(&peek); +@@ -2653,7 +2733,7 @@ int mad_layer_III(struct mad_stream *str + /* decode main_data */ + + if (result == 0) { +- error = III_decode(&ptr, frame, &si, nch); ++ error = III_decode(&ptr, frame, &si, nch, md_len); + if (error) { + stream->error = error; + result = -1; diff --git a/libs/libmad/patches/102-CVE-2017-8373-CVE-2017-8372-md-size.patch b/libs/libmad/patches/102-CVE-2017-8373-CVE-2017-8372-md-size.patch new file mode 100644 index 00000000..657b5ffd --- /dev/null +++ b/libs/libmad/patches/102-CVE-2017-8373-CVE-2017-8372-md-size.patch @@ -0,0 +1,58 @@ +From: Kurt Roeckx +Date: Sun, 28 Jan 2018 15:44:08 +0100 +Subject: Check the size of the main data + +The main data to decode a frame can come from the current frame and part of the +previous frame, the so called bit reservoir. si.main_data_begin is the part of +the previous frame we need for this frame. frame_space is the amount of main +data that can be in this frame, and next_md_begin is the part of this frame that +is going to be used for the next frame. + +The maximum amount of data from a previous frame that the format allows is 511 +bytes. The maximum frame size for the defined bitrates is at MPEG 2.5 layer 2 +at 320 kbit/s and 8 kHz sample rate which gives 72 * (320000 / 8000) + 1 = 2881. +So those defines are not large enough: + # define MAD_BUFFER_GUARD 8 + # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) + +There is also support for a "free" bitrate which allows you to create any frame +size, which can be larger than the buffer. + +Changing the defines is not an option since it's part of the ABI, so we check +that the main data fits in the bufer. + +The previous frame data is stored in *stream->main_data and contains +stream->md_len bytes. If stream->md_len is larger than the data we +need from the previous frame (si.main_data_begin) it still wouldn't fit +in the buffer, so just keep the data that we need. + +Index: libmad-0.15.1b/layer3.c +=================================================================== +--- libmad-0.15.1b.orig/layer3.c ++++ libmad-0.15.1b/layer3.c +@@ -2608,6 +2608,11 @@ int mad_layer_III(struct mad_stream *str + next_md_begin = 0; + + md_len = si.main_data_begin + frame_space - next_md_begin; ++ if (md_len + MAD_BUFFER_GUARD > MAD_BUFFER_MDLEN) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + + frame_used = 0; + +@@ -2625,8 +2630,11 @@ int mad_layer_III(struct mad_stream *str + } + } + else { +- mad_bit_init(&ptr, +- *stream->main_data + stream->md_len - si.main_data_begin); ++ memmove(stream->main_data, ++ *stream->main_data + stream->md_len - si.main_data_begin, ++ si.main_data_begin); ++ stream->md_len = si.main_data_begin; ++ mad_bit_init(&ptr, *stream->main_data); + + if (md_len > si.main_data_begin) { + assert(stream->md_len + md_len - diff --git a/libs/libmariadb/Makefile b/libs/libmariadb/Makefile new file mode 100644 index 00000000..62ac3dc8 --- /dev/null +++ b/libs/libmariadb/Makefile @@ -0,0 +1,188 @@ +# +# Copyright (C) 2019 Sebastian Kemper +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libmariadb +PKG_VERSION:=3.1.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=mariadb-connector-c-$(PKG_VERSION)-src.tar.gz +PKG_SOURCE_URL := \ + https://mirror.netcologne.de/mariadb/connector-c-$(PKG_VERSION) \ + https://mirror.lstn.net/mariadb/connector-c-$(PKG_VERSION) \ + https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/connector-c-$(PKG_VERSION) \ + https://downloads.mariadb.org/interstitial/connector-c-$(PKG_VERSION) + +PKG_HASH:=431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b +PKG_MAINTAINER:=Sebastian Kemper +PKG_LICENSE:=LGPL-2.1 +PKG_LICENSE_FILES:=COPYING.LIB + +PKG_BUILD_DIR:=$(BUILD_DIR)/mariadb-connector-c-$(PKG_VERSION)-src + +PKG_CPE_ID:=cpe:/a:mariadb:mariadb + +PKG_BUILD_PARALLEL:=1 + +CMAKE_INSTALL:=1 + +MARIADB_CONF_DIR:=/etc/mysql +MARIADB_PLUGIN_DIR:=/usr/lib/mariadb/plugin + +MARIADB_PORT=3306 +MARIADB_SOCKET=/var/run/mysqld/mysqld.sock + +MARIADB_CLIENT_PLUGINS := \ + auth_gssapi_client \ + remote_io + +PKG_CONFIG_DEPENDS := \ + $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-plugin-%,$(subst _,-,$(MARIADB_CLIENT_PLUGINS))) + +plugin-auth_gssapi_client := CLIENT_PLUGIN_AUTH_GSSAPI_CLIENT +plugin-remote_io := CLIENT_PLUGIN_REMOTE_IO + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk +include $(INCLUDE_DIR)/nls.mk + +# Pass CPPFLAGS in the CFLAGS as otherwise the build system will +# ignore them. +TARGET_CFLAGS+=$(TARGET_CPPFLAGS) + +define Package/$(PKG_NAME)/install/plugin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(MARIADB_PLUGIN_DIR)/$(2).so $(1)$(MARIADB_PLUGIN_DIR) +endef + +define Package/$(PKG_NAME)/Default + SECTION:=libs + CATEGORY:=Libraries + URL:=https://mariadb.org/ + SUBMENU:=Database +endef + +define Package/$(PKG_NAME)/description/Default +MariaDB is a very fast and robust SQL database server. +endef + +define Package/$(PKG_NAME) + $(call Package/$(PKG_NAME)/Default) + DEPENDS:=+mariadb-common \ + $(ICONV_DEPENDS) \ + +libopenssl \ + +zlib + TITLE:=MariaDB database client library + MENU:=1 + PROVIDES:=libmariadbclient libmysqlclient libmysqlclient-r + ABI_VERSION:=3 +endef + +define Package/$(PKG_NAME)/conffiles +$(MARIADB_CONF_DIR)/conf.d/50-client.cnf +endef + +define Package/$(PKG_NAME)/description +$(call Package/$(PKG_NAME)/description/Default) + +This package includes the client library. + +endef + +# We won't need unit tests +CMAKE_OPTIONS += -DWITH_UNIT_TESTS=0 + +# Make it explicit that we are cross-compiling +CMAKE_OPTIONS += -DCMAKE_CROSSCOMPILING=1 + +CMAKE_OPTIONS += \ + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_LIBDIR=lib \ + -DINSTALL_PLUGINDIR=lib/mariadb/plugin \ + -DMARIADB_UNIX_ADDR=$(MARIADB_SOCKET) \ + -DWITH_EXTERNAL_ZLIB=YES \ + -DWITH_MYSQLCOMPAT=ON \ + -DWITH_SSL=OPENSSL + +# Help MariaDB find the correct libiconv. +# nls.mk sets it up so that with CONFIG_BUILD_NLS libiconv-full would be used, +# otherwise libiconv-stub (independent of the selected libc). MariaDB needs a +# leg up to find/pick the right lib. +CMAKE_OPTIONS += \ + -DICONV_INCLUDE_DIR=$(ICONV_PREFIX)/include \ + -DICONV_LIBRARIES=$(ICONV_PREFIX)/lib/libiconv.$(if $(CONFIG_BUILD_NLS),so,a) + +CMAKE_OPTIONS += \ + $(foreach p,$(MARIADB_CLIENT_PLUGINS),-D$(plugin-$(p))=$(if $(CONFIG_PACKAGE_$(PKG_NAME)-plugin-$(subst _,-,$(p))),DYNAMIC,OFF)) + +# LIBICONV_PLUG is used in GNU's libiconv for redefinition of exports [e.g. +# from libiconv_open() to iconv_open()]. But in OpenWrt this variable is not set +# when building libiconv-full. So when MariaDB sets LIBICONV_PLUG it expects +# iconv_open() to be available for example, which is not the case - only +# libiconv_open() is. To address this prevent the variable from being set. +# libiconv-stub does not use this variable, so there is no harm in always doing +# this. + +define Build/Prepare + $(call Build/Prepare/Default) + $(SED) '/ADD_DEFINITIONS(-DLIBICONV_PLUG)/d' $(PKG_BUILD_DIR)/CMakeLists.txt +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include $(1)/usr/lib/mysql $(1)/usr/lib/pkgconfig $(2)/bin + $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include + cd $(1)/usr/include/mysql; $(LN) mariadb_version.h mysql_version.h + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{mariadb,mysqlclient}*.so* $(1)/usr/lib + cd $(1)/usr/lib/mysql; $(LN) ../lib{mariadb,mysqlclient}*.so* . + $(INSTALL_BIN) files/mysql_config $(1)/usr/bin + $(LN) $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin + $(SED) 's/PORT/$(MARIADB_PORT)/' $(1)/usr/bin/mysql_config + $(SED) 's|PLUGIN_DIR|$(MARIADB_PLUGIN_DIR)|' $(1)/usr/bin/mysql_config + $(SED) 's|SOCKET|$(MARIADB_SOCKET)|' $(1)/usr/bin/mysql_config + cd "$(PKG_BUILD_DIR)/mariadb_config"; \ + CLIENT_VERSION=`sed -n 's|^#define[[:blank:]]*VERSION[[:blank:]]*"\([0-9.]*\)"|\1|p' mariadb_config.c`; \ + $(SED) "s/VERSION/$$$${CLIENT_VERSION}/" $(1)/usr/bin/mysql_config + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmariadb.pc $(1)/usr/lib/pkgconfig +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)$(MARIADB_CONF_DIR)/conf.d + $(INSTALL_DIR) $(1)$(MARIADB_PLUGIN_DIR) + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)$(MARIADB_PLUGIN_DIR)/caching_sha2_password.so \ + $(PKG_INSTALL_DIR)$(MARIADB_PLUGIN_DIR)/client_ed25519.so \ + $(PKG_INSTALL_DIR)$(MARIADB_PLUGIN_DIR)/dialog.so \ + $(PKG_INSTALL_DIR)$(MARIADB_PLUGIN_DIR)/mysql_clear_password.so \ + $(PKG_INSTALL_DIR)$(MARIADB_PLUGIN_DIR)/sha256_password.so \ + $(1)$(MARIADB_PLUGIN_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libmariadb.so.$(ABI_VERSION) $(1)/usr/lib + $(INSTALL_DATA) conf/50-client.cnf $(1)$(MARIADB_CONF_DIR)/conf.d +endef + +define BuildPlugin + define Package/$(PKG_NAME)-plugin-$(subst _,-,$(1)) + $(call Package/$(PKG_NAME)/Default) + TITLE:=$(PKG_NAME) plugin + DEPENDS:=$(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-plugin-$(subst _,-,$(1)):%,$(2)) + endef + define Package/$(PKG_NAME)-plugin-$(subst _,-,$(1))/description + $(call Package/$(PKG_NAME)/description/Default) + +This package provides the $(1) plugin. + + endef + define Package/$(PKG_NAME)-plugin-$(subst _,-,$(1))/install + $(INSTALL_DIR) $$(1)$(MARIADB_PLUGIN_DIR) + $(call Package/$(PKG_NAME)/install/plugin,$$(1),$(1)) + endef + $$(eval $$(call BuildPackage,$(PKG_NAME)-plugin-$(subst _,-,$(1)))) +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) + +$(eval $(call BuildPlugin,auth_gssapi_client,+krb5-libs)) +$(eval $(call BuildPlugin,remote_io,+libcurl)) diff --git a/utils/mariadb/conf/50-client.cnf b/libs/libmariadb/conf/50-client.cnf similarity index 100% rename from utils/mariadb/conf/50-client.cnf rename to libs/libmariadb/conf/50-client.cnf diff --git a/libs/libmariadb/files/mysql_config b/libs/libmariadb/files/mysql_config new file mode 100755 index 00000000..5c4dfbd7 --- /dev/null +++ b/libs/libmariadb/files/mysql_config @@ -0,0 +1,61 @@ +#!/bin/sh + +PCFILE=libmariadb + +command -v pkg-config > /dev/null 2>&1 +ret="$?" +if [ "$ret" -ne 0 ]; then + echo pkg-config not found >&2 + exit 1 +fi + +pkg-config $PCFILE > /dev/null 2>&1 +ret="$?" +if [ "$ret" -ne 0 ]; then + echo $PCFILE pkg-config file missing >&2 + exit 1 +fi + +cflags=$(pkg-config $PCFILE --cflags) +include=$(pkg-config $PCFILE --cflags) +libs=$(pkg-config $PCFILE --libs) +plugindir=PLUGIN_DIR +socket=SOCKET +port=PORT +version=VERSION + +usage () { + cat <&2 ;; + esac + + shift +done + +exit 0 diff --git a/libs/libmariadb/patches/fix-ucontext-header.patch b/libs/libmariadb/patches/fix-ucontext-header.patch new file mode 100644 index 00000000..8e409729 --- /dev/null +++ b/libs/libmariadb/patches/fix-ucontext-header.patch @@ -0,0 +1,11 @@ +--- a/cmake/CheckIncludeFiles.cmake ++++ b/cmake/CheckIncludeFiles.cmake +@@ -46,4 +46,7 @@ + CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H) + CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H) + CHECK_INCLUDE_FILES (utime.h HAVE_UTIME_H) +-CHECK_INCLUDE_FILES (ucontext.h HAVE_UCONTEXT_H) ++CHECK_INCLUDE_FILES (ucontext.h HAVE_UCONTEXT_HEADER) ++IF(HAVE_UCONTEXT_HEADER) ++ CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H) ++ENDIF(HAVE_UCONTEXT_HEADER) diff --git a/libs/libmatroska/Makefile b/libs/libmatroska/Makefile new file mode 100644 index 00000000..bb572032 --- /dev/null +++ b/libs/libmatroska/Makefile @@ -0,0 +1,48 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libmatroska +PKG_VERSION:=1.5.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/Matroska-Org/libmatroska/tar.gz/release-$(PKG_VERSION)? +PKG_HASH:=8d03020ca3a657fe8d1ff57209b4218b6001df2ecd11ae956b428de941f2811f +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION) + +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=LICENSE.LGPL + +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=libebml + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libmatroska + SECTION:=libs + CATEGORY:=Libraries + TITLE:=a C++ libary to parse Matroska files (.mkv and .mka) + URL:=https://github.com/Matroska-Org/libmatroska + DEPENDS:=+libstdcpp + BUILDONLY:=1 +endef + +define Package/libmatroska/description + a C++ libary to parse and create Matroska files +endef + +CMAKE_OPTIONS += \ + -DDISABLE_PKGCONFIG=OFF \ + -DDISABLE_CMAKE_CONFIG=OFF + +TARGET_CFLAGS += -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + +$(eval $(call BuildPackage,libmatroska)) diff --git a/libs/libmaxminddb/Makefile b/libs/libmaxminddb/Makefile index 72cbaff3..380140e1 100644 --- a/libs/libmaxminddb/Makefile +++ b/libs/libmaxminddb/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmaxminddb -PKG_VERSION:=1.3.2 +PKG_VERSION:=1.4.2 PKG_RELEASE=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/maxmind/libmaxminddb/releases/download/$(PKG_VERSION)/ -PKG_HASH:=e6f881aa6bd8cfa154a44d965450620df1f714c6dc9dd9971ad98f6e04f6c0f0 +PKG_HASH:=dd582aa971be23dee960ec33c67fb5fd38affba508e6f00ea75959dbd5aad156 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf diff --git a/libs/libmbim/Makefile b/libs/libmbim/Makefile index 0cb3b547..96f21d26 100644 --- a/libs/libmbim/Makefile +++ b/libs/libmbim/Makefile @@ -8,20 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmbim -PKG_VERSION:=1.20.2 -PKG_RELEASE:=3 +PKG_VERSION:=1.24.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/libmbim -PKG_HASH:=550fb69e5e57f7646f8eb9ed8d24e44ea869ad846be9c162893f12e43528059b +PKG_HASH:=3d495cec3becfd02731ceac67a5ad7e0f1b328395137024d7cb91d31f00e1196 PKG_MAINTAINER:=Nicholas Smith PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/libs/libmcrypt/Makefile b/libs/libmcrypt/Makefile index b18f8735..a160620c 100644 --- a/libs/libmcrypt/Makefile +++ b/libs/libmcrypt/Makefile @@ -15,6 +15,7 @@ PKG_MAINTAINER:=W. Michael Petullo PKG_LICENSE:=LGPLv2.1 PKG_LICENSE_FILES:=COPYING.LIB +PKG_CPE_ID:=cpe:/a:mcrypt:libmcrypt PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/mcrypt diff --git a/libs/libmicrohttpd/Makefile b/libs/libmicrohttpd/Makefile index c8f8ddbe..870971cd 100644 --- a/libs/libmicrohttpd/Makefile +++ b/libs/libmicrohttpd/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmicrohttpd -PKG_VERSION:=0.9.69 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Alexander Couzens -PKG_LICENSE:=LGPL-2.1 -PKG_LICENSE_FILES:=COPYING +PKG_VERSION:=0.9.70 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/libmicrohttpd -PKG_HASH:=fb9b6b148b787493e637d3083588711e65cbcb726fa02cee2cd543c5de27e37e +PKG_HASH:=90d0a3d396f96f9bc41eb0f7e8187796049285fabef82604acd4879590977307 + +PKG_MAINTAINER:=Alexander Couzens +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING -PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -27,7 +28,7 @@ define Package/libmicrohttpd/default SECTION:=libs CATEGORY:=Libraries TITLE:=GNU libmicrohttpd is a library that runs an HTTP server. - URL:=http://www.gnu.org/software/libmicrohttpd/ + URL:=https://www.gnu.org/software/libmicrohttpd/ endef define Package/libmicrohttpd-no-ssl @@ -45,13 +46,19 @@ $(call Package/libmicrohttpd/default) PROVIDES:=libmicrohttpd endef -CONFIGURE_ARGS+= \ +define Package/libmicrohttpd/description + GNU libmicrohttpd is a small C library that is supposed to make it easy + to run an HTTP server as part of another application. +endef + +CONFIGURE_ARGS += \ --disable-curl \ --disable-rpath \ --disable-doc \ --disable-examples \ - --enable-poll=no \ - --enable-epoll=yes \ + --disable-poll \ + --enable-epoll \ + --with-pic ifeq ($(BUILD_VARIANT),ssl) CONFIGURE_ARGS += \ @@ -63,11 +70,6 @@ CONFIGURE_ARGS += \ --without-gnutls endif -define Package/libmicrohttpd/description - GNU libmicrohttpd is a small C library that is supposed to make it easy - to run an HTTP server as part of another application. -endef - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/microhttpd.h $(1)/usr/include/ diff --git a/libs/libmms/Makefile b/libs/libmms/Makefile index fa24a5c7..49000a63 100644 --- a/libs/libmms/Makefile +++ b/libs/libmms/Makefile @@ -16,6 +16,7 @@ PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=LGPLv2.1 PKG_LICENSE_FILES:=COPYING.LIB +PKG_CPE_ID:=cpe:/a:libmms_project:libmms PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/libs/libmodbus/Makefile b/libs/libmodbus/Makefile index e35e4d53..4ae5bb53 100644 --- a/libs/libmodbus/Makefile +++ b/libs/libmodbus/Makefile @@ -8,17 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmodbus -PKG_VERSION:=3.1.4 +PKG_VERSION:=3.1.6 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://libmodbus.org/releases -PKG_HASH:=c8c862b0e9a7ba699a49bc98f62bdffdfafd53a5716c0e162696b4bf108d3637 +PKG_HASH:=d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16 PKG_MAINTAINER:=Michael Heimpold -PKG_LICENSE:=GPL-3.0+ LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING COPYING.LESSER +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING.LESSER PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -50,7 +50,7 @@ endef define Package/libmodbus/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libmodbus)) diff --git a/libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch b/libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch new file mode 100644 index 00000000..1ce28ffe --- /dev/null +++ b/libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch @@ -0,0 +1,35 @@ +From f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d Mon Sep 17 00:00:00 2001 +From: i-ky +Date: Tue, 10 Jul 2018 15:58:45 +0300 +Subject: [PATCH] Fixed MODBUS_GET_* macros in case of negative values + +In case resulting value should be negative it is incorrect to use '+' operator to construct it from pieces, because highest bytes will result in negative number after bitwise shift while others will stay positive. Replacing addition with '|' should solve the issue. +--- + src/modbus.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/modbus.h b/src/modbus.h +index f6e9a5f..c63f5ce 100644 +--- a/src/modbus.h ++++ b/src/modbus.h +@@ -245,12 +245,12 @@ MODBUS_API int modbus_reply_exception(modbus_t *ctx, const uint8_t *req, + #define MODBUS_GET_HIGH_BYTE(data) (((data) >> 8) & 0xFF) + #define MODBUS_GET_LOW_BYTE(data) ((data) & 0xFF) + #define MODBUS_GET_INT64_FROM_INT16(tab_int16, index) \ +- (((int64_t)tab_int16[(index) ] << 48) + \ +- ((int64_t)tab_int16[(index) + 1] << 32) + \ +- ((int64_t)tab_int16[(index) + 2] << 16) + \ ++ (((int64_t)tab_int16[(index) ] << 48) | \ ++ ((int64_t)tab_int16[(index) + 1] << 32) | \ ++ ((int64_t)tab_int16[(index) + 2] << 16) | \ + (int64_t)tab_int16[(index) + 3]) +-#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) + tab_int16[(index) + 1]) +-#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) + tab_int8[(index) + 1]) ++#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) | tab_int16[(index) + 1]) ++#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) | tab_int8[(index) + 1]) + #define MODBUS_SET_INT16_TO_INT8(tab_int8, index, value) \ + do { \ + tab_int8[(index)] = (value) >> 8; \ +-- +2.17.1 + diff --git a/libs/libmpdclient/Makefile b/libs/libmpdclient/Makefile index e698a129..0e04daf8 100644 --- a/libs/libmpdclient/Makefile +++ b/libs/libmpdclient/Makefile @@ -6,40 +6,35 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmpdclient -PKG_VERSION:=2.11 +PKG_VERSION:=2.18 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=15fe693893c0d7ea3f4c35c4016fbd0332836164178b20983eec9b470846baf6 -PKG_SOURCE_URL:=http://www.musicpd.org/download/libmpdclient/2/ -PGK_HASH:=15fe693893c0d7ea3f4c35c4016fbd0332836164178b20983eec9b470846baf6 +PKG_SOURCE_URL:=https://www.musicpd.org/download/libmpdclient/2 +PKG_HASH:=4cb01e1f567e0169aca94875fb6e1200e7f5ce35b63a4df768ec1591fb1081fa PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING +PKG_BUILD_DEPENDS:=meson/host PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk define Package/libmpdclient TITLE:=libmpdclient SECTION:=libs CATEGORY:=Libraries - URL:=http://mpd.wikia.com/wiki/ClientLib:libmpdclient + URL:=https://musicpd.org/libs/libmpdclient/ endef define Package/libmpdclient/description A stable, documented, asynchronous API library for interfacing MPD in the C, C++ & Objective C languages. endef -TARGET_CFLAGS+="-std=gnu99" - -define Build/Configure - $(call Build/Configure/Default, \ - --disable-documentation \ - ) -endef +MESON_ARGS+=-Ddocumentation=false define Build/InstallDev $(INSTALL_DIR) \ diff --git a/libs/libmraa/Makefile b/libs/libmraa/Makefile index 6d980b25..18515ce8 100644 --- a/libs/libmraa/Makefile +++ b/libs/libmraa/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,45 +8,103 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmraa -PKG_VERSION:=0.8.0 +PKG_VERSION:=2.1.0 +PKG_RELEASE:=2 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/eclipse/mraa/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=5351ce9eb654014d8ea7f43bdb2d17e6d1955536938a2ea0d467f4008e614345 +PKG_BUILD_DIR:=$(BUILD_DIR)/mraa-$(PKG_VERSION) -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/mraa.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=70600dece4138b0c0dbaff42f57828f1559cd840 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=9cbda58e7c7790db3d62cee62f399975effcdc2d9688d3d6bb2b4a86748faff9 -PKG_BUILD_DEPENDS:=node python/host swig/host node/host +PKG_MAINTAINER:=John Crispin , Hirokazu MORIKAWA +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_DEPENDS:=node swig/host node/host CMAKE_INSTALL:=1 - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:=LGPL-2.1 +PKG_USE_MIPS16:=0 +PYTHON3_PKG_BUILD:=0 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk +include ../../lang/python/python3-package.mk -CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \ - -DENABLEEXAMPLES=0 \ - -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \ - -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin +CMAKE_OPTIONS=-DENABLEEXAMPLES=0 \ + -DFIRMATA=ON \ + -DBUILDSWIG=OFF TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/node -define Package/libmraa +define Package/libmraa/Default SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+python +libstdcpp - TITLE:=Intel IoT lowlevel IO library + SUBMENU:=IoT + TITLE:=Eclipse MRAA lowlevel IO library + URL:=https://projects.eclipse.org/projects/iot.mraa +endef + +define Package/libmraa/Default/description + Libmraa is a C/C++ library with bindings to Java, Python and JavaScript to interface +with the IO on Galileo, Edison & other platforms, with a structured and sane API where +port names/numbering matches the board that you are on. Use of libmraa does not tie you +to specific hardware with board detection done at runtime you can create portable code +that will work across the supported platforms. +endef + +define Package/libmraa + $(call Package/libmraa/Default) + TITLE:=Eclipse MRAA lowlevel IO C/C++ library + DEPENDS:=+libstdcpp +libjson-c @!arc @!armeb @!powerpc +endef + +define Package/libmraa/description +$(call Package/libmraa/Default/description) + +This package contains the C/C++ libraries. +endef + +define Package/libmraa-node + $(call Package/libmraa/Default) + TITLE:=Eclipse MRAA lowlevel IO Node.js library + DEPENDS:=+libmraa +node +endef + +define Package/libmraa-node/description +$(call Package/libmraa/Default/description) + +This package contains the Node.js libraries. +endef + +define Package/libmraa-python3 + $(call Package/libmraa/Default) + TITLE:=Eclipse MRAA lowlevel IO Python3 library + DEPENDS:=+libmraa +python3-light @BROKEN +endef + +define Package/libmraa-python3/description +$(call Package/libmraa/Default/description) + +This package contains the Python3 libraries. endef define Package/libmraa/install - $(INSTALL_DIR) $(1)/usr/lib/{node/mraa,python2.7/site-packages} $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libmraa.so* $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/node_modules/mraa/* $(1)/usr/lib/node/mraa/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/* $(1)/usr/lib/python2.7/site-packages/ -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mraa/examples/python/blink-io8.py $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmraa.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mraa-* $(1)/usr/bin/ +endef + +define Package/libmraa-node/install + $(INSTALL_DIR) $(1)/usr/lib/node/mraa + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/mraa/* $(1)/usr/lib/node/mraa/ +endef + +define Package/libmraa-python3/install + $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages + $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/site-packages/* \ + $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ endef $(eval $(call BuildPackage,libmraa)) +$(eval $(call BuildPackage,libmraa-node)) +$(eval $(call BuildPackage,libmraa-python3)) diff --git a/libs/libmraa/patches/0001-base.patch b/libs/libmraa/patches/0001-base.patch deleted file mode 100644 index 5094389f..00000000 --- a/libs/libmraa/patches/0001-base.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 6fecad819376442d057bdd35a0909cfac9df02f5 Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Thu, 23 Jul 2015 12:18:39 +0200 -Subject: [PATCH 1/4] base - ---- - CMakeLists.txt | 10 ++++------ - api/mraa/types.h | 1 + - include/mraa_internal.h | 7 +++++++ - src/CMakeLists.txt | 5 +++++ - src/i2c/i2c.c | 2 +- - src/mraa.c | 3 +++ - src/uart/uart.c | 1 + - 7 files changed, 22 insertions(+), 7 deletions(-) - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -14,12 +14,7 @@ - set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) - - # Make a version file containing the current version from git. --include (GetGitRevisionDescription) --git_describe (VERSION "--tags") --if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_HEAD-HASH-NOTFOUND") -- message (WARNING " - Install git to compile a production libmraa!") -- set (VERSION "v0.8.0-dirty") --endif () -+set (VERSION "v0.8.0") - - message (INFO " - libmraa Version ${VERSION}") - -@@ -84,8 +79,10 @@ - set (X86PLAT ON) - elseif (DETECTED_ARCH MATCHES "arm.*") - set (ARMPLAT ON) -+elseif (DETECTED_ARCH MATCHES "mips") -+ set (MIPSPLAT ON) - else () -- message(FATAL_ERROR "Only x86 and arm platforms currently supported") -+ message(FATAL_ERROR "Only x86, arm and mips platforms currently supported") - endif() - - if (BUILDSWIGPYTHON) ---- a/api/mraa/types.h -+++ b/api/mraa/types.h -@@ -46,6 +46,7 @@ - MRAA_BEAGLEBONE = 6, /**< The different BeagleBone Black Modes B/C */ - MRAA_BANANA = 7, /**< Allwinner A20 based Banana Pi and Banana Pro */ - MRAA_INTEL_NUC5 = 8, /**< The Intel 5th generations Broadwell NUCs */ -+ MRAA_MTK_LINKIT = 9, /**< Mediatek MT7688 based Linkit (Air) */ - - // USB platform extenders start at 256 - MRAA_FTDI_FT4222 = 256, /**< FTDI FT4222 USB to i2c bridge */ ---- a/include/mraa_internal.h -+++ b/include/mraa_internal.h -@@ -66,6 +66,13 @@ - mraa_platform_t mraa_usb_platform_extender(mraa_board_t* board); - - /** -+ * runtime detect running arm platforms -+ * -+ * @return mraa_platform_t of the init'ed platform -+ */ -+mraa_platform_t mraa_mips_platform(); -+ -+/** - * helper function to check if file exists - * - * @param filename to check ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -71,6 +71,11 @@ - add_subdirectory(usb) - endif () - -+if (MIPSPLAT) -+ add_subdirectory(mips) -+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMIPSPLAT=1") -+endif() -+ - set (mraa_LIB_SRCS - ${mraa_LIB_PLAT_SRCS_NOAUTO} - # autogenerated version file ---- a/src/i2c/i2c.c -+++ b/src/i2c/i2c.c -@@ -31,9 +31,9 @@ - #include - #include - #include -+#include - #include - #include --#include - #include - #include "linux/i2c-dev.h" - ---- a/src/mraa.c -+++ b/src/mraa.c -@@ -111,6 +111,9 @@ - #elif defined(ARMPLAT) - // Use runtime ARM platform detection - platform_type = mraa_arm_platform(); -+#elif MIPSPLAT -+ // Use runtime ARM platform detection -+ platform_type = mraa_mips_platform(); - #else - #error mraa_ARCH NOTHING - #endif ---- a/src/uart/uart.c -+++ b/src/uart/uart.c -@@ -26,6 +26,7 @@ - - #include - #include -+#include - #include - #include - #include diff --git a/libs/libmraa/patches/0002-add-mips-support.patch b/libs/libmraa/patches/0002-add-mips-support.patch deleted file mode 100644 index 1936624f..00000000 --- a/libs/libmraa/patches/0002-add-mips-support.patch +++ /dev/null @@ -1,483 +0,0 @@ -From 2c67c6f51ce5bab18c79f4304ccf42716f59f13c Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Thu, 23 Jul 2015 13:21:25 +0200 -Subject: [PATCH 2/4] add mips support - -Signed-off-by: John Crispin ---- - include/mips/mediatek.h | 39 ++++++ - src/mips/CMakeLists.txt | 6 + - src/mips/mediatek.c | 349 +++++++++++++++++++++++++++++++++++++++++++++++ - src/mips/mips.c | 60 ++++++++ - 4 files changed, 454 insertions(+) - create mode 100644 include/mips/mediatek.h - create mode 100644 src/mips/CMakeLists.txt - create mode 100644 src/mips/mediatek.c - create mode 100644 src/mips/mips.c - ---- /dev/null -+++ b/include/mips/mediatek.h -@@ -0,0 +1,39 @@ -+/* -+ * Author: Thomas Ingleby -+ * Author: Michael Ring -+ * Copyright (c) 2014 Intel Corporation. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining -+ * a copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sublicense, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#pragma once -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+#include "mraa_internal.h" -+ -+mraa_board_t * -+ mraa_mtk_linkit(); -+ -+#ifdef __cplusplus -+} -+#endif ---- /dev/null -+++ b/src/mips/CMakeLists.txt -@@ -0,0 +1,6 @@ -+message (INFO " - Adding MIPS platforms") -+set (mraa_LIB_PLAT_SRCS_NOAUTO ${mraa_LIB_SRCS_NOAUTO} -+ ${PROJECT_SOURCE_DIR}/src/mips/mips.c -+ ${PROJECT_SOURCE_DIR}/src/mips/mediatek.c -+ PARENT_SCOPE -+) ---- /dev/null -+++ b/src/mips/mediatek.c -@@ -0,0 +1,349 @@ -+/* -+ * Author: Thomas Ingleby -+ * Author: Michael Ring -+ * Copyright (c) 2014 Intel Corporation. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining -+ * a copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sublicense, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "mraa_internal.h" -+ -+#include "common.h" -+ -+#define PLATFORM_MEDIATEK_LINKIT 1 -+#define PLATFORM_MEDIATEK_LINKIT_AIR 2 -+#define MMAP_PATH "/dev/mem" -+#define MT7628_GPIO_BASE 0x100 -+#define MT7628_BLOCK_SIZE (4 * 1024) -+#define MT7628_GPIO_CTRL 0x00 -+#define MT7628_GPIO_DATA 0x20 -+#define MT7628_GPIO_SET 0x30 -+#define MT7628_GPIO_CLEAR 0x40 -+ -+#define MAX_SIZE 64 -+ -+// MMAP -+static uint8_t* mmap_reg = NULL; -+static int mmap_fd = 0; -+static int mmap_size; -+static unsigned int mmap_count = 0; -+static int platform_detected = 0; -+ -+mraa_result_t -+mraa_mtk_linkit_mmap_write(mraa_gpio_context dev, int value) -+{ -+ volatile uint32_t* addr; -+ if (value) { -+ *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_SET + (dev->pin / 32) * 4) = -+ (uint32_t)(1 << (dev->pin % 32)); -+ } else { -+ *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_CLEAR + (dev->pin / 32) * 4) = -+ (uint32_t)(1 << (dev->pin % 32)); -+ } -+ return MRAA_SUCCESS; -+} -+ -+static mraa_result_t -+mraa_mtk_linkit_mmap_unsetup() -+{ -+ if (mmap_reg == NULL) { -+ syslog(LOG_ERR, "linkit mmap: null register can't unsetup"); -+ return MRAA_ERROR_INVALID_RESOURCE; -+ } -+ munmap(mmap_reg, mmap_size); -+ mmap_reg = NULL; -+ if (close(mmap_fd) != 0) { -+ return MRAA_ERROR_INVALID_RESOURCE; -+ } -+ return MRAA_SUCCESS; -+} -+ -+int -+mraa_mtk_linkit_mmap_read(mraa_gpio_context dev) -+{ -+ uint32_t value = *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_DATA + (dev->pin / 32) * 4); -+ if (value & (uint32_t)(1 << (dev->pin % 32))) { -+ return 1; -+ } -+ return 0; -+} -+ -+mraa_result_t -+mraa_mtk_linkit_mmap_setup(mraa_gpio_context dev, mraa_boolean_t en) -+{ -+ if (dev == NULL) { -+ syslog(LOG_ERR, "linkit mmap: context not valid"); -+ return MRAA_ERROR_INVALID_HANDLE; -+ } -+ -+ if (en == 0) { -+ if (dev->mmap_write == NULL && dev->mmap_read == NULL) { -+ syslog(LOG_ERR, "linkit mmap: can't disable disabled mmap gpio"); -+ return MRAA_ERROR_INVALID_PARAMETER; -+ } -+ dev->mmap_write = NULL; -+ dev->mmap_read = NULL; -+ mmap_count--; -+ if (mmap_count == 0) { -+ return mraa_mtk_linkit_mmap_unsetup(); -+ } -+ return MRAA_SUCCESS; -+ } -+ -+ if (dev->mmap_write != NULL && dev->mmap_read != NULL) { -+ syslog(LOG_ERR, "linkit mmap: can't enable enabled mmap gpio"); -+ return MRAA_ERROR_INVALID_PARAMETER; -+ } -+ -+ // Might need to make some elements of this thread safe. -+ // For example only allow one thread to enter the following block -+ // to prevent mmap'ing twice. -+ if (mmap_reg == NULL) { -+ if ((mmap_fd = open(MMAP_PATH, O_RDWR)) < 0) { -+ syslog(LOG_ERR, "linkit map: unable to open resource0 file"); -+ return MRAA_ERROR_INVALID_HANDLE; -+ } -+ -+ mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE, -+ MAP_FILE | MAP_SHARED, mmap_fd, MT7628_GPIO_BASE); -+ if (mmap_reg == MAP_FAILED) { -+ syslog(LOG_ERR, "linkit mmap: failed to mmap"); -+ mmap_reg = NULL; -+ close(mmap_fd); -+ return MRAA_ERROR_NO_RESOURCES; -+ } -+ } -+ dev->mmap_write = &mraa_mtk_linkit_mmap_write; -+ dev->mmap_read = &mraa_mtk_linkit_mmap_read; -+ mmap_count++; -+ -+ return MRAA_SUCCESS; -+} -+ -+mraa_board_t* -+mraa_mtk_linkit() -+{ -+ mraa_board_t* b = (mraa_board_t*) malloc(sizeof(mraa_board_t)); -+ if (b == NULL) { -+ return NULL; -+ } -+ -+ b->platform_name = "LINKIT"; -+ platform_detected = PLATFORM_MEDIATEK_LINKIT; -+ b->phy_pin_count = 31; -+ -+ b->aio_count = 0; -+ b->adc_raw = 0; -+ b->adc_supported = 0; -+ b->pwm_default_period = 500; -+ b->pwm_max_period = 2147483; -+ b->pwm_min_period = 1; -+ -+ b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count); -+ -+ advance_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup; -+ -+ strncpy(b->pins[0].name, "P0", MRAA_PIN_NAME_SIZE); -+ b->pins[0].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[1].name, "P1", MRAA_PIN_NAME_SIZE); -+ b->pins[1].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[2].name, "P2", MRAA_PIN_NAME_SIZE); -+ b->pins[2].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[3].name, "P3", MRAA_PIN_NAME_SIZE); -+ b->pins[3].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[4].name, "P4", MRAA_PIN_NAME_SIZE); -+ b->pins[4].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[5].name, "P5", MRAA_PIN_NAME_SIZE); -+ b->pins[5].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[6].name, "P6", MRAA_PIN_NAME_SIZE); -+ b->pins[6].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[7].name, "P7", MRAA_PIN_NAME_SIZE); -+ b->pins[7].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[8].name, "P8", MRAA_PIN_NAME_SIZE); -+ b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[8].gpio.pinmap = 21; -+ b->pins[8].uart.parent_id = 2; -+ b->pins[8].uart.mux_total = 0; -+ -+ strncpy(b->pins[9].name, "P9", MRAA_PIN_NAME_SIZE); -+ b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[9].gpio.pinmap = 20; -+ b->pins[9].uart.parent_id = 2; -+ b->pins[9].uart.mux_total = 0; -+ -+ strncpy(b->pins[10].name, "P10", MRAA_PIN_NAME_SIZE); -+ b->pins[10].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[10].gpio.pinmap = 2; -+ -+ strncpy(b->pins[11].name, "P11", MRAA_PIN_NAME_SIZE); -+ b->pins[11].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[11].gpio.pinmap = 3; -+ -+ strncpy(b->pins[12].name, "P12", MRAA_PIN_NAME_SIZE); -+ b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[12].gpio.pinmap = 0; -+ -+ strncpy(b->pins[13].name, "P13", MRAA_PIN_NAME_SIZE); -+ b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[13].gpio.pinmap = 1; -+ -+ strncpy(b->pins[14].name, "P14", MRAA_PIN_NAME_SIZE); -+ b->pins[14].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ -+ strncpy(b->pins[15].name, "P15", MRAA_PIN_NAME_SIZE); -+ b->pins[15].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[15].gpio.pinmap = 44; -+ -+ strncpy(b->pins[16].name, "P16", MRAA_PIN_NAME_SIZE); -+ b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[16].gpio.pinmap = 46; -+ b->pins[16].uart.parent_id = 1; -+ b->pins[16].uart.mux_total = 0; -+ -+ strncpy(b->pins[17].name, "P17", MRAA_PIN_NAME_SIZE); -+ b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[17].gpio.pinmap = 45; -+ b->pins[17].uart.parent_id = 1; -+ b->pins[17].uart.mux_total = 0; -+ -+ strncpy(b->pins[18].name, "P18", MRAA_PIN_NAME_SIZE); -+ b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[18].gpio.pinmap = 13; -+ b->pins[18].uart.parent_id = 1; -+ b->pins[18].uart.mux_total = 0; -+ -+ strncpy(b->pins[19].name, "P19", MRAA_PIN_NAME_SIZE); -+ b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[19].gpio.pinmap = 12; -+ b->pins[19].uart.parent_id = 0; -+ b->pins[19].uart.mux_total = 0; -+ -+ strncpy(b->pins[20].name, "P20", MRAA_PIN_NAME_SIZE); -+ b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 }; -+ b->pins[20].gpio.pinmap = 5; -+ b->pins[20].i2c.pinmap = 0; -+ b->pins[20].i2c.mux_total = 0; -+ -+ strncpy(b->pins[21].name, "P21", MRAA_PIN_NAME_SIZE); -+ b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 }; -+ b->pins[21].gpio.pinmap = 4; -+ b->pins[21].i2c.pinmap = 0; -+ b->pins[21].i2c.mux_total = 0; -+ -+ strncpy(b->pins[22].name, "P22", MRAA_PIN_NAME_SIZE); -+ b->pins[22].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -+ b->pins[22].gpio.pinmap = 8; -+ b->pins[22].spi.pinmap = 0; -+ b->pins[22].spi.mux_total = 0; -+ -+ strncpy(b->pins[23].name, "P23", MRAA_PIN_NAME_SIZE); -+ b->pins[23].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -+ b->pins[23].gpio.pinmap = 9; -+ b->pins[23].spi.pinmap = 0; -+ b->pins[23].spi.mux_total = 0; -+ -+ strncpy(b->pins[24].name, "P24", MRAA_PIN_NAME_SIZE); -+ b->pins[24].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -+ b->pins[24].gpio.pinmap = 7; -+ b->pins[24].spi.pinmap = 0; -+ b->pins[24].spi.mux_total = 0; -+ -+ strncpy(b->pins[25].name, "P25", MRAA_PIN_NAME_SIZE); -+ b->pins[25].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -+ b->pins[25].gpio.pinmap = 6; -+ b->pins[25].spi.pinmap = 0; -+ b->pins[25].spi.mux_total = 0; -+ -+ strncpy(b->pins[26].name, "P26", MRAA_PIN_NAME_SIZE); -+ b->pins[26].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 }; -+ b->pins[26].gpio.pinmap = 18; -+ -+ strncpy(b->pins[27].name, "P27", MRAA_PIN_NAME_SIZE); -+ b->pins[27].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 }; -+ b->pins[27].gpio.pinmap = 19; -+ -+ strncpy(b->pins[28].name, "P28", MRAA_PIN_NAME_SIZE); -+ b->pins[28].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[28].gpio.pinmap = 16; -+ -+ strncpy(b->pins[29].name, "P29", MRAA_PIN_NAME_SIZE); -+ b->pins[29].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[29].gpio.pinmap = 17; -+ -+ strncpy(b->pins[30].name, "P30", MRAA_PIN_NAME_SIZE); -+ b->pins[30].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[30].gpio.pinmap = 14; -+ -+ strncpy(b->pins[31].name, "P31", MRAA_PIN_NAME_SIZE); -+ b->pins[31].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[31].gpio.pinmap = 15; -+ -+ // BUS DEFINITIONS -+ b->i2c_bus_count = 1; -+ b->def_i2c_bus = 0; -+ b->i2c_bus[0].bus_id = 0; -+ b->i2c_bus[0].sda = 20; -+ b->i2c_bus[0].scl = 21; -+ -+ b->spi_bus_count = 1; -+ b->def_spi_bus = 0; -+ b->spi_bus[0].bus_id = 0; -+ b->spi_bus[0].slave_s = 0; -+ b->spi_bus[0].cs = 25; -+ b->spi_bus[0].mosi = 22; -+ b->spi_bus[0].miso = 23; -+ b->spi_bus[0].sclk = 21; -+ -+ b->uart_dev_count = 3; -+ b->def_uart_dev = 0; -+ b->uart_dev[0].rx = 18; -+ b->uart_dev[0].tx = 19; -+ -+ b->uart_dev[1].rx = 16; -+ b->uart_dev[1].tx = 17; -+ -+ b->uart_dev[2].rx = 9; -+ b->uart_dev[2].tx = 8; -+ -+ b->gpio_count = 0; -+ int i; -+ for (i = 0; i < b->phy_pin_count; i++) { -+ if (b->pins[i].capabilites.gpio) { -+ b->gpio_count++; -+ } -+ } -+ -+ return b; -+} ---- /dev/null -+++ b/src/mips/mips.c -@@ -0,0 +1,60 @@ -+/* -+ * Author: Thomas Ingleby -+ * Author: Michael Ring -+ * Copyright (c) 2014 Intel Corporation. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining -+ * a copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sublicense, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include -+#include -+ -+#include "mraa_internal.h" -+#include "mips/mediatek.h" -+ -+mraa_platform_t -+mraa_mips_platform() -+{ -+ mraa_platform_t platform_type = MRAA_UNKNOWN_PLATFORM; -+ size_t len = 100; -+ char* line = malloc(len); -+ FILE* fh = fopen("/proc/cpuinfo", "r"); -+ if (fh != NULL) { -+ while (getline(&line, &len, fh) != -1) { -+ if (strncmp(line, "machine", 7) == 0) { -+ if (strstr(line, "MediaTek LinkIt Smart 7688")) { -+ platform_type = MRAA_MTK_LINKIT; -+ } -+ } -+ } -+ fclose(fh); -+ } -+ free(line); -+ -+ switch (platform_type) { -+ case MRAA_MTK_LINKIT: -+ plat = mraa_mtk_linkit(); -+ break; -+ default: -+ plat = NULL; -+ syslog(LOG_ERR, "Unknown Platform, currently not supported by MRAA"); -+ } -+ return platform_type; -+} diff --git a/libs/libmraa/patches/0003-uart.patch b/libs/libmraa/patches/0003-uart.patch deleted file mode 100644 index 647abc5f..00000000 --- a/libs/libmraa/patches/0003-uart.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9540f9b93704e8e80ab2048954ca88d8e6eddf86 Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Thu, 23 Jul 2015 16:43:42 +0200 -Subject: [PATCH 3/4] uart - ---- - src/uart/uart.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/uart/uart.c b/src/uart/uart.c -index 3ef55a4..5102f81 100644 ---- a/src/uart/uart.c -+++ b/src/uart/uart.c -@@ -34,6 +34,9 @@ - #include "uart.h" - #include "mraa_internal.h" - -+#ifndef CMSPAR -+#define CMSPAR 010000000000 -+#endif - // This function takes an unsigned int and converts it to a B* speed_t - // that can be used with linux/posix termios - static speed_t --- -1.7.10.4 - diff --git a/libs/libmraa/patches/0004-fixes.patch b/libs/libmraa/patches/0004-fixes.patch deleted file mode 100644 index 40e5930e..00000000 --- a/libs/libmraa/patches/0004-fixes.patch +++ /dev/null @@ -1,666 +0,0 @@ -From 3c34e5f87a741ec2fc7809fc8c169a832275d32c Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Thu, 23 Jul 2015 18:19:32 +0200 -Subject: [PATCH 4/4] fixes - ---- - src/mips/mediatek.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/src/mips/mediatek.c -+++ b/src/mips/mediatek.c -@@ -37,12 +37,12 @@ - #define PLATFORM_MEDIATEK_LINKIT 1 - #define PLATFORM_MEDIATEK_LINKIT_AIR 2 - #define MMAP_PATH "/dev/mem" --#define MT7628_GPIO_BASE 0x100 --#define MT7628_BLOCK_SIZE (4 * 1024) --#define MT7628_GPIO_CTRL 0x00 --#define MT7628_GPIO_DATA 0x20 --#define MT7628_GPIO_SET 0x30 --#define MT7628_GPIO_CLEAR 0x40 -+#define MT7628_GPIOMODE_BASE 0x10000000 -+#define MT7628_BLOCK_SIZE 0x1000 -+#define MT7628_GPIO_CTRL 0x600 -+#define MT7628_GPIO_DATA 0x620 -+#define MT7628_GPIO_SET 0x630 -+#define MT7628_GPIO_CLEAR 0x640 - - #define MAX_SIZE 64 - -@@ -50,6 +50,9 @@ - static uint8_t* mmap_reg = NULL; - static int mmap_fd = 0; - static int mmap_size; -+static uint8_t* gpio_mmap_reg = NULL; -+static int gpio_mmap_fd = 0; -+static int gpio_mmap_size; - static unsigned int mmap_count = 0; - static int platform_detected = 0; - -@@ -129,9 +132,10 @@ - } - - mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE, -- MAP_FILE | MAP_SHARED, mmap_fd, MT7628_GPIO_BASE); -+ MAP_FILE | MAP_SHARED, mmap_fd, 0x10000000); - if (mmap_reg == MAP_FAILED) { -- syslog(LOG_ERR, "linkit mmap: failed to mmap"); -+ perror("foo"); -+ syslog(LOG_ERR, "linkit mmap: failed to mmap"); - mmap_reg = NULL; - close(mmap_fd); - return MRAA_ERROR_NO_RESOURCES; -@@ -144,201 +148,442 @@ - return MRAA_SUCCESS; - } - -+static int mmap_gpiomode(void) -+{ -+ if ((gpio_mmap_fd = open(MMAP_PATH, O_RDWR)) < 0) { -+ syslog(LOG_ERR, "linkit map: unable to open resource0 file"); -+ return MRAA_ERROR_INVALID_HANDLE; -+ } -+ -+ gpio_mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE, -+ MAP_FILE | MAP_SHARED, gpio_mmap_fd, MT7628_GPIOMODE_BASE); -+ if (gpio_mmap_reg == MAP_FAILED) { -+ syslog(LOG_ERR, "linkit gpio_mmap: failed to mmap"); -+ gpio_mmap_reg = NULL; -+ close(gpio_mmap_fd); -+ return MRAA_ERROR_NO_RESOURCES; -+ } -+ return 0; -+} -+ -+static void set_gpiomode(unsigned int mask, unsigned int shift, unsigned int val) -+{ -+ unsigned int reg; -+ unsigned int offset = 0x60; -+ -+ if (shift >= 32) { -+ shift -= 32; -+ offset += 4; -+ } -+ -+ reg = *(volatile uint32_t*) (gpio_mmap_reg + offset); -+ -+ reg &= ~(mask << shift); -+ reg |= (val << shift); -+ *(volatile uint32_t*) (gpio_mmap_reg + offset) = reg; -+} -+ -+enum { -+ MUX_GPIO = 0, -+ MUX_SPI_S, -+ MUX_SPI_CS1, -+ MUX_I2S, -+ MUX_UART0, -+ MUX_I2C, -+ MUX_UART1, -+ MUX_UART2, -+ MUX_PWM0, -+ MUX_PWM1, -+ MUX_EPHY, -+ MUX_WLED, -+ __MUX_MAX, -+}; -+ -+static unsigned char gpio_mux_groups[64]; -+static struct pinmux { -+ char *name; -+ char *func[4]; -+ unsigned int shift; -+ unsigned int mask; -+} mt7688_mux[] = { -+ { -+ .name = "refclk", -+ .func = { "refclk", "gpio", NULL, NULL }, -+ .shift = 18, -+ .mask = 0x1, -+ }, { -+ .name = "spi_s", -+ .func = { "spi_s", "gpio", "utif", "pwm" }, -+ .shift = 2, -+ .mask = 0x3, -+ }, { -+ .name = "spi_cs1", -+ .func = { "spi_cs1", "gpio", NULL, "refclk" }, -+ .shift = 4, -+ .mask = 0x3, -+ }, { -+ .name = "i2s", -+ .func = { "i2s", "gpio", "pcm", NULL }, -+ .shift = 6, -+ .mask = 0x3, -+ }, { -+ .name = "uart0", -+ .func = { "uart", "gpio", NULL, NULL }, -+ .shift = 8, -+ .mask = 0x3, -+ }, { -+ .name = "i2c", -+ .func = { "i2c", "gpio", NULL, NULL }, -+ .shift = 20, -+ .mask = 0x3, -+ }, { -+ .name = "uart1", -+ .func = { "uart", "gpio", NULL, NULL }, -+ .shift = 24, -+ .mask = 0x3, -+ }, { -+ .name = "uart2", -+ .func = { "uart", "gpio", "pwm", NULL }, -+ .shift = 26, -+ .mask = 0x3, -+ }, { -+ .name = "pwm0", -+ .func = { "pwm", "gpio", NULL, NULL }, -+ .shift = 28, -+ .mask = 0x3, -+ }, { -+ .name = "pwm1", -+ .func = { "pwm", "gpio", NULL, NULL }, -+ .shift = 30, -+ .mask = 0x3, -+ }, { -+ .name = "ephy", -+ .func = { "ephy", "gpio", NULL, NULL }, -+ .shift = 34, -+ .mask = 0x3, -+ }, { -+ .name = "wled", -+ .func = { "wled", "gpio", NULL, NULL }, -+ .shift = 32, -+ .mask = 0x3, -+ }, -+}; -+ -+mraa_result_t gpio_init_pre(int pin) -+{ -+ struct pinmux *m = &mt7688_mux[gpio_mux_groups[pin]]; -+ -+ set_gpiomode(m->mask, m->shift, 1); -+ -+ return 0; -+} -+ -+static void gpiomode_set(unsigned int id, char *name) -+{ -+ int i; -+ -+ if (id >= __MUX_MAX) -+ return; -+ -+ for (i = 0; i < 4; i++) { -+ if (!mt7688_mux[id].func[i] || strcmp(mt7688_mux[id].func[i], name)) -+ continue; -+ set_gpiomode(mt7688_mux[id].mask, mt7688_mux[id].shift, i); -+ syslog(0, "mraa: set pinmux %s -> %s\n", mt7688_mux[id].name, name); -+ return; -+ } -+} -+ -+mraa_result_t i2c_init_pre(unsigned int bus) -+{ -+ gpiomode_set(MUX_I2C, "i2c"); -+ return 0; -+} -+ -+mraa_result_t -+pwm_init_post(mraa_pwm_context pwm) -+{ -+ switch(pwm->pin) { -+ case 0: -+ gpiomode_set(MUX_PWM0, "pwm"); -+ break; -+ case 1: -+ gpiomode_set(MUX_PWM1, "pwm"); -+ break; -+ case 2: -+ case 3: -+ gpiomode_set(MUX_UART2, "pwm"); -+ break; -+ } -+ return 0; -+} -+ -+mraa_result_t spi_init_pre(int bus) -+{ -+ gpiomode_set(MUX_SPI_CS1, "spi_cs1"); -+ return 0; -+} -+ -+mraa_result_t uart_init_pre(int index) -+{ -+ switch(index) { -+ case 0: -+ gpiomode_set(MUX_UART0, "uart"); -+ break; -+ case 1: -+ gpiomode_set(MUX_UART1, "uart"); -+ break; -+ case 2: -+ gpiomode_set(MUX_UART2, "uart"); -+ break; -+ } -+ return 0; -+} -+ -+mraa_result_t -+i2c_freq(mraa_i2c_context dev, mraa_i2c_mode_t mode) -+{ -+ switch (mode) { -+ case MRAA_I2C_STD: -+ break; -+ default: -+ syslog(LOG_ERR, "Invalid i2c frequency"); -+ break; -+ } -+ return MRAA_SUCCESS; -+} -+ -+ - mraa_board_t* - mraa_mtk_linkit() - { -+ int i; -+ -+ if (mmap_gpiomode()) -+ return NULL; -+ - mraa_board_t* b = (mraa_board_t*) malloc(sizeof(mraa_board_t)); - if (b == NULL) { - return NULL; - } - -- b->platform_name = "LINKIT"; -+ memset(b, 0, sizeof(mraa_board_t)); -+ -+ b->platform_name = "LinkIt Smart 7688"; - platform_detected = PLATFORM_MEDIATEK_LINKIT; -- b->phy_pin_count = 31; -+ b->phy_pin_count = 64; - - b->aio_count = 0; - b->adc_raw = 0; - b->adc_supported = 0; - b->pwm_default_period = 500; -- b->pwm_max_period = 2147483; -+ b->pwm_max_period = 1000000; - b->pwm_min_period = 1; - -- b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count); -- -- advance_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup; -- -- strncpy(b->pins[0].name, "P0", MRAA_PIN_NAME_SIZE); -- b->pins[0].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -- -- strncpy(b->pins[1].name, "P1", MRAA_PIN_NAME_SIZE); -- b->pins[1].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -- -- strncpy(b->pins[2].name, "P2", MRAA_PIN_NAME_SIZE); -- b->pins[2].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -- -- strncpy(b->pins[3].name, "P3", MRAA_PIN_NAME_SIZE); -- b->pins[3].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -- -- strncpy(b->pins[4].name, "P4", MRAA_PIN_NAME_SIZE); -- b->pins[4].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -- -- strncpy(b->pins[5].name, "P5", MRAA_PIN_NAME_SIZE); -- b->pins[5].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -- -- strncpy(b->pins[6].name, "P6", MRAA_PIN_NAME_SIZE); -- b->pins[6].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -- -- strncpy(b->pins[7].name, "P7", MRAA_PIN_NAME_SIZE); -- b->pins[7].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -- -- strncpy(b->pins[8].name, "P8", MRAA_PIN_NAME_SIZE); -- b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -- b->pins[8].gpio.pinmap = 21; -- b->pins[8].uart.parent_id = 2; -- b->pins[8].uart.mux_total = 0; -+ b->adv_func = (mraa_adv_func_t*) calloc(1, sizeof(mraa_adv_func_t)); -+ if (b->adv_func == NULL) { -+ return NULL; -+ } - -- strncpy(b->pins[9].name, "P9", MRAA_PIN_NAME_SIZE); -- b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -- b->pins[9].gpio.pinmap = 20; -- b->pins[9].uart.parent_id = 2; -- b->pins[9].uart.mux_total = 0; -+ b->adv_func->i2c_init_pre = i2c_init_pre; -+ b->adv_func->pwm_init_post = pwm_init_post; -+ b->adv_func->spi_init_pre = spi_init_pre; -+ b->adv_func->uart_init_pre = uart_init_pre; -+ b->adv_func->gpio_init_pre = gpio_init_pre; -+ b->adv_func->i2c_set_frequency_replace = &i2c_freq; - -- strncpy(b->pins[10].name, "P10", MRAA_PIN_NAME_SIZE); -- b->pins[10].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[10].gpio.pinmap = 2; -+ b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count); - -- strncpy(b->pins[11].name, "P11", MRAA_PIN_NAME_SIZE); -- b->pins[11].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[11].gpio.pinmap = 3; -+ memset(b->pins, 0, sizeof(mraa_pininfo_t) * b->phy_pin_count); -+ memset(gpio_mux_groups, -1, sizeof(gpio_mux_groups)); - -- strncpy(b->pins[12].name, "P12", MRAA_PIN_NAME_SIZE); -- b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[12].gpio.pinmap = 0; -+ b->adv_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup; - -- strncpy(b->pins[13].name, "P13", MRAA_PIN_NAME_SIZE); -- b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[13].gpio.pinmap = 1; -+ for (i = 0; i < b->phy_pin_count; i++) { -+ snprintf(b->pins[i].name, MRAA_PIN_NAME_SIZE, "GPIO%d", i); -+ b->pins[i].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ } - -- strncpy(b->pins[14].name, "P14", MRAA_PIN_NAME_SIZE); -- b->pins[14].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 }; -+ strncpy(b->pins[43].name, "GPIO43", MRAA_PIN_NAME_SIZE); -+ b->pins[43].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[43].gpio.pinmap = 43; -+ gpio_mux_groups[43] = MUX_EPHY; -+ -+ strncpy(b->pins[20].name, "GPIO20", MRAA_PIN_NAME_SIZE); -+ b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 1 }; -+ b->pins[20].gpio.pinmap = 20; -+ b->pins[20].uart.parent_id = 2; -+ b->pins[20].uart.mux_total = 0; -+ b->pins[20].pwm.parent_id = 0; -+ b->pins[20].pwm.pinmap = 2; -+ gpio_mux_groups[20] = MUX_UART2; -+ -+ strncpy(b->pins[21].name, "GPIO21", MRAA_PIN_NAME_SIZE); -+ b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 1 }; -+ b->pins[21].gpio.pinmap = 21; -+ b->pins[21].uart.parent_id = 2; -+ b->pins[21].uart.mux_total = 0; -+ b->pins[21].pwm.parent_id = 0; -+ b->pins[21].pwm.pinmap = 3; -+ gpio_mux_groups[21] = MUX_UART2; -+ -+ strncpy(b->pins[2].name, "GPIO2", MRAA_PIN_NAME_SIZE); -+ b->pins[2].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[2].gpio.pinmap = 2; -+ gpio_mux_groups[2] = MUX_I2S; -+ -+ strncpy(b->pins[3].name, "GPIO3", MRAA_PIN_NAME_SIZE); -+ b->pins[3].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[3].gpio.pinmap = 3; -+ gpio_mux_groups[3] = MUX_I2S; -+ -+ strncpy(b->pins[0].name, "GPIO0", MRAA_PIN_NAME_SIZE); -+ b->pins[0].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[0].gpio.pinmap = 0; -+ gpio_mux_groups[0] = MUX_I2S; -+ -+ strncpy(b->pins[1].name, "GPIO1", MRAA_PIN_NAME_SIZE); -+ b->pins[1].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[1].gpio.pinmap = 1; -+ gpio_mux_groups[1] = MUX_I2S; -+ -+ strncpy(b->pins[37].name, "GPIO37", MRAA_PIN_NAME_SIZE); -+ b->pins[37].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[37].gpio.pinmap = 37; -+ gpio_mux_groups[37] = MUX_GPIO; -+ -+ strncpy(b->pins[44].name, "GPIO44", MRAA_PIN_NAME_SIZE); -+ b->pins[44].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[44].gpio.pinmap = 44; -+ gpio_mux_groups[44] = MUX_WLED; -+ -+ strncpy(b->pins[46].name, "GPIO46", MRAA_PIN_NAME_SIZE); -+ b->pins[46].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[46].gpio.pinmap = 46; -+ b->pins[46].uart.parent_id = 1; -+ b->pins[46].uart.mux_total = 0; -+ gpio_mux_groups[46] = MUX_UART1; -+ -+ strncpy(b->pins[45].name, "GPIO45", MRAA_PIN_NAME_SIZE); -+ b->pins[45].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[45].gpio.pinmap = 45; -+ b->pins[45].uart.parent_id = 1; -+ b->pins[45].uart.mux_total = 0; -+ gpio_mux_groups[45] = MUX_UART1; -+ -+ strncpy(b->pins[13].name, "GPIO13", MRAA_PIN_NAME_SIZE); -+ b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[13].gpio.pinmap = 13; -+ b->pins[13].uart.parent_id = 1; -+ b->pins[13].uart.mux_total = 0; -+ gpio_mux_groups[13] = MUX_UART0; -+ -+ strncpy(b->pins[12].name, "GPIO12", MRAA_PIN_NAME_SIZE); -+ b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -+ b->pins[12].gpio.pinmap = 12; -+ b->pins[12].uart.parent_id = 0; -+ b->pins[12].uart.mux_total = 0; -+ gpio_mux_groups[12] = MUX_UART0; -+ -+ strncpy(b->pins[5].name, "GPIO5", MRAA_PIN_NAME_SIZE); -+ b->pins[5].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 }; -+ b->pins[5].gpio.pinmap = 5; -+ b->pins[5].i2c.pinmap = 0; -+ b->pins[5].i2c.mux_total = 0; -+ gpio_mux_groups[5] = MUX_I2C; -+ -+ strncpy(b->pins[4].name, "GPIO4", MRAA_PIN_NAME_SIZE); -+ b->pins[4].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 }; -+ b->pins[4].gpio.pinmap = 4; -+ b->pins[4].i2c.pinmap = 0; -+ b->pins[4].i2c.mux_total = 0; -+ gpio_mux_groups[4] = MUX_I2C; -+ -+ strncpy(b->pins[6].name, "GPIO6", MRAA_PIN_NAME_SIZE); -+ b->pins[6].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -+ b->pins[6].gpio.pinmap = 6; -+ b->pins[6].spi.pinmap = 0; -+ b->pins[6].spi.mux_total = 0; -+ gpio_mux_groups[6] = MUX_SPI_CS1; -+ -+ strncpy(b->pins[7].name, "GPIO7", MRAA_PIN_NAME_SIZE); -+ b->pins[7].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 }; -+ b->pins[7].spi.pinmap = 0; -+ b->pins[7].spi.mux_total = 0; -+ -+ strncpy(b->pins[8].name, "GPIO8", MRAA_PIN_NAME_SIZE); -+ b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 }; -+ b->pins[8].spi.pinmap = 0; -+ b->pins[8].spi.mux_total = 0; -+ -+ strncpy(b->pins[9].name, "GPIO9", MRAA_PIN_NAME_SIZE); -+ b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 }; -+ b->pins[9].spi.pinmap = 0; -+ b->pins[9].spi.mux_total = 0; -+ -+ strncpy(b->pins[18].name, "GPIO18", MRAA_PIN_NAME_SIZE); -+ b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 }; -+ b->pins[18].gpio.pinmap = 18; -+ b->pins[18].pwm.parent_id = 0; -+ b->pins[18].pwm.pinmap = 0; -+ gpio_mux_groups[18] = MUX_PWM0; -+ -+ strncpy(b->pins[19].name, "GPIO19", MRAA_PIN_NAME_SIZE); -+ b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 }; -+ b->pins[19].gpio.pinmap = 19; -+ b->pins[19].pwm.parent_id = 0; -+ b->pins[19].pwm.pinmap = 1; -+ gpio_mux_groups[19] = MUX_PWM1; -+ -+ strncpy(b->pins[16].name, "GPIO16", MRAA_PIN_NAME_SIZE); -+ b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[16].gpio.pinmap = 16; -+ gpio_mux_groups[16] = MUX_SPI_S; -+ -+ strncpy(b->pins[17].name, "GPIO17", MRAA_PIN_NAME_SIZE); -+ b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[17].gpio.pinmap = 17; -+ gpio_mux_groups[17] = MUX_SPI_S; -+ -+ strncpy(b->pins[14].name, "GPIO14", MRAA_PIN_NAME_SIZE); -+ b->pins[14].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -+ b->pins[14].gpio.pinmap = 14; -+ gpio_mux_groups[14] = MUX_SPI_S; - -- strncpy(b->pins[15].name, "P15", MRAA_PIN_NAME_SIZE); -+ strncpy(b->pins[15].name, "GPIO15", MRAA_PIN_NAME_SIZE); - b->pins[15].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[15].gpio.pinmap = 44; -- -- strncpy(b->pins[16].name, "P16", MRAA_PIN_NAME_SIZE); -- b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -- b->pins[16].gpio.pinmap = 46; -- b->pins[16].uart.parent_id = 1; -- b->pins[16].uart.mux_total = 0; -- -- strncpy(b->pins[17].name, "P17", MRAA_PIN_NAME_SIZE); -- b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -- b->pins[17].gpio.pinmap = 45; -- b->pins[17].uart.parent_id = 1; -- b->pins[17].uart.mux_total = 0; -- -- strncpy(b->pins[18].name, "P18", MRAA_PIN_NAME_SIZE); -- b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -- b->pins[18].gpio.pinmap = 13; -- b->pins[18].uart.parent_id = 1; -- b->pins[18].uart.mux_total = 0; -- -- strncpy(b->pins[19].name, "P19", MRAA_PIN_NAME_SIZE); -- b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 }; -- b->pins[19].gpio.pinmap = 12; -- b->pins[19].uart.parent_id = 0; -- b->pins[19].uart.mux_total = 0; -- -- strncpy(b->pins[20].name, "P20", MRAA_PIN_NAME_SIZE); -- b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 }; -- b->pins[20].gpio.pinmap = 5; -- b->pins[20].i2c.pinmap = 0; -- b->pins[20].i2c.mux_total = 0; -- -- strncpy(b->pins[21].name, "P21", MRAA_PIN_NAME_SIZE); -- b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 }; -- b->pins[21].gpio.pinmap = 4; -- b->pins[21].i2c.pinmap = 0; -- b->pins[21].i2c.mux_total = 0; -- -- strncpy(b->pins[22].name, "P22", MRAA_PIN_NAME_SIZE); -- b->pins[22].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -- b->pins[22].gpio.pinmap = 8; -- b->pins[22].spi.pinmap = 0; -- b->pins[22].spi.mux_total = 0; -- -- strncpy(b->pins[23].name, "P23", MRAA_PIN_NAME_SIZE); -- b->pins[23].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -- b->pins[23].gpio.pinmap = 9; -- b->pins[23].spi.pinmap = 0; -- b->pins[23].spi.mux_total = 0; -- -- strncpy(b->pins[24].name, "P24", MRAA_PIN_NAME_SIZE); -- b->pins[24].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -- b->pins[24].gpio.pinmap = 7; -- b->pins[24].spi.pinmap = 0; -- b->pins[24].spi.mux_total = 0; -- -- strncpy(b->pins[25].name, "P25", MRAA_PIN_NAME_SIZE); -- b->pins[25].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 }; -- b->pins[25].gpio.pinmap = 6; -- b->pins[25].spi.pinmap = 0; -- b->pins[25].spi.mux_total = 0; -- -- strncpy(b->pins[26].name, "P26", MRAA_PIN_NAME_SIZE); -- b->pins[26].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 }; -- b->pins[26].gpio.pinmap = 18; -- -- strncpy(b->pins[27].name, "P27", MRAA_PIN_NAME_SIZE); -- b->pins[27].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 }; -- b->pins[27].gpio.pinmap = 19; -- -- strncpy(b->pins[28].name, "P28", MRAA_PIN_NAME_SIZE); -- b->pins[28].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[28].gpio.pinmap = 16; -- -- strncpy(b->pins[29].name, "P29", MRAA_PIN_NAME_SIZE); -- b->pins[29].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[29].gpio.pinmap = 17; -- -- strncpy(b->pins[30].name, "P30", MRAA_PIN_NAME_SIZE); -- b->pins[30].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[30].gpio.pinmap = 14; -- -- strncpy(b->pins[31].name, "P31", MRAA_PIN_NAME_SIZE); -- b->pins[31].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; -- b->pins[31].gpio.pinmap = 15; -+ b->pins[15].gpio.pinmap = 15; -+ gpio_mux_groups[15] = MUX_SPI_S; - - // BUS DEFINITIONS - b->i2c_bus_count = 1; - b->def_i2c_bus = 0; -- b->i2c_bus[0].bus_id = 0; -- b->i2c_bus[0].sda = 20; -- b->i2c_bus[0].scl = 21; -+ b->i2c_bus[0].bus_id = 0; -+ b->i2c_bus[0].sda = 5; -+ b->i2c_bus[0].scl = 4; - - b->spi_bus_count = 1; - b->def_spi_bus = 0; -- b->spi_bus[0].bus_id = 0; -- b->spi_bus[0].slave_s = 0; -- b->spi_bus[0].cs = 25; -- b->spi_bus[0].mosi = 22; -- b->spi_bus[0].miso = 23; -- b->spi_bus[0].sclk = 21; -+ b->spi_bus[0].bus_id = 32766; -+ b->spi_bus[0].slave_s = 1; -+ b->spi_bus[0].cs = 6; -+ b->spi_bus[0].mosi = 8; -+ b->spi_bus[0].miso = 9; -+ b->spi_bus[0].sclk = 7; - - b->uart_dev_count = 3; - b->def_uart_dev = 0; -- b->uart_dev[0].rx = 18; -- b->uart_dev[0].tx = 19; -- -- b->uart_dev[1].rx = 16; -- b->uart_dev[1].tx = 17; -- -- b->uart_dev[2].rx = 9; -- b->uart_dev[2].tx = 8; -+ b->uart_dev[0].rx = 13; -+ b->uart_dev[0].tx = 12; -+ b->uart_dev[0].device_path = "/dev/ttyS0"; -+ b->uart_dev[1].rx = 46; -+ b->uart_dev[1].tx = 45; -+ b->uart_dev[1].device_path = "/dev/ttyS1"; -+ b->uart_dev[2].rx = 21; -+ b->uart_dev[2].tx = 20; -+ b->uart_dev[2].device_path = "/dev/ttyS2"; - - b->gpio_count = 0; -- int i; - for (i = 0; i < b->phy_pin_count; i++) { - if (b->pins[i].capabilites.gpio) { - b->gpio_count++; ---- a/src/gpio/gpio.c -+++ b/src/gpio/gpio.c -@@ -113,6 +113,8 @@ - close(export); - } - -+ mraa_gpio_use_mmaped(dev, 1); -+ - init_internal_cleanup: - if (status != MRAA_SUCCESS) { - if (dev != NULL) diff --git a/libs/libmraa/patches/010-version.patch b/libs/libmraa/patches/010-version.patch new file mode 100644 index 00000000..60f8ac86 --- /dev/null +++ b/libs/libmraa/patches/010-version.patch @@ -0,0 +1,16 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,12 +106,7 @@ endif() + set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) + + # Make a version file containing the current version from git. +-include (GetGitRevisionDescription) +-git_describe (VERSION "--tags") +-if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_HEAD-HASH-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_-128-NOTFOUND") +- message (WARNING " - Install git to compile a production libmraa!") +- set (VERSION "v2.1.0") +-endif () ++set (VERSION "v2.1.0") + + message (STATUS "INFO - libmraa Version ${VERSION}") + message (STATUS "INFO - cmake Version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}") diff --git a/libs/libnatpmp/Makefile b/libs/libnatpmp/Makefile index b7b52b4a..8f36d1c1 100644 --- a/libs/libnatpmp/Makefile +++ b/libs/libnatpmp/Makefile @@ -9,22 +9,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnatpmp PKG_VERSION:=20150609 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files PKG_HASH:=e1aa9c4c4219bc06943d6b2130f664daee213fb262fcb94dd355815b8f4536b0 -PKG_MAINTAINER:=Hauke Mehrtens -PKG_LICENSE:=BSD-3c + +PKG_MAINTAINER:= +PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE -PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/libnatpmp/Default TITLE:=NAT Port Mapping Protocol (NAT-PMP) - URL:=http://miniupnp.free.fr/libnatpmp.html + URL:=https://miniupnp.tuxfamily.org/libnatpmp.html endef define Package/libnatpmp/Default/description @@ -39,6 +42,7 @@ define Package/libnatpmp SECTION:=libs CATEGORY:=Libraries TITLE+= library + ABI_VERSION:=1 endef define Package/libnatpmp/description @@ -60,22 +64,9 @@ define Package/natpmpc/description This package contains the natpmp client. endef -MAKE_FLAGS += \ - COPTS="$(TARGET_CFLAGS)" \ - PREFIX="$(PKG_INSTALL_DIR)" \ - OS="Linux" - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/declspec.h $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/natpmp.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp*.{so*,a} $(1)/usr/lib/ -endef - define Package/libnatpmp/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/ endef define Package/natpmpc/install diff --git a/libs/libnatpmp/patches/001-install_declspec.patch b/libs/libnatpmp/patches/001-install_declspec.patch deleted file mode 100644 index d79dd3f6..00000000 --- a/libs/libnatpmp/patches/001-install_declspec.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -56,7 +56,7 @@ else - endif - endif - --HEADERS = natpmp.h -+HEADERS = natpmp.h declspec.h - - EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static - diff --git a/libs/libnatpmp/patches/010-cmake.patch b/libs/libnatpmp/patches/010-cmake.patch new file mode 100644 index 00000000..c3909ed6 --- /dev/null +++ b/libs/libnatpmp/patches/010-cmake.patch @@ -0,0 +1,53 @@ +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,50 @@ ++cmake_minimum_required(VERSION 2.8.12) ++ ++if(POLICY CMP0048) ++ cmake_policy(SET CMP0048 NEW) ++endif() ++ ++project(natpmp C) ++ ++set (NATPMP_VERSION 20150609) ++set (NATPMP_API_VERSION 1) ++ ++set (NATPMP_SOURCES ++ natpmp.c ++ getgateway.c ++) ++ ++if (WIN32) ++ set (NATPMP_SOURCES ${NATPMP_SOURCES} wingettimeofday.c) ++endif (WIN32) ++ ++# Library itself ++add_library(natpmp SHARED ${NATPMP_SOURCES}) ++set_target_properties (natpmp PROPERTIES OUTPUT_NAME "natpmp") ++set_target_properties (natpmp PROPERTIES VERSION ${NATPMP_VERSION}) ++set_target_properties (natpmp PROPERTIES SOVERSION ${NATPMP_API_VERSION}) ++target_compile_definitions(natpmp PRIVATE -DENABLE_STRNATPMPERR) ++target_include_directories(natpmp PUBLIC ${CMAKE_CURRENT_LIST_DIR}) ++ ++if (WIN32) ++ target_link_libraries(natpmp PUBLIC ws2_32 Iphlpapi) ++ target_compile_definitions(natpmp PUBLIC -DNATPMP_STATICLIB) ++endif (WIN32) ++ ++install(TARGETS natpmp ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ ++# Executables ++add_executable(natpmpc natpmpc.c) ++target_link_libraries(natpmpc natpmp) ++ ++install(FILES natpmpc DESTINATION bin) ++ ++add_executable(testgetgateway ++ testgetgateway.c ++ getgateway.c) ++target_link_libraries(testgetgateway natpmp) ++ ++install(FILES natpmp.h DESTINATION include) diff --git a/libs/libndpi/Makefile b/libs/libndpi/Makefile index e66ddba7..b5d8d29e 100644 --- a/libs/libndpi/Makefile +++ b/libs/libndpi/Makefile @@ -8,22 +8,24 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libndpi -PKG_VERSION:=2.2 +PKG_VERSION:=3.2 PKG_RELEASE:=1 -PKG_MAINTAINER:=Banglang Huang -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/ntop/nDPI.git -PKG_SOURCE_VERSION:=56dcf659de5de5385406068704a89c6a39e34041 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/ntop/nDPI/tar.gz/$(PKG_VERSION)? +PKG_HASH:=6808c8c4495343e67863f4d30bb261c1e2daec5628ae0be257ba2a2dea7ec70a +PKG_BUILD_DIR:=$(BUILD_DIR)/nDPI-$(PKG_VERSION) -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=425f48e21295d4b522d0190181bd5943ae0664c20a3aa47f3c62611dd4c7b93f -PKG_LICENSE:=LGPLv3 +PKG_MAINTAINER:=Banglang Huang , Toni Uhlig +PKG_LICENSE:=LGPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING -PKG_INSTALL:=1 PKG_FIXUP:=autoreconf +PKG_REMOVE_FILES:=autogen.sh +PKG_BUILD_DEPENDS:=libpcap +PKG_BUILD_PARALLEL:=1 +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/libndpi @@ -31,44 +33,45 @@ define Package/libndpi CATEGORY:=Libraries TITLE:=Library for deep-packet inspection URL:=https://github.com/ntop/nDPI - DEPENDS:=+libpcap +libjson-c + DEPENDS:=$(CXX_DEPENDS) +libpcap +libjson-c endef define Package/libndpi/description - nDPI is an open source LGPLv3 library for deep-packet inspection. + nDPI is an open source LGPLv3 library for deep-packet inspection. Based on OpenDPI it includes ntop extensions. endef -define Build/Configure - ( cd $(PKG_BUILD_DIR); ./autogen.sh ) - $(call Build/Configure/Default) +define Build/Prepare + $(PKG_UNPACK) + $(Build/Patch) + mv $(PKG_BUILD_DIR)/configure.seed $(PKG_BUILD_DIR)/configure.ac + $(SED) "s/@NDPI_MAJOR@/3/g" \ + -e "s/@NDPI_MINOR@/2/g" \ + -e "s/@NDPI_PATCH@/0/g" \ + -e "s/@NDPI_VERSION_SHORT@/3.2.0/g" \ + $(PKG_BUILD_DIR)/configure.ac endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/libndpi-$(PKG_VERSION).0/libndpi \ - $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/include/ndpi + $(CP) $(PKG_BUILD_DIR)/src/include/*.h \ + $(1)/usr/include/ndpi/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libndpi.so* \ + $(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \ $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libndpi.pc \ + $(CP) $(PKG_BUILD_DIR)/libndpi.pc \ $(1)/usr/lib/pkgconfig/ endef define Package/libndpi/install $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libndpi.so* \ + $(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \ $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/bin/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/bin/ndpiReader \ + $(CP) $(PKG_BUILD_DIR)/example/ndpiReader \ $(1)/usr/bin/ endef diff --git a/libs/libnet-1.2.x/Makefile b/libs/libnet-1.2.x/Makefile index b9391bb4..8417dc51 100644 --- a/libs/libnet-1.2.x/Makefile +++ b/libs/libnet-1.2.x/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=1.2-rc3 PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://sourceforge.net/projects/libnet-dev/files/ +PKG_SOURCE_URL:=@SF/libnet-dev PKG_HASH:=72c380785ad44183005e654b47cc12485ee0228d7fa6b0a87109ff7614be4a63 PKG_MAINTAINER:=Mislav Novakovic PKG_LICENSE:=GPL-2.0 diff --git a/libs/libnetconf2/Makefile b/libs/libnetconf2/Makefile index 96b59c0b..5e5945b5 100644 --- a/libs/libnetconf2/Makefile +++ b/libs/libnetconf2/Makefile @@ -8,26 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnetconf2 +PKG_VERSION:=1.1.24 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libnetconf2/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=1a69db028bf970f0dab15ed508b58e0cf0806a7e4492828404b75c97ec8ab306 -PKG_LICENSE:=BSD-3-Clause PKG_MAINTAINER:=Mislav Novakovic - -PKG_VERSION:=0.10.17 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=bd93b091d6e4414283c6c764dc451aee61e09997 -PKG_MIRROR_HASH:=499847be79d202cb0c933aad8133a38ebca7099344a1194404e488aa4d10ff08 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/cesnet/libnetconf2/ -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) - -PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_BUILD_DIR:=$(PKG_BUILD_ROOT) - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -36,8 +29,8 @@ define Package/libnetconf2 SECTION:=libs CATEGORY:=Libraries TITLE:=NETCONF library - URL:=$(PKG_SOURCE_URL) - DEPENDS:= +libyang +libssh +libopenssl + URL:=https://github.com/CESNET/libnetconf2 + DEPENDS:= +libyang +libssh +libopenssl +libpthread endef define Package/libnetconf2/description @@ -47,31 +40,9 @@ define Package/libnetconf2/description SSH, to send and receive NETCONF messages. NETCONF datastore implementation is not included. endef -CMAKE_OPTIONS += \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DCMAKE_BUILD_TYPE:STRING=Release - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/libnetconf2 - $(CP) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/*.h $(1)/usr/include/libnetconf2/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ - - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/include/libnetconf2 - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/* $(1)/usr/include/libnetconf2/ - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetconf2.pc $(1)/usr/lib/pkgconfig/ -endef - define Package/libnetconf2/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/share/libnetconf2 - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libnetconf2/*.yin $(1)/usr/share/libnetconf2/ endef $(eval $(call BuildPackage,libnetconf2)) diff --git a/libs/libnetconf2/patches/001-cmake_not_updated.patch b/libs/libnetconf2/patches/001-cmake_not_updated.patch new file mode 100644 index 00000000..f519b9bd --- /dev/null +++ b/libs/libnetconf2/patches/001-cmake_not_updated.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt 2020-05-08 13:29:30.903800624 +0300 ++++ b/CMakeLists.txt 2020-05-08 13:29:50.943582218 +0300 +@@ -153,7 +153,7 @@ + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_SSH") + message(STATUS "LibSSH version ${LibSSH_VERSION} found") + +- if(LibSSH_VERSION VERSION_EQUAL 0.9.3 OR LibSSH_VERSION VERSION_EQUAL 0.9.4) ++ if(LibSSH_VERSION VERSION_EQUAL 0.9.x) + message(FATAL_ERROR "LibSSH ${LibSSH_VERSION} includes regression bugs and libnetconf2 will NOT work properly, try to use another version") + endif() + diff --git a/libs/libnetfilter-acct/Makefile b/libs/libnetfilter-acct/Makefile index cd261d95..272295ee 100644 --- a/libs/libnetfilter-acct/Makefile +++ b/libs/libnetfilter-acct/Makefile @@ -8,17 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnetfilter_acct -PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 +PKG_VERSION:=1.0.3 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:= \ - http://www.netfilter.org/projects/libnetfilter_acct/files/ \ - ftp://ftp.netfilter.org/pub/libnetfilter_acct/ \ - http://mirrors.evolva.ro/netfilter.org/libnetfilter_acct/ -PKG_HASH:=0128f19c3419fbd84f7e6d46b13a33ef7bda9b9f5e493bc5ae1882d087514b71 +PKG_SOURCE_URL:=https://netfilter.org/projects/libnetfilter_acct/files +PKG_HASH:=4250ceef3efe2034f4ac05906c3ee427db31b9b0a2df41b2744f4bf79a959a1a -PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Nicolas Thill diff --git a/libs/libnopoll/Makefile b/libs/libnopoll/Makefile index 8f5f5840..84c92cef 100644 --- a/libs/libnopoll/Makefile +++ b/libs/libnopoll/Makefile @@ -8,25 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nopoll -PKG_VERSION:=0.4.2 +PKG_VERSION:=0.4.6 PKG_RELEASE:=2 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/ASPLes/nopoll.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=60a81fbd199551ac5dd017b9a44fb46e8530680b -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_HASH:=ce67b91ea54dda6678321e05a3e584648032a31323409a76df5dd60e7bfd17de +PKG_SOURCE_URL:=https://codeload.github.com/ASPLes/nopoll/tar.gz/$(PKG_VERSION)? +PKG_SOURCE:=nopoll-$(PKG_VERSION).tar.gz +PKG_HASH:=16eae3885d572495ba1f22d85fa9032139c761fb21ef1d80205039acd3143f5a +PKG_BUILD_DIR:=$(BUILD_DIR)/nopoll-$(PKG_VERSION) PKG_MAINTAINER:=John Clark +PKG_LICENSE:=LGPL-2.1 +PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_LICENSE:=LGPL-2.1 -PKG_LICENSE_FILES:=COPYING - include $(INCLUDE_DIR)/package.mk define Package/libnopoll @@ -34,7 +31,7 @@ define Package/libnopoll CATEGORY:=Libraries DEPENDS:=+libopenssl TITLE:=noPoll C WebSocket Library - URL:=http://www.aspl.es/nopoll + URL:=https://www.aspl.es/nopoll endef define Package/libnopoll/description diff --git a/libs/libnopoll/patches/001-param_h_rename.patch b/libs/libnopoll/patches/001-param_h_rename.patch deleted file mode 100644 index 2eb03409..00000000 --- a/libs/libnopoll/patches/001-param_h_rename.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 675ac7b4b64d398de8a61e9c713383b8c0d9071f Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Tue, 20 Jun 2017 20:06:36 -0700 -Subject: [PATCH] nopoll: * [fix] Avoid clashes with isset() from sys/param.h - ---- - src/nopoll_io.c | 4 ++-- - src/nopoll_loop.c | 4 ++-- - src/nopoll_private.h | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/nopoll_io.c b/src/nopoll_io.c -index 036aa2c1c685..b3e48c2385d0 100644 ---- a/src/nopoll_io.c -+++ b/src/nopoll_io.c -@@ -204,8 +204,8 @@ noPollIoEngine * nopoll_io_get_engine (noPollCtx * ctx, noPollIoEngineType engin - engine->destroy = nopoll_io_wait_select_destroy; - engine->clear = nopoll_io_wait_select_clear; - engine->wait = nopoll_io_wait_select_wait; -- engine->addto = nopoll_io_wait_select_add_to; -- engine->isset = nopoll_io_wait_select_is_set; -+ engine->add_to = nopoll_io_wait_select_add_to; -+ engine->is_set = nopoll_io_wait_select_is_set; - - /* call to create the object */ - engine->ctx = ctx; -diff --git a/src/nopoll_loop.c b/src/nopoll_loop.c -index f58b8133b79a..60112f8dbf58 100644 ---- a/src/nopoll_loop.c -+++ b/src/nopoll_loop.c -@@ -64,7 +64,7 @@ nopoll_bool nopoll_loop_register (noPollCtx * ctx, noPollConn * conn, noPollPtr - - /* register the connection socket */ - /* nopoll_log (ctx, NOPOLL_LEVEL_DEBUG, "Adding socket id: %d", conn->session);*/ -- if (! ctx->io_engine->addto (conn->session, ctx, conn, ctx->io_engine->io_object)) { -+ if (! ctx->io_engine->add_to (conn->session, ctx, conn, ctx->io_engine->io_object)) { - - /* remove this connection from registry */ - nopoll_ctx_unregister_conn (ctx, conn); -@@ -109,7 +109,7 @@ nopoll_bool nopoll_loop_process (noPollCtx * ctx, noPollConn * conn, noPollPtr u - int * conn_changed = (int *) user_data; - - /* check if the connection have something to notify */ -- if (ctx->io_engine->isset (ctx, conn->session, ctx->io_engine->io_object)) { -+ if (ctx->io_engine->is_set (ctx, conn->session, ctx->io_engine->io_object)) { - - /* call to notify action according to role */ - switch (conn->role) { -diff --git a/src/nopoll_private.h b/src/nopoll_private.h -index 82fd27bb7fba..cd895d1e3ffd 100644 ---- a/src/nopoll_private.h -+++ b/src/nopoll_private.h -@@ -340,8 +340,8 @@ struct _noPollIoEngine { - noPollIoMechDestroy destroy; - noPollIoMechClear clear; - noPollIoMechWait wait; -- noPollIoMechAddTo addto; -- noPollIoMechIsSet isset; -+ noPollIoMechAddTo add_to; -+ noPollIoMechIsSet is_set; - }; - - struct _noPollMsg { --- -2.11.0 - diff --git a/libs/libnopoll/patches/010-openssl-deprecated.patch b/libs/libnopoll/patches/010-openssl-deprecated.patch new file mode 100644 index 00000000..fb82df48 --- /dev/null +++ b/libs/libnopoll/patches/010-openssl-deprecated.patch @@ -0,0 +1,87 @@ +diff --git a/src/nopoll.c b/src/nopoll.c +index d4b50f3..3603f41 100644 +--- a/src/nopoll.c ++++ b/src/nopoll.c +@@ -868,9 +868,11 @@ void nopoll_cleanup_library (void) + { + + if (__nopoll_tls_was_init) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_cleanup (); + CRYPTO_cleanup_all_ex_data (); + ERR_free_strings (); ++#endif + + /* notify the library isn't initialized */ + __nopoll_tls_was_init = nopoll_false; +diff --git a/src/nopoll_conn.c b/src/nopoll_conn.c +index 0b85382..1770723 100644 +--- a/src/nopoll_conn.c ++++ b/src/nopoll_conn.c +@@ -1380,7 +1380,9 @@ noPollConn * nopoll_conn_tls_new (noPollCtx * ctx, + /* init ssl ciphers and engines */ + if (! __nopoll_tls_was_init) { + __nopoll_tls_was_init = nopoll_true; ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init (); ++#endif + } /* end if */ + + /* call common implementation */ +@@ -1426,7 +1428,9 @@ noPollConn * nopoll_conn_tls_new6 (noPollCtx * ctx, + /* init ssl ciphers and engines */ + if (! __nopoll_tls_was_init) { + __nopoll_tls_was_init = nopoll_true; ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init (); ++#endif + } /* end if */ + + /* call common implementation */ +@@ -1495,7 +1499,9 @@ noPollConn * nopoll_conn_tls_new_with_socket (noPollCtx * ctx, + /* init ssl ciphers and engines */ + if (! __nopoll_tls_was_init) { + __nopoll_tls_was_init = nopoll_true; ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init (); ++#endif + } /* end if */ + + /* call common implementation */ +@@ -4755,7 +4761,9 @@ nopoll_bool __nopoll_conn_accept_complete_common (noPollCtx * ctx, noPollConnOpt + /* init ssl ciphers and engines */ + if (! __nopoll_tls_was_init) { + __nopoll_tls_was_init = nopoll_true; ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init (); ++#endif + } /* end if */ + + /* now configure chainCertificate */ +diff --git a/src/nopoll_decl.h b/src/nopoll_decl.h +index bfe496e..b0ce535 100644 +--- a/src/nopoll_decl.h ++++ b/src/nopoll_decl.h +@@ -511,20 +511,18 @@ typedef enum { + * established with this method will only understand this + * method. + */ +- NOPOLL_METHOD_TLSV1_1 = 5 ++ NOPOLL_METHOD_TLSV1_1 = 5, + #endif + #if defined(NOPOLL_HAVE_TLSv12_ENABLED) +- , + /** + * @brief Allows to define TLSv1.2 as SSL protocol used by the + * client or server connection. A connection/listener + * established with this method will only understand this + * method. + */ +- NOPOLL_METHOD_TLSV1_2 = 6 ++ NOPOLL_METHOD_TLSV1_2 = 6, + #endif + #if defined(NOPOLL_HAVE_TLS_FLEXIBLE_ENABLED) +- , + /** + * @brief Allows to define TLS flexible negotiation where the + * highest version available will be negotiated by both diff --git a/libs/libnpupnp/Makefile b/libs/libnpupnp/Makefile new file mode 100644 index 00000000..54aca93f --- /dev/null +++ b/libs/libnpupnp/Makefile @@ -0,0 +1,51 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libnpupnp +PKG_VERSION:=4.0.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads +PKG_HASH:=30f15caa67dc83f76b0976438165aa4704a50c7e3e5444c50bb8cbad874877ca + +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libnpupnp + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libstdcpp +libexpat +libcurl +libmicrohttpd + TITLE:=A C++ base UPnP library + URL:=https://framagit.org/medoc92/npupnp +endef + +define Package/libnpupnp/description +npupnp (new pupnp or not pupnp ?) is an UPnP library derived from the +venerable pupnp (https://github.com/pupnp/pupnp), based on its 1.6.x +branch (around 1.6.25). +endef + +TARGET_CFLAGS += -flto +TARGET_LDFLAGS += -flto + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/npupnp/upnp + $(CP) $(PKG_INSTALL_DIR)/usr/include/npupnp/upnp/* $(1)/usr/include/npupnp/upnp + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnpupnp.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnpupnp.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libnpupnp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnpupnp.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libnpupnp)) diff --git a/libs/libogg/Makefile b/libs/libogg/Makefile index 0d55d8e0..91dfe8e1 100644 --- a/libs/libogg/Makefile +++ b/libs/libogg/Makefile @@ -8,20 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libogg -PKG_VERSION:=1.3.2 -PKG_RELEASE:=2 +PKG_VERSION:=1.3.4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ogg/ -PKG_HASH:=3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b -PKG_MAINTAINER:=Ted Hess +PKG_SOURCE_URL:=https://downloads.xiph.org/releases/ogg/ +PKG_HASH:=c163bc12bc300c401b6aa35907ac682671ea376f13ae0969a220f7ddf71893fe +PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf - PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -29,7 +29,8 @@ define Package/libogg SECTION:=libs CATEGORY:=Libraries TITLE:=libogg - URL:=http://xiph.org/ogg/ + URL:=https://xiph.org/ogg/ + ABI_VERSION:=0 endef define Package/libogg/description @@ -40,6 +41,8 @@ possible, as well as mixing several sepearate, concurrent media streams into a single physical bitstream. endef +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ogg/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/ogg/* $(1)/usr/include/ogg/ @@ -53,7 +56,7 @@ endef define Package/libogg/install $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libogg)) diff --git a/libs/liboping/Makefile b/libs/liboping/Makefile index 4524494c..8ef66bc7 100644 --- a/libs/liboping/Makefile +++ b/libs/liboping/Makefile @@ -8,23 +8,24 @@ include $(TOPDIR)/rules.mk PKG_NAME:=liboping -PKG_VERSION:=1.9.0 -PKG_RELEASE:=1 +PKG_VERSION:=1.10.0 +PKG_RELEASE:=2 PKG_MAINTAINER:=Jo-Philipp Wich -PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE:=LGPL-2.1-or-later PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://noping.cc/files -PKG_HASH:=44bb1d88b56b88fda5533edb3aa005c69b3cd396f20453a157d7e31e536f3530 +PKG_HASH:=eb38aa93f93e8ab282d97e2582fbaea88b3f889a08cbc9dbf20059c3779d5cd8 PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/liboping/Default - URL:=http://verplant.org/liboping/ + URL:=https://noping.cc endef define Package/liboping diff --git a/libs/libopusenc/Makefile b/libs/libopusenc/Makefile new file mode 100644 index 00000000..3f0dba57 --- /dev/null +++ b/libs/libopusenc/Makefile @@ -0,0 +1,51 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libopusenc +PKG_VERSION:=0.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus +PKG_HASH:=8298db61a8d3d63e41c1a80705baa8ce9ff3f50452ea7ec1c19a564fe106cbb9 + +PKG_MAINTAINER:=Eduardo Abinader +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libopusenc + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libopus + TITLE:=OPUS Audio stream files + URL:=https://opus-codec.org +endef + +define Package/libopusenc/descriptiion + Libopusenc provides a high-level API for creating .opus files and streams. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libopusenc.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libopusenc/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libopusenc)) diff --git a/libs/liborcania/Makefile b/libs/liborcania/Makefile new file mode 100644 index 00000000..aaf6c769 --- /dev/null +++ b/libs/liborcania/Makefile @@ -0,0 +1,45 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=liborcania +PKG_VERSION:=2.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/babelouest/orcania/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=a83f01968ae3e68fecfb2f7029f886902718c65315008223784d2d023da515bb + +PKG_MAINTAINER:=Toni Uhlig +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/orcania-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/liborcania + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Functionality required by libulfius. + URL:=https://github.com/babelouest/orcania + PROVIDES:=liborcania +endef + +define Package/liborcania/description + Potluck with different functions for different purposes that can be shared among C programs. +endef + +define Package/liborcania/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liborcania.so.* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,liborcania)) diff --git a/libs/libowfat/Makefile b/libs/libowfat/Makefile index 99eba1c2..99060644 100644 --- a/libs/libowfat/Makefile +++ b/libs/libowfat/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libowfat -PKG_VERSION:=0.31 -PKG_RELEASE:=1 +PKG_VERSION:=0.32 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://www.fefe.de/libowfat -PKG_HASH:=d1e4ac1cfccbb7dc51d77d96398e6302d229ba7538158826c84cb4254c7e8a12 +PKG_SOURCE_URL:=https://www.fefe.de/libowfat +PKG_HASH:=f4b9b3d9922dc25bc93adedf9e9ff8ddbebaf623f14c8e7a5f2301bfef7998c1 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING @@ -27,7 +27,7 @@ define Package/libowfat SECTION:=libs CATEGORY:=Libraries TITLE:=reimplemented libdjb under GPL - URL:=http://www.fefe.de/libowfat/ + URL:=https://www.fefe.de/libowfat/ endef define Build/Configure diff --git a/libs/libowfat/patches/001-fixbuild.patch b/libs/libowfat/patches/001-fixbuild.patch index 5f4f06df..05e3f205 100644 --- a/libs/libowfat/patches/001-fixbuild.patch +++ b/libs/libowfat/patches/001-fixbuild.patch @@ -1,6 +1,6 @@ --- a/GNUmakefile +++ b/GNUmakefile -@@ -343,6 +343,8 @@ socket_accept4.o socket_accept6.o socket +@@ -357,6 +357,8 @@ socket_accept4.o socket_accept6.o socket_connected.o socket_local4.o \ socket_local6.o socket_recv4.o socket_recv6.o socket_remote4.o \ socket_remote6.o: havesl.h @@ -9,7 +9,7 @@ dns_nd6.o fmt_xlong.o scan_xlong.o fmt_ip6_flat.o $(TEXTCODE_OBJS): haveinline.h iob_send.o scan_ip6if.o: havealloca.h -@@ -372,6 +374,6 @@ update: +@@ -386,6 +388,6 @@ update: dl -n http://www.w3.org/TR/html5/entities.json entities.h: entities.json ent diff --git a/libs/libowfat/patches/010-gcc10.patch b/libs/libowfat/patches/010-gcc10.patch new file mode 100644 index 00000000..eca1a60e --- /dev/null +++ b/libs/libowfat/patches/010-gcc10.patch @@ -0,0 +1,11 @@ +--- a/io_internal.h ++++ b/io_internal.h +@@ -83,7 +83,7 @@ my_extern array io_pollfds; + my_extern long first_readable; + my_extern long first_writeable; + +-my_extern long first_deferred; ++extern long first_deferred; + + my_extern enum __io_waitmode { + UNDECIDED, diff --git a/libs/libp11/Makefile b/libs/libp11/Makefile index 44852126..f575b2fa 100644 --- a/libs/libp11/Makefile +++ b/libs/libp11/Makefile @@ -8,17 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libp11 -PKG_VERSION:=0.4.7 -PKG_RELEASE:=1 -PKG_HASH:=32e486d4279e09174b63eb263bc840016ebfa80b0b154390c0539b211aec0452 - -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING +PKG_VERSION:=0.4.10 +PKG_RELEASE:=2 PKG_SOURCE_URL:=https://github.com/OpenSC/libp11/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=639ea43c3341e267214b712e1e5e12397fd2d350899e673dd1220f3c6b8e3db4 +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=libtool PKG_INSTALL:=1 @@ -29,7 +30,7 @@ define Package/libp11 CATEGORY:=Libraries TITLE:=PKCS#11 wrapper library URL:=https://www.opensc-project.org/opensc/wiki/libp11 - DEPENDS:=+libopenssl + DEPENDS:=+libopenssl +@OPENSSL_ENGINE CONFLICTS:=engine_pkcs11 endef diff --git a/libs/libp11/patches/001-fix-install.patch b/libs/libp11/patches/001-fix-install.patch index 9766b804..0a576c68 100644 --- a/libs/libp11/patches/001-fix-install.patch +++ b/libs/libp11/patches/001-fix-install.patch @@ -1,6 +1,6 @@ --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -47,13 +47,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS) +@@ -49,13 +49,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS) pkcs11_la_LDFLAGS = $(AM_LDFLAGS) -module -shared -shrext $(SHARED_EXT) \ -avoid-version -export-symbols "$(srcdir)/pkcs11.exports" @@ -16,7 +16,7 @@ mylibdir=$(libdir) --- a/src/Makefile.in +++ b/src/Makefile.in -@@ -844,7 +844,7 @@ distdir: $(DISTFILES) +@@ -899,7 +899,7 @@ distdir-am: $(DISTFILES) fi; \ done check-am: all-am @@ -25,7 +25,7 @@ check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h installdirs: -@@ -915,7 +915,7 @@ install-dvi-am: +@@ -988,7 +988,7 @@ install-dvi-am: install-exec-am: install-enginesexecLTLIBRARIES install-libLTLIBRARIES @$(NORMAL_INSTALL) @@ -34,16 +34,15 @@ install-html: install-html-am install-html-am: -@@ -960,7 +960,7 @@ uninstall-am: uninstall-enginesexecLTLIB - +@@ -1051,14 +1051,14 @@ uninstall-am: uninstall-enginesexecLTLIB .MAKE: all check-am install-am install-exec-am install-strip --.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ -+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ - clean-enginesexecLTLIBRARIES clean-generic \ + .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \ +- check-local clean clean-enginesexecLTLIBRARIES clean-generic \ ++ clean clean-enginesexecLTLIBRARIES clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ -@@ -968,7 +968,7 @@ uninstall-am: uninstall-enginesexecLTLIB + distclean-hdr distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-enginesexecLTLIBRARIES install-exec install-exec-am \ diff --git a/libs/libpam/Makefile b/libs/libpam/Makefile index f7b46ceb..d5a51b2b 100644 --- a/libs/libpam/Makefile +++ b/libs/libpam/Makefile @@ -8,18 +8,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libpam -PKG_VERSION:=1.2.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.linux-pam.org/library/ -PKG_HASH:=cd8beac5961e942e9c73b32a3cd1a3457755f8fb35d07c9ec64511e19e135ea4 -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf -PKG_MAINTAINER:=Nikos Mavrogiannopoulos +PKG_VERSION:=1.4.0 +PKG_RELEASE:=1 +PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/linux-pam/linux-pam/releases/download/v$(PKG_VERSION) +PKG_HASH:=cd6d928c51e64139be3bdb38692c68183a509b83d4f2c221024ccd4bcddfd034 PKG_BUILD_DIR:=$(BUILD_DIR)/Linux-PAM-$(PKG_VERSION) +PKG_MAINTAINER:=Nikos Mavrogiannopoulos +PKG_LICENSE:=BSD-3c GPL +PKG_LICENSE_FILES:=COPYING Copyright +PKG_CPE_ID:=cpe:/a:kernel:linux-pam + +PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk define Package/libpam @@ -33,23 +38,26 @@ define Package/libpam/description The Linux-PAM Pluggable Authentication Modules. endef -TARGET_CFLAGS += $(FPIC) - -define Build/Configure - $(call Build/Configure/Default, \ - --enable-shared \ - --enable-static \ - --enable-pamlocking \ - --disable-prelude \ - --disable-lckpwdf \ - --disable-selinux \ - --disable-nls \ - --disable-rpath \ - --disable-nis \ - --disable-regenerate-docu \ - --enable-db=no \ - ) -endef +CONFIGURE_ARGS += \ + --enable-pamlocking \ + --enable-shared \ + --enable-static \ + --disable-audit \ + --disable-cracklib \ + --disable-db \ + --disable-debug \ + --disable-doc \ + --disable-econf \ + --disable-lckpwdf \ + --disable-nis \ + --disable-prelude \ + --disable-regenerate-docu \ + --disable-rpath \ + --disable-selinux \ + --disable-Werror \ + --with-gnu-ld \ + --without-mailspool \ + --without-xauth define Build/InstallDev $(INSTALL_DIR) $(1)/lib diff --git a/libs/libpam/patches/0001-build-always-use-lib-instead-of-lib64.patch b/libs/libpam/patches/0001-build-always-use-lib-instead-of-lib64.patch index 25d9a4ab..da0b7402 100644 --- a/libs/libpam/patches/0001-build-always-use-lib-instead-of-lib64.patch +++ b/libs/libpam/patches/0001-build-always-use-lib-instead-of-lib64.patch @@ -20,7 +20,7 @@ index fd0e310..306b6e2 100644 fi - if test ${libdir} = '${exec_prefix}/lib' - then -- case "`uname -m`" in +- case "$host_cpu" in - x86_64|ppc64|s390x|sparc64) - libdir="/lib64" ;; - *) diff --git a/libs/libpam/patches/0002-build-ignore-pam_rhosts-if-neither-ruserok-nor-ruser.patch b/libs/libpam/patches/0002-build-ignore-pam_rhosts-if-neither-ruserok-nor-ruser.patch deleted file mode 100644 index abafcbb2..00000000 --- a/libs/libpam/patches/0002-build-ignore-pam_rhosts-if-neither-ruserok-nor-ruser.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 1a2e6c979118dce5e79604e88c008c7879d1e4e6 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Wed, 17 Jun 2015 18:19:23 +0800 -Subject: [PATCH 2/7] build: ignore pam_rhosts if neither ruserok nor - ruserok_af is available. - -* configure.ac: check for ruserok and ruserok_af -* modules/Makefile.am: ignore pam_rhosts/ if it's disabled -* modules/pam_rhosts/pam_rhosts.c: include stdlib.h for malloc and free - -Signed-off-by: Yousong Zhou ---- - configure.ac | 5 ++++- - modules/Makefile.am | 11 ++++++++--- - modules/pam_rhosts/pam_rhosts.c | 1 + - 3 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 306b6e2..084071a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -534,7 +534,10 @@ AC_CHECK_FUNCS(fseeko getdomainname gethostname gettimeofday lckpwdf mkdir selec - AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname) - AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r) - AC_CHECK_FUNCS(getgrouplist getline getdelim) --AC_CHECK_FUNCS(inet_ntop inet_pton innetgr ruserok_af) -+AC_CHECK_FUNCS(inet_ntop inet_pton innetgr) -+AC_CHECK_FUNCS([ruserok_af ruserok], [break]) -+ -+AM_CONDITIONAL([COND_BUILD_PAM_RHOSTS], [test "$ac_cv_func_ruserok_af" = yes -o "$ac_cv_func_ruserok" = yes]) - - AC_CHECK_FUNCS(unshare, [UNSHARE=yes], [UNSHARE=no]) - AM_CONDITIONAL([HAVE_UNSHARE], [test "$UNSHARE" = yes]) -diff --git a/modules/Makefile.am b/modules/Makefile.am -index 0c80cea..9ad26a9 100644 ---- a/modules/Makefile.am -+++ b/modules/Makefile.am -@@ -2,16 +2,21 @@ - # Copyright (c) 2005, 2006, 2008 Thorsten Kukuk - # - --SUBDIRS = pam_access pam_cracklib pam_debug pam_deny pam_echo \ -+if COND_BUILD_PAM_RHOSTS -+ MAYBE_PAM_RHOSTS = pam_rhosts -+endif -+ -+SUBDIRS := pam_access pam_cracklib pam_debug pam_deny pam_echo \ - pam_env pam_exec pam_faildelay pam_filter pam_ftp \ - pam_group pam_issue pam_keyinit pam_lastlog pam_limits \ - pam_listfile pam_localuser pam_loginuid pam_mail \ - pam_mkhomedir pam_motd pam_namespace pam_nologin \ -- pam_permit pam_pwhistory pam_rhosts pam_rootok pam_securetty \ -+ pam_permit pam_pwhistory pam_rootok pam_securetty \ - pam_selinux pam_sepermit pam_shells pam_stress \ - pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \ - pam_tty_audit pam_umask \ -- pam_unix pam_userdb pam_warn pam_wheel pam_xauth -+ pam_unix pam_userdb pam_warn pam_wheel pam_xauth \ -+ $(MAYBE_PAM_RHOSTS) - - CLEANFILES = *~ - -diff --git a/modules/pam_rhosts/pam_rhosts.c b/modules/pam_rhosts/pam_rhosts.c -index bc9e76f..51ef13e 100644 ---- a/modules/pam_rhosts/pam_rhosts.c -+++ b/modules/pam_rhosts/pam_rhosts.c -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - #include - - #define PAM_SM_AUTH /* only defines this management group */ --- -1.7.10.4 - diff --git a/libs/libpam/patches/0003-build-ignore-pam_lastlog-when-logwtmp-is-not-availab.patch b/libs/libpam/patches/0003-build-ignore-pam_lastlog-when-logwtmp-is-not-availab.patch deleted file mode 100644 index 2f3f19cb..00000000 --- a/libs/libpam/patches/0003-build-ignore-pam_lastlog-when-logwtmp-is-not-availab.patch +++ /dev/null @@ -1,60 +0,0 @@ -From bac1ee3033cf22e31730fe3e77ca82bd5ebba692 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Wed, 17 Jun 2015 21:18:05 +0800 -Subject: [PATCH 3/7] build: ignore pam_lastlog when logwtmp is not available. - -* configure.ac: check logwtmp and set COND_BUILD_PAM_LASTLOG -* modules/pam_lastlog/Makefile.am: check COND_BUILD_PAM_LASTLOG - -Signed-off-by: Yousong Zhou ---- - configure.ac | 2 ++ - modules/Makefile.am | 8 ++++++-- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 084071a..ca4bf5b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -536,8 +536,10 @@ AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r - AC_CHECK_FUNCS(getgrouplist getline getdelim) - AC_CHECK_FUNCS(inet_ntop inet_pton innetgr) - AC_CHECK_FUNCS([ruserok_af ruserok], [break]) -+AC_CHECK_FUNCS([logwtmp]) - - AM_CONDITIONAL([COND_BUILD_PAM_RHOSTS], [test "$ac_cv_func_ruserok_af" = yes -o "$ac_cv_func_ruserok" = yes]) -+AM_CONDITIONAL([COND_BUILD_PAM_LASTLOG], [test "$ac_cv_func_logwtmp" = yes]) - - AC_CHECK_FUNCS(unshare, [UNSHARE=yes], [UNSHARE=no]) - AM_CONDITIONAL([HAVE_UNSHARE], [test "$UNSHARE" = yes]) -diff --git a/modules/Makefile.am b/modules/Makefile.am -index 9ad26a9..b98dc5c 100644 ---- a/modules/Makefile.am -+++ b/modules/Makefile.am -@@ -6,9 +6,13 @@ if COND_BUILD_PAM_RHOSTS - MAYBE_PAM_RHOSTS = pam_rhosts - endif - -+if COND_BUILD_PAM_LASTLOG -+ MAYBE_PAM_LASTLOG = pam_lastlog -+endif -+ - SUBDIRS := pam_access pam_cracklib pam_debug pam_deny pam_echo \ - pam_env pam_exec pam_faildelay pam_filter pam_ftp \ -- pam_group pam_issue pam_keyinit pam_lastlog pam_limits \ -+ pam_group pam_issue pam_keyinit pam_limits \ - pam_listfile pam_localuser pam_loginuid pam_mail \ - pam_mkhomedir pam_motd pam_namespace pam_nologin \ - pam_permit pam_pwhistory pam_rootok pam_securetty \ -@@ -16,7 +20,7 @@ SUBDIRS := pam_access pam_cracklib pam_debug pam_deny pam_echo \ - pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \ - pam_tty_audit pam_umask \ - pam_unix pam_userdb pam_warn pam_wheel pam_xauth \ -- $(MAYBE_PAM_RHOSTS) -+ $(MAYBE_PAM_RHOSTS) $(MAYBE_PAM_LASTLOG) - - CLEANFILES = *~ - --- -1.7.10.4 - diff --git a/libs/libpam/patches/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch b/libs/libpam/patches/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch deleted file mode 100644 index 04e61732..00000000 --- a/libs/libpam/patches/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a35daea1b8be768d1b0be6eae157fbf3e5380f92 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Wed, 17 Jun 2015 18:22:31 +0800 -Subject: [PATCH 4/7] build: fix build when crypt() is not part of crypt_libs. - -* configure.ac: ditto. - -Signed-off-by: Yousong Zhou ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index ca4bf5b..6553c78 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -408,7 +408,7 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"], - [crypt_libs="crypt"]) - - BACKUP_LIBS=$LIBS --AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="") -+AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_lib:+-l$ac_lib}", LIBCRYPT="") - AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) - LIBS=$BACKUP_LIBS - AC_SUBST(LIBCRYPT) --- -1.7.10.4 - diff --git a/libs/libpam/patches/0005-build-fix-doc-build.patch b/libs/libpam/patches/0005-build-fix-doc-build.patch deleted file mode 100644 index cd9b0a80..00000000 --- a/libs/libpam/patches/0005-build-fix-doc-build.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 1563e57ea8ab9d123f765129a6840929ef58ff7a Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Wed, 17 Jun 2015 20:38:41 +0800 -Subject: [PATCH 5/7] build: fix doc build. - -* Makefile.am: ignore doc/ directory if not ENABLE_REGENERATE_MAN -* doc/adg/Makefile.am: remove check on ENABLE_REGENERATE_MAN -* doc/man/Makefile.am: ditto -* doc/mwg/Makefile.am: ditto -* doc/sag/Makefile.am: ditto -* doc/specs/Makefile.am: ignore CC from command line - -Signed-off-by: Yousong Zhou ---- - Makefile.am | 5 ++++- - doc/adg/Makefile.am | 3 --- - doc/man/Makefile.am | 2 -- - doc/mwg/Makefile.am | 3 --- - doc/sag/Makefile.am | 2 -- - doc/specs/Makefile.am | 2 +- - 6 files changed, 5 insertions(+), 12 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 3db4e37..5e6592a 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -4,7 +4,10 @@ - - AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news - --SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests -+if ENABLE_REGENERATE_MAN -+ MAYBE_DOC = doc -+endif -+SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests $(MAYBE_DOC) - - CLEANFILES = *~ - -diff --git a/doc/adg/Makefile.am b/doc/adg/Makefile.am -index 77bd7a9..bec5edc 100644 ---- a/doc/adg/Makefile.am -+++ b/doc/adg/Makefile.am -@@ -9,7 +9,6 @@ EXTRA_DIST = $(XMLS) - XMLS = Linux-PAM_ADG.xml $(shell ls $(srcdir)/pam_*.xml) - DEP_XMLS = $(shell ls $(top_srcdir)/doc/man/pam_*.xml) - --if ENABLE_REGENERATE_MAN - MAINTAINERCLEANFILES = Linux-PAM_ADG.txt Linux-PAM_ADG.pdf html/*.html - - all: Linux-PAM_ADG.txt html/Linux-PAM_ADG.html Linux-PAM_ADG.pdf -@@ -51,8 +50,6 @@ html/Linux-PAM_ADG.html: $(XMLS) $(DEP_XMLS) - distclean-local: - -rm -rf html Linux-PAM_ADG.txt Linux-PAM_ADG.pdf - --endif -- - install-data-local: - $(mkinstalldirs) $(DESTDIR)$(docdir) - $(mkinstalldirs) $(DESTDIR)$(pdfdir) -diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am -index 78c891d..b1dc421 100644 ---- a/doc/man/Makefile.am -+++ b/doc/man/Makefile.am -@@ -45,7 +45,6 @@ XMLS = pam.3.xml pam.8.xml \ - misc_conv.3.xml pam_misc_paste_env.3.xml pam_misc_drop_env.3.xml \ - pam_misc_setenv.3.xml - --if ENABLE_REGENERATE_MAN - PAM.8: pam.8 - pam_get_authtok_noverify.3: pam_get_authtok.3 - pam_get_authtok_verify.3: pam_get_authtok.3 -@@ -60,4 +59,3 @@ pam_get_item.3: pam_item_types_std.inc.xml pam_item_types_ext.inc.xml - pam_set_data.3: pam_item_types_std.inc.xml pam_item_types_ext.inc.xml - pam.conf.5: pam.conf-desc.xml pam.conf-dir.xml pam.conf-syntax.xml - -include $(top_srcdir)/Make.xml.rules --endif -diff --git a/doc/mwg/Makefile.am b/doc/mwg/Makefile.am -index 2bbb2d0..f57e297 100644 ---- a/doc/mwg/Makefile.am -+++ b/doc/mwg/Makefile.am -@@ -9,7 +9,6 @@ EXTRA_DIST = $(XMLS) - XMLS = Linux-PAM_MWG.xml $(shell ls $(srcdir)/pam_*.xml) - DEP_XMLS = $(shell ls $(top_srcdir)/doc/man/pam_*.xml) - --if ENABLE_REGENERATE_MAN - MAINTAINERCLEANFILES = Linux-PAM_MWG.txt Linux-PAM_MWG.pdf html/*.html - - all: Linux-PAM_MWG.txt html/Linux-PAM_MWG.html Linux-PAM_MWG.pdf -@@ -51,8 +50,6 @@ html/Linux-PAM_MWG.html: $(XMLS) $(DEP_XMLS) - distclean-local: - -rm -rf html Linux-PAM_MWG.txt Linux-PAM_MWG.pdf - --endif -- - install-data-local: - $(mkinstalldirs) $(DESTDIR)$(docdir) - $(mkinstalldirs) $(DESTDIR)$(pdfdir) -diff --git a/doc/sag/Makefile.am b/doc/sag/Makefile.am -index 31816aa..a8b655f 100644 ---- a/doc/sag/Makefile.am -+++ b/doc/sag/Makefile.am -@@ -10,7 +10,6 @@ XMLS = Linux-PAM_SAG.xml $(shell ls $(srcdir)/pam_*.xml) - - DEP_XMLS = $(shell ls $(top_srcdir)/modules/pam_*/pam_*.xml) - --if ENABLE_REGENERATE_MAN - MAINTAINERCLEANFILES = Linux-PAM_SAG.txt Linux-PAM_SAG.pdf html/*.html - - all: Linux-PAM_SAG.txt html/Linux-PAM_SAG.html Linux-PAM_SAG.pdf -@@ -51,7 +50,6 @@ html/Linux-PAM_SAG.html: $(XMLS) $(DEP_XMLS) - - distclean-local: - -rm -rf html Linux-PAM_SAG.txt Linux-PAM_SAG.pdf --endif - - install-data-local: - $(mkinstalldirs) $(DESTDIR)$(docdir) -diff --git a/doc/specs/Makefile.am b/doc/specs/Makefile.am -index 99ecc70..39c850f 100644 ---- a/doc/specs/Makefile.am -+++ b/doc/specs/Makefile.am -@@ -11,7 +11,7 @@ draft-morgan-pam-current.txt: padout draft-morgan-pam.raw - - AM_YFLAGS = -d - --CC = @CC_FOR_BUILD@ -+override CC = @CC_FOR_BUILD@ - CPPFLAGS = @BUILD_CPPFLAGS@ - CFLAGS = @BUILD_CFLAGS@ - LDFLAGS = @BUILD_LDFLAGS@ --- -1.7.10.4 - diff --git a/libs/libpam/patches/0006-pam_unix-fix-compilation-in-case-rpc-rpc.h-is-missin.patch b/libs/libpam/patches/0006-pam_unix-fix-compilation-in-case-rpc-rpc.h-is-missin.patch deleted file mode 100644 index 014684f2..00000000 --- a/libs/libpam/patches/0006-pam_unix-fix-compilation-in-case-rpc-rpc.h-is-missin.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2e3ed4c6fb09f84fede589047d37d11783202d34 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Wed, 17 Jun 2015 18:16:18 +0800 -Subject: [PATCH 6/7] pam_unix: fix compilation in case rpc/rpc.h is missing. - -* modules/pam_unix/pam_unix_passwd.c: conditional compile on the - availability of rpc/rpc.h - -Signed-off-by: Yousong Zhou ---- - modules/pam_unix/pam_unix_passwd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c -index 2d330e5..970724a 100644 ---- a/modules/pam_unix/pam_unix_passwd.c -+++ b/modules/pam_unix/pam_unix_passwd.c -@@ -336,7 +336,7 @@ static int _do_setpass(pam_handle_t* pamh, const char *forwho, - } - - if (on(UNIX_NIS, ctrl) && _unix_comesfromsource(pamh, forwho, 0, 1)) { --#ifdef HAVE_NIS -+#if defined(HAVE_NIS) && defined(HAVE_RPC_RPC_H) - if ((master=getNISserver(pamh, ctrl)) != NULL) { - struct timeval timeout; - struct yppasswd yppwd; --- -1.7.10.4 - diff --git a/libs/libpam/patches/0007-Check-if-innetgr-is-available-at-compile-time.patch b/libs/libpam/patches/0007-Check-if-innetgr-is-available-at-compile-time.patch deleted file mode 100644 index f79b01ae..00000000 --- a/libs/libpam/patches/0007-Check-if-innetgr-is-available-at-compile-time.patch +++ /dev/null @@ -1,106 +0,0 @@ -From c681bd104627139eac2f40fe303e1f67676233e8 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Wed, 17 Jun 2015 15:33:43 +0800 -Subject: [PATCH 7/7] Check if innetgr is available at compile time. - -innetgr may not be there so make sure that when innetgr is not present -then we inform about it and not use it. - -* modules/pam_group/pam_group.c: ditto -* modules/pam_succeed_if/pam_succeed_if.c: ditto -* modules/pam_time/pam_time.c: ditto - -Signed-off-by: Khem Raj -Signed-off-by: Yousong Zhou ---- - modules/pam_group/pam_group.c | 4 ++++ - modules/pam_succeed_if/pam_succeed_if.c | 17 +++++++++++++---- - modules/pam_time/pam_time.c | 4 ++++ - 3 files changed, 21 insertions(+), 4 deletions(-) - -diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c -index be5f20f..6a065ca 100644 ---- a/modules/pam_group/pam_group.c -+++ b/modules/pam_group/pam_group.c -@@ -656,7 +656,11 @@ static int check_account(pam_handle_t *pamh, const char *service, - } - /* If buffer starts with @, we are using netgroups */ - if (buffer[0] == '@') -+#ifdef HAVE_INNETGR - good &= innetgr (&buffer[1], NULL, user, NULL); -+#else -+ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support"); -+#endif - /* otherwise, if the buffer starts with %, it's a UNIX group */ - else if (buffer[0] == '%') - good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]); -diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c -index aa828fc..c0c68a0 100644 ---- a/modules/pam_succeed_if/pam_succeed_if.c -+++ b/modules/pam_succeed_if/pam_succeed_if.c -@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh, const char *user, const char *group) - } - /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */ - static int --evaluate_innetgr(const char *host, const char *user, const char *group) -+evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group) - { -+#ifdef HAVE_INNETGR - if (innetgr(group, host, user, NULL) == 1) - return PAM_SUCCESS; -+#else -+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support"); -+#endif -+ - return PAM_AUTH_ERR; - } - /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */ - static int --evaluate_notinnetgr(const char *host, const char *user, const char *group) -+evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group) - { -+#ifdef HAVE_INNETGR - if (innetgr(group, host, user, NULL) == 0) - return PAM_SUCCESS; -+#else -+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support"); -+#endif - return PAM_AUTH_ERR; - } - -@@ -387,14 +396,14 @@ evaluate(pam_handle_t *pamh, int debug, - const void *rhost; - if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS) - rhost = NULL; -- return evaluate_innetgr(rhost, user, right); -+ return evaluate_innetgr(pamh, rhost, user, right); - } - /* (Rhost, user) is not in this group. */ - if (strcasecmp(qual, "notinnetgr") == 0) { - const void *rhost; - if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS) - rhost = NULL; -- return evaluate_notinnetgr(rhost, user, right); -+ return evaluate_notinnetgr(pamh, rhost, user, right); - } - /* Fail closed. */ - return PAM_SERVICE_ERR; -diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c -index c94737c..0b34a14 100644 ---- a/modules/pam_time/pam_time.c -+++ b/modules/pam_time/pam_time.c -@@ -555,7 +555,11 @@ check_account(pam_handle_t *pamh, const char *service, - } - /* If buffer starts with @, we are using netgroups */ - if (buffer[0] == '@') -+#ifdef HAVE_INNETGR - good &= innetgr (&buffer[1], NULL, user, NULL); -+#else -+ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support"); -+#endif - else - good &= logic_field(pamh, user, buffer, count, is_same); - D(("with user: %s", good ? "passes":"fails" )); --- -1.7.10.4 - diff --git a/libs/libpam/patches/010-crypt.patch b/libs/libpam/patches/010-crypt.patch new file mode 100644 index 00000000..705e8099 --- /dev/null +++ b/libs/libpam/patches/010-crypt.patch @@ -0,0 +1,35 @@ +From aef363c7e8e942224e6cffc4398366c6e5d31749 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Thu, 11 Jun 2020 00:04:32 +0200 +Subject: [PATCH] configure.ac: fix build failure when crypt() does not require + libcrypt + +Since commit 522246d20e4cd92fadc2d760228cb7e78cbeb4c5, the build fails +if "none required" is returned by AC_SEARCH_LIBS for libcrypt. + +Resolves: https://github.com/linux-pam/linux-pam/pull/235 +Fixes: http://autobuild.buildroot.org/results/92b3dd7c984d2b843ac9aacacd69eec99f28743e +Fixes: v1.4.0~228 ("Use cached 'crypt' library result correctly") + +Signed-off-by: Fabrice Fontaine +--- + configure.ac | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index ea08a7a3..c1862ea7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -428,7 +428,11 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"], + [crypt_libs="crypt"]) + + BACKUP_LIBS=$LIBS +-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_cv_search_crypt}", LIBCRYPT="") ++AC_SEARCH_LIBS([crypt],[$crypt_libs]) ++case "$ac_cv_search_crypt" in ++ -l*) LIBCRYPT="$ac_cv_search_crypt" ;; ++ *) LIBCRYPT="" ;; ++esac + AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) + LIBS=$BACKUP_LIBS + AC_SUBST(LIBCRYPT) diff --git a/libs/libpam/patches/020-fgetpwent_r.patch b/libs/libpam/patches/020-fgetpwent_r.patch new file mode 100644 index 00000000..cc804299 --- /dev/null +++ b/libs/libpam/patches/020-fgetpwent_r.patch @@ -0,0 +1,110 @@ +--- a/modules/pam_faillock/pam_faillock.c ++++ b/modules/pam_faillock/pam_faillock.c +@@ -348,42 +348,81 @@ set_conf_opt(pam_handle_t *pamh, struct options *opts, const char *name, const c + static int + check_local_user (pam_handle_t *pamh, const char *user) + { +- struct passwd pw, *pwp; +- char buf[16384]; +- int found = 0; ++ int rc; ++ size_t user_len; + FILE *fp; +- int errn; ++ char line[BUFSIZ]; + +- fp = fopen(PATH_PASSWD, "r"); +- if (fp == NULL) { +- pam_syslog(pamh, LOG_ERR, "unable to open %s: %m", +- PATH_PASSWD); +- return -1; ++ /* Validate the user name. */ ++ if ((user_len = strlen(user)) == 0) { ++ pam_syslog(pamh, LOG_NOTICE, "user name is not valid"); ++ return PAM_SERVICE_ERR; ++ } ++ ++ if (user_len > sizeof(line) - sizeof(":")) { ++ pam_syslog(pamh, LOG_NOTICE, "user name is too long"); ++ return PAM_SERVICE_ERR; ++ } ++ ++ if (strchr(user, ':') != NULL) { ++ /* ++ * "root:x" is not a local user name even if the passwd file ++ * contains a line starting with "root:x:". ++ */ ++ return PAM_PERM_DENIED; + } + +- for (;;) { +- errn = fgetpwent_r(fp, &pw, buf, sizeof (buf), &pwp); +- if (errn == ERANGE) { +- pam_syslog(pamh, LOG_WARNING, "%s contains very long lines; corrupted?", +- PATH_PASSWD); ++ /* Open the passwd file. */ ++ FILE *file_name = "/etc/passwd"; ++ if ((fp = fopen(file_name, "r")) == NULL) { ++ pam_syslog(pamh, LOG_ERR, "error opening %s: %m", file_name); ++ return PAM_SERVICE_ERR; ++ } ++ ++ /* ++ * Scan the file using fgets() instead of fgetpwent_r() because ++ * the latter is not flexible enough in handling long lines ++ * in passwd files. ++ */ ++ rc = PAM_PERM_DENIED; ++ while (fgets(line, sizeof(line), fp) != NULL) { ++ size_t line_len; ++ const char *str; ++ ++ /* ++ * Does this line start with the user name ++ * followed by a colon? ++ */ ++ if (strncmp(user, line, user_len) == 0 && ++ line[user_len] == ':') { ++ rc = PAM_SUCCESS; + break; + } +- if (errn != 0) +- break; +- if (strcmp(pwp->pw_name, user) == 0) { +- found = 1; ++ /* Has a newline been read? */ ++ line_len = strlen(line); ++ if (line_len < sizeof(line) - 1 || ++ line[line_len - 1] == '\n') { ++ /* Yes, continue with the next line. */ ++ continue; ++ } ++ ++ /* No, read till the end of this line first. */ ++ while ((str = fgets(line, sizeof(line), fp)) != NULL) { ++ line_len = strlen(line); ++ if (line_len == 0 || ++ line[line_len - 1] == '\n') { ++ break; ++ } ++ } ++ if (str == NULL) { ++ /* fgets returned NULL, we are done. */ + break; + } ++ /* Continue with the next line. */ + } + +- fclose (fp); +- +- if (errn != 0 && errn != ENOENT) { +- pam_syslog(pamh, LOG_ERR, "unable to enumerate local accounts: %m"); +- return -1; +- } else { +- return found; +- } ++ fclose(fp); ++ return rc; + } + + static int diff --git a/libs/libpbc/Makefile b/libs/libpbc/Makefile new file mode 100644 index 00000000..77e04db3 --- /dev/null +++ b/libs/libpbc/Makefile @@ -0,0 +1,52 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libpbc +PKG_VERSION:=0.5.14 +PKG_RELEASE:=2 + +PKG_SOURCE:=pbc-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://crypto.stanford.edu/pbc/files/ +PKG_HASH:=772527404117587560080241cedaf441e5cac3269009cdde4c588a1dce4c23d2 +PKG_BUILD_DIR:=$(BUILD_DIR)/pbc-$(PKG_VERSION) + +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=LGPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libpbc + SECTION:=libs + CATEGORY:=Libraries + TITLE:=The Pairing-Based Cryptography Library + URL:=https://crypto.stanford.edu/pbc/ + DEPENDS:=+libgmp +endef + +define Package/libpbc/description + Pairing-based cryptography is a relatively young area of cryptography + that revolves around a certain function with special properties. + + The PBC (Pairing-Based Cryptography) library is a free C library + (released under the GNU Lesser General Public License) built on the GMP + library that performs the mathematical operations underlying + pairing-based cryptosystems. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/pbc + $(CP) $(PKG_INSTALL_DIR)/usr/include/pbc/*.h $(1)/usr/include/pbc + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpbc* $(1)/usr/lib/ +endef + +define Package/libpbc/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpbc.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libpbc)) diff --git a/libs/libpbc/patches/010-pass-cflags.patch b/libs/libpbc/patches/010-pass-cflags.patch new file mode 100644 index 00000000..078ff838 --- /dev/null +++ b/libs/libpbc/patches/010-pass-cflags.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -10,7 +10,6 @@ AC_CONFIG_SRCDIR([./]) + LT_INIT + #AC_CANONICAL_HOST + +-CFLAGS= + default_fink_path=/sw + case $host_os in + darwin*) diff --git a/libs/libpfring/Makefile b/libs/libpfring/Makefile new file mode 100644 index 00000000..6a689a04 --- /dev/null +++ b/libs/libpfring/Makefile @@ -0,0 +1,90 @@ +# +# Copyright (C) 2017 Banglang Huang +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=libpfring +PKG_VERSION:=7.6.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)? +PKG_HASH:=8f1eb1c5a823984c0ab9e1f9b00b67755a729c17112f48ed618f7ffd717c52d7 +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION) + +PKG_MAINTAINER:=Banglang Huang + +PKG_FIXUP:=patch-libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_PATH:=userland +MAKE_PATH:=userland/lib + +define Package/libpfring + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Library for PR_RING (package process framework) + URL:=https://github.com/ntop/pf_ring + DEPENDS:=+kmod-pf-ring +libpcap +libpthread + LICENSE:=LGPL-2.1-or-later + LICENSE_FILES:=LICENSE +endef + +define Package/libpfring/description + PF_RING is a high speed packet capture library that turns a commodity PC into an efficient and cheap + network measurement box suitable for both packet and active traffic analysis and manipulation. + Moreover, PF_RING opens totally new markets as it enables the creation of efficient application such as + traffic balancers or packet filters in a matter of lines of codes. +endef + +define KernelPackage/pf-ring + SUBMENU:=Network Support + TITLE:=PF_RING Kernel driver + FILES:=$(PKG_BUILD_DIR)/kernel/pf_ring.ko + AUTOLOAD:=$(call AutoLoad,90,pf_ring,1) + LICENSE:=GPL-2.0-or-later +endef + +define KernelPackage/pf-ring/description + Kernel module for libpf-ring package +endef + +CONFIGURE_VARS += \ + MACHINE="$(ARCH)" \ + ac_cv_lib_nl_3_nl_socket_alloc=no + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + KERNEL_DIR="$(LINUX_DIR)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + M="$(PKG_BUILD_DIR)/kernel" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS) -I$(PKG_BUILD_DIR)/kernel" \ + modules + $(call Build/Compile/Default) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* $(1)/usr/lib/ +endef + +define Package/libpfring/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* $(1)/usr/lib/ + $(LN) libpfring.so $(1)/usr/lib/libpfring.so.1 +endef + +$(eval $(call BuildPackage,libpfring)) +$(eval $(call KernelPackage,pf-ring)) diff --git a/libs/libpfring/patches/0001-fix-cross-compiling.patch b/libs/libpfring/patches/0001-fix-cross-compiling.patch new file mode 100644 index 00000000..46856429 --- /dev/null +++ b/libs/libpfring/patches/0001-fix-cross-compiling.patch @@ -0,0 +1,32 @@ +--- a/userland/configure ++++ b/userland/configure +@@ -3861,12 +3861,6 @@ fi + if test "$IS_FREEBSD" != "1" && test "$cross_compiling" != "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if r/w locks are supported" >&5 + $as_echo_n "checking if r/w locks are supported... " >&6; } +- if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } +-else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -3879,7 +3873,7 @@ else + + + _ACEOF +-if ac_fn_c_try_run "$LINENO"; then : ++if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + cat >>confdefs.h <<_ACEOF +@@ -3893,7 +3887,6 @@ $as_echo "no" >&6; } + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi + + fi + diff --git a/libs/libplist/Makefile b/libs/libplist/Makefile index c69c7331..73595a77 100644 --- a/libs/libplist/Makefile +++ b/libs/libplist/Makefile @@ -8,28 +8,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libplist -PKG_VERSION:=2.0.0 -PKG_RELEASE:=3 +PKG_VERSION:=2.2.0 +PKG_RELEASE:=2 -PKG_MAINTAINER:=Lukasz Baj -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING.LESSER +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://www.libimobiledevice.org/downloads +PKG_HASH:=4a5517e5377ec421df84c586ba85bb4e1d26f11ad203d7d450a907c0156fbd9a -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/libimobiledevice/libplist.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=62ec804736435fa34e37e66e228e17e2aacee1d7 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=0b6a7656b431f78b0f11370938e577bc16f30d2255ad675bf4b63a96876fb290 +PKG_MAINTAINER:=Rosen Penev +PKG_CPE_ID:=cpe:/a:libimobiledevice:libplist -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/libplist/Default TITLE:=Apple property list - URL:=http://www.libimobiledevice.org/ + URL:=https://www.libimobiledevice.org/ + SUBMENU:=libimobiledevice endef define Package/libplist/Default/description @@ -42,6 +40,8 @@ define Package/libplist CATEGORY:=Libraries DEPENDS:=+libxml2 TITLE+= library + PKG_LICENSE:=LGPL-2.1-or-later + PKG_LICENSE_FILES:=COPYING.LESSER endef define Package/libplist/description @@ -52,8 +52,10 @@ define Package/libplistcxx $(call Package/libplist/Default) SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libplist +libstdcpp + DEPENDS:=+libplist $(CXX_DEPENDS) TITLE+= C++ library + PKG_LICENSE:=LGPL-2.1-or-later + PKG_LICENSE_FILES:=COPYING.LESSER endef define Package/libplistcxx/description @@ -61,48 +63,56 @@ define Package/libplistcxx/description This package contains the libplist C++ shared library. endef -define Package/libplist-utils +define Package/plistutil $(call Package/libplist/Default) SECTION:=utils CATEGORY:=Utilities DEPENDS:=+libplist TITLE+= converter + LICENSE:=GPL-2.0-or-later + LICENSE_FILES:=COPYING endef -define Package/libplist-utils/description +define Package/plistutil/description $(call Package/libplist/Default/description) This package contains the libplist utilities. endef CONFIGURE_ARGS += \ + --disable-static \ --without-cython -TARGET_LDFLAGS += -lz +TARGET_CFLAGS += -flto +TARGET_CXXFLAGS += -std=c++11 -fno-rtti +TARGET_LDFLAGS += -Wl,--gc-sections define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/plist $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist-2.0*.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libplist*.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libplist++-2.0.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libplist-2.0.pc $(1)/usr/lib/pkgconfig/ + $(LN) libplist++-2.0.pc $(1)/usr/lib/pkgconfig/libplist++.pc + $(LN) libplist-2.0.pc $(1)/usr/lib/pkgconfig/libplist.pc endef define Package/libplist/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist-2.0.so.* $(1)/usr/lib/ endef define Package/libplistcxx/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist++.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libplist++-2.0.so.* $(1)/usr/lib/ endef -define Package/libplist-utils/install +define Package/plistutil/install $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/usr/bin/plistutil $(1)/usr/bin/ endef $(eval $(call BuildPackage,libplist)) $(eval $(call BuildPackage,libplistcxx)) -$(eval $(call BuildPackage,libplist-utils)) +$(eval $(call BuildPackage,plistutil)) diff --git a/libs/libpng/Makefile b/libs/libpng/Makefile index fc48925c..7e0bea5d 100644 --- a/libs/libpng/Makefile +++ b/libs/libpng/Makefile @@ -8,23 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libpng -PKG_VERSION:=1.6.34 -PKG_RELEASE:=1 +PKG_VERSION:=1.6.37 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/libpng -PKG_HASH:=2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6 +PKG_HASH:=505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca + PKG_MAINTAINER:=Jo-Philipp Wich - -PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause +PKG_LICENSE:=Libpng GPL-2.0-or-later BSD-3-Clause PKC_LICENSE_FILES:=LICENSE contrib/gregbook/COPYING contrib/gregbook/LICENSE +PKG_CPE_ID:=cpe:/a:libpng:libpng -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/libpng SECTION:=libs @@ -34,27 +33,26 @@ define Package/libpng URL:=http://www.libpng.org/pub/png/libpng.html endef -TARGET_CFLAGS += $(FPIC) +CMAKE_OPTIONS += \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DPNG_BUILD_ZLIB=ON \ + -DPNG_SHARED=ON \ + -DPNG_STATIC=ON \ + -DPNG_TESTS=OFF \ + -DPNG_FRAMEWORK=OFF \ + -DPNG_DEBUG=OFF \ + -DPNG_HARDWARE_OPTIMIZATIONS=O$(if $(findstring powerpc,$(CONFIG_ARCH))$(findstring mipsel,$(CONFIG_ARCH)),FF,N) \ + -Dld-version-script=OFF -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - $(if $(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),--enable-hardware-optimizations=yes --enable-arm-neon=yes) +TARGET_LDFLAGS += -lz define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,16}-config $(1)/usr/bin/ + $(call Build/InstallDev/cmake,$(1)) $(SED) \ 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \ $(1)/usr/bin/libpng{,16}-config - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf,libconf}.h $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/libpng16 $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng16.{a,la,so*} $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng.{a,la,so} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,16}.pc $(1)/usr/lib/pkgconfig/ + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libpng16.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libpng16.pc $(INSTALL_DIR) $(2)/bin for f in libpng{,16}-config; do \ $(LN) ../../usr/bin/$$$$f $(2)/bin/ ; \ @@ -67,5 +65,4 @@ define Package/libpng/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng.so $(1)/usr/lib/ endef -$(eval $(call HostBuild)) $(eval $(call BuildPackage,libpng)) diff --git a/libs/libpng/patches/101-old-libtool.patch b/libs/libpng/patches/101-old-libtool.patch deleted file mode 100644 index 47d89ce3..00000000 --- a/libs/libpng/patches/101-old-libtool.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index a978473..302ac4d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -70,7 +70,7 @@ AC_PROG_MAKE_SET - dnl libtool/libtoolize; version 2.4.2 is the tested version. This or any - dnl compatible later version may be used - LT_INIT([win32-dll]) --LT_PREREQ([2.4.2]) -+LT_PREREQ([2.4]) - - # Some awks crash when confronted with pnglibconf.dfa, do a test run now - # to make sure this doesn't happen diff --git a/libs/libpng/patches/200-ccache.patch b/libs/libpng/patches/200-ccache.patch new file mode 100644 index 00000000..25de3294 --- /dev/null +++ b/libs/libpng/patches/200-ccache.patch @@ -0,0 +1,19 @@ +--- a/scripts/genout.cmake.in ++++ b/scripts/genout.cmake.in +@@ -14,6 +14,7 @@ set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@") + + set(AWK "@AWK@") + set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") ++set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@") + set(CMAKE_C_FLAGS @CMAKE_C_FLAGS@) + set(INCDIR "@CMAKE_CURRENT_BINARY_DIR@") + set(PNG_PREFIX "@PNG_PREFIX@") +@@ -58,7 +59,7 @@ if ("${INPUTEXT}" STREQUAL ".c" AND "${OUTPUTEXT}" STREQUAL ".out") + set(PNG_PREFIX_DEF "-DPNG_PREFIX=${PNG_PREFIX}") + endif() + +- execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" ++ execute_process(COMMAND "${CMAKE_C_COMPILER}" ${CMAKE_C_COMPILER_ARG1} "-E" + ${CMAKE_C_FLAGS} + ${PLATFORM_C_FLAGS} + "-I${SRCDIR}" diff --git a/libs/libpsl/Makefile b/libs/libpsl/Makefile new file mode 100644 index 00000000..335d9124 --- /dev/null +++ b/libs/libpsl/Makefile @@ -0,0 +1,65 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libpsl +PKG_VERSION:=0.21.0 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=W. Michael Petullo + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/rockdaboot/libpsl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_HASH:=41bd1c75a375b85c337b59783f5deb93dbb443fb0a52d257f403df7bd653ee12 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/libpsl + SECTION:=libs + CATEGORY:=Libraries + TITLE:=C library to handle the Public Suffix List + URL:=https://github.com/rockdaboot/libpsl + DEPENDS:=+libidn2 +libunistring $(INTL_DEPENDS) +endef + +define Package/libpsl/description + C library to handle the Public Suffix List +endef + +CONFIGURE_ARGS += \ + --disable-gtk-doc-html \ + --disable-man \ + --disable-rpath + +define Build/InstallDev + $(INSTALL_DIR) \ + $(1)/usr/lib \ + $(1)/usr/include + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/* \ + $(1)/usr/lib/ +endef + +define Package/libpsl/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libpsl)) diff --git a/libs/libqmi/Makefile b/libs/libqmi/Makefile index 04d9628d..c118a995 100644 --- a/libs/libqmi/Makefile +++ b/libs/libqmi/Makefile @@ -8,20 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libqmi -PKG_VERSION:=1.24.0 -PKG_RELEASE:=3 +PKG_VERSION:=1.26.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/libqmi -PKG_HASH:=aeb69f90c273467cce246176cba0967c6413f1995a976992770a597c4fe28c79 +PKG_HASH:=7f0429e0ae58792e21512d09ca2412537840ea42696762795af1284a65fd6e40 PKG_MAINTAINER:=Nicholas Smith PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/libs/libradcli/Makefile b/libs/libradcli/Makefile index c807329a..792d09d0 100644 --- a/libs/libradcli/Makefile +++ b/libs/libradcli/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libradcli -PKG_VERSION:=1.2.5 +PKG_VERSION:=1.2.11 PKG_RELEASE:=1 PKG_SOURCE:=radcli-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/radcli/radcli/releases/download/$(PKG_VERSION)/ -PKG_HASH:=be7551bcf0c210b8efffe4d2952d61feb8591edc922660910488bfaab040e82c +PKG_SOURCE_URL:=https://github.com/radcli/radcli/releases/download/$(PKG_VERSION) +PKG_HASH:=b6210e4c7deae235bb8c4e9df20c4f82c8bc2bda6d6214d50c5667660ab38548 PKG_BUILD_DIR:=$(BUILD_DIR)/radcli-$(PKG_VERSION) PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -24,7 +25,7 @@ define Package/libradcli SECTION:=libs CATEGORY:=Libraries TITLE:=A library for radius clients - URL:=http://radcli.github.io/radcli/ + URL:=https://radcli.github.io/radcli MAINTAINER:=Nikos Mavrogiannopoulos DEPENDS:= +RADCLI_TLS:libgnutls +libnettle endef diff --git a/libs/libradiotap/Makefile b/libs/libradiotap/Makefile new file mode 100644 index 00000000..9d9bf893 --- /dev/null +++ b/libs/libradiotap/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2016 Bruno Randolf (br1@einfach.org) +# 2019 Nick Hainke (vincent@systemli.org) +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libradiotap +PKG_VERSION:=2020-06-22 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/radiotap/radiotap-library.git +PKG_SOURCE_VERSION:=94984dd829a605a2d7af55241145c159607f3b30 +PKG_MIRROR_HASH:=00398c48cac5bf34e6e363b650233353413e232fd2fc7851ccd0a52a20122e1c + +PKG_MAINTAINER:=Nick Hainke +PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libradiotap + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Radiotap Parser Library + URL:=https://www.radiotap.org/ +endef + +define Package/libradiotap/description + Library that supplies additional information about frames from the driver to userspace applications. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/radiotap* $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiotap.so* $(1)/usr/lib/ +endef + +define Package/libradiotap/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiotap.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libradiotap)) diff --git a/libs/libre2/Makefile b/libs/libre2/Makefile new file mode 100644 index 00000000..80495ce2 --- /dev/null +++ b/libs/libre2/Makefile @@ -0,0 +1,48 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=re2 +PKG_VERSION:=2020-04-01 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/google/re2/tar.gz/$(PKG_VERSION)? +PKG_HASH:=98794bc5416326817498384a9c43cbb5a406bab8da9f84f83c39ecad43ed5cea + +PKG_MAINTAINER:= +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/re2 + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libstdcpp + TITLE:=RE2 - C++ regular expression library + URL:=https://github.com/google/re2 + ABI_VERSION:=6 +endef + +define Package/re2/description + RE2 is a fast, safe, thread-friendly alternative to backtracking regular + expression engines like those used in PCRE, Perl, and Python. + It is a C++ library. +endef + +CMAKE_OPTIONS += \ + -DBUILD_SHARED_LIBS=ON + +TARGET_LDFLAGS += \ + $(if $(CONFIG_USE_GLIBC),-lm) \ + -Wl,--as-needed,--gc-sections + +define Package/re2/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libre2.so $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,re2)) diff --git a/libs/libre2/patches/010-cxx17.patch b/libs/libre2/patches/010-cxx17.patch new file mode 100644 index 00000000..1eccb319 --- /dev/null +++ b/libs/libre2/patches/010-cxx17.patch @@ -0,0 +1,23 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,9 +38,9 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_options(/utf-8) + elseif(CYGWIN OR MINGW) + # See https://stackoverflow.com/questions/38139631 for details. +- add_compile_options(-std=gnu++11) ++ add_compile_options(-std=gnu++17) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") +- add_compile_options(-std=c++11) ++ add_compile_options(-std=c++17) + endif() + + if(WIN32) +--- a/re2.pc ++++ b/re2.pc +@@ -6,5 +6,5 @@ libdir=@libdir@ + Name: re2 + Description: RE2 is a fast, safe, thread-friendly regular expression engine. + Version: 0.0.0 +-Cflags: -std=c++11 -pthread -I${includedir} ++Cflags: -std=c++17 -pthread -I${includedir} + Libs: -pthread -L${libdir} -lre2 diff --git a/libs/libredblack/Makefile b/libs/libredblack/Makefile index 75a616a0..2e3f020b 100644 --- a/libs/libredblack/Makefile +++ b/libs/libredblack/Makefile @@ -8,25 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libredblack -PKG_VERSION:=0.2.3 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_VERSION:=1.3 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/libredblack +PKG_HASH:=a0ecc59b0aae2df01558a6950532c711a782a099277b439a51d270003092f44f -PKG_LICENSE:=GPL-2.0+ PKG_MAINTAINER:=Mislav Novakovic - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=a399310d99b61eec4d3c0677573ab5dddcf9395d -PKG_MIRROR_HASH:=71b05e70988b97865f734c698dd5564e349680556ccb8634a5bddf344012f22a -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/sysrepo/libredblack.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) - -PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_BUILD_DIR:=$(PKG_BUILD_ROOT) +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -35,13 +30,17 @@ define Package/libredblack SECTION:=libs CATEGORY:=Libraries TITLE:=RedBlack tree library - URL:=$(PKG_SOURCE_URL) + URL:=http://libredblack.sourceforge.net/ endef define Package/libredblack/description RedBlack Balanced Tree Searching and Sorting Library. endef +CONFIGURE_ARGS += --without-rbgen +CONFIGURE_VARS += lt_cv_prog_cc_pic=$(FPIC) +MAKE_FLAGS += CFLAGS="$(TARGET_CFLAGS)" + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libredblack.{so*,a,la} $(1)/usr/lib/ @@ -52,7 +51,7 @@ endef define Package/libredblack/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libredblack.{so*,a,la} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libredblack.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/include $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/redblack.h $(1)/usr/include diff --git a/libs/libsamplerate/Makefile b/libs/libsamplerate/Makefile index c01c89b6..c83f0e99 100644 --- a/libs/libsamplerate/Makefile +++ b/libs/libsamplerate/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsamplerate -PKG_VERSION:=0.1.8 +PKG_VERSION:=0.1.9 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.mega-nerd.com/SRC/ -PKG_HASH:=93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06 +PKG_HASH:=0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1 PKG_MAINTAINER:=Ted Hess diff --git a/libs/libsearpc/Makefile b/libs/libsearpc/Makefile index 31346034..e084e4eb 100644 --- a/libs/libsearpc/Makefile +++ b/libs/libsearpc/Makefile @@ -9,23 +9,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsearpc PKG_VERSION:=3.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/haiwen/libsearpc/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=c479d85e405674c3450eac040abe143af5a9fafe7f1b74926e2a05280ab5420e +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/haiwen/libsearpc.git +PKG_SOURCE_VERSION:=d1fd7518a20b25766ff98d6fde6e40c63626ca0d +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(call version_abbrev,$(PKG_SOURCE_VERSION)) +PKG_MIRROR_HASH:=ee8b8b50b480afbcb71bd73cd9c2a96cfa72e9dafaf5773574adbf348e49a0d4 PKG_MAINTAINER:=Alexandru Ardelean , Jeffery To PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE.txt PKG_FIXUP:=autoreconf +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PYTHON3_PKG_BUILD:=0 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk -include ../../lang/python/python-package.mk include ../../lang/python/python3-package.mk define Package/libsearpc @@ -48,19 +51,21 @@ define Package/python3-searpc SUBMENU:=Python TITLE:=Python bindings for Searpc DEPENDS:=+libsearpc +python3-light +python3-logging - VARIANT:=python3 endef define Package/python3-searpc/description $(call Package/libsearpc/description) - This package contains the Python bindings for Searpc. + This package contains Python bindings for Searpc. endef CONFIGURE_ARGS += \ --disable-compile-demo \ --disable-server-pkg +CONFIGURE_VARS += \ + PYTHON="$(HOST_PYTHON3_BIN)" + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/{bin,include} $(INSTALL_DIR) $(1)/usr/lib/pkgconfig @@ -70,20 +75,9 @@ define Build/InstallDev $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/ endef -# Include Python 2 bindings in this package to maintain compatibility with previous versions define Package/libsearpc/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/pysearpc $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/pysearpc/*.py $(1)$(PYTHON_PKG_DIR)/pysearpc/ - rm -f $(1)$(PYTHON_PKG_DIR)/pysearpc/{pygencode,test_pysearpc}.py -endef - -define Py3Build/Compile - rm -rf $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc - $(INSTALL_DIR) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc - $(INSTALL_DATA) $(PKG_BUILD_DIR)/pysearpc/*.py $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc/ - rm -f $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc/{pygencode,test_pysearpc}.py endef Py3Package/python3-searpc/install:=: diff --git a/libs/libsearpc/patches/001-fix-memory-leak-GH-48.patch b/libs/libsearpc/patches/001-fix-memory-leak-GH-48.patch deleted file mode 100644 index a0ae81fc..00000000 --- a/libs/libsearpc/patches/001-fix-memory-leak-GH-48.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 9b2e2dc65213fb22ed400dc54e4c2279564df62b Mon Sep 17 00:00:00 2001 -From: ly1217 -Date: Thu, 31 Oct 2019 00:31:38 -0700 -Subject: [PATCH] Fix memory leak. - ---- - lib/searpc-named-pipe-transport.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/lib/searpc-named-pipe-transport.c -+++ b/lib/searpc-named-pipe-transport.c -@@ -377,6 +377,7 @@ void searpc_free_client_with_pipe_transp - close(pipe_client->pipe_fd); - #endif - g_free (pipe_client); -+ g_free (data->service); - g_free (data); - searpc_client_free (client); - } diff --git a/libs/libsearpc/patches/001-no-python-compile.patch b/libs/libsearpc/patches/001-no-python-compile.patch new file mode 100644 index 00000000..fc9120b0 --- /dev/null +++ b/libs/libsearpc/patches/001-no-python-compile.patch @@ -0,0 +1,8 @@ +--- a/pysearpc/Makefile.am ++++ b/pysearpc/Makefile.am +@@ -1,4 +1,4 @@ + + pysearpcdir=${pyexecdir}/pysearpc + +-pysearpc_PYTHON = __init__.py client.py common.py errors.py named_pipe.py server.py transport.py utils.py ++pysearpc_DATA = __init__.py client.py common.py errors.py named_pipe.py server.py transport.py utils.py diff --git a/libs/libseccomp/Makefile b/libs/libseccomp/Makefile index 705636cc..78fba969 100644 --- a/libs/libseccomp/Makefile +++ b/libs/libseccomp/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libseccomp -PKG_VERSION:=2.4.1 -PKG_RELEASE:=1 +PKG_VERSION:=2.4.2 +PKG_RELEASE:=2 PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/ -PKG_HASH:=1ca3735249af66a1b2f762fe6e710fcc294ad7185f1cc961e5bd83f9988006e8 +PKG_HASH:=b54f27b53884caacc932e75e6b44304ac83586e2abe7a83eca6daecc5440585b PKG_MAINTAINER:=Nikos Mavrogiannopoulos PKG_CPE_ID:=cpe:/a:libseccomp_project:libseccomp @@ -67,7 +67,7 @@ endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/seccomp.h \ + $(PKG_INSTALL_DIR)/usr/include/seccomp*.h \ $(1)/usr/include/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libseccomp.{a,so*} \ @@ -88,4 +88,4 @@ define Package/scmp_sys_resolver/install endef $(eval $(call BuildPackage,libseccomp)) -$(eval $(call BuildPackage,scmp_sys_resolver)) \ No newline at end of file +$(eval $(call BuildPackage,scmp_sys_resolver)) diff --git a/libs/libshout/Makefile b/libs/libshout/Makefile index 6a02ff69..2514313b 100644 --- a/libs/libshout/Makefile +++ b/libs/libshout/Makefile @@ -6,21 +6,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libshout -PKG_VERSION:=2.4.1 -PKG_RELEASE:=1 +PKG_VERSION:=2.4.3 +PKG_RELEASE:=2 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/libshout/ -PKG_HASH:=f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d +PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/libshout/ +PKG_HASH:=0d8af55d1141bf90710bcd41a768c9cc5adb251502a0af1dd22c8da215d40dfe -PKG_LICENSE:=LGPL-2.0+ +PKG_MAINTAINER:=Ted Hess +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill , \ - Ted Hess +PKG_CPE_ID:=cpe:/a:libshout:libshout PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -77,21 +77,22 @@ Package/libshout-full/description=$(Package/libshout/description/default) CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ - --disable-speex + --disable-speex \ + --without-pic ifeq ($(BUILD_VARIANT),notheora) CONFIGURE_ARGS += --disable-theora endif ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += --disable-theora --with-openssl="no" + CONFIGURE_ARGS += --disable-theora --without-openssl endif CONFIGURE_VARS += \ VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \ VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \ -TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link="$(STAGING_DIR)/usr/lib" +TARGET_CFLAGS += $(FPIC) PACKAGE_CONFIG_FILE=shout$(if $(findstring $(BUILD_VARIANT),full),-full).pc diff --git a/libs/libshout/patches/120-vorbis-c.patch b/libs/libshout/patches/120-vorbis-c.patch index be7ca7a1..d7886b7f 100644 --- a/libs/libshout/patches/120-vorbis-c.patch +++ b/libs/libshout/patches/120-vorbis-c.patch @@ -1,6 +1,6 @@ --- a/src/codec_vorbis.c +++ b/src/codec_vorbis.c -@@ -28,7 +28,7 @@ +@@ -29,7 +29,7 @@ #endif #include diff --git a/libs/libshout/patches/130-usleep.patch b/libs/libshout/patches/130-usleep.patch new file mode 100644 index 00000000..291593ad --- /dev/null +++ b/libs/libshout/patches/130-usleep.patch @@ -0,0 +1,14 @@ +--- a/examples/nonblocking.c ++++ b/examples/nonblocking.c +@@ -70,8 +70,10 @@ int main() + if (ret == SHOUTERR_BUSY) + printf("Connection pending...\n"); + ++ const struct timespec req = {0, 10 * 1000 * 1000}; ++ struct timespec rem; + while (ret == SHOUTERR_BUSY) { +- usleep(10000); ++ nanosleep(&req, &rem); + ret = shout_get_connected(shout); + } + diff --git a/libs/libshout/patches/140-no_example_doc_win32.patch b/libs/libshout/patches/140-no_example_doc_win32.patch deleted file mode 100644 index 4f093280..00000000 --- a/libs/libshout/patches/140-no_example_doc_win32.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -3,14 +3,14 @@ - AUTOMAKE_OPTIONS = 1.6 foreign - ACLOCAL_AMFLAGS = -I m4 - --SUBDIRS = include src examples doc win32 -+SUBDIRS = include src - - EXTRA_DIST = INSTALL m4/shout.m4 m4/acx_pthread.m4 \ - m4/ogg.m4 m4/vorbis.m4 m4/xiph_compiler.m4 m4/xiph_net.m4 \ - m4/xiph_types.m4 libshout.ckport - - docdir = $(datadir)/doc/$(PACKAGE) --doc_DATA = COPYING NEWS README examples/example.c examples/nonblocking.c -+doc_DATA = COPYING README - - m4datadir = $(datadir)/aclocal - m4data_DATA = m4/shout.m4 diff --git a/libs/libsigc++/Makefile b/libs/libsigc++/Makefile deleted file mode 100644 index f7ad9881..00000000 --- a/libs/libsigc++/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libsigc++ -PKG_VERSION:=2.5.4 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNOME/libsigc++/2.5 -PKG_HASH:=ecf55f53d6058ba6e41985b862f2e95fb5c2b31c008caa16984e790547337ea7 -PKG_MAINTAINER:=Steven Barth -PKG_LICENSE:=LGPL-2.1 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/libsigcxx - SECTION:=libs - CATEGORY:=Libraries - TITLE:=typesafe callback system for standard C++ - URL:=http://libsigc.sourceforge.net/ - DEPENDS:=+libstdcpp -endef - -define Package/libsigcxx/description - It allows you to define signals and to connect those signals to any - callback function, either global or a member function, regardless of - whether it is static or virtual. -endef - -TARGET_CFLAGS += $(FPIC) - -TARGET_CPPFLAGS += \ - -fno-strict-aliasing -fno-inline \ - -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/sigc++-2.0 $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.{a,so*} $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sigc++-2.0 $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sigc++-2.0.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/libsigcxx/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libsigcxx)) diff --git a/libs/libsigc++/patches/001-no_doc_tests_examples.patch b/libs/libsigc++/patches/001-no_doc_tests_examples.patch deleted file mode 100644 index f2c22c3b..00000000 --- a/libs/libsigc++/patches/001-no_doc_tests_examples.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -22,7 +22,7 @@ doc_subdirs = docs - else - doc_subdirs = - endif --SUBDIRS = sigc++ tests examples $(doc_subdirs) -+SUBDIRS = sigc++ - - sigc_configdir = $(libdir)/$(SIGCXX_MODULE_NAME)/include - nodist_sigc_config_HEADERS = sigc++config.h ---- a/Makefile.in -+++ b/Makefile.in -@@ -204,7 +204,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - CSCOPE = cscope --DIST_SUBDIRS = sigc++ tests examples docs -+DIST_SUBDIRS = sigc++ - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - distdir = $(PACKAGE)-$(VERSION) - top_distdir = $(distdir) diff --git a/libs/libsndfile/Makefile b/libs/libsndfile/Makefile index 696ef761..41cbf92b 100644 --- a/libs/libsndfile/Makefile +++ b/libs/libsndfile/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2010 OpenWrt.org +# Copyright (C) 2007-2019 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,20 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsndfile -PKG_VERSION:=1.0.28 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.mega-nerd.com/libsndfile/files/ -PKG_HASH:=1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/erikd/libsndfile.git +PKG_SOURCE_DATE:=2019-04-21 +PKG_SOURCE_VERSION:=25824cb914fb3b79e18f31fb861e218c84be7d34 +PKG_MIRROR_HASH:=9b3beef70003456ff297ce50ecd5cb1d066ca98f10f6363562431d773b3fcb3d PKG_LICENSE:=LGPLv2.1 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:libsndfile_project:libsndfile -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/libsndfile SECTION:=libs @@ -29,7 +31,6 @@ define Package/libsndfile TITLE:=Library for reading/writing audio files URL:=http://www.mega-nerd.com/libsndfile/ MAINTAINER:=Peter Wagner - DEPENDS:=@!avr32 endef define Package/libsndfile/description @@ -37,18 +38,10 @@ define Package/libsndfile/description containing sampled audio data. endef -CONFIGURE_ARGS+= \ - --disable-alsa \ - --disable-external-libs \ - --disable-sqlite - -CONFIGURE_VARS += \ - ac_cv_sys_file_offset_bits=64 \ - ac_cv_sys_large_files=yes \ - ac_cv_sys_largefile_CFLAGS=-D_LARGFILE_SOURCE \ - ac_cv_sys_largefile_LDFLAGS= \ - ac_cv_sys_largefile_LIBS= \ - ac_cv_sys_largefile_source=yes +CMAKE_OPTIONS += \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DENABLE_EXTERNAL_LIBS:BOOL=FALSE \ + -DBUILD_REGTEST:BOOL=FALSE TARGET_CFLAGS += $(FPIC) diff --git a/libs/libsoc/Makefile b/libs/libsoc/Makefile index 8209960b..ce73d237 100644 --- a/libs/libsoc/Makefile +++ b/libs/libsoc/Makefile @@ -8,10 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsoc -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/jackmitch/libsoc.git +PKG_MIRROR_HASH:=bdfaace3d59da30c4aa5ef78b5e235b5e9c41cd56867e04cb0acefc4dcd62d33 PKG_SOURCE_DATE:=2016-12-22 PKG_SOURCE_VERSION:=5b788d4d558a78c52e6cfe97325e4564b307a3a0 @@ -43,11 +44,6 @@ CONFIGURE_ARGS += \ --enable-static \ --disable-cxx -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_board.h $(1)/usr/include/ diff --git a/libs/libsodium/Makefile b/libs/libsodium/Makefile index 704e32ef..a75a5339 100644 --- a/libs/libsodium/Makefile +++ b/libs/libsodium/Makefile @@ -8,20 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsodium -PKG_VERSION:=1.0.16 +PKG_VERSION:=1.0.18 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases \ -https://github.com/jedisct1/libsodium/releases/download/$(PKG_VERSION) -PKG_HASH:=eeadc7e1e1bcef09680fb4837d448fbdf57224978f865ac1c16745868fbd0533 - -PKG_FIXUP:=libtool autoreconf -PKG_USE_MIPS16:=0 -PKG_INSTALL:=1 + https://github.com/jedisct1/libsodium/releases/download/$(PKG_VERSION) +PKG_HASH:=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 PKG_MAINTAINER:=Damiano Renfer PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=LICENSE + +PKG_USE_MIPS16:=0 +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -30,7 +31,6 @@ define Package/libsodium CATEGORY:=Libraries TITLE:=P(ortable|ackageable) NaCl-based crypto library URL:=https://github.com/jedisct1/libsodium - MAINTAINER:=Damiano Renfer endef define Package/libsodium/description @@ -53,7 +53,7 @@ endef CONFIGURE_ARGS+= \ --disable-ssp \ - $(if $(CONFIG_LIBSODIUM_MINIMAL),--enable-minimal=yes,--enable-minimal=no) + $(if $(CONFIG_LIBSODIUM_MINIMAL),--enable,--disable)-minimal define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/sodium diff --git a/libs/libsoup/Makefile b/libs/libsoup/Makefile index 385691fc..87d24a5e 100644 --- a/libs/libsoup/Makefile +++ b/libs/libsoup/Makefile @@ -1,5 +1,3 @@ -# -# Copyright (C) 2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,45 +6,44 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsoup -PKG_VERSION:=2.60.3 +PKG_VERSION:=2.70.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.60 -PKG_HASH:=1b0dc762f23abe4e0d29b77370e539fd35f31d8e8e0318d6ddccff395be68a22 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.70 +PKG_HASH:=54b020f74aefa438918d8e53cff62e2b1e59efe2de53e06b19a4b07b1f4d5342 -PKG_LICENSE:=GPL-2.0 +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:gnome:libsoup -PKG_FIXUP:=autoreconf +PKG_BUILD_DEPENDS:=meson/host glib2/host PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk - -TARGET_LDFLAGS+=\ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv) +include ../../devel/meson/meson.mk define Package/libsoup SECTION:=libs CATEGORY:=Libraries TITLE:=libsoup - URL:=http://live.gnome.org/LibSoup - MAINTAINER:=W. Michael Petullo - DEPENDS:=+glib2 +libxml2 +libgnutls +libsqlite3 $(ICONV_DEPENDS) $(INTL_DEPENDS) + URL:=https://wiki.gnome.org/Projects/libsoup + DEPENDS:=+glib2 +libxml2 +libgnutls +libsqlite3 +libpsl $(ICONV_DEPENDS) $(INTL_DEPENDS) endef -define Build/Configure - $(call Build/Configure/Default, \ - --enable-ssl \ - --disable-glibtest \ - --without-apache-httpd \ - --without-gnome \ - --without-gssapi \ - --enable-vala=no \ - --disable-more-warnings \ - ) -endef +MESON_ARGS += \ + -Dgssapi=disabled \ + -Dntlm=disabled \ + -Dbrotli=disabled \ + -Dtls_check=false \ + -Dgnome=false \ + -Dintrospection=disabled \ + -Dvapi=disabled \ + -Dgtk_doc=false \ + -Dtests=false \ + -Dinstalled_tests=false define package/libsoup/decription Libsoup is an HTTP library implementation in C @@ -56,7 +53,7 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/libsoup-2.4/libsoup} $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libsoup-2.4.{so*,la,a} \ + $(PKG_INSTALL_DIR)/usr/lib/libsoup-2.4.so* \ $(1)/usr/lib/ $(INSTALL_DATA) \ diff --git a/libs/libsoxr/Makefile b/libs/libsoxr/Makefile index 69dffc7d..d3f88ea2 100644 --- a/libs/libsoxr/Makefile +++ b/libs/libsoxr/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsoxr PKG_VERSION:=0.1.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=@SF/project/soxr/ PKG_SOURCE:=soxr-$(PKG_VERSION)-Source.tar.xz @@ -17,12 +17,12 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/soxr-$(PKG_VERSION)-Source PKG_MAINTAINER:=Ted Hess , \ Mike Brady - PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=LICENCE +PKG_CPE_ID:=cpe:/a:sox:sox +CMAKE_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -31,7 +31,7 @@ define Package/libsoxr SECTION:=libs CATEGORY:=Libraries TITLE:=The SoX Resampler library - URL:=http://sourceforge.net/projects/soxr/ + URL:=https://sourceforge.net/projects/soxr/ DEPENDS:= +libpthread endef @@ -44,14 +44,6 @@ CMAKE_OPTIONS:= -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0 CMAKE_OPTIONS+= -DHAVE_WORDS_BIGENDIAN_EXITCODE=$(if $(CONFIG_BIG_ENDIAN),0,1) CMAKE_OPTIONS+= -DWITH_OPENMP=0 -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/soxr.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/soxr.pc $(1)/usr/lib/pkgconfig/ -endef - define Package/libsoxr/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/ diff --git a/libs/libsoxr/patches/020-pkgconfig.patch b/libs/libsoxr/patches/020-pkgconfig.patch new file mode 100644 index 00000000..cf442556 --- /dev/null +++ b/libs/libsoxr/patches/020-pkgconfig.patch @@ -0,0 +1,56 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -88,7 +88,7 @@ if (BUILD_FRAMEWORK) + set_target_properties (${PROJECT_NAME} PROPERTIES FRAMEWORK TRUE) + elseif (NOT WIN32) + set (TARGET_PCS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc) +- configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${TARGET_PCS}) ++ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${TARGET_PCS} @ONLY) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) + endif () + +@@ -112,7 +112,7 @@ if (WITH_LSR_BINDINGS) + set_target_properties (${LSR} PROPERTIES FRAMEWORK TRUE) + elseif (NOT WIN32) + set (TARGET_PCS "${TARGET_PCS} ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc") +- configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${LSR}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc) ++ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${LSR}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc @ONLY) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) + endif () + endif () +--- a/src/soxr-lsr.pc.in ++++ b/src/soxr-lsr.pc.in +@@ -1,5 +1,10 @@ +-Name: ${LSR} +-Description: ${DESCRIPTION_SUMMARY} (with libsamplerate-like bindings) +-Version: ${PROJECT_VERSION} +-Libs: -L${LIB_INSTALL_DIR} -l${LSR} +-Cflags: -I${INCLUDE_INSTALL_DIR} ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_INSTALL_PREFIX@ ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: @LSR@ ++Description: @DESCRIPTION_SUMMARY@ (with libsamplerate-like bindings) ++Version: @PROJECT_VERSION@ ++Libs: -L${libdir} -l@LSR@ ++Cflags: -I${includedir} +--- a/src/soxr.pc.in ++++ b/src/soxr.pc.in +@@ -1,5 +1,10 @@ +-Name: ${PROJECT_NAME} +-Description: ${DESCRIPTION_SUMMARY} +-Version: ${PROJECT_VERSION} +-Libs: -L${LIB_INSTALL_DIR} -l${PROJECT_NAME} +-Cflags: -I${INCLUDE_INSTALL_DIR} ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_INSTALL_PREFIX@ ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: @PROJECT_NAME@ ++Description: @DESCRIPTION_SUMMARY@ ++Version: @PROJECT_VERSION@ ++Libs: -L${libdir} -l@PROJECT_NAME@ ++Cflags: -I${includedir} diff --git a/libs/libssh/Makefile b/libs/libssh/Makefile index 0af8d343..dee69006 100644 --- a/libs/libssh/Makefile +++ b/libs/libssh/Makefile @@ -7,22 +7,21 @@ include $(TOPDIR)/rules.mk -PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause -PKG_MAINTAINER:=Mislav Novakovic - PKG_NAME:=libssh -PKG_VERSION:=0.9.3 -PKG_RELEASE:=2 +PKG_VERSION:=0.9.4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.libssh.org/files/0.9/ -PKG_HASH:=2c8b5f894dced58b3d629f16f3afa6562c20b4bdc894639163cf657833688f0c +PKG_HASH:=150897a569852ac05aac831dc417a7ba8e610c86ca2e0154a99c6ade2486226b +PKG_MAINTAINER:=Mislav Novakovic +PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause +PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:libssh:libssh CMAKE_INSTALL:=1 CMAKE_BINARY_SUBDIR:=build - PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 @@ -59,24 +58,8 @@ CMAKE_OPTIONS = \ -UWITH_STACK_PROTECTOR \ -DWITH_STACK_PROTECTOR=0 \ -UWITH_STACK_PROTECTOR_STRONG \ - -DWITH_STACK_PROTECTOR_STRONG=0 - -ifeq ($(CONFIG_BIG_ENDIAN),y) -CMAKE_OPTIONS += -DHAVE_WORDS_BIGENDIAN=1 -else -CMAKE_OPTIONS += -DHAVE_WORDS_BIGENDIAN=0 -endif - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/libssh/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libssh/* $(1)/usr/include/libssh/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ -endef + -DWITH_STACK_PROTECTOR_STRONG=0 \ + -DHAVE_WORDS_BIGENDIAN=$(if $(CONFIG_BIG_ENDIAN),1,0) define Package/libssh/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/libs/libssh/patches/0001-libcrypto-compat-add-extra-functions.patch b/libs/libssh/patches/0001-libcrypto-compat-add-extra-functions.patch new file mode 100644 index 00000000..53ceebe1 --- /dev/null +++ b/libs/libssh/patches/0001-libcrypto-compat-add-extra-functions.patch @@ -0,0 +1,73 @@ +From ce7de0261f0c1f1640da5673dd24939a37e33bd9 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Thu, 23 Jan 2020 18:53:06 -0800 +Subject: [PATCH 1/2] libcrypto-compat: add extra functions + +Changed the define to compare OPENSSL_API_COMPAT instead of version as +OpenSSL can be compiled in different ways. One is to disable all +deprecated APIs. + +Added extra functions. The next commit will switch to them. + +Signed-off-by: Rosen Penev +--- + src/libcrypto-compat.c | 14 ++++++++++++++ + src/libcrypto-compat.h | 8 +++++++- + 2 files changed, 21 insertions(+), 1 deletion(-) + +diff --git a/src/libcrypto-compat.c b/src/libcrypto-compat.c +index 048d1781..3604763f 100644 +--- a/src/libcrypto-compat.c ++++ b/src/libcrypto-compat.c +@@ -280,6 +280,11 @@ void EVP_MD_CTX_free(EVP_MD_CTX *ctx) + OPENSSL_free(ctx); + } + ++int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx) ++{ ++ EVP_CIPHER_CTX_init(ctx); ++} ++ + HMAC_CTX *HMAC_CTX_new(void) + { + HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(HMAC_CTX)); +@@ -394,3 +399,12 @@ int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) + } + return 1; + } ++ ++const char *OpenSSL_version(int type) ++{ ++ return SSLeay_version(type); ++} ++unsigned long OpenSSL_version_num(void) ++{ ++ return SSLeay(); ++} +diff --git a/src/libcrypto-compat.h b/src/libcrypto-compat.h +index bda0473e..44e14801 100644 +--- a/src/libcrypto-compat.h ++++ b/src/libcrypto-compat.h +@@ -34,6 +34,8 @@ int EVP_MD_CTX_reset(EVP_MD_CTX *ctx); + EVP_MD_CTX *EVP_MD_CTX_new(void); + void EVP_MD_CTX_free(EVP_MD_CTX *ctx); + ++int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx); ++ + HMAC_CTX *HMAC_CTX_new(void); + int HMAC_CTX_reset(HMAC_CTX *ctx); + void HMAC_CTX_free(HMAC_CTX *ctx); +@@ -44,6 +46,10 @@ int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); + void DH_get0_key(const DH *dh, + const BIGNUM **pub_key, const BIGNUM **priv_key); + int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); ++ ++const char *OpenSSL_version(int type); ++unsigned long OpenSSL_version_num(void); ++ + #endif /* OPENSSL_VERSION_NUMBER */ + + #endif /* LIBCRYPTO_COMPAT_H */ +-- +2.24.1 + diff --git a/libs/libssh/patches/0002-libcrypto-remove-deprecated-API-usage.patch b/libs/libssh/patches/0002-libcrypto-remove-deprecated-API-usage.patch new file mode 100644 index 00000000..7b0626d1 --- /dev/null +++ b/libs/libssh/patches/0002-libcrypto-remove-deprecated-API-usage.patch @@ -0,0 +1,63 @@ +From 73f0e186964126c9e2bfba43488f543ace54746b Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Thu, 23 Jan 2020 18:54:51 -0800 +Subject: [PATCH 2/2] libcrypto: remove deprecated API usage + +EVP_CIPHER_CTX_init was replaced with _reset. + +Removed EVP_CIPHER_CTX_cleanup. The successive _free call handles that. + +Removed old SSLeay function usage. + +Signed-off-by: Rosen Penev +--- + src/libcrypto.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/libcrypto.c b/src/libcrypto.c +index b3792264..7ce7d93a 100644 +--- a/src/libcrypto.c ++++ b/src/libcrypto.c +@@ -541,7 +541,7 @@ static int evp_cipher_set_encrypt_key(struct ssh_cipher_struct *cipher, + int rc; + + evp_cipher_init(cipher); +- EVP_CIPHER_CTX_init(cipher->ctx); ++ EVP_CIPHER_CTX_reset(cipher->ctx); + + rc = EVP_EncryptInit_ex(cipher->ctx, cipher->cipher, NULL, key, IV); + if (rc != 1){ +@@ -574,7 +574,7 @@ static int evp_cipher_set_decrypt_key(struct ssh_cipher_struct *cipher, + int rc; + + evp_cipher_init(cipher); +- EVP_CIPHER_CTX_init(cipher->ctx); ++ EVP_CIPHER_CTX_reset(cipher->ctx); + + rc = EVP_DecryptInit_ex(cipher->ctx, cipher->cipher, NULL, key, IV); + if (rc != 1){ +@@ -657,7 +657,6 @@ static void evp_cipher_decrypt(struct ssh_cipher_struct *cipher, + + static void evp_cipher_cleanup(struct ssh_cipher_struct *cipher) { + if (cipher->ctx != NULL) { +- EVP_CIPHER_CTX_cleanup(cipher->ctx); + EVP_CIPHER_CTX_free(cipher->ctx); + } + } +@@ -1481,11 +1480,11 @@ int ssh_crypto_init(void) + if (libcrypto_initialized) { + return SSH_OK; + } +- if (SSLeay() != OPENSSL_VERSION_NUMBER){ ++ if (OpenSSL_version_num() != OPENSSL_VERSION_NUMBER){ + SSH_LOG(SSH_LOG_WARNING, "libssh compiled with %s " + "headers, currently running with %s.", + OPENSSL_VERSION_TEXT, +- SSLeay_version(SSLeay()) ++ OpenSSL_version(OpenSSL_version_num()) + ); + } + #ifdef CAN_DISABLE_AESNI +-- +2.24.1 + diff --git a/libs/libssh2/Config.in b/libs/libssh2/Config.in deleted file mode 100644 index 708c07ba..00000000 --- a/libs/libssh2/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -if PACKAGE_libssh2 - -choice - prompt "Choose crypto backend" - default LIBSSH2_MBEDTLS - - config LIBSSH2_MBEDTLS - bool "mbedtls" - - config LIBSSH2_OPENSSL - bool "openssl" - -endchoice - -endif diff --git a/libs/libssh2/Makefile b/libs/libssh2/Makefile index f619f37e..12d3b2bd 100644 --- a/libs/libssh2/Makefile +++ b/libs/libssh2/Makefile @@ -35,7 +35,7 @@ define Package/libssh2 CATEGORY:=Libraries TITLE:=SSH2 library URL:=https://www.libssh2.org/ - DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +LIBSSH2_OPENSSL:libopenssl +zlib + DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +!LIBSSH2_MBEDTLS:libopenssl +zlib ABI_VERSION:=1 endef @@ -44,20 +44,28 @@ define Package/libssh2/description endef define Package/libssh2/config - source "$(SOURCE)/Config.in" +if PACKAGE_libssh2 + +choice + prompt "Choose crypto backend" + default LIBSSH2_OPENSSL + + config LIBSSH2_OPENSSL + bool "openssl" + + config LIBSSH2_MBEDTLS + bool "mbedtls" +endchoice + +endif endef CMAKE_OPTIONS += \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTING=OFF \ -DENABLE_ZLIB_COMPRESSION=ON \ - -DCLEAR_MEMORY=ON - -ifeq ($(CONFIG_LIBSSH2_OPENSSL),y) - CMAKE_OPTIONS += -DCRYPTO_BACKEND=OpenSSL -else - CMAKE_OPTIONS += -DCRYPTO_BACKEND=mbedTLS -endif + -DCLEAR_MEMORY=ON \ + -DCRYPTO_BACKEND=$(if $(CONFIG_LIBSSH2_MBEDTLS),mbedTLS,OpenSSL) define Package/libssh2/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/libs/libstrophe/Makefile b/libs/libstrophe/Makefile index ed2c03be..1858b408 100644 --- a/libs/libstrophe/Makefile +++ b/libs/libstrophe/Makefile @@ -8,22 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libstrophe -PKG_VERSION:=0.9.1 +PKG_VERSION:=0.9.3 PKG_RELEASE=1 -PKG_LICENSE:=GPL-3.0 +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Chih-Wei Chen -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://github.com/strophe/libstrophe -PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=9931ad4fa2aa7f204c608010eb2ebf84bcf7d542 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=6a499bcfc7c52db6765957ff38f48a344ad121ac0b665fd3d4adb7d8deadc427 +PKG_SOURCE_URL:=https://codeload.github.com/strophe/libstrophe/tar.gz/$(PKG_VERSION)? + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=8a3b79f62177ed59c01d4d4108357ff20bd933d53b845ee4e350d304c051a4fe PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:= \ CONFIG_libstrophe-libxml2 \ @@ -58,7 +57,11 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/ $(INSTALL_DIR) $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.{la,a,so*} $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libstrophe.pc \ + $(1)/usr/lib/pkgconfig/ endef define Package/libstrophe/install diff --git a/libs/libtalloc/Makefile b/libs/libtalloc/Makefile index 1908b55e..6f3bc133 100644 --- a/libs/libtalloc/Makefile +++ b/libs/libtalloc/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2016 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -8,16 +6,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=talloc -PKG_VERSION:=2.1.11 +PKG_VERSION:=2.3.1 MAJOR_VERSION:=2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc/ -PKG_HASH:=639eb35556a0af999123c4d883e79be05ff9f00ab4f9e4ac2e5775f9c5eeeed3 +PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc +PKG_HASH:=ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77 -PKG_MAINTAINER:=Lucile Quirion -PKG_LICENSE:=LGPL-3.0+ +PKG_MAINTAINER:=Ted Hess +PKG_LICENSE:=LGPL-3.0-or-later PKG_BUILD_PARALLEL:=0 @@ -28,7 +26,7 @@ define Package/libtalloc SECTION:=libs CATEGORY:=Libraries TITLE:=Core memory allocator used in Samba - DEPENDS:=+USE_GLIBC:libbsd $(ICONV_DEPENDS) +libattr + DEPENDS:=$(ICONV_DEPENDS) +libattr URL:=https://talloc.samba.org/talloc/doc/html/index.html endef @@ -37,42 +35,18 @@ define Package/libtalloc/description endef CROSS = " \ - \nChecking simple C program: OK \ - \nrpath library support: OK \ - \n-Wl,--version-script support: OK \ + \nChecking simple C program: \"hello world\" \ + \nrpath library support: (127, \"\") \ + \n-Wl,--version-script support: (127, \"\") \ \nChecking getconf LFS_CFLAGS: NO \ \nChecking for large file support without additional flags: OK \ - \nChecking for -D_LARGE_FILES: OK \ - \nChecking correct behavior of strtoll: NO \ - \nChecking for working strptime: OK \ - \nChecking for C99 vsnprintf: OK \ - \nChecking for HAVE_SHARED_MMAP: OK \ - \nChecking for HAVE_MREMAP: OK \ - \nChecking for HAVE_INCOHERENT_MMAP: NO \ + \nChecking correct behavior of strtoll: OK \ + \nChecking for working strptime: NO \ + \nChecking for C99 vsnprintf: \"1\" \ + \nChecking for HAVE_SHARED_MMAP: NO \ + \nChecking for HAVE_MREMAP: NO \ + \nChecking for HAVE_INCOHERENT_MMAP: (2, \"\") \ \nChecking for HAVE_SECURE_MKSTEMP: OK \ - \nChecking for HAVE_IFACE_GETIFADDRS: OK \ - \nChecking for kernel change notify support: OK \ - \nChecking for Linux kernel oplocks: OK \ - \nChecking for kernel share modes: OK \ - \nChecking if can we convert from CP850 to UCS-2LE: OK \ - \nChecking if can we convert from UTF-8 to UCS-2LE: OK \ - \nChecking whether we can use Linux thread-specific credentials with 32-bit system calls: OK \ - \nChecking whether we can use Linux thread-specific credentials: OK \ - \nChecking whether setreuid is available: OK \ - \nChecking whether setresuid is available: OK \ - \nChecking whether seteuid is available: OK \ - \nChecking whether fcntl locking is available: OK \ - \nChecking for the maximum value of the 'time_t' type: OK \ - \nChecking whether the realpath function allows a NULL argument: OK \ - \nChecking whether POSIX capabilities are available: OK \ - \nChecking for ftruncate extend: OK \ - \nvfs_fileid checking for statfs() and struct statfs.f_fsid: OK \ - \ngetcwd takes a NULL argument: OK \ - \nChecking value of NSIG: \"65\" \ - \nChecking value of _NSIG: \"65\" \ - \nChecking value of SIGRTMAX: \"64\" \ - \nChecking value of SIGRTMIN: \"34\" \ - \nChecking if toolchain accepts -fstack-protector: OK \ \n" define Build/Configure @@ -90,7 +64,8 @@ define Build/Configure --localstatedir=/var \ --with-libiconv="$(ICONV_PREFIX)" \ --cross-compile \ - --cross-answers=$(PKG_BUILD_DIR)/cache.txt \ + --cross-answers=cache.txt \ + --disable-python \ --disable-rpath \ --disable-rpath-install \ ) diff --git a/libs/libtalloc/patches/100-Remove_libbsd_dependency_check.patch b/libs/libtalloc/patches/100-Remove_libbsd_dependency_check.patch new file mode 100644 index 00000000..4fe2c663 --- /dev/null +++ b/libs/libtalloc/patches/100-Remove_libbsd_dependency_check.patch @@ -0,0 +1,58 @@ +--- a/lib/replace/wscript ++++ b/lib/replace/wscript +@@ -416,22 +416,13 @@ def configure(conf): + + conf.CHECK_FUNCS('prctl dirname basename') + +- strlcpy_in_bsd = False ++ # Not checking for libbsd ++ conf.CHECK_FUNCS('strlcpy strlcat') ++ conf.CHECK_FUNCS('getpeereid') ++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h') ++ conf.CHECK_FUNCS('setproctitle_init') + +- # libbsd on some platforms provides strlcpy and strlcat +- if not conf.CHECK_FUNCS('strlcpy strlcat'): +- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', +- checklibc=True): +- strlcpy_in_bsd = True +- if not conf.CHECK_FUNCS('getpeereid'): +- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') +- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): +- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') +- if not conf.CHECK_FUNCS('setproctitle_init'): +- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') +- +- if not conf.CHECK_FUNCS('closefrom'): +- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') ++ conf.CHECK_FUNCS('closefrom') + + conf.CHECK_CODE(''' + struct ucred cred; +@@ -808,9 +799,6 @@ def configure(conf): + + # look for a method of finding the list of network interfaces + for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']: +- bsd_for_strlcpy = '' +- if strlcpy_in_bsd: +- bsd_for_strlcpy = ' bsd' + if conf.CHECK_CODE(''' + #define %s 1 + #define NO_CONFIG_H 1 +@@ -823,7 +811,7 @@ def configure(conf): + #include "tests/getifaddrs.c" + ''' % method, + method, +- lib='nsl socket' + bsd_for_strlcpy, ++ lib='nsl socket', + addmain=False, + execute=True): + break +@@ -871,7 +859,6 @@ def build(bld): + break + + extra_libs = '' +- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd' + if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt' + if bld.CONFIG_SET('REPLACE_REQUIRES_LIBSOCKET_LIBNSL'): extra_libs += ' socket nsl' + diff --git a/libs/libtasn1/Makefile b/libs/libtasn1/Makefile index 0b83b9c4..e5bf554f 100644 --- a/libs/libtasn1/Makefile +++ b/libs/libtasn1/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtasn1 PKG_VERSION:=4.16.0 -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) @@ -39,6 +39,7 @@ define Package/libtasn1/description Distinguish Encoding Rules (DER) manipulation. endef +HOST_CFLAGS += -std=gnu99 TARGET_CFLAGS += -ffunction-sections -fdata-sections TARGET_LDFLAGS += -Wl,--gc-sections diff --git a/libs/libtasn1/patches/001-fix-c99-error.patch b/libs/libtasn1/patches/001-fix-c99-error.patch deleted file mode 100644 index 348be158..00000000 --- a/libs/libtasn1/patches/001-fix-c99-error.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/fuzz/corpus2array.c -+++ b/fuzz/corpus2array.c -@@ -120,7 +120,8 @@ - add = 1; - } - -- for (int i = 8; i < 32 ; i++) { -+ int i; -+ for (i = 8; i < 32 ; i++) { - if ((e.type & (1U << i)) && typename[i - 8]) { - printf(add ? "|%s" : ", %s", typename[i - 8]); - add = 1; diff --git a/libs/libtins/Config.in b/libs/libtins/Config.in new file mode 100644 index 00000000..1d5efd10 --- /dev/null +++ b/libs/libtins/Config.in @@ -0,0 +1,32 @@ +# libtins configuration +menu "Configuration" + depends on PACKAGE_libtins + +config LIBTINS_ENABLE_ACK_TRACKER + bool "Enable ACK tracker" + default n + +config LIBTINS_ENABLE_CXX11 + bool "Enable C++11" + default y + +config LIBTINS_ENABLE_DOT11 + bool "Enable IEEE 802.11 support (select this to access ENABLE_WPA2 option)" + help + If selected, this also allows configuring WPA2 support which requires openssl + default n + +config LIBTINS_ENABLE_PCAP + bool "Enable PCAP library support" + default y + +config LIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA + bool "Enable TCP stream custom data" + default n + +config LIBTINS_ENABLE_WPA2 + depends on LIBTINS_ENABLE_DOT11 + bool "Enable WPA2 (this selects libopenssl)" + default n +endmenu + diff --git a/libs/libtins/Makefile b/libs/libtins/Makefile index 7eb81097..24ec407e 100644 --- a/libs/libtins/Makefile +++ b/libs/libtins/Makefile @@ -8,45 +8,57 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtins -PKG_RELEASE:=1 +PKG_VERSION:=4.2 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/mfontanini/libtins/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=a9fed73e13f06b06a4857d342bb30815fa8c359d00bd69547e567eecbbb4c3a1 PKG_MAINTAINER:= Steven Hessing - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/mfontanini/libtins.git -PKG_SOURCE_VERSION:=v3.5 -PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_HASH:=47cd7d659ffa75dcfc2172ef54151fd36dc87de9e0f04bb066f6b076a7df7b57 - PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_PARALLEL:=1 - CMAKE_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -CMAKE_OPTIONS += -D_RUN_RESULT_VAR=FORCE -CMAKE_OPTIONS += -DLIBTINS_ENABLE_WPA2=0 -CMAKE_OPTIONS += -DLIBTINS_ENABLE_CXX11=1 define Package/libtins - SECTION:=net - CATEGORY:=Libraries - TITLE:=libtins - URL:=http://libtins.github.io/ - DEPENDS:=+libstdcpp +libpcap + SECTION:=net + CATEGORY:=Libraries + TITLE:=libtins + URL:=https://libtins.github.io/ + DEPENDS:=+libstdcpp +LIBTINS_ENABLE_PCAP:libpcap +LIBTINS_ENABLE_WPA2:libopenssl + MENU:=1 +endef + +define Package/libtins/config + source "$(SOURCE)/Config.in" endef define Package/libtins/description -libtins is a high-level, multiplatform C++ network packet sniffing and crafting library. + libtins is a high-level, multiplatform C++ network packet sniffing and crafting library. endef +CMAKE_OPTIONS += \ + -D_RUN_RESULT_VAR=FORCE \ + -DLIBTINS_BUILD_EXAMPLES=OFF \ + -DLIBTINS_BUILD_TESTS=OFF \ + -DLIBTINS_ENABLE_ACK_TRACKER=$(if $(CONFIG_LIBTINS_ENABLE_ACK_TRACKER),ON,OFF) \ + -DLIBTINS_ENABLE_CXX11=$(if $(CONFIG_LIBTINS_ENABLE_CXX11),ON,OFF) \ + -DLIBTINS_ENABLE_DOT11=$(if $(CONFIG_LIBTINS_ENABLE_DOT11),ON,OFF) \ + -DLIBTINS_ENABLE_PCAP=$(if $(CONFIG_LIBTINS_ENABLE_PCAP),ON,OFF) \ + -DLIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA=$(if $(CONFIG_LIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA),ON,OFF) \ + -DLIBTINS_ENABLE_WPA2=$(if $(CONFIG_LIBTINS_ENABLE_WPA2),ON,OFF) + +TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + define Package/libtins/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.3.5 $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libtins)) diff --git a/libs/libtins/patches/010-pkgconfig.patch b/libs/libtins/patches/010-pkgconfig.patch new file mode 100644 index 00000000..c478666c --- /dev/null +++ b/libs/libtins/patches/010-pkgconfig.patch @@ -0,0 +1,10 @@ +--- a/libtins.pc.in ++++ b/libtins.pc.in +@@ -1,6 +1,6 @@ + prefix=@pkgconfig_prefix@ + exec_prefix=@pkgconfig_exec_prefix@ +-libdir=@pkgconfig_libdir@ ++libdir=${exec_prefix}/lib + includedir=${prefix}/include + + Name: libtins diff --git a/libs/libtins/patches/110-fix_ch_switch_timing_value.patch b/libs/libtins/patches/110-fix_ch_switch_timing_value.patch new file mode 100644 index 00000000..76594c63 --- /dev/null +++ b/libs/libtins/patches/110-fix_ch_switch_timing_value.patch @@ -0,0 +1,11 @@ +--- a/include/tins/dot11/dot11_base.h ++++ b/include/tins/dot11/dot11_base.h +@@ -182,7 +182,7 @@ public: + DMS_RESP, + LINK_ID, + WAKEUP_SCHEDULE, +- CH_SWITCH_TIMING, ++ CH_SWITCH_TIMING = 104, + PTI_CONTROL, + TPU_BUFFER_STATUS, + INTERWORKING, diff --git a/libs/libtirpc/Makefile b/libs/libtirpc/Makefile index d7c8cd25..a296f955 100644 --- a/libs/libtirpc/Makefile +++ b/libs/libtirpc/Makefile @@ -1,26 +1,20 @@ -# -# Copyright (C) 2006-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - include $(TOPDIR)/rules.mk PKG_NAME:=libtirpc -PKG_VERSION:=1.1.4 -PKG_RELEASE:=1 +PKG_VERSION:=1.2.6 +PKG_RELEASE:=2 PKG_SOURCE_URL:=@SF/libtirpc PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_HASH:=2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d +PKG_HASH:=4278e9a5181d5af9cd7885322fdecebc444f9a3da87c526e7d47f7a12a37d1cc PKG_MAINTAINER:=Andy Walsh PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=autogen.sh aclocal.m4 PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +HOST_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -52,7 +46,6 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.{a,so*} $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include - $(SED) 's,/usr,${STAGING_DIR}/usr,g' $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtirpc.pc $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtirpc.pc $(1)/usr/lib/pkgconfig/libtirpc.pc endef diff --git a/libs/libtirpc/patches/001-musl.patch b/libs/libtirpc/patches/001-musl.patch deleted file mode 100644 index 0c3ce603..00000000 --- a/libs/libtirpc/patches/001-musl.patch +++ /dev/null @@ -1,18 +0,0 @@ -Consider musl provided built-in defines - -Helps compile libtirpc with musl - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- ./tirpc/rpc/types.h.orig 2018-03-17 10:23:10.022055255 +0100 -+++ ./tirpc/rpc/types.h 2018-03-17 10:23:30.877751656 +0100 -@@ -66,7 +66,7 @@ - #define mem_free(ptr, bsize) free(ptr) - - --#if defined __APPLE_CC__ || defined __FreeBSD__ -+#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__) - # define __u_char_defined - # define __daddr_t_defined - #endif diff --git a/libs/libtorrent/Makefile b/libs/libtorrent/Makefile index ae0444c5..15b018d7 100644 --- a/libs/libtorrent/Makefile +++ b/libs/libtorrent/Makefile @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtorrent -PKG_VERSION:=0.13.6-git-1 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_VERSION:=0.13.8 +PKG_RELEASE:=2 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/rakshasa/libtorrent.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=14e793b75dac95c51ad64ff9cd2dc6772b68c625 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=0971c21d0e6b7028bc319e97c82bdb213c17dfc503fc0f89b809e5ed7ce98142 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/rakshasa/libtorrent/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=0f6c2e7ffd3a1723ab47fdac785ec40f85c0a5b5a42c1d002272205b988be722 + +PKG_MAINTAINER:=Rosen Penev +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -28,9 +29,8 @@ define Package/libtorrent SECTION:=libs CATEGORY:=Libraries TITLE:=Rakshasa's BitTorrent library - URL:=http://libtorrent.rakshasa.no/ - DEPENDS:=+libopenssl +libsigcxx +zlib - MAINTAINER:=Peter Wagner + URL:=https://rakshasa.github.io/rtorrent/ + DEPENDS:=+libopenssl +libstdcpp +zlib endef define Package/libtorrent/description @@ -41,30 +41,26 @@ define Package/libtorrent/description official client. endef -TARGET_LDFLAGS += $(LIBGCC_S) - -CONFIGURE_ARGS+= \ +CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --enable-aligned \ - --disable-debug \ --enable-openssl \ + --disable-debug \ --disable-instrumentation \ + --with-epoll \ --with-zlib=$(STAGING_DIR)/usr \ - --disable-ipv6 + --without-kqueue + +TARGET_CXXFLAGS += -faligned-new define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.a $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/ endef -define Package/libtorrent/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/ -endef - $(eval $(call BuildPackage,libtorrent)) diff --git a/libs/libtorrent/patches/010-usleep.patch b/libs/libtorrent/patches/010-usleep.patch new file mode 100644 index 00000000..6539fad1 --- /dev/null +++ b/libs/libtorrent/patches/010-usleep.patch @@ -0,0 +1,54 @@ +--- a/src/data/hash_queue.cc ++++ b/src/data/hash_queue.cc +@@ -38,9 +38,10 @@ + + #define __STDC_FORMAT_MACROS + ++#include ++#include + #include + #include +-#include + + #include "torrent/exceptions.h" + #include "torrent/data/download_data.h" +@@ -137,7 +138,7 @@ HashQueue::remove(HashQueueNode::id_type id) { + + while ((done_itr = m_done_chunks.find(hash_chunk)) == m_done_chunks.end()) { + pthread_mutex_unlock(&m_done_chunks_lock); +- usleep(100); ++ std::this_thread::sleep_for(std::chrono::microseconds(100)); + pthread_mutex_lock(&m_done_chunks_lock); + } + +--- a/src/torrent/utils/thread_base.cc ++++ b/src/torrent/utils/thread_base.cc +@@ -37,8 +37,9 @@ + #include "config.h" + + #include ++#include ++#include + #include +-#include + + #include "exceptions.h" + #include "poll.h" +@@ -97,7 +98,7 @@ thread_base::stop_thread_wait() { + release_global_lock(); + + while (!is_inactive()) { +- usleep(1000); ++ std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + + acquire_global_lock(); +@@ -161,7 +162,7 @@ thread_base::event_loop(thread_base* thread) { + } + + // Add the sleep call when testing interrupts, etc. +- // usleep(50); ++ // std::this_thread::sleep_for(std::chrono::microseconds(50)); + + int poll_flags = 0; + diff --git a/libs/libtorrent/patches/100-fix_cross_compile.patch b/libs/libtorrent/patches/100-fix_cross_compile.patch deleted file mode 100644 index a0969465..00000000 --- a/libs/libtorrent/patches/100-fix_cross_compile.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -19,7 +19,6 @@ AC_SUBST(LIBTORRENT_INTERFACE_VERSION_NO - - AM_INIT_AUTOMAKE - AC_CONFIG_HEADERS(config.h) --AM_PATH_CPPUNIT(1.9.6) - - AC_PROG_CXX - ---- a/scripts/checks.m4 -+++ b/scripts/checks.m4 -@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [ - AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [ - AC_MSG_CHECKING(whether kqueue supports pipes and ptys) - -- AC_RUN_IFELSE([AC_LANG_SOURCE([ -+ AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include - #include - #include ---- a/scripts/common.m4 -+++ b/scripts/common.m4 -@@ -153,7 +153,7 @@ dnl Need to fix this so that it uses t - AC_DEFUN([TORRENT_CHECK_EXECINFO], [ - AC_MSG_CHECKING(for execinfo.h) - -- AC_RUN_IFELSE([AC_LANG_SOURCE([ -+ AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include - int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} - ])], -@@ -168,7 +168,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [ - AC_DEFUN([TORRENT_CHECK_ALIGNED], [ - AC_MSG_CHECKING(the byte alignment) - -- AC_RUN_IFELSE([AC_LANG_SOURCE([ -+ AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include - int main() { - char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; diff --git a/libs/libudev-fbsd/Makefile b/libs/libudev-fbsd/Makefile index 07263f13..d5f86611 100644 --- a/libs/libudev-fbsd/Makefile +++ b/libs/libudev-fbsd/Makefile @@ -5,21 +5,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libudev-fbsd +PKG_SOURCE_DATE:=2017-12-16 +PKG_SOURCE_VERSION:=fa190fdf0b22a41b5f42e3a722f754c08ad7b337 +PKG_RELEASE:=1 -PKG_RELEASE:=2 -PKG_VERSION:=20160820 -PKG_SOURCE_VERSION:=1f21323b817e70253d3c04bc8bedd61c477d0544 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_HASH:=cc885851c97dcaef65d7f4fb0899ed1a01412b02e44851476ac47ce4da024d0b PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/jiixyj/libudev-fbsd.git +PKG_MIRROR_HASH:=dac2d960191fe970c974f022d008ef3b712ad331e2426a51debd5aa2e208f02b +PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Daniel Golle -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -34,15 +33,6 @@ define Package/libudev-fbsd CONFLICTS:=libudev eudev udev endef -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ -endef - define Package/libudev-fbsd/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ diff --git a/libs/libudev-fbsd/patches/001-fix-unused.patch b/libs/libudev-fbsd/patches/001-fix-unused.patch deleted file mode 100644 index 19494336..00000000 --- a/libs/libudev-fbsd/patches/001-fix-unused.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/src/libudev.c -+++ b/src/libudev.c -@@ -354,7 +354,7 @@ udev_device_get_subsystem(struct udev_de - - const char * - udev_device_get_sysattr_value( -- struct udev_device *udev_device __unused, const char *sysattr) -+ __attribute__ ((unused))struct udev_device *udev_device, const char *sysattr) - { - (void)sysattr; - LOG("stub: udev_device_get_sysattr_value %s\n", sysattr); -@@ -469,7 +469,7 @@ udev_device_get_parent_with_subsystem_de - } - - struct udev_enumerate * --udev_enumerate_new(struct udev *udev __unused) -+udev_enumerate_new( __attribute__ ((unused))struct udev *udev) - { - LOG("udev_enumerate_new\n"); - struct udev_enumerate *u = calloc(1, sizeof(struct udev_enumerate)); -@@ -538,7 +538,7 @@ udev_enumerate_get_list_entry(struct ude - - int - udev_enumerate_add_match_sysname( -- struct udev_enumerate *udev_enumerate __unused, const char *sysname) -+ __attribute__ ((unused))struct udev_enumerate *udev_enumerate, const char *sysname) - { - (void)sysname; - LOG("stub: udev_enumerate_add_match_sysname %s\n", sysname); ---- a/src/libudev.h -+++ b/src/libudev.h -@@ -24,8 +24,8 @@ void udev_unref(struct udev *udev); - char const *udev_device_get_devnode(struct udev_device *udev_device); - dev_t udev_device_get_devnum(struct udev_device *udev_device); - char const *udev_device_get_property_value( -- struct udev_device *dummy __unused, char const *property); --struct udev *udev_device_get_udev(struct udev_device *dummy __unused); -+ __attribute__ ((unused))struct udev_device *dummy, char const *property); -+struct udev *udev_device_get_udev( __attribute__ ((unused))struct udev_device *dummy); - struct udev_device *udev_device_new_from_syspath( - struct udev *udev, char const *syspath); - struct udev_device *udev_device_new_from_devnum( diff --git a/libs/libudev-fbsd/patches/002-replace-nitems.patch b/libs/libudev-fbsd/patches/002-replace-nitems.patch deleted file mode 100644 index 7f4d0de8..00000000 --- a/libs/libudev-fbsd/patches/002-replace-nitems.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/libudev.c -+++ b/src/libudev.c -@@ -175,7 +175,7 @@ populate_properties_list(struct udev_dev - - struct udev_list_entry **list_end = &udev_device->properties_list; - -- for (unsigned i = 0; i < nitems(ids); ++i) { -+ for (unsigned i = 0; i < (sizeof(ids) / sizeof(ids[0])); ++i) { - char const *id = ids[i]; - struct udev_list_entry *le; - diff --git a/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch b/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch index 9aec7b9b..19efcb3c 100644 --- a/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch +++ b/libs/libudev-fbsd/patches/003-add-pkg-config-description.patch @@ -1,6 +1,6 @@ --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -11,6 +11,7 @@ install(TARGETS udev LIBRARY DESTINATION +@@ -26,6 +26,7 @@ install(TARGETS udev LIBRARY DESTINATION install(FILES libudev.h DESTINATION include) set(PKG_CONFIG_NAME libudev) diff --git a/libs/libudev-fbsd/patches/005-extern-c.patch b/libs/libudev-fbsd/patches/005-extern-c.patch index de3ae352..1e77bf4c 100644 --- a/libs/libudev-fbsd/patches/005-extern-c.patch +++ b/libs/libudev-fbsd/patches/005-extern-c.patch @@ -1,9 +1,8 @@ -diff -ruN libudev-fbsd-20160820/src/libudev.h libudev-fbsd-20160820.mod/src/libudev.h ---- libudev-fbsd-20160820/src/libudev.h 2017-11-17 16:46:56.705435146 +0100 -+++ libudev-fbsd-20160820.mod/src/libudev.h 2017-11-17 16:48:07.276021522 +0100 -@@ -11,6 +11,11 @@ - #include - #include +--- a/src/libudev.h ++++ b/src/libudev.h +@@ -7,6 +7,11 @@ + extern "C" { + #endif + +#ifdef __cplusplus @@ -13,12 +12,14 @@ diff -ruN libudev-fbsd-20160820/src/libudev.h libudev-fbsd-20160820.mod/src/libu struct udev; struct udev_device; struct udev_list_entry; -@@ -83,4 +88,8 @@ - struct udev_monitor *udev_monitor); - void udev_monitor_unref(struct udev_monitor *udev_monitor); +@@ -76,6 +81,10 @@ void udev_monitor_unref(struct udev_moni -+#ifdef __cplusplus -+} /* extern "C" */ + #ifdef __cplusplus + } /* extern "C" */ +#endif + ++#ifdef __cplusplus ++} /* extern "C" */ + #endif + #endif diff --git a/libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch b/libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch index aaa56f3c..7592c8b6 100644 --- a/libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch +++ b/libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch @@ -1,6 +1,6 @@ --- a/src/libudev.c +++ b/src/libudev.c -@@ -130,6 +130,12 @@ udev_device_get_devnum(struct udev_devic +@@ -139,6 +139,12 @@ udev_device_get_devnum(struct udev_devic } char const * @@ -15,7 +15,7 @@ LOG("udev_device_get_property_value %s\n", property); --- a/src/libudev.h +++ b/src/libudev.h -@@ -30,6 +30,7 @@ struct udev_device *udev_device_new_from +@@ -31,6 +31,7 @@ struct udev_device *udev_device_new_from struct udev *udev, char const *syspath); struct udev_device *udev_device_new_from_devnum( struct udev *udev, char type, dev_t devnum); diff --git a/libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch b/libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch index bc12d66a..47ed81ac 100644 --- a/libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch +++ b/libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch @@ -1,6 +1,6 @@ --- a/src/libudev.c +++ b/src/libudev.c -@@ -26,6 +26,7 @@ struct udev_device { +@@ -35,6 +35,7 @@ struct udev_device { struct udev *udev; int refcount; char syspath[32]; @@ -8,7 +8,7 @@ dev_t devnum; char const *sysname; char const *action; -@@ -115,6 +116,29 @@ udev_device_new_from_devnum(struct udev +@@ -124,6 +125,29 @@ udev_device_new_from_devnum(struct udev return NULL; } @@ -38,7 +38,7 @@ char const * udev_device_get_devnode(struct udev_device *udev_device) { -@@ -132,6 +156,20 @@ udev_device_get_devnum(struct udev_devic +@@ -141,6 +165,20 @@ udev_device_get_devnum(struct udev_devic char const * udev_device_get_driver(struct udev_device *udev_device) { @@ -61,7 +61,7 @@ --- a/src/libudev.h +++ b/src/libudev.h -@@ -30,6 +30,8 @@ struct udev_device *udev_device_new_from +@@ -31,6 +31,8 @@ struct udev_device *udev_device_new_from struct udev *udev, char const *syspath); struct udev_device *udev_device_new_from_devnum( struct udev *udev, char type, dev_t devnum); diff --git a/libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch b/libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch index 86e6b96c..f65a2e97 100644 --- a/libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch +++ b/libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch @@ -1,6 +1,6 @@ --- a/src/libudev.c +++ b/src/libudev.c -@@ -162,7 +162,7 @@ udev_device_get_driver(struct udev_devic +@@ -171,7 +171,7 @@ udev_device_get_driver(struct udev_devic char driverlnk[32]; snprintf(driverlnp, sizeof(driverlnp), "%s/driver", udev_device->sysfspath); @@ -9,7 +9,7 @@ { char *drivernm; drivernm = strrchr(driverlnk, '/'); -@@ -600,6 +600,18 @@ udev_enumerate_add_match_property(struct +@@ -612,6 +612,18 @@ udev_enumerate_add_match_property(struct value); return -1; } @@ -30,7 +30,7 @@ udev_enumerate_unref(struct udev_enumerate *udev_enumerate) --- a/src/libudev.h +++ b/src/libudev.h -@@ -59,6 +59,8 @@ int udev_enumerate_add_match_sysname( +@@ -60,6 +60,8 @@ int udev_enumerate_add_match_sysname( struct udev_enumerate *udev_enumerate, char const *sysname); int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, char const *property, char const *value); diff --git a/libs/libuecc/Makefile b/libs/libuecc/Makefile index 93129631..57ca7a37 100644 --- a/libs/libuecc/Makefile +++ b/libs/libuecc/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=2 PKG_MAINTAINER:=Matthias Schiffer PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/85 +PKG_SOURCE_URL:=https://github.com/NeoRaider/libuecc/releases/download/v$(PKG_VERSION) PKG_HASH:=b94aef08eab5359d0facaa7ead2ce81b193eef0c61379d9835213ebc0a46257a PKG_LICENSE:=BSD-2-Clause @@ -26,7 +26,7 @@ define Package/libuecc SECTION:=libs CATEGORY:=Libraries TITLE:=Very small Elliptic Curve Cryptography library - URL:=http://git.universe-factory.net/libuecc/ + URL:=https://github.com/NeoRaider/libuecc/ endef TARGET_CFLAGS += -ffunction-sections -fdata-sections diff --git a/libs/libugpio/Makefile b/libs/libugpio/Makefile index e7a1e874..53775d3a 100644 --- a/libs/libugpio/Makefile +++ b/libs/libugpio/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libugpio -PKG_VERSION:=0.0.6 +PKG_VERSION:=0.0.7 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/mhei/libugpio/releases/download/v$(PKG_VERSION) -PKG_HASH:=07d96b46560f42843e46869f45f53d48afee71f9bbcf06f43267fafad0d50b05 +PKG_HASH:=4e0ae6f9cd3d670eb5ba9595a24696a034fda3c7c1900aa9d2cae5a4cd9dab64 -PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING.LESSER PKG_MAINTAINER:=Michael Heimpold @@ -60,7 +60,7 @@ endef define Package/libugpio/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.so.* $(1)/usr/lib/ endef define Package/gpioctl-sysfs/install diff --git a/libs/libuhttpd/Makefile b/libs/libuhttpd/Makefile old mode 100755 new mode 100644 index dad07faf..07867deb --- a/libs/libuhttpd/Makefile +++ b/libs/libuhttpd/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libuhttpd -PKG_VERSION:=3.0.1 +PKG_VERSION:=3.1.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL=https://github.com/zhaojh329/libuhttpd/releases/download/v$(PKG_VERSION) -PKG_HASH:=07cc357a94e29c5a04eea46331352c869beed01d7fd6cc23972e878a5c4b023c +PKG_HASH:=733fdb2183fe4984e2f909c41e24d81989a748265a75ef288018568e67a9cd49 -PKG_MAINTAINER:=Jianhui Zhao +PKG_MAINTAINER:=Jianhui Zhao PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/libs/libulfius/Makefile b/libs/libulfius/Makefile new file mode 100644 index 00000000..37b99ac9 --- /dev/null +++ b/libs/libulfius/Makefile @@ -0,0 +1,70 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libulfius +PKG_VERSION:=2.6.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/babelouest/ulfius/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=fbbcf693043409cc1929820b3eae5e1f7b1c93a3a8acec981946988ee3d0e85b + +PKG_MAINTAINER:=Toni Uhlig +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/ulfius-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libulfius/default + SECTION:=libs + CATEGORY:=Libraries + SUBMENU:=Networking + TITLE:=Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. + URL:=https://github.com/babelouest/ulfius +endef + +define Package/libulfius-nossl +$(call Package/libulfius/default) + VARIANT:=nossl + DEFAULT_VARIANT:=1 + DEPENDS:=+libmicrohttpd +libcurl +liborcania + PROVIDES:=libulfius +endef + +define Package/libulfius-gnutls +$(call Package/libulfius/default) + TITLE+= with SSL support + VARIANT:=gnutls + DEPENDS:=+libmicrohttpd +libcurl +libgnutls +liborcania + PROVIDES:=libulfius +endef + +define Package/libulfius-$(BUILD_VARIANT)/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libulfius.so.* \ + $(1)/usr/lib/ +endef + +CMAKE_OPTIONS += \ + -DDOWNLOAD_DEPENDENCIES=OFF \ + -DBUILD_WEBSOCKET=OFF \ + -DSEARCH_ORCANIA_U=ON \ + -DWITH_CURL=ON \ + -DWITH_JANSSON=OFF \ + -DWITH_STRSTR=ON \ + -DWITH_YDER=OFF \ + -DSEARCH_YDER=OFF \ + -DCMAKE_BUILD_TYPE=Release + +ifeq ($(BUILD_VARIANT),gnutls) + CMAKE_OPTIONS += -DWITH_GNUTLS=ON +else + CMAKE_OPTIONS += -DWITH_GNUTLS=OFF +endif + +$(eval $(call BuildPackage,libulfius-gnutls)) +$(eval $(call BuildPackage,libulfius-nossl)) diff --git a/libs/libunistring/Makefile b/libs/libunistring/Makefile index cef29893..c0211217 100644 --- a/libs/libunistring/Makefile +++ b/libs/libunistring/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libunistring -PKG_VERSION:=0.9.8 +PKG_VERSION:=0.9.10 PKG_RELEASE:=1 -PKG_HASH:=b792f2bd05d0fa7b339e39e353da7232b2e514e0db2cf5ed95beeff3feb53cf5 +PKG_HASH:=eb8fb2c3e4b6e2d336608377050892b54c3c983b646c561836550863003c05d7 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/libunistring PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 diff --git a/libs/libupm/Makefile b/libs/libupm/Makefile index 327c2f58..7a2b8a2d 100644 --- a/libs/libupm/Makefile +++ b/libs/libupm/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,76 +8,379 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libupm -PKG_VERSION:=0.4.0 +PKG_VERSION:=2.0.0 +PKG_RELEASE:=1 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/intel-iot-devkit/upm/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=7dd2f4165b71e071d100b58d6a392f3cf57b0f257c82ffabf49e931b5ed6bc23 +PKG_BUILD_DIR:=$(BUILD_DIR)/upm-$(PKG_VERSION) + +PKG_MAINTAINER:=John Crispin , Hirokazu MORIKAWA +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/upm.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=04dc6df4297a7766d6f1a8fef9699d586e7e0d92 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=26bc9c32eea0b8aa6218735e30a3d2317431518f0b2a055c0f21e78e6d92ca4f CMAKE_INSTALL:=1 - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:=LGPL-2.1 +CMAKE_BINARY_SUBDIR:=build +PKG_USE_MIPS16:=0 +PKG_BUILD_PARALLEL:=1 +PYTHON3_PKG_BUILD:=0 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk +include ../../lang/python/python3-package.mk UPM_MODULES:= \ - a110x ad8232 adafruitss adc121c021 adis16448 adxl335 adxl345 am2315 apds9002 at42qt1070 biss0001 bmpx8x buzzer \ - cjq4435 ds1307 ecs1030 enc03r flex gas gp2y0a grovecircularled grovecollision groveehr groveeldriver groveelectromagnet \ - groveemg grovegprs grovegsr grovelinefinder grovemd grovemoisture groveo2 grovescam grove grovespeaker grovevdiv grovewater \ - grovewfs guvas12d h3lis331dl hcsr04 hm11 hmc5883l hmtrp hp20x ht9170 htu21d hx711 i2clcd ina132 isd1820 itg3200 joystick12 \ - l298 ldt0028 lm35 lol loudness lpd8806 lsm303 lsm9ds0 m24lr64e max31723 max31855 max44000 max5487 maxds3231m maxsonarez \ - mg811 mhz16 mic mlx90614 mma7455 mma7660 mpl3115a2 mpr121 mpu9150 mq303a my9221 nrf24l01 nrf8001 nunchuck otp538u \ - pn532 ppd42ns pulsensor rfr359f rgbringcoder rotaryencoder rpr220 servo si114x sm130 st7735 stepmotor sx6119 ta12200 tcs3414cs \ - th02 tm1637 tsl2561 ttp223 ublox6 uln200xa waterlevel wheelencoder wt5001 yg1006 zfm20 - -CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \ - -DNODE_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/node \ - -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/bin + a110x abp ad8232 adafruitms1438 adafruitss adc121c021 adis16448 ads1x15 adxl335 adxl345 \ + adxrs610 am2315 apa102 apds9002 apds9930 at42qt1070 bh1749 bh1750 bh1792 biss0001 bma220 \ + bma250e bmg160 bmi160 bmm150 bmp280 bmpx8x bmx055 bno055 button buzzer cjq4435 collision \ + cwlsxxa dfrec dfrorp dfrph ds1307 ds1808lc ds18b20 ds2413 ecezo ecs1030 \ + ehr eldriver electromagnet emg enc03r flex gas gp2y0a gprs \ + gsr guvas12d h3lis331dl hcsr04 hdc1000 hdxxvxta hka5 hlg150h hm11 hmc5883l hmtrp hp20x \ + ht9170 htu21d hx711 ili9341 ims ina132 interfaces isd1820 itg3200 jhd1313m1 joystick12 kx122 \ + kxcjk1013 kxtj3 l298 l3gd20 lcd lcdks lcm1602 ldt0028 led lidarlitev3 light linefinder lis2ds12 \ + lis3dh lm35 lol loudness lp8860 lpd8806 lsm303agr lsm303d lsm303dlh lsm6ds3h lsm6dsl lsm9ds0 \ + m24lr64e mag3110 max30100 max31723 max31855 max44000 max44009 max5487 maxds3231m maxsonarez \ + mb704x mcp2515 mcp9808 md mg811 mhz16 mic micsv89 mlx90614 mma7361 mma7455 mma7660 mma8x5x \ + mmc35240 moisture mpl3115a2 mpr121 mpu9150 mq303a ms5611 ms5803 my9221 nlgpio16 nmea_gps \ + nrf24l01 nrf8001 nunchuck o2 otp538u p9813 pca9685 pn532 ppd42ns pulsensor relay rf22 \ + rfr359f rgbringcoder rhusb rn2903 rotary rotaryencoder rpr220 rsc scam sensortemplate \ + servo sht1x si1132 si114x si7005 slide sm130 smartdrive speaker ssd1351 st7735 stepmotor \ + sx1276 sx6119 t6713 ta12200 tca9548a tcs3414cs tcs37727 teams temperature \ + tex00 th02 tm1637 tmp006 tsl2561 ttp223 uartat uln200xa ultrasonic urm37 utilities vdiv \ + veml6070 water waterlevel wfs wheelencoder wt5001 xbee yg1006 zfm20 \ + vcap t3311 hwxpxx h803x ozw curieimu +# (require libbacnet) tb7300 t8100 e50hx bacnetmstp +# (require libtinyb) 2jciebu01_ble 2jciebu01_usb define Package/libupm/Default SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libmraa +librt SUBMENU:=IoT + URL:=https://github.com/intel-iot-devkit/upm + DEPENDS:=+libmraa +librt +endef + +define Package/libupm/Default/description + UPM is a high level repository that provides software drivers for a wide variety +of commonly used sensors and actuators. These software drivers interact with the +underlying hardware platform through calls to MRAA APIs. + MRAA that allows you to use various sensors on platforms such as the Intel Galileo, +Intel Edison, Minnowboard MAX and others. endef define Package/libupm $(call Package/libupm/Default) TITLE:=Intel IoT sensor library - Full + DEPENDS+=+libjpeg +libmodbus +openzwave + DEPENDS+= $(foreach module, $(UPM_MODULES), +libupm-$(module)) + DEPENDS+= $(foreach module, $(UPM_MODULES), +libupm-$(module)-node) + DEPENDS+= $(foreach module, $(UPM_MODULES), +libupm-$(module)-python3) +endef + +define Package/libupm/description +$(call Package/libupm/Default/description) + +This package contains sensor libraries endef define Package/libupm/install/Default - $(INSTALL_DIR) $(1)/usr/lib/{node/,python2.7/site-packages}; \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupm-$(2).so* $(1)/usr/lib/; \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/jsupm_$(2) $(1)/usr/lib/node/; \ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/{pyupm_$(2).py,_pyupm_$(2).so} \ - $(1)/usr/lib/python2.7/site-packages/ ; + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupm*-$(2).so* $(1)/usr/lib/ ; +endef + +define Package/libupm/install/Default-node + $(INSTALL_DIR) $(1)/usr/lib/node/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/jsupm_$(2) $(1)/usr/lib/node/ ; +endef + +define Package/libupm/install/Default-python3 + $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm + $(CP) $(CMAKE_BINARY_DIR)/$(if $(filter interfaces, $(2)),,src/)$(2)/python$(PYTHON3_VERSION)/pyupm_$(2).py \ + $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/_pyupm_$(2).so \ + $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/upm/ ; endef define Package/libupm/install - $(foreach module, $(UPM_MODULES), \ - $(call Package/libupm/install/Default,$(1),$(module))) + $(foreach module, $(UPM_MODULES), \ + $(call Package/libupm/install/Default,$(1),$(module)) \ + $(call Package/libupm/install/Default-node,$(1),$(module)) \ + $(call Package/libupm/install/Default-python3,$(1),$(module))) endef define UpmPackage +define UpmPackage/depends + ifeq ($$(1),adafruitms1438) + DEPENDS+=+libupm-pca9685 + endif + ifeq ($$(1),ads1x15) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),apa102) + DEPENDS+=+libupm-utilities + endif + ifeq ($(1),bh1749) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),bh1750) + DEPENDS+=+libupm-utilities + endif + ifeq ($(1),bh1792) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),bma250e) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),bmg160) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),bmi160) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),bmm150) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),bmp280) + DEPENDS+=+libupm-interfaces +libupm-utilities + endif + ifeq ($$(1),bmpx8x) + DEPENDS+=+libupm-interfaces +libupm-utilities + endif + ifeq ($$(1),bmx055) + DEPENDS+=+libupm-utilities +libupm-bma250e +libupm-bmg160 +libupm-bmm150 + endif + ifeq ($$(1),bno055) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),buzzer) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),cjq4435) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),dfrec) + DEPENDS+=+libupm-utilities +libupm-ds18b20 + endif + ifeq ($$(1),ds18b20) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),dfrorp) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),ds1808lc) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),ecezo) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),enc03r) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),guvas12d) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),hcsr04) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),hka5) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),hlg150h) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),ims) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),jhd1313m1) + DEPENDS+=+libupm-utilities +libupm-lcm1602 + endif + ifeq ($$(1),kxtj3) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),lcm1602) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),lcdks) + DEPENDS+=+libupm-utilities +libupm-lcm1602 + endif + ifeq ($$(1),lis2ds12) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),lis3dh) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),lp8860) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),lsm303agr) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),lsm303d) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),lsm6ds3h) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),lsm6dsl) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),m24lr64e) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),max30100) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),max44009) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),mb704x) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),mcp2515) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),md) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),mma7361) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),ms5611) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),ms5803) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),my9221) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),nmea_gps) + DEPENDS+=+libupm-utilities +libatomic + endif + ifeq ($$(1),nunchuck) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),otp538u) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),p9813) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),ppd42ns) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),rn2903) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),rsc) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),servo) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),sht1x) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),si1132) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),si7005) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),speaker) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),t6713) + DEPENDS+=+libupm-interfaces + endif + ifeq ($$(1),tsl2561) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),uartat) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),uln200xa) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),urm37) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),wfs) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),zfm20) + DEPENDS+=+libupm-utilities + endif + ifeq ($$(1),vcap) + DEPENDS+=+libjpeg + endif + ifeq ($$(1),t3311) + DEPENDS+=+libmodbus + endif + ifeq ($$(1),ozw) + DEPENDS+=+openzwave + endif + ifeq ($$(1),hwxpxx) + DEPENDS+=+libmodbus + endif + ifeq ($$(1),h803x) + DEPENDS+=+libmodbus + endif +endef + define Package/libupm-$(1) $(call Package/libupm/Default) - TITLE:=Intel IoT sensor library - $(1) + $(call UpmPackage/depends,$(1)) + TITLE:=$(1) C/C++ library +endef + +define Package/libupm-$(1)/description +$(call Package/libupm/Default/description) + +This package contains $(1) sensor C/C++ library +endef + +define Package/libupm-$(1)-node + $(call Package/libupm/Default) + $(call UpmPackage/depends,$(1)) + TITLE:=$(1) Node.js library + DEPENDS+=+libupm-$(1) +libmraa-node +node +endef + +define Package/libupm-$(1)-node/description +$(call Package/libupm/Default/description) + +This package contains $(1) sensor Node.js library +endef + +define Package/libupm-$(1)-python3 + $(call Package/libupm/Default) + $(call UpmPackage/depends,$(1)) + TITLE:=$(1) Python3 library + DEPENDS+=+libupm-$(1) +libmraa-python3 +python3-light +endef + +define Package/libupm-$(1)-python3/description +$(call Package/libupm/Default/description) + +This package contains $(1) sensor Python3 library endef define Package/libupm-$(1)/install - $(call Package/libupm/install/Default,$$(1),$(1)) + $(call Package/libupm/install/Default,$$(1),$(1)) +endef +define Package/libupm-$(1)-node/install + $(call Package/libupm/install/Default-node,$$(1),$(1)) +endef +define Package/libupm-$(1)-python3/install + $(call Package/libupm/install/Default-python3,$$(1),$(1)) endef endef $(eval $(call BuildPackage,libupm)) -$(foreach package, $(UPM_MODULES), \ - $(eval $(call UpmPackage,$(package))) \ - $(eval $(call BuildPackage,libupm-$(package))) \ -) +$(foreach module, $(UPM_MODULES), \ + $(eval $(call UpmPackage,$(module))) \ + $(eval $(call BuildPackage,libupm-$(module))) \ + $(eval $(call BuildPackage,libupm-$(module)-node)) \ + $(eval $(call BuildPackage,libupm-$(module)-python3))) diff --git a/libs/libupm/patches/001-version.patch b/libs/libupm/patches/001-version.patch index 3d4fd6ca..49147e6e 100644 --- a/libs/libupm/patches/001-version.patch +++ b/libs/libupm/patches/001-version.patch @@ -1,16 +1,18 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -26,12 +26,7 @@ - include(GNUInstallDirs) +@@ -231,14 +231,7 @@ + set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation path for libraries") # Make a version file containing the current version from git. -include (GetGitRevisionDescription) -git_describe (VERSION "--tags") --if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND") -- message (WARNING " - Install git to compile a production UPM!") -- set (VERSION "v0.4.0-dirty") +-# If git_describe fails, use a dirty version +-if (${VERSION} MATCHES -NOTFOUND) +- set (VERSION "v1.7.1") ++ set (VERSION "v2.0.0") +- message (WARNING "Failed to retrieve UPM version with 'git describe' (using " +- "${VERSION}). Check that git is installed and this is a valid git repo.") -endif () -+set (VERSION "v0.4.0") - message (INFO " - UPM Version ${VERSION}") + message (STATUS "UPM Version ${VERSION}") diff --git a/libs/libupm/patches/002-at42qt1070-id.patch b/libs/libupm/patches/002-at42qt1070-id.patch index 85544c97..94758ef1 100644 --- a/libs/libupm/patches/002-at42qt1070-id.patch +++ b/libs/libupm/patches/002-at42qt1070-id.patch @@ -1,6 +1,6 @@ --- a/src/at42qt1070/at42qt1070.cxx +++ b/src/at42qt1070/at42qt1070.cxx -@@ -53,7 +53,7 @@ +@@ -53,7 +53,7 @@ AT42QT1070::AT42QT1070(int bus, uint8_t address) return; } diff --git a/libs/libupm/patches/003-link-atomic.patch b/libs/libupm/patches/003-link-atomic.patch new file mode 100644 index 00000000..e7e99599 --- /dev/null +++ b/libs/libupm/patches/003-link-atomic.patch @@ -0,0 +1,8 @@ +--- a/src/nmea_gps/CMakeLists.txt ++++ b/src/nmea_gps/CMakeLists.txt +@@ -6,4 +6,4 @@ upm_mixed_module_init (NAME nmea_gps + CPP_SRC nmea_gps.cxx + FTI_SRC nmea_gps_fti.c + CPP_WRAPS_C +- REQUIRES mraa utilities-c ${CMAKE_THREAD_LIBS_INIT}) ++ REQUIRES mraa utilities-c atomic ${CMAKE_THREAD_LIBS_INIT}) diff --git a/libs/libupm/patches/003-lsm303-args.patch b/libs/libupm/patches/003-lsm303-args.patch deleted file mode 100644 index d2b2d0e5..00000000 --- a/libs/libupm/patches/003-lsm303-args.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/lsm303/lsm303.h -+++ b/src/lsm303/lsm303.h -@@ -34,7 +34,7 @@ - - /* LSM303 Address definitions */ - #define LSM303_MAG 0x1E // assuming SA0 grounded --#define LSM303_ACC 0x18 // assuming SA0 grounded -+#define LSM303_ACC 0x1E // assuming SA0 grounded - - /* LSM303 Register definitions */ - #define CTRL_REG1_A 0x20 diff --git a/libs/libupm/patches/004-uint8_t.patch b/libs/libupm/patches/004-uint8_t.patch new file mode 100644 index 00000000..4f975b06 --- /dev/null +++ b/libs/libupm/patches/004-uint8_t.patch @@ -0,0 +1,106 @@ +diff -urN a/src/bma250e/bma250e.cxx b/src/bma250e/bma250e.cxx +--- a/src/bma250e/bma250e.cxx 2019-05-09 00:06:25.000000000 +0900 ++++ b/src/bma250e/bma250e.cxx 2019-05-13 16:43:04.344536227 +0900 +@@ -195,35 +195,35 @@ + fifoConfig(mode, axes); + } + if(tok.substr(0, 20) == "setInterruptEnable0:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0); + setInterruptEnable0(bits); + } + if(tok.substr(0, 20) == "setInterruptEnable1:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0); + setInterruptEnable1(bits); + } + if(tok.substr(0, 20) == "setInterruptEnable2:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0); + setInterruptEnable2(bits); + } + if(tok.substr(0, 17) == "setInterruptMap0:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap0(bits); + } + if(tok.substr(0, 17) == "setInterruptMap1:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap1(bits); + } + if(tok.substr(0, 17) == "setInterruptMap2:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap2(bits); + } + if(tok.substr(0, 16) == "setInterruptSrc:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0); + setInterruptSrc(bits); + } + if(tok.substr(0, 26) == "setInterruptOutputControl:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0); + setInterruptOutputControl(bits); + } + if(tok.substr(0, 26) == "setInterruptLatchBehavior:") { +diff -urN a/src/bmg160/bmg160.cxx b/src/bmg160/bmg160.cxx +--- a/src/bmg160/bmg160.cxx 2019-05-09 00:06:25.000000000 +0900 ++++ b/src/bmg160/bmg160.cxx 2019-05-13 16:44:25.516304666 +0900 +@@ -173,23 +173,23 @@ + fifoConfig(mode, axes); + } + if(tok.substr(0, 20) == "setInterruptEnable0:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0); + setInterruptEnable0(bits); + } + if(tok.substr(0, 17) == "setInterruptMap0:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap0(bits); + } + if(tok.substr(0, 17) == "setInterruptMap1:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setInterruptMap1(bits); + } + if(tok.substr(0, 16) == "setInterruptSrc:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0); + setInterruptSrc(bits); + } + if(tok.substr(0, 26) == "setInterruptOutputControl:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0); + setInterruptOutputControl(bits); + } + if(tok.substr(0, 26) == "setInterruptLatchBehavior:") { +diff -urN a/src/bmm150/bmm150.cxx b/src/bmm150/bmm150.cxx +--- a/src/bmm150/bmm150.cxx 2019-05-09 00:06:25.000000000 +0900 ++++ b/src/bmm150/bmm150.cxx 2019-05-13 16:45:03.228197100 +0900 +@@ -170,19 +170,19 @@ + setOpmode(opmode); + } + if(tok.substr(0, 19) == "setInterruptEnable:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0); + setInterruptEnable(bits); + } + if(tok.substr(0, 19) == "setInterruptConfig:") { +- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0); ++ uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0); + setInterruptConfig(bits); + } + if(tok.substr(0, 17) == "setRepetitionsXY:") { +- u_int8_t reps = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0); ++ uint8_t reps = (uint8_t)std::stoul(tok.substr(17), nullptr, 0); + setRepetitionsXY(reps); + } + if(tok.substr(0, 16) == "setRepetitionsZ:") { +- u_int8_t reps = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0); ++ uint8_t reps = (uint8_t)std::stoul(tok.substr(16), nullptr, 0); + setRepetitionsZ(reps); + } + if(tok.substr(0, 14) == "setPresetMode:") { diff --git a/libs/libupnp/Makefile b/libs/libupnp/Makefile index 035b6400..951ba5a0 100644 --- a/libs/libupnp/Makefile +++ b/libs/libupnp/Makefile @@ -1,23 +1,20 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - include $(TOPDIR)/rules.mk PKG_NAME:=libupnp -PKG_VERSION:=1.6.19 -PKG_RELEASE:=2 +PKG_VERSION:=1.12.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/pupnp -PKG_HASH:=b3142b39601243b50532eec90f4a27dba85eb86f58d4b849ac94edeb29d9b22a -PKG_MAINTAINER:=Ted Hess +PKG_HASH:=fc36642b1848fe5a81296d496291d350ecfc12b85fd0b268478ab230976d4009 + +PKG_MAINTAINER:=Ted Hess +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:libupnp_project:libupnp -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -51,18 +48,40 @@ define Package/libupnp-sample/description TVcontrolpoint & tvdevice sample applications run inside /etc/upnp-tvdevice/ endef +CONFIGURE_ARGS += \ + --enable-client \ + --enable-device \ + --enable-gena \ + --enable-reuseaddr \ + --enable-gena \ + --enable-webserver \ + --enable-ssdp \ + --enable-soap \ + --enable-tools \ + --enable-blocking_tcp_connections \ + --enable-samples \ + --disable-debug \ + --disable-optssdp \ + --disable-unspecified_server \ + --disable-open_ssl \ + --disable-scriptsupport \ + --disable-postwrite + +TARGET_CFLAGS += -flto +TARGET_LDFLAGS += -flto + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/upnp $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*,la} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,upnp}.{a,so*,la} $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnp.pc $(1)/usr/lib/pkgconfig/ endef define Package/libupnp/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,upnp}.so.* $(1)/usr/lib/ endef define Package/libupnp-sample/install diff --git a/libs/libupnpp/Makefile b/libs/libupnpp/Makefile index 7c039532..1afbe694 100644 --- a/libs/libupnpp/Makefile +++ b/libs/libupnpp/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libupnpp -PKG_VERSION:=0.17.2 +PKG_VERSION:=0.19.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.lesbonscomptes.com/upmpdcli/downloads -PKG_HASH:=5abaaf353a1e9c3482d61ef2627b650285d59f27c1ee60d35b8951952261374f +PKG_HASH:=c9623533271605c92dfa603f5fe0ab6d3d5b4384a0c9173800784f4aa643a190 PKG_MAINTAINER:=Petko Bordjukov PKG_LICENSE:=LGPL-2.1-or-later @@ -28,7 +28,7 @@ define Package/libupnpp SECTION:=libs CATEGORY:=Libraries URL:=https://www.lesbonscomptes.com/upmpdcli - DEPENDS+= +libstdcpp +libexpat +librt +libcurl +libupnp + DEPENDS+=+libnpupnp TITLE:=The libupnpp C++ library wraps libupnp for easier use by upmpdcli and upplay endef diff --git a/libs/liburcu/Makefile b/libs/liburcu/Makefile index 65282ff9..73f28f11 100644 --- a/libs/liburcu/Makefile +++ b/libs/liburcu/Makefile @@ -9,17 +9,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=liburcu -PKG_VERSION:=0.9.4 -PKG_RELEASE:=1 +PKG_VERSION:=0.12.1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Daniel Salzman -PKG_LICENSE:=LGPL-2.1 GPL-2.0 GPL-3.0 MIT +PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later MIT +PKG_LICENSE_FILES:=lgpl-2.1.txt gpl-2.0.txt lgpl-relicensing.txt PKG_SOURCE:=userspace-rcu-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://lttng.org/files/urcu/ -PKG_HASH:=ec6c909249040dfa59bb34686482b62072ce5477f5e2e2153dac47de50b36b68 - +PKG_HASH:=bbfaead0345642b97e0de90f889dfbab4b2643a6a5e5c6bb59cd0d26fc0bcd0e PKG_BUILD_DIR:=$(BUILD_DIR)/userspace-rcu-$(PKG_VERSION) + PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_USE_MIPS16:=0 @@ -31,19 +32,23 @@ define Package/liburcu CATEGORY:=Libraries TITLE:=User-space Read-Copy-Update library URL:=https://lttng.org/ - DEPENDS:=+libpthread + DEPENDS:=+libpthread @!arc endef define Package/liburcu/description Userspace Read-Copy-Update library. endef +ifeq ($(CONFIG_arc),) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/urcu* $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/liburcu*.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ endef +endif define Package/liburcu/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/libs/liburing/Makefile b/libs/liburing/Makefile new file mode 100644 index 00000000..7238d5bc --- /dev/null +++ b/libs/liburing/Makefile @@ -0,0 +1,59 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=liburing +PKG_VERSION:=0.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://git.kernel.dk/cgit/liburing/snapshot +PKG_HASH:=44c99b9f148a885d882acd7aa63658141675eae251298cbf79bb9a4ab307ef9c + +PKG_MAINTAINER:=Christian Lachner +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/liburing + SECTION:=libs + CATEGORY:=Libraries + TITLE:=io_uring library + URL:=https://git.kernel.dk/cgit/liburing +endef + +define Package/liburing/description + liburing provides helpers to setup and teardown io_uring instances, + and also a simplified interface for applications that don't need + (or want) to deal with the full kernel side implementation. + For more info on io_uring, please see: https://kernel.dk/io_uring.pdf +endef + +CONFIGURE_ARGS:=--prefix=$(CONFIGURE_PREFIX) --cc=${TARGET_CC} + +TARGET_CFLAGS += $(if $(CONFIG_USE_MUSL),-Dloff_t=off_t) + +define Build/Compile + $(MAKE) $(PKG_BUILD_DIR) \ + DSTROOT="$(PKG_INSTALL_DIR)" +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/liburing.pc $(1)/usr/lib/pkgconfig/ + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/liburing.pc + $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/liburing.pc +endef + +define Package/liburing/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liburing.so $(PKG_INSTALL_DIR)/usr/lib/liburing.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,liburing)) diff --git a/libs/liburing/patches/000-OPENWRT-add-int64_t-detection.patch b/libs/liburing/patches/000-OPENWRT-add-int64_t-detection.patch new file mode 100644 index 00000000..6409956e --- /dev/null +++ b/libs/liburing/patches/000-OPENWRT-add-int64_t-detection.patch @@ -0,0 +1,11 @@ +--- ./configure ++++ ./configure +@@ -301,6 +301,8 @@ + fi + if test "$__kernel_timespec" != "yes"; then + cat >> $compat_h << EOF ++#include ++ + struct __kernel_timespec { + int64_t tv_sec; + long long tv_nsec; diff --git a/libs/libusbmuxd/Makefile b/libs/libusbmuxd/Makefile index 36c86120..59b8d908 100644 --- a/libs/libusbmuxd/Makefile +++ b/libs/libusbmuxd/Makefile @@ -8,28 +8,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libusbmuxd -PKG_VERSION:=1.1.0 -PKG_RELEASE:=2 +PKG_VERSION:=2.0.2 +PKG_RELEASE:=1 -PKG_MAINTAINER:=Lukasz Baj -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING.LGPLv2.1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://www.libimobiledevice.org/downloads +PKG_HASH:=cc6a808553da4efa9fa5638be256d5ae020498795d9d260d280b87074e799b20 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/libimobiledevice/libusbmuxd.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=4397b3376dc4e4cb1c991d0aed61ce6482614196 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=e145b567cdefb1d2536f3eec863769c77474ce9a5d9c4c81ab0a75dc6fe3056a +PKG_MAINTAINER:=Rosen Penev +PKG_CPE_ID:=cpe:/a:libimobiledevice:libusbmuxd -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk define Package/libusbmuxd/Default TITLE:=USB multiplexing daemon - URL:=http://www.libimobiledevice.org/ + URL:=https://www.libimobiledevice.org/ + SUBMENU:=libimobiledevice endef define Package/libusbmuxd/Default/description @@ -46,6 +43,8 @@ define Package/libusbmuxd CATEGORY:=Libraries TITLE+= library DEPENDS:=+libplist +libpthread +libxml2 +zlib + PKG_LICENSE:=LGPL-2.1-or-later + PKG_LICENSE_FILES:=COPYING endef define Package/libusbmuxd/description @@ -59,6 +58,7 @@ define Package/libusbmuxd-utils CATEGORY:=Utilities TITLE+= utilies DEPENDS:=+libusbmuxd + LICENSE:=GPL-2.0-or-later endef define Package/libusbmuxd-utils/description @@ -66,25 +66,27 @@ define Package/libusbmuxd-utils/description This package contains the libusbmuxd utilities. endef -TARGET_CFLAGS += $(FPIC) +CONFIGURE_ARGS += \ + --disable-static define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbmuxd.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbmuxd-2.0.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusbmuxd.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusbmuxd-2.0.pc $(1)/usr/lib/pkgconfig/ endef define Package/libusbmuxd/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbmuxd.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbmuxd-2.0.so.* $(1)/usr/lib/ endef define Package/libusbmuxd-utils/install $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/iproxy $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iproxy $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/inetcat $(1)/usr/bin/ endef $(eval $(call BuildPackage,libusbmuxd)) diff --git a/libs/libuvc/Makefile b/libs/libuvc/Makefile deleted file mode 100644 index 08dc939f..00000000 --- a/libs/libuvc/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libuvc - -PKG_VERSION:=0.0.6 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Roger D - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/ktossell/libuvc/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=42175a53c1c704365fdc782b44233925e40c9344fbb7f942181c1090f06e2873 - -PKG_LICENSE:=BSD -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 -CMAKE_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/libuvc - SECTION:=libs - CATEGORY:=Libraries - TITLE:=libuvc - DEPENDS:=+libusb-1.0 +libjpeg - URL:=https://int80k.com/libuvc -endef - -define Package/libuvc/description - This package contains libuvc is a cross-platform library for USB video devices, - built atop libusb. -endef - -define Package/libuvc/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuvc.so* $(1)/usr/lib/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{include,lib} - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuvc.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libuvc)) diff --git a/libs/libuwifi/Makefile b/libs/libuwifi/Makefile new file mode 100644 index 00000000..f1864fc9 --- /dev/null +++ b/libs/libuwifi/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2016 Bruno Randolf (br1@einfach.org) +# 2019 Nick Hainke (vincent@systemli.org) +# +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=libuwifi +PKG_VERSION:=2020-03-10 +PKG_RELEASE:=4 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/br101/libuwifi.git +PKG_SOURCE_VERSION:=0bfb8949c7a766555042f64be3d5ea9f8ed52690 +PKG_MIRROR_HASH:=79be6f8b603bc76bae983ebd007a203c6ebfa069efbb233aaf09ccdff502310d + +PKG_MAINTAINER:=Bruno Randolf , Nick Hainke +PKG_LICENSE:=LGPL-3.0-only +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libuwifi + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libradiotap +libnl-tiny + TITLE:=Userspace Wifi Library +endef + +define Package/libuwifi/description + Library for parsing, generating and analyzing Wifi (WLAN 802.11) frames in userspace and related functions. +endef + +MAKE_FLAGS += DEBUG=0 LIBNL=tiny BUILD_RADIOTAP=0 + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/uwifi + + $(CP) $(PKG_BUILD_DIR)/include/uwifi/*.h $(1)/usr/include/uwifi + $(CP) $(PKG_BUILD_DIR)/linux/*.h $(1)/usr/include/uwifi + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/build/libuwifi.{a,so*} $(1)/usr/lib/ +endef + +define Package/libuwifi/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/build/libuwifi.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libuwifi)) diff --git a/libs/libuwsc/Makefile b/libs/libuwsc/Makefile old mode 100755 new mode 100644 index 4bb1b50a..59b1d3ee --- a/libs/libuwsc/Makefile +++ b/libs/libuwsc/Makefile @@ -8,75 +8,85 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libuwsc -PKG_VERSION:=2.0.2 +PKG_VERSION:=3.3.4 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_SOURCE_URL=https://github.com/zhaojh329/libuwsc.git -PKG_MIRROR_HASH:=8f384a41aa9adf50fefa933a01b695d1bb6505af03d6c0cb3506283fc0229b34 -CMAKE_INSTALL:=1 - -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR) - -PKG_LICENSE:=LGPL-2.1 -PKG_LICENSE_FILES:=LICENSE +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL=https://github.com/zhaojh329/libuwsc/releases/download/v$(PKG_VERSION) +PKG_HASH:=ef789ff35e537e5191ec0d13f3e0df54187a54eace611e283ad4172d4411d08b PKG_MAINTAINER:=Jianhui Zhao +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 + +PKG_CONFIG_DEPENDS:= \ + CONFIG_LIBUWSC_openssl_LUA_BINDING \ + CONFIG_LIBUWSC_wolfssl_LUA_BINDING \ + CONFIG_LIBUWSC_mbedtls_LUA_BINDING \ + CONFIG_LIBUWSC_nossl_LUA_BINDING include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -define Package/libuwsc/default +define Package/libuwsc/Default SECTION:=libs CATEGORY:=Libraries SUBMENU:=Networking - TITLE:=Lightweight WebSocket client library - DEPENDS:=+libubox + TITLE:=A lightweight WebSocket client library based on libev + URL:=https://github.com/zhaojh329/libuwsc + DEPENDS:=+libev $(2) + VARIANT:=$(1) + PROVIDES:=libuwsc endef -define Package/libuwsc-nossl - $(Package/libuwsc/default) - TITLE += (NO SSL) - VARIANT:=nossl +Package/libuwsc-openssl=$(call Package/libuwsc/Default,openssl,+PACKAGE_libuwsc-openssl:libopenssl) +Package/libuwsc-wolfssl=$(call Package/libuwsc/Default,wolfssl,+PACKAGE_libuwsc-wolfssl:libwolfssl) +Package/libuwsc-mbedtls=$(call Package/libuwsc/Default,mbedtls,+PACKAGE_libuwsc-mbedtls:libmbedtls) +Package/libuwsc-nossl=$(call Package/libuwsc/Default,nossl) + +define Package/libuwsc/config +menu "Configuration" + depends on PACKAGE_libuwsc-$(1) + +config LIBUWSC_$(1)_LUA_BINDING + bool + default n + prompt "Lua binding for libuwsc" +endmenu endef -define Package/libuwsc-openssl - $(Package/libuwsc/default) - TITLE += (openssl) - DEPENDS += +libustream-openssl - VARIANT:=openssl -endef +Package/libuwsc-openssl/config=$(call Package/libuwsc/config,openssl) +Package/libuwsc-wolfssl/config=$(call Package/libuwsc/config,wolfssl) +Package/libuwsc-mbedtls/config=$(call Package/libuwsc/config,mbedtls) +Package/libuwsc-nossl/config=$(call Package/libuwsc/config,nossl) -define Package/libuwsc-wolfssl - $(Package/libuwsc/default) - TITLE += (wolfssl) - DEPENDS += +libustream-wolfssl - VARIANT:=wolfssl -endef - -define Package/libuwsc-mbedtls - $(Package/libuwsc/default) - TITLE += (mbedtls) - DEPENDS += +libustream-mbedtls - VARIANT:=mbedtls -endef - -ifeq ($(BUILD_VARIANT),nossl) - CMAKE_OPTIONS += -DUWSC_SSL_SUPPORT=off +ifeq ($(BUILD_VARIANT),openssl) + CMAKE_OPTIONS += -DUWSC_USE_OPENSSL=ON +else ifeq ($(BUILD_VARIANT),wolfssl) + CMAKE_OPTIONS += -DUWSC_USE_WOLFSSL=ON +else ifeq ($(BUILD_VARIANT),mbedtls) + CMAKE_OPTIONS += -DUWSC_USE_MBEDTLS=ON +else + CMAKE_OPTIONS += -DUWSC_SSL_SUPPORT=OFF endif -define Package/libuwsc/default/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuwsc.so* $(1)/usr/lib/ +ifneq ($(CONFIG_LIBUWSC_$(BUILD_VARIANT)_LUA_BINDING),) + CMAKE_OPTIONS += -DUWSC_LUA_SUPPORT=ON +endif + +define Package/libuwsc-$(BUILD_VARIANT)/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuwsc.so* $(1)/usr/lib/ +ifneq ($(CONFIG_LIBUWSC_$(BUILD_VARIANT)_LUA_BINDING),) + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/uwsc.so $(1)/usr/lib/lua +endif endef -Package/libuwsc-nossl/install = $(Package/libuwsc/default/install) -Package/libuwsc-openssl/install = $(Package/libuwsc/default/install) -Package/libuwsc-wolfssl/install = $(Package/libuwsc/default/install) -Package/libuwsc-mbedtls/install = $(Package/libuwsc/default/install) - -$(eval $(call BuildPackage,libuwsc-nossl)) -$(eval $(call BuildPackage,libuwsc-mbedtls)) -$(eval $(call BuildPackage,libuwsc-wolfssl)) $(eval $(call BuildPackage,libuwsc-openssl)) +$(eval $(call BuildPackage,libuwsc-wolfssl)) +$(eval $(call BuildPackage,libuwsc-mbedtls)) +$(eval $(call BuildPackage,libuwsc-nossl)) diff --git a/libs/libuwsc/patches/001-fix_find_lua.patch b/libs/libuwsc/patches/001-fix_find_lua.patch new file mode 100644 index 00000000..d40eec4a --- /dev/null +++ b/libs/libuwsc/patches/001-fix_find_lua.patch @@ -0,0 +1,23 @@ +Index: libuwsc-3.3.1/cmake/Modules/FindLua.cmake +=================================================================== +--- /dev/null ++++ libuwsc-3.3.1/cmake/Modules/FindLua.cmake +@@ -0,0 +1,18 @@ ++# - Try to find lua ++# Once done this will define ++# LUA_FOUND - System has lua ++# LUA_INCLUDE_DIR - The lua include directories ++# LUA_LIBRARY - The libraries needed to use lua ++ ++find_path(LUA_INCLUDE_DIR lua.h) ++find_library(LUA_LIBRARY lua) ++ ++include(FindPackageHandleStandardArgs) ++# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE ++# if all listed variables are TRUE and the requested version matches. ++find_package_handle_standard_args(Lua REQUIRED_VARS ++ LUA_LIBRARY LUA_INCLUDE_DIR ++ VERSION_VAR LUA_VERSION) ++ ++mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY) ++ diff --git a/libs/libvorbis/Makefile b/libs/libvorbis/Makefile index 95c85598..d755506b 100644 --- a/libs/libvorbis/Makefile +++ b/libs/libvorbis/Makefile @@ -16,6 +16,7 @@ PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:xiph.org:libvorbis PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/libs/libvpx/Makefile b/libs/libvpx/Makefile index b8aba660..7c0d7017 100644 --- a/libs/libvpx/Makefile +++ b/libs/libvpx/Makefile @@ -9,21 +9,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libvpx -PKG_VERSION:=1.7.0 +PKG_VERSION:=1.8.2 PKG_RELEASE:=1 -PKG_REV:=v$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz -PKG_MIRROR_HASH:=be50ff18464d614a08726597ecbd72d1f11ec69ec04df2d9acdf646ecd9adcca -PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx +PKG_MIRROR_HASH:=51e871a928fe98f14fd08285cb9b64c0d540b36b630ee7d47bc464e909366db7 +PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_MAINTAINER:=Luiz Angelo Daros de Luca - PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:john_koleszar:libvpx +PKG_BUILD_PARALLEL:=1 PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION)))) @@ -35,7 +33,7 @@ define Package/libvpx SECTION:=libs CATEGORY:=Libraries TITLE:=libvpx - URL:=http://www.webmproject.org/ + URL:=https://www.webmproject.org/ DEPENDS:=+libpthread ABI_VERSION:=$(PKG_ABI_VERSION) endef @@ -45,14 +43,14 @@ define Package/libvpx/description endef CONFIGURE_ARGS = \ - --target=generic-gnu \ - --prefix=$(CONFIGURE_PREFIX) \ - --libdir=/usr/lib \ - --enable-static \ - --enable-shared \ - --disable-examples \ - --disable-docs \ - --disable-unit-tests \ + --target=generic-gnu \ + --prefix=$(CONFIGURE_PREFIX) \ + --libdir=/usr/lib \ + --enable-static \ + --enable-shared \ + --disable-examples \ + --disable-docs \ + --disable-unit-tests \ # Add --enable-small as openwrt gcc flags are overwritten ifneq ($(findstring -Os,$(TARGET_CFLAGS)),) @@ -61,12 +59,9 @@ endif # libvpx expects gcc as linker but uses $LD if provided # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc -CONFIGURE_VARS += \ - CROSS=$(GNU_TARGET_NAME) \ - LD="$(TARGET_CC)" \ - -MAKE_FLAGS += \ - LD="$(TARGET_CC)" \ +CONFIGURE_VARS := $(filter-out LD=%,$(CONFIGURE_VARS)) LD="$(TARGET_CC)" \ + CROSS=$(GNU_TARGET_NAME) +MAKE_FLAGS := $(filter-out LD=%,$(MAKE_FLAGS)) LD="$(TARGET_CC)" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/vpx/ diff --git a/libs/libwebsockets/Makefile b/libs/libwebsockets/Makefile index fcafa90d..d29629f5 100644 --- a/libs/libwebsockets/Makefile +++ b/libs/libwebsockets/Makefile @@ -8,19 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libwebsockets -PKG_VERSION:=2.4.1 -PKG_RELEASE:=2 +PKG_VERSION:=3.2.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://codeload.github.com/warmcat/libwebsockets/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=29414be4f79f6abc0e6aadccd09a4da0f0c431e3b5691f496acd081ae6a8240c - +PKG_HASH:=5b1521002771420bc91e1c91f36bc51f54bf4035c4bebde296dec235a45c33df PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR) - PKG_LICENSE:=LGPL-2.1+exception PKG_LICENSE_FILES:=LICENSE @@ -89,6 +86,7 @@ ifeq ($(BUILD_VARIANT),full) CMAKE_OPTIONS += -DLWS_WITH_SERVER_STATUS=ON CMAKE_OPTIONS += -DLWS_WITH_ACCESS_LOG=ON CMAKE_OPTIONS += -DLWS_WITH_CGI=ON + CMAKE_OPTIONS += -DLWS_UNIX_SOCK=ON endif define Package/libwebsockets/install diff --git a/libs/libwebsockets/patches/001-CMakeLists-build-reproducible-by-default.patch b/libs/libwebsockets/patches/001-CMakeLists-build-reproducible-by-default.patch deleted file mode 100644 index c36a81dc..00000000 --- a/libs/libwebsockets/patches/001-CMakeLists-build-reproducible-by-default.patch +++ /dev/null @@ -1,78 +0,0 @@ -From d7b6c04aaf416344332e73f49fe457013e3ccf36 Mon Sep 17 00:00:00 2001 -From: Alexander Couzens -Date: Sun, 10 Dec 2017 00:54:06 +0100 -Subject: [PATCH] CMakeLists: build reproducible by default -Merged-upstream: yes - -Using the build user and build hostname as part of the git hash breaks -reproducible builds. Make this part optional, but build reproducible by -default. ---- - CMakeLists.txt | 47 +++++++++++++++++++++++++++-------------------- - 1 file changed, 27 insertions(+), 20 deletions(-) - -Index: libwebsockets-2.4.0/CMakeLists.txt -=================================================================== ---- libwebsockets-2.4.0.orig/CMakeLists.txt -+++ libwebsockets-2.4.0/CMakeLists.txt -@@ -39,26 +39,32 @@ message(STATUS "CMAKE_TOOLCHAIN_FILE='${ - find_package(Git) - if(GIT_EXECUTABLE) - execute_process( -- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" -- COMMAND "${GIT_EXECUTABLE}" describe -- OUTPUT_VARIABLE GIT_HASH -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ) -- execute_process( -- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" -- COMMAND "whoami" -- OUTPUT_VARIABLE GIT_USER -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ) -- execute_process( -- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" -- COMMAND "hostname" -- OUTPUT_VARIABLE GIT_HOST -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ) -- string(REGEX REPLACE "([^\\])[\\]([^\\])" "\\1\\\\\\\\\\2" GIT_USER ${GIT_USER}) -- set(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH}) -- message("Git commit hash: ${LWS_BUILD_HASH}") -+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" -+ COMMAND "${GIT_EXECUTABLE}" describe -+ OUTPUT_VARIABLE GIT_HASH -+ OUTPUT_STRIP_TRAILING_WHITESPACE -+ ) -+ set(LWS_BUILD_HASH ${GIT_HASH}) -+ -+ # appen the build user and hostname -+ if(NOT LWS_REPRODUCIBLE) -+ execute_process( -+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" -+ COMMAND "whoami" -+ OUTPUT_VARIABLE GIT_USER -+ OUTPUT_STRIP_TRAILING_WHITESPACE -+ ) -+ execute_process( -+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" -+ COMMAND "hostname" -+ OUTPUT_VARIABLE GIT_HOST -+ OUTPUT_STRIP_TRAILING_WHITESPACE -+ ) -+ string(REGEX REPLACE "([^\\])[\\]([^\\])" "\\1\\\\\\\\\\2" GIT_USER ${GIT_USER}) -+ set(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH}) -+ endif() -+ -+ message("Git commit hash: ${LWS_BUILD_HASH}") - endif() - - set(LWS_WITH_BUNDLED_ZLIB_DEFAULT OFF) -@@ -121,6 +127,7 @@ option(LWS_AVOID_SIGPIPE_IGN "Android 7+ - option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF) - option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF) - option(LWS_WITH_PEER_LIMITS "Track peers and restrict resources a single peer can allocate" OFF) -+option(LWS_REPRODUCIBLE "Build libwebsockets reproducible. It removes the build user and hostname from the build" ON) - - macro(confirm_command CMD NOCMD) - find_program (HAVE_CMD_${CMD} ${CMD} ) diff --git a/libs/libwebsockets/patches/020-fix-travis.patch b/libs/libwebsockets/patches/020-fix-travis.patch new file mode 100644 index 00000000..15d0fe63 --- /dev/null +++ b/libs/libwebsockets/patches/020-fix-travis.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1482,9 +1482,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COM + endif() + + if (UNIX AND NOT LWS_WITH_ESP32) +- set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wuninitialized -Werror ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS} ${ASAN_FLAGS}" ) ++ set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wuninitialized ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS} ${ASAN_FLAGS}" ) + else() +- set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wuninitialized -Werror ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" ) ++ set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wuninitialized ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" ) + endif() + endif () + diff --git a/libs/libwslay/Makefile b/libs/libwslay/Makefile new file mode 100644 index 00000000..1c62d459 --- /dev/null +++ b/libs/libwslay/Makefile @@ -0,0 +1,56 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libwslay +PKG_VERSION:=1.1.0 +PKG_RELEASE=1 + +PKG_SOURCE:=release-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/tatsuhiro-t/wslay/tar.gz/release-$(PKG_VERSION)? +PKG_HASH:=df5dca9f03614073cd8bdd22aa3c9b116f841ed3120b2d4463d2382cc44fc594 + +PKG_BUILD_DIR:=$(BUILD_DIR)/wslay-release-$(PKG_VERSION) + +PKG_MAINTAINER:=James Taylor +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/libwslay + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Wslay is a WebSocket library written in C + URL:=https://tatsuhiro-t.github.io/wslay/ +endef + +define Package/libwslay/description + Wslay is a WebSocket library written in C. It implements the protocol version 13 described + in RFC 6455. This library offers 2 levels of API: event-based API and frame-based low-level + API. For event-based API, it is suitable for non-blocking reactor pattern style. You can set + callbacks in various events. For frame-based API, you can send WebSocket frame directly. + Wslay only supports data transfer part of WebSocket protocol and does not perform opening + handshake in HTTP. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/wslay + $(CP) $(PKG_INSTALL_DIR)/usr/include/wslay/*.h $(1)/usr/include/wslay/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwslay.{a,so*} $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libwslay.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libwslay/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libwslay.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libwslay)) diff --git a/libs/libwslay/patches/100-disable-doc.patch b/libs/libwslay/patches/100-disable-doc.patch new file mode 100644 index 00000000..d5a21bad --- /dev/null +++ b/libs/libwslay/patches/100-disable-doc.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile.am b/Makefile.am +index ae8b02f..2e86973 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,6 +20,6 @@ + # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-SUBDIRS = lib tests examples doc ++SUBDIRS = lib tests + + ACLOCAL_AMFLAGS = -I m4 +diff --git a/configure.ac b/configure.ac +index 5e83cbf..88f4f03 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -123,9 +123,6 @@ AC_CONFIG_FILES([ + lib/includes/Makefile + lib/includes/wslay/wslayver.h + tests/Makefile +- examples/Makefile +- doc/Makefile +- doc/sphinx/conf.py + ]) + AC_OUTPUT + diff --git a/libs/libx264/Makefile b/libs/libx264/Makefile index ff28cd84..44c53b09 100644 --- a/libs/libx264/Makefile +++ b/libs/libx264/Makefile @@ -8,66 +8,63 @@ include $(TOPDIR)/rules.mk PKG_NAME:=x264 -PKG_VERSION:=snapshot-20180401-2245 -PKG_RELEASE:=1 +PKG_VERSION:=snapshot-20190324-2245 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://download.videolan.org/x264/snapshots/ PKG_MAINTAINER:=Adrian Panella -PKG_HASH:=657a915497a5b0ffed3598988657395358cf4dc961db14aebd918b7ffb7c5364 +PKG_HASH:=68010057edaadffc7593933d13084e8d32e041c42b17c089513d88c917f2ad54 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk -TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -std=gnu99 -fPIC -O3 -ffast-math -I. -MAKE_FLAGS+= LD="$(TARGET_CC) -o" +TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) +MAKE_FLAGS:=$(filter-out LD=%,$(MAKE_FLAGS)) LD="$(TARGET_CC) -o" -# ARM ASM depends on ARM1156 or later, blacklist earlier or incompatible cores -# AMD Geode LX and i486 do not have SSE -CPU_ASM_BLACKLIST:=geode i486 arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale \ - mips32 24kc 34kc 74kc octeon mips64 +# Instead of blacklisting a boatload of platforms just enable +# optimization where it makes sense (matters) ie ARMv7+ and x86_64 -ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),) - CONFIGURE_VARS+= AS= - MAKE_FLAGS+= AS= - CONFIGURE_ARGS += --disable-asm -else -ifneq ($(CONFIG_TARGET_x86),) -ifeq ($(CONFIG_YASM),y) - CONFIGURE_VARS+= AS=yasm - MAKE_FLAGS+= AS=yasm -else - CONFIGURE_VARS+= AS= - MAKE_FLAGS+= AS= - CONFIGURE_ARGS += --disable-asm -endif -endif +ifneq ($(findstring cortex-a,$(CPU_TYPE)),) + CONFIGURE_ARGS += --enable-lto + else + ifneq ($(CONFIG_TARGET_x86_64),) + CONFIGURE_ARGS += --enable-lto + ifeq ($(CONFIG_NASM),y) + CONFIGURE_VARS+= AS=nasm + MAKE_FLAGS+= AS=nasm + endif + else + CONFIGURE_VARS+= AS= + MAKE_FLAGS+= AS= + CONFIGURE_ARGS += --disable-asm + endif endif CONFIGURE_ARGS += \ - --enable-shared \ - --enable-pic \ - --enable-strip \ --disable-cli \ + --enable-shared \ + --disable-opencl \ + --enable-pic \ --disable-avs \ --disable-ffms \ + --disable-gpac \ --disable-lsmash define Package/libx264 SECTION:=libs CATEGORY:=Libraries - TITLE:=H264/AVC free codec library. + TITLE:=H264/AVC free codec library DEPENDS:=+libpthread @BUILD_PATENTED - URL:=http://www.videolan.org/developers/x264.html + URL:=https://www.videolan.org/developers/x264.html endef define Package/libx264/description - x264 is a free software library for encoding + x264 is a free software library for encoding video streams into the H.264/MPEG-4 AVC compression format. endef diff --git a/libs/libx264/patches/001-fix-x32-build-by-disabling-asm.patch b/libs/libx264/patches/001-fix-x32-build-by-disabling-asm.patch new file mode 100644 index 00000000..a41d4e78 --- /dev/null +++ b/libs/libx264/patches/001-fix-x32-build-by-disabling-asm.patch @@ -0,0 +1,48 @@ +From 66b120079fb21ed38cab0900c63360b0a7853eaa Mon Sep 17 00:00:00 2001 +From: Christopher Larson +Date: Tue, 13 Dec 2016 14:22:32 -0700 +Subject: [PATCH] Fix X32 build by disabling asm + +This applies gentoo's x32 patch, adjusted slightly, which disables asm support +for x32 as well as correcting -m. + +Debian has a different patch which does the same, and there's a superior yet +out of date patch series on the x264 list which keeps asm support enabled, but +doesn't successfully build at this time, and my assembly is very rusty. + +Upstream-Status: Pending +Signed-off-by: Christopher Larson +--- + configure | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +--- a/configure ++++ b/configure +@@ -736,7 +736,13 @@ case $host_cpu in + AS_EXT=".asm" + ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/" + stack_alignment=16 +- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" ++ if [ $compiler = GNU ]; then ++ if cpp_check "" "" "__ILP32__" ; then ++ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS" ++ else ++ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" ++ fi ++ fi + if [ "$SYS" = MACOSX ]; then + ASFLAGS="$ASFLAGS -f macho64 -DPREFIX" + if cc_check '' "-arch x86_64"; then +@@ -755,7 +761,11 @@ case $host_cpu in + RCFLAGS="--target=pe-x86-64 $RCFLAGS" + fi + else +- ASFLAGS="$ASFLAGS -f elf64" ++ if cpp_check "" "" "__ILP32__" ; then ++ asm=no ++ else ++ ASFLAGS="$ASFLAGS -f elf64" ++ fi + fi + ;; + powerpc*) diff --git a/libs/libx264/patches/002-dont-default-to-cortex-a9-with-neon.patch b/libs/libx264/patches/002-dont-default-to-cortex-a9-with-neon.patch new file mode 100644 index 00000000..7062b676 --- /dev/null +++ b/libs/libx264/patches/002-dont-default-to-cortex-a9-with-neon.patch @@ -0,0 +1,28 @@ +From a72bf499a0674fc75eedf15008b424e28f67e4bd Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Fri, 2 Feb 2018 15:10:08 +0200 +Subject: [PATCH] dont default to cortex-a9 with neon + +-march flag is not in CFLAGS so this will always default to + -mcpu=cortex-a8 -mfpu=neon. + +Upstream-Status: Pending + +Signed-off-by: Andrei Gherzan +Signed-off-by: Maxin B. John +--- + configure | 3 --- + 1 file changed, 3 deletions(-) + +--- a/configure ++++ b/configure +@@ -940,9 +940,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $A + fi + + if [ $asm = auto -a $ARCH = ARM ] ; then +- # set flags so neon is built by default +- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon" +- + cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM + if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then + define HAVE_ARMV6 diff --git a/libs/libxcrypt/Makefile b/libs/libxcrypt/Makefile new file mode 100644 index 00000000..acfde2f0 --- /dev/null +++ b/libs/libxcrypt/Makefile @@ -0,0 +1,55 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libxcrypt +PKG_VERSION:=4.4.16 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/besser82/libxcrypt/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=a98f65b8baffa2b5ba68ee53c10c0a328166ef4116bce3baece190c8ce01f375 + +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING.LIB + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libxcrypt + SECTION:=libs + CATEGORY:=Libraries + URL:=https://github.com/besser82/libxcrypt + TITLE:=Extended crypt library + BUILDONLY:=1 +endef + +define Package/libxcrypt/description + libxcrypt is a modern library for one-way hashing of passwords. It supports + a wide variety of both modern and historical hashing methods: yescrypt, + gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, md5crypt, SunMD5, + sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt. It provides the traditional + Unix crypt and crypt_r interfaces, as well as a set of extended interfaces + pioneered by Openwall Linux, crypt_rn, crypt_ra, crypt_gensalt, + crypt_gensalt_rn, and crypt_gensalt_ra. +endef + +CONFIGURE_ARGS += \ + --disable-shared \ + --disable-failure-tokens \ + --disable-xcrypt-compat-files \ + --disable-obsolete-api \ + --enable-hashes=solaris + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib/libxcrypt + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.{a,la} $(1)/usr/lib/libxcrypt + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*crypt.pc $(1)/usr/lib/pkgconfig/ +endef + +$(eval $(call BuildPackage,libxcrypt)) diff --git a/libs/libxerces-c/Makefile b/libs/libxerces-c/Makefile index e13a0201..ff86685d 100644 --- a/libs/libxerces-c/Makefile +++ b/libs/libxerces-c/Makefile @@ -8,49 +8,40 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xerces-c -PKG_MAIN_VER:=3.2 -PKG_VERSION:=3.2.0 +PKG_VERSION:=3.2.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@APACHE/xerces/c/3/sources -PKG_HASH:=35d8db18ebe6db353850903981cd07cca64abeba071602e7e32596714352de08 -PKG_MAINTAINER:=Álvaro Fernández Rojas +PKG_HASH:=12fc99a9fc1d1a79bd0e927b8b5637a576d6656f45b0d5e70ee3694d379cc149 +PKG_MAINTAINER:=Álvaro Fernández Rojas PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/package.mk -CONFIGURE_ARGS += \ - --disable-pretty-make \ - --enable-transcoder-iconv \ - --enable-netaccessor-socket \ - --enable-msgloader-inmemory - -TARGET_LDFLAGS += \ - -lm - -define Package/libxerces-c +define Package/libxerces-c/Default SECTION:=libs CATEGORY:=Libraries TITLE:=Validating XML parser library for C++ - URL:=http://xerces.apache.org/ - DEPENDS:=$(CXX_DEPENDS) $(ICONV_DEPENDS) +libc +libpthread + URL:=https://xerces.apache.org/ +endef + +define Package/libxerces-c +$(call Package/libxerces-c/Default) + DEPENDS:=$(ICONV_DEPENDS) +libstdcpp endef define Package/libxerces-c-samples - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Validating XML parser library for C++ (samples) - URL:=http://xerces.apache.org/ - DEPENDS:=+libxerces-c +$(call Package/libxerces-c/Default) + TITLE+= (samples) + DEPENDS+=+libxerces-c endef define Package/libxerces-c/description @@ -69,18 +60,27 @@ define Package/libxerces-c-samples/description Validating XML parser library for C++ (samples) endef +CONFIGURE_ARGS += \ + --disable-rpath \ + --enable-msgloader-inmemory \ + --enable-netaccessor-socket \ + --enable-transcoder-iconv \ + --with-pic + +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/xercesc/ $(CP) $(PKG_INSTALL_DIR)/usr/include/xercesc/* $(1)/usr/include/xercesc/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libxerces-c.a,libxerces-c-$(PKG_MAIN_VER).so,libxerces-c.so} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/{*.a,*.so} $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xerces-c.pc $(1)/usr/lib/pkgconfig/xerces-c.pc endef define Package/libxerces-c/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libxerces-c-$(PKG_MAIN_VER).so,libxerces-c.so} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/ endef define Package/libxerces-c-samples/install diff --git a/libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch b/libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch index 9e639acb..33832701 100644 --- a/libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch +++ b/libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -194,7 +194,7 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[# +@@ -228,7 +228,7 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[# ] ) AC_MSG_CHECKING([for wcsrtombs]) @@ -9,7 +9,7 @@ #include ]], [[ mbstate_t st; -@@ -216,7 +216,7 @@ else +@@ -250,7 +250,7 @@ else ] ) AC_MSG_CHECKING([for mbsrtowcs]) diff --git a/libs/libxml2/Makefile b/libs/libxml2/Makefile index 327d50e1..d10c07a2 100644 --- a/libs/libxml2/Makefile +++ b/libs/libxml2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libxml2 -PKG_VERSION:=2.9.9 -PKG_RELEASE:=3 +PKG_VERSION:=2.9.10 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://xmlsoft.org/sources/ -PKG_HASH:=94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871 +PKG_HASH:=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING @@ -136,8 +136,11 @@ HOST_CONFIGURE_ARGS += \ define Build/InstallDev $(INSTALL_DIR) $(2)/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/ - $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config \ + $(2)/bin/$(GNU_TARGET_NAME)-xml2-config + $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \ + $(2)/bin/$(GNU_TARGET_NAME)-xml2-config + $(LN) $(GNU_TARGET_NAME)-xml2-config $(2)/bin/xml2-config $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/ @@ -156,6 +159,12 @@ define Build/InstallDev $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal endef +define Host/Install + $(call Host/Install/Default) + mv $(1)/bin/xml2-config $(1)/bin/$(GNU_HOST_NAME)-xml2-config + $(LN) $(GNU_HOST_NAME)-xml2-config $(1)/bin/xml2-config +endef + define Package/libxml2/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/ diff --git a/libs/libxslt/Makefile b/libs/libxslt/Makefile index 954b1582..699fba5d 100644 --- a/libs/libxslt/Makefile +++ b/libs/libxslt/Makefile @@ -8,24 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libxslt -PKG_VERSION:=1.1.33 -PKG_RELEASE:=4 +PKG_VERSION:=1.1.34 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= \ http://xmlsoft.org/sources/ \ ftp://fr.rpmfind.net/pub/libxml/ -PKG_HASH:=8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8 +PKG_HASH:=98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f +PKG_MAINTAINER:=Jiri Slachta PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:xmlsoft:libxslt -PKG_MAINTAINER:=Jiri Slachta - -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 - +PKG_BUILD_PARALLEL:=1 HOST_BUILD_DEPENDS:=libxml2/host include $(INCLUDE_DIR)/package.mk @@ -67,8 +65,7 @@ define Package/xsltproc/description XSLT XML transformation utility. endef -CONFIGURE_ARGS+= \ - --disable-silent-rules \ +CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --without-python \ @@ -76,6 +73,17 @@ CONFIGURE_ARGS+= \ --without-debug \ --without-mem-debug \ --without-debugger \ + --without-plugins + +HOST_CONFIGURE_ARGS += \ + --with-libxml-prefix=$(STAGING_DIR_HOSTPKG) \ + --without-python \ + --without-crypto \ + --without-debug \ + --without-mem-debug \ + --without-debugger \ + --without-profiler \ + --without-plugins define Build/InstallDev/Xslt $(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include/libxslt \ @@ -129,16 +137,6 @@ define Build/InstallDev $(if $(CONFIG_PACKAGE_libexslt),$(call Build/InstallDev/Exslt,$(1),$(2))) endef -HOST_CONFIGURE_ARGS+= \ - --disable-silent-rules \ - --enable-static \ - --with-libxml-prefix=$(STAGING_DIR_HOSTPKG) \ - --without-python \ - --without-crypto \ - --without-debug \ - --without-mem-debug \ - --without-debugger - define Package/libxslt/install $(INSTALL_DIR) $(1)/usr/lib $(CP) \ diff --git a/libs/libxslt/patches/100-fix-cve-2019-11068.patch b/libs/libxslt/patches/100-fix-cve-2019-11068.patch deleted file mode 100644 index 260f35d1..00000000 --- a/libs/libxslt/patches/100-fix-cve-2019-11068.patch +++ /dev/null @@ -1,120 +0,0 @@ -From e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Sun, 24 Mar 2019 09:51:39 +0100 -Subject: [PATCH] Fix security framework bypass - -xsltCheckRead and xsltCheckWrite return -1 in case of error but callers -don't check for this condition and allow access. With a specially -crafted URL, xsltCheckRead could be tricked into returning an error -because of a supposedly invalid URL that would still be loaded -succesfully later on. - -Fixes #12. - -Thanks to Felix Wilhelm for the report. ---- - libxslt/documents.c | 18 ++++++++++-------- - libxslt/imports.c | 9 +++++---- - libxslt/transform.c | 9 +++++---- - libxslt/xslt.c | 9 +++++---- - 4 files changed, 25 insertions(+), 20 deletions(-) - -diff --git a/libxslt/documents.c b/libxslt/documents.c -index 3f3a7312..4aad11bb 100644 ---- a/libxslt/documents.c -+++ b/libxslt/documents.c -@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) { - int res; - - res = xsltCheckRead(ctxt->sec, ctxt, URI); -- if (res == 0) { -- xsltTransformError(ctxt, NULL, NULL, -- "xsltLoadDocument: read rights for %s denied\n", -- URI); -+ if (res <= 0) { -+ if (res == 0) -+ xsltTransformError(ctxt, NULL, NULL, -+ "xsltLoadDocument: read rights for %s denied\n", -+ URI); - return(NULL); - } - } -@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const xmlChar *URI) { - int res; - - res = xsltCheckRead(sec, NULL, URI); -- if (res == 0) { -- xsltTransformError(NULL, NULL, NULL, -- "xsltLoadStyleDocument: read rights for %s denied\n", -- URI); -+ if (res <= 0) { -+ if (res == 0) -+ xsltTransformError(NULL, NULL, NULL, -+ "xsltLoadStyleDocument: read rights for %s denied\n", -+ URI); - return(NULL); - } - } -diff --git a/libxslt/imports.c b/libxslt/imports.c -index 874870cc..3783b247 100644 ---- a/libxslt/imports.c -+++ b/libxslt/imports.c -@@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) { - int secres; - - secres = xsltCheckRead(sec, NULL, URI); -- if (secres == 0) { -- xsltTransformError(NULL, NULL, NULL, -- "xsl:import: read rights for %s denied\n", -- URI); -+ if (secres <= 0) { -+ if (secres == 0) -+ xsltTransformError(NULL, NULL, NULL, -+ "xsl:import: read rights for %s denied\n", -+ URI); - goto error; - } - } -diff --git a/libxslt/transform.c b/libxslt/transform.c -index 13793914..0636dbd0 100644 ---- a/libxslt/transform.c -+++ b/libxslt/transform.c -@@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node, - */ - if (ctxt->sec != NULL) { - ret = xsltCheckWrite(ctxt->sec, ctxt, filename); -- if (ret == 0) { -- xsltTransformError(ctxt, NULL, inst, -- "xsltDocumentElem: write rights for %s denied\n", -- filename); -+ if (ret <= 0) { -+ if (ret == 0) -+ xsltTransformError(ctxt, NULL, inst, -+ "xsltDocumentElem: write rights for %s denied\n", -+ filename); - xmlFree(URL); - xmlFree(filename); - return; -diff --git a/libxslt/xslt.c b/libxslt/xslt.c -index 780a5ad7..a234eb79 100644 ---- a/libxslt/xslt.c -+++ b/libxslt/xslt.c -@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) { - int res; - - res = xsltCheckRead(sec, NULL, filename); -- if (res == 0) { -- xsltTransformError(NULL, NULL, NULL, -- "xsltParseStylesheetFile: read rights for %s denied\n", -- filename); -+ if (res <= 0) { -+ if (res == 0) -+ xsltTransformError(NULL, NULL, NULL, -+ "xsltParseStylesheetFile: read rights for %s denied\n", -+ filename); - return(NULL); - } - } --- -2.18.1 - diff --git a/libs/libxslt/patches/101-fix-cve-2019-13117.patch b/libs/libxslt/patches/101-fix-cve-2019-13117.patch deleted file mode 100644 index 78ebb907..00000000 --- a/libs/libxslt/patches/101-fix-cve-2019-13117.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c5eb6cf3aba0af048596106ed839b4ae17ecbcb1 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Sat, 27 Apr 2019 11:19:48 +0200 -Subject: [PATCH] Fix uninitialized read of xsl:number token - -Found by OSS-Fuzz. ---- - libxslt/numbers.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/libxslt/numbers.c b/libxslt/numbers.c -index 89e1f668..75c31eba 100644 ---- a/libxslt/numbers.c -+++ b/libxslt/numbers.c -@@ -382,7 +382,10 @@ xsltNumberFormatTokenize(const xmlChar *format, - tokens->tokens[tokens->nTokens].token = val - 1; - ix += len; - val = xmlStringCurrentChar(NULL, format+ix, &len); -- } -+ } else { -+ tokens->tokens[tokens->nTokens].token = (xmlChar)'0'; -+ tokens->tokens[tokens->nTokens].width = 1; -+ } - } else if ( (val == (xmlChar)'A') || - (val == (xmlChar)'a') || - (val == (xmlChar)'I') || --- -2.21.0 - diff --git a/libs/libxslt/patches/102-fix-cve-2019-13118.patch b/libs/libxslt/patches/102-fix-cve-2019-13118.patch deleted file mode 100644 index b377f4bd..00000000 --- a/libs/libxslt/patches/102-fix-cve-2019-13118.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 6ce8de69330783977dd14f6569419489875fb71b Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Mon, 3 Jun 2019 13:14:45 +0200 -Subject: [PATCH] Fix uninitialized read with UTF-8 grouping chars - -The character type in xsltFormatNumberConversion was too narrow and -an invalid character/length combination could be passed to -xsltNumberFormatDecimal, resulting in an uninitialized read. - -Found by OSS-Fuzz. ---- - libxslt/numbers.c | 5 +++-- - tests/docs/bug-222.xml | 1 + - tests/general/bug-222.out | 2 ++ - tests/general/bug-222.xsl | 6 ++++++ - 4 files changed, 12 insertions(+), 2 deletions(-) - create mode 100644 tests/docs/bug-222.xml - create mode 100644 tests/general/bug-222.out - create mode 100644 tests/general/bug-222.xsl - -diff --git a/libxslt/numbers.c b/libxslt/numbers.c -index f1ed8846..20b99d5a 100644 ---- a/libxslt/numbers.c -+++ b/libxslt/numbers.c -@@ -1298,13 +1298,14 @@ OUTPUT_NUMBER: - number = floor((scale * number + 0.5)) / scale; - if ((self->grouping != NULL) && - (self->grouping[0] != 0)) { -+ int gchar; - - len = xmlStrlen(self->grouping); -- pchar = xsltGetUTF8Char(self->grouping, &len); -+ gchar = xsltGetUTF8Char(self->grouping, &len); - xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0], - format_info.integer_digits, - format_info.group, -- pchar, len); -+ gchar, len); - } else - xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0], - format_info.integer_digits, -diff --git a/tests/docs/bug-222.xml b/tests/docs/bug-222.xml -new file mode 100644 -index 00000000..69d62f2c ---- /dev/null -+++ b/tests/docs/bug-222.xml -@@ -0,0 +1 @@ -+ -diff --git a/tests/general/bug-222.out b/tests/general/bug-222.out -new file mode 100644 -index 00000000..e3139698 ---- /dev/null -+++ b/tests/general/bug-222.out -@@ -0,0 +1,2 @@ -+ -+1⠢0 -diff --git a/tests/general/bug-222.xsl b/tests/general/bug-222.xsl -new file mode 100644 -index 00000000..e32dc473 ---- /dev/null -+++ b/tests/general/bug-222.xsl -@@ -0,0 +1,6 @@ -+ -+ -+ -+ -+ -+ --- -2.21.0 - diff --git a/libs/libyaml-cpp/Makefile b/libs/libyaml-cpp/Makefile index 984e142c..2355b0a1 100644 --- a/libs/libyaml-cpp/Makefile +++ b/libs/libyaml-cpp/Makefile @@ -8,47 +8,46 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libyaml-cpp +PKG_VERSION:=0.6.3 PKG_RELEASE:=1 +PKG_SOURCE:=yaml-cpp-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-$(PKG_VERSION)? +PKG_HASH:=77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed +PKG_BUILD_DIR:=$(BUILD_DIR)/yaml-cpp-yaml-cpp-$(PKG_VERSION) + PKG_MAINTAINER:= Steven Hessing - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/jbeder/yaml-cpp/ -PKG_SOURCE_DATA:=2017-11-01 -PKG_SOURCE_VERSION:=beb44b872c07c74556314e730c6f20a00b32e8e5 -PKG_MIRROR_HASH:=3ddb1f5a6c564f33fd164c0300df8048c689c319964a08386d869637a0f5c8e2 - -PKG_SOURCE_SUBDIR:=yaml-cpp - PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_BUILD_PARALLEL:=1 +PKG_CPE_ID:=cpe:/a:yaml-cpp_project:yaml-cpp CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=ON -#CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=OFF define Package/libyaml-cpp - SECTION:=development - CATEGORY:=Libraries - TITLE:=libyaml-cpp - URL:=https://github.com/jbeder/yaml-cpp - DEPENDS:=+libstdcpp + SECTION:=development + CATEGORY:=Libraries + TITLE:=libyaml-cpp + URL:=https://github.com/jbeder/yaml-cpp + DEPENDS:=+libstdcpp + ABI_VERSION:=0.6 endef define Package/libyaml-cpp/description -yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. + yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. endef +CMAKE_OPTIONS += \ + -DYAML_BUILD_SHARED_LIBS=ON \ + -DYAML_CPP_BUILD_TESTS=OFF \ + -DYAML_CPP_BUILD_TOOLS=OFF + define Package/libyaml-cpp/install $(INSTALL_DIR) $(1)/usr/lib - #$(INSTALL_DATA) $(PKG_BUILD_DIR)/libyaml-cpp.so.0.5.3 $(1)/usr/lib/ - #$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libyaml-cpp.so.0.5.3 $(1)/usr/lib/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libyaml-cpp.so.0.5 $(1)/usr/lib/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libyaml-cpp.so.$(ABI_VERSION) $(1)/usr/lib/ endef $(eval $(call BuildPackage,libyaml-cpp)) diff --git a/libs/libyang/Makefile b/libs/libyang/Makefile index 90295196..c47330ea 100644 --- a/libs/libyang/Makefile +++ b/libs/libyang/Makefile @@ -8,24 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libyang -PKG_VERSION:=0.14.53 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_VERSION:=1.0.167 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libyang/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=2431fa5c7cfbe6a6f2c0873547b976f018438967adfe268726911dd3d95eaa31 -PKG_LICENSE:=GPL-2.0+ PKG_MAINTAINER:=Mislav Novakovic +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=2698bd6484526facbf82b1263810b938b82a2f23 -PKG_MIRROR_HASH:=3bfe4fd8236f0d1903d275aa76e039645d1093ef4204ab3b9bef46aecbe68f72 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/CESNET/libyang.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) - -PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_BUILD_DIR:=$(PKG_BUILD_ROOT) - +CMAKE_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 +CMAKE_BINARY_SUBDIR:=build include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -34,15 +30,23 @@ define Package/libyang SECTION:=libs CATEGORY:=Libraries TITLE:=YANG data modeling language library - URL:=$(PKG_SOURCE_URL) + URL:=https://github.com/CESNET/libyang DEPENDS:=+libpcre +libpthread endef +define Package/libyang-cpp + SECTION:=libs + CATEGORY:=Libraries + TITLE:=YANG data modeling C++ language library + URL:=https://github.com/CESNET/libyang + DEPENDS:=+libyang +libstdcpp +endef + define Package/yanglint SECTION:=utils CATEGORY:=Utilities TITLE:=YANG data modeling language utility - URL:=$(PKG_SOURCE_URL) + URL:=https://github.com/CESNET/libyang DEPENDS:=+libyang endef @@ -51,35 +55,34 @@ define Package/libyang/description The library is used e.g. in libnetconf2, Netopeer2 or sysrepo projects. endef -TARGET_LDFLAGS += -lm - CMAKE_OPTIONS += \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DCMAKE_BUILD_TYPE:STRING=Release + -DENABLE_LYD_PRIV:BOOL=ON \ + -DCMAKE_BUILD_TYPE:String="Release" \ + -DGEN_LANGUAGE_BINDINGS=ON \ + -DGEN_PYTHON_BINDINGS=OFF -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/include/libyang - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libyang/* $(1)/usr/include/libyang/ - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libyang.pc $(1)/usr/lib/pkgconfig/ -endef define Package/libyang/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/libyang - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/* $(1)/usr/lib/libyang/ + $(INSTALL_DIR) $(1)/usr/lib/libyang/extensions + $(INSTALL_DIR) $(1)/usr/lib/libyang/user_types + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/extensions/* $(1)/usr/lib/libyang/extensions + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/user_types/* $(1)/usr/lib/libyang/user_types +endef + +define Package/libyang-cpp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang-cpp.so* $(1)/usr/lib/ endef define Package/yanglint/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/yanglint $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yanglint $(1)/usr/bin/ endef $(eval $(call BuildPackage,libyang)) +$(eval $(call BuildPackage,libyang-cpp)) $(eval $(call BuildPackage,yanglint)) diff --git a/libs/libyang/patches/001-fix-musl-issue.patch b/libs/libyang/patches/001-fix-musl-issue.patch deleted file mode 100644 index b497c9d1..00000000 --- a/libs/libyang/patches/001-fix-musl-issue.patch +++ /dev/null @@ -1,47 +0,0 @@ -Index: libyang-0.14.53-2698bd6484526facbf82b1263810b938b82a2f23/src/extensions.c -=================================================================== ---- libyang-0.14.53-2698bd6484526facbf82b1263810b938b82a2f23.orig/src/extensions.c -+++ libyang-0.14.53-2698bd6484526facbf82b1263810b938b82a2f23/src/extensions.c -@@ -123,11 +123,14 @@ lyext_load_plugins(void) - - /* and construct the filepath */ - asprintf(&str, "%s/%s", pluginsdir, file->d_name); -- -- /* load the plugin - first, try if it is already loaded... */ -- dlhandler = dlopen(str, RTLD_NOW | RTLD_NOLOAD); -- dlerror(); /* Clear any existing error */ -- if (dlhandler) { -+ /* load the plugin */ -+ dlhandler = dlopen(str, RTLD_NOW); -+ if (!dlhandler) { -+ LOGERR(LY_ESYS, "Loading \"%s\" as a plugin failed (%s).", str, dlerror()); -+ free(str); -+ continue; -+ } -+ if (ly_set_contains(&dlhandlers, dlhandler) != -1) { - /* the plugin is already loaded */ - LOGVRB("Extension plugin \"%s\" already loaded.", str); - free(str); -@@ -137,14 +140,6 @@ lyext_load_plugins(void) - continue; - } - -- /* ... and if not, load it */ -- dlhandler = dlopen(str, RTLD_NOW); -- if (!dlhandler) { -- LOGERR(LY_ESYS, "Loading \"%s\" as an extension plugin failed (%s).", str, dlerror()); -- free(str); -- continue; -- } -- LOGVRB("Extension plugin \"%s\" successfully loaded.", str); - free(str); - dlerror(); /* Clear any existing error */ - -@@ -156,6 +151,7 @@ lyext_load_plugins(void) - dlclose(dlhandler); - continue; - } -+ LOGVRB("Plugin \"%s\" successfully loaded.", str) - - for(u = 0; plugin[u].name; u++) { - /* check extension implementations for collisions */ diff --git a/libs/libyubikey/Makefile b/libs/libyubikey/Makefile new file mode 100644 index 00000000..486a5452 --- /dev/null +++ b/libs/libyubikey/Makefile @@ -0,0 +1,47 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libyubikey +PKG_VERSION:=1.13 +PKG_RELEASE:=1 + +PKG_SOURCE:=libyubikey-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c/Releases +PKG_HASH:=04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401 +PKG_MAINTAINER:=Stuart B. Wilkins +PKG_LICENSE_FILES:=COPYING +PKG_LICENSE:=BSD-2-Clause + +include $(INCLUDE_DIR)/package.mk + +define Package/libyubikey + SECTION:=libs + CATEGORY:=Libraries + TITLE:=The Yuibco yubikey c library + URL:=https://developers.yubico.com/yubico-c/ +endef + +define Package/libyubikey/description + The c library for the yubikey from Yubico +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR)/usr/include + $(CP) $(PKG_BUILD_DIR)/yubikey.h $(STAGING_DIR)/usr/include + $(INSTALL_DIR) $(STAGING_DIR)/usr/lib + $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so* $(STAGING_DIR)/usr/lib +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-static + +define Package/libyubikey/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/modhex $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykgenerate $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykparse $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so.* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,libyubikey)) diff --git a/libs/libzdb/Makefile b/libs/libzdb/Makefile deleted file mode 100644 index e3d1c276..00000000 --- a/libs/libzdb/Makefile +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libzdb -PKG_VERSION:=3.1 -PKG_RELEASE:=6 -PKG_LICENSE:=GPL-3.0 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.tildeslash.com/libzdb/dist/ -PKG_HASH:=0f01abb1b01d1a1f4ab9b55ad3ba445d203fc3b4757abdf53e1d85e2b7b42695 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_BUILD_DEPENDS:=libzdb/host - -include $(INCLUDE_DIR)/package.mk -# libzdb needs to find iconv when linking to libmariadb -include $(INCLUDE_DIR)/nls.mk - -define Package/libzdb - SECTION:=libs - CATEGORY:=Libraries - TITLE:=A thread-safe multi database connection pool library - MAINTAINER:=Gergely Kiss - URL:=http://www.tildeslash.com/libzdb/ - DEPENDS:=+libsqlite3 +libpq +libmysqlclient +zlib +libpthread +libopenssl -endef - -define Package/libzdb/description - zdb is a database library with thread-safe connection pooling. The library can connect - transparently to multiple database systems. It has zero runtime configuration and connections - are specified via a URL scheme. A modern object-oriented API is provided. - zdb supports MySQL, PostgreSQL, SQLite, and Oracle. - NOTE: This package does not include Oracle support. -endef - -CONFIGURE_ARGS += --disable-profiling \ - --enable-optimized \ - --with-mysql \ - --with-postgresql \ - --with-sqlite \ - --enable-sqliteunlock \ - --enable-openssl - -TARGET_CPPFLAGS += -std=c99 - -include $(INCLUDE_DIR)/host-build.mk - -define Hooks/HostConfigure/Pre -endef - -define Host/Configure -endef - -define Host/Compile - $(HOSTCC) $(HOST_BUILD_DIR)/tools/filterh/lex.yy.c -o $(HOST_BUILD_DIR)/tools/bin/filterh -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin - $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOSTPKG)/bin/ -endef - -$(eval $(call HostBuild)) - -define Build/Compile - $(call Build/Compile/Default) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/zdb - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/include/zdb/ $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zdb.pc $(1)/usr/lib/pkgconfig -endef - -define Package/libzdb/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libzdb)) diff --git a/libs/libzdb/patches/010-cross-compile-fixes.patch b/libs/libzdb/patches/010-cross-compile-fixes.patch deleted file mode 100644 index 6b6b7d3f..00000000 --- a/libs/libzdb/patches/010-cross-compile-fixes.patch +++ /dev/null @@ -1,186 +0,0 @@ -diff -rupN libzdb-3.1.orig/configure.ac libzdb-3.1/configure.ac ---- libzdb-3.1.orig/configure.ac 2015-08-31 14:46:02.000000000 +0200 -+++ libzdb-3.1/configure.ac 2016-04-18 19:43:13.836937134 +0200 -@@ -196,15 +196,6 @@ AC_SEARCH_LIBS([pthread_create], [pthrea - # Database Libraries - - mysql="yes" --check_mysql_config() --{ -- AC_PATH_PROG([MYSQLCONFIG], [mysql_config], [no], [$PATH:/usr/local/bin:/usr/local/mysql/bin]) -- if test "x$MYSQLCONFIG" = "xno" -- then -- AC_MSG_WARN([mysql_config is required to build libzdb with mysql]) -- mysql="no" -- fi --} - AC_MSG_CHECKING(for mysql) - AC_ARG_WITH([mysql], - AS_HELP_STRING([--with-mysql(=)], -@@ -216,22 +207,20 @@ AC_ARG_WITH([mysql], - mysql="no" - else - AC_MSG_RESULT([yes]) -- AC_CHECK_FILE([$with_mysql], [MYSQLCONFIG=$with_mysql], [check_mysql_config]) - fi - ], - [ - AC_MSG_RESULT([yes]) -- check_mysql_config - ]) - if test "xyes" = "x$mysql"; then - svd_CPPFLAGS=$CPPFLAGS - svd_LDFLAGS=$LDFLAGS -- CPPFLAGS="`$MYSQLCONFIG --include` $CPPFLAGS" -- LDFLAGS="`$MYSQLCONFIG --libs` $LDFLAGS" -+ CPPFLAGS="-I$STAGING_DIR/usr/include/mysql $CPPFLAGS" -+ LDFLAGS="-L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib $LDFLAGS" - AC_CHECK_HEADERS([mysql.h], [], [mysql="no"]) - if test "xyes" = "x$mysql"; then -- DBCPPFLAGS="$DBCPPFLAGS `$MYSQLCONFIG --include`" -- DBLDFLAGS="$DBLDFLAGS `$MYSQLCONFIG --libs`" -+ DBCPPFLAGS="$DBCPPFLAGS -I$STAGING_DIR/usr/include/mysql" -+ DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib -lmysqlclient -liconv -lz -lcrypt -lm" - AC_DEFINE([HAVE_LIBMYSQLCLIENT], 1, [Define to 1 to enable mysql]) - else - CPPFLAGS=$svd_CPPFLAGS -@@ -241,15 +230,6 @@ fi - AM_CONDITIONAL([WITH_MYSQL], test "xyes" = "x$mysql") - - postgresql="yes" --check_postgres_config() --{ -- AC_PATH_PROG([PGCONFIG], [pg_config], [no], [$PATH:/usr/local/bin:/usr/local/pgsql/bin]) -- if test "x$PGCONFIG" = "xno" -- then -- AC_MSG_WARN([pg_config is required to build libzdb with postgresql]) -- postgresql="no" -- fi --} - AC_MSG_CHECKING(for postgresql) - AC_ARG_WITH([postgresql], - AS_HELP_STRING([--with-postgresql(=)], -@@ -261,22 +241,20 @@ AC_ARG_WITH([postgresql], - postgresql="no" - else - AC_MSG_RESULT([yes]) -- AC_CHECK_FILE([$with_postgresql], [PGCONFIG=$with_postgresql],[check_postgres_config]) - fi - ], - [ - AC_MSG_RESULT([yes]) -- check_postgres_config - ]) - if test "xyes" = "x$postgresql"; then - svd_CPPFLAGS=$CPPFLAGS - svd_LDFLAGS=$LDFLAGS -- CPPFLAGS="-I`$PGCONFIG --includedir` $CPPFLAGS" -- LDFLAGS="-L`$PGCONFIG --libdir` $LDFLAGS" -+ CPPFLAGS="-I$STAGING_DIR/usr/include/postgresql -I$STAGING_DIR/usr/include $CPPFLAGS" -+ LDFLAGS="-L$STAGING_DIR/usr/lib $LDFLAGS" - AC_CHECK_HEADERS([libpq-fe.h], [], [postgresql="no"]) - if test "xyes" = "x$postgresql"; then -- DBCPPFLAGS="$DBCPPFLAGS -I`$PGCONFIG --includedir`" -- DBLDFLAGS="$DBLDFLAGS -L`$PGCONFIG --libdir` -lpq" -+ DBCPPFLAGS="$DBCPPFLAGS -I$STAGING_DIR/usr/include/postgresql -I$STAGING_DIR/usr/include" -+ DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib -lpq" - AC_DEFINE([HAVE_LIBPQ], 1, [Define to 1 to enable postgresql]) - else - CPPFLAGS=$svd_CPPFLAGS -@@ -298,22 +276,7 @@ AC_ARG_WITH([sqlite], - sqlite="no" - else - AC_MSG_RESULT([yes]) -- AC_CHECK_FILE([$with_sqlite], -- [ -- svd_LDFLAGS=$LDFLAGS -- svd_CPPFLAGS=$CPPFLAGS -- LDFLAGS="-L$with_sqlite/lib $LDFLAGS" -- CPPFLAGS="-I$with_sqlite/include $CPPFLAGS" -- AC_SEARCH_LIBS([sqlite3_open], [sqlite3], -- [ -- DBCPPFLAGS="$DBCPPFLAGS -I$with_sqlite/include" -- DBLDFLAGS="$DBLDFLAGS -L$with_sqlite/lib/ -lsqlite3" -- ],[sqlite="no"],[-ldl]) -- LDFLAGS=$svd_LDFLAGS -- CPPFLAGS=$svd_CPPFLAGS -- -- ], -- AC_SEARCH_LIBS([sqlite3_open], [sqlite3], [], [sqlite="no"], [-ldl])) -+ AC_SEARCH_LIBS([sqlite3_open], [sqlite3], [], [sqlite="no"]) - fi - ], - [ -@@ -328,20 +291,8 @@ if test "xyes" = "x$sqlite"; then - fi - AM_CONDITIONAL([WITH_SQLITE], test "xyes" = "x$sqlite") - --oracle="yes" --AC_MSG_CHECKING(for oracle) --AX_LIB_ORACLE_OCI --if test -n "$ORACLE_OCI_CFLAGS" -a -n "$ORACLE_OCI_LDFLAGS"; then -- DBCPPFLAGS="$DBCPPFLAGS $ORACLE_OCI_CFLAGS" -- DBLDFLAGS="$DBLDFLAGS $ORACLE_OCI_LDFLAGS" -- AC_DEFINE([HAVE_ORACLE], 1, [Define to 1 to enable oracle]) --else -- oracle="no" --fi --AM_CONDITIONAL([WITH_ORACLE], test "xyes" = "x$oracle") -- - # Test if any database system was found --if test "xno" = "x$postgresql" -a "xno" = "x$mysql" -a "xno" = "x$sqlite" -a "xno" = "x$oracle"; then -+if test "xno" = "x$postgresql" -a "xno" = "x$mysql" -a "xno" = "x$sqlite"; then - AC_MSG_ERROR([No available database found or selected. Try configure --help]) - fi - -@@ -358,23 +309,6 @@ AC_HEADER_STDC - # Functions - # ------------------------------------------------------------------------ - --# Require a working setjmp --AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -- #include -- ]], -- [[jmp_buf env; setjmp(env);]])], -- [], [AC_MSG_FAILURE([setjmp is required])] --) -- --# Require that we have vsnprintf that conforms to c99. I.e. does bounds check --AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -- #include -- #include -- ]], -- [[char t[1]; va_list ap; int n = vsnprintf(t, 1, "hello", ap); if(n == 5) return 0;return 1;]])], -- [], [AC_MSG_FAILURE([vsnprintf does not conform to c99])] --) -- - AC_CHECK_FUNCS([timegm]) - - -@@ -516,11 +450,6 @@ echo "| PostgreSQL: - else - echo "| PostgreSQL: DISABLED |" - fi --if test "xyes" = "x$oracle"; then --echo "| Oracle: ENABLED |" --else --echo "| Oracle: DISABLED |" --fi - echo "+------------------------------------------------------------+" - - -diff -rupN libzdb-3.1.orig/Makefile.am libzdb-3.1/Makefile.am ---- libzdb-3.1.orig/Makefile.am 2015-08-31 14:55:18.000000000 +0200 -+++ libzdb-3.1/Makefile.am 2016-04-18 19:43:42.215769551 +0200 -@@ -45,11 +45,6 @@ libzdb_la_SOURCES += src/db/sqlite/SQLit - src/db/sqlite/SQLiteResultSet.c \ - src/db/sqlite/SQLitePreparedStatement.c - endif --if WITH_ORACLE --libzdb_la_SOURCES += src/db/oracle/OracleConnection.c \ -- src/db/oracle/OracleResultSet.c \ -- src/db/oracle/OraclePreparedStatement.c --endif - - API_INTERFACES = src/zdb.h src/db/ConnectionPool.h src/db/Connection.h \ - src/db/ResultSet.h src/net/URL.h src/db/PreparedStatement.h \ diff --git a/libs/libzdb/patches/020-filterh-use-host-built-version.patch b/libs/libzdb/patches/020-filterh-use-host-built-version.patch deleted file mode 100644 index 7495fbc0..00000000 --- a/libs/libzdb/patches/020-filterh-use-host-built-version.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -rupN libzdb-3.0.orig/Makefile.am libzdb-3.0/Makefile.am ---- libzdb-3.0.orig/Makefile.am 2014-01-06 22:34:08.000000000 +0100 -+++ libzdb-3.0/Makefile.am 2014-11-19 20:26:20.588547729 +0100 -@@ -1,5 +1,7 @@ - # Copyright (C) Tildeslash Ltd. All rights reserved. - -+include $(TOPDIR)/rules.mk -+ - AUTOMAKE_OPTIONS = foreign no-dependencies subdir-objects - ACLOCAL_AMFLAGS = -I m4 - -@@ -12,7 +14,7 @@ LIBRARY_NAME = zdb - - RE2C = @RE2C@ - RE2CFLAGS = -b --FILTERH = ./tools/bin/filterh -+FILTERH = $(STAGING_DIR_HOSTPKG)/bin/filterh - - AM_CPPFLAGS = $(CPPFLAGS) $(DBCPPFLAGS) - AM_CPPFLAGS += -Isrc -Isrc/util -Isrc/net -Isrc/db -Isrc/exceptions diff --git a/libs/libzdb/patches/030-openssl-1.1.patch b/libs/libzdb/patches/030-openssl-1.1.patch deleted file mode 100644 index b4f16a1b..00000000 --- a/libs/libzdb/patches/030-openssl-1.1.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -141,7 +141,7 @@ AC_ARG_ENABLE([openssl], - else - openssl="true" - if test "x$enableval" = "xyes"; then -- AC_CHECK_LIB([ssl], [SSL_library_init], [], [AC_MSG_ERROR([libssl not found])]) -+ AC_CHECK_LIB([ssl], [SSL_CTX_new], [], [AC_MSG_ERROR([libssl not found])]) - AC_CHECK_LIB([crypto], [SHA1_Init], [], [AC_MSG_ERROR([libcrypto not found])]) - else - AC_MSG_CHECKING([for openssl in $enableval]) diff --git a/libs/libzip/Makefile b/libs/libzip/Makefile new file mode 100644 index 00000000..eabc4791 --- /dev/null +++ b/libs/libzip/Makefile @@ -0,0 +1,136 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libzip +PKG_VERSION:=1.7.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://libzip.org/download/ +PKG_HASH:=a020dc1b17a79faa748e43a05f8605d65e403813e8e97ad3a300a90ddba097ac + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libzip/Default + TITLE:=libzip ($(2)) + URL:=https://libzip.org/ + SECTION:=libs + CATEGORY:=Libraries + SUBMENU:=Compression + DEPENDS:=+zlib $(3) + VARIANT:=$(1) + PROVIDES:=libzip +endef + +define Package/libzip-$(BUILD_VARIANT)/description + A C library for reading, creating, and modifying zip archives. +endef + +Package/libzip-nossl=$(call Package/libzip/Default,nossl,w/o encryption support) +Package/libzip-openssl=$(call Package/libzip/Default,openssl,OpenSSL,+PACKAGE_libzip-openssl:libopenssl) +Package/libzip-gnutls=$(call Package/libzip/Default,gnutls,GnuTLS,+PACKAGE_libzip-gnutls:libgnutls) +Package/libzip-mbedtls=$(call Package/libzip/Default,mbedtls,mbedTLS,+PACKAGE_libzip-mbedtls:libmbedtls) + +define Package/zipcmp + TITLE:=zipcmp + URL:=https://libzip.org/ + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Compression + DEPENDS:=+libzip +USE_MUSL:musl-fts +endef + +define Package/zipcmp/description + This package contains the command line tool zipcmp from libzip. +endef + +define Package/zipmerge + TITLE:=zipmerge + URL:=https://libzip.org/ + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Compression + DEPENDS:=+libzip +endef + +define Package/zipmerge/description + This package contains the command line tool zipmerge from libzip. +endef + +define Package/ziptool + TITLE:=ziptool + URL:=https://libzip.org/ + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Compression + DEPENDS:=+libzip +endef + +define Package/ziptool/description + This package contains the command line tool ziptool from libzip. +endef + +CMAKE_OPTIONS += -DENABLE_COMMONCRYPTO=OFF +ifeq ($(BUILD_VARIANT),gnutls) + CMAKE_OPTIONS += -DENABLE_GNUTLS=ON +else + CMAKE_OPTIONS += -DENABLE_GNUTLS=OFF +endif +ifeq ($(BUILD_VARIANT),openssl) + CMAKE_OPTIONS += -DENABLE_OPENSSL=ON +else + CMAKE_OPTIONS += -DENABLE_OPENSSL=OFF +endif +ifeq ($(BUILD_VARIANT),mbedtls) + CMAKE_OPTIONS += -DENABLE_MBEDTLS=ON +else + CMAKE_OPTIONS += -DENABLE_MBEDTLS=OFF +endif + +CMAKE_OPTIONS += -DENABLE_BZIP2=OFF +CMAKE_OPTIONS += -DENABLE_LZMA=OFF +CMAKE_OPTIONS += -DBUILD_REGRESS=OFF +CMAKE_OPTIONS += -DBUILD_EXAMPLES=OFF +CMAKE_OPTIONS += -DBUILD_DOC=OFF +CMAKE_OPTIONS += -DBUILD_TOOLS=ON + +define Package/libzip-$(BUILD_VARIANT)/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzip.so.* $(1)/usr/lib/ +endef + +define Package/zipcmp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zipcmp $(1)/usr/bin/ +endef + +define Package/zipmerge/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zipmerge $(1)/usr/bin/ +endef + +define Package/ziptool/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ziptool $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libzip-gnutls)) +$(eval $(call BuildPackage,libzip-mbedtls)) +$(eval $(call BuildPackage,libzip-openssl)) +$(eval $(call BuildPackage,libzip-nossl)) +$(eval $(call BuildPackage,zipcmp)) +$(eval $(call BuildPackage,zipmerge)) +$(eval $(call BuildPackage,ziptool)) diff --git a/libs/lmdb/Makefile b/libs/lmdb/Makefile new file mode 100644 index 00000000..27c1e672 --- /dev/null +++ b/libs/lmdb/Makefile @@ -0,0 +1,98 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=lmdb +PKG_VERSION:=0.9.24 +PKG_RELEASE:=2 + +PKG_SOURCE:=LMDB_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/LMDB/lmdb/tar.gz/LMDB_$(PKG_VERSION)? +PKG_HASH:=44602436c52c29d4f301f55f6fd8115f945469b868348e3cddaf91ab2473ea26 +PKG_BUILD_DIR:=$(BUILD_DIR)/lmdb-LMDB_$(PKG_VERSION) + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=OLDAP-2.8 +PKG_LICENSE_FILES:=LICENSE + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +MAKE_PATH:=libraries/liblmdb + +define Package/lmdb/Default + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Lightning Memory-Mapped Database + URL:=https://symas.com/lmdb/ +endef + +define Package/lmdb + $(call Package/lmdb/Default) + TITLE+= shared library +endef + +define Package/lmdb/description + LMDB is an ultra-fast, ultra-compact key-value + embedded data store developed for the OpenLDAP Project. +endef + +define Package/lmdb-utils + $(call Package/lmdb/Default) + TITLE+= utils + MDEPENDS+= lmdb +endef + +define Package/lmdb-utils/description + LMDB environment status and copy tool +endef + +define Package/lmdb-test + $(call Package/lmdb/Default) + TITLE+= test + MDEPENDS+= lmdb +endef + +define Package/lmdb-test/description + LMDB test application +endef + +define Build/Prepare + $(call Build/Prepare/Default) + $(SED) 's,%%PKG_VERSION%%,$(PKG_VERSION),g' $(PKG_BUILD_DIR)/liblmdb.pc +endef + +define Build/Compile + $(MAKE) -C "$(PKG_BUILD_DIR)/$(MAKE_PATH)/" \ + CC="$(TARGET_CC)" \ + CFLAGS+="$(TARGET_CFLAGS)" \ + LDFLAGS+="$(TARGET_LDFLAGS)" \ + FPIC="$(FPIC)" \ + AR="$(TARGET_AR)" +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/$(MAKE_PATH)/lmdb.h $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/$(MAKE_PATH)/liblmdb.{a,so} $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_BUILD_DIR)/liblmdb.pc $(1)/usr/lib/pkgconfig/lmdb.pc +endef + +define Package/lmdb/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/*.so $(1)/usr/lib +endef + +define Package/lmdb-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/mdb_{stat,copy,dump,load} $(1)/usr/bin +endef + +define Package/lmdb-test/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/mtest $(1)/usr/bin +endef + +$(eval $(call BuildPackage,lmdb)) +$(eval $(call BuildPackage,lmdb-utils)) +$(eval $(call BuildPackage,lmdb-test)) diff --git a/libs/lmdb/patches/010-fix-makefile.patch b/libs/lmdb/patches/010-fix-makefile.patch new file mode 100644 index 00000000..23a30fa8 --- /dev/null +++ b/libs/lmdb/patches/010-fix-makefile.patch @@ -0,0 +1,23 @@ +--- a/libraries/liblmdb/Makefile ++++ b/libraries/liblmdb/Makefile +@@ -34,6 +34,7 @@ libdir = $(exec_prefix)/lib + includedir = $(prefix)/include + datarootdir = $(prefix)/share + mandir = $(datarootdir)/man ++FPIC ?= -fPIC + + ######################################################################## + +@@ -86,10 +87,10 @@ midl.o: midl.c midl.h + $(CC) $(CFLAGS) $(CPPFLAGS) -c midl.c + + mdb.lo: mdb.c lmdb.h midl.h +- $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c mdb.c -o $@ ++ $(CC) $(CFLAGS) $(FPIC) $(CPPFLAGS) -c mdb.c -o $@ + + midl.lo: midl.c midl.h +- $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c -o $@ ++ $(CC) $(CFLAGS) $(FPIC) $(CPPFLAGS) -c midl.c -o $@ + + %: %.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ diff --git a/libs/lmdb/src/liblmdb.pc b/libs/lmdb/src/liblmdb.pc new file mode 100644 index 00000000..d6fcaf62 --- /dev/null +++ b/libs/lmdb/src/liblmdb.pc @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + + +Name: Lightning Memory-Mapped Database +Description: Lightning Memory-Mapped Database +Version: %%PKG_VERSION%% +Requires: +Libs: -L${libdir} -llmdb +Cflags: -I${includedir} diff --git a/libs/log4cplus/Makefile b/libs/log4cplus/Makefile new file mode 100644 index 00000000..6a1bf70a --- /dev/null +++ b/libs/log4cplus/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2019 Banglang Huang +# Copyright (C) 2019 Rosy Song +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=log4cplus +PKG_VERSION:=2.0.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_HASH:=6046f0867ce4734f298418c7b7db0d35c27403090bb751d98e6e76aa4935f1af + +PKG_MAINTAINER:=BangLang Huang , Rosy Song +PKG_LICENSE:=BSD-2-Clause Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +HOST_BUILD_PARALLEL:=1 +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/log4cplus + SECTION:=libs + CATEGORY:=Libraries + TITLE:=A simple to use C++ logging API + URL:=https://sourceforge.net/p/log4cplus/wiki/Home/ + DEPENDS:=+libstdcpp +endef + +define Package/log4cplus/description + log4cplus is a simple to use C++11 logging API providing thread--safe, + flexible, and arbitrarily granular control over log management and + configuration. It is modeled after the Java log4j API. +endef + +CMAKE_OPTIONS += \ + -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \ + -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \ + -DUNICODE:BOOL=OFF \ + -DWITH_ICONV:BOOL=OFF + +TARGET_CFLAGS += -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + +define Package/log4cplus/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,log4cplus)) +$(eval $(call HostBuild)) diff --git a/libs/loudmouth/Makefile b/libs/loudmouth/Makefile index e5f77cac..24c531b6 100644 --- a/libs/loudmouth/Makefile +++ b/libs/loudmouth/Makefile @@ -9,29 +9,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=loudmouth PKG_VERSION:=1.5.3 -PKG_RELEASE:=1 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/mcabber/loudmouth/tar.gz/$(PKG_VERSION)? +PKG_HASH:=12972fcffd9bbcc4a3b2b9fbf4b0e549f7b4caf0f11c8d2af2059087ce4e8792 PKG_MAINTAINER:=W. Michael Petullo - PKG_LICENSE:=LGPLv2.1 PKG_LICENSE_FILES:=COPYING -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=46a3f1a13a6ec5ff5377c028ce25bc723ab86247af40e686aa2b24718a5cd0d1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/mcabber/loudmouth.git -PKG_SOURCE_VERSION:=$(PKG_VERSION) - PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk define Package/loudmouth SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+glib2 +libopenssl + DEPENDS:=+glib2 +libopenssl +PACKAGE_krb5-libs:krb5-libs TITLE:=loudmouth URL:=https://github.com/mcabber/loudmouth endef @@ -41,8 +39,14 @@ define Package/loudmouth/description endef CONFIGURE_ARGS += \ - --with-ssl=openssl \ - --with-idn=no + --disable-debug \ + --without-compile-warnings \ + --without-idn \ + --with-ssl=openssl + +CONFIGURE_VARS += \ + ac_cv_lib_crypto_BIO_f_base64=yes \ + ac_cv_lib_ssl_SSL_new=yes define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ diff --git a/libs/loudmouth/patches/002-fix-comparison.patch b/libs/loudmouth/patches/002-fix-comparison.patch new file mode 100644 index 00000000..7373516c --- /dev/null +++ b/libs/loudmouth/patches/002-fix-comparison.patch @@ -0,0 +1,12 @@ +diff -u --recursive loudmouth-1.5.3-vanilla/loudmouth/lm-sasl.c loudmouth-1.5.3/loudmouth/lm-sasl.c +--- loudmouth-1.5.3-vanilla/loudmouth/lm-sasl.c 2018-07-27 22:42:03.250616281 -0400 ++++ loudmouth-1.5.3/loudmouth/lm-sasl.c 2018-07-27 22:42:26.756659723 -0400 +@@ -529,7 +529,7 @@ + } + + nonce = g_hash_table_lookup (challenge, "nonce"); +- if (nonce == NULL || nonce == '\0') { ++ if (nonce == NULL || *nonce == '\0') { + g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_SASL, + "%s: server didn't provide a nonce in the challenge", + G_STRFUNC); diff --git a/libs/loudmouth/patches/010-add-private.patch b/libs/loudmouth/patches/010-add-private.patch new file mode 100644 index 00000000..7d1b3763 --- /dev/null +++ b/libs/loudmouth/patches/010-add-private.patch @@ -0,0 +1,277 @@ +From 110bd9800bb9cb3afdd724e4e4a3292d29c817a1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= +Date: Thu, 27 Sep 2018 21:29:29 +0200 +Subject: [PATCH] Move away from g_type_class_add_private() + +g_type_class_add_private() will be deprecated in GLib 2.58. Replace: + + - g_type_class_add_private() with G_DEFINE_TYPE_WITH_PRIVATE() + - G_TYPE_INSTANCE_GET_PRIVATE() with *_get_instance_private() +--- + loudmouth/lm-blocking-resolver.c | 17 +++++++---------- + loudmouth/lm-feature-ping.c | 22 ++++++++++------------ + loudmouth/lm-resolver.c | 28 +++++++++++++--------------- + 3 files changed, 30 insertions(+), 37 deletions(-) + +diff --git a/loudmouth/lm-blocking-resolver.c b/loudmouth/lm-blocking-resolver.c +index 5a25061..d980d24 100644 +--- a/loudmouth/lm-blocking-resolver.c ++++ b/loudmouth/lm-blocking-resolver.c +@@ -38,10 +38,10 @@ + + #define SRV_LEN 8192 + +-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), LM_TYPE_BLOCKING_RESOLVER, LmBlockingResolverPriv)) ++#define GET_PRIV(obj) (lm_blocking_resolver_get_instance_private (LM_BLOCKING_RESOLVER(obj))) + +-typedef struct LmBlockingResolverPriv LmBlockingResolverPriv; +-struct LmBlockingResolverPriv { ++typedef struct LmBlockingResolverPrivate LmBlockingResolverPrivate; ++struct LmBlockingResolverPrivate { + GSource *idle_source; + }; + +@@ -49,7 +49,7 @@ static void blocking_resolver_dispose (GObject *object); + static void blocking_resolver_lookup (LmResolver *resolver); + static void blocking_resolver_cancel (LmResolver *resolver); + +-G_DEFINE_TYPE (LmBlockingResolver, lm_blocking_resolver, LM_TYPE_RESOLVER) ++G_DEFINE_TYPE_WITH_PRIVATE (LmBlockingResolver, lm_blocking_resolver, LM_TYPE_RESOLVER) + + static void + lm_blocking_resolver_class_init (LmBlockingResolverClass *class) +@@ -61,9 +61,6 @@ lm_blocking_resolver_class_init (LmBlockingResolverClass *class) + + resolver_class->lookup = blocking_resolver_lookup; + resolver_class->cancel = blocking_resolver_cancel; +- +- g_type_class_add_private (object_class, +- sizeof (LmBlockingResolverPriv)); + } + + static void +@@ -194,7 +191,7 @@ blocking_resolver_lookup_service (LmBlockingResolver *resolver) + static gboolean + blocking_resolver_idle_lookup (LmBlockingResolver *resolver) + { +- LmBlockingResolverPriv *priv = GET_PRIV (resolver); ++ LmBlockingResolverPrivate *priv = GET_PRIV (resolver); + gint type; + + /* Start the DNS querying */ +@@ -219,7 +216,7 @@ blocking_resolver_idle_lookup (LmBlockingResolver *resolver) + static void + blocking_resolver_lookup (LmResolver *resolver) + { +- LmBlockingResolverPriv *priv; ++ LmBlockingResolverPrivate *priv; + GMainContext *context; + + g_return_if_fail (LM_IS_BLOCKING_RESOLVER (resolver)); +@@ -236,7 +233,7 @@ blocking_resolver_lookup (LmResolver *resolver) + static void + blocking_resolver_cancel (LmResolver *resolver) + { +- LmBlockingResolverPriv *priv; ++ LmBlockingResolverPrivate *priv; + + g_return_if_fail (LM_IS_BLOCKING_RESOLVER (resolver)); + +diff --git a/loudmouth/lm-feature-ping.c b/loudmouth/lm-feature-ping.c +index b2dd439..bfd1e6d 100644 +--- a/loudmouth/lm-feature-ping.c ++++ b/loudmouth/lm-feature-ping.c +@@ -28,10 +28,10 @@ + + #define XMPP_NS_PING "urn:xmpp:ping" + +-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), LM_TYPE_FEATURE_PING, LmFeaturePingPriv)) ++#define GET_PRIV(obj) (lm_feature_ping_get_instance_private (LM_FEATURE_PING(obj))) + +-typedef struct LmFeaturePingPriv LmFeaturePingPriv; +-struct LmFeaturePingPriv { ++typedef struct LmFeaturePingPrivate LmFeaturePingPrivate; ++struct LmFeaturePingPrivate { + LmConnection *connection; + guint keep_alive_rate; + GSource *keep_alive_source; +@@ -55,7 +55,7 @@ feature_ping_keep_alive_reply (LmMessageHandler *handler, + gpointer user_data); + static gboolean feature_ping_send_keep_alive (LmFeaturePing *fp); + +-G_DEFINE_TYPE (LmFeaturePing, lm_feature_ping, G_TYPE_OBJECT) ++G_DEFINE_TYPE_WITH_PRIVATE (LmFeaturePing, lm_feature_ping, G_TYPE_OBJECT) + + enum { + PROP_0, +@@ -103,8 +103,6 @@ lm_feature_ping_class_init (LmFeaturePingClass *class) + NULL, NULL, + _lm_marshal_VOID__VOID, + G_TYPE_NONE, 0); +- +- g_type_class_add_private (object_class, sizeof (LmFeaturePingPriv)); + } + + static void +@@ -127,7 +125,7 @@ feature_ping_get_property (GObject *object, + GValue *value, + GParamSpec *pspec) + { +- LmFeaturePingPriv *priv; ++ LmFeaturePingPrivate *priv; + + priv = GET_PRIV (object); + +@@ -147,7 +145,7 @@ feature_ping_set_property (GObject *object, + const GValue *value, + GParamSpec *pspec) + { +- LmFeaturePingPriv *priv; ++ LmFeaturePingPrivate *priv; + + priv = GET_PRIV (object); + +@@ -171,7 +169,7 @@ feature_ping_keep_alive_reply (LmMessageHandler *handler, + LmMessage *m, + gpointer user_data) + { +- LmFeaturePingPriv *priv; ++ LmFeaturePingPrivate *priv; + + priv = GET_PRIV (user_data); + +@@ -183,7 +181,7 @@ feature_ping_keep_alive_reply (LmMessageHandler *handler, + static gboolean + feature_ping_send_keep_alive (LmFeaturePing *fp) + { +- LmFeaturePingPriv *priv; ++ LmFeaturePingPrivate *priv; + LmMessage *ping; + LmMessageNode *ping_node; + LmMessageHandler *keep_alive_handler; +@@ -237,7 +235,7 @@ feature_ping_send_keep_alive (LmFeaturePing *fp) + void + lm_feature_ping_start (LmFeaturePing *fp) + { +- LmFeaturePingPriv *priv; ++ LmFeaturePingPrivate *priv; + + g_return_if_fail (LM_IS_FEATURE_PING (fp)); + +@@ -260,7 +258,7 @@ lm_feature_ping_start (LmFeaturePing *fp) + void + lm_feature_ping_stop (LmFeaturePing *fp) + { +- LmFeaturePingPriv *priv; ++ LmFeaturePingPrivate *priv; + + g_return_if_fail (LM_IS_FEATURE_PING (fp)); + +diff --git a/loudmouth/lm-resolver.c b/loudmouth/lm-resolver.c +index b9d7762..a0500ef 100644 +--- a/loudmouth/lm-resolver.c ++++ b/loudmouth/lm-resolver.c +@@ -36,10 +36,10 @@ + #include "lm-marshal.h" + #include "lm-resolver.h" + +-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), LM_TYPE_RESOLVER, LmResolverPriv)) ++#define GET_PRIV(obj) (lm_resolver_get_instance_private (LM_RESOLVER(obj))) + +-typedef struct LmResolverPriv LmResolverPriv; +-struct LmResolverPriv { ++typedef struct LmResolverPrivate LmResolverPrivate; ++struct LmResolverPrivate { + GMainContext *context; + + LmResolverCallback callback; +@@ -71,7 +71,7 @@ static void resolver_set_property (GObject *object, + const GValue *value, + GParamSpec *pspec); + +-G_DEFINE_TYPE (LmResolver, lm_resolver, G_TYPE_OBJECT) ++G_DEFINE_TYPE_WITH_PRIVATE (LmResolver, lm_resolver, G_TYPE_OBJECT) + + enum { + PROP_0, +@@ -151,8 +151,6 @@ lm_resolver_class_init (LmResolverClass *class) + "Protocol for SRV lookup", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); +- +- g_type_class_add_private (object_class, sizeof (LmResolverPriv)); + } + + static void +@@ -164,7 +162,7 @@ lm_resolver_init (LmResolver *resolver) + static void + resolver_finalize (GObject *object) + { +- LmResolverPriv *priv; ++ LmResolverPrivate *priv; + + priv = GET_PRIV (object); + +@@ -190,7 +188,7 @@ resolver_get_property (GObject *object, + GValue *value, + GParamSpec *pspec) + { +- LmResolverPriv *priv; ++ LmResolverPrivate *priv; + + priv = GET_PRIV (object); + +@@ -228,7 +226,7 @@ resolver_set_property (GObject *object, + const GValue *value, + GParamSpec *pspec) + { +- LmResolverPriv *priv; ++ LmResolverPrivate *priv; + + priv = GET_PRIV (object); + +@@ -301,7 +299,7 @@ lm_resolver_new_for_host (const gchar *host, + gpointer user_data) + { + LmResolver *resolver; +- LmResolverPriv *priv; ++ LmResolverPrivate *priv; + + g_return_val_if_fail (host != NULL, NULL); + g_return_val_if_fail (callback != NULL, NULL); +@@ -327,7 +325,7 @@ lm_resolver_new_for_service (const gchar *domain, + gpointer user_data) + { + LmResolver *resolver; +- LmResolverPriv *priv; ++ LmResolverPrivate *priv; + + g_return_val_if_fail (domain != NULL, NULL); + g_return_val_if_fail (service != NULL, NULL); +@@ -373,7 +371,7 @@ lm_resolver_cancel (LmResolver *resolver) + struct addrinfo * + lm_resolver_results_get_next (LmResolver *resolver) + { +- LmResolverPriv *priv; ++ LmResolverPrivate *priv; + struct addrinfo *ret_val; + + g_return_val_if_fail (LM_IS_RESOLVER (resolver), NULL); +@@ -401,7 +399,7 @@ skipresult: + void + lm_resolver_results_reset (LmResolver *resolver) + { +- LmResolverPriv *priv; ++ LmResolverPrivate *priv; + + g_return_if_fail (LM_IS_RESOLVER (resolver)); + +@@ -427,7 +425,7 @@ _lm_resolver_set_result (LmResolver *resolver, + LmResolverResult result, + struct addrinfo *results) + { +- LmResolverPriv *priv; ++ LmResolverPrivate *priv; + + g_return_if_fail (LM_IS_RESOLVER (resolver)); + diff --git a/libs/loudmouth/patches/020-openssl-deprecated.patch b/libs/loudmouth/patches/020-openssl-deprecated.patch new file mode 100644 index 00000000..976d9b91 --- /dev/null +++ b/libs/loudmouth/patches/020-openssl-deprecated.patch @@ -0,0 +1,14 @@ +--- a/loudmouth/lm-ssl-openssl.c ++++ b/loudmouth/lm-ssl-openssl.c +@@ -345,9 +345,11 @@ _lm_ssl_initialize (LmSSL *ssl) + /*const char *cert_file = NULL;*/ + + if (!initialized) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init(); + /* FIXME: Is this needed when we are not in debug? */ + SSL_load_error_strings(); ++#endif + initialized = TRUE; + } + diff --git a/libs/lttng-ust/Makefile b/libs/lttng-ust/Makefile index 7b88f0ce..2dd3dffe 100644 --- a/libs/lttng-ust/Makefile +++ b/libs/lttng-ust/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lttng-ust -PKG_VERSION:=2.6.1 +PKG_VERSION:=2.10.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ -PKG_HASH:=a75c3ea6cbfa3a89107a2141b27ebabf13964e628855566571f09459bbbc8cb3 +PKG_HASH:=9e8420f90d5f963f7aa32bc6d44adc1e491136f687c69ffb7a3075d33b40852b +PKG_MAINTAINER:= PKG_LICENSE:=LGPL-2.1 GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_CPE_ID:=cpe:/a:lttng:ust PKG_FIXUP:=autoreconf PKG_USE_MIPS16:=0 @@ -34,11 +35,19 @@ define Package/lttng-ust DEPENDS:= +liburcu +libuuid +librt endef +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --without-pic + +CONFIGURE_VARS += \ + ac_cv_prog_BUILD_GEN_TP_EXAMPLES=no + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/lttng $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ust*.{a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ust*.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lttng-ust.pc $(1)/usr/lib/pkgconfig/ endef diff --git a/libs/lttng-ust/patches/001-no_docs_tests.patch b/libs/lttng-ust/patches/001-no_docs_tests.patch index e1c20c6e..6dee8034 100644 --- a/libs/lttng-ust/patches/001-no_docs_tests.patch +++ b/libs/lttng-ust/patches/001-no_docs_tests.patch @@ -1,7 +1,7 @@ --- a/Makefile.am +++ b/Makefile.am -@@ -20,8 +20,6 @@ if BUILD_JAVA_AGENT - SUBDIRS += liblttng-ust-java-agent +@@ -26,8 +26,6 @@ SUBDIRS += python-lttngust \ + liblttng-ust-python-agent endif -SUBDIRS += tests doc diff --git a/libs/lttng-ust/patches/002-examples.patch b/libs/lttng-ust/patches/002-examples.patch deleted file mode 100644 index 46449b78..00000000 --- a/libs/lttng-ust/patches/002-examples.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -350,7 +350,14 @@ AC_ARG_WITH([lttng-system-rundir], - AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"], - [LTTng system runtime directory]) - --AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1,[:]) -+AC_ARG_ENABLE([examples], -+ [AS_HELP_STRING([--enable-examples],[build examples [default=no]])], -+ [enable_examples=$enableval], -+ [enable_examples=no] -+) -+if test "x$enable_examples" = "xyes"; then -+ AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1,[:]) -+fi - AM_CONDITIONAL([BUILD_GEN_TP_EXAMPLES], [test $BUILD_GEN_TP_EXAMPLES], [Build examples requiring lttng-gen-tp]) - - AC_CONFIG_FILES([ diff --git a/libs/measurement-kit/Makefile b/libs/measurement-kit/Makefile new file mode 100644 index 00000000..1da6b1dd --- /dev/null +++ b/libs/measurement-kit/Makefile @@ -0,0 +1,78 @@ +# +# Copyright (C) 2019-2020 CZ.NIC z.s.p.o. (http://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=measurement-kit +PKG_VERSION:=0.10.11 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=f9dbf5f721516fd709c13ac5011737b3622076299e3c899a1f70861901ec1b40 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=curl libevent2 libmaxminddb openssl +PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS:=MEASUREMENT_KIT_BUILD_DEPENDS + +include $(INCLUDE_DIR)/package.mk + +define Package/measurement-kit + SECTION:=libs + CATEGORY:=Libraries + TITLE:=library for open network measurement + URL:=https://measurement-kit.github.io/ + DEPENDS:=+libstdcpp +libcurl +libevent2-pthreads +libevent2-extra +libevent2-openssl +libevent2-core +libmaxminddb +libopenssl +ca-bundle +endef + +define Package/measurement-kit/description + Measurement Kit is a C++14 library that implements open network measurement methodologies (performance, censorship, etc.) +endef + +define Package/measurement-kit/config +config MEASUREMENT_KIT_BUILD_DEPENDS + bool + default PACKAGE_measurement-kit + +config MEASUREMENT_KIT_BUILD_SELECT + tristate + default m if MEASUREMENT_KIT_BUILD_DEPENDS + select PACKAGE_libevent2-openssl + select PACKAGE_libevent2-pthreads +endef + +CONFIGURE_ARGS+= --with-ca-bundle=/etc/ssl/cert.pem + +TARGET_CFLAGS += $(if $(CONFIG_USE_UCLIBC),-DCATCH_CONFIG_GLOBAL_NEXTAFTER) + +define Build/Configure + ( cd $(PKG_BUILD_DIR); ./autogen.sh ) + $(call Build/Configure/Default) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/measurement-kit/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/measurement_kit $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/measurement_kit + $(CP) $(PKG_BUILD_DIR)/*.mmdb $(1)/etc/measurement_kit +endef + +$(eval $(call BuildPackage,measurement-kit)) diff --git a/libs/minizip/Makefile b/libs/minizip/Makefile new file mode 100644 index 00000000..431e0cb1 --- /dev/null +++ b/libs/minizip/Makefile @@ -0,0 +1,66 @@ +# +# Copyright © 2020 David Woodhouse +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=minizip +PKG_VERSION:=2.9.3 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/nmoinvaz/minizip/tar.gz/$(PKG_VERSION)? +PKG_HASH:=f64b2d228a03673a8ec36a53402e2108437226fd9170d49b7f0c0bca94708b93 + +PKG_MAINTAINER:=David Woodhouse +PKG_LICENSE:=Zlib +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +CMAKE_OPTIONS += \ + -DINSTALL_INC_DIR=/usr/include/minizip \ + -DBUILD_SHARED_LIBS=ON \ + -DMZ_BZIP2=OFF \ + -DMZ_LIBBSD=OFF + + +define Package/minizip + TITLE:=Fork of the popular zip manipulation library found in the zlib distribution + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+zlib + URL:=https://github.com/nmoinvaz/minizip +endef + +define Package/minizip-dev + SECTION:=devel + CATEGORY:=Development + SUBMENU:=Libraries + DEPENDS:=minizip + TITLE:=Development files for the minizip library +endef + +define Package/minizip/description + minizip is a zip manipulation library written in C that is supported on Windows, macOS, and Linux +endef + +define Package/minizip/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libminizip.so.* $(1)/usr/lib/ +endef + +TARGET_CXXFLAGS += -flto + +define Build/InstallDev + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/minizip.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/minizip.pc +endef + +$(eval $(call BuildPackage,minizip)) diff --git a/libs/minizip/patches/010-disable-libbsd.patch b/libs/minizip/patches/010-disable-libbsd.patch new file mode 100644 index 00000000..caa48184 --- /dev/null +++ b/libs/minizip/patches/010-disable-libbsd.patch @@ -0,0 +1,55 @@ +From 3d94e052f987bc35452592acf9f6fcb0d4ee4db4 Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 10 Jun 2020 11:39:17 +0100 +Subject: [PATCH] Allow libbsd to be explicitly disabled + +When building for a minimal environment like OpenWRT we want to avoid the +dependency on libbsd even if it did happen to be built and available in +the buildroot at the time minizip is compiled. + +https://github.com/openwrt/packages/issues/12471 +--- + CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0de10cf..217359a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,7 @@ option(MZ_PKCRYPT "Enables PKWARE traditional encryption" ON) + option(MZ_WZAES "Enables WinZIP AES encryption" ON) + option(MZ_LIBCOMP "Enables Apple compression" OFF) + option(MZ_OPENSSL "Enables OpenSSL for encryption" OFF) ++option(MZ_LIBBSD "Enable libbsd random functionality" ON) + option(MZ_BRG "Enables Brian Gladman's encryption library" OFF) + option(MZ_SIGNING "Enables zip signing support" ON) + option(MZ_COMPRESS_ONLY "Only support compression" OFF) +@@ -275,7 +276,7 @@ if(UNIX) + endif() + endif() + +- if(NOT HAVE_ARC4RANDOM_BUF) ++ if(MZ_LIBBSD AND NOT HAVE_ARC4RANDOM_BUF) + find_package(PkgConfig REQUIRED) + + pkg_check_modules(LIBBSD libbsd) +@@ -288,6 +289,8 @@ if(UNIX) + list(APPEND MINIZIP_INC ${LIBBSD_INCLUDE_DIRS}) + link_directories(${LIBBSD_LIBRARY_DIRS}) + endif() ++ else() ++ set(MZ_LIBBSD FALSE) + endif() + endif() + endif() +@@ -935,6 +938,7 @@ add_feature_info(MZ_PKCRYPT MZ_PKCRYPT "Enables PKWARE traditional encryption") + add_feature_info(MZ_WZAES MZ_WZAES "Enables WinZIP AES encryption") + add_feature_info(MZ_LIBCOMP MZ_LIBCOMP "Enables Apple compression") + add_feature_info(MZ_OPENSSL MZ_OPENSSL "Enables OpenSSL for encryption") ++add_feature_info(MZ_LIBBSD MZ_LIBBSD "Build with libbsd for random functionality") + add_feature_info(MZ_BRG MZ_BRG "Enables Brian Gladman's encryption library") + add_feature_info(MZ_SIGNING MZ_SIGNING "Enables zip signing support") + add_feature_info(MZ_COMPRESS_ONLY MZ_COMPRESS_ONLY "Only support compression") +-- +2.17.1 + diff --git a/libs/mtdev/Makefile b/libs/mtdev/Makefile index 0856aed2..60504102 100644 --- a/libs/mtdev/Makefile +++ b/libs/mtdev/Makefile @@ -8,19 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtdev -PKG_VERSION:=1.1.5 +PKG_VERSION:=1.1.6 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://bitmath.org/code/mtdev/ -PKG_HASH:=6677d5708a7948840de734d8b4675d5980d4561171c5a8e89e54adf7a13eba7f +PKG_HASH:=15d7b28da8ac71d8bc8c9287c2045fd174267bc740bec10cfda332dc1204e0e0 +PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Daniel Golle -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/libs/mxml/Makefile b/libs/mxml/Makefile index cc90ef72..a7ef3de7 100644 --- a/libs/mxml/Makefile +++ b/libs/mxml/Makefile @@ -1,19 +1,14 @@ -# -# Copyright (C) 2006-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - include $(TOPDIR)/rules.mk PKG_NAME:=mxml -PKG_VERSION:=2.10 +PKG_VERSION:=3.1 PKG_RELEASE:=1 -PKG_HASH:=267ff58b64ddc767170d71dab0c729c06f45e1df9a9b6f75180b564f09767891 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/michaelrsweet/mxml/releases/download/release-$(PKG_VERSION)/ +PKG_SOURCE_URL:=https://github.com/michaelrsweet/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/ +PKG_HASH:=1ac8d252f62f9dc2b2004518c70d2da313bdfcd92b8350e215f46064a34b52fc +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) + PKG_FIXUP:=autoreconf PKG_MAINTAINER:=Espen Jürgensen @@ -27,6 +22,7 @@ define Package/mxml CATEGORY:=Libraries TITLE:=Mini-XML URL:=http://www.minixml.org/ + DEPENDS:=+zlib endef define Package/mxml/description diff --git a/libs/mxml/patches/001-targets.patch b/libs/mxml/patches/001-targets.patch deleted file mode 100644 index 86379f02..00000000 --- a/libs/mxml/patches/001-targets.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -88,7 +88,7 @@ PUBLIBOBJS = mxml-attr.o mxml-entity.o m - mxml-index.o mxml-node.o mxml-search.o mxml-set.o - LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o - OBJS = mxmldoc.o testmxml.o $(LIBOBJS) --TARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml doc/mxml.man -+TARGETS = $(LIBMXML) - - - # diff --git a/libs/neon/Makefile b/libs/neon/Makefile index 5cf2e36e..87b9e2d0 100644 --- a/libs/neon/Makefile +++ b/libs/neon/Makefile @@ -8,14 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=neon -PKG_VERSION:=0.30.2 +PKG_VERSION:=0.31.1 PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.webdav.org/neon -PKG_HASH:=db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca +PKG_SOURCE_URL:=https://notroj.github.io/neon +PKG_HASH:=c9dfcee723050df37ce18ba449d7707b78e7ab8230f3a4c59d9112e17dc2718d + +PKG_MAINTAINER:=Federico Di Marco +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=src/COPYING.LIB +PKG_CPE_ID:=cpe:/a:webdav:neon PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -23,9 +29,8 @@ define Package/libneon SECTION:=libs CATEGORY:=Libraries TITLE:=HTTP and WebDAV client library - URL:=http://www.webdav.org/neon/ + URL:=https://notroj.github.io/neon/ DEPENDS:=+libopenssl +libexpat +zlib - MAINTAINER:=Federico Di Marco endef define Package/libneon/description @@ -42,21 +47,15 @@ define Package/libneon/description - WebDAV metadata support; wrappers for PROPFIND and PROPPATCH to simplify property manipulation. endef - -TARGET_CFLAGS += $(FPIC) -TARGET_CPPFLAGS += -D_GNU_SOURCE - CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --with-expat \ --with-ssl="openssl" \ --without-egd \ + --without-gssapi \ --without-libproxy -CONFIGURE_VARS += \ - LDFLAGS="$$$$LDFLAGS -lcrypto -lssl" - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/neon-config $(1)/usr/bin/ diff --git a/libs/neon/patches/010-openssl-deprecated.patch b/libs/neon/patches/010-openssl-deprecated.patch new file mode 100644 index 00000000..38f9159c --- /dev/null +++ b/libs/neon/patches/010-openssl-deprecated.patch @@ -0,0 +1,15 @@ +--- a/src/ne_openssl.c ++++ b/src/ne_openssl.c +@@ -230,10 +230,10 @@ void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert, + time_t *from, time_t *until) + { + if (from) { +- *from = asn1time_to_timet(X509_get_notBefore(cert->subject)); ++ *from = asn1time_to_timet(X509_get0_notBefore(cert->subject)); + } + if (until) { +- *until = asn1time_to_timet(X509_get_notAfter(cert->subject)); ++ *until = asn1time_to_timet(X509_get0_notAfter(cert->subject)); + } + } + diff --git a/libs/newt/Makefile b/libs/newt/Makefile new file mode 100644 index 00000000..dd4ddcb2 --- /dev/null +++ b/libs/newt/Makefile @@ -0,0 +1,125 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2011 SMBPhone Inc. +# Copyright (C) 2019 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=newt +PKG_VERSION:=0.52.21 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://releases.pagure.org/newt +PKG_HASH:=265eb46b55d7eaeb887fca7a1d51fe115658882dfe148164b6c49fccac5abb31 + +PKG_MAINTAINER:=Jeffery To +PKG_LICENSE:=LGPL-2.0-only +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:fedorahosted:newt + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 +PYTHON3_PKG_BUILD:=0 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../../lang/python/python3-package.mk + +define Package/newt/Default + TITLE:=Newt + URL:=https://pagure.io/newt +endef + +define Package/newt/Default/description + Newt is a programming library for color text mode, widget based user + interfaces. Newt can be used to add stacked windows, entry widgets, + checkboxes, radio buttons, labels, plain text fields, scrollbars, etc., + to text mode user interfaces. Newt is based on the slang library. +endef + +define Package/libnewt +$(call Package/newt/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE+= library + DEPENDS:=+libslang2 $(INTL_DEPENDS) +endef + +define Package/libnewt/description +$(call Package/newt/Default/description) +endef + +define Package/whiptail +$(call Package/newt/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Display dialog boxes from shell scripts + DEPENDS:=+libnewt +libpopt +libslang2 +endef + +define Package/whiptail/description + A lightweight replacement for the dialog command (dialog boxes from shell + scripts), based on libnewt. +endef + +define Package/python3-newt +$(call Package/newt/Default) + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE+= module for Python + DEPENDS:=+libnewt +python3-light +endef + +define Package/python3-newt/description +$(call Package/newt/Default/description) + + This is the Newt module for Python 3. +endef + +CONFIGURE_ARGS+= \ + --enable-largefile \ + --with-python=python$(PYTHON3_VERSION) \ + --without-tcl \ + --without-gpm-support \ + --with-colorsfile=/etc/newt/palette + +CONFIGURE_VARS += $(if $(CONFIG_BUILD_NLS),ac_cv_lib_c_gettext=no) + +MAKE_VARS+= PYTHON_CONFIG_PATH="$(STAGING_DIR)/host/bin" + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/newt.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnewt.{a,so*} $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnewt.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libnewt/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnewt.so* $(1)/usr/lib/ +endef + +define Package/whiptail/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whiptail $(1)/usr/bin/ +endef + +# Don't install files from usr/bin +Py3Package/python3-newt/install:=: + +$(eval $(call BuildPackage,libnewt)) +$(eval $(call BuildPackage,whiptail)) + +$(eval $(call Py3Package,python3-newt)) +$(eval $(call BuildPackage,python3-newt)) +$(eval $(call BuildPackage,python3-newt-src)) diff --git a/libs/newt/patches/002-use-target-ar-python-config.patch b/libs/newt/patches/002-use-target-ar-python-config.patch new file mode 100644 index 00000000..479567e8 --- /dev/null +++ b/libs/newt/patches/002-use-target-ar-python-config.patch @@ -0,0 +1,25 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -84,12 +84,7 @@ showkey: showkey.o $(LIBNEWT) + + _snack.$(SOEXT): snack.c $(LIBNEWTSH) + @[ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS); do \ +- pyconfig=$$ver-config; \ +- if ! $$pyconfig --cflags > /dev/null 2>&1 && \ +- python-config --cflags > /dev/null 2>&1; then \ +- echo $$pyconfig not found, using python-config; \ +- pyconfig=python-config; \ +- fi; \ ++ pyconfig=$(PYTHON_CONFIG_PATH)/$$ver-config; \ + mkdir -p $$ver; \ + PCFLAGS=`$$pyconfig --cflags`; \ + PIFLAGS=`$$pyconfig --includes`; \ +@@ -109,7 +104,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNE + $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) + + $(LIBNEWT): $(LIBOBJS) +- ar rv $@ $^ ++ $(AR) rv $@ $^ + + newt.o $(SHAREDDIR)/newt.o: newt.c Makefile + diff --git a/libs/newt/patches/python_memory_allocation.patch b/libs/newt/patches/python_memory_allocation.patch new file mode 100644 index 00000000..48f203d5 --- /dev/null +++ b/libs/newt/patches/python_memory_allocation.patch @@ -0,0 +1,35 @@ +Author: Thomas Viehmann +Description: Fix for python memory handling +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445392 +Last-Updated: 2014-06-11 +Forwarded: no + +--- a/snack.c ++++ b/snack.c +@@ -366,7 +366,7 @@ static PyTypeObject snackWidgetType = { + static snackWidget * snackWidgetNew (void) { + snackWidget * widget; + +- widget = PyObject_NEW(snackWidget, &snackWidgetType); ++ widget = PyObject_New(snackWidget, &snackWidgetType); + if (!widget) + return NULL; + +@@ -937,7 +937,7 @@ static snackForm * formCreate(PyObject * + if (help == Py_None) + help = NULL; + +- form = PyObject_NEW(snackForm, &snackFormType); ++ form = PyObject_New(snackForm, &snackFormType); + form->fo = newtForm(NULL, help, 0); + + return form; +@@ -949,7 +949,7 @@ static snackGrid * gridCreate(PyObject * + + if (!PyArg_ParseTuple(args, "ii", &cols, &rows)) return NULL; + +- grid = PyObject_NEW(snackGrid, &snackGridType); ++ grid = PyObject_New(snackGrid, &snackGridType); + grid->grid = newtCreateGrid(cols, rows); + + return grid; diff --git a/libs/nlohmannjson/Makefile b/libs/nlohmannjson/Makefile new file mode 100644 index 00000000..200f89ad --- /dev/null +++ b/libs/nlohmannjson/Makefile @@ -0,0 +1,38 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nlohmannjson +PKG_VERSION:=3.7.3 +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Leonid Esman +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.MIT + +PKG_BUILD_DIR:=$(BUILD_DIR)/json-$(PKG_VERSION) +PKG_SOURCE:=json-$(PKG_VERSION).zip +PKG_SOURCE_URL:=https://codeload.github.com/nlohmann/json/zip/v$(PKG_VERSION)? +PKG_HASH:=e109cd4a9d1d463a62f0a81d7c6719ecd780a52fb80a22b901ed5b6fe43fb45b + +include $(INCLUDE_DIR)/package.mk + +define Package/nlohmannjson + SECTION:=libs + CATEGORY:=Libraries + TITLE:=JSON for Modern C++ + URL:=https://nlohmann.github.io/json/ +endef + +define Package/nlohmannjson/description + Niels Lohmann's JSON headers-only library for modern C++ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/include/nlohmann $(1)/usr/include +endef + +$(eval $(call BuildPackage,nlohmannjson)) diff --git a/libs/nspr/Makefile b/libs/nspr/Makefile new file mode 100644 index 00000000..8d4c42ab --- /dev/null +++ b/libs/nspr/Makefile @@ -0,0 +1,87 @@ +# +# Copyright (C) 2019 Lucian Cristian +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=nspr +PKG_VERSION:=4.25 +PKG_RELEASE:=3 +PKG_MAINTAINER:=Lucian Cristian +PKG_LICENCE:=MPL-2.0 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:= \ + https://download.cdn.mozilla.net/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/ \ + https://archive.mozilla.org/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/ +PKG_HASH:=0bc309be21f91da4474c56df90415101c7f0c7c7cab2943cd943cd7896985256 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_PATH = ./nspr +MAKE_PATH = ./nspr +PKG_AUTOMAKE_PATHS = $(PKG_BUILD_DIR)/nspr +LBITS = $(shell $(TARGET_CC) -dM -E - +Date: Fri, 16 Nov 2018 13:52:49 +0800 +Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME + +Remove _BUILD_STRING and _BUILD_TIME to avoid +adding timestamp to _pl_bld.h which can result +in adding timestamp in library file such as +libnspr4.so. + $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so + [snip] + 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49 + [snip] + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu +--- + lib/ds/Makefile.in | 8 +------- + lib/libc/src/Makefile.in | 8 +------- + lib/prstreams/Makefile.in | 8 +------- + pr/src/Makefile.in | 8 +------- + 4 files changed, 4 insertions(+), 28 deletions(-) + +diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in +index e737791..b578476 100644 +--- a/nspr/lib/ds/Makefile.in ++++ b/nspr/lib/ds/Makefile.in +@@ -110,13 +110,7 @@ GARBAGE += $(TINC) + + $(TINC): + @$(MAKE_OBJDIR) +- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC) +- @if test ! -z "$(SH_NOW)"; then \ +- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \ +- else \ +- true; \ +- fi +- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC) ++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC) + + + $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) +diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in +index e8a6d9f..978ed28 100644 +--- a/nspr/lib/libc/src/Makefile.in ++++ b/nspr/lib/libc/src/Makefile.in +@@ -112,13 +112,7 @@ GARBAGE += $(TINC) + + $(TINC): + @$(MAKE_OBJDIR) +- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC) +- @if test ! -z "$(SH_NOW)"; then \ +- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \ +- else \ +- true; \ +- fi +- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC) ++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC) + + + $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) +diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in +index aeb2944..f318097 100644 +--- a/nspr/lib/prstreams/Makefile.in ++++ b/nspr/lib/prstreams/Makefile.in +@@ -110,13 +110,7 @@ endif + + $(TINC): + @$(MAKE_OBJDIR) +- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC) +- @if test ! -z "$(SH_NOW)"; then \ +- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \ +- else \ +- true; \ +- fi +- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC) ++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC) + + + $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC) +diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in +index 19c5a69..b4ac31c 100644 +--- a/nspr/pr/src/Makefile.in ++++ b/nspr/pr/src/Makefile.in +@@ -310,13 +310,7 @@ GARBAGE += $(TINC) + + $(TINC): + @$(MAKE_OBJDIR) +- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC) +- @if test ! -z "$(SH_NOW)"; then \ +- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \ +- else \ +- true; \ +- fi +- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC) ++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC) + + + $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC) +-- +2.7.4 + diff --git a/libs/nspr/patches/002-native_and_musl_fix.patch b/libs/nspr/patches/002-native_and_musl_fix.patch new file mode 100644 index 00000000..c5485dbf --- /dev/null +++ b/libs/nspr/patches/002-native_and_musl_fix.patch @@ -0,0 +1,23 @@ +--- a/nspr/config/config.mk 2017-10-31 13:13:22.692343122 +0200 ++++ b/nspr/config/config.mk 2017-10-31 13:13:58.758016378 +0200 +@@ -126,6 +126,9 @@ + + ifeq ($(USE_IPV6),1) + DEFINES += -D_PR_INET6 ++ifeq ($(MUSL),1) ++CFLAGS += -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO -D_PR_INET6_PROBE ++endif + endif + + ifeq ($(MOZ_UNICODE),1) +--- a/nspr/config/Makefile.in 2019-03-31 13:44:56.919871810 +0300 ++++ b/nspr/config/Makefile.in 2019-03-31 13:45:21.560545948 +0300 +@@ -30,7 +30,7 @@ + + # This version hasn't been ported for us; the one in mozilla/config has + ifneq ($(OS_ARCH),OS2) +-CSRCS += nsinstall.c ++#CSRCS += nsinstall.c + + PLSRCS = nfspwd.pl + endif diff --git a/libs/nspr/patches/010-sgidefs.patch b/libs/nspr/patches/010-sgidefs.patch new file mode 100644 index 00000000..2705a75d --- /dev/null +++ b/libs/nspr/patches/010-sgidefs.patch @@ -0,0 +1,11 @@ +--- a/nspr/pr/include/md/_linux.cfg ++++ b/nspr/pr/include/md/_linux.cfg +@@ -499,7 +499,7 @@ + #elif defined(__mips__) + + /* For _ABI64 */ +-#include ++#include + + #ifdef __MIPSEB__ + #define IS_BIG_ENDIAN 1 diff --git a/libs/nss/Makefile b/libs/nss/Makefile new file mode 100644 index 00000000..1aee9179 --- /dev/null +++ b/libs/nss/Makefile @@ -0,0 +1,155 @@ +# +# Copyright (C) 2019 Lucian Cristian +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=nss +PKG_VERSION:=3.53 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:= \ + https://download.cdn.mozilla.net/pub/security/$(PKG_NAME)/releases/NSS_$(subst .,_,$(PKG_VERSION))_RTM/src \ + https://archive.mozilla.org/pub/security/$(PKG_NAME)/releases/NSS_$(subst .,_,$(PKG_VERSION))_RTM/src +PKG_HASH:=08d36dc1a56325f02e626626d4eeab9c4d126dbd99dfaf419b91d0a696f58917 + +PKG_MAINTAINER:=Lucian Cristian +PKG_LICENCE:=MPL-2.0 +PKG_LICENSE_FILES:=nss/COPYING +PKG_CPE_ID:=cpe:/a:mozilla:network_security_services + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libnss + SECTION:=libs + SUBMENU:=SSL + CATEGORY:=Libraries + TITLE:=Mozilla's SSL and TLS implementation + URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS + DEPENDS:=+libpthread +libsqlite3 +nspr +endef + +define Package/nss-utils + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Utilities for Mozilla's SSL and TLS implementation + URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS + DEPENDS:=+libnss +endef + +define Package/libnss/description + Network Security Services (NSS) is a set of libraries designed to support + cross-platform development of security-enabled client and server applications. + Applications built with NSS can support SSL v2 and v3, TLS, PKCS 5, PKCS 7, + PKCS 11, PKCS 12, S/MIME, X.509 v3 certificates, and other security standards. +endef + +CONFIGURE_PATH = ./nss +MAKE_PATH = ./nss + +LBITS = $(shell $(TARGET_CC) -dM -E - *&F{wuccN{o(-@&vF*Mi2=rvIMnr}O+nF`U&7>vtSn_P&Rbs?}Ky8c(Wy zjHlCiaZ{VD-7zVX_dOET`quV08qKEvy)(=5Nl};AV#WCkI{QcIZ4Tp+IO%uabo%Gw zb$Tw&dfn5rlx8?M?!7wd9t=ch|F}PRE;4CfWnXPyLz+9NM^RTo&4ii>H)%)`Qiv$T z6m}^j6xtLr3b_q!wvuIJM@b$^mh+H{l4PSK`6x+7N|KY3WThl|DM@BZ4k^0jmFr_? zU21mL?5x>Yv$JMr&CZ&g4ObbiGF)Z2%5YW8*_g92XJgLBWtKf-_T1%>%ttXG%{$eS zYBldv^J+tBAFZg{N%A#3+VE(@qivFhlmlr@$fQC^bB9bSWKto|8uF|mf0u}BBX*0} zE#lf?5t-0LWa%XNI!POIl4fv{w&*17(@6s8BvC9SLveCZ#&}%sqAae;;>B{Ttd?VC zwHzy}THeW0!r{#>I zOpbCUp3t|IjGe}YCgyXi+by*cG}5N;l|Le%C-z2vk2!H?xfB*=900@8p2!H?xfB*HU&&_aBAa~B@8(POer3jZPkcWy z`P|6mo5q3cmM!kM!TvAiVe%S-c% z3-wjeY^*HS>WyPU|Gc`cqBpzpe$Fb^OQzAi(h0xnU+wA6R-dC=2)>@Ht*E=lBEG@m5HOG%a-ncl?zv!TW+o%6M@t(ecb|EzZ|N02klX` zt4bfM^s&kxX-L(j#-qlk<~TJ~YG$bksA=nFmZN0Ua-yURC8Og|ijowgB;_bcK}u4R zk`$#RWhqHvO0H2GFE3gjC)-iY$u=k3oNRNl&B-<=+nnt1EQe<~Jj>x(4$tzr*XLfJ zdwuTpqh8MRIrBJ=WFN&qHlL|2X|By@YV&GcsW)5E?zp5}heta++Tqc3%$tZD|PGg>UZ#vCSrupe|beSwim&tN;nJh<_Nv)fW)#XdMbkER%^-c=%+OriWV--Ir z@Ap?=`e(JJ(t1RHN6FE5l?iI5sKEvS2tWV=5P$##AOHafKmY;|fWWW{c#d009U<00Izz00bZa0SG_<0uUH}0X+W?|24)L zLI45~fB*y_009U<00Izz00ij&|2HRpH1roX2tWV=5P$##AOHafKmY;|fB*zuk3h>D zExFsdFN1#n`o?DG@A=!mz4-R0mFHhS{`aGMCw_gf{mystq@1=2M|VElc{X7l7&S-a z;q0N#(b>ECcfWb-&&$6&y8G8Z_h0;R>*tJVW~XMJ>|DC|(5t=u;D?(BCuVNYzyF() mPYwNr4FV8=00bZa0SG_<0uX=z1Rwx`ArdHzl*W_aDEtSkqPYeD literal 0 HcmV?d00001 diff --git a/libs/nss/files/system-pkcs11.txt b/libs/nss/files/system-pkcs11.txt new file mode 100644 index 00000000..1a264e9c --- /dev/null +++ b/libs/nss/files/system-pkcs11.txt @@ -0,0 +1,5 @@ +library= +name=NSS Internal PKCS #11 Module +parameters=configdir='sql:/etc/pki/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' +NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30}) + diff --git a/libs/nss/patches/001-nss_standalone.patch b/libs/nss/patches/001-nss_standalone.patch new file mode 100644 index 00000000..f24272bc --- /dev/null +++ b/libs/nss/patches/001-nss_standalone.patch @@ -0,0 +1,253 @@ +Submitted By: DJ Lucas +Date: 2016-12-27 +Initial Package Version: 3.12.4 +Upstream Status: Not applicable +Origin: Self, rediffed for nss-3.28. +Description: Adds auto-generated nss.pc and nss-config script, and + allows building without nspr in the source tree. + For 3.40.1, Requires: updated to nspr >= 4.20. + For 3.46.1, Requires: updated to nspr >= 4.21. + For 3.48, Requires: updated to nspr >= 4.24. + For 3.51.1, Requires: updated to nspr >= 4.25. + +diff -Naurp nss-3.28-orig/nss/Makefile nss-3.28/nss/Makefile +--- nss-3.28-orig/nss/Makefile 2016-12-21 05:56:27.000000000 -0600 ++++ nss-3.28/nss/Makefile 2016-12-26 22:24:52.695146032 -0600 +@@ -48,7 +48,6 @@ include $(CORE_DEPTH)/coreconf/rules.mk + ####################################################################### + + nss_build_all: +- $(MAKE) build_nspr + $(MAKE) all + $(MAKE) latest + +diff -Naurp nss-3.28-orig/nss/config/Makefile nss-3.28/nss/config/Makefile +--- nss-3.28-orig/nss/config/Makefile 1969-12-31 18:00:00.000000000 -0600 ++++ nss-3.28/nss/config/Makefile 2016-12-26 22:20:40.008205774 -0600 +@@ -0,0 +1,40 @@ ++CORE_DEPTH = .. ++DEPTH = .. ++ ++include $(CORE_DEPTH)/coreconf/config.mk ++ ++NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'` ++NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'` ++NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'` ++PREFIX = /usr ++ ++all: export libs ++ ++export: ++ # Create the nss.pc file ++ mkdir -p $(DIST)/lib/pkgconfig ++ sed -e "s,@prefix@,$(PREFIX)," \ ++ -e "s,@exec_prefix@,\$${prefix}," \ ++ -e "s,@libdir@,\$${prefix}/lib," \ ++ -e "s,@includedir@,\$${prefix}/include/nss," \ ++ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \ ++ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \ ++ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \ ++ nss.pc.in > nss.pc ++ chmod 0644 nss.pc ++ ln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig ++ ++ # Create the nss-config script ++ mkdir -p $(DIST)/bin ++ sed -e "s,@prefix@,$(PREFIX)," \ ++ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \ ++ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \ ++ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \ ++ nss-config.in > nss-config ++ chmod 0755 nss-config ++ ln -sf ../../../nss/config/nss-config $(DIST)/bin ++ ++libs: ++ ++dummy: all export libs ++ +diff -Naurp nss-3.28-orig/nss/config/nss-config.in nss-3.28/nss/config/nss-config.in +--- nss-3.28-orig/nss/config/nss-config.in 1969-12-31 18:00:00.000000000 -0600 ++++ nss-3.28/nss/config/nss-config.in 2016-12-26 22:20:40.008205774 -0600 +@@ -0,0 +1,153 @@ ++#!/bin/sh ++ ++prefix=@prefix@ ++ ++major_version=@NSS_MAJOR_VERSION@ ++minor_version=@NSS_MINOR_VERSION@ ++patch_version=@NSS_PATCH_VERSION@ ++ ++usage() ++{ ++ cat <&2 ++fi ++ ++lib_nss=yes ++lib_nssutil=yes ++lib_smime=yes ++lib_ssl=yes ++lib_softokn=yes ++ ++while test $# -gt 0; do ++ case "$1" in ++ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; ++ *) optarg= ;; ++ esac ++ ++ case $1 in ++ --prefix=*) ++ prefix=$optarg ++ ;; ++ --prefix) ++ echo_prefix=yes ++ ;; ++ --exec-prefix=*) ++ exec_prefix=$optarg ++ ;; ++ --exec-prefix) ++ echo_exec_prefix=yes ++ ;; ++ --includedir=*) ++ includedir=$optarg ++ ;; ++ --includedir) ++ echo_includedir=yes ++ ;; ++ --libdir=*) ++ libdir=$optarg ++ ;; ++ --libdir) ++ echo_libdir=yes ++ ;; ++ --version) ++ echo ${major_version}.${minor_version}.${patch_version} ++ ;; ++ --cflags) ++ echo_cflags=yes ++ ;; ++ --libs) ++ echo_libs=yes ++ ;; ++ nss) ++ lib_nss=yes ++ ;; ++ nssutil) ++ lib_nssutil=yes ++ ;; ++ smime) ++ lib_smime=yes ++ ;; ++ ssl) ++ lib_ssl=yes ++ ;; ++ softokn) ++ lib_softokn=yes ++ ;; ++ *) ++ usage 1 1>&2 ++ ;; ++ esac ++ shift ++done ++ ++# Set variables that may be dependent upon other variables ++if test -z "$exec_prefix"; then ++ exec_prefix=`pkg-config --variable=exec_prefix nss` ++fi ++if test -z "$includedir"; then ++ includedir=`pkg-config --variable=includedir nss` ++fi ++if test -z "$libdir"; then ++ libdir=`pkg-config --variable=libdir nss` ++fi ++ ++if test "$echo_prefix" = "yes"; then ++ echo $prefix ++fi ++ ++if test "$echo_exec_prefix" = "yes"; then ++ echo $exec_prefix ++fi ++ ++if test "$echo_includedir" = "yes"; then ++ echo $includedir ++fi ++ ++if test "$echo_libdir" = "yes"; then ++ echo $libdir ++fi ++ ++if test "$echo_cflags" = "yes"; then ++ echo -I$includedir ++fi ++ ++if test "$echo_libs" = "yes"; then ++ libdirs="-L$libdir" ++ if test -n "$lib_nss"; then ++ libdirs="$libdirs -lnss${major_version}" ++ fi ++ if test -n "$lib_nssutil"; then ++ libdirs="$libdirs -lnssutil${major_version}" ++ fi ++ if test -n "$lib_smime"; then ++ libdirs="$libdirs -lsmime${major_version}" ++ fi ++ if test -n "$lib_ssl"; then ++ libdirs="$libdirs -lssl${major_version}" ++ fi ++ if test -n "$lib_softokn"; then ++ libdirs="$libdirs -lsoftokn${major_version}" ++ fi ++ echo $libdirs ++fi ++ +diff -Naurp nss-3.28-orig/nss/config/nss.pc.in nss-3.28/nss/config/nss.pc.in +--- nss-3.28-orig/nss/config/nss.pc.in 1969-12-31 18:00:00.000000000 -0600 ++++ nss-3.28/nss/config/nss.pc.in 2016-12-26 22:22:53.300694346 -0600 +@@ -0,0 +1,12 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: NSS ++Description: Network Security Services ++Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@ ++Requires: nspr >= 4.25 ++Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@ ++Cflags: -I${includedir} ++ +diff -Naurp nss-3.28-orig/nss/manifest.mn nss-3.28/nss/manifest.mn +--- nss-3.28-orig/nss/manifest.mn 2016-12-21 05:56:27.000000000 -0600 ++++ nss-3.28/nss/manifest.mn 2016-12-26 22:24:12.278991843 -0600 +@@ -10,7 +10,7 @@ IMPORTS = nspr20/v4.8 \ + + RELEASE = nss + +-DIRS = coreconf lib cmd cpputil gtests ++DIRS = coreconf lib cmd cpputil config + + lib: coreconf + cmd: lib + diff --git a/libs/nss/patches/002-os_test.patch b/libs/nss/patches/002-os_test.patch new file mode 100644 index 00000000..ce2b683d --- /dev/null +++ b/libs/nss/patches/002-os_test.patch @@ -0,0 +1,18 @@ +--- a/nss/coreconf/arch.mk 2019-04-01 22:20:32.470080052 +0300 ++++ b/nss/coreconf/arch.mk 2019-04-01 22:21:01.730987548 +0300 +@@ -20,13 +20,13 @@ + # Macros for getting the OS architecture + # + +-OS_ARCH := $(subst /,_,$(shell uname -s)) ++OS_ARCH ?= $(subst /,_,$(shell uname -s)) + + # + # Attempt to differentiate between sparc and x86 Solaris + # + +-OS_TEST := $(shell uname -m) ++OS_TEST ?= $(shell uname -m) + ifeq ($(OS_TEST),i86pc) + OS_RELEASE := $(shell uname -r)_$(OS_TEST) + else diff --git a/libs/nss/patches/003-openwrt_fix.patch b/libs/nss/patches/003-openwrt_fix.patch new file mode 100644 index 00000000..9f75850f --- /dev/null +++ b/libs/nss/patches/003-openwrt_fix.patch @@ -0,0 +1,86 @@ +--- a/nss/lib/dbm/src/dirent.h 2017-10-19 17:15:14.797053528 +0300 ++++ b/nss/lib/dbm/src/dirent.h 2017-10-19 17:15:26.156310432 +0300 +@@ -30,7 +30,7 @@ + #define MAXNAMLEN FILENAME_MAX + + #else +-#include ++#include + #endif + #endif + +--- a/nss/coreconf/rules.mk 2019-03-31 22:39:06.741609534 +0300 ++++ b/nss/coreconf/rules.mk 2019-03-31 22:36:13.260356949 +0300 +@@ -261,7 +261,7 @@ + ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) + $(AR) $(subst /,\\,$(OBJS)) + else +- $(AR) $(OBJS) ++ $(AR) rcs $@ $(OBJS) + endif + $(RANLIB) $@ + +--- a/nss/coreconf/arch.mk 2019-03-31 23:38:34.374931416 +0300 ++++ b/nss/coreconf/arch.mk 2019-03-31 23:38:44.667236102 +0300 +@@ -334,7 +334,7 @@ + OBJDIR_NAME_COMPILER = $(COMPILER_TAG) + endif + OBJDIR_NAME_BASE = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(OBJDIR_NAME_COMPILER)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG) +-OBJDIR_NAME = $(OBJDIR_NAME_BASE).OBJ ++OBJDIR_NAME = build_dir + + + ifeq (,$(filter-out WIN%,$(OS_TARGET))) +--- a/nss/coreconf/Linux.mk 2019-04-01 10:08:59.129269177 +0300 ++++ b/nss/coreconf/Linux.mk 2019-04-01 10:09:15.557782574 +0300 +@@ -144,7 +144,8 @@ + DEFINES += -D_REENTRANT + endif + ++ifndef USE_NATIVE +-DSO_CFLAGS = -fPIC ++DSO_CFLAGS = $(fpic) + DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections + # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8) + # incorrectly reports undefined references in the libraries we link with, so +@@ -154,6 +155,7 @@ + ZDEFS_FLAG = -Wl,-z,defs + DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) + LDFLAGS += $(ARCHFLAG) -z noexecstack ++endif + + # On Maemo, we need to use the -rpath-link flag for even the standard system + # library directories. +--- a/nss/coreconf/Linux.mk 2019-04-06 20:25:36.431663894 +0300 ++++ b/nss/coreconf/Linux.mk 2019-04-06 20:26:23.397129525 +0300 +@@ -108,11 +108,6 @@ + endif + + ifdef BUILD_OPT +-ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE)) +- OPTIMIZER = -Os +-else +- OPTIMIZER = -O2 +-endif + ifdef MOZ_DEBUG_SYMBOLS + ifdef MOZ_DEBUG_FLAGS + OPTIMIZER += $(MOZ_DEBUG_FLAGS) +@@ -192,7 +192,7 @@ + endif + endif + +-MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH) ++MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH) $(fpic) -Wl,--gc-sections,--as-needed + + ifdef MAPFILE + MKSHLIB += -Wl,--version-script,$(MAPFILE) +--- a/nss/coreconf/UNIX.mk 2019-04-06 20:34:24.284157646 +0300 ++++ b/nss/coreconf/UNIX.mk 2019-04-06 20:34:34.760485327 +0300 +@@ -10,7 +10,6 @@ + LDOPTS += -L$(SOURCE_LIB_DIR) + + ifdef BUILD_OPT +- OPTIMIZER += -O + DEFINES += -UDEBUG -DNDEBUG + else + OPTIMIZER += -g diff --git a/libs/nss/patches/010-nanosleep.patch b/libs/nss/patches/010-nanosleep.patch new file mode 100644 index 00000000..564a6291 --- /dev/null +++ b/libs/nss/patches/010-nanosleep.patch @@ -0,0 +1,33 @@ +--- a/nss/lib/freebl/stubs.c ++++ b/nss/lib/freebl/stubs.c +@@ -503,7 +503,8 @@ extern PRStatus + PR_Sleep_stub(PRIntervalTime ticks) + { + STUB_SAFE_CALL1(PR_Sleep, ticks); +- usleep(ticks * 1000); ++ const struct timespec req = {0, ticks * 1000 * 1000}; ++ nanosleep(&req, NULL); + return PR_SUCCESS; + } + +--- a/nss/lib/sqlite/sqlite3.c ++++ b/nss/lib/sqlite/sqlite3.c +@@ -39626,7 +39626,8 @@ static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){ + + if( nTries==1 ){ + conchModTime = buf.st_mtimespec; +- usleep(500000); /* wait 0.5 sec and try the lock again*/ ++ const struct timespec req = {0, 500 * 1000 * 1000}; ++ nanosleep(&req, NULL); /* wait 0.5 sec and try the lock again*/ + continue; + } + +@@ -39652,7 +39653,7 @@ static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){ + /* don't break the lock on short read or a version mismatch */ + return SQLITE_BUSY; + } +- usleep(10000000); /* wait 10 sec and try the lock again */ ++ sleep(10); /* wait 10 sec and try the lock again */ + continue; + } + diff --git a/libs/oniguruma/Makefile b/libs/oniguruma/Makefile index f782705b..62b325ee 100644 --- a/libs/oniguruma/Makefile +++ b/libs/oniguruma/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=oniguruma -PKG_VERSION:=6.9.3 -PKG_RELEASE:=1 +PKG_VERSION:=6.9.5_rev1 +PKG_RELEASE:=3 -PKG_SOURCE:=onig-$(PKG_VERSION).tar.gz +PKG_SOURCE:=onig-v$(subst _,-,$(PKG_VERSION)).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/kkos/oniguruma/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=dc6dec742941e24b761cea1b9a2f12e750879107ae69fd80ae1046459d4fb1db +PKG_HASH:=e0c2212102fa4146c43b6c4f2f7727a84fd055cc2109c293d64298cef0c372b5 PKG_MAINTAINER:=Eneas U de Queiroz PKG_LICENSE:=BSD-2-Clause @@ -22,6 +22,8 @@ PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk +CONFIGURE_ARGS += --enable-posix-api + define Package/oniguruma SECTION:=libs CATEGORY:=Libraries diff --git a/libs/open-vm-tools/Makefile b/libs/open-vm-tools/Makefile deleted file mode 100644 index cb3f9149..00000000 --- a/libs/open-vm-tools/Makefile +++ /dev/null @@ -1,117 +0,0 @@ -# -# Copyright (C) 2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=open-vm-tools -PKG_VERSION:=11.0.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-15389592.tar.gz -PKG_SOURCE_URL:=https://github.com/vmware/open-vm-tools/releases/download/stable-$(PKG_VERSION) -PKG_HASH:=fc5ed2d752af33775250e0f103d622c0031d578f8394511617d2619b124dfc42 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-15389592 -PKG_INSTALL:=1 - -PKG_BUILD_DEPENDS:=glib2/host - -PKG_FIXUP:=autoreconf -PKG_LICENSE:=LGPL-2.1-or-later -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/open-vm-tools - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=@TARGET_x86 +glib2 +libpthread +libtirpc - TITLE:=open-vm-tools - URL:=https://github.com/vmware/open-vm-tools - MAINTAINER:=Yuhei OKAWA -endef - -define Package/open-vm-tools-vm-tools/description - Open Virtual Machine Tools for VMware guest OS -endef - - -CONFIGURE_ARGS+= \ - --without-icu \ - --disable-multimon \ - --disable-docs \ - --disable-tests \ - --without-gtkmm \ - --without-gtkmm3 \ - --without-xerces \ - --without-pam \ - --disable-grabbitmqproxy \ - --disable-vgauth \ - --disable-deploypkg \ - --without-root-privileges \ - --without-kernel-modules \ - --without-dnet \ - --with-tirpc \ - --without-x \ - --without-gtk2 \ - --without-gtk3 \ - --without-xerces \ - --enable-resolutionkms=no - - -define Package/open-vm-tools/install - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/vmtoolsd.init $(1)/etc/init.d/vmtoolsd - - $(INSTALL_DIR) $(1)/etc/vmware-tools/ - $(INSTALL_DATA) ./files/tools.conf $(1)/etc/vmware-tools/ - $(CP) $(PKG_INSTALL_DIR)/etc/vmware-tools $(1)/etc/ - - $(INSTALL_DIR) $(1)/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmtoolsd $(1)/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-checkvm $(1)/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-hgfsclient $(1)/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-namespace-cmd $(1)/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-rpctool $(1)/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-toolbox-cmd $(1)/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-xferlogs $(1)/bin/ - - $(INSTALL_DIR) $(1)/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mount.vmhgfs $(1)/sbin/ - $(INSTALL_BIN) ./files/shutdown $(1)/sbin/ - - $(INSTALL_DIR) $(1)/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libguestlib.so* $(1)/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhgfs.so* $(1)/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvmtools.so* $(1)/lib/ - - $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/common/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libhgfsServer.so $(1)/usr/lib/open-vm-tools/plugins/common/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libvix.so $(1)/usr/lib/open-vm-tools/plugins/common/ - - $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libguestInfo.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libpowerOps.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libvmbackup.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - - $(INSTALL_DIR) $(1)/etc/hotplug.d/block/ - $(INSTALL_BIN) ./files/vmware-scsi.hotplug $(1)/etc/hotplug.d/block/80-vmware-scsi - - $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/de/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/de/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/de/ - $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ko/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/ - $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/zh_CN/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/zh_CN/ - $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ja/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/ -endef - -$(eval $(call BuildPackage,open-vm-tools)) diff --git a/libs/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch b/libs/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch deleted file mode 100644 index 46feed5d..00000000 --- a/libs/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c ---- a/lib/hgfsServer/hgfsServerLinux.c -+++ b/lib/hgfsServer/hgfsServerLinux.c -@@ -5294,8 +5294,8 @@ - goto exit; - } - -- LOG(6, ("%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n", -- __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max)); -+ LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n", -+ __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max)); - - /* - * Check the offset is within the file size range. diff --git a/libs/open-vm-tools/patches/0014-resolve-musl-does-not-implement-res_ninit.patch b/libs/open-vm-tools/patches/0014-resolve-musl-does-not-implement-res_ninit.patch deleted file mode 100644 index 425d6eae..00000000 --- a/libs/open-vm-tools/patches/0014-resolve-musl-does-not-implement-res_ninit.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urNp open-vm-tools-11.0.5-15389592.ORG/lib/nicInfo/nicInfoPosix.c open-vm-tools-11.0.5-15389592/lib/nicInfo/nicInfoPosix.c ---- open-vm-tools-11.0.5-15389592.ORG/lib/nicInfo/nicInfoPosix.c 2020-01-20 15:12:46.004034669 +0000 -+++ open-vm-tools-11.0.5-15389592/lib/nicInfo/nicInfoPosix.c 2020-01-20 15:40:44.370425791 +0000 -@@ -65,6 +65,9 @@ - #include - #include - #include -+#if defined(__linux__) && !defined(__GLIBC__) -+#include "resolv_compat.h" -+#endif - - #ifdef __linux__ - # include -diff -urNp open-vm-tools-11.0.5-15389592.ORG/lib/nicInfo/resolv_compat.h open-vm-tools-11.0.5-15389592/lib/nicInfo/resolv_compat.h ---- open-vm-tools-11.0.5-15389592.ORG/lib/nicInfo/resolv_compat.h 1970-01-01 00:00:00.000000000 +0000 -+++ open-vm-tools-11.0.5-15389592/lib/nicInfo/resolv_compat.h 2020-01-20 15:39:09.397871457 +0000 -@@ -0,0 +1,29 @@ -+#if !defined(__GLIBC__) -+/*************************************************************************** -+ * resolv_compat.h -+ * -+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc -+ * Note: res_init() is actually deprecated according to -+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html -+ **************************************************************************/ -+#include -+ -+static inline int res_ninit(res_state statp) -+{ -+ int rc = res_init(); -+ if (statp != &_res) { -+ memcpy(statp, &_res, sizeof(*statp)); -+ } -+ return rc; -+} -+ -+static inline int res_nclose(res_state statp) -+{ -+ if (!statp) -+ return -1; -+ if (statp != &_res) { -+ memset(statp, 0, sizeof(*statp)); -+ } -+ return 0; -+} -+#endif diff --git a/libs/opencv/Makefile b/libs/opencv/Makefile deleted file mode 100644 index 612d0f59..00000000 --- a/libs/opencv/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright (C) 2013-2014 wrtnode.com -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=opencv -PKG_VERSION:=3.1.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip -PKG_SOURCE_URL:=http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(PKG_VERSION)/ -PKG_HASH:=1f6990249fdb82804fff40e96fa6d99949023ab0e3277eae4bd459b374e622a4 - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/opencv/Default/description - OpenCV (Open Source Computer Vision Library) is an open source computer - vision and machine learning software library. OpenCV was built to provide - a common infrastructure for computer vision applications and to accelerate - the use of machine perception in the commercial products. Being a - BSD-licensed product, OpenCV makes it easy for businesses to utilize - and modify the code. -endef - -define Package/opencv - SECTION:=libs - CATEGORY:=Libraries - TITLE:=OpenCV - URL:=http://opencv.org/ - MAINTAINER:=WRTnode Team - DEPENDS:=+libpthread +librt +libstdcpp +zlib +libjpeg -endef - -PKG_INSTALL:=1 - -CMAKE_OPTIONS += -DBUILD_opencv_gpu:BOOL=OFF \ - -DWITH_1394:BOOL=OFF -DBUILD_opencv_stitching:BOOL=OFF \ - -DBUILD_opencv_superres:BOOL=OFF -DBUILD_opencv_ts:BOOL=OFF \ - -DBUILD_opencv_highgui:BOOL=OFF \ - -DBUILD_opencv_videostab:BOOL=OFF \ - -DWITH_FFMPEG:BOOL=OFF \ - -DWITH_GSTREAMER:BOOL=OFF \ - -DWITH_LIBV4L:BOOL=OFF \ - -DWITH_PNG:BOOL=OFF \ - -DWITH_TIFF:BOOL=OFF \ - -DCMAKE_VERBOSE:BOOL=OFF \ - -DENABLE_PRECOMPILED_HEADERS=OFF - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/opencv $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/opencv2 $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencv* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opencv.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/opencv/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencv* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,opencv)) diff --git a/libs/opencv/README.md b/libs/opencv/README.md deleted file mode 100644 index a5cdcddf..00000000 --- a/libs/opencv/README.md +++ /dev/null @@ -1,23 +0,0 @@ -Introduction -=== - -#### OpenCV: Open Source Computer Vision Library.OpenCV is based on (open source) issued cross-platform computer vision library, you can run on Linux, Windows and Mac OS operating systems. - -#### Resources - -* Homepage: -* Docs: -* Q&A forum: -* Issue tracking: - -#### Contributing - -Please read before starting work on a pull request: - -Summary of guidelines: - -* One pull request per issue; -* Choose the right base branch; -* Include tests and documentation; -* Clean up "oops" commits before submitting; -* Follow the coding style guide. diff --git a/libs/openldap/patches/800-implicit.patch b/libs/openldap/patches/800-implicit.patch new file mode 100644 index 00000000..6a39d78b --- /dev/null +++ b/libs/openldap/patches/800-implicit.patch @@ -0,0 +1,10 @@ +--- a/libraries/libldap/tls2.c ++++ b/libraries/libldap/tls2.c +@@ -41,6 +41,7 @@ static tls_impl *tls_imp = &ldap_int_tls_impl; + #define HAS_TLS( sb ) ber_sockbuf_ctrl( sb, LBER_SB_OPT_HAS_IO, \ + (void *)tls_imp->ti_sbio ) + ++static int ldap_pvt_tls_check_hostname( LDAP *ld, void *s, const char *name_in ); + #endif /* HAVE_TLS */ + + #ifdef LDAP_DEVEL diff --git a/libs/opus/Makefile b/libs/opus/Makefile index 89456916..40b13f67 100644 --- a/libs/opus/Makefile +++ b/libs/opus/Makefile @@ -8,17 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=opus -PKG_VERSION:=1.2.1 -PKG_RELEASE:=1 +PKG_VERSION:=1.3.1 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus/ -PKG_HASH:=cfafd339ccd9c5ef8d6ab15d7e1a412c054bf4cb4ecbbbcc78c12ef2def70732 +PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus +PKG_HASH:=65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d +PKG_MAINTAINER:=Ted Hess , Ian Leonard PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Ted Hess , Ian Leonard +PKG_CPE_ID:=cpe:/a:opus-codec:opus +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -27,7 +29,7 @@ define Package/libopus SECTION:=libs CATEGORY:=Libraries TITLE:=OPUS Audio Codec - URL:=http://opus-codec.org/ + URL:=https://opus-codec.org endef define Package/libopus/description @@ -45,13 +47,12 @@ ifeq ($(CONFIG_SOFT_FLOAT),y) --enable-fixed-point endif -ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),) +ifneq ($(findstring neon,$(CONFIG_CPU_TYPE))$(findstring aarch64,$(CONFIG_ARCH)),) CONFIGURE_ARGS+= \ --enable-fixed-point endif CPU_ASM_BLACKLIST:=xscale arm926ej-s - ifneq ($(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),) CONFIGURE_ARGS+= --disable-asm endif diff --git a/libs/opusfile/Makefile b/libs/opusfile/Makefile new file mode 100644 index 00000000..c3b650b6 --- /dev/null +++ b/libs/opusfile/Makefile @@ -0,0 +1,53 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=opusfile +PKG_VERSION:=0.12 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/ +PKG_HASH:=118d8601c12dd6a44f52423e68ca9083cc9f2bfe72da7a8c1acb22a80ae3550b +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Eduardo Abinader + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libopusfile + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libogg +libopus +libopenssl + TITLE:=OPUS file library + URL:=http://opus-codec.org/ +endef + +define Package/libopusfile/description + The opusfile library provides seeking, decode, and playback of Opus streams in the Ogg container (.opus files) +endef + +CONFIGURE_ARGS += \ + --without-flac \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opusfile.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opusurl.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libopusfile/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libopusfile)) diff --git a/libs/p11-kit/Makefile b/libs/p11-kit/Makefile index c281c41f..960c9212 100644 --- a/libs/p11-kit/Makefile +++ b/libs/p11-kit/Makefile @@ -8,17 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=p11-kit -PKG_VERSION:=0.23.10 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Nikos Mavrogiannopoulos +PKG_VERSION:=0.23.20 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=f9212a3f225ef543e13fae9945527d66c0cbb67246320035dd94fab2bce5ae43 -PKG_SOURCE_URL:=https://github.com/p11-glue/$(PKG_NAME)/releases/download/$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/p11-glue/p11-kit/releases/download/$(PKG_VERSION) +PKG_HASH:=14d86024c3dfd6b967d9bc0b4ec7b2973014fe7423481f4d230a1a63b8aa6104 + +PKG_MAINTAINER:=Nikos Mavrogiannopoulos +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=meson/host include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk define Package/p11-kit SECTION:=libs @@ -34,15 +39,21 @@ define Package/p11-kit/description way that they are discoverable. endef -CONFIGURE_ARGS+= \ - --without-libffi \ - --disable-trust-module +TARGET_LDFLAGS += -Wl,--gc-sections + +MESON_ARGS += \ + -Dhash_impl=internal \ + -Dlibffi=disabled \ + -Dtrust_module=disabled \ + -Dstrict=false \ + -Dsystemd=disabled \ + -Dgtk_doc=false \ + -Dman=false define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/p11-kit-1/p11-kit/ $(CP) $(PKG_INSTALL_DIR)/usr/include/p11-kit-1/p11-kit/* $(1)/usr/include/p11-kit-1/p11-kit/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11-kit.so $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11-kit.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/p11-kit-1.pc $(1)/usr/lib/pkgconfig/p11-kit-1.pc @@ -51,9 +62,9 @@ endef define Package/p11-kit/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11-kit.so.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/etc/p11-kit/modules/ + $(INSTALL_DIR) $(1)/etc/pkcs11/modules/ ifneq ($(CONFIG_PACKAGE_libopensc),) - $(CP) ./files/opensc.module $(1)/etc/p11-kit/modules/ + $(CP) ./files/opensc.module $(1)/etc/pkcs11/modules/ endif endef diff --git a/libs/pcre/Config.in b/libs/pcre/Config.in new file mode 100644 index 00000000..15e75fc7 --- /dev/null +++ b/libs/pcre/Config.in @@ -0,0 +1,11 @@ +config PCRE_JIT_ENABLED + bool + depends on PACKAGE_libpcre && (arm || i386 || i686 || x86_64 || mips || mipsel || powerpc || sparc) + default y if (arm || i686 || x86_64) + prompt "Enable JIT compiler support" + help + Enable JIT (Just-In-Time) compiler support. + + Enabling this option can give an about 10x performance increase on JIT operations. It can be desireable for e.g. high performance Apache mod_rewrite or HA-Proxy reqrep operations. + + However, JIT should _only_ be enabled on architectures that are supported. Enabling JIT on unsupported platforms will result in a compilation failure. A list of supported architectures can be found here: https://pcre.org/original/doc/html/pcrejit.html#SEC3 . diff --git a/libs/pcre/Makefile b/libs/pcre/Makefile index a30dadf3..361a0b3b 100644 --- a/libs/pcre/Makefile +++ b/libs/pcre/Makefile @@ -8,27 +8,36 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcre -PKG_VERSION:=8.41 -PKG_RELEASE:=2 +PKG_VERSION:=8.44 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530 -PKG_MAINTAINER:=Thomas Heil +PKG_HASH:=19108658b23b3ec5058edc9f66ac545ea19f9537234be1ec62b714c84399366d +PKG_MAINTAINER:=Thomas Heil PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENCE - -PKG_FIXUP:=autoreconf +PKG_CPE_ID:=cpe:/a:pcre:pcre PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_CONFIG_DEPENDS:=\ + CONFIG_PACKAGE_libpcrecpp \ + CONFIG_PCRE_JIT_ENABLED + +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/libpcre/default SECTION:=libs CATEGORY:=Libraries - URL:=http://www.pcre.org/ + URL:=https://www.pcre.org/ +endef + +define Package/libpcre/config + source "$(SOURCE)/Config.in" endef define Package/libpcre @@ -44,7 +53,7 @@ endef define Package/libpcrecpp $(call Package/libpcre/default) TITLE:=C++ wrapper for Perl Compatible Regular Expression library - DEPENDS:=+libpcre +libstdcpp + DEPENDS:=+libpcre $(CXX_DEPENDS) endef TARGET_CFLAGS += $(FPIC) @@ -53,13 +62,9 @@ CONFIGURE_ARGS += \ --enable-utf8 \ --enable-unicode-properties \ --enable-pcre16 \ + $(if $(CONFIG_PCRE_JIT_ENABLED),--enable-jit,--disable-jit) \ --with-match-limit-recursion=16000 \ - -ifneq ($(CONFIG_PACKAGE_libpcrecpp),) - CONFIGURE_ARGS+= --enable-cpp -else - CONFIGURE_ARGS+= --disable-cpp -endif + $(if $(CONFIG_PACKAGE_libpcrecpp),--enable,--disable)-cpp MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" diff --git a/libs/pcre2/Config.in b/libs/pcre2/Config.in new file mode 100644 index 00000000..8777a4e8 --- /dev/null +++ b/libs/pcre2/Config.in @@ -0,0 +1,30 @@ +config PCRE2_JIT_ENABLED + bool + depends on PACKAGE_libpcre2 && (aarch64 || aarch64_be || arm || i386 || i686 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc || powerpc64 || powerpcle || sparc) + default y if (arm || i686 || x86_64) + prompt "Enable JIT compiler support" + help + Enable JIT (Just-In-Time) compiler support. + + Just-in-time compiling is a heavyweight optimization that can greatly + speed up pattern matching. However, it comes at the cost of extra + processing before the match is performed, so it is of most benefit when + the same pattern is going to be matched many times. This does not + necessarily mean many calls of a matching function; if the pattern is + not anchored, matching attempts may take place many times at various + positions in the subject, even for a single call. Therefore, if the + subject string is very long, it may still pay to use JIT even for + one-off matches. JIT support is available for all of the 8-bit, 16-bit + and 32-bit PCRE2 libraries and adds about 100KB to the resulting + libpcre2.so. JIT support applies only to the traditional Perl-compatible + matching function. It does not apply when the DFA matching function is + being used. + + Enabling this option can give an about 10x performance increase on JIT + operations. It can be desireable for e.g. high performance Apache + mod_rewrite or HA-Proxy reqrep operations. + + However, JIT should _only_ be enabled on architectures that are supported. + Enabling JIT on unsupported platforms will result in a compilation + failure. A list of supported architectures can be found here: + https://pcre.org/current/doc/html/pcre2jit.html#SEC2 diff --git a/libs/pcre2/Makefile b/libs/pcre2/Makefile index a6b079d3..8e0c1eda 100644 --- a/libs/pcre2/Makefile +++ b/libs/pcre2/Makefile @@ -8,27 +8,34 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcre2 -PKG_VERSION:=10.30 +PKG_VERSION:=10.35 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=90bd41c605d30e3745771eb81928d779f158081a51b2f314bbcc1f73de5773db -PKG_MAINTAINER:=Shane Peelar +PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION) +PKG_HASH:=9ccba8e02b0ce78046cdfb52e5c177f0f445e421059e43becca4359c669d4613 +PKG_MAINTAINER:=Shane Peelar PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENCE - -PKG_FIXUP:=autoreconf +PKG_CPE_ID:=cpe:/a:pcre:pcre PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS:=\ + CONFIG_PCRE2_JIT_ENABLED include $(INCLUDE_DIR)/package.mk define Package/libpcre2/default SECTION:=libs CATEGORY:=Libraries - URL:=http://www.pcre.org/ + URL:=https://www.pcre.org/ +endef + +define Package/libpcre2/config + source "$(SOURCE)/Config.in" endef define Package/libpcre2 @@ -51,7 +58,8 @@ TARGET_CFLAGS += $(FPIC) CONFIGURE_ARGS += \ --enable-pcre2-16 \ - --enable-pcre2-32 + --enable-pcre2-32 \ + $(if $(CONFIG_PCRE2_JIT_ENABLED),--enable-jit,--disable-jit) MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" diff --git a/libs/pixman/Makefile b/libs/pixman/Makefile index 76f5d984..97e8b7d9 100644 --- a/libs/pixman/Makefile +++ b/libs/pixman/Makefile @@ -8,18 +8,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pixman -PKG_VERSION:=0.34.0 +PKG_VERSION:=0.40.0 PKG_RELEASE:=1 + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e PKG_SOURCE_URL:=https://www.cairographics.org/releases +PKG_HASH:=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc + +PKG_MAINTAINER:=Yousong Zhou PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING + PKG_FIXUP:=autoreconf PKG_INSTALL:=1 -PKG_MAINTAINER:=Yousong Zhou +PKG_BUILD_DEPENDS:=meson/host include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk define Package/pixman diff --git a/libs/pixman/patches/0004-pixman-fix-detection-of-mips-dspr2.patch b/libs/pixman/patches/0004-pixman-fix-detection-of-mips-dspr2.patch index 1b37b02f..6ace9a36 100644 --- a/libs/pixman/patches/0004-pixman-fix-detection-of-mips-dspr2.patch +++ b/libs/pixman/patches/0004-pixman-fix-detection-of-mips-dspr2.patch @@ -1,6 +1,6 @@ --- a/configure.ac.orig 2016-11-22 20:44:21.205150763 +0800 +++ b/configure.ac 2016-11-22 20:44:55.505161500 +0800 -@@ -720,7 +720,6 @@ dnl Check if assembler is gas compatible +@@ -735,7 +735,6 @@ dnl Check if assembler is gas compatible have_mips_dspr2=no AC_MSG_CHECKING(whether to use MIPS DSPr2 assembler) xserver_save_CFLAGS=$CFLAGS diff --git a/libs/pixman/patches/0005-pixman-arm-neon-assembler-fix.patch b/libs/pixman/patches/0005-pixman-arm-neon-assembler-fix.patch deleted file mode 100644 index 4adaab6e..00000000 --- a/libs/pixman/patches/0005-pixman-arm-neon-assembler-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/pixman/pixman-private.h.orig 2016-11-22 22:10:33.574769654 +0800 -+++ b/pixman/pixman-private.h 2016-11-22 22:10:47.638774056 +0800 -@@ -1,5 +1,3 @@ --#include -- - #ifndef PIXMAN_PRIVATE_H - #define PIXMAN_PRIVATE_H - -@@ -17,6 +15,8 @@ - - #ifndef __ASSEMBLER__ - -+#include -+ - #ifndef PACKAGE - # error config.h must be included before pixman-private.h - #endif diff --git a/libs/poco/Makefile b/libs/poco/Makefile index 54041a44..1b97fb73 100644 --- a/libs/poco/Makefile +++ b/libs/poco/Makefile @@ -9,17 +9,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=poco -PKG_VERSION:=1.8.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 +PKG_VERSION:=1.9.0 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://pocoproject.org/releases/$(PKG_NAME)-$(PKG_VERSION) -PKG_HASH:=2e4c07ac73174ee06c7e2c7cf2b7642a5b3aea81d0203e1c069b32ac4a8ecfbc +ifeq ($(BUILD_VARIANT),all) +_PKG_VERSION:=${PKG_VERSION}-all +PKG_HASH:=b6e33898588e74337efec4e8d8b9b277bb653b08318a79215f9aa4a3ff1ea9fd +else +_PKG_VERSION:=${PKG_VERSION} +PKG_HASH:=a0a5a03d87c585f1a43def33bfc52c0c34a528e43a7b13bc83841a7c00adde39 +endif + +PKG_SOURCE:=$(PKG_NAME)-$(_PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://pocoproject.org/releases/$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=BSL-1.0 PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:pocoproject:poco +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(_PKG_VERSION) include $(INCLUDE_DIR)/package.mk @@ -27,9 +37,10 @@ define Package/poco SECTION:=libs CATEGORY:=Libraries TITLE:=Poco C++ libraries - URL:=http://www.pocoproject.org/ - DEPENDS:=+libstdcpp +libpthread +librt + URL:=https://www.pocoproject.org/ + DEPENDS:=+libstdcpp +libpthread +librt @!arc MAINTAINER:=Jean-Michel Julien + VARIANT:=minimal endef define Package/poco/description @@ -38,6 +49,22 @@ define Package/poco/description run on desktop, server and embedded systems. endef +define Package/poco-all + $(call Package/poco) + SECTION:=libs + CATEGORY:=Libraries + TITLE+=(Complete Edition) + DEPENDS+=+libopenssl + VARIANT:=all +endef + +define Package/poco-all/description + POrtable COmponents, a modern and powerful open source C++ class libraries + and frameworks for building network and internet-based applications that + run on desktop, server and embedded systems. The Complete Edition contains + all libraries. +endef + CONFIGURE_ARGS += \ --config=Linux \ --no-tests \ @@ -45,13 +72,27 @@ CONFIGURE_ARGS += \ --no-fpenvironment \ --no-sharedmemory \ --no-wstring \ - --poquito \ - --minimal \ --shared +ifeq ($(BUILD_VARIANT),all) + CONFIGURE_ARGS += \ + --typical + POCO_LIBS={Foundation,XML,JSON,Net,Util,Crypto,NetSSL,Encodings} +else + CONFIGURE_ARGS += \ + --poquito \ + --minimal + POCO_LIBS={Foundation,XML,JSON,Net,Util} +endif + define Package/poco/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco{Foundation,XML,JSON,Net,Util}.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco$(POCO_LIBS).so* $(1)/usr/lib/ +endef + +define Package/poco-all/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco$(POCO_LIBS).so* $(1)/usr/lib/ endef define Build/InstallDev @@ -59,7 +100,9 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/Poco $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco{Foundation,XML,JSON,Net,Util}.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco$(POCO_LIBS).so* $(1)/usr/lib/ endef + $(eval $(call BuildPackage,poco)) +$(eval $(call BuildPackage,poco-all)) diff --git a/libs/poco/patches/100-configure.patch b/libs/poco/patches/100-configure.patch index 1051dfc7..01ceb676 100644 --- a/libs/poco/patches/100-configure.patch +++ b/libs/poco/patches/100-configure.patch @@ -1,15 +1,15 @@ --- a/configure +++ b/configure -@@ -231,9 +231,9 @@ - ;; - - *) +@@ -237,9 +237,9 @@ while [ $# -ge 1 ]; do + ;; + + *) - showhelp - exit 1 - ;; +# showhelp +# exit 1 +# ;; - esac - - shift + esac + + shift diff --git a/libs/poco/patches/200-strerror.patch b/libs/poco/patches/200-strerror.patch index bd607549..0ff0ce5e 100644 --- a/libs/poco/patches/200-strerror.patch +++ b/libs/poco/patches/200-strerror.patch @@ -1,8 +1,8 @@ --- a/Foundation/src/Error.cpp +++ b/Foundation/src/Error.cpp @@ -70,7 +70,7 @@ namespace Poco { - - #if (_XOPEN_SOURCE >= 600) || POCO_ANDROID || __APPLE__ + + #if (_XOPEN_SOURCE >= 600) || POCO_OS == POCO_OS_ANDROID || __APPLE__ setMessage(strerror_r(err, _buffer, sizeof(_buffer))); -#elif _GNU_SOURCE +#elif (_GNU_SOURCE && (defined __GLIBC__ || defined __UCLIBC__)) diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index addaac4f..f7d8395a 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -5,10 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=postgresql -PKG_VERSION:=9.6.10 +PKG_VERSION:=12.3 PKG_RELEASE:=1 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=PostgreSQL +PKG_CPE_ID:=cpe:/a:postgresql:postgresql PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=\ @@ -16,12 +17,12 @@ PKG_SOURCE_URL:=\ http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \ ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION) -PKG_HASH:=8615acc56646401f0ede97a767dfd27ce07a8ae9c952afdb57163b7234fe8426 +PKG_HASH:=94ed64a6179048190695c86ec707cc25d016056ce10fc9d229267d9a8f1dcf41 PKG_USE_MIPS16:=0 PKG_FIXUP:=autoreconf PKG_MACRO_PATHS:=config -PKG_BUILD_DEPENDS += readline/host postgresql/host +PKG_BUILD_DEPENDS:=postgresql/host PKG_INSTALL:=1 include $(INCLUDE_DIR)/host-build.mk @@ -33,7 +34,7 @@ define Package/libpq DEPENDS:=+libpthread TITLE:=PostgreSQL client library URL:=http://www.postgresql.org/ - SUBMENU:=database + SUBMENU:=Database endef define Package/libpq/description @@ -46,7 +47,7 @@ define Package/pgsql-cli DEPENDS:=+libncursesw +libpq +libreadline +librt +zlib TITLE:=Command Line Interface (CLI) to PostgreSQL databases URL:=http://www.postgresql.org/ - SUBMENU:=database + SUBMENU:=Database endef define Package/pgsql-cli/description @@ -59,7 +60,7 @@ define Package/pgsql-cli-extra DEPENDS:=+libncursesw +libpq +libreadline +librt +zlib TITLE:=Command Line extras for PostgreSQL databases URL:=http://www.postgresql.org/ - SUBMENU:=database + SUBMENU:=Database endef define Package/pgsql-cli-extra/description @@ -72,7 +73,7 @@ define Package/pgsql-server DEPENDS:=+pgsql-cli TITLE:=PostgreSQL databases Server URL:=http://www.postgresql.org/ - SUBMENU:=database + SUBMENU:=Database USERID:=postgres=5432:postgres=5432 endef @@ -88,23 +89,19 @@ PGSQL_SERVER_BIN := \ pg_dump \ pg_dumpall \ pg_isready \ - pg_receivexlog \ pg_recvlogical \ - pg_resetxlog \ + pg_resetwal \ pg_restore \ pg_standby \ pg_upgrade \ - pg_xlogdump \ postgres \ initdb PGSQL_CLI_EXTRA_BIN := \ clusterdb \ createdb \ - createlang \ createuser \ dropdb \ - droplang \ dropuser \ pgbench \ reindexdb \ @@ -112,7 +109,9 @@ PGSQL_CLI_EXTRA_BIN := \ PGSQL_CONFIG_VARS:= \ pgac_cv_snprintf_long_long_int_format="%lld" \ - pgac_cv_snprintf_size_t_support=yes + pgac_cv_snprintf_size_t_support=yes \ + USE_DEV_URANDOM=1 \ + ZIC=zic ifeq ($(CONFIG_USE_UCLIBC),y) # PostgreSQL does not build against uClibc with locales @@ -137,6 +136,7 @@ HOST_CONFIGURE_ARGS += \ --without-python \ --without-readline \ --without-tcl \ + --without-systemd \ --with-zlib="yes" \ --enable-depend @@ -151,15 +151,17 @@ CONFIGURE_ARGS += \ --without-perl \ --without-python \ --without-tcl \ + --without-systemd \ --with-zlib="yes" \ --enable-depend \ $(if $(CONFIG_arc),--disable-spinlocks) -# Need a native ecpg, pg_config and zic for build +HOST_CFLAGS += -std=gnu99 + +# Need a native zic and pg_config for build define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)" - $(MAKE) -C $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc CC="$(HOSTCC)" - $(MAKE) -C $(HOST_BUILD_DIR)/src/timezone CC="$(HOSTCC)" + +$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)" + +$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/timezone CC="$(HOSTCC)" endef define Host/Install @@ -168,13 +170,11 @@ define Host/Install $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/port/libpgport.a $(STAGING_DIR_HOSTPKG)/lib/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR_HOSTPKG)/lib/ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR_HOSTPKG)/bin/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR_HOSTPKG)/bin/ endef -define Build/Configure - $(Build/Configure/Default) - $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR_HOSTPKG)/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) MAKELEVEL=0 all contrib endef # because PROFILE means something else in the project Makefile @@ -195,6 +195,10 @@ define Package/pgsql-cli-extra/install $(INSTALL_BIN) $(foreach bin,$(PGSQL_CLI_EXTRA_BIN),$(PKG_INSTALL_DIR)/usr/bin/$(bin)) $(1)/usr/bin/ endef +define Package/pgsql-server/conffiles +/etc/config/postgresql +endef + define Package/pgsql-server/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(foreach bin,$(PGSQL_SERVER_BIN),$(PKG_INSTALL_DIR)/usr/bin/$(bin)) $(1)/usr/bin/ diff --git a/libs/postgresql/files/postgresql.init b/libs/postgresql/files/postgresql.init index 959f3271..3d3dbadf 100644 --- a/libs/postgresql/files/postgresql.init +++ b/libs/postgresql/files/postgresql.init @@ -6,9 +6,6 @@ PROG=/usr/bin/postmaster USE_PROCD=1 -EXTRA_COMMANDS="status" -EXTRA_HELP=" status Show current status of the PostgreSQL server" - fix_hosts() { # make sure localhost (without a dot) is in /etc/hosts grep -q 'localhost$' /etc/hosts || echo '127.0.0.1 localhost' >> /etc/hosts @@ -71,7 +68,7 @@ stop_service() { /usr/bin/pg_ctl stop -U postgres -D "${pgdata}" -s } -status() { +status_service() { config_load "postgresql" config_get pgdata config PGDATA /usr/bin/pg_ctl status -U postgres -D "${pgdata}" diff --git a/libs/postgresql/patches/001-configure_fixes.patch b/libs/postgresql/patches/001-configure_fixes.patch index ece527cb..149189c4 100644 --- a/libs/postgresql/patches/001-configure_fixes.patch +++ b/libs/postgresql/patches/001-configure_fixes.patch @@ -1,11 +1,39 @@ --- a/configure.in +++ b/configure.in -@@ -25,7 +25,7 @@ recommended. You can remove the check f - your responsibility whether the result works or not.])]) - AC_COPYRIGHT([Copyright (c) 1996-2016, PostgreSQL Global Development Group]) - AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) --AC_CONFIG_AUX_DIR(config) -+AC_CONFIG_AUX_DIR([config]) - AC_PREFIX_DEFAULT(/usr/local/pgsql) - AC_SUBST(configure_args, [$ac_configure_args]) +@@ -2285,36 +2285,6 @@ if test "$with_python" = yes; then + CPPFLAGS=$ac_save_CPPFLAGS + fi +-# +-# Check for DocBook and tools +-# +-PGAC_PATH_XMLLINT +-PGAC_CHECK_DOCBOOK(4.2) +-PGAC_PATH_PROGS(DBTOEPUB, dbtoepub) +-PGAC_PATH_PROGS(XSLTPROC, xsltproc) +-PGAC_PATH_PROGS(FOP, fop) +- +-# +-# Check for test tools +-# +-if test "$enable_tap_tests" = yes; then +- # Check for necessary modules, unless user has specified the "prove" to use; +- # in that case it's her responsibility to have a working configuration. +- # (prove might be part of a different Perl installation than perl, eg on +- # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.) +- if test -z "$PROVE"; then +- # Test::More and Time::HiRes are supposed to be part of core Perl, +- # but some distros omit them in a minimal installation. +- AX_PROG_PERL_MODULES([IPC::Run Test::More=0.87 Time::HiRes], , +- [AC_MSG_ERROR([Additional Perl modules are required to run TAP tests])]) +- fi +- # Now make sure we know where prove is +- PGAC_PATH_PROGS(PROVE, prove) +- if test -z "$PROVE"; then +- AC_MSG_ERROR([prove not found]) +- fi +-fi +- + # Thread testing + + # We have to run the thread test near the end so we have all our symbols diff --git a/libs/postgresql/patches/200-ranlib.patch b/libs/postgresql/patches/200-ranlib.patch index 5232c74a..19d9357d 100644 --- a/libs/postgresql/patches/200-ranlib.patch +++ b/libs/postgresql/patches/200-ranlib.patch @@ -1,10 +1,10 @@ --- a/src/port/Makefile +++ b/src/port/Makefile -@@ -53,6 +53,7 @@ uninstall: +@@ -63,6 +63,7 @@ uninstall: libpgport.a: $(OBJS) rm -f $@ $(AR) $(AROPT) $@ $^ + $(RANLIB) libpgport.a - # thread.o needs PTHREAD_CFLAGS (but thread_srv.o does not) + # thread.o and thread_shlib.o need PTHREAD_CFLAGS (but thread_srv.o does not) thread.o: CFLAGS+=$(PTHREAD_CFLAGS) diff --git a/libs/postgresql/patches/300-fix-pc-file.patch b/libs/postgresql/patches/300-fix-pc-file.patch new file mode 100644 index 00000000..21ae3319 --- /dev/null +++ b/libs/postgresql/patches/300-fix-pc-file.patch @@ -0,0 +1,33 @@ +--- a/src/Makefile.shlib ++++ b/src/Makefile.shlib +@@ -396,14 +396,27 @@ endif # PORTNAME == cygwin || PORTNAME = + + + %.pc: $(MAKEFILE_LIST) +- echo 'Name: lib$(NAME)' >$@ ++ echo 'prefix=$(prefix)' >$@ ++ echo 'exec_prefix=$(exec_prefix)' >>$@ ++ifeq ($(patsubst $(prefix)/%,,$(includedir)),) ++ echo 'includedir=$${prefix}/$(patsubst $(prefix)/%,%,$(includedir))' >>$@ ++else ++ echo 'includedir=$(includedir)' >>$@ ++endif ++ifeq ($(patsubst $(exec_prefix)/%,,$(libdir)),) ++ echo 'libdir=$${exec_prefix}/$(patsubst $(exec_prefix)/%,%,$(libdir))' >>$@ ++else ++ echo 'libdir=$(libdir)' >>$@ ++endif ++ echo >>$@ ++ echo 'Name: lib$(NAME)' >>$@ + echo 'Description: PostgreSQL lib$(NAME) library' >>$@ + echo 'Url: http://www.postgresql.org/' >>$@ + echo 'Version: $(VERSION)' >>$@ + echo 'Requires: ' >>$@ + echo 'Requires.private: $(PKG_CONFIG_REQUIRES_PRIVATE)' >>$@ +- echo 'Cflags: -I$(includedir)' >>$@ +- echo 'Libs: -L$(libdir) -l$(NAME)' >>$@ ++ echo 'Cflags: -I$${includedir}' >>$@ ++ echo 'Libs: -L$${libdir} -l$(NAME)' >>$@ + # Record -L flags that the user might have passed in to the PostgreSQL + # build to locate third-party libraries (e.g., ldap, ssl). Filter out + # those that point inside the build or source tree. Use sort to diff --git a/libs/postgresql/patches/900-pg_ctl-setuid.patch b/libs/postgresql/patches/900-pg_ctl-setuid.patch index 5a7003c9..346d08b7 100644 --- a/libs/postgresql/patches/900-pg_ctl-setuid.patch +++ b/libs/postgresql/patches/900-pg_ctl-setuid.patch @@ -1,14 +1,14 @@ --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c -@@ -88,6 +88,7 @@ static char *event_source = NULL; - static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */ +@@ -93,6 +93,7 @@ static char *event_source = NULL; + static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */ static char *register_username = NULL; static char *register_password = NULL; +static char *username = ""; static char *argv0 = NULL; static bool allow_core_files = false; static time_t start_time; -@@ -1930,6 +1931,9 @@ do_help(void) +@@ -2047,6 +2048,9 @@ do_help(void) #endif printf(_(" -s, --silent only print errors, no informational messages\n")); printf(_(" -t, --timeout=SECS seconds to wait when using -w option\n")); @@ -16,17 +16,17 @@ + printf(_(" -U, --username=NAME user name of account PostgreSQL server is running as\n")); +#endif printf(_(" -V, --version output version information, then exit\n")); - printf(_(" -w wait until operation completes\n")); - printf(_(" -W do not wait until operation completes\n")); -@@ -2126,6 +2130,7 @@ main(int argc, char **argv) - {"pgdata", required_argument, NULL, 'D'}, + printf(_(" -w, --wait wait until operation completes (default)\n")); + printf(_(" -W, --no-wait do not wait until operation completes\n")); +@@ -2259,6 +2263,7 @@ main(int argc, char **argv) + {"options", required_argument, NULL, 'o'}, {"silent", no_argument, NULL, 's'}, {"timeout", required_argument, NULL, 't'}, + {"username", required_argument, NULL, 'U'}, {"core-files", no_argument, NULL, 'c'}, - {NULL, 0, NULL, 0} - }; -@@ -2166,20 +2171,6 @@ main(int argc, char **argv) + {"wait", no_argument, NULL, 'w'}, + {"no-wait", no_argument, NULL, 'W'}, +@@ -2299,20 +2304,6 @@ main(int argc, char **argv) } } @@ -47,7 +47,7 @@ env_wait = getenv("PGCTLTIMEOUT"); if (env_wait != NULL) -@@ -2265,11 +2256,15 @@ main(int argc, char **argv) +@@ -2399,11 +2390,15 @@ main(int argc, char **argv) wait_seconds_arg = true; break; case 'U': @@ -63,7 +63,7 @@ break; case 'w': do_wait = true; -@@ -2351,6 +2346,41 @@ main(int argc, char **argv) +@@ -2485,6 +2480,41 @@ main(int argc, char **argv) exit(1); } diff --git a/libs/protobuf-c/Makefile b/libs/protobuf-c/Makefile index 6199766c..42d48269 100644 --- a/libs/protobuf-c/Makefile +++ b/libs/protobuf-c/Makefile @@ -8,26 +8,29 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libprotobuf-c -PKG_VERSION:=1.3.1 -PKG_RELEASE:=1 +PKG_VERSION:=1.3.3 +PKG_RELEASE:=2 PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION) -PKG_HASH:=51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267 +PKG_HASH:=22956606ef50c60de1fabc13a78fbc50830a0447d780467d3c519f84ad527e78 PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION) -PKG_MAINTAINER:=Rosen Penev -PKG_LICENSE:=BSD-2c +PKG_MAINTAINER:= +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DEPENDS:=protobuf-c/host HOST_BUILD_DEPENDS:=protobuf/host +PKG_BUILD_DEPENDS:=protobuf -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +CMAKE_SOURCE_SUBDIR:=build-cmake include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk define Package/libprotobuf-c TITLE:=Protocol Buffers library @@ -43,23 +46,18 @@ define Package/libprotobuf-c/description internal RPC protocols and file formats. endef -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --disable-protoc +CMAKE_HOST_OPTIONS += \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_CXX_STANDARD=11 \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib" -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.{a,la,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ -endef +CMAKE_OPTIONS += \ + -DBUILD_SHARED_LIBS=ON define Package/libprotobuf-c/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libprotobuf-c)) diff --git a/libs/protobuf-c/patches/010-pkgconfig.patch b/libs/protobuf-c/patches/010-pkgconfig.patch new file mode 100644 index 00000000..932d5cf7 --- /dev/null +++ b/libs/protobuf-c/patches/010-pkgconfig.patch @@ -0,0 +1,40 @@ +--- a/build-cmake/CMakeLists.txt ++++ b/build-cmake/CMakeLists.txt +@@ -1,7 +1,10 @@ + SET(PACKAGE protobuf-c) + SET(PACKAGE_NAME protobuf-c) + SET(PACKAGE_VERSION 1.3.3) ++set(PACKAGE_URL https://github.com/protobuf-c/protobuf-c) ++set(PACKAGE_DESCRIPTION "Protocol Buffers implementation in C") + ++include(GNUInstallDirs) + + CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) + +@@ -141,6 +144,9 @@ IF(CMAKE_HOST_UNIX) + INSTALL(CODE "EXECUTE_PROCESS (COMMAND ln -sf protoc-gen-c protoc-c WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)") + ENDIF() + ++CONFIGURE_FILE ("libprotobuf-c.pc.in" "libprotobuf-c.pc" @ONLY) ++INSTALL (FILES "../libprotobuf-c.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ + INCLUDE(Dart) + + SET(DART_TESTING_TIMEOUT 5) +--- /dev/null ++++ b/build-cmake/libprotobuf-c.pc.in +@@ -0,0 +1,14 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_INSTALL_PREFIX@ ++bindir=${exec_prefix}/@CMAKE_INSTALL_BINDIR@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ ++ ++Name: @PACKAGE_NAME@ ++Version: @PACKAGE_VERSION@ ++Description: @PACKAGE_DESCRIPTION@ ++URL: @PACKAGE_URL@ ++Requires: ++Libs: -L${libdir} -lprotobuf-c ++Libs.private: ++Cflags: -I${includedir} diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile index c93527f0..0b9bab9e 100644 --- a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -8,31 +8,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=protobuf -PKG_VERSION:=3.5.1 -PKG_RELEASE:=1 +PKG_VERSION:=3.8.0 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION) -PKG_HASH:=c28dba8782da2cfea1e11c61d335958c31a9c1bc553063546af9cbe98f204092 +PKG_HASH:=ddc96d83f3b7417da53bce2510b94ad2796465ef8763f7a4e82089157efe97aa +PKG_MAINTAINER:=Ken Keys PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:google:protobuf -PKG_BUILD_DEPENDS:=protobuf/host -PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode - -PKG_INSTALL:=1 +HOST_BUILD_PARALLEL:=1 +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 +CMAKE_SOURCE_SUBDIR:=cmake include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk define Package/protobuf/Default SECTION:=libs CATEGORY:=Libraries TITLE:=A structured data encoding library URL:=https://github.com/google/protobuf - DEPENDS:=+zlib +libpthread +libstdcpp - MAINTAINER:=Ken Keys + DEPENDS:=+zlib +libpthread +libatomic +libstdcpp endef define Package/protobuf @@ -65,20 +67,28 @@ This package provides the libprotobuf-lite library. endef -CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc +CMAKE_HOST_OPTIONS += \ + -Dprotobuf_BUILD_PROTOC_BINARIES=ON \ + -Dprotobuf_BUILD_TESTS=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib" + +CMAKE_OPTIONS += \ + -Dprotobuf_BUILD_PROTOC_BINARIES=ON \ + -Dprotobuf_BUILD_TESTS=OFF \ + -Dprotobuf_WITH_ZLIB=ON \ + -DBUILD_SHARED_LIBS=ON + +TARGET_LDFLAGS += -latomic $(if $(CONFIG_USE_GLIBC),-lm) define Build/InstallDev - $(INSTALL_DIR) \ - $(1)/usr/lib \ - $(1)/usr/include - - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/* \ - $(1)/usr/include/ - - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/* \ - $(1)/usr/lib/ + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/protobuf.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/protobuf.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/protobuf-lite.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/protobuf-lite.pc endef define Package/protobuf-lite/install diff --git a/libs/protobuf/patches/010-rpath.patch b/libs/protobuf/patches/010-rpath.patch new file mode 100644 index 00000000..70d27529 --- /dev/null +++ b/libs/protobuf/patches/010-rpath.patch @@ -0,0 +1,24 @@ +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -16,8 +16,8 @@ foreach(_library ${_protobuf_libraries}) + $ + $) + if (UNIX AND NOT APPLE) +- set_property(TARGET ${_library} +- PROPERTY INSTALL_RPATH "$ORIGIN") ++# set_property(TARGET ${_library} ++# PROPERTY INSTALL_RPATH "$ORIGIN") + elseif (APPLE) + set_property(TARGET ${_library} + PROPERTY INSTALL_RPATH "@loader_path") +@@ -32,8 +32,8 @@ if (protobuf_BUILD_PROTOC_BINARIES) + install(TARGETS protoc EXPORT protobuf-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) + if (UNIX AND NOT APPLE) +- set_property(TARGET protoc +- PROPERTY INSTALL_RPATH "$ORIGIN/../lib") ++# set_property(TARGET protoc ++# PROPERTY INSTALL_RPATH "$ORIGIN/../lib") + elseif (APPLE) + set_property(TARGET protoc + PROPERTY INSTALL_RPATH "@loader_path/../lib") diff --git a/libs/psqlodbc/Makefile b/libs/psqlodbc/Makefile index 5092b874..4bb3b858 100644 --- a/libs/psqlodbc/Makefile +++ b/libs/psqlodbc/Makefile @@ -5,27 +5,29 @@ include $(TOPDIR)/rules.mk PKG_NAME:=psqlodbc -PKG_RELEASE:=1 -PKG_VERSION:=09.06.0310 -PKG_HASH:=6c42078af094d61baca2c8bd1dc4d137a77377198ef94e4eda5989bdce3474c3 +PKG_VERSION:=11.00.0000 +PKG_RELEASE:=2 -PKG_SOURCE_URL:=https://ftp.postgresql.org/pub/odbc/versions/src/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://ftp.postgresql.org/pub/odbc/versions/src +PKG_HASH:=703e6b87022f95ffa00d9f86c8f0a877f8a55b9b3be0942081f382e794112a86 -PKG_LICENSE:=LGPL-2.0+ +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.0-or-later PKG_LICENSE_FILES:=license.txt -PKG_INSTALL:=1 PKG_BUILD_DEPENDS:=unixodbc/host +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk CONFIGURE_ARGS += \ - --with-unixodbc=$(STAGING_DIR)/usr \ + --with-unixodbc=$(STAGING_DIR_HOST)/bin/odbc_config \ --with-libpq=$(STAGING_DIR)/usr define Package/psqlodbc/Default - SUBMENU:=database + SUBMENU:=Database URL:=https://odbc.postgresql.org/ SECTION:=libs CATEGORY:=Libraries diff --git a/libs/pthsem/Makefile b/libs/pthsem/Makefile index 9ab8a09f..5ce4f53d 100644 --- a/libs/pthsem/Makefile +++ b/libs/pthsem/Makefile @@ -9,16 +9,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pthsem PKG_VERSION:=2.0.8 -PKG_RELEASE:=5 - -PKG_MAINTAINER:=Othmar Truniger -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.auto.tuwien.ac.at/~mkoegler/pth/ PKG_HASH:=4024cafdd5d4bce2b1778a6be5491222c3f6e7ef1e43971264c451c0012c5c01 +PKG_MAINTAINER:=Othmar Truniger +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING + PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_FORTIFY_SOURCE:=0 @@ -40,7 +40,7 @@ endef # The musl libc provides a proper implementation of sigaltstack() so # prevent configure from wrongly assuming a broken Linux platform -ifeq ($(CONFIG_USE_MUSL),y) +ifneq ($(CONFIG_USE_GLIBC),y) CONFIGURE_VARS += \ ac_cv_check_sjlj=ssjlj endif diff --git a/libs/pugixml/Makefile b/libs/pugixml/Makefile new file mode 100644 index 00000000..7fcfed56 --- /dev/null +++ b/libs/pugixml/Makefile @@ -0,0 +1,51 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pugixml +PKG_VERSION:=1.10 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/zeux/pugixml/releases/download/v$(PKG_VERSION) +PKG_HASH:=55f399fbb470942410d348584dc953bcaec926415d3462f471ef350f29b5870a + +PKG_MAINTAINER:= +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/pugixml + SECTION:=libs + CATEGORY:=Libraries + TITLE:=pugixml + URL:=https://github.com/zeux/pugixml + DEPENDS:=+libstdcpp + BUILDONLY:=1 +endef + +define Package/pugixml/description + pugixml is a C++ XML processing library, which consists of a DOM-like interface + with rich traversal/modification capabilities, an extremely fast XML parser which + constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation + for complex data-driven tree queries. Full Unicode support is also available, + with Unicode interface variants and conversions between different Unicode encodings + (which happen automatically during parsing/saving). +endef + +TARGET_CXXFLAGS += -flto + +define Build/InstallDev + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/pugixml.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/pugixml.pc +endef + +$(eval $(call BuildPackage,pugixml)) diff --git a/libs/qrencode/Makefile b/libs/qrencode/Makefile index a6a4e2f2..be69f7b2 100644 --- a/libs/qrencode/Makefile +++ b/libs/qrencode/Makefile @@ -8,14 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qrencode -PKG_VERSION:=4.0.0 -PKG_RELEASE:=1 +PKG_VERSION:=4.0.2 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://fukuchi.org/works/qrencode/ -PKG_HASH:=c90035e16921117d4086a7fdee65aab85be32beb4a376f6b664b8a425d327d0b +PKG_SOURCE_URL:=https://fukuchi.org/works/qrencode +PKG_HASH:=c9cb278d3b28dcc36b8d09e8cad51c0eca754eb004cb0247d4703cb4472b58b4 + PKG_MAINTAINER:=Jonathan Bennett -PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE:=LGPL-2.1-or-later + +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf @@ -25,7 +28,7 @@ define Package/libqrencode SECTION:=libs CATEGORY:=Libraries TITLE:=Library for encoding data in a QR Code symbol - URL:=http://fukuchi.org/works/qrencode/ + URL:=https://fukuchi.org/works/qrencode/ endef define Package/libqrencode/description diff --git a/libs/quasselc/Makefile b/libs/quasselc/Makefile index 28d01c24..721d17ab 100644 --- a/libs/quasselc/Makefile +++ b/libs/quasselc/Makefile @@ -8,26 +8,24 @@ include $(TOPDIR)/rules.mk PKG_NAME:=quasselc +PKG_SOURCE_DATE:=2017-01-11 +PKG_SOURCE_VERSION:=a0a1e6bd87d3eac68b5369972d1c2035cfe47e94 +PKG_RELEASE:=3 -# quasselc upstream doesn't release versions (at least, at the moment), -# so use commit date for PKG_VERSION and embed commit hash into PKG_RELEASE. -PKG_VERSION:=2015-04-06 -PKG_SOURCE_VERSION:=fcd966966924e3d9af0954db56117e2f48767ea1 -PKG_RELEASE:=1.$(PKG_SOURCE_VERSION) - -PKG_LICENSE:=GPL-3.0+ - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/phhusson/QuasselC -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.bz2 -PKG_MIRROR_HASH:=80ca463c20f934a3730fb51c69f5299e2d35ca53a06f0ca746d3de97dbfc360b +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/phhusson/QuasselC/tar.gz/$(PKG_SOURCE_VERSION)? +PKG_HASH:=fe7b48a13c0e6dad81cdae18069d4f5607af64d73a3201f42d79548170dde510 +PKG_BUILD_DIR:=$(BUILD_DIR)/QuasselC-$(PKG_SOURCE_VERSION) PKG_MAINTAINER:=Ben Rosser +PKG_LICENSE:=LGPL-3.0 +PKG_LICENSE_FILES:=COPYING.LESSER +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk MAKE_FLAGS += prefix=$(STAGING_DIR)/usr libdir=$(STAGING_DIR)/usr/lib includedir=$(STAGING_DIR)/usr/include MAKE_INSTALL_FLAGS += prefix=/usr libdir=/usr/lib includedir=/usr/include @@ -45,6 +43,8 @@ define Package/quasselc/description An implementation of the Quassel protocol in pure C. endef +TARGET_LDFLAGS += -liconv + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/quasselc $(CP) $(PKG_INSTALL_DIR)/usr/include/quasselc/* $(1)/usr/include/quasselc/ diff --git a/libs/quasselc/patches/001-respect-cflags-ldflags.patch b/libs/quasselc/patches/001-respect-cflags-ldflags.patch index 7ffbb805..f6ddef03 100644 --- a/libs/quasselc/patches/001-respect-cflags-ldflags.patch +++ b/libs/quasselc/patches/001-respect-cflags-ldflags.patch @@ -1,5 +1,3 @@ -diff --git a/Makefile b/Makefile -index 7994eea..b1f8d83 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ prefix ?= /usr/local @@ -12,7 +10,20 @@ index 7994eea..b1f8d83 100644 VERSION = 0 INSTALL = install -LDLIBS:=$(shell pkg-config glib-2.0 --libs) -lz -+LDLIBS+=$(shell pkg-config glib-2.0 --libs) -lz ++LDFLAGS+=$(shell pkg-config glib-2.0 --libs) -lz BOTLIBS := -Wl,-rpath,. +@@ -15,10 +15,10 @@ lib_objects=setters.o getters.o main.o cmds.o negotiation.o io.o symbols.o + all: bot libquasselc.so.$(VERSION) quasselc.pc + + libquasselc.so.$(VERSION): $(lib_objects) +- $(CC) -shared -o $@ -Wl,-soname,libquasselc.so.$(SO_VERSION) $^ $(LDLIBS) ++ $(CC) -shared -o $@ -Wl,-soname,libquasselc.so.$(SO_VERSION) $^ $(LDFLAGS) + + bot: bot.o display.o libquasselc.so.$(VERSION) +- $(CC) -o $@ $^ $(LDLIBS) $(BOTLIBS) ++ $(CC) -o $@ $^ $(LDFLAGS) $(BOTLIBS) + + clean: + rm -f *.o bot libquasselc.so.$(VERSION) quasselc.pc diff --git a/libs/redis/Makefile b/libs/redis/Makefile new file mode 100644 index 00000000..4bc437f2 --- /dev/null +++ b/libs/redis/Makefile @@ -0,0 +1,99 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=redis +PKG_VERSION:=6.0.5 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://download.redis.io/releases/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=42cf86a114d2a451b898fcda96acd4d01062a7dbaaad2801d9164a36f898f596 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:pivotal_software:redis + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +MAKE_FLAGS+= \ + MALLOC="libc" \ + USE_JEMALLOC="no" \ + PREFIX="$(PKG_INSTALL_DIR)/usr" \ + ARCH="" + +TARGET_LDFLAGS += -latomic + +define Package/redis/Default + SUBMENU:=Database + SECTION:=libs + CATEGORY:=Libraries + URL:=https://redis.io +endef + +define Package/redis-server +$(call Package/redis/Default) + TITLE:=Redis server + DEPENDS:=+libpthread +libatomic +endef + +define Package/redis-cli +$(call Package/redis/Default) + TITLE:=Redis cli + DEPENDS+=+libatomic +endef + +define Package/redis-utils +$(call Package/redis/Default) + TITLE:=Redis utilities + DEPENDS:=+redis-server +endef + +define Package/redis-full +$(call Package/redis/Default) + TITLE:=All Redis binaries (server,cli and utils) + DEPENDS:=+redis-utils +redis-cli +endef + +define Package/redis-full/description + Redis is an open source, BSD licensed, advanced key-value cache and store. + It is often referred to as a data structure server since keys can contain + strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. +endef + +define Package/redis-server/conffiles +/etc/redis.conf +endef + +define Build/Compile + $(MAKE) -C "$(PKG_BUILD_DIR)/deps/hiredis" static $(MAKE_FLAGS) $(MAKE_VARS) + $(MAKE) -C "$(PKG_BUILD_DIR)/deps/linenoise" $(MAKE_FLAGS) $(MAKE_VARS) + $(MAKE) -C "$(PKG_BUILD_DIR)/deps/lua" posix $(MAKE_FLAGS) $(MAKE_VARS) AR="${AR} ru" + $(call Build/Compile/Default) +endef + +define Package/redis-server/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-server $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/redis.init $(1)/etc/init.d/redis + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/redis.conf $(1)/etc/ + $(SED) "s|^dir .*|dir /var/lib/redis|" $(1)/etc/redis.conf +endef + +define Package/redis-cli/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-cli $(1)/usr/bin/ +endef + +define Package/redis-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-{check-aof,benchmark} $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,redis-full)) +$(eval $(call BuildPackage,redis-server)) +$(eval $(call BuildPackage,redis-cli)) +$(eval $(call BuildPackage,redis-utils)) diff --git a/libs/redis/files/redis.init b/libs/redis/files/redis.init new file mode 100755 index 00000000..686514d7 --- /dev/null +++ b/libs/redis/files/redis.init @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 +START=95 +STOP=10 + +REDIS_BIN="/usr/bin/redis-server" +REDIS_CONFIG="/etc/redis.conf" +REDIS_PID="/var/run/redis.pid" +REDIS_DATA="/var/lib/redis" + +start_service() { + mkdir -p "$REDIS_DATA" + procd_open_instance redis + procd_set_param command "$REDIS_BIN" "$REDIS_CONFIG" + procd_close_instance +} diff --git a/libs/redis/patches/020-fix-atomicvar.patch b/libs/redis/patches/020-fix-atomicvar.patch new file mode 100644 index 00000000..ad6519e4 --- /dev/null +++ b/libs/redis/patches/020-fix-atomicvar.patch @@ -0,0 +1,22 @@ +Index: redis-5.0.0/src/atomicvar.h +=================================================================== +--- redis-5.0.0.orig/src/atomicvar.h ++++ redis-5.0.0/src/atomicvar.h +@@ -68,7 +68,7 @@ + * is reported. */ + // #define __ATOMIC_VAR_FORCE_SYNC_MACROS + +-#if !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__ATOMIC_RELAXED) && !defined(__sun) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057) ++#if defined(CONFIG_EDAC_ATOMIC_SCRUB) && !defined(__ATOMIC_VAR_FORCE_SYNC_MACROS) && defined(__ATOMIC_RELAXED) && !defined(__sun) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057) + /* Implementation using __atomic macros. */ + + #define atomicIncr(var,count) __atomic_add_fetch(&var,(count),__ATOMIC_RELAXED) +@@ -82,7 +82,7 @@ + #define atomicSet(var,value) __atomic_store_n(&var,value,__ATOMIC_RELAXED) + #define REDIS_ATOMIC_API "atomic-builtin" + +-#elif defined(HAVE_ATOMIC) ++#elif defined(CONFIG_EDAC_ATOMIC_SCRUB) && defined(HAVE_ATOMIC) + /* Implementation using __sync macros. */ + + #define atomicIncr(var,count) __sync_add_and_fetch(&var,(count)) \ No newline at end of file diff --git a/libs/redis/patches/030-fix-uclibc-compilation.patch b/libs/redis/patches/030-fix-uclibc-compilation.patch new file mode 100644 index 00000000..0fc39b02 --- /dev/null +++ b/libs/redis/patches/030-fix-uclibc-compilation.patch @@ -0,0 +1,25 @@ +--- a/src/config.h ++++ b/src/config.h +@@ -30,6 +30,10 @@ + #ifndef __CONFIG_H + #define __CONFIG_H + ++#if defined(__unix) || defined(__linux__) ++#include ++#endif ++ + #ifdef __APPLE__ + #include + #endif +@@ -62,9 +66,9 @@ + #endif + + /* Test for backtrace() */ +-#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || \ ++#if (defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || \ + defined(__FreeBSD__) || (defined(__OpenBSD__) && defined(USE_BACKTRACE))\ +- || defined(__DragonFly__) ++ || defined(__DragonFly__)) && !defined(__UCLIBC__) + #define HAVE_BACKTRACE 1 + #endif + diff --git a/libs/rpcsvc-proto/Makefile b/libs/rpcsvc-proto/Makefile index b392fcca..de903d32 100644 --- a/libs/rpcsvc-proto/Makefile +++ b/libs/rpcsvc-proto/Makefile @@ -1,21 +1,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rpcsvc-proto -PKG_RELEASE:=2 +PKG_VERSION:=1.4.1 +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/thkukuk/rpcsvc-proto.git -PKG_SOURCE_DATE:=2020-01-16 -PKG_SOURCE_VERSION:=daba1f3aa715551bd83770053a15153f0e40d27f -PKG_MIRROR_HASH:=38ac6ad69327d4498cebc5b97519210f0643a8c47a3a3409cbae01806631694b +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/thkukuk/rpcsvc-proto/releases/download/v$(PKG_VERSION) +PKG_HASH:=9429e143bb8dd33d34bf0663f571d4d4a1103e1afd7c49791b367b7ae1ef7f35 PKG_MAINTAINER:=Andy Walsh PKG_LICENSE:=BSD-3-clause PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=autogen.sh PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 HOST_BUILD_DEPENDS:=gettext-full/host PKG_BUILD_DEPENDS:=rpcsvc-proto/host diff --git a/libs/rxtx/Makefile b/libs/rxtx/Makefile deleted file mode 100644 index 93abdb59..00000000 --- a/libs/rxtx/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2016 Dana H. Myers -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rxtx -PKG_VERSION:=2.2pre2 -PKG_RELEASE:=1 -PKG_LICENSE:=LGPL-2.1 -PKG_MAINTAINER:=Dana H. Myers - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip -PKG_SOURCE_URL:=http://rxtx.qbang.org/pub/rxtx/ -PKG_HASH:=3c30373e760f444def3650c76c5a00ae12fb1d860ec008750d084f4880495b03 - -PKG_FIXUP:=patch-libtool -PKG_CHECK_FORMAT_SECURITY:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/rxtx - SECTION:=libs - CATEGORY:=Libraries - TITLE:=RX/TX Support for Java serial communications - URL:=http://rxtx.qbang.org/wiki/index.php/Main_Page - DEPENDS:=+libpthread -endef - -define Package/rxtx/description - RX/TX Support for Java serial communications -endef - -CONFIGURE_ARGS += \ - --disable-PRINTER - -define Package/rxtx/install - $(INSTALL_DIR) \ - $(1)/usr/lib/classpath - $(CP) $(PKG_BUILD_DIR)/$(GNU_TARGET_NAME)-gnu/.libs/*.so \ - $(1)/usr/lib/classpath/ - $(CP) $(PKG_BUILD_DIR)/RXTXcomm.jar \ - $(1)/usr/lib/classpath/ -endef - -$(eval $(call BuildPackage,rxtx)) diff --git a/libs/rxtx/patches/010-acm-devices.patch b/libs/rxtx/patches/010-acm-devices.patch deleted file mode 100755 index 3833c5cc..00000000 --- a/libs/rxtx/patches/010-acm-devices.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -rupN rxtx-2.2pre2/src/gnu/io/RXTXCommDriver.java rxtx-2.2pre2.new/src/gnu/io/RXTXCommDriver.java ---- rxtx-2.2pre2/src/gnu/io/RXTXCommDriver.java 2008-11-13 16:44:01.000000000 -0800 -+++ rxtx-2.2pre2.new/src/gnu/io/RXTXCommDriver.java 2015-08-21 16:19:14.330743949 -0700 -@@ -579,6 +579,7 @@ public class RXTXCommDriver implements C - "ttyUSB", // for USB frobs - "rfcomm", // bluetooth serial device - "ttyircomm", // linux IrCommdevices (IrDA serial emu) -+ "ttyACM" // linux CDC ACM devices - }; - CandidatePortPrefixes=Temp; - } diff --git a/libs/sbc/Makefile b/libs/sbc/Makefile index 684fcc5e..95f2b8c1 100644 --- a/libs/sbc/Makefile +++ b/libs/sbc/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sbc -PKG_VERSION:=1.3 +PKG_VERSION:=1.4 PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/ -PKG_HASH:=e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309 +PKG_HASH:=518bf46e6bb3dc808a95e1eabad26fdebe8a099c1e781c27ed7fca6c2f4a54c9 -PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING.LIB -PKG_MAINTAINER:=Dirk Neukirchen +PKG_MAINTAINER:= PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/libs/serdisplib/Makefile b/libs/serdisplib/Makefile new file mode 100644 index 00000000..07978d01 --- /dev/null +++ b/libs/serdisplib/Makefile @@ -0,0 +1,80 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=serdisplib +PKG_VERSION:=2.02 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/serdisplib +PKG_HASH:=447b74007dc157b0378044245649850b26432b9185b6540ff681fcb0765c4d8b + +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=GPL-2.0-or-later +PLG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=libusb-compat + +include $(INCLUDE_DIR)/package.mk + +define Package/serdisplib + SECTION:=libs + CATEGORY:=Libraries + TITLE:=serdisplib + URL:=http://serdisplib.sourceforge.net/ +endef + +define Package/serdisplib/description + serdisplib started as a library to drive serial displays with + built-in controllers. It can optionally dynamically link with + libusb-compat, libgd and libpthread, some features require having + those packages installed as well. +endef + +define Package/serdisplib-tools + SECTION:=utils + CATEGORY:=Utilities + TITLE:=serdisplib tools + URL:=http://serdisplib.sourceforge.net/ + DEPENDS:=+serdisplib +libgd +endef + +define Package/serdisplib-tools/description + serdisplib started as a library to drive serial displays with + built-in controllers. This package contains tools for serdisplib: + * l4m132c_tool + * l4m320t_tool + * multidisplay + * sdcmegtron_tool + * touchscreen_tool +endef + +CONFIGURE_ARGS += \ + --enable-dynloading \ + --disable-statictools + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/serdisplib + $(CP) $(PKG_INSTALL_DIR)/usr/include/serdisplib/*.h $(1)/usr/include/serdisplib + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libserdisp.{a,so*} $(1)/usr/lib/ +endef + +define Package/serdisplib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libserdisp.so* $(1)/usr/lib/ +endef + +define Package/serdisplib-tools/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l4m132c_tool $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l4m320t_tool $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/multidisplay $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sdcmegtron_tool $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/touchscreen_tool $(1)/usr/bin +endef + +$(eval $(call BuildPackage,serdisplib)) +$(eval $(call BuildPackage,serdisplib-tools)) diff --git a/libs/serdisplib/patches/002-allow-1bpp-framebuffer.patch b/libs/serdisplib/patches/002-allow-1bpp-framebuffer.patch new file mode 100644 index 00000000..ada4281e --- /dev/null +++ b/libs/serdisplib/patches/002-allow-1bpp-framebuffer.patch @@ -0,0 +1,21 @@ +--- a/src/serdisp_specific_framebuffer.c ++++ b/src/serdisp_specific_framebuffer.c +@@ -312,13 +312,15 @@ serdisp_t* serdisp_framebuffer_setup(con + + if (fb_success) { + /* check if colour mode is supported */ +- if (! (vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) { ++ if (! (vinfo.bits_per_pixel == 1 ||vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) { + sd_error(SERDISP_ERUNTIME, "unsupported colour depth (%d)", vinfo.bits_per_pixel); + fb_success = 0; + } + } +- +- dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8; ++ if (vinfo.bits_per_pixel == 1) ++ dd->scrbuf_size = (vinfo.xres * vinfo.yres) / 8; ++ else ++ dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8; + + if (fb_success) { + /* map framebuffer device to memory */ diff --git a/libs/serdisplib/patches/010-cross-compile.patch b/libs/serdisplib/patches/010-cross-compile.patch new file mode 100644 index 00000000..33932225 --- /dev/null +++ b/libs/serdisplib/patches/010-cross-compile.patch @@ -0,0 +1,101 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -44,8 +44,8 @@ all: + done && test -z "$$fail" + + install: +- $(top_srcdir)/mkinstalldirs $(libdir)/pkgconfig +- $(INSTALL_DATA) serdisplib.pc $(libdir)/pkgconfig/ ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig ++ $(INSTALL_DATA) serdisplib.pc $(DESTDIR)$(libdir)/pkgconfig/ + @for dir in ${subdirs}; do \ + (cd $(srcdir) && cd $$dir && $(MAKE) install) \ + || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ +--- a/server/Makefile.in ++++ b/server/Makefile.in +@@ -102,9 +102,9 @@ distclean: clean + + + install: $(PROGRAMS) +- $(top_srcdir)/mkinstalldirs $(bindir) +- $(top_srcdir)/mkinstalldirs $(sbindir) +- $(top_srcdir)/mkinstalldirs $(sysconfdir) ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir) ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir) + list='$(PROGRAMS_SBIN)'; \ + for prog in $$list; do \ + $(INSTALL_PROGRAM) $$prog $(sbindir)/ ; \ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -28,7 +28,7 @@ includedir = @includedir@ + datarootdir = @datarootdir@ + + CC=@CC@ +-AR=@AR@ -r ++AR=@AR@ + LN_S=@LN_S@ + INSTALL=@INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -184,14 +184,14 @@ programs: $(PROGRAMS) + $(CC) $(CFLAGS) $(DEFINES) -c $< + + $(LIB_DIR)/$(LIB_STATIC): $(LIB_OBJECTS) +- $(top_srcdir)/mkinstalldirs $(top_srcdir)/lib +- $(AR) $(LIB_DIR)/$(LIB_STATIC) $(LIB_OBJECTS) ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(top_srcdir)/lib ++ $(AR) -r -- $(LIB_DIR)/$(LIB_STATIC) $(LIB_OBJECTS) + + $(LIB_DIR)/$(LIB_SHARED): $(LIB_OBJECTS) +- $(top_srcdir)/mkinstalldirs $(top_srcdir)/lib ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(top_srcdir)/lib + $(CC) -fPIC -shared $(SONAME_FLAG) -o $(LIB_DIR)/$(LIB_SHARED) $(LIB_OBJECTS) $(LDFLAGS) $(EXTRA_LIBS) +- cd $(LIB_DIR) && $(LN_S) -f $(LIB_SHARED) lib$(LIB_NAME).so.$(VERSION_MAJOR) +- cd $(LIB_DIR) && $(LN_S) -f lib$(LIB_NAME).so.$(VERSION_MAJOR) lib$(LIB_NAME).so ++ cd $(DESTDIR)$(LIB_DIR) && $(LN_S) -f $(LIB_SHARED) lib$(LIB_NAME).so.$(VERSION_MAJOR) ++ cd $(DESTDIR)$(LIB_DIR) && $(LN_S) -f lib$(LIB_NAME).so.$(VERSION_MAJOR) lib$(LIB_NAME).so + + testserdisp: $(LIB_DIR)/$(LIB_STATIC) $(OBJECTS) + $(CC) -o testserdisp $(OBJECTS) $(LIB_SERDISP) $(EXTRA_LIBS_STATIC) +@@ -204,20 +204,20 @@ distclean: clean + /bin/rm -f Makefile + + install: $(LIB_DIR)/$(LIB_SHARED) $(LIB_DIR)/$(LIB_STATIC) +- $(top_srcdir)/mkinstalldirs $(bindir) +- $(top_srcdir)/mkinstalldirs $(libdir) +- $(top_srcdir)/mkinstalldirs $(includedir) +- $(top_srcdir)/mkinstalldirs $(includedir)/serdisplib ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir) ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(includedir) ++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(includedir)/serdisplib + +- $(INSTALL_PROGRAM) $(PROGRAMS) $(bindir)/ +- $(INSTALL_PROGRAM) $(LIB_DIR)/$(LIB_SHARED) $(libdir)/ +- $(INSTALL_DATA) $(LIB_DIR)/$(LIB_STATIC) $(libdir)/ ++ $(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir)/ ++ $(INSTALL_PROGRAM) $(LIB_DIR)/$(LIB_SHARED) $(DESTDIR)$(libdir)/ ++ $(INSTALL_DATA) $(LIB_DIR)/$(LIB_STATIC) $(DESTDIR)$(libdir)/ + list='$(LIB_HEADERFILES)'; \ + for headerfile in $$list; do \ +- $(INSTALL_DATA) ../include/serdisplib/$$headerfile $(includedir)/serdisplib/ ; \ ++ $(INSTALL_DATA) ../include/serdisplib/$$headerfile $(DESTDIR)$(includedir)/serdisplib/ ; \ + done +- cd $(libdir) && $(LN_S) -f $(LIB_SHARED) lib$(LIB_NAME).so.$(VERSION_MAJOR) +- cd $(libdir) && $(LN_S) -f lib$(LIB_NAME).so.$(VERSION_MAJOR) lib$(LIB_NAME).so ++ cd $(DESTDIR)$(libdir) && $(LN_S) -f $(LIB_SHARED) lib$(LIB_NAME).so.$(VERSION_MAJOR) ++ cd $(DESTDIR)$(libdir) && $(LN_S) -f lib$(LIB_NAME).so.$(VERSION_MAJOR) lib$(LIB_NAME).so + + uninstall: + -/bin/rm -f $(libdir)/libserdisp* +--- a/tools/Makefile.in ++++ b/tools/Makefile.in +@@ -151,7 +151,7 @@ distclean: clean + install: $(PROGRAMS) + list='$(PROGRAMS)'; \ + for prog in $$list; do \ +- $(INSTALL_PROGRAM) $$prog $(bindir)/ ; \ ++ $(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir)/ ; \ + done + + uninstall: $(PROGRAMS) diff --git a/libs/slang2/Makefile b/libs/slang2/Makefile new file mode 100644 index 00000000..fcb0793e --- /dev/null +++ b/libs/slang2/Makefile @@ -0,0 +1,190 @@ +# +# Copyright (C) 2006-2011 Openwrt.org +# Copyright (C) 2011 SMBPhone Inc. +# Copyright (C) 2019 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=slang +PKG_VERSION:=2.3.2 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://www.jedsoft.org/releases/slang \ + https://www.jedsoft.org/releases/slang/old +PKG_HASH:=fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a + +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Jeffery To + +PKG_BUILD_PARALLEL:=0 + +SLANG_MODULES:= base64 chksum csv fcntl fork histogram iconv json onig pcre \ + png rand select slsmg socket stats sysconf termios varray zlib + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/libslang2/Default + SECTION:=libs + CATEGORY:=Libraries + TITLE:=S-Lang Programmer's Library + URL:=https://www.jedsoft.org/slang/ +endef + +define Package/libslang2/Default/description + Multi-platform programmer's library providing facilities for interactive + applications. Includes such things as display/screen management, + keyboard input, keymaps, etc. Includes the embeddable S-Lang interpreter. +endef + +define Package/libslang2 +$(call Package/libslang2/Default) + DEPENDS:=+terminfo +endef + +define Package/libslang2/description +$(call Package/libslang2/Default/description) +endef + +define Package/libslang2-modules +$(call Package/libslang2/Default) + TITLE+= (all modules) + DEPENDS:=$(foreach mod,$(SLANG_MODULES),+libslang2-mod-$(mod)) +endef + +define Package/libslang2-modules/description +$(call Package/libslang2/Default/description) + + This installs all of S-Lang's bundled modules. +endef + +define Package/libslang2-mod-iconv +$(call Package/libslang2/Default) + TITLE+= (iconv module) + DEPENDS:=$(ICONV_DEPENDS) +endef + +define Package/libslang2-mod-onig +$(call Package/libslang2/Default) + TITLE+= (onig module) + DEPENDS:=+oniguruma +endef + +define Package/libslang2-mod-pcre +$(call Package/libslang2/Default) + TITLE+= (pcre module) + DEPENDS:=+libpcre +endef + +define Package/libslang2-mod-png +$(call Package/libslang2/Default) + TITLE+= (png module) + DEPENDS:=+libpng +endef + +define Package/libslang2-mod-zlib +$(call Package/libslang2/Default) + TITLE+= (zlib module) + DEPENDS:=+zlib +endef + +define Package/slsh + SECTION:=lang + CATEGORY:=Languages + TITLE:=S-Lang shell + URL:=https://www.jedsoft.org/slang/slsh.html + DEPENDS:=+libslang2 +libslang2-modules +endef + +define Package/slsh/description + This is a shell which is mostly just a wrapper around the S-Lang Interpreter, + which is part of the S-Lang Library. +endef + +TARGET_CFLAGS+= $(FPIC) + +CONFIGURE_ARGS+= \ + --enable-largefile \ + --enable-warnings \ + --with-terminfo=default \ + --with-readline=slang \ + --with-iconv="$(ICONV_PREFIX)" \ + --with-onig="$(STAGING_DIR)/usr" \ + --with-pcre="$(STAGING_DIR)/usr" \ + --with-png="$(STAGING_DIR)/usr" \ + --with-z="$(STAGING_DIR)/usr" \ + --without-x + +define Build/Compile + $(call Build/Compile/Default,) + $(call Build/Compile/Default,static) +endef + +# Default install last, so that the dynamic slsh is installed +define Build/Install + $(call Build/Install/Default,install-static) + $(call Build/Install/Default,) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libslang.{a,so*} $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/slang.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libslang2/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libslang.so* $(1)/usr/lib/ +endef + +Package/libslang2-modules/install:=: + +define Package/slsh/install + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/slsh.rc $(1)/etc/ + + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/slsh $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/usr/share/slsh/ $(1)/usr/share/ +endef + +define BuildModule + ifndef Package/libslang2-mod-$(1) + define Package/libslang2-mod-$(1) + $$(call Package/libslang2/Default) + TITLE+= ($(1) module) + endef + endif + + define Package/libslang2-mod-$(1)/description + $$(call Package/libslang2/Default/description) + + This contains the $(1) module. + endef + + define Package/libslang2-mod-$(1)/install + $$(INSTALL_DIR) $$(1)/usr/lib/slang/v2/modules + $$(CP) $$(PKG_INSTALL_DIR)/usr/lib/slang/v2/modules/$(1)-module.so $$(1)/usr/lib/slang/v2/modules/ + endef + + $$(eval $$(call BuildPackage,libslang2-mod-$(1))) +endef + +$(foreach mod,$(SLANG_MODULES),$(eval $(call BuildModule,$(mod)))) + +$(eval $(call BuildPackage,libslang2)) +$(eval $(call BuildPackage,libslang2-modules)) +$(eval $(call BuildPackage,slsh)) diff --git a/libs/slang2/patches/001-skip-terminfo-dir-test.patch b/libs/slang2/patches/001-skip-terminfo-dir-test.patch new file mode 100644 index 00000000..e56fa770 --- /dev/null +++ b/libs/slang2/patches/001-skip-terminfo-dir-test.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -7029,7 +7029,7 @@ TERMCAP=-ltermcap + + for terminfo_dir in $JD_Terminfo_Dirs + do +- if test -d $terminfo_dir ++ if true + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } diff --git a/libs/slang2/patches/002-use-target-ar.patch b/libs/slang2/patches/002-use-target-ar.patch new file mode 100644 index 00000000..d2ef8bbc --- /dev/null +++ b/libs/slang2/patches/002-use-target-ar.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -73,7 +73,7 @@ INSTALL_DATA = @INSTALL_DATA@ + MKINSDIR = @CONFIG_DIR@/autoconf/mkinsdir.sh + RM = rm -f + RM_R = rm -rf +-AR_CR = ar cr ++AR_CR = $(AR) cr + RMDIR = rmdir + LN = /bin/ln -sf + CP = cp diff --git a/libs/spdlog/Makefile b/libs/spdlog/Makefile new file mode 100644 index 00000000..ff6ff651 --- /dev/null +++ b/libs/spdlog/Makefile @@ -0,0 +1,54 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=spdlog +PKG_VERSION:=1.6.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/gabime/spdlog/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=378a040d91f787aec96d269b0c39189f58a6b852e4cbf9150ccfacbe85ebbbfc + +PKG_MAINTAINER:= +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/spdlog + SECTION:=libs + CATEGORY:=Libraries + TITLE:=spdlog + URL:=https://github.com/gabime/spdlog + DEPENDS:=+libfmt + BUILDONLY:=1 +endef + +define Package/spdlog/description + Very fast, header-only/compiled, C++ logging library. +endef + +CMAKE_OPTIONS += \ + -DSPDLOG_BUILD_SHARED=OFF \ + -DSPDLOG_BUILD_EXAMPLE=OFF \ + -DSPDLOG_BUILD_EXAMPLE_HO=OFF \ + -DSPDLOG_BUILD_TESTS=OFF \ + -DSPDLOG_BUILD_TESTS_HO=OFF \ + -DSPDLOG_BUILD_BENCH=OFF \ + -DSPDLOG_SANITIZE_ADDRESS=OFF \ + -DSPDLOG_INSTALL=ON \ + -DSPDLOG_FMT_EXTERNAL=ON \ + -DSPDLOG_FMT_EXTERNAL_HO=OFF \ + -DSPDLOG_NO_EXCEPTIONS=OFF + +TARGET_CXXFLAGS += -flto + +$(eval $(call BuildPackage,spdlog)) diff --git a/libs/speex/Makefile b/libs/speex/Makefile index 01538ebe..63180ff4 100644 --- a/libs/speex/Makefile +++ b/libs/speex/Makefile @@ -18,6 +18,8 @@ PKG_HASH:=eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_CPE_ID:=cpe:/a:xiph:speex + include $(INCLUDE_DIR)/package.mk define Package/libspeex diff --git a/libs/speexdsp/Makefile b/libs/speexdsp/Makefile index 5b94e14b..14a350c3 100644 --- a/libs/speexdsp/Makefile +++ b/libs/speexdsp/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=speexdsp -PKG_VERSION:=1.2rc3 -PKG_RELEASE:=1 +PKG_VERSION:=1.2.0 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/speex/ -PKG_HASH:=4ae688600039f5d224bdf2e222d2fbde65608447e4c2f681585e4dca6df692f1 +PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/speex/ +PKG_HASH:=682042fc6f9bee6294ec453f470dadc26c6ff29b9c9e9ad2ffc1f4312fd64771 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -60,7 +60,6 @@ CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --disable-examples \ - $(if $(CONFIG_aarch64),--disable-neon) \ $(if $(CONFIG_SOFT_FLOAT),--enable-fixed-point --disable-float-api) $(eval $(call BuildPackage,libspeexdsp)) diff --git a/libs/spice-protocol/Makefile b/libs/spice-protocol/Makefile index d8c6fc18..51cda9ea 100644 --- a/libs/spice-protocol/Makefile +++ b/libs/spice-protocol/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2019 Yousong Zhou +# Copyright (C) 2019-2020 Yousong Zhou # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,17 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=spice-protocol -PKG_VERSION:=0.14.0 +PKG_VERSION:=0.14.2 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.spice-space.org/download/releases -PKG_HASH:=b6a4aa1ca32668790b45a494bbd000e9d05797b391d5a5d4b91adf1118216eac +PKG_HASH:=8f3a63c8b68300dffe36f2e75eac57afa1e76d5d80af760fd138a0b3f44cf1e9 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING -PKG_INSTALL:=1 PKG_MAINTAINER:=Yousong Zhou +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=meson/host + include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk define Package/spice-protocol diff --git a/libs/spice/Makefile b/libs/spice/Makefile index 4ec30f77..e2e3d497 100644 --- a/libs/spice/Makefile +++ b/libs/spice/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=spice -PKG_VERSION:=0.14.2 -PKG_RELEASE:=2 +PKG_VERSION:=0.14.3 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.spice-space.org/download/releases/spice-server -PKG_HASH:=b203b3882e06f4c7249a3150d90c84e1a90490d41ead255a3d2cede46f4a29a7 +PKG_HASH:=551d4be4a07667cf0543f3c895beb6da8a93ef5a9829f2ae47817be5e616a114 PKG_LICENSE:=LGPL-2.1-only PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 @@ -54,5 +54,7 @@ CONFIGURE_ARGS += \ --disable-gstreamer \ --disable-smartcard \ --disable-statistics \ + --without-sasl \ + --disable-silent-rules \ $(eval $(call BuildPackage,libspice-server)) diff --git a/libs/spice/patches/0001-build-skip-tests.patch b/libs/spice/patches/0001-build-skip-tests.patch new file mode 100644 index 00000000..d79c3377 --- /dev/null +++ b/libs/spice/patches/0001-build-skip-tests.patch @@ -0,0 +1,26 @@ +From 9380ff5a8849ea5a772958b5dcfc5462182f1597 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Fri, 20 Mar 2020 17:06:31 +0800 +Subject: [PATCH] build: skip tests + +Tests build can fail for arc700 for the following causes + + - Missing -stack-protector-all argument when building test progs + - Missing linker flag -lgmodule-2.0 -lffi + +Signed-off-by: Yousong Zhou +--- + server/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/server/Makefile.am b/server/Makefile.am +index 2d148c14..5b927a1b 100644 +--- a/server/Makefile.am ++++ b/server/Makefile.am +@@ -1,5 +1,5 @@ + NULL = +-SUBDIRS = . tests ++SUBDIRS = . + + check-valgrind: + $(MAKE) -C tests check-valgrind diff --git a/libs/spice/patches/0001-reds-Fix-SSL_CTX_set_ecdh_auto-call-for-some-old-Ope.patch b/libs/spice/patches/0001-reds-Fix-SSL_CTX_set_ecdh_auto-call-for-some-old-Ope.patch deleted file mode 100644 index 046bf251..00000000 --- a/libs/spice/patches/0001-reds-Fix-SSL_CTX_set_ecdh_auto-call-for-some-old-Ope.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 214736dce643ce3ee257da017373e88cc19d2d3b Mon Sep 17 00:00:00 2001 -From: Frediano Ziglio -Date: Thu, 20 Jun 2019 13:26:11 +0100 -Subject: [PATCH] reds: Fix SSL_CTX_set_ecdh_auto call for some old OpenSSL - -SSL_CTX_set_ecdh_auto is not defined in some old versions of OpenSSL - -Signed-off-by: Frediano Ziglio -Acked-by: Jeremy White ---- - configure.ac | 9 +++++++++ - server/reds.c | 2 ++ - 2 files changed, 11 insertions(+) - -diff --git a/configure.ac b/configure.ac -index e12d7e85..49c009d4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -209,6 +209,15 @@ AC_SUBST(SSL_CFLAGS) - AC_SUBST(SSL_LIBS) - AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"]) - -+save_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS $SSL_CFLAGS" -+AC_CHECK_DECLS([SSL_CTX_set_ecdh_auto], [], [], [ -+AC_INCLUDES_DEFAULT -+#include -+#include -+]) -+CFLAGS="$save_CFLAGS" -+ - AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, - AC_MSG_CHECKING([for jpeglib.h]) - AC_TRY_CPP( -diff --git a/server/reds.c b/server/reds.c -index 792e9838..b4061fbc 100644 ---- a/server/reds.c -+++ b/server/reds.c -@@ -2937,7 +2937,9 @@ static int reds_init_ssl(RedsState *reds) - } - - SSL_CTX_set_options(reds->ctx, ssl_options); -+#if HAVE_DECL_SSL_CTX_SET_ECDH_AUTO || defined(SSL_CTX_set_ecdh_auto) - SSL_CTX_set_ecdh_auto(reds->ctx, 1); -+#endif - - /* Load our keys and certificates*/ - return_code = SSL_CTX_use_certificate_chain_file(reds->ctx, reds->config->ssl_parameters.certs_file); diff --git a/libs/spice/patches/0002-build-tools-fix-build-failure.patch b/libs/spice/patches/0002-build-tools-fix-build-failure.patch new file mode 100644 index 00000000..2a123723 --- /dev/null +++ b/libs/spice/patches/0002-build-tools-fix-build-failure.patch @@ -0,0 +1,24 @@ +From d37fe6af97a45f0567c47932fd5c66d451fcb128 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Fri, 20 Mar 2020 17:07:03 +0800 +Subject: [PATCH] build: tools: fix build failure + +Tools build can fail because -stack-protector-all is missing + +Signed-off-by: Yousong Zhou +--- + tools/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 702fcdd1..7dc70c4e 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -8,6 +8,7 @@ AM_CPPFLAGS = \ + + AM_LDFLAGS = \ + $(LIBRT) \ ++ $(WARN_LDFLAGS) \ + $(NULL) + + if !OS_WIN32 diff --git a/libs/spice/patches/0002-reds-Fix-compilation-without-deprecated-OpenSSL-1.1-.patch b/libs/spice/patches/0002-reds-Fix-compilation-without-deprecated-OpenSSL-1.1-.patch deleted file mode 100644 index 9923e4c7..00000000 --- a/libs/spice/patches/0002-reds-Fix-compilation-without-deprecated-OpenSSL-1.1-.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 5bc932f7a71ede7d8ecd9d88804af95a2eb955c0 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Sun, 3 Nov 2019 15:34:33 -0800 -Subject: [PATCH] reds: Fix compilation without deprecated OpenSSL 1.1 APIs - -Missing headers for BN_ and RSA_ functions. - -Initialization is deprecated with 1.1. - -Signed-off-by: Rosen Penev -Acked-by: Frediano Ziglio ---- -AUTHORS hunk removed as it does not apply (with 0.14.2 at least) - - AUTHORS | 1 + - server/reds.c | 24 ++++++++++++++++-------- - 2 files changed, 17 insertions(+), 8 deletions(-) - -diff --git a/server/reds.c b/server/reds.c -index c55aa3f8..dc03ef3a 100644 ---- a/server/reds.c -+++ b/server/reds.c -@@ -36,7 +36,9 @@ - #include - #endif - -+#include - #include -+#include - - #if HAVE_SASL - #include -@@ -2838,13 +2840,8 @@ static void openssl_thread_setup(void) - CRYPTO_set_id_callback(pthreads_thread_id); - CRYPTO_set_locking_callback(pthreads_locking_callback); - } --#else --static inline void openssl_thread_setup(void) --{ --} --#endif - --static gpointer openssl_global_init(gpointer arg) -+static gpointer openssl_global_init_once(gpointer arg) - { - SSL_library_init(); - SSL_load_error_strings(); -@@ -2854,9 +2851,20 @@ static gpointer openssl_global_init(gpointer arg) - return NULL; - } - --static int reds_init_ssl(RedsState *reds) -+static inline void openssl_global_init(void) - { - static GOnce openssl_once = G_ONCE_INIT; -+ g_once(&openssl_once, openssl_global_init_once, NULL); -+} -+ -+#else -+static inline void openssl_global_init(void) -+{ -+} -+#endif -+ -+static int reds_init_ssl(RedsState *reds) -+{ - const SSL_METHOD *ssl_method; - int return_code; - /* Limit connection to TLSv1.1 or newer. -@@ -2865,7 +2873,7 @@ static int reds_init_ssl(RedsState *reds) - long ssl_options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION | SSL_OP_NO_TLSv1; - - /* Global system initialization*/ -- g_once(&openssl_once, openssl_global_init, NULL); -+ openssl_global_init(); - - /* Create our context*/ - /* SSLv23_method() handles TLSv1.x in addition to SSLv2/v3 */ diff --git a/libs/sqlite3/Config-cli.in b/libs/sqlite3/Config-cli.in new file mode 100644 index 00000000..752db6e8 --- /dev/null +++ b/libs/sqlite3/Config-cli.in @@ -0,0 +1,24 @@ +menu "Configuration" + depends on PACKAGE_sqlite3-cli + +choice + prompt "Select command-line editing support" + default SQLITE3_LIBEDIT + + config SQLITE3_LIBEDIT + bool "libedit" + help + Link against libedit. This is the default. + + config SQLITE3_READLINE + bool "readline" + help + Link against GNU readline. + + config SQLITE3_READLINE_NONE + bool "none" + help + Disable command-line editing support. + +endchoice +endmenu diff --git a/libs/sqlite3/Config-lib.in b/libs/sqlite3/Config-lib.in new file mode 100644 index 00000000..6e7ea18d --- /dev/null +++ b/libs/sqlite3/Config-lib.in @@ -0,0 +1,47 @@ +menu "Configuration" + depends on PACKAGE_libsqlite3 + +config SQLITE3_DYNAMIC_EXTENSIONS + bool "Dynamic extensions" + default y + help + Enable loadable extensions. + +config SQLITE3_FTS3 + bool "FTS3 support" + default y + help + Enable FTS3 support. + +config SQLITE3_FTS4 + bool "FTS4 support" + depends on SQLITE3_FTS3 + default y + help + Enable FTS4 support. + +config SQLITE3_FTS5 + bool "FTS5 support" + default y + help + Enable FTS5 support. + +config SQLITE3_JSON1 + bool "JSON1 extension" + default y + help + Include JSON1 support. This is the default. + +config SQLITE3_RTREE + bool "R-Tree support" + default y + help + Enable R-Tree support. + +config SQLITE3_SESSION + bool "Session extension" + default n + help + Enable the session extension (default no). + +endmenu diff --git a/libs/sqlite3/Config.in b/libs/sqlite3/Config.in deleted file mode 100644 index 8e8fa6ec..00000000 --- a/libs/sqlite3/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -menu "Configuration" - depends on PACKAGE_libsqlite3 - -config SQLITE_FTS3 - bool - prompt "Enable FTS3" - help - "Enable support for full-text search version 3" - default y - -config SQLITE_RTREE - bool - prompt "Enable RTREE" - help - "Enable support for the R*Tree index extension" - default y - -endmenu diff --git a/libs/sqlite3/Makefile b/libs/sqlite3/Makefile index 8f85f302..bd9d4948 100644 --- a/libs/sqlite3/Makefile +++ b/libs/sqlite3/Makefile @@ -8,33 +8,44 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sqlite -PKG_VERSION:=3230100 +PKG_VERSION:=3320100 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz -PKG_HASH:=92842b283e5e744eff5da29ed3c69391de7368fccc4d0ee6bf62490ce555ef25 -PKG_SOURCE_URL:=http://www.sqlite.org/2018/ +PKG_HASH:=486748abfb16abd8af664e3a5f03b228e5f124682b0c942e157644bf6fff7d10 +PKG_SOURCE_URL:=https://www.sqlite.org/2020/ PKG_LICENSE:=PUBLICDOMAIN PKG_LICENSE_FILES:= PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-autoconf-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_CPE_ID:=cpe:/a:sqlite:sqlite + PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_CONFIG_DEPENDS := \ - CONFIG_SQLITE_FTS3 \ - CONFIG_SQLITE_RTREE + CONFIG_SQLITE3_DYNAMIC_EXTENSIONS \ + CONFIG_SQLITE3_FTS3 \ + CONFIG_SQLITE3_FTS4 \ + CONFIG_SQLITE3_FTS5 \ + CONFIG_SQLITE3_JSON1 \ + CONFIG_SQLITE3_LIBEDIT \ + CONFIG_SQLITE3_READLINE \ + CONFIG_SQLITE3_RTREE \ + CONFIG_SQLITE3_SESSION include $(INCLUDE_DIR)/package.mk define Package/sqlite3/Default - SUBMENU:=database + SUBMENU:=Database TITLE:=SQLite (v3.x) database engine URL:=http://www.sqlite.org/ - MAINTAINER:=Etienne CHAMPETIER + MAINTAINER:=Sebastian Kemper endef define Package/sqlite3/Default/description @@ -48,6 +59,7 @@ define Package/libsqlite3 CATEGORY:=Libraries DEPENDS:=+libpthread +zlib TITLE+= (library) + ABI_VERSION:=0 endef define Package/libsqlite3/description @@ -57,14 +69,18 @@ $(call Package/sqlite3/Default/description) endef define Package/libsqlite3/config - source "$(SOURCE)/Config.in" + source "$(SOURCE)/Config-lib.in" endef define Package/sqlite3-cli $(call Package/sqlite3/Default) SECTION:=utils CATEGORY:=Utilities - DEPENDS:=+libsqlite3 +libncurses +libreadline + DEPENDS := \ + +libsqlite3 \ + +SQLITE3_LIBEDIT:libedit \ + +SQLITE3_READLINE:libreadline \ + +SQLITE3_READLINE:libncursesw TITLE+= (cli) endef @@ -75,50 +91,53 @@ $(call Package/sqlite3/Default/description) formats. endef -TARGET_CFLAGS += $(FPIC) \ - -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \ - -DHAVE_ISNAN=1 \ - -DHAVE_MALLOC_USABLE_SIZE=1 +define Package/sqlite3-cli/config + source "$(SOURCE)/Config-cli.in" +endef -ifneq ($(CONFIG_SQLITE_FTS3),y) -TARGET_CFLAGS += -USQLITE_ENABLE_FTS3 -endif - -ifneq ($(CONFIG_SQLITE_RTREE),y) -TARGET_CFLAGS += -USQLITE_ENABLE_RTREE -endif +TARGET_CFLAGS += \ + -DHAVE_ISNAN \ + -DHAVE_MALLOC_USABLE_SIZE \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY CONFIGURE_ARGS += \ + --disable-debug \ + --disable-static-shell \ --enable-shared \ --enable-static \ - --disable-editline \ - --disable-static-shell + --enable-threadsafe \ + $(if $(CONFIG_SQLITE3_DYNAMIC_EXTENSIONS),--enable-dynamic-extensions,--disable-dynamic-extensions) \ + $(if $(CONFIG_SQLITE3_FTS3),--enable-fts3,--disable-fts3) \ + $(if $(CONFIG_SQLITE3_FTS3),--enable-fts4,--disable-fts4) \ + $(if $(CONFIG_SQLITE3_FTS3),--enable-fts5,--disable-fts5) \ + $(if $(CONFIG_SQLITE3_JSON1),--enable-json1,--disable-json1) \ + $(if $(CONFIG_SQLITE3_RTREE),--enable-rtree,--disable-rtree) \ + $(if $(CONFIG_SQLITE3_SESSION),--enable-session,--disable-session) -CONFIGURE_VARS += \ - config_BUILD_CC="$(HOSTCC)" \ - config_BUILD_CFLAGS="-O2" \ - config_TARGET_CC="$(TARGET_CC)" \ - config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \ - config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \ +ifeq ($(CONFIG_SQLITE3_LIBEDIT),y) +CONFIGURE_ARGS+=--disable-readline +else ifeq ($(CONFIG_SQLITE3_READLINE),y) +CONFIGURE_ARGS+=--disable-editline +else +CONFIGURE_ARGS+=--disable-editline --disable-readline +endif define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3{,ext}.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/sqlite3{,ext}.h $(1)/usr/include + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig endef define Package/libsqlite3/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.$(ABI_VERSION)* $(1)/usr/lib endef define Package/sqlite3-cli/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin endef $(eval $(call BuildPackage,libsqlite3)) diff --git a/libs/taglib/Makefile b/libs/taglib/Makefile new file mode 100644 index 00000000..eb4f639f --- /dev/null +++ b/libs/taglib/Makefile @@ -0,0 +1,57 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=taglib +PKG_VERSION:=1.12-beta-1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/taglib/taglib/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=d2a44be7ca8b7682b218affc9910dcfb027481f402f7c30bd2996392b2429ae4 + +PKG_MAINTAINER:= +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING.LGPL +PKG_CPE_ID:=cpe:/a:taglib:taglib + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/taglib + SECTION:=libs + CATEGORY:=Libraries + TITLE:=taglib + URL:=https://github.com/taglib/taglib + DEPENDS:=+libstdcpp + BUILDONLY:=1 +endef + +define Package/taglib/description + TagLib is a library for reading and editing the metadata of several + popular audio formats. Currently it supports both ID3v1 and ID3v2 for + MP3 files, Ogg Vorbis comments and ID3 tags in FLAC, MPC, Speex, WavPack, + TrueAudio, WAV, AIFF, MP4, APE, DSF, DFF, and ASF files. +endef + +CMAKE_OPTIONS += \ + -DBUILD_TESTS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_BINDINGS=OFF \ + -DNO_ITUNES_HACKS=ON + +TARGET_CXXFLAGS += -flto + +define Build/InstallDev + $(call Build/InstallDev/cmake,$(1)) + $(SED) '/^prefix=\|^exec_prefix=/s|/usr|$(STAGING_DIR)/usr|' $(1)/usr/bin/taglib-config + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/taglib.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/taglib.pc +endef + +$(eval $(call BuildPackage,taglib)) diff --git a/libs/tcp_wrappers/Makefile b/libs/tcp_wrappers/Makefile index ca9bfd26..3bfa9d4e 100644 --- a/libs/tcp_wrappers/Makefile +++ b/libs/tcp_wrappers/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcp_wrappers PKG_VERSION:=7.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security @@ -30,7 +30,7 @@ define Package/libwrap MAINTAINER:=Peter Wagner endef -TARGET_CFLAGS += $(FPIC) +TARGET_CFLAGS += $(FPIC) -Wall ifeq ($(CONFIG_USE_MUSL),) TARGET_EXTRA_LIBS:=LIBS=-lnsl diff --git a/libs/tcp_wrappers/patches/006-compilation-warnings.patch b/libs/tcp_wrappers/patches/006-compilation-warnings.patch new file mode 100644 index 00000000..5cbd358a --- /dev/null +++ b/libs/tcp_wrappers/patches/006-compilation-warnings.patch @@ -0,0 +1,765 @@ +diff -u tcp_wrappers_7.6.orig/clean_exit.c tcp_wrappers_7.6/clean_exit.c +--- tcp_wrappers_7.6.orig/clean_exit.c 1994-12-29 03:42:20.000000000 +1100 ++++ tcp_wrappers_7.6/clean_exit.c 2017-11-14 22:50:48.000000000 +1100 +@@ -9,10 +9,11 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) clean_exit.c 1.4 94/12/28 17:42:19"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) clean_exit.c 1.4 94/12/28 17:42:19"; + #endif + + #include ++#include + + extern void exit(); + +diff -u tcp_wrappers_7.6.orig/diag.c tcp_wrappers_7.6/diag.c +--- tcp_wrappers_7.6.orig/diag.c 1994-12-29 03:42:20.000000000 +1100 ++++ tcp_wrappers_7.6/diag.c 2017-11-14 22:51:09.000000000 +1100 +@@ -10,7 +10,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) diag.c 1.1 94/12/28 17:42:20"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) diag.c 1.1 94/12/28 17:42:20"; + #endif + + /* System libraries */ +diff -u tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c +--- tcp_wrappers_7.6.orig/eval.c 1995-01-31 05:51:46.000000000 +1100 ++++ tcp_wrappers_7.6/eval.c 2017-11-14 22:51:50.000000000 +1100 +@@ -19,7 +19,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) eval.c 1.3 95/01/30 19:51:45"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) eval.c 1.3 95/01/30 19:51:45"; + #endif + + /* System libraries. */ +diff -u tcp_wrappers_7.6.orig/fakelog.c tcp_wrappers_7.6/fakelog.c +--- tcp_wrappers_7.6.orig/fakelog.c 1994-12-29 03:42:22.000000000 +1100 ++++ tcp_wrappers_7.6/fakelog.c 2017-11-14 22:52:07.000000000 +1100 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) fakelog.c 1.3 94/12/28 17:42:21"; + #endif + + #include +@@ -17,7 +17,7 @@ + + /* ARGSUSED */ + +-openlog(name, logopt, facility) ++void openlog(name, logopt, facility) + char *name; + int logopt; + int facility; +@@ -27,7 +27,7 @@ + + /* vsyslog - format one record */ + +-vsyslog(severity, fmt, ap) ++void vsyslog(severity, fmt, ap) + int severity; + char *fmt; + va_list ap; +@@ -43,7 +43,7 @@ + + /* VARARGS */ + +-VARARGS(syslog, int, severity) ++void VARARGS(syslog, int, severity) + { + va_list ap; + char *fmt; +@@ -56,7 +56,7 @@ + + /* closelog - dummy */ + +-closelog() ++void closelog() + { + /* void */ + } +diff -u tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c +--- tcp_wrappers_7.6.orig/fix_options.c 2017-11-13 09:29:08.000000000 +1100 ++++ tcp_wrappers_7.6/fix_options.c 2017-11-14 22:52:22.000000000 +1100 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) fix_options.c 1.6 97/04/08 02:29:19"; + #endif + + #include +@@ -29,14 +29,14 @@ + + /* fix_options - get rid of IP-level socket options */ + +-fix_options(request) +-struct request_info *request; ++void fix_options(request) ++struct request_info *request; + { + #ifdef IP_OPTIONS + unsigned char optbuf[BUFFER_SIZE / 3], *cp; + char lbuf[BUFFER_SIZE], *lp; + #if !defined(__GLIBC__) +- int optsize = sizeof(optbuf), ipproto; ++ unsigned int optsize = sizeof(optbuf), ipproto; + #else /* __GLIBC__ */ + size_t optsize = sizeof(optbuf); + int ipproto; +diff -u tcp_wrappers_7.6.orig/fromhost.c tcp_wrappers_7.6/fromhost.c +--- tcp_wrappers_7.6.orig/fromhost.c 1994-12-29 03:42:24.000000000 +1100 ++++ tcp_wrappers_7.6/fromhost.c 2017-11-14 22:52:33.000000000 +1100 +@@ -11,7 +11,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) fromhost.c 1.17 94/12/28 17:42:23"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) fromhost.c 1.17 94/12/28 17:42:23"; + #endif + + #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) +diff -u tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c +--- tcp_wrappers_7.6.orig/hosts_access.c 2017-11-13 09:29:25.000000000 +1100 ++++ tcp_wrappers_7.6/hosts_access.c 2017-11-14 22:52:48.000000000 +1100 +@@ -18,7 +18,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; + #endif + + /* System libraries. */ +diff -u tcp_wrappers_7.6.orig/hosts_ctl.c tcp_wrappers_7.6/hosts_ctl.c +--- tcp_wrappers_7.6.orig/hosts_ctl.c 1994-12-29 03:42:28.000000000 +1100 ++++ tcp_wrappers_7.6/hosts_ctl.c 2017-11-14 22:53:01.000000000 +1100 +@@ -12,7 +12,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27"; + #endif + + #include +diff -u tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c +--- tcp_wrappers_7.6.orig/inetcf.c 1997-02-12 12:13:24.000000000 +1100 ++++ tcp_wrappers_7.6/inetcf.c 2017-11-14 22:53:11.000000000 +1100 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) inetcf.c 1.7 97/02/12 02:13:23"; + #endif + + #include +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + extern int errno; + extern void exit(); +@@ -21,6 +22,8 @@ + #include "tcpd.h" + #include "inetcf.h" + ++extern int check_path(char *, struct stat *); ++ + /* + * Network configuration files may live in unusual places. Here are some + * guesses. Shorter names follow longer ones. +diff -u tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c +--- tcp_wrappers_7.6.orig/misc.c 2017-11-13 09:29:25.000000000 +1100 ++++ tcp_wrappers_7.6/misc.c 2017-11-14 22:53:23.000000000 +1100 +@@ -5,7 +5,7 @@ + */ + + #ifndef lint +-static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) misc.c 1.2 96/02/11 17:01:29"; + #endif + + #include +diff -u tcp_wrappers_7.6.orig/myvsyslog.c tcp_wrappers_7.6/myvsyslog.c +--- tcp_wrappers_7.6.orig/myvsyslog.c 1994-12-29 03:42:34.000000000 +1100 ++++ tcp_wrappers_7.6/myvsyslog.c 2017-11-14 22:53:35.000000000 +1100 +@@ -8,7 +8,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33"; + #endif + + #ifdef vsyslog +diff -u tcp_wrappers_7.6.orig/options.c tcp_wrappers_7.6/options.c +--- tcp_wrappers_7.6.orig/options.c 2017-11-13 09:29:08.000000000 +1100 ++++ tcp_wrappers_7.6/options.c 2017-11-14 22:53:50.000000000 +1100 +@@ -29,7 +29,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) options.c 1.17 96/02/11 17:01:31"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) options.c 1.17 96/02/11 17:01:31"; + #endif + + /* System libraries. */ +@@ -47,6 +47,8 @@ + #include + #include + #include ++#include ++#include + + #ifndef MAXPATHNAMELEN + #define MAXPATHNAMELEN BUFSIZ +@@ -108,21 +110,21 @@ + /* List of known keywords. Add yours here. */ + + static struct option option_table[] = { +- "user", user_option, NEED_ARG, +- "group", group_option, NEED_ARG, +- "umask", umask_option, NEED_ARG, +- "linger", linger_option, NEED_ARG, +- "keepalive", keepalive_option, 0, +- "spawn", spawn_option, NEED_ARG | EXPAND_ARG, +- "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST, +- "rfc931", rfc931_option, OPT_ARG, +- "setenv", setenv_option, NEED_ARG | EXPAND_ARG, +- "nice", nice_option, OPT_ARG, +- "severity", severity_option, NEED_ARG, +- "allow", allow_option, USE_LAST, +- "deny", deny_option, USE_LAST, +- "banners", banners_option, NEED_ARG, +- 0, ++ { "user", user_option, NEED_ARG }, ++ { "group", group_option, NEED_ARG }, ++ { "umask", umask_option, NEED_ARG }, ++ { "linger", linger_option, NEED_ARG }, ++ { "keepalive", keepalive_option, 0 }, ++ { "spawn", spawn_option, NEED_ARG | EXPAND_ARG }, ++ { "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST }, ++ { "rfc931", rfc931_option, OPT_ARG }, ++ { "setenv", setenv_option, NEED_ARG | EXPAND_ARG }, ++ { "nice", nice_option, OPT_ARG }, ++ { "severity", severity_option, NEED_ARG }, ++ { "allow", allow_option, USE_LAST }, ++ { "deny", deny_option, USE_LAST }, ++ { "banners", banners_option, NEED_ARG }, ++ { 0 }, + }; + + /* process_options - process access control options */ +@@ -447,88 +449,88 @@ + + static struct syslog_names log_fac[] = { + #ifdef LOG_KERN +- "kern", LOG_KERN, ++ { "kern", LOG_KERN }, + #endif + #ifdef LOG_USER +- "user", LOG_USER, ++ { "user", LOG_USER }, + #endif + #ifdef LOG_MAIL +- "mail", LOG_MAIL, ++ { "mail", LOG_MAIL }, + #endif + #ifdef LOG_DAEMON +- "daemon", LOG_DAEMON, ++ { "daemon", LOG_DAEMON }, + #endif + #ifdef LOG_AUTH +- "auth", LOG_AUTH, ++ { "auth", LOG_AUTH }, + #endif + #ifdef LOG_LPR +- "lpr", LOG_LPR, ++ { "lpr", LOG_LPR }, + #endif + #ifdef LOG_NEWS +- "news", LOG_NEWS, ++ { "news", LOG_NEWS }, + #endif + #ifdef LOG_UUCP +- "uucp", LOG_UUCP, ++ { "uucp", LOG_UUCP }, + #endif + #ifdef LOG_CRON +- "cron", LOG_CRON, ++ { "cron", LOG_CRON }, + #endif + #ifdef LOG_FTP +- "ftp", LOG_FTP, ++ { "ftp", LOG_FTP }, + #endif + #ifdef LOG_LOCAL0 +- "local0", LOG_LOCAL0, ++ { "local0", LOG_LOCAL0 }, + #endif + #ifdef LOG_LOCAL1 +- "local1", LOG_LOCAL1, ++ { "local1", LOG_LOCAL1 }, + #endif + #ifdef LOG_LOCAL2 +- "local2", LOG_LOCAL2, ++ { "local2", LOG_LOCAL2 }, + #endif + #ifdef LOG_LOCAL3 +- "local3", LOG_LOCAL3, ++ { "local3", LOG_LOCAL3 }, + #endif + #ifdef LOG_LOCAL4 +- "local4", LOG_LOCAL4, ++ { "local4", LOG_LOCAL4 }, + #endif + #ifdef LOG_LOCAL5 +- "local5", LOG_LOCAL5, ++ { "local5", LOG_LOCAL5 }, + #endif + #ifdef LOG_LOCAL6 +- "local6", LOG_LOCAL6, ++ { "local6", LOG_LOCAL6 }, + #endif + #ifdef LOG_LOCAL7 +- "local7", LOG_LOCAL7, ++ { "local7", LOG_LOCAL7 }, + #endif +- 0, ++ { 0 }, + }; + + static struct syslog_names log_sev[] = { + #ifdef LOG_EMERG +- "emerg", LOG_EMERG, ++ { "emerg", LOG_EMERG }, + #endif + #ifdef LOG_ALERT +- "alert", LOG_ALERT, ++ { "alert", LOG_ALERT }, + #endif + #ifdef LOG_CRIT +- "crit", LOG_CRIT, ++ { "crit", LOG_CRIT }, + #endif + #ifdef LOG_ERR +- "err", LOG_ERR, ++ { "err", LOG_ERR }, + #endif + #ifdef LOG_WARNING +- "warning", LOG_WARNING, ++ { "warning", LOG_WARNING }, + #endif + #ifdef LOG_NOTICE +- "notice", LOG_NOTICE, ++ { "notice", LOG_NOTICE }, + #endif + #ifdef LOG_INFO +- "info", LOG_INFO, ++ { "info", LOG_INFO }, + #endif + #ifdef LOG_DEBUG +- "debug", LOG_DEBUG, ++ { "debug", LOG_DEBUG }, + #endif +- 0, ++ { 0 }, + }; + + /* severity_map - lookup facility or severity value */ +@@ -589,7 +591,7 @@ + if (src[0] == 0) + return (0); + +- while (ch = *src) { ++ while ((ch = *src)) { + if (ch == ':') { + if (*++src == 0) + tcpd_warn("rule ends in \":\""); +diff -u tcp_wrappers_7.6.orig/patchlevel.h tcp_wrappers_7.6/patchlevel.h +--- tcp_wrappers_7.6.orig/patchlevel.h 1997-03-22 05:27:24.000000000 +1100 ++++ tcp_wrappers_7.6/patchlevel.h 2017-11-14 22:54:15.000000000 +1100 +@@ -1,3 +1,3 @@ + #ifndef lint +-static char patchlevel[] = "@(#) patchlevel 7.6 97/03/21 19:27:23"; ++static char patchlevel[] __attribute__((__unused__)) = "@(#) patchlevel 7.6 97/03/21 19:27:23"; + #endif +diff -u tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c +--- tcp_wrappers_7.6.orig/percent_m.c 2017-11-13 09:29:08.000000000 +1100 ++++ tcp_wrappers_7.6/percent_m.c 2017-11-14 22:54:31.000000000 +1100 +@@ -5,7 +5,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) percent_m.c 1.1 94/12/28 17:42:37"; + #endif + + #include +@@ -27,7 +27,7 @@ + char *bp = obuf; + char *cp = ibuf; + +- while (*bp = *cp) ++ while ((*bp = *cp)) + if (*cp == '%' && cp[1] == 'm') { + #ifdef HAVE_STRERROR + strcpy(bp, strerror(errno)); +diff -u tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c +--- tcp_wrappers_7.6.orig/percent_x.c 1994-12-29 03:42:38.000000000 +1100 ++++ tcp_wrappers_7.6/percent_x.c 2017-11-14 22:54:40.000000000 +1100 +@@ -11,7 +11,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) percent_x.c 1.4 94/12/28 17:42:37"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) percent_x.c 1.4 94/12/28 17:42:37"; + #endif + + /* System libraries. */ +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + extern void exit(); + +diff -u tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c +--- tcp_wrappers_7.6.orig/refuse.c 1994-12-29 03:42:40.000000000 +1100 ++++ tcp_wrappers_7.6/refuse.c 2017-11-14 22:54:50.000000000 +1100 +@@ -8,7 +8,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) refuse.c 1.5 94/12/28 17:42:39"; + #endif + + /* System libraries. */ +diff -u tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c +--- tcp_wrappers_7.6.orig/rfc931.c 2017-11-13 09:29:08.000000000 +1100 ++++ tcp_wrappers_7.6/rfc931.c 2017-11-14 22:54:58.000000000 +1100 +@@ -10,7 +10,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) rfc931.c 1.10 95/01/02 16:11:34"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) rfc931.c 1.10 95/01/02 16:11:34"; + #endif + + /* System libraries. */ +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + /* Local stuff. */ + +@@ -152,7 +153,7 @@ + * protocol, not part of the data. + */ + +- if (cp = strchr(user, '\r')) ++ if ((cp = strchr(user, '\r'))) + *cp = 0; + result = user; + } +diff -u tcp_wrappers_7.6.orig/safe_finger.c tcp_wrappers_7.6/safe_finger.c +--- tcp_wrappers_7.6.orig/safe_finger.c 2017-11-13 09:29:08.000000000 +1100 ++++ tcp_wrappers_7.6/safe_finger.c 2017-11-14 22:55:08.000000000 +1100 +@@ -15,7 +15,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) safe_finger.c 1.4 94/12/28 17:42:41"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) safe_finger.c 1.4 94/12/28 17:42:41"; + #endif + + /* System libraries */ +@@ -27,6 +27,10 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + + extern void exit(); + +@@ -45,6 +49,8 @@ + int allow_severity = SEVERITY; + int deny_severity = LOG_WARNING; + ++int pipe_stdin(); ++ + void cleanup(sig) + int sig; + { +@@ -52,7 +58,7 @@ + exit(0); + } + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +diff -u tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c +--- tcp_wrappers_7.6.orig/scaffold.c 2017-11-13 09:29:21.000000000 +1100 ++++ tcp_wrappers_7.6/scaffold.c 2017-11-14 22:55:32.000000000 +1100 +@@ -5,7 +5,7 @@ + */ + + #ifndef lint +-static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) scaffold.c 1.6 97/03/21 19:27:24"; + #endif + + /* System libraries. */ +diff -u tcp_wrappers_7.6.orig/shell_cmd.c tcp_wrappers_7.6/shell_cmd.c +--- tcp_wrappers_7.6.orig/shell_cmd.c 1994-12-29 03:42:44.000000000 +1100 ++++ tcp_wrappers_7.6/shell_cmd.c 2017-11-14 22:55:45.000000000 +1100 +@@ -9,7 +9,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44"; + #endif + + /* System libraries. */ +@@ -20,6 +20,9 @@ + #include + #include + #include ++#include ++#include ++#include + + extern void exit(); + +diff -u tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c +--- tcp_wrappers_7.6.orig/socket.c 2017-11-13 09:29:08.000000000 +1100 ++++ tcp_wrappers_7.6/socket.c 2017-11-14 22:55:57.000000000 +1100 +@@ -16,7 +16,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) socket.c 1.15 97/03/21 19:27:24"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) socket.c 1.15 97/03/21 19:27:24"; + #endif + + /* System libraries. */ +@@ -77,7 +77,7 @@ + static struct sockaddr_in client; + static struct sockaddr_in server; + #if !defined (__GLIBC__) +- int len; ++ unsigned int len; + #else /* __GLIBC__ */ + size_t len; + #endif /* __GLIBC__ */ +@@ -229,7 +229,7 @@ + char buf[BUFSIZ]; + struct sockaddr_in sin; + #if !defined(__GLIBC__) +- int size = sizeof(sin); ++ unsigned int size = sizeof(sin); + #else /* __GLIBC__ */ + size_t size = sizeof(sin); + #endif /* __GLIBC__ */ +diff -u tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c +--- tcp_wrappers_7.6.orig/tcpd.c 1996-02-12 03:01:33.000000000 +1100 ++++ tcp_wrappers_7.6/tcpd.c 2017-11-14 22:56:09.000000000 +1100 +@@ -11,7 +11,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpd.c 1.10 96/02/11 17:01:32"; + #endif + + /* System libraries. */ +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #ifndef MAXPATHNAMELEN + #define MAXPATHNAMELEN BUFSIZ +@@ -38,10 +39,12 @@ + #include "patchlevel.h" + #include "tcpd.h" + ++extern void fix_options(struct request_info *); ++ + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +diff -u tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h +--- tcp_wrappers_7.6.orig/tcpd.h 2017-11-13 09:29:25.000000000 +1100 ++++ tcp_wrappers_7.6/tcpd.h 2017-11-14 22:36:40.000000000 +1100 +@@ -182,10 +182,10 @@ + + #ifdef __STDC__ + extern void tcpd_warn(char *, ...); /* report problem and proceed */ +-extern void tcpd_jump(char *, ...); /* report problem and jump */ ++extern void tcpd_jump(char *, ...) __attribute__((__noreturn__)); /* report problem and jump */ + #else + extern void tcpd_warn(); +-extern void tcpd_jump(); ++extern void tcpd_jump() __attribute__((__noreturn__)); + #endif + + struct tcpd_context { +diff -u tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c +--- tcp_wrappers_7.6.orig/tcpdchk.c 2017-11-13 09:29:08.000000000 +1100 ++++ tcp_wrappers_7.6/tcpdchk.c 2017-11-14 22:56:21.000000000 +1100 +@@ -15,7 +15,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25"; + #endif + + /* System libraries. */ +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + extern int errno; + extern void exit(); +@@ -199,13 +200,15 @@ + char sv_list[BUFLEN]; /* becomes list of daemons */ + char *cl_list; /* becomes list of requests */ + char *sh_cmd; /* becomes optional shell command */ ++#ifndef PROCESS_OPTIONS + char buf[BUFSIZ]; ++#endif + int verdict; + struct tcpd_context saved_context; + + saved_context = tcpd_context; /* stupid compilers */ + +- if (fp = fopen(table, "r")) { ++ if ((fp = fopen(table, "r"))) { + tcpd_context.file = table; + tcpd_context.line = 0; + while (xgets(sv_list, sizeof(sv_list), fp)) { +@@ -331,7 +334,7 @@ + clients = 0; + } else { + clients++; +- if (host = split_at(cp + 1, '@')) { /* user@host */ ++ if ((host = split_at(cp + 1, '@'))) { /* user@host */ + check_user(cp); + check_host(host); + } else { +@@ -446,7 +449,7 @@ + } else if (errno != ENOENT) { + tcpd_warn("open %s: %m", pat); + } +- } else if (mask = split_at(pat, '/')) { /* network/netmask */ ++ } else if ((mask = split_at(pat, '/'))) { /* network/netmask */ + if (dot_quad_addr(pat) == INADDR_NONE + || dot_quad_addr(mask) == INADDR_NONE) + tcpd_warn("%s/%s: bad net/mask pattern", pat, mask); +diff -u tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c +--- tcp_wrappers_7.6.orig/tcpdmatch.c 1996-02-12 03:01:36.000000000 +1100 ++++ tcp_wrappers_7.6/tcpdmatch.c 2017-11-14 22:56:40.000000000 +1100 +@@ -14,7 +14,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36"; + #endif + + /* System libraries. */ +@@ -29,6 +29,8 @@ + #include + #include + #include ++#include ++#include + + extern void exit(); + extern int optind; +diff -u tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c +--- tcp_wrappers_7.6.orig/tli.c 1997-03-22 05:27:26.000000000 +1100 ++++ tcp_wrappers_7.6/tli.c 2017-11-14 22:56:50.000000000 +1100 +@@ -15,7 +15,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) tli.c 1.15 97/03/21 19:27:25"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) tli.c 1.15 97/03/21 19:27:25"; + #endif + + #ifdef TLI +diff -u tcp_wrappers_7.6.orig/try-from.c tcp_wrappers_7.6/try-from.c +--- tcp_wrappers_7.6.orig/try-from.c 1994-12-29 03:42:55.000000000 +1100 ++++ tcp_wrappers_7.6/try-from.c 2017-11-14 22:56:59.000000000 +1100 +@@ -11,7 +11,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) try-from.c 1.2 94/12/28 17:42:55"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) try-from.c 1.2 94/12/28 17:42:55"; + #endif + + /* System libraries. */ +@@ -37,7 +37,7 @@ + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +diff -u tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c +--- tcp_wrappers_7.6.orig/update.c 1994-12-29 03:42:56.000000000 +1100 ++++ tcp_wrappers_7.6/update.c 2017-11-14 22:57:09.000000000 +1100 +@@ -14,7 +14,7 @@ + */ + + #ifndef lint +-static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56"; ++static char sccsid[] __attribute__((__unused__)) = "@(#) update.c 1.1 94/12/28 17:42:56"; + #endif + + /* System libraries */ +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + /* Local stuff. */ + diff --git a/libs/tdb/Makefile b/libs/tdb/Makefile index 12558de0..a783b3fa 100644 --- a/libs/tdb/Makefile +++ b/libs/tdb/Makefile @@ -8,14 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tdb -PKG_VERSION:=1.3.16 -PKG_RELEASE:=2 +PKG_VERSION:=1.4.3 +PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.samba.org/ftp/tdb/ -PKG_HASH:=6a3fc2616567f23993984ada3cea97d953a27669ffd1bfbbe961f26e0cf96cc5 +PKG_HASH:=c8058393dfa15f47e11ebd2f1d132693f0b3b3b8bf22d0201bfb305026f88a1b +PKG_BUILD_DEPENDS:=python3/host PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -25,11 +26,10 @@ include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk define Package/tdb - SUBMENU:=database + SUBMENU:=Database SECTION:=libs CATEGORY:=Libraries TITLE:=Trivial Database - DEPNEDS:=+libattr URL:=http://sourceforge.net/projects/tdb/ MAINTAINER:=Dmitry V. Zimin endef @@ -48,12 +48,9 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ endef -CONFIGURE_ARGS = \ - --target=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ +CONFIGURE_ARGS:= \ --cross-compile \ --cross-answers="$(PKG_BUILD_DIR)/cache.txt" \ - --program-prefix="" \ --prefix=$(CONFIGURE_PREFIX) \ --exec-prefix=$(CONFIGURE_PREFIX) \ --bindir=$(CONFIGURE_PREFIX)/bin \ @@ -64,9 +61,6 @@ CONFIGURE_ARGS = \ --localstatedir=/var \ --mandir=$(CONFIGURE_PREFIX)/man \ --infodir=$(CONFIGURE_PREFIX)/info \ - $(DISABLE_IPV6) - -CONFIGURE_ARGS += \ --disable-python \ --disable-rpath \ --disable-rpath-install \ diff --git a/libs/tdb/patches/100-Remove_libbsd_dependency_check.patch b/libs/tdb/patches/100-Remove_libbsd_dependency_check.patch index 150d17b5..06081ce8 100644 --- a/libs/tdb/patches/100-Remove_libbsd_dependency_check.patch +++ b/libs/tdb/patches/100-Remove_libbsd_dependency_check.patch @@ -1,13 +1,16 @@ -diff --git a/lib/replace/wscript b/lib/replace/wscript -index fd00a42..337d559 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript -@@ -340,22 +340,13 @@ def configure(conf): +@@ -416,22 +416,13 @@ conf.CHECK_FUNCS('prctl dirname basename') - strlcpy_in_bsd = False -- ++ # Not checking for libbsd ++ conf.CHECK_FUNCS('strlcpy strlcat') ++ conf.CHECK_FUNCS('getpeereid') ++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h') ++ conf.CHECK_FUNCS('setproctitle_init') + - # libbsd on some platforms provides strlcpy and strlcat - if not conf.CHECK_FUNCS('strlcpy strlcat'): - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', @@ -22,17 +25,11 @@ index fd00a42..337d559 100644 - - if not conf.CHECK_FUNCS('closefrom'): - conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') -+ # Not checking for libbsd -+ conf.CHECK_FUNCS('strlcpy strlcat') -+ conf.CHECK_FUNCS('getpeereid') -+ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h') -+ conf.CHECK_FUNCS('setproctitle_init') -+ + conf.CHECK_FUNCS('closefrom') conf.CHECK_CODE(''' struct ucred cred; -@@ -698,9 +689,6 @@ def configure(conf): +@@ -808,9 +799,6 @@ # look for a method of finding the list of network interfaces for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']: @@ -42,8 +39,8 @@ index fd00a42..337d559 100644 if conf.CHECK_CODE(''' #define %s 1 #define NO_CONFIG_H 1 -@@ -713,7 +701,7 @@ def configure(conf): - #include "test/getifaddrs.c" +@@ -823,7 +811,7 @@ + #include "tests/getifaddrs.c" ''' % method, method, - lib='nsl socket' + bsd_for_strlcpy, @@ -51,11 +48,11 @@ index fd00a42..337d559 100644 addmain=False, execute=True): break -@@ -761,7 +749,6 @@ def build(bld): +@@ -871,7 +859,6 @@ break extra_libs = '' - if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd' + if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt' + if bld.CONFIG_SET('REPLACE_REQUIRES_LIBSOCKET_LIBNSL'): extra_libs += ' socket nsl' - bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC', - REPLACE_HOSTCC_SOURCE, diff --git a/libs/tiff/Makefile b/libs/tiff/Makefile index dc67e779..e6f7f2f7 100644 --- a/libs/tiff/Makefile +++ b/libs/tiff/Makefile @@ -8,30 +8,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tiff -PKG_VERSION:=4.0.9 -PKG_RELEASE:=4 +PKG_VERSION:=4.1.0 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.osgeo.org/libtiff -PKG_HASH:=6e7bdeec2c310734e734d19aae3a71ebe37a4d842e0e23dbb1b8921c0026cfcd +PKG_HASH:=5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634 -PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=autogen.sh aclocal.m4 - -PKG_LICENSE:=BSD +PKG_MAINTAINER:=Jiri Slachta +PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYRIGHT +PKG_CPE_ID:=cpe:/a:libtiff:libtiff -PKG_INSTALL:=1 - +PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/tiff/Default TITLE:=TIFF - URL:=http://www.remotesensing.org/libtiff/ - MAINTAINER:=Jiri Slachta + URL:=http://simplesystems.org/libtiff/ endef define Package/libtiff @@ -40,6 +38,7 @@ $(call Package/tiff/Default) CATEGORY:=Libraries TITLE+= library DEPENDS:=+zlib +libjpeg + ABI_VERSION:=5 endef define Package/libtiffxx @@ -59,41 +58,42 @@ $(call Package/tiff/Default) DEPENDS:=+libtiff endef -CONFIGURE_ARGS += \ - $(if $(CONFIG_PACKAGE_libtiffxx),--enable-cxx,--disable-cxx) \ - --disable-lzma \ - --enable-ccitt \ - --enable-packbits \ - --enable-lzw \ - --enable-thunder \ - --enable-next \ - --enable-logluv \ - --enable-mdi \ - --enable-zlib \ - --enable-jpeg \ - --disable-old-jpeg \ - --disable-jbig \ - --without-x +CMAKE_OPTIONS += \ + -Dld-version-script=OFF \ + -Dccitt=ON \ + -Dpackbits=ON \ + -Dlzw=ON \ + -Dthunder=ON \ + -Dnext=ON \ + -Dlogluv=ON \ + -Dmdi=ON \ + -Dzlib=ON \ + -Dpixarlog=ON \ + -Djpeg=ON \ + -Dold-jpeg=OFF \ + -Djbig=OFF \ + -Dlzma=OFF \ + -Dzstd=OFF \ + -Dwebp=OFF \ + -Djpeg12=OFF \ + -Dcxx=O$(if $(CONFIG_PACKAGE_libtiffxx),N,FF) -define Build/InstallDev/hxx - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.hxx $(1)/usr/include/ -endef +TARGET_CFLAGS += $(TARGET_CPPFLAGS) define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{lib,include} - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ - $(if $(CONFIG_PACKAGE_libtiffxx), $(call Build/InstallDev/hxx,$(1))) + $(call Build/InstallDev/cmake,$(1)) + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libtiff-4.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libtiff-4.pc endef define Package/libtiff/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so.$(ABI_VERSION)* $(1)/usr/lib endef define Package/libtiffxx/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so.$(ABI_VERSION)* $(1)/usr/lib/ endef define Package/tiff-utils/install diff --git a/libs/tiff/patches/001-autoconf-compat.patch b/libs/tiff/patches/001-autoconf-compat.patch index b10286e0..fd779ea1 100644 --- a/libs/tiff/patches/001-autoconf-compat.patch +++ b/libs/tiff/patches/001-autoconf-compat.patch @@ -9,7 +9,7 @@ ACLOCAL_AMFLAGS = -I m4 docfiles = \ -@@ -61,7 +61,7 @@ distcheck-hook: +@@ -60,7 +60,7 @@ distcheck-hook: rm -rf $(distdir)/_build/cmake rm -rf $(distdir)/_inst/cmake diff --git a/libs/tiff/patches/005-fix-ftell-macro.patch b/libs/tiff/patches/005-fix-ftell-macro.patch index 23e1e039..d5acde92 100644 --- a/libs/tiff/patches/005-fix-ftell-macro.patch +++ b/libs/tiff/patches/005-fix-ftell-macro.patch @@ -1,6 +1,6 @@ --- a/libtiff/tiffiop.h +++ b/libtiff/tiffiop.h -@@ -287,7 +287,7 @@ struct tiff { +@@ -302,7 +302,7 @@ struct tiff { */ #if defined(HAVE_FSEEKO) # define fseek(stream,offset,whence) fseeko(stream,offset,whence) diff --git a/libs/tiff/patches/020-CVE-2018-5784.patch b/libs/tiff/patches/020-CVE-2018-5784.patch deleted file mode 100644 index 5f26e5de..00000000 --- a/libs/tiff/patches/020-CVE-2018-5784.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 49723b0eb683cca80142b01a48ba1475fed5188a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Nikola=20Forr=C3=B3?= -Date: Fri, 23 Mar 2018 15:35:39 +0100 -Subject: [PATCH] Fix for bug 2772 - -It is possible to craft a TIFF document where the IFD list is circular, -leading to an infinite loop while traversing the chain. The libtiff -directory reader has a failsafe that will break out of this loop after -reading 65535 directory entries, but it will continue processing, -consuming time and resources to process what is essentially a bogus TIFF -document. - -This change fixes the above behavior by breaking out of processing when -a TIFF document has >= 65535 directories and terminating with an error. ---- - contrib/addtiffo/tif_overview.c | 14 +++++++++++++- - tools/tiff2pdf.c | 10 ++++++++++ - tools/tiffcrop.c | 13 +++++++++++-- - 3 files changed, 34 insertions(+), 3 deletions(-) - -diff --git a/contrib/addtiffo/tif_overview.c b/contrib/addtiffo/tif_overview.c -index c61ffbb..03b3573 100644 ---- a/contrib/addtiffo/tif_overview.c -+++ b/contrib/addtiffo/tif_overview.c -@@ -65,6 +65,8 @@ - # define MAX(a,b) ((a>b) ? a : b) - #endif - -+#define TIFF_DIR_MAX 65534 -+ - void TIFFBuildOverviews( TIFF *, int, int *, int, const char *, - int (*)(double,void*), void * ); - -@@ -91,6 +93,7 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize, - { - toff_t nBaseDirOffset; - toff_t nOffset; -+ tdir_t iNumDir; - - (void) bUseSubIFDs; - -@@ -147,7 +150,16 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize, - return 0; - - TIFFWriteDirectory( hTIFF ); -- TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) ); -+ iNumDir = TIFFNumberOfDirectories(hTIFF); -+ if( iNumDir > TIFF_DIR_MAX ) -+ { -+ TIFFErrorExt( TIFFClientdata(hTIFF), -+ "TIFF_WriteOverview", -+ "File `%s' has too many directories.\n", -+ TIFFFileName(hTIFF) ); -+ exit(-1); -+ } -+ TIFFSetDirectory( hTIFF, (tdir_t) (iNumDir - 1) ); - - nOffset = TIFFCurrentDirOffset( hTIFF ); - -diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c -index 454befb..bdb9126 100644 ---- a/tools/tiff2pdf.c -+++ b/tools/tiff2pdf.c -@@ -68,6 +68,8 @@ extern int getopt(int, char**, char*); - - #define PS_UNIT_SIZE 72.0F - -+#define TIFF_DIR_MAX 65534 -+ - /* This type is of PDF color spaces. */ - typedef enum { - T2P_CS_BILEVEL = 0x01, /* Bilevel, black and white */ -@@ -1049,6 +1051,14 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ - uint16 xuint16=0; - - directorycount=TIFFNumberOfDirectories(input); -+ if(directorycount > TIFF_DIR_MAX) { -+ TIFFError( -+ TIFF2PDF_MODULE, -+ "TIFF contains too many directories, %s", -+ TIFFFileName(input)); -+ t2p->t2p_error = T2P_ERR_ERROR; -+ return; -+ } - t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE))); - if(t2p->tiff_pages==NULL){ - TIFFError( -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index c69177e..c60cb38 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -217,6 +217,8 @@ extern int getopt(int argc, char * const argv[], const char *optstring); - #define DUMP_TEXT 1 - #define DUMP_RAW 2 - -+#define TIFF_DIR_MAX 65534 -+ - /* Offsets into buffer for margins and fixed width and length segments */ - struct offset { - uint32 tmargin; -@@ -2233,7 +2235,7 @@ main(int argc, char* argv[]) - pageNum = -1; - else - total_images = 0; -- /* read multiple input files and write to output file(s) */ -+ /* Read multiple input files and write to output file(s) */ - while (optind < argc - 1) - { - in = TIFFOpen (argv[optind], "r"); -@@ -2241,7 +2243,14 @@ main(int argc, char* argv[]) - return (-3); - - /* If only one input file is specified, we can use directory count */ -- total_images = TIFFNumberOfDirectories(in); -+ total_images = TIFFNumberOfDirectories(in); -+ if (total_images > TIFF_DIR_MAX) -+ { -+ TIFFError (TIFFFileName(in), "File contains too many directories"); -+ if (out != NULL) -+ (void) TIFFClose(out); -+ return (1); -+ } - if (image_count == 0) - { - dirnum = 0; --- -2.13.6 - diff --git a/libs/tiff/patches/021-CVE-2018-7456.patch b/libs/tiff/patches/021-CVE-2018-7456.patch deleted file mode 100644 index 65a89473..00000000 --- a/libs/tiff/patches/021-CVE-2018-7456.patch +++ /dev/null @@ -1,170 +0,0 @@ -From de5385cd882a5ff0970f63f4d93da0cbc87230c2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Nikola=20Forr=C3=B3?= -Date: Tue, 17 Apr 2018 18:42:09 +0200 -Subject: [PATCH] Fix NULL pointer dereference in TIFFPrintDirectory - -The TIFFPrintDirectory function relies on the following assumptions, -supposed to be guaranteed by the specification: - -(a) A Transfer Function field is only present if the TIFF file has - photometric type < 3. - -(b) If SamplesPerPixel > Color Channels, then the ExtraSamples field - has count SamplesPerPixel - (Color Channels) and contains - information about supplementary channels. - -While respect of (a) and (b) are essential for the well functioning of -TIFFPrintDirectory, no checks are realized neither by the callee nor -by TIFFPrintDirectory itself. Hence, following scenarios might happen -and trigger the NULL pointer dereference: - -(1) TIFF File of photometric type 4 or more has illegal Transfer - Function field. - -(2) TIFF File has photometric type 3 or less and defines a - SamplesPerPixel field such that SamplesPerPixel > Color Channels - without defining all extra samples in the ExtraSamples fields. - -In this patch, we address both issues with respect of the following -principles: - -(A) In the case of (1), the defined transfer table should be printed - safely even if it isn't 'legal'. This allows us to avoid expensive - checks in TIFFPrintDirectory. Also, it is quite possible that - an alternative photometric type would be developed (not part of the - standard) and would allow definition of Transfer Table. We want - libtiff to be able to handle this scenario out of the box. - -(B) In the case of (2), the transfer table should be printed at its - right size, that is if TIFF file has photometric type Palette - then the transfer table should have one row and not three, even - if two extra samples are declared. - -In order to fulfill (A) we simply add a new 'i < 3' end condition to -the broken TIFFPrintDirectory loop. This makes sure that in any case -where (b) would be respected but not (a), everything stays fine. - -(B) is fulfilled by the loop condition -'i < td->td_samplesperpixel - td->td_extrasamples'. This is enough as -long as (b) is respected. - -Naturally, we also make sure (b) is respected. This is done in the -TIFFReadDirectory function by making sure any non-color channel is -counted in ExtraSamples. - -This commit addresses CVE-2018-7456. ---- - libtiff/tif_dirread.c | 62 +++++++++++++++++++++++++++++++++++++++++++ - libtiff/tif_print.c | 2 +- - 2 files changed, 63 insertions(+), 1 deletion(-) - -diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c -index 5e62e81..80aaf8d 100644 ---- a/libtiff/tif_dirread.c -+++ b/libtiff/tif_dirread.c -@@ -167,6 +167,7 @@ static int TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32 nstrips, uin - static int TIFFFetchSubjectDistance(TIFF*, TIFFDirEntry*); - static void ChopUpSingleUncompressedStrip(TIFF*); - static uint64 TIFFReadUInt64(const uint8 *value); -+static int _TIFFGetMaxColorChannels(uint16 photometric); - - static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount ); - -@@ -3506,6 +3507,35 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c - } - } - -+/* -+ * Return the maximum number of color channels specified for a given photometric -+ * type. 0 is returned if photometric type isn't supported or no default value -+ * is defined by the specification. -+ */ -+static int _TIFFGetMaxColorChannels( uint16 photometric ) -+{ -+ switch (photometric) { -+ case PHOTOMETRIC_PALETTE: -+ case PHOTOMETRIC_MINISWHITE: -+ case PHOTOMETRIC_MINISBLACK: -+ return 1; -+ case PHOTOMETRIC_YCBCR: -+ case PHOTOMETRIC_RGB: -+ case PHOTOMETRIC_CIELAB: -+ return 3; -+ case PHOTOMETRIC_SEPARATED: -+ case PHOTOMETRIC_MASK: -+ return 4; -+ case PHOTOMETRIC_LOGL: -+ case PHOTOMETRIC_LOGLUV: -+ case PHOTOMETRIC_CFA: -+ case PHOTOMETRIC_ITULAB: -+ case PHOTOMETRIC_ICCLAB: -+ default: -+ return 0; -+ } -+} -+ - /* - * Read the next TIFF directory from a file and convert it to the internal - * format. We read directories sequentially. -@@ -3522,6 +3552,7 @@ TIFFReadDirectory(TIFF* tif) - uint32 fii=FAILED_FII; - toff_t nextdiroff; - int bitspersample_read = FALSE; -+ int color_channels; - - tif->tif_diroff=tif->tif_nextdiroff; - if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff)) -@@ -4026,6 +4057,37 @@ TIFFReadDirectory(TIFF* tif) - } - } - } -+ -+ /* -+ * Make sure all non-color channels are extrasamples. -+ * If it's not the case, define them as such. -+ */ -+ color_channels = _TIFFGetMaxColorChannels(tif->tif_dir.td_photometric); -+ if (color_channels && tif->tif_dir.td_samplesperpixel - tif->tif_dir.td_extrasamples > color_channels) { -+ uint16 old_extrasamples; -+ uint16 *new_sampleinfo; -+ -+ TIFFWarningExt(tif->tif_clientdata,module, "Sum of Photometric type-related " -+ "color channels and ExtraSamples doesn't match SamplesPerPixel. " -+ "Defining non-color channels as ExtraSamples."); -+ -+ old_extrasamples = tif->tif_dir.td_extrasamples; -+ tif->tif_dir.td_extrasamples = (tif->tif_dir.td_samplesperpixel - color_channels); -+ -+ // sampleinfo should contain information relative to these new extra samples -+ new_sampleinfo = (uint16*) _TIFFcalloc(tif->tif_dir.td_extrasamples, sizeof(uint16)); -+ if (!new_sampleinfo) { -+ TIFFErrorExt(tif->tif_clientdata, module, "Failed to allocate memory for " -+ "temporary new sampleinfo array (%d 16 bit elements)", -+ tif->tif_dir.td_extrasamples); -+ goto bad; -+ } -+ -+ memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16)); -+ _TIFFsetShortArray(&tif->tif_dir.td_sampleinfo, new_sampleinfo, tif->tif_dir.td_extrasamples); -+ _TIFFfree(new_sampleinfo); -+ } -+ - /* - * Verify Palette image has a Colormap. - */ -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 24d4b98..10a588e 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -546,7 +546,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - uint16 i; - fprintf(fd, " %2ld: %5u", - l, td->td_transferfunction[0][l]); -- for (i = 1; i < td->td_samplesperpixel; i++) -+ for (i = 1; i < td->td_samplesperpixel - td->td_extrasamples && i < 3; i++) - fprintf(fd, " %5u", - td->td_transferfunction[i][l]); - fputc('\n', fd); --- -2.17.0 - diff --git a/libs/tiff/patches/022-CVE-2017-9935.patch b/libs/tiff/patches/022-CVE-2017-9935.patch deleted file mode 100644 index 39327ffb..00000000 --- a/libs/tiff/patches/022-CVE-2017-9935.patch +++ /dev/null @@ -1,164 +0,0 @@ -From e1cd2d7ab032e7fe80b4c13e07895194c8bac85e Mon Sep 17 00:00:00 2001 -From: Brian May -Date: Thu, 7 Dec 2017 07:46:47 +1100 -Subject: [PATCH 1/4] [PATCH] tiff2pdf: Fix CVE-2017-9935 - -Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704 - -This vulnerability - at least for the supplied test case - is because we -assume that a tiff will only have one transfer function that is the same -for all pages. This is not required by the TIFF standards. - -We than read the transfer function for every page. Depending on the -transfer function, we allocate either 2 or 4 bytes to the XREF buffer. -We allocate this memory after we read in the transfer function for the -page. - -For the first exploit - POC1, this file has 3 pages. For the first page -we allocate 2 extra extra XREF entries. Then for the next page 2 more -entries. Then for the last page the transfer function changes and we -allocate 4 more entries. - -When we read the file into memory, we assume we have 4 bytes extra for -each and every page (as per the last transfer function we read). Which -is not correct, we only have 2 bytes extra for the first 2 pages. As a -result, we end up writing past the end of the buffer. - -There are also some related issues that this also fixes. For example, -TIFFGetField can return uninitalized pointer values, and the logic to -detect a N=3 vs N=1 transfer function seemed rather strange. - -It is also strange that we declare the transfer functions to be of type -float, when the standard says they are unsigned 16 bit values. This is -fixed in another patch. - -This patch will check to ensure that the N value for every transfer -function is the same for every page. If this changes, we abort with an -error. In theory, we should perhaps check that the transfer function -itself is identical for every page, however we don't do that due to the -confusion of the type of the data in the transfer function. ---- - libtiff/tif_dir.c | 3 +++ - tools/tiff2pdf.c | 69 +++++++++++++++++++++++++++++++---------------- - 2 files changed, 49 insertions(+), 23 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index f00f808..c36a5f3 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -1067,6 +1067,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) - if (td->td_samplesperpixel - td->td_extrasamples > 1) { - *va_arg(ap, uint16**) = td->td_transferfunction[1]; - *va_arg(ap, uint16**) = td->td_transferfunction[2]; -+ } else { -+ *va_arg(ap, uint16**) = NULL; -+ *va_arg(ap, uint16**) = NULL; - } - break; - case TIFFTAG_REFERENCEBLACKWHITE: -diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c -index bdb9126..bd23c9e 100644 ---- a/tools/tiff2pdf.c -+++ b/tools/tiff2pdf.c -@@ -239,7 +239,7 @@ typedef struct { - float tiff_whitechromaticities[2]; - float tiff_primarychromaticities[6]; - float tiff_referenceblackwhite[2]; -- float* tiff_transferfunction[3]; -+ uint16* tiff_transferfunction[3]; - int pdf_image_interpolate; /* 0 (default) : do not interpolate, - 1 : interpolate */ - uint16 tiff_transferfunctioncount; -@@ -1049,6 +1049,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ - uint16 pagen=0; - uint16 paged=0; - uint16 xuint16=0; -+ uint16 tiff_transferfunctioncount=0; -+ uint16* tiff_transferfunction[3]; - - directorycount=TIFFNumberOfDirectories(input); - if(directorycount > TIFF_DIR_MAX) { -@@ -1157,26 +1159,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ - } - #endif - if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION, -- &(t2p->tiff_transferfunction[0]), -- &(t2p->tiff_transferfunction[1]), -- &(t2p->tiff_transferfunction[2]))) { -- if((t2p->tiff_transferfunction[1] != (float*) NULL) && -- (t2p->tiff_transferfunction[2] != (float*) NULL) && -- (t2p->tiff_transferfunction[1] != -- t2p->tiff_transferfunction[0])) { -- t2p->tiff_transferfunctioncount = 3; -- t2p->tiff_pages[i].page_extra += 4; -- t2p->pdf_xrefcount += 4; -- } else { -- t2p->tiff_transferfunctioncount = 1; -- t2p->tiff_pages[i].page_extra += 2; -- t2p->pdf_xrefcount += 2; -- } -- if(t2p->pdf_minorversion < 2) -- t2p->pdf_minorversion = 2; -+ &(tiff_transferfunction[0]), -+ &(tiff_transferfunction[1]), -+ &(tiff_transferfunction[2]))) { -+ -+ if((tiff_transferfunction[1] != (uint16*) NULL) && -+ (tiff_transferfunction[2] != (uint16*) NULL) -+ ) { -+ tiff_transferfunctioncount=3; -+ } else { -+ tiff_transferfunctioncount=1; -+ } - } else { -- t2p->tiff_transferfunctioncount=0; -+ tiff_transferfunctioncount=0; - } -+ -+ if (i > 0){ -+ if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){ -+ TIFFError( -+ TIFF2PDF_MODULE, -+ "Different transfer function on page %d", -+ i); -+ t2p->t2p_error = T2P_ERR_ERROR; -+ return; -+ } -+ } -+ -+ t2p->tiff_transferfunctioncount = tiff_transferfunctioncount; -+ t2p->tiff_transferfunction[0] = tiff_transferfunction[0]; -+ t2p->tiff_transferfunction[1] = tiff_transferfunction[1]; -+ t2p->tiff_transferfunction[2] = tiff_transferfunction[2]; -+ if(tiff_transferfunctioncount == 3){ -+ t2p->tiff_pages[i].page_extra += 4; -+ t2p->pdf_xrefcount += 4; -+ if(t2p->pdf_minorversion < 2) -+ t2p->pdf_minorversion = 2; -+ } else if (tiff_transferfunctioncount == 1){ -+ t2p->tiff_pages[i].page_extra += 2; -+ t2p->pdf_xrefcount += 2; -+ if(t2p->pdf_minorversion < 2) -+ t2p->pdf_minorversion = 2; -+ } -+ - if( TIFFGetField( - input, - TIFFTAG_ICCPROFILE, -@@ -1837,10 +1861,9 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ - &(t2p->tiff_transferfunction[0]), - &(t2p->tiff_transferfunction[1]), - &(t2p->tiff_transferfunction[2]))) { -- if((t2p->tiff_transferfunction[1] != (float*) NULL) && -- (t2p->tiff_transferfunction[2] != (float*) NULL) && -- (t2p->tiff_transferfunction[1] != -- t2p->tiff_transferfunction[0])) { -+ if((t2p->tiff_transferfunction[1] != (uint16*) NULL) && -+ (t2p->tiff_transferfunction[2] != (uint16*) NULL) -+ ) { - t2p->tiff_transferfunctioncount=3; - } else { - t2p->tiff_transferfunctioncount=1; --- -2.17.0 - diff --git a/libs/tiff/patches/023-CVE-2017-18013.patch b/libs/tiff/patches/023-CVE-2017-18013.patch deleted file mode 100644 index 77afc48b..00000000 --- a/libs/tiff/patches/023-CVE-2017-18013.patch +++ /dev/null @@ -1,36 +0,0 @@ -From b1997b9c3ac0d6bac5effd7558141986487217a9 Mon Sep 17 00:00:00 2001 -From: Even Rouault -Date: Sun, 31 Dec 2017 15:09:41 +0100 -Subject: [PATCH 2/4] libtiff/tif_print.c: TIFFPrintDirectory(): fix null - pointer dereference on corrupted file. Fixes - http://bugzilla.maptools.org/show_bug.cgi?id=2770 / CVE-2017-18013 - ---- - libtiff/tif_print.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 10a588e..b9b53a0 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - fprintf(fd, " %3lu: [%8I64u, %8I64u]\n", - (unsigned long) s, -- (unsigned __int64) td->td_stripoffset[s], -- (unsigned __int64) td->td_stripbytecount[s]); -+ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0, -+ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0); - #else - fprintf(fd, " %3lu: [%8llu, %8llu]\n", - (unsigned long) s, -- (unsigned long long) td->td_stripoffset[s], -- (unsigned long long) td->td_stripbytecount[s]); -+ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0, -+ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0); - #endif - } - } --- -2.17.0 - diff --git a/libs/tiff/patches/024-CVE-2018-8905.patch b/libs/tiff/patches/024-CVE-2018-8905.patch deleted file mode 100644 index be6bee4e..00000000 --- a/libs/tiff/patches/024-CVE-2018-8905.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 1c127eb3cb7653bd61b61f9c3cfeb36fd10edab1 Mon Sep 17 00:00:00 2001 -From: Even Rouault -Date: Sat, 12 May 2018 15:32:31 +0200 -Subject: [PATCH 3/4] LZWDecodeCompat(): fix potential index-out-of-bounds - write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 / - CVE-2018-8905 - -The fix consists in using the similar code LZWDecode() to validate we -don't write outside of the output buffer. ---- - libtiff/tif_lzw.c | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/libtiff/tif_lzw.c b/libtiff/tif_lzw.c -index bc8f9c8..186ea3c 100644 ---- a/libtiff/tif_lzw.c -+++ b/libtiff/tif_lzw.c -@@ -604,6 +604,7 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) - char *tp; - unsigned char *bp; - int code, nbits; -+ int len; - long nextbits, nextdata, nbitsmask; - code_t *codep, *free_entp, *maxcodep, *oldcodep; - -@@ -755,13 +756,18 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) - } while (--occ); - break; - } -- assert(occ >= codep->length); -- op += codep->length; -- occ -= codep->length; -- tp = op; -+ len = codep->length; -+ tp = op + len; - do { -- *--tp = codep->value; -- } while( (codep = codep->next) != NULL ); -+ int t; -+ --tp; -+ t = codep->value; -+ codep = codep->next; -+ *tp = (char)t; -+ } while (codep && tp > op); -+ assert(occ >= len); -+ op += len; -+ occ -= len; - } else { - *op++ = (char)code; - occ--; --- -2.17.0 - diff --git a/libs/tiff/patches/025-CVE-2018-10963.patch b/libs/tiff/patches/025-CVE-2018-10963.patch deleted file mode 100644 index 039b7c1a..00000000 --- a/libs/tiff/patches/025-CVE-2018-10963.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 98ed6179dec22db48f6e235d8ca9e2708bf4e71a Mon Sep 17 00:00:00 2001 -From: Even Rouault -Date: Sat, 12 May 2018 14:24:15 +0200 -Subject: [PATCH 4/4] TIFFWriteDirectorySec: avoid assertion. Fixes - http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 - ---- - libtiff/tif_dirwrite.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c -index c68d6d2..5d0a669 100644 ---- a/libtiff/tif_dirwrite.c -+++ b/libtiff/tif_dirwrite.c -@@ -697,8 +697,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) - } - break; - default: -- assert(0); /* we should never get here */ -- break; -+ TIFFErrorExt(tif->tif_clientdata,module, -+ "Cannot write tag %d (%s)", -+ TIFFFieldTag(o), -+ o->field_name ? o->field_name : "unknown"); -+ goto bad; - } - } - } --- -2.17.0 - diff --git a/libs/tiff/patches/026-CVE-2017-11613.patch b/libs/tiff/patches/026-CVE-2017-11613.patch deleted file mode 100644 index b3f600a9..00000000 --- a/libs/tiff/patches/026-CVE-2017-11613.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 5c3bc1c78dfe05eb5f4224650ad606b75e1f7034 Mon Sep 17 00:00:00 2001 -From: Even Rouault -Date: Sun, 11 Mar 2018 11:14:01 +0100 -Subject: [PATCH] ChopUpSingleUncompressedStrip: avoid memory exhaustion - (CVE-2017-11613) - -In ChopUpSingleUncompressedStrip(), if the computed number of strips is big -enough and we are in read only mode, validate that the file size is consistent -with that number of strips to avoid useless attempts at allocating a lot of -memory for the td_stripbytecount and td_stripoffset arrays. - -Rework fix done in 3719385a3fac5cfb20b487619a5f08abbf967cf8 to work in more -cases like https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6979. -Credit to OSS Fuzz - -Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2724 ---- - libtiff/tif_dirread.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c -index 80aaf8d..5896a78 100644 ---- a/libtiff/tif_dirread.c -+++ b/libtiff/tif_dirread.c -@@ -5760,6 +5760,16 @@ ChopUpSingleUncompressedStrip(TIFF* tif) - if( nstrips == 0 ) - return; - -+ /* If we are going to allocate a lot of memory, make sure that the */ -+ /* file is as big as needed */ -+ if( tif->tif_mode == O_RDONLY && -+ nstrips > 1000000 && -+ (offset >= TIFFGetFileSize(tif) || -+ stripbytes > (TIFFGetFileSize(tif) - offset) / (nstrips - 1)) ) -+ { -+ return; -+ } -+ - newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64), - "for chopped \"StripByteCounts\" array"); - newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64), --- -2.17.1 - diff --git a/libs/tinycdb/Makefile b/libs/tinycdb/Makefile index c633c62a..05d56ca0 100644 --- a/libs/tinycdb/Makefile +++ b/libs/tinycdb/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tinycdb -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.corpit.ru/mjt/tinycdb/ PKG_VERSION:=0.78 PKG_HASH:=50678f432d8ada8d69f728ec11c3140e151813a7847cf30a62d86f3a720ed63c @@ -17,23 +17,47 @@ PKG_LICENSE:=NLPL PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk +# Pass CPPFLAGS in the CFLAGS as otherwise the build system will +# ignore them. +TARGET_CFLAGS+=$(TARGET_CPPFLAGS) + +MAKE_FLAGS+= \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" + +CDB_INST_STRING:=prefix=/usr install install-sharedlib install-piclib + define Package/tinycdb SECTION:=libs CATEGORY:=Libraries TITLE:=a Constant DataBase URL:=http://www.corpit.ru/mjt/tinycdb.html + ABI_VERSION=1 endef define Package/tinycdb/description TinyCDB is a very fast and simple package for creating and reading constant data bases endef -define Build/InstallDev - cd $(PKG_BUILD_DIR); $(MAKE) DESTDIR=$(1) prefix=/usr install +define Package/tinycdb/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcdb.so.$(ABI_VERSION) $(1)/usr/lib endef +define Build/Compile + $(call Build/Compile/Default,shared staticlib piclib) +endef +define Build/Install + $(call Build/Install/Default,$(CDB_INST_STRING)) +endef + +define Build/InstallDev + cd $(PKG_BUILD_DIR); $(MAKE) DESTDIR=$(1) $(CDB_INST_STRING) +endef $(eval $(call BuildPackage,tinycdb)) diff --git a/libs/unixodbc/Makefile b/libs/unixodbc/Makefile index 6a1ca0df..5b6325d3 100644 --- a/libs/unixodbc/Makefile +++ b/libs/unixodbc/Makefile @@ -8,18 +8,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unixodbc -PKG_VERSION:=2.3.4 -PKG_RELEASE:=5 +PKG_VERSION:=2.3.7 +PKG_RELEASE:=1 -PKG_SOURCE_URL:=ftp://ftp.unixodbc.org/pub/unixODBC/ PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz -PKG_HASH:=2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39 -PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/unixODBC-$(PKG_VERSION) +PKG_SOURCE_URL:=http://www.unixodbc.org +PKG_HASH:=45f169ba1f454a72b8fcbb82abd832630a3bf93baa84731cf2949f449e1e3e77 + PKG_MAINTAINER:=Thomas Heil PKG_LICENSE:=prog GPL libs LGPL +PKG_CPE_ID:=cpe:/a:unixodbc:unixodbc + +PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/unixODBC-$(PKG_VERSION) HOST_BUILD_DEPENDS:=unixodbc +PKG_FIXUP:=autoreconf + # if your other package depends on unixodbc and needs # odbc_config, add to your other Makefile # PKG_BUILD_DEPENDS:=unixodbc/host @@ -34,9 +39,9 @@ CONFIGURE_ARGS += \ --includedir=$(STAGING_DIR)/usr/include define Package/unixodbc/Default - SUBMENU:=database + SUBMENU:=Database TITLE:=unixODBC - URL:=http://www.unixodbc.org/ + URL:=http://www.unixodbc.org endef define Package/unixodbc @@ -92,6 +97,11 @@ endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/$(STAGING_DIR)/usr/include/*.h $(1)/usr/include/ + # Save autoconf config.h file for host build + # copy target autoconf config.h and unixodbc_conf.h file for host build + $(INSTALL_DIR) $(1)/tmp/unixodbc + $(CP) $(PKG_BUILD_DIR)/config.h $(1)/tmp/unixodbc/ + $(CP) $(PKG_BUILD_DIR)/unixodbc_conf.h $(1)/tmp/unixodbc/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/etc @@ -126,8 +136,9 @@ endef define Host/Configure $(call Host/Configure/Default) - cp $(PKG_BUILD_DIR)/config.h $(HOST_BUILD_DIR) - cp $(PKG_BUILD_DIR)/unixodbc_conf.h $(HOST_BUILD_DIR) + cp $(STAGING_DIR)/tmp/unixodbc/config.h $(HOST_BUILD_DIR) + sed -i -e 's!\(LIB_PREFIX \).*$$$$!\1"$(STAGING_DIR)/usr/lib"!' $(HOST_BUILD_DIR)/config.h + cp $(STAGING_DIR)/tmp/unixodbc/unixodbc_conf.h $(HOST_BUILD_DIR) endef define Host/Compile diff --git a/libs/vips/Makefile b/libs/vips/Makefile index 17781476..f38f90cb 100644 --- a/libs/vips/Makefile +++ b/libs/vips/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2010-2012 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -8,53 +6,70 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vips -PKG_VERSION:=8.6.1 -PKG_RELEASE:=2 +PKG_VERSION:=8.8.3 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/jcupitt/libvips/releases/download/v8.6.1/ -PKG_HASH:=f9ba6235ebc3e4d20af5f1604436bcd9686a3fecbe40838325d542f0c21a9270 -PKG_FIXUP:=autoreconf -PKG_CHECK_FORMAT_SECURITY:=0 +PKG_SOURCE_URL:=https://github.com/libvips/libvips/releases/download/v$(PKG_VERSION) +PKG_HASH:=c5e4dd5a5c6a777c129037d19ca606769b3f1d405fcc9c8eeda906a61491f790 +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:vips:vips + +PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk -PKG_INSTALL=1 - define Package/vips $(call Package/vips/Default) SECTION:=multimedia CATEGORY:=Multimedia TITLE:=An image manipulation library - URL:=http://www.vips.ecs.soton.ac.uk/ - MAINTAINER:=W. Michael Petullo - DEPENDS:=+glib2 +libexif +libexpat +libjpeg +libpng +giflib +libstdcpp +libxml2 $(INTL_DEPENDS) + URL:=https://libvips.github.io/libvips/ + DEPENDS:=+glib2 +libexif +libexpat +libjpeg +libpng +giflib +libxml2 $(CXX_DEPENDS) $(INTL_DEPENDS) endef -TARGET_LDFLAGS+= \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - CONFIGURE_ARGS += \ - --disable-cxx \ - --disable-threads \ + --disable-debug \ + --disable-gtk-doc-html \ + --disable-magickload \ + --disable-magicksave \ + --without-analyze \ --without-cfitsio \ --without-fftw \ + --without-gsf \ + --without-imagequant \ --without-lcms \ + --without-libwebp \ --without-magick \ + --without-magickpackage \ --without-matio \ + --without-nifti \ --without-OpenEXR \ + --without-openslide \ --without-orc \ --without-pangoft2 \ - --without-python \ + --without-pdfium \ + --without-poppler \ + --without-ppm \ + --without-radiance \ + --without-rsvg \ --without-tiff \ - --without-v4l \ --without-x \ - --without-zip \ + --without-zlib \ + --with-giflib \ --with-jpeg \ --with-libexif \ --with-png \ +TARGET_CXXFLAGS += -fno-rtti + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/vips $(CP) \ diff --git a/libs/vips/patches/001-no_introspection.patch b/libs/vips/patches/001-no_introspection.patch index 54db2920..8491339b 100644 --- a/libs/vips/patches/001-no_introspection.patch +++ b/libs/vips/patches/001-no_introspection.patch @@ -1,7 +1,6 @@ -diff -u --recursive vips-8.6.1-vanilla/configure.ac vips-8.6.1/configure.ac ---- vips-8.6.1-vanilla/configure.ac 2018-01-13 17:27:19.375813474 -0500 -+++ vips-8.6.1/configure.ac 2018-01-13 17:27:38.486871756 -0500 -@@ -53,9 +53,6 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -53,9 +53,6 @@ AC_SUBST(LIBRARY_CURRENT) AC_SUBST(LIBRARY_REVISION) AC_SUBST(LIBRARY_AGE) @@ -11,10 +10,9 @@ diff -u --recursive vips-8.6.1-vanilla/configure.ac vips-8.6.1/configure.ac # gir needs a list of source files to scan for introspection # # build with a glob and a list of files to exclude from scanning -diff -u --recursive vips-8.6.1-vanilla/libvips/Makefile.am vips-8.6.1/libvips/Makefile.am ---- vips-8.6.1-vanilla/libvips/Makefile.am 2018-01-13 17:27:19.366813446 -0500 -+++ vips-8.6.1/libvips/Makefile.am 2018-01-13 17:27:57.256929001 -0500 -@@ -70,56 +70,3 @@ +--- a/libvips/Makefile.am ++++ b/libvips/Makefile.am +@@ -68,56 +68,3 @@ install-exec-hook: echo "#define VIPS_SONAME \"$$dlname\"" >> soname.h && \ cp soname.h $(DESTDIR)$(pkgincludedir) && \ rm soname.h diff --git a/libs/vips/patches/010-reproducible-build.patch b/libs/vips/patches/010-reproducible-build.patch new file mode 100644 index 00000000..54ef6c11 --- /dev/null +++ b/libs/vips/patches/010-reproducible-build.patch @@ -0,0 +1,20 @@ +Description: Make the build reproducible +Author: Chris Lamb +Reviewed-By: Laszlo Boszormenyi (GCS) +Last-Update: 2018-07-24 + +--- vips-8.6.4.orig/configure.ac ++++ vips-8.6.4/configure.ac +@@ -26,7 +26,11 @@ VIPS_MAJOR_VERSION=vips_major_version() + VIPS_MINOR_VERSION=vips_minor_version() + VIPS_MICRO_VERSION=vips_micro_version() + VIPS_VERSION=vips_version() +-VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog` ++if test "x$SOURCE_DATE_EPOCH" = "x"; then ++ VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog` ++else ++ VIPS_VERSION_STRING=$VIPS_VERSION-`LC_ALL=C date --utc --date="@$SOURCE_DATE_EPOCH"` ++fi + + # libtool library versioning ... not user-visible (except as part of the + # library file name) and does not correspond to major/minor/micro above diff --git a/libs/websocketpp/Makefile b/libs/websocketpp/Makefile new file mode 100644 index 00000000..3260c70f --- /dev/null +++ b/libs/websocketpp/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2018 Bruno Randolf (br1@einfach.org) +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=websocketpp +PKG_VERSION:=0.8.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/zaphoyd/websocketpp/archive/$(PKG_VERSION)/ +PKG_HASH:=6ce889d85ecdc2d8fa07408d6787e7352510750daa66b5ad44aacb47bea76755 + +PKG_MAINTAINER:=Bruno Randolf +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +CMAKE_INSTALL:=1 + +define Package/websocketpp + SECTION:=libs + CATEGORY:=Libraries + TITLE:=WebSocket++ + URL:=https://www.zaphoyd.com/websocketpp + BUILDONLY:=1 +endef + +define Package/websocketpp/description + WebSocket++ is a header only C++ library that implements RFC6455 + The WebSocket Protocol. +endef + +$(eval $(call BuildPackage,websocketpp)) diff --git a/libs/xmlrpc-c/Makefile b/libs/xmlrpc-c/Makefile index 780efb00..0d3cb9f1 100644 --- a/libs/xmlrpc-c/Makefile +++ b/libs/xmlrpc-c/Makefile @@ -8,22 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xmlrpc-c -PKG_VERSION:=1.39.12 +PKG_VERSION:=1.51.06 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(PKG_VERSION) -PKG_HASH:=d830f3264a832dfe09f629cc64036acfd08121692526d0fabe090f7ff881ce08 +PKG_HASH:=06dcd87d9c88374559369ffbe83b3139cf41418c1a2d03f20e08808085f89fd0 PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=VARIOUS PKG_LICENSE_FILES:=doc/COPYING -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=0 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -105,9 +102,10 @@ CONFIGURE_ARGS+= \ --disable-wininet-client \ --disable-libwww-client \ --disable-abyss-server \ + --disable-cgi-server \ --disable-cplusplus \ --disable-abyss-threads \ - --disable-cgi-server + --without-libwww-ssl ifeq ($(BUILD_VARIANT),libxml2) CONFIGURE_ARGS += \ diff --git a/libs/xmlrpc-c/patches/001-config.mk.in.patch b/libs/xmlrpc-c/patches/001-config.mk.in.patch deleted file mode 100644 index e190ebb8..00000000 --- a/libs/xmlrpc-c/patches/001-config.mk.in.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/config.mk.in -+++ b/config.mk.in -@@ -175,7 +175,7 @@ ifeq ($(patsubst linux-gnu%,linux-gnu,$( - shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN)) - shliblefn = $(1:%=%.$(SHLIB_SUFFIX)) - # SHLIB_CLIB = -lc -- LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB) -+ LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB) $(LDFLAGS) - CFLAGS_SHLIB=-fPIC - endif - diff --git a/libs/xmlrpc-c/patches/002-automake-compat.patch b/libs/xmlrpc-c/patches/002-automake-compat.patch deleted file mode 100644 index be69611d..00000000 --- a/libs/xmlrpc-c/patches/002-automake-compat.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/configure.in -+++ b/configure.in -@@ -224,9 +224,7 @@ dnl Checks for programs. - dnl ======================================================================= - - AC_PROG_CC --if test x"$enable_cplusplus" != xno; then -- AC_PROG_CXX --fi -+AC_PROG_CXX - - - dnl ======================================================================= diff --git a/libs/xmlrpc-c/patches/010-nanosleep.patch b/libs/xmlrpc-c/patches/010-nanosleep.patch new file mode 100644 index 00000000..a40ceef9 --- /dev/null +++ b/libs/xmlrpc-c/patches/010-nanosleep.patch @@ -0,0 +1,20 @@ +--- a/lib/libutil/sleep.c ++++ b/lib/libutil/sleep.c +@@ -8,7 +8,7 @@ + # include + # include + #else +-# include ++# include + #endif + + +@@ -18,6 +18,7 @@ xmlrpc_millisecond_sleep(unsigned int const milliseconds) { + #if MSVCRT + SleepEx(milliseconds, true); + #else +- usleep(milliseconds * 1000); ++ const struct timespec req = {0, milliseconds * 1000 * 1000}; ++ nanosleep(&req, NULL); + #endif + } diff --git a/libs/xr_usb_serial_common/Makefile b/libs/xr_usb_serial_common/Makefile index a2091dfa..b3797176 100644 --- a/libs/xr_usb_serial_common/Makefile +++ b/libs/xr_usb_serial_common/Makefile @@ -34,7 +34,7 @@ define Build/Compile +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - SUBDIRS="$(PKG_BUILD_DIR)/xr_usb_serial_common-1a" \ + M="$(PKG_BUILD_DIR)/xr_usb_serial_common-1a" \ modules endef diff --git a/libs/yajl/Makefile b/libs/yajl/Makefile index 843b5967..d3972542 100644 --- a/libs/yajl/Makefile +++ b/libs/yajl/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2014, 2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. @@ -9,18 +9,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=yajl PKG_VERSION:=2.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/lloyd/yajl +PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_MIRROR_HASH:=0cd74320be0270a07931e42d2f14f87a8b3fb664ecb5db58b0e838886211ab1f + PKG_MAINTAINER:=Charles Southerland PKG_LICENSE:=ISC PKG_LICENSE_FILES:=COPYING -PKG_REV:=66cb08ca2ad8581080b626a75dfca266a890afb2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=95bfdb37f864318fc3c2ee736a747d4902d279a88f361770c89e60ff5e1d6f63 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_URL:=git://github.com/lloyd/yajl.git -PKG_SOURCE_PROTO:=git +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -29,7 +30,7 @@ define Package/yajl SECTION:=libs CATEGORY:=Libraries TITLE:=Yet Another JSON Library - URL:=http://lloyd.github.io/yajl + URL:=https://lloyd.github.io/yajl endef define Package/yajl/description @@ -40,18 +41,6 @@ YAJL is released under the ISC license. YAJL was created by Lloyd Hilaiel. endef -PKG_INSTALL:=1 - -CMAKE_OPTIONS += \ - -DCMAKE_BUILD_TYPE:String="Release" - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/yajl $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyajl.so* $(1)/usr/lib/ -endef - define Package/yajl/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyajl.so* $(1)/usr/lib/ diff --git a/libs/yaml/Makefile b/libs/yaml/Makefile index 22f98ee0..fcf06a50 100644 --- a/libs/yaml/Makefile +++ b/libs/yaml/Makefile @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=yaml -PKG_VERSION:=0.1.6 +PKG_VERSION:=0.2.5 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pyyaml.org/download/libyaml/ -PKG_HASH:=7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749 +PKG_SOURCE_URL:=https://pyyaml.org/download/libyaml/ +PKG_HASH:=c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4 +PKG_MAINTAINER:= PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -29,7 +30,7 @@ define Package/libyaml SECTION:=libs CATEGORY:=Libraries TITLE:=Fast YAML 1.1 parser and emitter library - URL:=http://pyyaml.org/wiki/LibYAML + URL:=https://pyyaml.org/wiki/LibYAML endef TARGET_CFLAGS += $(FPIC) diff --git a/libs/yubico-pam/Makefile b/libs/yubico-pam/Makefile new file mode 100644 index 00000000..69fe4a63 --- /dev/null +++ b/libs/yubico-pam/Makefile @@ -0,0 +1,51 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=yubico-pam +PKG_VERSION:=2.26 +PKG_RELEASE:=1 + +PKG_SOURCE:=pam_yubico-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://developers.yubico.com/yubico-pam/Releases +PKG_HASH:=2de96495963fefd72b98243952ca5d5ec513e702c596e54bc667ef6b5e252966 +PKG_MAINTAINER:=Stuart B. Wilkins +PKG_BUILD_DEPENDS:=ykclient ykpers libyubikey libpam curl +PKG_LICENSE_FILES:=COPYING +PKG_LICENSE:=BSD-2-Clause + +PKG_BUILD_DIR:=$(BUILD_DIR)/pam_yubico-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/yubico-pam + SECTION:=libs + CATEGORY:=Libraries + TITLE:=The Yuibco PAM module + URL:=https://developers.yubico.com/yubico-pam/ + DEPENDS:=+ykclient +ykpers +libyubikey +libpam +curl +endef + +define Package/yubico-pam/description + The Yubico PAM module provides an easy way to integrate the YubiKey + into your existing user authentication infrastructure. +endef + +CONFIGURE_VARS += YKPERS_CFLAGS=-I$(STAGING_DIR)/usr/include \ + YKPERS_LIBS=-L$(STAGING_DIR)/usr/lib \ + LDFLAGS="-Wl,-rpath-link,$(STAGING_DIR)/usr/lib \ + -L$(STAGING_DIR)/usr/lib" + +CONFIGURE_ARGS += --without-ldap \ + --enable-shared \ + --disable-static \ + +define Build/Compile + $(call Build/Compile/Default, \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -lykpers-1") +endef + +define Package/yubico-pam/install + $(INSTALL_DIR) $(1)/lib/security + $(CP) $(PKG_BUILD_DIR)/.libs/pam_yubico.so* $(1)/lib/security +endef + +$(eval $(call BuildPackage,yubico-pam,+ykclient,+ykpers,+libyubikey)) diff --git a/libs/zmq/Makefile b/libs/zmq/Makefile index a82a70ee..cfb6c70f 100644 --- a/libs/zmq/Makefile +++ b/libs/zmq/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. @@ -10,24 +10,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zeromq -PKG_VERSION:=4.1.4 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=LICENCE.txt +PKG_VERSION:=4.1.7 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= https://github.com/zeromq/zeromq4-1/releases/download/v$(PKG_VERSION)/ -PKG_HASH:=e99f44fde25c2e4cb84ce440f87ca7d3fe3271c2b8cfbc67d55e4de25e6fe378 +PKG_SOURCE_URL:=https://github.com/zeromq/zeromq4-1/releases/download/v$(PKG_VERSION) +PKG_HASH:=31c383cfcd3be1dc8a66e448c403029e793687e70473b89c4cc0bd626e7da299 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_FIXUP:=autoreconf +PKG_MAINTAINER:=Dirk Chang +PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE_FILES:=LICENCE.txt +PKG_CPE_ID:=cpe:/a:zeromq:libzmq PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_REMOVE_FILES:=autogen.sh acinclude.m4 aclocal.m4 - -include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/libzmq/default @@ -35,7 +33,7 @@ define Package/libzmq/default URL:=http://www.zeromq.org/ SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libuuid +libpthread +librt $(CXX_DEPENDS) + DEPENDS:=+libuuid +libpthread +librt +libstdcpp PROVIDES:=libzmq endef @@ -48,7 +46,7 @@ define Package/libzmq-curve $(call Package/libzmq/default) VARIANT:=curve TITLE+= (CurveZMQ) - DEPENDS+=+libsodium + DEPENDS+=+libsodium endef define Package/libzmq-nc/description @@ -63,7 +61,10 @@ endef # add extra configure flags here CONFIGURE_ARGS += \ --enable-static \ - --enable-shared + --enable-shared \ + --with-pic \ + --with-relaxed \ + --without-documentation ifeq ($(BUILD_VARIANT),curve) CONFIGURE_ARGS+= --with-libsodium @@ -71,6 +72,8 @@ else CONFIGURE_ARGS+= --without-libsodium endif +TARGET_CXXFLAGS += -Wno-error=cpp + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq.h $(1)/usr/include diff --git a/libs/zmq/patches/010-disable_pedantic_on_linux_with_ulibc++.patch b/libs/zmq/patches/010-disable_pedantic_on_linux_with_ulibc++.patch deleted file mode 100644 index f7ecc489..00000000 --- a/libs/zmq/patches/010-disable_pedantic_on_linux_with_ulibc++.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -148,8 +148,10 @@ case "${host_os}" in - *linux*) - # Define on Linux to enable all library features. Define if using a gnu compiler - if test "x$GXX" = "xyes"; then -- CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" -+ CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS -Wno-long-long" - fi -+ libzmq_pedantic="no" -+ libzmq_werror="no" - AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS]) - libzmq_on_linux="yes" - diff --git a/libs/zmq/patches/020-map_with_const_string_with_ublic++.patch b/libs/zmq/patches/020-map_with_const_string_with_ublic++.patch index 3e13e272..a0071606 100644 --- a/libs/zmq/patches/020-map_with_const_string_with_ublic++.patch +++ b/libs/zmq/patches/020-map_with_const_string_with_ublic++.patch @@ -1,41 +1,40 @@ --- a/src/metadata.hpp +++ b/src/metadata.hpp -@@ -41,7 +41,7 @@ namespace zmq +@@ -41,7 +41,11 @@ namespace zmq { public: -- typedef std::map dict_t; ++#ifdef __UCLIBCXX_MAJOR__ + typedef std::map dict_t; ++#else + typedef std::map dict_t; ++#endif metadata_t (const dict_t &dict); virtual ~metadata_t (); ---- a/src/socket_base.cpp -+++ b/src/socket_base.cpp -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include "platform.hpp" - --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp -@@ -208,7 +208,7 @@ void zmq::stream_engine_t::plug (io_thre +@@ -208,7 +208,11 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_, // Compile metadata. typedef metadata_t::dict_t properties_t; properties_t properties; -- properties.insert(std::make_pair("Peer-Address", peer_address)); ++#ifdef __UCLIBCXX_MAJOR__ + properties.insert(std::make_pair("Peer-Address", peer_address)); ++#else + properties.insert(std::make_pair("Peer-Address", peer_address)); ++#endif zmq_assert (metadata == NULL); metadata = new (std::nothrow) metadata_t (properties); } -@@ -815,7 +815,7 @@ void zmq::stream_engine_t::mechanism_rea +@@ -824,7 +828,11 @@ void zmq::stream_engine_t::mechanism_ready () // If we have a peer_address, add it to metadata if (!peer_address.empty()) { -- properties.insert(std::make_pair("Peer-Address", peer_address)); ++#ifdef __UCLIBCXX_MAJOR__ + properties.insert(std::make_pair("Peer-Address", peer_address)); ++#else + properties.insert(std::make_pair("Peer-Address", peer_address)); ++#endif } // Add ZAP properties. diff --git a/libs/zmq/patches/050-nanosleep.patch b/libs/zmq/patches/050-nanosleep.patch new file mode 100644 index 00000000..5e48c075 --- /dev/null +++ b/libs/zmq/patches/050-nanosleep.patch @@ -0,0 +1,54 @@ +--- a/src/signaler.cpp ++++ b/src/signaler.cpp +@@ -86,7 +86,8 @@ static int sleep_ms (unsigned int ms_) + usleep (ms_ * 1000); + return 0; + #else +- return usleep (ms_ * 1000); ++ const struct timespec req = {0, (long int)ms_ * 1000 * 1000}; ++ return nanosleep (&req, NULL); + #endif + } + +--- a/src/tcp_address.cpp ++++ b/src/tcp_address.cpp +@@ -29,6 +29,7 @@ + + #include + #include ++#include + + #include "tcp_address.hpp" + #include "platform.hpp" +@@ -194,7 +195,8 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_ + rc = getifaddrs (&ifa); + if (rc == 0 || (rc < 0 && errno != ECONNREFUSED)) + break; +- usleep ((backoff_msec << i) * 1000); ++ const struct timespec req = {0, (backoff_msec << i) * 1000 * 1000}; ++ nanosleep (&req, NULL); + } + errno_assert (rc == 0); + zmq_assert (ifa != NULL); +--- a/src/zmq.cpp ++++ b/src/zmq.cpp +@@ -692,7 +692,8 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) + usleep (timeout_ * 1000); + return 0; + #else +- return usleep (timeout_ * 1000); ++ const struct timespec req = {0, timeout_ * 1000 * 1000}; ++ return nanosleep (&req, NULL); + #endif + } + +@@ -852,7 +853,8 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) + Sleep (timeout_ > 0 ? timeout_ : INFINITE); + return 0; + #else +- return usleep (timeout_ * 1000); ++ const struct timespec req = {0, timeout_ * 1000 * 1000}; ++ return nanosleep (&req, NULL); + #endif + } + zmq::clock_t clock; diff --git a/libs/zmq/patches/100-fix-cxx-include-order.patch b/libs/zmq/patches/100-fix-cxx-include-order.patch deleted file mode 100644 index 120e9659..00000000 --- a/libs/zmq/patches/100-fix-cxx-include-order.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- a/src/mtrie.cpp -+++ b/src/mtrie.cpp -@@ -27,11 +27,11 @@ - along with this program. If not, see . - */ - --#include -- - #include - #include - -+#include -+ - #include "platform.hpp" - #if defined ZMQ_HAVE_WINDOWS - #include "windows.hpp" ---- a/src/raw_encoder.cpp -+++ b/src/raw_encoder.cpp -@@ -27,6 +27,11 @@ - along with this program. If not, see . - */ - -+#include -+#include -+#include -+#include -+ - #include "encoder.hpp" - #include "raw_encoder.hpp" - #include "likely.hpp" ---- a/src/trie.cpp -+++ b/src/trie.cpp -@@ -27,11 +27,11 @@ - along with this program. If not, see . - */ - --#include -- - #include - #include - -+#include -+ - #include "platform.hpp" - #if defined ZMQ_HAVE_WINDOWS - #include "windows.hpp" ---- a/src/encoder.hpp -+++ b/src/encoder.hpp -@@ -39,7 +39,6 @@ - #include - #include - #include --#include - - #include "err.hpp" - #include "msg.hpp" ---- a/src/v1_encoder.cpp -+++ b/src/v1_encoder.cpp -@@ -27,6 +27,11 @@ - along with this program. If not, see . - */ - -+#include -+#include -+#include -+#include -+ - #include "encoder.hpp" - #include "v1_encoder.hpp" - #include "likely.hpp" ---- a/src/v2_encoder.cpp -+++ b/src/v2_encoder.cpp -@@ -27,6 +27,11 @@ - along with this program. If not, see . - */ - -+#include -+#include -+#include -+#include -+ - #include "v2_protocol.hpp" - #include "v2_encoder.hpp" - #include "likely.hpp" diff --git a/mail/alpine/Makefile b/mail/alpine/Makefile index 8f805086..0abf3bb7 100644 --- a/mail/alpine/Makefile +++ b/mail/alpine/Makefile @@ -8,20 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=alpine -PKG_VERSION:=2.20 -PKG_RELEASE:=2 +PKG_VERSION:=2.23 +PKG_RELEASE:=1 -PKG_SOURCE_URL:=http://patches.freeiz.com/alpine/release/src/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=ed639b6e5bb97e6b0645c85262ca6a784316195d461ce8d8411999bf80449227 +PKG_SOURCE_URL:=http://alpine.x10host.com/alpine/release/src +PKG_HASH:=793a61215c005b5fcffb48f642f125915276b7ec7827508dd9e83d4c4da91f7b PKG_MAINTAINER:=Antti Seppälä PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_INSTALL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -31,7 +30,7 @@ define Package/alpine/Default CATEGORY:=Mail DEPENDS:=+libopenssl +libncurses +libpthread +libpam $(ICONV_DEPENDS) $(INTL_DEPENDS) TITLE:=Alternatively Licensed Program for Internet News and Email - URL:=http://www.washington.edu/alpine + URL:=http://alpine.x10host.com/alpine/ endef define Package/alpine/Default/description @@ -77,6 +76,7 @@ CONFIGURE_ARGS += \ --disable-debug \ --disable-mouse \ --with-c-client-target=slx \ + $(if $(CONFIG_IPV6),--with,--without)-ipv6 CONFIGURE_VARS += \ top_builddir=$(PKG_BUILD_DIR) @@ -85,23 +85,11 @@ ifeq ($(BUILD_VARIANT),ssl) CONFIGURE_ARGS += \ --with-ssl-include-dir=$(STAGING_DIR)/usr/include/openssl/. \ --with-ssl-lib-dir=$(STAGING_DIR)/usr/lib -endif - -ifeq ($(BUILD_VARIANT),nossl) +else CONFIGURE_ARGS += \ --without-ssl endif -ifeq ($(CONFIG_BUILD_NLS),y) - DISABLE_NLS:= -endif - -ifeq ($(CONFIG_IPV6),y) - DISABLE_IPV6:= -else - DISABLE_IPV6:=--without-ipv6 -endif - define Build/Compile ( cd $(PKG_BUILD_DIR)/pith ; \ $(HOSTCC) help_h_gen.c -c -o help_h_gen.o ; \ @@ -114,7 +102,7 @@ endef define Package/alpine/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alpine $(1)/usr/bin/ endef Package/alpine-nossl/install = $(Package/alpine/install) diff --git a/mail/alpine/patches/100-no-openssl-check-cross-compile.patch b/mail/alpine/patches/100-no-openssl-check-cross-compile.patch deleted file mode 100644 index 40430986..00000000 --- a/mail/alpine/patches/100-no-openssl-check-cross-compile.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Nru alpine-2.20-orig/configure alpine-2.20/configure ---- alpine-2.20-orig/configure 2015-01-18 09:00:42.100645053 +0200 -+++ alpine-2.20/configure 2015-01-25 12:01:11.831015443 +0200 -@@ -17643,10 +17643,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Openssl library version >= 1.0.1c" >&5 - $as_echo_n "checking Openssl library version >= 1.0.1c... " >&6; } - if test "$cross_compiling" = yes; then : -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "cannot run test program while cross compiling --See \`config.log' for more details" "$LINENO" 5; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5 -+$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ -diff -Nru alpine-2.20-orig/configure.ac alpine-2.20/configure.ac ---- alpine-2.20-orig/configure.ac 2015-01-18 08:38:08.893495949 +0200 -+++ alpine-2.20/configure.ac 2015-01-25 12:01:02.773015236 +0200 -@@ -1370,7 +1370,8 @@ - } - ]])], - [ AC_MSG_RESULT(yes) ], -- [ alpine_SSLTYPE="none" ]) -+ [ alpine_SSLTYPE="none" ], -+ [ AC_MSG_WARN([cross compiling: not checking])]) - - if test "x$alpine_SSLTYPE" = "xnone" ; then - AC_MSG_ERROR(Install openssl version >= 1.0.1c) diff --git a/mail/bogofilter/Makefile b/mail/bogofilter/Makefile index 01a5a148..43c2bc6d 100644 --- a/mail/bogofilter/Makefile +++ b/mail/bogofilter/Makefile @@ -8,17 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bogofilter -PKG_VERSION:=1.2.4 -PKG_RELEASE:=4 +PKG_VERSION:=1.2.5 +PKG_RELEASE:=1 -PKG_LICENSE:=GPLv2 +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:bogofilter:bogofilter -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/bogofilter -PKG_HASH:=e10287a58d135feaea26880ce7d4b9fa2841fb114a2154bf7da8da98aab0a6b4 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@SF/project/bogofilter/bogofilter-stable/ +PKG_HASH:=3248a1373bff552c500834adbea4b6caee04224516ae581fb25a4c6a6dee89ea PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -40,6 +42,10 @@ CONFIGURE_ARGS += \ --with-libdb-prefix=$(STAGING_DIR) \ --with-included-gsl +define Package/bogofilter/conffiles +/etc/bogofilter.cf +endef + define Package/bogofilter/install $(INSTALL_DIR) $(1)/etc/ \ $(1)/usr/bin \ diff --git a/mail/clamsmtp/Makefile b/mail/clamsmtp/Makefile index 449594b3..3eb6d88b 100644 --- a/mail/clamsmtp/Makefile +++ b/mail/clamsmtp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=clamsmtp PKG_VERSION:=1.10 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE_URL:=http://thewalter.net/stef/software/clamsmtp/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/mail/clamsmtp/patches/010-fix-build.patch b/mail/clamsmtp/patches/010-fix-build.patch new file mode 100644 index 00000000..a285a773 --- /dev/null +++ b/mail/clamsmtp/patches/010-fix-build.patch @@ -0,0 +1,19 @@ +--- a/configure.in ++++ b/configure.in +@@ -78,16 +78,6 @@ AC_CHECK_HEADERS([limits.h err.h paths.h],,) + AC_CHECK_HEADERS([unistd.h stdio.h stddef.h fcntl.h stdlib.h assert.h errno.h stdarg.h string.h netdb.h], , + [echo "ERROR: Required C header missing"; exit 1]) + +-# Check for linux type transparent proxy support +-AC_CHECK_HEADERS([linux/netfilter_ipv4.h], +- AC_DEFINE(LINUX_TRANSPARENT_PROXY, 1, [Whether the system supports a linux type transparent proxy]), +- , +- [[ +- #ifdef HAVE_LIMITS_H +- #include +- #endif +- ]] ) +- + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + AC_TYPE_SIZE_T diff --git a/mail/dovecot/Config.in b/mail/dovecot/Config.in new file mode 100644 index 00000000..0f48b9f1 --- /dev/null +++ b/mail/dovecot/Config.in @@ -0,0 +1,40 @@ +menu "Select dovecot build options" + depends on PACKAGE_dovecot + +config DOVECOT_GSSAPI + bool "GSSAPI support" + default n + help + Implements GSSAPI support in dovecot. + +config DOVECOT_LDAP + bool "LDAP support" + default n + help + Implements LDAP support in dovecot. + +config DOVECOT_MYSQL + bool "MYSQL support" + default n + help + Implements MYSQL support in dovecot. + +config DOVECOT_PGSQL + bool "PostgreSQL support" + default n + help + Implements PostgreSQL support in dovecot. + +config DOVECOT_SQLITE + bool "SQLite support" + default n + help + Implements SQLite DB support in dovecot. + +config DOVECOT_ICU +bool "Enable i18n features" + default n + help + Enable ICU (International Components for Unicode) support. + +endmenu diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile index 500b4679..ab0dcf05 100644 --- a/mail/dovecot/Makefile +++ b/mail/dovecot/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2014 OpenWrt.org +# Copyright (C) 2006-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,18 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dovecot -PKG_VERSION:=2.2.35 +PKG_VERSION:=2.3.10.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2 -PKG_HASH:=cce15db2fc5233386b63a3cf21c465c09e6e55014ed66c4f184b7d221a47180c -PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique -PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT -PKG_MAINTAINER:=Lucian Cristian +PKG_SOURCE_URL:=https://dovecot.org/releases/2.3 +PKG_HASH:=6642e62f23b1b23cfac235007ca6e21cb67460cca834689fad450724456eb10c + +PKG_MAINTAINER:=Lucian Cristian +PKG_LICENSE:=LGPL-2.1-only MIT BSD-3-Clause +PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT +PKG_CPE_ID:=cpe:/a:dovecot:dovecot -PKG_BUILD_DEPENDS:=libiconv PKG_CONFIG_DEPENDS:= \ + CONFIG_DOVECOT_GSSAPI \ CONFIG_DOVECOT_LDAP \ CONFIG_DOVECOT_MYSQL \ CONFIG_DOVECOT_PGSQL \ @@ -28,16 +30,20 @@ PKG_CONFIG_DEPENDS:= \ PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk +# iconv is needed when compiling with MySQL support. iconv will also be used by +# dovecot itself. +include $(INCLUDE_DIR)/nls.mk define Package/dovecot SECTION:=mail CATEGORY:=Mail - DEPENDS:=+DOVECOT_LDAP:libopenldap +DOVECOT_MYSQL:libmysqlclient +DOVECOT_PGSQL:libpq +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap +DOVECOT_ICU:icu TITLE:=An IMAP and POP3 daemon - URL:=http://www.dovecot.org/ - USERID:=dovecot=59:dovecot=59 + URL:=https://www.dovecot.org/ + DEPENDS:=+DOVECOT_GSSAPI:krb5-libs +DOVECOT_LDAP:libopenldap +DOVECOT_MYSQL:libmysqlclient +DOVECOT_PGSQL:libpq +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap +DOVECOT_ICU:icu $(ICONV_DEPENDS) + USERID:=dovecot=59:dovecot=59 dovenull=60:dovenull=60 ABI_VERSION:=$(PKG_VERSION) endef @@ -46,38 +52,10 @@ define Package/dovecot/description endef define Package/dovecot/config - menu "Select dovecot build options" - depends on PACKAGE_dovecot - config DOVECOT_LDAP - bool "LDAP support" - default n - help - Implements LDAP support in dovecot. - config DOVECOT_MYSQL - bool "MYSQL support" - default n - help - Implements MYSQL support in dovecot. - config DOVECOT_PGSQL - bool "PostgreSQL support" - default n - help - Implements PostgreSQL support in dovecot. - config DOVECOT_SQLITE - bool "SQLite support" - default n - help - Implements SQLite DB support in dovecot. - config DOVECOT_ICU - bool "Enable i18n features" - default n - help - Enable ICU (International Components for Unicode) support. - endmenu + source "$(SOURCE)/Config.in" endef define Package/dovecot/conffiles -/etc/init.d/dovecot /etc/dovecot/ endef @@ -89,12 +67,14 @@ define Package/dovecot-utils endef CONFIGURE_ARGS += \ - --without-gssapi \ + --libexecdir=/usr/libexec \ + --without-libunwind \ --without-pam \ - --with-moduledir=/usr/lib/dovecot/modules \ --with-notify=dnotify \ --without-lzma \ --without-lz4 \ + --without-sodium \ + $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \ $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \ $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \ $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \ @@ -112,31 +92,37 @@ CONFIGURE_VARS += \ lib_cv_va_copy=yes \ lib_cv_va_copy=yes \ lib_cv___va_copy=yes \ - lib_cv_va_val_copy=yes + lib_cv_va_val_copy=yes \ + ac_cv_prog_KRB5CONFIG="krb5-config" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/ - rm -f $(1)/usr/lib/dovecot/*.la + $(call libtool_remove_files,$(1)) endef define Package/dovecot/install - $(INSTALL_DIR) $(1)/etc/init.d \ - $(1)/etc/dovecot \ - $(1)/usr/share/doc/dovecot \ - $(1)/usr/lib/dovecot \ - $(1)/usr/bin \ - $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot + + $(INSTALL_DIR) $(1)/etc/dovecot + $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config/* $(1)/etc/dovecot/ + + $(INSTALL_DIR) $(1)/usr/lib/dovecot + $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/ rm $(1)/usr/lib/dovecot/dovecot-config - find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm + find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | $(XARGS) rm -f + + $(INSTALL_DIR) $(1)/usr/libexec/dovecot + $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/ + + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ endef define Package/dovecot-utils/install diff --git a/mail/dovecot/patches/001-configure_in.patch b/mail/dovecot/patches/001-configure_in.patch index 7cf68fcd..11c31b87 100644 --- a/mail/dovecot/patches/001-configure_in.patch +++ b/mail/dovecot/patches/001-configure_in.patch @@ -1,31 +1,91 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -488,9 +488,9 @@ have_ioloop=no - - if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then - AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[ +--- a/m4/fd_passing.m4 ++++ b/m4/fd_passing.m4 +@@ -8,7 +8,7 @@ AC_DEFUN([DOVECOT_FD_PASSING], [ + CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS" + fi + +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #include + #include + #include +@@ -16,7 +16,7 @@ AC_DEFUN([DOVECOT_FD_PASSING], [ + #include + #include + #include "fdpass.h" +- ++ ], [ + static + int nopen(void) + { +--- a/m4/glibc.m4 ++++ b/m4/glibc.m4 +@@ -17,7 +17,7 @@ AC_DEFUN([DOVECOT_GLIBC], [ + dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. + dnl * It may also be broken in AIX. + AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[ - AC_TRY_RUN([ + AC_TRY_LINK([ - #include -- + #define _XOPEN_SOURCE 600 + #include + #include +@@ -26,6 +26,7 @@ AC_DEFUN([DOVECOT_GLIBC], [ + #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) + possibly broken posix_fallocate + #endif + ], [ - int main() - { - return epoll_create(5) < 1; -@@ -594,7 +594,7 @@ fi - dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. - dnl * It may also be broken in AIX. - AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[ -- AC_TRY_RUN([ -+ AC_TRY_LINK([ - #define _XOPEN_SOURCE 600 - #include - #include -@@ -603,6 +603,7 @@ AC_CACHE_CHECK([whether posix_fallocate( - #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) - possibly broken posix_fallocate - #endif -+ ], [ - int main() { - int fd = creat("conftest.temp", 0600); - int ret; + int main() { + int fd = creat("conftest.temp", 0600); + int ret; +--- a/m4/ioloop.m4 ++++ b/m4/ioloop.m4 +@@ -4,9 +4,9 @@ AC_DEFUN([DOVECOT_IOLOOP], [ + + if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then + AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[ +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #include +- ++ ], [ + int main() + { + return epoll_create(5) < 1; +--- a/m4/mmap_write.m4 ++++ b/m4/mmap_write.m4 +@@ -1,7 +1,7 @@ + dnl * If mmap() plays nicely with write() + AC_DEFUN([DOVECOT_MMAP_WRITE], [ + AC_CACHE_CHECK([whether shared mmaps get updated by write()s],i_cv_mmap_plays_with_write,[ +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #include + #include + #include +@@ -9,6 +9,7 @@ AC_DEFUN([DOVECOT_MMAP_WRITE], [ + #include + #include + #include ++ ], [ + int main() { + /* return 0 if we're signed */ + int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600); +--- a/m4/want_gssapi.m4 ++++ b/m4/want_gssapi.m4 +@@ -54,7 +54,7 @@ AC_DEFUN([DOVECOT_WANT_GSSAPI], [ + + # does the kerberos library support SPNEGO? + AC_CACHE_CHECK([whether GSSAPI supports SPNEGO],i_cv_gssapi_spnego,[ +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #ifdef HAVE_GSSAPI_H + # include + #else +@@ -62,6 +62,7 @@ AC_DEFUN([DOVECOT_WANT_GSSAPI], [ + #endif + #include + #include ++ ], [ + int main(void) { + OM_uint32 minor_status; + gss_OID_set mech_set; diff --git a/mail/dovecot/patches/050-fix-dovecot-config-for-cross-compile.patch b/mail/dovecot/patches/050-fix-dovecot-config-for-cross-compile.patch new file mode 100644 index 00000000..2fd49d9b --- /dev/null +++ b/mail/dovecot/patches/050-fix-dovecot-config-for-cross-compile.patch @@ -0,0 +1,56 @@ +pigeonhole: Fix managesieve-login needs libdovecot-login + +When trying to use managesieve my MUA complained sieve wasn't supported. +On investigation dovecot logs the following could be seen: + + Aug 16 00:28:44 managesieve-login: Fatal: master: + service(managesieve-login): child 1430 returned error 127 + Aug 16 00:31:32 managesieve-login: Error: Error loading shared + library libdovecot-login.so.0: No such file or directory + (needed by /usr/lib/dovecot/managesieve-login) + Aug 16 00:31:32 managesieve-login: Error: Error loading + shared library libdovecot.so.0: No such file or directory + (needed by /usr/lib/dovecot/managesieve-login) + Aug 16 00:31:32 managesieve-login: Error: Error relocating + /usr/lib/dovecot/managesieve-login: net_ip2addr: symbol not found + +The issue (verified with readelf on non-working build and build with my fix) +is that there is no RPATH information in the pigeonhole binaries (like +managesieve-login). + +The dovecot-config that is 'installed' in the staging dir +assumes that plugins will be built on the same host as the installed files. +The 'installed' dovecot-config (partial) looks like: + +LIBDOVECOT='-L/usr/lib/dovecot -ldovecot' +LIBDOVECOT_LOGIN='-ldovecot-login -L/home/user/Build/openwrt/openwrt-ath79/staging_dir/target-mips_24kc_musl/usr/lib -lssl -lcrypto' +LIBDOVECOT_SQL=-ldovecot-sql +LIBDOVECOT_COMPRESS=-ldovecot-compression +LIBDOVECOT_LDA=-ldovecot-lda +LIBDOVECOT_STORAGE='-ldovecot-storage ' +LIBDOVECOT_DSYNC=-ldovecot-dsync +LIBDOVECOT_LIBFTS=-ldovecot-fts + +This patch modifed dovecot-config that gets installed on the assumption +that users of libdovecot will also be cross-compiled (a safe bet). +--- a/Makefile.am ++++ b/Makefile.am +@@ -73,7 +73,7 @@ install-exec-hook: + grep -v '^LIBDOVECOT_.*_INCLUDE' dovecot-config | \ + grep -v '^LIBDOVECOT.*_DEPS' | sed \ + -e "s|^\(DOVECOT_INSTALLED\)=.*$$|\1=yes|" \ +- -e "s|^\(LIBDOVECOT\)=.*$$|\1='-L$(pkglibdir) -ldovecot'|" \ ++ -e "s|^\(LIBDOVECOT\)=.*$$|\1='-L$(STAGING_DIR)$(pkglibdir) -ldovecot'|" \ + -e "s|^\(LIBDOVECOT_LOGIN\)=.*$$|\1='-ldovecot-login $(SSL_LIBS)'|" \ + -e "s|^\(LIBDOVECOT_SQL\)=.*$$|\1=-ldovecot-sql|" \ + -e "s|^\(LIBDOVECOT_COMPRESS\)=.*$$|\1=-ldovecot-compression|" \ +@@ -81,7 +81,8 @@ install-exec-hook: + -e "s|^\(LIBDOVECOT_LDA\)=.*$$|\1=-ldovecot-lda|" \ + -e "s|^\(LIBDOVECOT_LIBFTS\)=.*$$|\1=-ldovecot-fts|" \ + -e "s|^\(LIBDOVECOT_STORAGE\)=.*$$|\1='-ldovecot-storage $(LINKED_STORAGE_LDADD)'|" \ +- -e "s|^\(LIBDOVECOT_INCLUDE\)=.*$$|\1=-I$(pkgincludedir)|" \ ++ -e "s|^\(LIBDOVECOT_INCLUDE\)=.*$$|\1=-I$(STAGING_DIR)$(pkgincludedir)|" \ ++ -e "s|^\(DOVECOT_BINARY_LDFLAGS=\".*\)\"$$|\1 -Wl,-rpath -Wl,$(pkglibdir)\"|" \ + > $(DESTDIR)$(pkglibdir)/dovecot-config + + uninstall-hook: diff --git a/mail/dovecot/patches/100-openssl-deprecated.patch b/mail/dovecot/patches/100-openssl-deprecated.patch new file mode 100644 index 00000000..e0d40e1e --- /dev/null +++ b/mail/dovecot/patches/100-openssl-deprecated.patch @@ -0,0 +1,63 @@ +--- a/src/lib-dcrypt/dcrypt-openssl.c ++++ b/src/lib-dcrypt/dcrypt-openssl.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include "dcrypt.h" + #include "dcrypt-private.h" + +--- a/src/lib-ssl-iostream/dovecot-openssl-common.c ++++ b/src/lib-ssl-iostream/dovecot-openssl-common.c +@@ -63,9 +63,11 @@ void dovecot_openssl_common_global_ref(v + /*i_warning("CRYPTO_set_mem_functions() was called too late");*/ + } + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init(); + SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); ++#endif + } + + bool dovecot_openssl_common_global_unref(void) +@@ -79,6 +81,7 @@ bool dovecot_openssl_common_global_unref + ENGINE_finish(dovecot_openssl_engine); + dovecot_openssl_engine = NULL; + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + /* OBJ_cleanup() is called automatically by EVP_cleanup() in + newer versions. Doesn't hurt to call it anyway. */ + OBJ_cleanup(); +@@ -101,6 +104,7 @@ bool dovecot_openssl_common_global_unref + #ifdef HAVE_OPENSSL_CLEANUP + OPENSSL_cleanup(); + #endif ++#endif + return FALSE; + } + +--- a/src/lib-ssl-iostream/iostream-openssl-context.c ++++ b/src/lib-ssl-iostream/iostream-openssl-context.c +@@ -6,6 +6,9 @@ + #include "dovecot-openssl-common.h" + + #include ++#include ++#include ++#include + #include + #include + #include +@@ -514,8 +517,10 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX + int nid; + const char *curve_name; + #endif ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (SSL_CTX_need_tmp_RSA(ssl_ctx) != 0) + SSL_CTX_set_tmp_rsa_callback(ssl_ctx, ssl_gen_rsa_key); ++#endif + if (set->dh == NULL || *set->dh == '\0') + SSL_CTX_set_tmp_dh_callback(ssl_ctx, ssl_tmp_dh_callback); + #ifdef HAVE_ECDH diff --git a/mail/dovecot/patches/110-openssl-engine.patch b/mail/dovecot/patches/110-openssl-engine.patch new file mode 100644 index 00000000..6f8d4711 --- /dev/null +++ b/mail/dovecot/patches/110-openssl-engine.patch @@ -0,0 +1,87 @@ +--- a/src/lib-dcrypt/dcrypt-openssl.c ++++ b/src/lib-dcrypt/dcrypt-openssl.c +@@ -17,10 +17,12 @@ + #include + #include + #include +-#include + #include + #include + #include ++#ifndef OPENSSL_NO_ENGINE ++#include ++#endif + #include "dcrypt.h" + #include "dcrypt-private.h" + +@@ -179,11 +181,13 @@ static bool dcrypt_openssl_error(const c + static bool dcrypt_openssl_initialize(const struct dcrypt_settings *set, + const char **error_r) + { ++#ifndef OPENSSL_NO_ENGINE + if (set->crypto_device != NULL && set->crypto_device[0] != '\0') { + if (dovecot_openssl_common_global_set_engine( + set->crypto_device, error_r) <= 0) + return FALSE; + } ++#endif + return TRUE; + } + +--- a/src/lib-ssl-iostream/dovecot-openssl-common.c ++++ b/src/lib-ssl-iostream/dovecot-openssl-common.c +@@ -5,11 +5,14 @@ + #include "dovecot-openssl-common.h" + + #include +-#include + #include ++#ifndef OPENSSL_NO_ENGINE ++#include + +-static int openssl_init_refcount = 0; + static ENGINE *dovecot_openssl_engine; ++#endif ++ ++static int openssl_init_refcount = 0; + + #ifdef HAVE_SSL_NEW_MEM_FUNCS + static void *dovecot_openssl_malloc(size_t size, const char *u0 ATTR_UNUSED, int u1 ATTR_UNUSED) +@@ -77,10 +80,12 @@ bool dovecot_openssl_common_global_unref + if (--openssl_init_refcount > 0) + return TRUE; + ++#ifndef OPENSSL_NO_ENGINE + if (dovecot_openssl_engine != NULL) { + ENGINE_finish(dovecot_openssl_engine); + dovecot_openssl_engine = NULL; + } ++#endif + #if OPENSSL_VERSION_NUMBER < 0x10100000L + /* OBJ_cleanup() is called automatically by EVP_cleanup() in + newer versions. Doesn't hurt to call it anyway. */ +@@ -88,7 +93,9 @@ bool dovecot_openssl_common_global_unref + #ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS + SSL_COMP_free_compression_methods(); + #endif ++#ifndef OPENSSL_NO_ENGINE + ENGINE_cleanup(); ++#endif + EVP_cleanup(); + CRYPTO_cleanup_all_ex_data(); + #ifdef HAVE_OPENSSL_AUTO_THREAD_DEINIT +@@ -111,6 +118,7 @@ bool dovecot_openssl_common_global_unref + int dovecot_openssl_common_global_set_engine(const char *engine, + const char **error_r) + { ++#ifndef OPENSSL_NO_ENGINE + if (dovecot_openssl_engine != NULL) + return 1; + +@@ -132,5 +140,6 @@ int dovecot_openssl_common_global_set_en + dovecot_openssl_engine = NULL; + return -1; + } ++#endif + return 1; + } diff --git a/mail/emailrelay/Makefile b/mail/emailrelay/Makefile index b9b595fe..e6e81f63 100644 --- a/mail/emailrelay/Makefile +++ b/mail/emailrelay/Makefile @@ -8,22 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=emailrelay -PKG_VERSION:=1.9 -PKG_RELEASE:=5 +PKG_VERSION:=2.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION) -PKG_HASH:=869a3e2d053237d7f63784acc25e748af2dbf2d9b9c5c48e4a5269d4e4b5bda0 -PKG_MAINTAINER:=Federico Di Marco +PKG_HASH:=dcb1fc0cbb3d5407554685616e7ef691f30f733b4484979be0794c9d5f563762 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_MAINTAINER:=Federico Di Marco +PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING PKG_CONFIG_DEPENDS:=CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG CONFIG_EMAILRELAY_SSL -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -#include $(INCLUDE_DIR)/uclibc++.mk # $(CXX_DEPENDS) include $(INCLUDE_DIR)/package.mk define Package/emailrelay @@ -74,38 +71,37 @@ endef CONFIGURE_ARGS += \ - --with-pam=no \ - --enable-testing=no - -CONFIGURE_VARS += \ - CXXFLAGS="$$$$CXXFLAGS -fno-rtti" - + --without-doxygen \ + --without-man2html \ + --without-mbedtls \ + --without-pam \ + --disable-bsd \ + --disable-gui \ + --disable-mac \ + --disable-testing \ + --disable-windows ifeq ($(CONFIG_EMAILRELAY_SSL),y) CONFIGURE_ARGS += \ --with-openssl else CONFIGURE_ARGS += \ - --with-openssl=no + --without-openssl endif - ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y) CONFIGURE_ARGS += \ --enable-debug=yes endif -ifeq ($(CONFIG_OPENSSL_WITH_SSL3),y) - CONFIGURE_VARS += \ - CXXFLAGS="$$$$CXXFLAGS -DSSL3_SUPPORT" -endif +TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_CXXFLAGS += -Wl,--gc-sections,--as-needed define Package/emailrelay/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-poke $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/ diff --git a/mail/emailrelay/files/emailrelay.config b/mail/emailrelay/files/emailrelay.config index 1a4eb675..7b73de89 100644 --- a/mail/emailrelay/files/emailrelay.config +++ b/mail/emailrelay/files/emailrelay.config @@ -3,6 +3,9 @@ config emailrelay 'server' option mode 'server' option port '25' option remote_clients '0' +# option address_verifier '/usr/local/bin/address-verifier.sh' +# option domain 'my.example.com' +# option anonymous '1' # option server_tls '/etc/path/to/certificate' # option server_auth '/etc/emailrelay.auth' # option extra_cmdline '' @@ -13,6 +16,9 @@ config emailrelay 'proxy' option smarthost '192.0.2.1:25' option port '25' option remote_clients '0' +# option address_verifier '/usr/local/bin/address-verifier.sh' +# option domain 'my.example.com' +# option anonymous '1' # option server_tls '/etc/path/to/certificate' # option server_auth '/etc/emailrelay.auth' # option client_tls '1' diff --git a/mail/emailrelay/files/emailrelay.init b/mail/emailrelay/files/emailrelay.init index 5b78f217..28f1fdd0 100644 --- a/mail/emailrelay/files/emailrelay.init +++ b/mail/emailrelay/files/emailrelay.init @@ -9,7 +9,7 @@ NAME=emailrelay emailrelay_instance() { - local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth + local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth address_verifier domain anonymous config_get_bool enabled "$1" enabled config_get mode "$1" mode @@ -21,7 +21,9 @@ emailrelay_instance() config_get smarthost "$1" smarthost config_get_bool client_tls "$1" client_tls config_get client_auth "$1" client_auth - + config_get address_verifier "$1" address_verifier + config_get domain "$1" domain + config_get_bool anonymous "$1" anonymous [ "$enabled" = 0 ] && return 1 @@ -39,6 +41,9 @@ emailrelay_instance() [ -n "$server_auth" ] && procd_append_param command --server-auth "$server_auth" [ "$client_tls" = 1 ] && procd_append_param command --client-tls [ -n "$client_auth" ] && procd_append_param command --client-auth "$client_auth" + [ -n "$address_verifier" ] && procd_append_param command --address-verifier "$address_verifier" + [ -n "$domain" ] && procd_append_param command --domain "$domain" + [ "$anonymous" = 1 ] && procd_append_param command --anonymous ;; "cmdline") # empty by intention (just append extra_cmdline) diff --git a/mail/emailrelay/patches/010-openssl-1.1.patch b/mail/emailrelay/patches/010-openssl-1.1.patch new file mode 100644 index 00000000..5bba1abb --- /dev/null +++ b/mail/emailrelay/patches/010-openssl-1.1.patch @@ -0,0 +1,38 @@ +--- a/src/gssl/gssl_openssl.cpp ++++ b/src/gssl/gssl_openssl.cpp +@@ -51,10 +51,12 @@ GSsl::OpenSSL::LibraryImp::LibraryImp( G::StringArray & library_config , Library + m_verbose(verbose) , + m_config(library_config) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_load_error_strings() ; + SSL_library_init() ; +- int rc = RAND_status() ; G_IGNORE_VARIABLE(int,rc) ; + OpenSSL_add_all_digests() ; ++#endif ++ int rc = RAND_status() ; G_IGNORE_VARIABLE(int,rc) ; + + // allocate a slot for a pointer from SSL to ProtocolImp + m_index = SSL_get_ex_new_index( 0 , nullptr , nullptr , nullptr , nullptr ) ; +@@ -72,15 +74,21 @@ GSsl::OpenSSL::LibraryImp::~LibraryImp() + + void GSsl::OpenSSL::LibraryImp::cleanup() + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + // ffs... + ERR_free_strings() ; + RAND_cleanup() ; + CRYPTO_cleanup_all_ex_data(); ++#endif + } + + std::string GSsl::OpenSSL::LibraryImp::sid() + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + return G::Str::printable( SSLeay_version(SSLEAY_VERSION) ) ; ++#else ++ return G::Str::printable( OpenSSL_version(OPENSSL_VERSION) ) ; ++#endif + } + + std::string GSsl::OpenSSL::LibraryImp::id() const diff --git a/mail/emailrelay/patches/010-ssl3-fix.patch b/mail/emailrelay/patches/010-ssl3-fix.patch deleted file mode 100644 index d0e82f51..00000000 --- a/mail/emailrelay/patches/010-ssl3-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/gssl/gssl_openssl.cpp -+++ b/src/gssl/gssl_openssl.cpp -@@ -292,8 +292,10 @@ GSsl::Context::Context( const std::strin - { - if( (flags&3U) == 2U ) - m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ; -+#ifdef SSL3_SUPPORT - else if( (flags&3U) == 3U ) - m_ssl_ctx = SSL_CTX_new(SSLv3_method()) ; -+#endif - else - m_ssl_ctx = SSL_CTX_new(TLSv1_method()) ; - diff --git a/mail/fdm/Makefile b/mail/fdm/Makefile index 10396db2..25330a3b 100644 --- a/mail/fdm/Makefile +++ b/mail/fdm/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fdm -PKG_VERSION:=1.9 -PKG_RELEASE:=4 -PKG_LICENSE:=BSD-2-Clause +PKG_VERSION:=2.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/nicm/fdm/releases/download/$(PKG_VERSION) -PKG_HASH:=16416c38a9a7e32d187220cc5ae61a51463d5e4e47419c5c513f422523d39914 +PKG_HASH:=06b28cb6b792570bc61d7e29b13d2af46b92fea77e058b2b17e11e8f7ed0cea4 + +PKG_MAINTAINER:=Dmitry V. Zimin +PKG_LICENSE:=BSD-2-Clause PKG_FIXUP:=autoreconf - PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -28,7 +29,6 @@ define Package/fdm CATEGORY:=Mail TITLE:=fetch mail and deliver URL:=https://github.com/nicm/fdm - MAINTAINER:=Dmitry V. Zimin MENU:=1 DEPENDS:=+tdb +zlib +libopenssl +FDM_WITH_PCRE:libpcre USERID:=_fdm=99:_fdm=99 @@ -42,14 +42,9 @@ define Package/fdm/description endef ifdef CONFIG_FDM_WITH_PCRE - EXTRA_CFLAGS := -DPCRE - EXTRA_LDFLAGS += -lpcre + CONFIGURE_ARGS += --enable-pcre endif -MAKE_FLAGS += \ - PREFIX="/usr" \ - $(if $(CONFIG_FDM_WITH_PCRE),PCRE=1) - define Package/fdm/config source "$(SOURCE)/Config.in" endef diff --git a/mail/fdm/patches/010-Compat-fixes-from-Rosen-Penev.patch b/mail/fdm/patches/010-Compat-fixes-from-Rosen-Penev.patch deleted file mode 100644 index 4a927251..00000000 --- a/mail/fdm/patches/010-Compat-fixes-from-Rosen-Penev.patch +++ /dev/null @@ -1,388 +0,0 @@ -From eb7461e4ceab14020b3a129d826e4ee86f9da8c6 Mon Sep 17 00:00:00 2001 -From: Nicholas Marriott -Date: Tue, 26 Jun 2018 12:19:25 +0100 -Subject: [PATCH] Compat fixes from Rosen Penev. - ---- - Makefile.am | 6 + - compat/base64.c | 317 ++++++++++++++++++++++++++++++++++++++++++++++++ - fdm.h | 18 +++ - 3 files changed, 343 insertions(+), 2 deletions(-) - create mode 100644 compat/base64.c - -diff --git a/Makefile.am b/Makefile.am -index a4ebbf3..fb25d33 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -110,6 +110,9 @@ dist_fdm_SOURCES = \ - lex.c - - nodist_fdm_SOURCES = -+if NO_B64_NTOP -+nodist_fdm_SOURCES += compat/base64.c -+endif - if NO_STRLCAT - nodist_fdm_SOURCES += compat/strlcat.c - endif -diff --git a/compat/base64.c b/compat/base64.c -new file mode 100644 -index 0000000..4e44d6a ---- /dev/null -+++ b/compat/base64.c -@@ -0,0 +1,317 @@ -+/* $OpenBSD: base64.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */ -+ -+/* -+ * Copyright (c) 1996 by Internet Software Consortium. -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS -+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE -+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -+ * SOFTWARE. -+ */ -+ -+/* -+ * Portions Copyright (c) 1995 by International Business Machines, Inc. -+ * -+ * International Business Machines, Inc. (hereinafter called IBM) grants -+ * permission under its copyrights to use, copy, modify, and distribute this -+ * Software with or without fee, provided that the above copyright notice and -+ * all paragraphs of this notice appear in all copies, and that the name of IBM -+ * not be used in connection with the marketing of any product incorporating -+ * the Software or modifications thereof, without specific, written prior -+ * permission. -+ * -+ * To the extent it has a right to do so, IBM grants an immunity from suit -+ * under its patents, if any, for the use, sale or manufacture of products to -+ * the extent that such products are used for performing Domain Name System -+ * dynamic updates in TCP/IP networks by means of the Software. No immunity is -+ * granted for any product per se or for any other function of any product. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -+ * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "fdm.h" -+ -+static const char Base64[] = -+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -+static const char Pad64 = '='; -+ -+/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt) -+ The following encoding technique is taken from RFC 1521 by Borenstein -+ and Freed. It is reproduced here in a slightly edited form for -+ convenience. -+ -+ A 65-character subset of US-ASCII is used, enabling 6 bits to be -+ represented per printable character. (The extra 65th character, "=", -+ is used to signify a special processing function.) -+ -+ The encoding process represents 24-bit groups of input bits as output -+ strings of 4 encoded characters. Proceeding from left to right, a -+ 24-bit input group is formed by concatenating 3 8-bit input groups. -+ These 24 bits are then treated as 4 concatenated 6-bit groups, each -+ of which is translated into a single digit in the base64 alphabet. -+ -+ Each 6-bit group is used as an index into an array of 64 printable -+ characters. The character referenced by the index is placed in the -+ output string. -+ -+ Table 1: The Base64 Alphabet -+ -+ Value Encoding Value Encoding Value Encoding Value Encoding -+ 0 A 17 R 34 i 51 z -+ 1 B 18 S 35 j 52 0 -+ 2 C 19 T 36 k 53 1 -+ 3 D 20 U 37 l 54 2 -+ 4 E 21 V 38 m 55 3 -+ 5 F 22 W 39 n 56 4 -+ 6 G 23 X 40 o 57 5 -+ 7 H 24 Y 41 p 58 6 -+ 8 I 25 Z 42 q 59 7 -+ 9 J 26 a 43 r 60 8 -+ 10 K 27 b 44 s 61 9 -+ 11 L 28 c 45 t 62 + -+ 12 M 29 d 46 u 63 / -+ 13 N 30 e 47 v -+ 14 O 31 f 48 w (pad) = -+ 15 P 32 g 49 x -+ 16 Q 33 h 50 y -+ -+ Special processing is performed if fewer than 24 bits are available -+ at the end of the data being encoded. A full encoding quantum is -+ always completed at the end of a quantity. When fewer than 24 input -+ bits are available in an input group, zero bits are added (on the -+ right) to form an integral number of 6-bit groups. Padding at the -+ end of the data is performed using the '=' character. -+ -+ Since all base64 input is an integral number of octets, only the -+ ------------------------------------------------- -+ following cases can arise: -+ -+ (1) the final quantum of encoding input is an integral -+ multiple of 24 bits; here, the final unit of encoded -+ output will be an integral multiple of 4 characters -+ with no "=" padding, -+ (2) the final quantum of encoding input is exactly 8 bits; -+ here, the final unit of encoded output will be two -+ characters followed by two "=" padding characters, or -+ (3) the final quantum of encoding input is exactly 16 bits; -+ here, the final unit of encoded output will be three -+ characters followed by one "=" padding character. -+ */ -+ -+int -+b64_ntop(src, srclength, target, targsize) -+ u_char const *src; -+ size_t srclength; -+ char *target; -+ size_t targsize; -+{ -+ size_t datalength = 0; -+ u_char input[3]; -+ u_char output[4]; -+ int i; -+ -+ while (2 < srclength) { -+ input[0] = *src++; -+ input[1] = *src++; -+ input[2] = *src++; -+ srclength -= 3; -+ -+ output[0] = input[0] >> 2; -+ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); -+ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); -+ output[3] = input[2] & 0x3f; -+ -+ if (datalength + 4 > targsize) -+ return (-1); -+ target[datalength++] = Base64[output[0]]; -+ target[datalength++] = Base64[output[1]]; -+ target[datalength++] = Base64[output[2]]; -+ target[datalength++] = Base64[output[3]]; -+ } -+ -+ /* Now we worry about padding. */ -+ if (0 != srclength) { -+ /* Get what's left. */ -+ input[0] = input[1] = input[2] = '\0'; -+ for (i = 0; i < srclength; i++) -+ input[i] = *src++; -+ -+ output[0] = input[0] >> 2; -+ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); -+ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); -+ -+ if (datalength + 4 > targsize) -+ return (-1); -+ target[datalength++] = Base64[output[0]]; -+ target[datalength++] = Base64[output[1]]; -+ if (srclength == 1) -+ target[datalength++] = Pad64; -+ else -+ target[datalength++] = Base64[output[2]]; -+ target[datalength++] = Pad64; -+ } -+ if (datalength >= targsize) -+ return (-1); -+ target[datalength] = '\0'; /* Returned value doesn't count \0. */ -+ return (datalength); -+} -+ -+/* skips all whitespace anywhere. -+ converts characters, four at a time, starting at (or after) -+ src from base - 64 numbers into three 8 bit bytes in the target area. -+ it returns the number of data bytes stored at the target, or -1 on error. -+ */ -+ -+int -+b64_pton(src, target, targsize) -+ char const *src; -+ u_char *target; -+ size_t targsize; -+{ -+ int tarindex, state, ch; -+ u_char nextbyte; -+ char *pos; -+ -+ state = 0; -+ tarindex = 0; -+ -+ while ((ch = (unsigned char)*src++) != '\0') { -+ if (isspace(ch)) /* Skip whitespace anywhere. */ -+ continue; -+ -+ if (ch == Pad64) -+ break; -+ -+ pos = strchr(Base64, ch); -+ if (pos == 0) /* A non-base64 character. */ -+ return (-1); -+ -+ switch (state) { -+ case 0: -+ if (target) { -+ if (tarindex >= targsize) -+ return (-1); -+ target[tarindex] = (pos - Base64) << 2; -+ } -+ state = 1; -+ break; -+ case 1: -+ if (target) { -+ if (tarindex >= targsize) -+ return (-1); -+ target[tarindex] |= (pos - Base64) >> 4; -+ nextbyte = ((pos - Base64) & 0x0f) << 4; -+ if (tarindex + 1 < targsize) -+ target[tarindex+1] = nextbyte; -+ else if (nextbyte) -+ return (-1); -+ } -+ tarindex++; -+ state = 2; -+ break; -+ case 2: -+ if (target) { -+ if (tarindex >= targsize) -+ return (-1); -+ target[tarindex] |= (pos - Base64) >> 2; -+ nextbyte = ((pos - Base64) & 0x03) << 6; -+ if (tarindex + 1 < targsize) -+ target[tarindex+1] = nextbyte; -+ else if (nextbyte) -+ return (-1); -+ } -+ tarindex++; -+ state = 3; -+ break; -+ case 3: -+ if (target) { -+ if (tarindex >= targsize) -+ return (-1); -+ target[tarindex] |= (pos - Base64); -+ } -+ tarindex++; -+ state = 0; -+ break; -+ } -+ } -+ -+ /* -+ * We are done decoding Base-64 chars. Let's see if we ended -+ * on a byte boundary, and/or with erroneous trailing characters. -+ */ -+ -+ if (ch == Pad64) { /* We got a pad char. */ -+ ch = (unsigned char)*src++; /* Skip it, get next. */ -+ switch (state) { -+ case 0: /* Invalid = in first position */ -+ case 1: /* Invalid = in second position */ -+ return (-1); -+ -+ case 2: /* Valid, means one byte of info */ -+ /* Skip any number of spaces. */ -+ for (; ch != '\0'; ch = (unsigned char)*src++) -+ if (!isspace(ch)) -+ break; -+ /* Make sure there is another trailing = sign. */ -+ if (ch != Pad64) -+ return (-1); -+ ch = (unsigned char)*src++; /* Skip the = */ -+ /* Fall through to "single trailing =" case. */ -+ /* FALLTHROUGH */ -+ -+ case 3: /* Valid, means two bytes of info */ -+ /* -+ * We know this char is an =. Is there anything but -+ * whitespace after it? -+ */ -+ for (; ch != '\0'; ch = (unsigned char)*src++) -+ if (!isspace(ch)) -+ return (-1); -+ -+ /* -+ * Now make sure for cases 2 and 3 that the "extra" -+ * bits that slopped past the last full byte were -+ * zeros. If we don't check them, they become a -+ * subliminal channel. -+ */ -+ if (target && tarindex < targsize && -+ target[tarindex] != 0) -+ return (-1); -+ } -+ } else { -+ /* -+ * We ended by seeing the end of the string. Make sure we -+ * have no partial bytes lying around. -+ */ -+ if (state != 0) -+ return (-1); -+ } -+ -+ return (tarindex); -+} -diff --git a/fdm.h b/fdm.h -index 5de799c..abc52e0 100644 ---- a/fdm.h -+++ b/fdm.h -@@ -84,6 +84,18 @@ extern char *__progname; - #define INFTIM -1 - #endif - -+#ifndef WAIT_ANY -+#define WAIT_ANY -1 -+#endif -+ -+#ifndef GLOB_BRACE -+#define GLOB_BRACE 0 -+#endif -+ -+#ifndef ACCESSPERMS -+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) -+#endif -+ - #ifndef __dead - #define __dead __attribute__ ((__noreturn__)) - #endif -@@ -707,6 +719,12 @@ size_t strlcpy(char *, const char *, size_t); - size_t strlcat(char *, const char *, size_t); - #endif - -+#ifndef HAVE_B64_NTOP -+/* base64.c */ -+int b64_ntop(src, srclength, target, targsize); -+int b64_pton(src, target, targsize); -+#endif -+ - /* shm.c */ - char *shm_path(struct shm *); - void *shm_create(struct shm *, size_t); --- -2.17.1 - diff --git a/mail/fdm/patches/010-ntop-fix.patch b/mail/fdm/patches/010-ntop-fix.patch new file mode 100644 index 00000000..e3247957 --- /dev/null +++ b/mail/fdm/patches/010-ntop-fix.patch @@ -0,0 +1,9 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -123,6 +123,3 @@ endif + if NO_STRTONUM + nodist_fdm_SOURCES += compat/strtonum.c + endif +-if NO_B64_NTOP +-nodist_fdm_SOURCES += compat/base64.c +-endif diff --git a/mail/fdm/patches/020-Fix-compile-with-OpenSSL-1.1.0.patch b/mail/fdm/patches/020-Fix-compile-with-OpenSSL-1.1.0.patch index 9ce23642..be914733 100644 --- a/mail/fdm/patches/020-Fix-compile-with-OpenSSL-1.1.0.patch +++ b/mail/fdm/patches/020-Fix-compile-with-OpenSSL-1.1.0.patch @@ -1,4 +1,4 @@ -From f6c656c5c0368b2fb4284af0484c3bedfc7ae42c Mon Sep 17 00:00:00 2001 +From 3aa079c4885d89257c5033b4992011511b603150 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 26 Jun 2018 14:14:34 -0700 Subject: [PATCH] Fix compile with OpenSSL 1.1.0 @@ -6,23 +6,20 @@ Subject: [PATCH] Fix compile with OpenSSL 1.1.0 OpenSSL 1.1.0 deprecared SSL_library_init and SSL_load_error_strings. They're part of OPENSSL_init_ssl now. --- - fdm.c | 5 +++++ - 1 file changed, 5 insertions(+) + fdm.c | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/fdm.c b/fdm.c -index cdf8383..9355b91 100644 +index cdf8383..6721bbd 100644 --- a/fdm.c +++ b/fdm.c -@@ -717,8 +717,13 @@ retry: +@@ -717,8 +717,10 @@ retry: } conf.lock_file = lock; -+ +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_library_init(); SSL_load_error_strings(); -+#else -+ OPENSSL_init_ssl(0, NULL); +#endif /* Filter account list. */ diff --git a/mail/fdm/patches/040-openssl-1.1.patch b/mail/fdm/patches/040-openssl-1.1.patch deleted file mode 100644 index 5df8b285..00000000 --- a/mail/fdm/patches/040-openssl-1.1.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 070cee8d1efba1ca260777a204fba7cdfe676ca5 Mon Sep 17 00:00:00 2001 -From: Nicholas Marriott -Date: Tue, 17 Jan 2017 23:14:03 +0000 -Subject: [PATCH] Look for OPENSSL_init_ssl, from Tomasz Miasko. - ---- - configure.ac | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 5793c2d..161040c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -93,11 +93,16 @@ if test "x$found_libcrypto" = xno; then - AC_MSG_ERROR("libcrypto not found") - fi - AC_SEARCH_LIBS( -- SSL_library_init, -+ OPENSSL_init_ssl, - [ssl], - found_libssl=yes, - found_libssl=no - ) -+AC_SEARCH_LIBS( -+ SSL_library_init, -+ [ssl], -+ found_libssl=yes -+) - if test "x$found_libssl" = xno; then - AC_MSG_ERROR("libssl not found") - fi diff --git a/mail/mailman/Makefile b/mail/mailman/Makefile deleted file mode 100644 index 8875b5ad..00000000 --- a/mail/mailman/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mailman -PKG_RELEASE:=1 -PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_VERSION:=2.1.23 -PKG_HASH:=b022ca6f8534621c9dbe50c983948688bc4623214773b580c2c78e4a7ae43e69 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_MAINTAINER:=Denis Shulyaka -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=gnu-COPYING-GPL - -include $(INCLUDE_DIR)/package.mk - -define Package/mailman - SECTION:=mail - CATEGORY:=Mail - TITLE:=The GNU Mailing List Manager - URL:=http://www.gnu.org/software/mailman/ - DEPENDS:=+postfix +python +uhttpd +python-dns -endef - -define Package/mailman/description - Mailman is free software for managing electronic mail discussion and e-newsletter lists. -endef - -prefix=/usr/local/mailman - -define Package/mailman/conffiles -$(prefix)/Mailman/mm_cfg.py -endef - -CONFIGURE_ARGS += \ - --prefix="$(prefix)" \ - --exec-prefix="$(prefix)" \ - --with-username="root" \ - --with-groupname="root" \ - --with-mail-gid="nogroup" \ - --with-cgi-gid="root" \ - --without-permcheck \ - -define Build/Compile -endef - -define Package/mailman/install - $(INSTALL_DIR) $(1)$(prefix) - cd $(PKG_BUILD_DIR); $(MAKE) DESTDIR=$(1) install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/mailman.init $(1)/etc/init.d/mailman - $(INSTALL_DIR) $(1)/usr/www - ln -s $(prefix)/cgi-bin/ $(1)/usr/www/mailman - ln -s $(prefix)/archives/public/ $(1)/usr/www/pipermail - ln -s $(prefix)/icons $(1)/usr/www/icons -endef - -define Package/mailman/postinst -#!/bin/sh -# check if we are on real system -if [ -z "$${IPKG_INSTROOT}" ]; then - - if [ `postconf alias_maps | grep -ci mailman` -eq 0 ] - then - postconf -e "`postconf alias_maps`, cdb:$(prefix)/data/aliases" - fi - cd $(prefix) - hostname=`cat /proc/sys/kernel/hostname` - if [ ! -f data/aliases ] - then - ./bin/genaliases - fi - newaliases - if [ `grep -c DEFAULT_URL_HOST Mailman/mm_cfg.py` -eq 0 ] - then - echo "DEFAULT_EMAIL_HOST = '$$hostname'" >> Mailman/mm_cfg.py - echo "DEFAULT_URL_HOST = '$$hostname'" >> Mailman/mm_cfg.py - echo "add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)" >> Mailman/mm_cfg.py - echo "QRUNNERS.remove(('NewsRunner',1))" >> Mailman/mm_cfg.py - fi - if [ `./bin/list_lists | grep -ci mailman` -eq 0 ] - then - ./bin/newlist --urlhost=$$hostname --emailhost=$$hostname --quiet mailman root@$$hostname mailman - ./bin/config_list -i data/sitelist.cfg mailman - echo "NOTE: A default site-wide mailing list Mailman with password 'mailman' has been created. Please review it and change the password." - ./bin/mmsitepass mailman - echo "NOTE: The default site password 'mailman' has been created." - fi - # /etc/init.d/mailman enable - if [ `ps | grep "mailman/bin/qrunner" | grep -cv grep` -gt 0 ] - then - $(prefix)/bin/mailmanctl -q restart - fi - if [ `grep -c mailman /etc/config/uhttpd` -eq 0 ] - then #we assume that the server is not configured yet, thus print out some help for the first time: - echo "NOTE: Please set the site password using $(prefix)/bin/mmsitepass " - echo "Please add uhttpd config section to your /etc/config/uhttpd like this:" - echo "config uhttpd mailman" - echo " list listen_http 0.0.0.0:80" - echo " option home /usr/www" - echo " option cgi_prefix /mailman" - echo " no_symlinks 0" - echo "Don't forget to setup firewall for accessing this website!" - echo "To add a mailing list go to http://$$hostname/mailman/create." - fi -fi -endef - -define Package/mailman/prerm -#!/bin/sh -# check if we are on real system -if [ -z "$${IPKG_INSTROOT}" ]; then - - if [ `ps | grep "mailman/bin/qrunner" | grep -cv grep` -gt 0 ] - then - $(prefix)/bin/mailmanctl stop - fi -fi -endef - -$(eval $(call BuildPackage,mailman)) diff --git a/mail/mailman/files/mailman.init b/mail/mailman/files/mailman.init deleted file mode 100644 index f68a4567..00000000 --- a/mail/mailman/files/mailman.init +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=50 -STOP=50 - -PYTHON=/usr/bin/python -MAILMANHOME=/usr/local/mailman -MAILMANCTL=$MAILMANHOME/bin/mailmanctl - -start() { - #rm -f $MAILMANHOME/locks/* - $PYTHON $MAILMANCTL -s -q start -} - -stop() { - $PYTHON $MAILMANCTL -q stop -} - -restart() { - $PYTHON $MAILMANCTL -q restart -} diff --git a/mail/mailman/patches/100-postfix.patch b/mail/mailman/patches/100-postfix.patch deleted file mode 100644 index 5bbf5b27..00000000 --- a/mail/mailman/patches/100-postfix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN mailman-2.1.14-1/Mailman/Defaults.py.in mailman-2.1.14-1_patched/Mailman/Defaults.py.in ---- mailman-2.1.14-1/Mailman/Defaults.py.in 2011-03-01 23:35:57.000000000 +0300 -+++ mailman-2.1.14-1_patched/Mailman/Defaults.py.in 2011-03-09 12:26:10.000000000 +0300 -@@ -489,7 +489,7 @@ DELIVERY_MODULE = 'SMTPDirect' - # standard out (or send an email to the site list owner) for manual twiddling - # of an /etc/aliases style file. Use 'Postfix' if you are using the Postfix - # MTA -- but then also see POSTFIX_STYLE_VIRTUAL_DOMAINS. --MTA = 'Manual' -+MTA = 'Postfix' - - # If you set MTA='Postfix', then you also want to set the following variable, - # depending on whether you're using virtual domains in Postfix, and which diff --git a/mail/mailman/patches/200-nohostdnspython.patch b/mail/mailman/patches/200-nohostdnspython.patch deleted file mode 100644 index e3211066..00000000 --- a/mail/mailman/patches/200-nohostdnspython.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -Naur mailman-2.1.18-1/configure mailman-2.1.18-1_patched/configure ---- mailman-2.1.18-1/configure 2014-10-26 12:00:38.090360119 +0300 -+++ mailman-2.1.18-1_patched/configure 2014-10-26 12:00:21.323016430 +0300 -@@ -2236,35 +2236,35 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $version" >&5 - $as_echo "$version" >&6; } - --# See if dnspython is installed. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dnspython" >&5 --$as_echo_n "checking dnspython... " >&6; } -- --cat > conftest.py < or --***** " "$LINENO" 5 --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $havednspython" >&5 --$as_echo "$havednspython" >&6; } -+## See if dnspython is installed. -+#{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dnspython" >&5 -+#$as_echo_n "checking dnspython... " >&6; } -+# -+#cat > conftest.py < or -+#***** " "$LINENO" 5 -+#fi -+#{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $havednspython" >&5 -+#$as_echo "$havednspython" >&6; } - - # Check the email package version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's email package" >&5 diff --git a/mail/mailman/patches/300-targetpython.patch b/mail/mailman/patches/300-targetpython.patch deleted file mode 100644 index 1dd2859f..00000000 --- a/mail/mailman/patches/300-targetpython.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur mailman-2.1.18-1/configure mailman-2.1.18-1_patched/configure ---- mailman-2.1.18-1/configure 2014-05-06 20:43:56.000000000 +0400 -+++ mailman-2.1.18-1_patched/configure 2014-11-04 15:02:32.892666331 +0300 -@@ -3927,6 +3927,8 @@ - $as_echo "$URLHOST" >&6; } - rm -f conftest.out conftest.py - -+PYTHON=/usr/bin/python -+ - # Checks for libraries. - - for ac_func in strerror setregid syslog diff --git a/mail/mailman/patches/400-modules.patch b/mail/mailman/patches/400-modules.patch deleted file mode 100644 index 9fa72a26..00000000 --- a/mail/mailman/patches/400-modules.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -Naur mailman-2.1.18-1/Mailman/MailList.py mailman-2.1.18-1_patched/Mailman/MailList.py ---- mailman-2.1.18-1/Mailman/MailList.py 2014-05-06 20:43:56.000000000 +0400 -+++ mailman-2.1.18-1_patched/Mailman/MailList.py 2014-11-04 15:57:06.832636147 +0300 -@@ -30,7 +30,7 @@ - import shutil - import socket - import urllib --import cPickle -+import pickle as cPickle - - from cStringIO import StringIO - from UserDict import UserDict -diff -Naur mailman-2.1.18-1/misc/paths.py.in mailman-2.1.18-1_patched/misc/paths.py.in ---- mailman-2.1.18-1/misc/paths.py.in 2014-05-06 20:43:56.000000000 +0400 -+++ mailman-2.1.18-1_patched/misc/paths.py.in 2014-11-04 15:55:49.594941540 +0300 -@@ -66,14 +66,14 @@ - # In a normal interactive Python environment, the japanese.pth and korean.pth - # files would be imported automatically. But because we inhibit the importing - # of the site module, we need to be explicit about importing these codecs. --if not jaok: -- import japanese -+#if not jaok: -+# import japanese - # As of KoreanCodecs 2.0.5, you had to do the second import to get the Korean - # codecs installed, however leave the first import in there in case an upgrade - # changes this. --if not kook: -- import korean -- import korean.aliases -+#if not kook: -+# import korean -+# import korean.aliases - # Arabic and Hebrew (RFC-1556) encoding aliases. (temporary solution) - import encodings.aliases - encodings.aliases.aliases.update({ diff --git a/mail/mailsend/Makefile b/mail/mailsend/Makefile index bd264948..019a44a6 100644 --- a/mail/mailsend/Makefile +++ b/mail/mailsend/Makefile @@ -8,20 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mailsend -PKG_VERSION:=1.17b15 +PKG_VERSION:=1.19 PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/muquit/mailsend/archive/$(PKG_VERSION) -PKG_HASH:=73cb1b2455de95ab126e3682bf19c62e6baabee00f449da692be0bebd3ceb26b +PKG_HASH:=565ef6be26c58ef75065c5519eae8dd55bae3142928619696b28d242b73493f7 PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYRIGHT -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - include $(INCLUDE_DIR)/package.mk define Package/mailsend/default diff --git a/mail/mailsend/patches/0001-OpenSSL-1.1-support-for-HMAC-api.patch b/mail/mailsend/patches/0001-OpenSSL-1.1-support-for-HMAC-api.patch new file mode 100644 index 00000000..c18ef4ef --- /dev/null +++ b/mail/mailsend/patches/0001-OpenSSL-1.1-support-for-HMAC-api.patch @@ -0,0 +1,49 @@ +From 960df6d7a11eef90128dc2ae660866b27f0e4336 Mon Sep 17 00:00:00 2001 +From: muquit +Date: Wed, 21 Sep 2016 12:46:24 -0400 +Subject: [PATCH] OpenSSL 1.1 support for HMAC api + +--- + utils.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/utils.c b/utils.c +index b072138..abfb86e 100755 +--- a/utils.c ++++ b/utils.c +@@ -791,8 +791,14 @@ char *encode_cram_md5(char *challenge,char *user,char *secret) + unsigned char + hmac_md5[16]; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + HMAC_CTX + ctx; ++#else ++ /* OpenSSL 1.1.x*/ ++ HMAC_CTX ++ *ctx; ++#endif + + const EVP_MD + *md5=NULL; +@@ -831,11 +837,20 @@ char *encode_cram_md5(char *challenge,char *user,char *secret) + showVerbose("Challenge After decoding: %s\n",data); + + /* take HMAC-MD5 of the challenge*/ ++ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + md5=EVP_get_digestbyname("md5"); + HMAC_CTX_init(&ctx); + HMAC_Init(&ctx,secret,strlen(secret),md5); + HMAC_Update(&ctx,data,data_len); + HMAC_Final(&ctx,hmac_md5,&hmac_len); ++#else ++ /* OpenSSL 1.1.x */ ++ ctx = HMAC_CTX_new(); ++ HMAC_Init_ex(ctx,secret,strlen(secret),EVP_md5(),NULL); ++ HMAC_Update(ctx,data,data_len); ++ HMAC_Final(ctx,hmac_md5,&hmac_len); ++#endif + + /* convert the digest to hex */ + memset(hex,0,sizeof(hex)); diff --git a/mail/mailsend/patches/0002-Removed-API-deprecated-by-OpenSSL-1.1.0.patch b/mail/mailsend/patches/0002-Removed-API-deprecated-by-OpenSSL-1.1.0.patch new file mode 100644 index 00000000..b8c4eec3 --- /dev/null +++ b/mail/mailsend/patches/0002-Removed-API-deprecated-by-OpenSSL-1.1.0.patch @@ -0,0 +1,73 @@ +From cc9dbd4bcd9ab3133d771c94c0466356703276a8 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Fri, 8 Jun 2018 14:41:23 -0300 +Subject: [PATCH] Removed API deprecated by OpenSSL 1.1.0 + +Signed-off-by: Eneas U de Queiroz +--- + main.c | 10 +++++++++- + utils.c | 6 +++++- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/main.c b/main.c +index d275e6a..51bfb1d 100755 +--- a/main.c ++++ b/main.c +@@ -91,7 +91,11 @@ static void usage(void) + (void) printf(" Copyright: %.1024s\n\n",NO_SPAM_STATEMENT); + #ifdef HAVE_OPENSSL + (void) fprintf(stdout," (Compiled with OpenSSL version: %s)\n", ++# if OPENSSL_VERSION_NUMBER < 0x10100000L + SSLeay_version(SSLEAY_VERSION)); ++# else ++ OpenSSL_version(OPENSSL_VERSION)); ++# endif + #else + (void) fprintf(stdout," (Not compiled with OpenSSL)\n"); + #endif /* HAVE_OPENSSL */ +@@ -1056,9 +1060,13 @@ int main(int argc,char **argv) + (void) fprintf(stderr,"mailsend Version: %.1024s\n",MAILSEND_VERSION); + #ifdef HAVE_OPENSSL + (void) fprintf(stderr,"Compiled with OpenSSL: %s\n", ++# if OPENSSL_VERSION_NUMBER < 0x10100000L + SSLeay_version(SSLEAY_VERSION)); ++# else ++ OpenSSL_version(OPENSSL_VERSION)); ++# endif + #else +- (void) fprintf(stderr,"Not Compiled OpenSSL, some auth methods will be unavailable\n"); ++ (void) fprintf(stderr,"Not Compiled with OpenSSL, some auth methods will be unavailable\n"); + #endif /* ! HAVE_OPENSSL */ + rc = 0; + goto ExitProcessing; +diff --git a/utils.c b/utils.c +index abfb86e..02366c5 100755 +--- a/utils.c ++++ b/utils.c +@@ -440,10 +440,12 @@ void initialize_openssl(char *cipher) + static const char rnd_seed[]="my huge entropy for rng.. blah"; + SSL_CTX *ssl_ctx=(SSL_CTX *) NULL; + SSL *ssl=NULL; ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init(); + SSL_load_error_strings(); +- RAND_seed(rnd_seed,sizeof(rnd_seed)); + OpenSSL_add_all_algorithms(); ++#endif ++ RAND_seed(rnd_seed,sizeof(rnd_seed)); + ssl_ctx=SSL_CTX_new(SSLv23_client_method()); + if (ssl_ctx == NULL) + { +@@ -825,7 +827,9 @@ char *encode_cram_md5(char *challenge,char *user,char *secret) + return(NULL); + + showVerbose("Server Challenge: %s\n",challenge); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + OpenSSL_add_all_digests(); ++#endif + + /* decode the challenge */ + data=mutils_decode_base64((unsigned char *) challenge,strlen(challenge),&data_len); +-- +2.19.1 + diff --git a/mail/msmtp-scripts/Makefile b/mail/msmtp-scripts/Makefile deleted file mode 100644 index b1441bb9..00000000 --- a/mail/msmtp-scripts/Makefile +++ /dev/null @@ -1,141 +0,0 @@ -# -# Copyright (C) 2009 David Cooper -# Copyright (C) 2009-2015 OpenWrt.org -# Copyright (C) 2016 Daniel Dickinson -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=msmtp-scripts -PKG_VERSION:=1.0.8 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/msmtp-scripts -PKG_HASH:=2aec48d47b02facf2a33cf97a7434e969c1a054224406e6c55320d825c7902b2 - -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Daniel Dickinson - -include $(INCLUDE_DIR)/package.mk - -define Package/msmtp-scripts/Default - SECTION:=mail - CATEGORY:=Mail - TITLE:=Simple sendmail SMTP queueing and forwarding - URL:=http://msmtp-scripts.sourceforge.net/ -endef - -define Package/msmtp-scripts/Default/description - msmtp-scripts are scripts wrappers around the msmtp SMTP client that - add queueing, logging to syslog or file, a subset of sendmail/postfix - mailq/postsuper/postqueue commands implemented in a compatible fashion. -endef - -define Package/msmtpq-ng -$(call Package/msmtp-scripts/Default) - DEPENDS+= @(PACKAGE_msmtp||PACKAGE_msmtp-nossl) - TITLE+= (msmtpq-ng wrappers) -endef - -define Package/msmtpq-ng/conffiles -/etc/msmtpq-ng.rc -endef - -define Package/msmtpq-ng/description - $(call Package/msmtp-scripts/Default/description) - This package contains the msmtpq-ng and msmtpq-ng-queue - wrappers around msmtp, which provide the bulk of the - functionality. -endef - -define Package/msmtpq-ng-mta -$(call Package/msmtp-scripts/Default) - TITLE+= (as MTA) - DEPENDS+=+msmtpq-ng - USERID:=msmtp=482:msmtp=482 -endef - -define Package/msmtp-queue-mta/conffiles -/etc/msmtpq-ng-mta.rc -endef - -define Package/msmtpq-ng-mta/description - $(call Package/msmtp-scripts/Default/description) - This package provides sendmail, mailq, postfix, - and postsuper symlinks to wrappers that configure - msmtpq-ng for use as the system mail transport - agent via the sendmail command. -endef - -define Package/msmtpq-ng-mta-smtpd -$(call Package/msmtp-scripts/Default) - DEPENDS+= +msmtpq-ng-mta +xinetd - TITLE+= (basic SMTP server) -endef - -define Package/msmtp-ng-mta-smtpd/description - $(call Package/msmtp-scripts/Default/description) - This package uses the -bs option to msmtpq-ng - (which, like the sendmail -bs command, provides - SMTP over stdin/stdout) combined with xinetd to - provide a basic SMTP server. In it's default - configuration it only accepts connections from - localhost AND network mail must be released from - the hold queue before it can be delivered. -endef - -define Package/msmtpq-ng-mta/postinst - mkdir -p $${IPKG_INSTROOT}/etc/crontabs - if ! grep -q msmtpq-ng-mta $${IPKG_INSTROOT}/etc/crontabs/root; then echo $$'\n'"*/60 * * * * /usr/bin/msmtpq-ng-mta -q" >>$${IPKG_INSTROOT}/etc/crontabs/root; fi -endef - -define Package/msmtp-queue-mta/prerm - if grep -q msmtpq-ng-mta $${IPKG_INSTROOT}/etc/crontabs/root; then grep -v '\*/60 \* \* \* \* /usr/bin/msmtpq-ng-mta -q' $${IPKG_INSTROOT}/etc/crontabs/root >$${IPKG_INSTROOT}/etc/crontabs/root.new; mv -f $${IPKG_INSTROOT}/etc/crontabs/root.new $${IPKG_INSTROOT}/etc/crontabs; fi -endef - -define Build/Configure - true -endef - -define Build/Compile - true -endef - -define Package/msmtpq-ng/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/msmtpq-ng.rc $(1)/etc/msmtpq-ng.rc - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/msmtpq-ng/msmtpq-ng $(1)/usr/bin/ - $(SED) 's/logger -i/logger/' $(1)/usr/bin/msmtpq-ng - $(CP) $(PKG_BUILD_DIR)/msmtpq-ng/msmtpq-ng-queue $(1)/usr/bin/ -endef - -define Package/msmtpq-ng-mta/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin $(1)/usr/lib $(1)/etc/init.d - $(INSTALL_CONF) $(PKG_BUILD_DIR)/msmtpq-ng-mta/msmtpq-ng-mta.rc $(1)/etc/ - echo 'MSMTP_LOCK_DIR=/var/lock/msmtp' >>$(1)/etc/msmtpq-ng-mta.rc - $(INSTALL_BIN) $(PKG_BUILD_DIR)/msmtpq-ng-mta/msmtpq-ng-mta $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/msmtpq-ng-mta/msmtpq-ng-queue-mta $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/crontabs - $(INSTALL_BIN) ./files/msmtpq-ng-mta.init $(1)/etc/init.d/msmtpq-ng-mta - ln -sf ../bin/msmtpq-ng-mta $(1)/usr/sbin/sendmail - ln -sf ../bin/msmtpq-ng-mta $(1)/usr/lib/sendmail - ln -sf ../bin/msmtpq-ng-queue-mta $(1)/usr/sbin/mailq - ln -sf ../bin/msmtpq-ng-queue-mta $(1)/usr/sbin/postqueue - ln -sf ../bin/msmtpq-ng-queue-mta $(1)/usr/sbin/postsuper -endef - -define Package/msmtpq-ng-mta-smtpd/install - $(INSTALL_DIR) $(1)/etc/xinetd.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/msmtpq-ng-mta/sendmail-bs.xinetd $(1)/etc/xinetd.d/msmtpq-ng-mta-smtpd -endef - - -$(eval $(call BuildPackage,msmtpq-ng)) -$(eval $(call BuildPackage,msmtpq-ng-mta)) -$(eval $(call BuildPackage,msmtpq-ng-mta-smtpd)) diff --git a/mail/msmtp-scripts/files/msmtpq-ng-mta.init b/mail/msmtp-scripts/files/msmtpq-ng-mta.init deleted file mode 100644 index 944164c2..00000000 --- a/mail/msmtp-scripts/files/msmtpq-ng-mta.init +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2016 OpenWrt.org - -START=90 - -boot() { - [ ! -d /var/spool/msmtp ] && { - mkdir -m 0770 -p /var/spool/msmtp - chown msmtp:msmtp /var/spool/msmtp - } - - [ ! -d /var/lock/msmtp ] && { - mkdir -m 0770 -p /var/lock/msmtp - chown msmtp:msmtp /var/lock/msmtp - } -} - diff --git a/mail/msmtp-scripts/files/msmtpq-ng.rc b/mail/msmtp-scripts/files/msmtpq-ng.rc deleted file mode 100644 index 17900212..00000000 --- a/mail/msmtp-scripts/files/msmtpq-ng.rc +++ /dev/null @@ -1,18 +0,0 @@ -#Q=~/msmtp.queue -#LOG=~/log/.msmtp.queue.log -#MAXLOGLEVEL=7 -#MSMTP_LOCKDIR=/var/lock -EMAIL_CONN_TEST=p -EMAIL_CONN_TEST_SITE=www.lede-project.org -#EMAIL_CONN_TEST_IP=8.8.8.8 -#MSMTP_UMASK=077 -#MSMTP_LOG_UMASK=077 -#MSMTP_QUEUE_QUIET=false -#MSMTP_IGNORE_NO_RECIPIENTS=false -#MSMTP_QUEUE_ONLY=false -#MSMTP_SEND_DELAY=0 -#MSMTP_MAXIMUM_QUEUE_LIFETIME=345600 # Four days -#MSMTP=msmtp -#MSMTPQ_NG_QUEUE=msmtpq-ng-queue -#MSMTP_HOLD_SMTP_MAIL=true -#MSMTP_HOLD_CLI_MAIL=false diff --git a/mail/msmtp/Makefile b/mail/msmtp/Makefile index 91ae6de2..f4bfb314 100644 --- a/mail/msmtp/Makefile +++ b/mail/msmtp/Makefile @@ -9,21 +9,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=msmtp -PKG_VERSION:=1.6.6 +PKG_VERSION:=1.8.10 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@SF/msmtp -PKG_HASH:=da15db1f62bd0201fce5310adb89c86188be91cd745b7cb3b62b81a501e7fb5e +PKG_SOURCE_URL:=https://marlam.de/msmtp/releases +PKG_HASH:=caba7f39d19df7a31782fe7336dd640c61ea33b92f987bd5423bca9683482f10 -PKG_LICENSE:=GPL-3.0+ +PKG_MAINTAINER:= +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_CPE_ID:=cpe:/a:marlam:msmtp -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -33,7 +32,7 @@ define Package/msmtp/Default CATEGORY:=Mail DEPENDS:=$(INTL_DEPENDS) TITLE:=Simple sendmail SMTP forwarding - URL:=http://msmtp.sourceforge.net/ + URL:=https://marlam.de/msmtp endef define Package/msmtp/Default/description @@ -46,9 +45,10 @@ endef define Package/msmtp $(call Package/msmtp/Default) - DEPENDS+= +libopenssl +ca-bundle + DEPENDS+= +libgnutls +ca-bundle TITLE+= (with SSL support) VARIANT:=ssl + DEFAULT_VARIANT:=1 endef define Package/msmtp/conffiles @@ -64,6 +64,7 @@ define Package/msmtp-nossl $(call Package/msmtp/Default) TITLE+= (without SSL support) VARIANT:=nossl + PROVIDES:=msmtp endef define Package/msmtp-nossl/description @@ -74,7 +75,10 @@ endef define Package/msmtp-mta $(call Package/msmtp/Default) TITLE+= (as MTA) - DEPENDS+=@(PACKAGE_msmtp||PACAKGE_msmtp-nossl) + DEPENDS+=+msmtp + ALTERNATIVES:=\ + 100:/usr/sbin/sendmail:/usr/bin/msmtp \ + 100:/usr/lib/sendmail:/usr/bin/msmtp endef define Package/msmtp-mta/description @@ -85,7 +89,7 @@ endef define Package/msmtp-queue $(call Package/msmtp/Default) - DEPENDS+= +bash @(PACKAGE_msmtp||PACKAGE_msmtp-nossl) + DEPENDS+= +bash +msmtp TITLE+= (queue scripts) endef @@ -101,21 +105,12 @@ CONFIGURE_ARGS += \ --without-libidn \ --without-libsecret \ --without-macosx-keyring \ - -ifneq ($(CONFIG_USE_UCLIBC),) - CONFIGURE_ARGS += --disable-gai-idn -endif - -MAKE_FLAGS := + --without-msmtpd ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += \ - --with-tls=openssl -endif - -ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += \ - --with-tls=no + CONFIGURE_ARGS += --with-tls=gnutls +else + CONFIGURE_ARGS += --without-tls endif define Package/msmtp/install @@ -128,8 +123,6 @@ endef define Package/msmtp-mta/install $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib - ln -sf ../bin/msmtp $(1)/usr/sbin/sendmail - ln -sf ../bin/msmtp $(1)/usr/lib/sendmail endef Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles) diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile index cc360363..d15949eb 100644 --- a/mail/mutt/Makefile +++ b/mail/mutt/Makefile @@ -8,21 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mutt -PKG_VERSION:=1.9.4 +PKG_VERSION:=1.12.2 PKG_RELEASE:=1 -PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \ - https://bitbucket.org/mutt/mutt/downloads/ +PKG_SOURCE_URL:=https://bitbucket.org/mutt/mutt/downloads/ \ + http://ftp.mutt.org/pub/mutt/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=f4d1bf26350c1ac81b551f98e5a4fd80d7fecd86919aa8165e69fde87de1b5df +PKG_HASH:=bc42750ce8237742b9382f2148fc547a8d8601aa4a7cd28c55fe7ca045196882 -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=GPL PKG_MAINTAINER:=Phil Eichinger +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=GPL +PKG_CPE_ID:=cpe:/a:mutt:mutt PKG_FIXUP:=autoreconf - PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/mail/nail/Makefile b/mail/nail/Makefile index 433cfc08..9fefd3f9 100644 --- a/mail/nail/Makefile +++ b/mail/nail/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nail PKG_VERSION:=12.5 -PKG_RELEASE:=2 +PKG_RELEASE:=5 PKG_LICENSE:=BSD-2-Clause PKG_SOURCE:=heirloom-mailx_$(PKG_VERSION).orig.tar.gz diff --git a/mail/nail/patches/010-remove-gssapi.patch b/mail/nail/patches/010-remove-gssapi.patch new file mode 100644 index 00000000..e88d3562 --- /dev/null +++ b/mail/nail/patches/010-remove-gssapi.patch @@ -0,0 +1,52 @@ +diff --git a/makeconfig b/makeconfig +index 0ab36b8..ee1e3a1 100644 +--- a/makeconfig ++++ b/makeconfig +@@ -413,47 +413,6 @@ int main(void) + ! + fi + +-cat >$tmp2.c <<\! +-#include +- +-int main(void) +-{ +- gss_import_name(0, 0, GSS_C_NT_HOSTBASED_SERVICE, 0); +- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); +- return 0; +-} +-! +- +-<$tmp2.c link_check gssapi 'for GSSAPI in libgss' \ +- '#define USE_GSSAPI' '-lgss' || +- <$tmp2.c link_check gssapi 'for GSSAPI in libgssapi_krb5' \ +- '#define USE_GSSAPI' '-lgssapi_krb5' || +- link_check gssapi 'for GSSAPI in libgssapi_krb5, old-style' \ +- '#define USE_GSSAPI +-#define GSSAPI_OLD_STYLE' '-lgssapi_krb5' <<\! || \ +- link_check gssapi 'for GSSAPI in libgssapi' \ +- '#define USE_GSSAPI +-#define GSSAPI_REG_INCLUDE' '-lgssapi' <<\% +-#include +-#include +- +-int main(void) +-{ +- gss_import_name(0, 0, gss_nt_service_name, 0); +- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); +- return 0; +-} +-! +-#include +- +-int main(void) +-{ +- gss_import_name(0, 0, GSS_C_NT_HOSTBASED_SERVICE, 0); +- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); +- return 0; +-} +-% +- + cat >$tmp2.c <<\! + #include "config.h" + #ifdef HAVE_NL_LANGINFO diff --git a/mail/nail/patches/100-handle-openssl-without-sslv2-sslv3.patch b/mail/nail/patches/100-handle-openssl-without-sslv2-sslv3.patch index 793bc3dc..96a51454 100644 --- a/mail/nail/patches/100-handle-openssl-without-sslv2-sslv3.patch +++ b/mail/nail/patches/100-handle-openssl-without-sslv2-sslv3.patch @@ -4,7 +4,7 @@ cp = ssl_method_string(uhp); if (cp != NULL) { -+#ifndef OPENSSL_NO_SSL2 ++#if !defined(OPENSSL_NO_SSL2) && !OPENSSL_VERSION_NUMBER >= 0x10100000L if (equal(cp, "ssl2")) method = SSLv2_client_method(); - else if (equal(cp, "ssl3")) diff --git a/mail/nail/patches/200-handle-openssl-no-egd.patch b/mail/nail/patches/200-handle-openssl-no-egd.patch new file mode 100644 index 00000000..d14c2d23 --- /dev/null +++ b/mail/nail/patches/200-handle-openssl-no-egd.patch @@ -0,0 +1,14 @@ +--- a/openssl.c ++++ b/openssl.c +@@ -137,7 +137,11 @@ ssl_rand_init(void) + + if ((cp = value("ssl-rand-egd")) != NULL) { + cp = expand(cp); ++#ifndef OPENSSL_NO_EGD + if (RAND_egd(cp) == -1) { ++#else ++ if (1) { ++#endif + fprintf(stderr, catgets(catd, CATSET, 245, + "entropy daemon at \"%s\" not available\n"), + cp); diff --git a/mail/nail/patches/300-openssl-deprecated.patch b/mail/nail/patches/300-openssl-deprecated.patch new file mode 100644 index 00000000..8ba69ada --- /dev/null +++ b/mail/nail/patches/300-openssl-deprecated.patch @@ -0,0 +1,47 @@ +--- a/openssl.c ++++ b/openssl.c +@@ -174,7 +174,9 @@ ssl_init(void) + { + verbose = value("verbose") != NULL; + if (initialized == 0) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init(); ++#endif + initialized = 1; + } + if (rand_init == 0) +@@ -215,12 +217,13 @@ ssl_verify_cb(int success, X509_STORE_CTX *store) + static const SSL_METHOD * + ssl_select_method(const char *uhp) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + const SSL_METHOD *method; + char *cp; + + cp = ssl_method_string(uhp); + if (cp != NULL) { +-#if !defined(OPENSSL_NO_SSL2) && !OPENSSL_VERSION_NUMBER >= 0x10100000L ++#ifndef OPENSSL_NO_SSL2 + if (equal(cp, "ssl2")) + method = SSLv2_client_method(); + else +@@ -240,6 +243,9 @@ ssl_select_method(const char *uhp) + } else + method = SSLv23_client_method(); + return method; ++#else ++ return TLS_client_method(); ++#endif + } + + static void +@@ -427,7 +433,9 @@ ssl_gen_err(const char *fmt, ...) + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_load_error_strings(); ++#endif + fprintf(stderr, ": %s\n", + (ERR_error_string(ERR_get_error(), NULL))); + } diff --git a/mail/opendkim/Makefile b/mail/opendkim/Makefile index 9a441e61..ded120fa 100644 --- a/mail/opendkim/Makefile +++ b/mail/opendkim/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=opendkim PKG_VERSION:=2.10.3 -PKG_RELEASE:=1 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) @@ -20,6 +20,7 @@ PKG_LICENSE_FILES:=LICENSE LICENSE.Sendmail PKG_INSTALL:=1 PKG_BUILD_DEPENDS:=openssl +PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk diff --git a/mail/opendkim/patches/010-openssl_1.1_compat.patch b/mail/opendkim/patches/010-openssl_1.1_compat.patch new file mode 100644 index 00000000..ed92fff0 --- /dev/null +++ b/mail/opendkim/patches/010-openssl_1.1_compat.patch @@ -0,0 +1,202 @@ +This patch has been tested with OpenSSL 1.0.2q, 1.1.0j and 1.1.1a +with and without support for deprecated OpenSSL APIs. + +--- a/configure.ac ++++ b/configure.ac +@@ -860,26 +860,10 @@ then + AC_SEARCH_LIBS([ERR_peek_error], [crypto], , + AC_MSG_ERROR([libcrypto not found])) + +- AC_SEARCH_LIBS([SSL_library_init], [ssl], , +- [ +- if test x"$enable_shared" = x"yes" +- then +- AC_MSG_ERROR([Cannot build shared opendkim +- against static openssl libraries. +- Configure with --disable-shared +- to get this working or obtain a +- shared libssl library for +- opendkim to use.]) +- fi +- +- # avoid caching issue - last result of SSL_library_init +- # shouldn't be cached for this next check +- unset ac_cv_search_SSL_library_init +- LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" +- AC_SEARCH_LIBS([SSL_library_init], [ssl], , +- AC_MSG_ERROR([libssl not found]), [-ldl]) +- ] +- ) ++ od_have_ossl="no" ++ AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [od_have_ossl="yes"]) ++ AC_CHECK_LIB(ssl, SSL_library_init, [od_have_ossl="yes"]) ++ AS_IF([test "x$od_have_ossl" = xno], [AC_MSG_ERROR([libssl not found])]) + + AC_CHECK_DECL([SHA256_DIGEST_LENGTH], + AC_DEFINE([HAVE_SHA256], 1, +--- a/opendkim/opendkim-crypto.c ++++ b/opendkim/opendkim-crypto.c +@@ -139,6 +139,7 @@ static unsigned int nmutexes = 0; + static unsigned long threadid = 0L; + static pthread_mutex_t *mutexes = NULL; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + /* + ** DKIMF_CRYPTO_LOCK_CALLBACK -- locking callback for libcrypto + ** +@@ -166,6 +167,7 @@ dkimf_crypto_lock_callback(int mode, int + + assert(status == 0); + } ++#endif + + /* + ** DKIMF_CRYPTO_GET_ID -- generate/retrieve thread ID +@@ -208,21 +210,15 @@ dkimf_crypto_get_id(void) + static void + dkimf_crypto_free_id(void *ptr) + { +- /* +- ** Trick dkimf_crypto_get_id(); the thread-specific pointer has +- ** already been cleared at this point, but dkimf_crypto_get_id() +- ** may be called by ERR_remove_state() which will then allocate a +- ** new thread pointer if the thread-specific pointer is NULL. This +- ** means a memory leak of thread IDs and, on Solaris, an infinite loop +- ** because the destructor (indirectly) re-sets the thread-specific +- ** pointer to something not NULL. See pthread_key_create(3). +- */ +- + if (ptr != NULL) + { + assert(pthread_setspecific(id_key, ptr) == 0); + +- ERR_remove_state(0); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++ OPENSSL_thread_stop(); ++#else ++ ERR_remove_thread_state(NULL); ++#endif + + free(ptr); + +@@ -300,6 +296,7 @@ dkimf_crypto_dyn_destroy(struct CRYPTO_d + ** None. + */ + ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + static void + dkimf_crypto_dyn_lock(int mode, struct CRYPTO_dynlock_value *lock, + /* UNUSED */ const char *file, +@@ -316,6 +313,7 @@ dkimf_crypto_dyn_lock(int mode, struct C + + assert(status == 0); + } ++#endif + + /* + ** DKIMF_CRYPTO_INIT -- set up openssl dependencies +@@ -335,7 +333,12 @@ dkimf_crypto_init(void) + int n; + int status; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + n = CRYPTO_num_locks(); ++#else ++ // see openssl/crypto.h for more details ++ n = 1; ++#endif + mutexes = (pthread_mutex_t *) malloc(n * sizeof(pthread_mutex_t)); + if (mutexes == NULL) + return errno; +@@ -357,15 +360,22 @@ dkimf_crypto_init(void) + if (status != 0) + return status; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + SSL_load_error_strings(); + SSL_library_init(); + ERR_load_crypto_strings(); ++#else ++ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ++ OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ++#endif + ++#if OPENSSL_VERSION_NUMBER < 0x10000000 + CRYPTO_set_id_callback(&dkimf_crypto_get_id); + CRYPTO_set_locking_callback(&dkimf_crypto_lock_callback); + CRYPTO_set_dynlock_create_callback(&dkimf_crypto_dyn_create); + CRYPTO_set_dynlock_lock_callback(&dkimf_crypto_dyn_lock); + CRYPTO_set_dynlock_destroy_callback(&dkimf_crypto_dyn_destroy); ++#endif + + #ifdef USE_OPENSSL_ENGINE + if (!SSL_set_engine(NULL)) +@@ -392,11 +402,15 @@ dkimf_crypto_free(void) + { + if (crypto_init_done) + { ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++ OPENSSL_thread_stop(); ++#else + CRYPTO_cleanup_all_ex_data(); + CONF_modules_free(); + EVP_cleanup(); + ERR_free_strings(); +- ERR_remove_state(0); ++ ERR_remove_thread_state(NULL); ++#endif + + if (nmutexes > 0) + { +--- a/libopendkim/dkim.c ++++ b/libopendkim/dkim.c +@@ -4195,8 +4195,10 @@ dkim_init_openssl(void) + { + pthread_mutex_lock(&openssl_lock); + ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + if (openssl_refcount == 0) + OpenSSL_add_all_algorithms(); ++#endif + openssl_refcount++; + + pthread_mutex_unlock(&openssl_lock); +@@ -4220,8 +4222,10 @@ dkim_close_openssl(void) + pthread_mutex_lock(&openssl_lock); + + openssl_refcount--; ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + if (openssl_refcount == 0) + EVP_cleanup(); ++#endif + + pthread_mutex_unlock(&openssl_lock); + } +--- a/opendkim/opendkim-testkey.c ++++ b/opendkim/opendkim-testkey.c +@@ -452,7 +452,11 @@ main(int argc, char **argv) + memset(err, '\0', sizeof err); + + #ifndef USE_GNUTLS ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + ERR_load_crypto_strings(); ++#else ++ OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ++#endif + #endif /* ! USE_GNUTLS */ + + /* process a KeyTable if specified and not overridden */ +--- a/opendkim/opendkim.c ++++ b/opendkim/opendkim.c +@@ -15540,7 +15540,11 @@ main(int argc, char **argv) + printf("\tCompiled with GnuTLS %s\n", GNUTLS_VERSION); + #else /* USE_GNUTLS */ + printf("\tCompiled with %s\n", ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + SSLeay_version(SSLEAY_VERSION)); ++#else ++ OpenSSL_version(OPENSSL_VERSION)); ++#endif + #endif /* USE_GNUTLS */ + printf("\tSMFI_VERSION 0x%x\n", SMFI_VERSION); + #ifdef HAVE_SMFI_VERSION diff --git a/mail/opendkim/patches/020-uclibc.patch b/mail/opendkim/patches/020-uclibc.patch new file mode 100644 index 00000000..b74c3a99 --- /dev/null +++ b/mail/opendkim/patches/020-uclibc.patch @@ -0,0 +1,20 @@ +--- a/libopendkim/dkim-dns.c ++++ b/libopendkim/dkim-dns.c +@@ -163,6 +163,9 @@ int + dkim_res_query(void *srv, int type, unsigned char *query, unsigned char *buf, + size_t buflen, void **qh) + { ++#ifdef __UCLIBC__ ++ return DKIM_DNS_ERROR; ++#else + int n; + int ret; + struct dkim_res_qh *rq; +@@ -209,6 +212,7 @@ dkim_res_query(void *srv, int type, unsigned char *query, unsigned char *buf, + *qh = (void *) rq; + + return DKIM_DNS_SUCCESS; ++#endif // __UCLIBC__ + } + + /* diff --git a/mail/pigeonhole/Makefile b/mail/pigeonhole/Makefile index 9add29e7..269e0c0f 100644 --- a/mail/pigeonhole/Makefile +++ b/mail/pigeonhole/Makefile @@ -8,23 +8,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dovecot-pigeonhole -PKG_VERSION_PLUGIN:=0.4.21 +PKG_VERSION_PLUGIN:=0.5.9 PKG_VERSION_DOVECOT:=$(shell make --no-print-directory -C ../dovecot/ val.PKG_VERSION V=s) PKG_VERSION:=$(PKG_VERSION_DOVECOT)-$(PKG_VERSION_PLUGIN) -PKG_RELEASE:=2 +PKG_RELEASE:=1 -DOVECOT_VERSION:=2.2 +DOVECOT_VERSION:=2.3 PKG_SOURCE:=dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN).tar.gz PKG_SOURCE_URL:=https://pigeonhole.dovecot.org/releases/$(DOVECOT_VERSION) -PKG_HASH:=4ae09cb788c5334d167f5a89ee70b0616c3231e5904ad258ce408e4953cfdd6a -PKG_LICENSE:=LGPL-2.1 +PKG_HASH:=36da68aae5157b83e21383f711b8977e5b6f5477f369f71e7e22e76a738bbd05 + +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING COPYING.LGPL +PKG_CPE_ID:=cpe:/a:dovecot:pigeonhole PKG_BUILD_DIR:=$(BUILD_DIR)/dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN) PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk define Package/dovecot-pigeonhole SECTION:=mail @@ -32,7 +36,6 @@ define Package/dovecot-pigeonhole DEPENDS:=+dovecot EXTRA_DEPENDS:=dovecot (>= $(PKG_VERSION_DOVECOT)) TITLE:=Mail filtering facilities for Dovecot - MAINTAINER:=W. Michael Petullo URL:=https://wiki2.dovecot.org/Pigeonhole endef @@ -49,9 +52,10 @@ CONFIGURE_VARS += \ CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/dovecot/" define Package/dovecot-pigeonhole/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/dovecot/ + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/dovecot/ $(1)/usr/libexec/dovecot/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/ + $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/ find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm endef diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 5a7e1fc6..4b9add1e 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -9,17 +9,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=postfix PKG_RELEASE:=1 -PKG_VERSION:=3.3.0 +PKG_VERSION:=3.5.0 PKG_SOURCE_URL:= \ https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \ - ftp://ftp.porcupine.org/mirrors/postfix-release/official/ + http://ftp.porcupine.org/mirrors/postfix-release/official/ -PKG_HASH:=7942e89721e30118d7050675b0d976955e3160e21f7898b85a79cac4f4baef39 +PKG_HASH:=22ac929733449a294252ac8deda4b264ff48a997ff3847007291a2ee53ef55cc PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_MAINTAINER:=Denis Shulyaka PKG_LICENSE:=IPL-1.0 PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DEPENDS:=POSTFIX_CDB:tinycdb +PKG_CPE_ID:=cpe:/a:postfix:postfix + PKG_CONFIG_DEPENDS:= \ CONFIG_POSTFIX_TLS \ CONFIG_POSTFIX_SASL \ @@ -27,6 +28,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_POSTFIX_CDB \ CONFIG_POSTFIX_DB \ CONFIG_POSTFIX_SQLITE \ + CONFIG_POSTFIX_MYSQL \ CONFIG_POSTFIX_PGSQL \ CONFIG_POSTFIX_PCRE \ CONFIG_POSTFIX_EAI \ @@ -41,7 +43,7 @@ define Package/postfix postfix=25:postfix=25 \ postdrop=26:postdrop=26 URL:=http://www.postfix.org/ - DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre + DEPENDS:=+POSTFIX_CDB:tinycdb +POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_MYSQL:libmysqlclient +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre endef define Package/postfix/description @@ -80,6 +82,11 @@ define Package/postfix/config default y help Implements support for SQLite3 DB + config POSTFIX_MYSQL + bool "MYSQL support" + default n + help + Implements support for MySQL config POSTFIX_PGSQL bool "PostgreSQL support" default n @@ -144,6 +151,11 @@ ifdef CONFIG_POSTFIX_SQLITE AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lsqlite3 -lpthread endif +ifdef CONFIG_POSTFIX_MYSQL + CCARGS+=-DHAS_MYSQL -I$(STAGING_DIR)/usr/include/mysql + AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lmysqlclient -lz -lm +endif + ifdef CONFIG_POSTFIX_PGSQL CCARGS+=-DHAS_PGSQL -I$(STAGING_DIR)/usr/include/ AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lpq diff --git a/mail/postfix/files/postfix.init b/mail/postfix/files/postfix.init index e33c3cfa..27b79aae 100644 --- a/mail/postfix/files/postfix.init +++ b/mail/postfix/files/postfix.init @@ -1,7 +1,7 @@ #!/bin/sh /etc/rc.common # Copyright (C) 2014 OpenWrt.org -START=50 +START=72 STOP=50 EXTRA_COMMANDS="status abort flush postinst" EXTRA_HELP=" status Display the service status diff --git a/mail/postfix/patches/100-fsstat.patch b/mail/postfix/patches/100-fsstat.patch deleted file mode 100644 index 1a037a2e..00000000 --- a/mail/postfix/patches/100-fsstat.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN postfix-2.8.1/src/smtpd/smtpd_check.c postfix-2.8.1_patched/src/smtpd/smtpd_check.c ---- postfix-2.8.1/src/smtpd/smtpd_check.c 2011-01-04 22:03:50.000000000 +0300 -+++ postfix-2.8.1_patched/src/smtpd/smtpd_check.c 2011-03-06 19:35:39.000000000 +0300 -@@ -5322,7 +5322,7 @@ char *smtpd_check_queue(SMTPD_STATE *s - */ - #define BLOCKS(x) ((x) / fsbuf.block_size) - -- fsspace(".", &fsbuf); -+ fsspace("/overlay", &fsbuf); - if (msg_verbose) - msg_info("%s: blocks %lu avail %lu min_free %lu msg_size_limit %lu", - myname, diff --git a/mail/postfix/patches/200-manpages.patch b/mail/postfix/patches/200-manpages.patch index 287cd171..0a3b9f3a 100644 --- a/mail/postfix/patches/200-manpages.patch +++ b/mail/postfix/patches/200-manpages.patch @@ -1,7 +1,6 @@ -diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-install ---- postfix-2.10.2/conf/post-install 2013-06-13 18:07:46.000000000 +0400 -+++ postfix-2.10.2_patched/conf/post-install 2013-11-19 21:17:49.572820573 +0400 -@@ -366,10 +366,10 @@ +--- a/conf/post-install ++++ b/conf/post-install +@@ -366,10 +366,10 @@ test -f $config_directory/main.cf && { # Sanity checks @@ -16,7 +15,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins case $setgid_group in no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2 -@@ -377,7 +377,7 @@ +@@ -377,7 +377,7 @@ case $setgid_group in esac for path in "$daemon_directory" "$command_directory" "$queue_directory" \ @@ -25,7 +24,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins "$meta_directory" do case "$path" in -@@ -386,7 +386,7 @@ +@@ -386,7 +386,7 @@ do esac done @@ -34,10 +33,9 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins do case "$path" in /*) ;; -diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install ---- postfix-2.10.2/postfix-install 2012-05-22 23:40:29.000000000 +0400 -+++ postfix-2.10.2_patched/postfix-install 2013-11-19 21:12:20.694160734 +0400 -@@ -563,13 +563,13 @@ +--- a/postfix-install ++++ b/postfix-install +@@ -563,13 +563,13 @@ case "$setgid_group" in exit 1;; esac @@ -58,7 +56,7 @@ diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install for path in "$html_directory" "$readme_directory" "$shlib_directory" do -@@ -582,7 +582,7 @@ +@@ -582,7 +582,7 @@ do done for path in "$daemon_directory" "$data_directory" "$command_directory" "$queue_directory" \ @@ -67,7 +65,7 @@ diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install "$meta_directory" do case "$path" in -@@ -789,8 +789,8 @@ +@@ -789,8 +789,8 @@ do compare_or_replace $mode "$owner" "$group" html/$file \ $HTML_DIRECTORY/$file || exit 1;; '$manpage_directory') diff --git a/mail/postfix/patches/300-bdb_hash_segfault.patch b/mail/postfix/patches/300-bdb_hash_segfault.patch index 8e67ddca..e9915770 100644 --- a/mail/postfix/patches/300-bdb_hash_segfault.patch +++ b/mail/postfix/patches/300-bdb_hash_segfault.patch @@ -1,6 +1,6 @@ ---- a/src/util/dict_db.c 2017-07-16 16:56:00.819659962 +0300 -+++ b/src/util/dict_db.c 2017-07-16 16:58:31.011401358 +0300 -@@ -740,8 +740,8 @@ +--- a/src/util/dict_db.c ++++ b/src/util/dict_db.c +@@ -750,8 +750,8 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags, msg_fatal("create DB database: %m"); if (db == 0) msg_panic("db_create null result"); diff --git a/mail/postfix/patches/400-cdb.patch b/mail/postfix/patches/400-cdb.patch index 8faa1252..2b25a33e 100644 --- a/mail/postfix/patches/400-cdb.patch +++ b/mail/postfix/patches/400-cdb.patch @@ -1,7 +1,6 @@ -diff -Naur postfix-2.11.1/src/util/sys_defs.h postfix-2.11.1.patched/src/util/sys_defs.h ---- postfix-2.11.1/src/util/sys_defs.h 2013-09-30 00:51:55.000000000 +0400 -+++ postfix-2.11.1.patched/src/util/sys_defs.h 2014-09-29 03:11:48.962277971 +0400 -@@ -759,9 +759,8 @@ +--- a/src/util/sys_defs.h ++++ b/src/util/sys_defs.h +@@ -760,9 +760,8 @@ extern int initgroups(const char *, int); #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK #define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */ #define HAS_FSYNC diff --git a/mail/postfix/patches/500-crosscompile.patch b/mail/postfix/patches/500-crosscompile.patch index 6d48de0a..dc107744 100644 --- a/mail/postfix/patches/500-crosscompile.patch +++ b/mail/postfix/patches/500-crosscompile.patch @@ -1,6 +1,6 @@ ---- a/makedefs 2016-01-28 12:30:14.444082390 -0500 -+++ b/makedefs 2016-01-28 13:44:02.092006512 -0500 -@@ -213,7 +213,7 @@ error() { +--- a/makedefs ++++ b/makedefs +@@ -215,7 +215,7 @@ error() { case $# in # Officially supported usage. @@ -9,7 +9,7 @@ RELEASE=`(uname -r) 2>/dev/null` # No ${x%%y} support in Solaris 11 /bin/sh RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1 -@@ -227,6 +227,15 @@ case $# in +@@ -229,6 +229,15 @@ case $# in esac case "$SYSTEM.$RELEASE" in diff --git a/mail/postfix/patches/501-include_stdio.patch b/mail/postfix/patches/501-include_stdio.patch index 4fc3f521..84ad04a8 100644 --- a/mail/postfix/patches/501-include_stdio.patch +++ b/mail/postfix/patches/501-include_stdio.patch @@ -1,6 +1,6 @@ --- a/src/posttls-finger/posttls-finger.c +++ b/src/posttls-finger/posttls-finger.c -@@ -318,6 +318,7 @@ +@@ -342,6 +342,7 @@ #include #include #include diff --git a/mail/postfix/patches/600-nopostconf.patch b/mail/postfix/patches/600-nopostconf.patch index 7f60e1e4..ab83a028 100644 --- a/mail/postfix/patches/600-nopostconf.patch +++ b/mail/postfix/patches/600-nopostconf.patch @@ -1,7 +1,6 @@ -diff -Naur postfix-2.11.1/postfix-install postfix-2.11.1.patched/postfix-install ---- postfix-2.11.1/postfix-install 2014-10-05 20:43:58.598876904 +0400 -+++ postfix-2.11.1.patched/postfix-install 2014-10-05 20:47:36.076700082 +0400 -@@ -861,23 +861,23 @@ +--- a/postfix-install ++++ b/postfix-install +@@ -861,23 +861,23 @@ do esac done diff --git a/mail/postfix/patches/700-defaultconfig.patch b/mail/postfix/patches/700-defaultconfig.patch index 99088d19..c779d12e 100644 --- a/mail/postfix/patches/700-defaultconfig.patch +++ b/mail/postfix/patches/700-defaultconfig.patch @@ -1,7 +1,6 @@ -diff -Naur postfix-2.11.1/conf/main.cf postfix-2.11.1.patched/conf/main.cf ---- postfix-2.11.1/conf/main.cf 2013-12-24 18:57:25.000000000 +0400 -+++ postfix-2.11.1.patched/conf/main.cf 2014-10-05 21:35:53.427534410 +0400 -@@ -40,43 +40,8 @@ +--- a/conf/main.cf ++++ b/conf/main.cf +@@ -40,43 +40,8 @@ compatibility_level = 2 # #soft_bounce = no @@ -45,7 +44,7 @@ diff -Naur postfix-2.11.1/conf/main.cf postfix-2.11.1.patched/conf/main.cf # The default_privs parameter specifies the default rights used by # the local delivery agent for delivery to external file or command. # These rights are used in the absence of a recipient user context. -@@ -632,45 +597,4 @@ +@@ -632,45 +597,4 @@ debugger_command = # -dmS $process_name gdb $daemon_directory/$process_name # $process_id & sleep 1 diff --git a/mail/postfix/patches/800-fmt.patch b/mail/postfix/patches/800-fmt.patch index 40faa1a9..262a2ae9 100644 --- a/mail/postfix/patches/800-fmt.patch +++ b/mail/postfix/patches/800-fmt.patch @@ -1,7 +1,6 @@ -diff -Naur postfix-2.11.1/conf/post-install postfix-2.11.1.patched/conf/post-install ---- postfix-2.11.1/conf/post-install 2014-10-05 20:43:58.597876946 +0400 -+++ postfix-2.11.1.patched/conf/post-install 2014-10-11 16:28:01.258874097 +0400 -@@ -326,7 +326,7 @@ +--- a/conf/post-install ++++ b/conf/post-install +@@ -326,7 +326,7 @@ fake_fmt() { case `uname -s` in HP-UX*) FMT=cat;; SunOS*) FMT=fake_fmt;; diff --git a/mail/postfix/patches/900_less_overlayfs_rewrites.patch b/mail/postfix/patches/900_less_overlayfs_rewrites.patch index d5bb1178..faed3af7 100644 --- a/mail/postfix/patches/900_less_overlayfs_rewrites.patch +++ b/mail/postfix/patches/900_less_overlayfs_rewrites.patch @@ -1,7 +1,6 @@ -diff -Naur a/conf/post-install b/conf/post-install ---- a/conf/post-install 2015-12-28 00:00:45.000000000 +0000 -+++ b/conf/post-install 2017-08-01 22:42:30.476896711 +0000 -@@ -566,15 +566,16 @@ +--- a/conf/post-install ++++ b/conf/post-install +@@ -566,15 +566,16 @@ test -n "$create" && { then set_permission=1 fi diff --git a/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch b/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch new file mode 100644 index 00000000..2bc874fc --- /dev/null +++ b/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch @@ -0,0 +1,36 @@ +From 4fe5b1f216f1643080299bdb35e07f07b9c2caae Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Thu, 2 May 2019 22:28:57 -0700 +Subject: [PATCH] dns_lookup: Fix compilation with uClibc-ng + +uClibc-ng does not have res_send or res_nsend. ifdef the entire function. +--- + src/dns/dns_lookup.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c +index 1ea98b3..d7771d4 100644 +--- a/src/dns/dns_lookup.c ++++ b/src/dns/dns_lookup.c +@@ -311,6 +311,10 @@ typedef struct DNS_REPLY { + static int dns_res_query(const char *name, int class, int type, + unsigned char *answer, int anslen) + { ++#ifdef __UCLIBC__ ++ msg_info("dns_res_query() is not supported under uClibc"); ++ return 0; ++#else + unsigned char msg_buf[MAX_DNS_QUERY_SIZE]; + HEADER *reply_header = (HEADER *) answer; + int len; +@@ -369,6 +373,7 @@ static int dns_res_query(const char *name, int class, int type, + } + return (len); + } ++#endif + } + + /* dns_res_search - res_search() that can return negative replies */ +-- +2.17.1 + diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile index 824ea976..512de95a 100644 --- a/mail/sendmail/Makefile +++ b/mail/sendmail/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sendmail PKG_VERSION:=8.15.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://artfiles.org/sendmail.org/pub/sendmail/ \ @@ -19,6 +19,7 @@ PKG_MAINTAINER:=Val Kulkov PKG_LICENSE:=Sendmail PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:sendmail:sendmail PKG_INSTALL:=1 PKG_BUILD_DEPENDS:=openssl diff --git a/mail/sendmail/files/OpenWrt b/mail/sendmail/files/OpenWrt index 00865f01..c0a01a95 100644 --- a/mail/sendmail/files/OpenWrt +++ b/mail/sendmail/files/OpenWrt @@ -13,7 +13,7 @@ APPENDDEF(`confLIBSEARCH', `crypt') define(`confMTCCOPTS', `-D_REENTRANT') define(`confMTLDOPTS', `-lpthread') define(`confLDOPTS_SO', `-shared') -define(`confSONAME',`-soname') +define(`confSONAME',`-Wl,-soname') define(`currentuser', esyscmd(`id -nu')) define(`currentgroup', esyscmd(`id -ng')) diff --git a/mail/sendmail/files/sharedlibrary.m4 b/mail/sendmail/files/sharedlibrary.m4 index 2c131be8..6096f901 100644 --- a/mail/sendmail/files/sharedlibrary.m4 +++ b/mail/sendmail/files/sharedlibrary.m4 @@ -9,7 +9,7 @@ include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4') divert(bldTARGETS_SECTION) bldCURRENT_PRODUCT.so.confSOVER: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'} - ${LD} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so.confSOVER confSONAME bldCURRENT_PRODUCT.so.confSOVER ${bldCURRENT_PRODUCT`OBJS'} + ${CC} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so.confSOVER confSONAME,bldCURRENT_PRODUCT.so.confSOVER ${bldCURRENT_PRODUCT`OBJS'} ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)') install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so.confSOVER diff --git a/mail/sendmail/patches/200-openssl-1.1.1.patch b/mail/sendmail/patches/200-openssl-1.1.1.patch new file mode 100644 index 00000000..7eea24ac --- /dev/null +++ b/mail/sendmail/patches/200-openssl-1.1.1.patch @@ -0,0 +1,255 @@ +Not needed for 8.16 + +From: Sebastian Andrzej Siewior +Date: Sat, 10 Sep 2016 19:27:17 +0000 +Subject: [PATCH] sendmail: compile against openssl 1.1.0 + +Signed-off-by: Sebastian Andrzej Siewior +--- + +--- a/sendmail/tls.c ++++ b/sendmail/tls.c +@@ -60,18 +60,58 @@ static unsigned char dh512_g[] = + 0x02 + }; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000 ++ ++static inline int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) ++{ ++ /* If the fields p and g in d are NULL, the corresponding input ++ * parameters MUST be non-NULL. q may remain NULL. ++ */ ++ if ((dh->p == NULL && p == NULL) ++ || (dh->g == NULL && g == NULL)) ++ return 0; ++ ++ if (p != NULL) { ++ BN_free(dh->p); ++ dh->p = p; ++ } ++ if (q != NULL) { ++ BN_free(dh->q); ++ dh->q = q; ++ } ++ if (g != NULL) { ++ BN_free(dh->g); ++ dh->g = g; ++ } ++ ++ if (q != NULL) { ++ dh->length = BN_num_bits(q); ++ } ++ ++ return 1; ++} ++#endif ++ + static DH * + get_dh512() + { + DH *dh = NULL; ++ BIGNUM *p; ++ BIGNUM *g; + +- if ((dh = DH_new()) == NULL) +- return NULL; +- dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL); +- dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); +- if ((dh->p == NULL) || (dh->g == NULL)) +- return NULL; ++ dh = DH_new(); ++ p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL); ++ g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); ++ if (!dh || !p || !g) ++ goto err; ++ if (!DH_set0_pqg(dh, p, NULL, g)) ++ goto err; + return dh; ++err: ++ DH_free(dh); ++ BN_free(p); ++ BN_free(g); ++ return NULL; + } + + # if 0 +@@ -117,17 +157,22 @@ get_dh2048() + }; + static unsigned char dh2048_g[]={ 0x02, }; + DH *dh; ++ BIGNUM *p; ++ BIGNUM *g; + +- if ((dh=DH_new()) == NULL) +- return(NULL); +- dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); +- dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); +- if ((dh->p == NULL) || (dh->g == NULL)) +- { +- DH_free(dh); +- return(NULL); +- } ++ dh = DH_new(); ++ p = BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); ++ g = BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); ++ if (!dh || !p || !g) ++ goto err; ++ if (!DH_set0_pqg(dh, p, NULL, g)) ++ goto err; + return(dh); ++err: ++ DH_free(dh); ++ BN_free(p); ++ BN_free(g); ++ return NULL; + } + # endif /* !NO_DH */ + +@@ -926,7 +971,7 @@ inittls(ctx, req, options, srv, certfile + { + /* get a pointer to the current certificate validation store */ + store = SSL_CTX_get_cert_store(*ctx); /* does not fail */ +- crl_file = BIO_new(BIO_s_file_internal()); ++ crl_file = BIO_new(BIO_s_file()); + if (crl_file != NULL) + { + if (BIO_read_filename(crl_file, CRLFile) >= 0) +@@ -1000,26 +1045,43 @@ inittls(ctx, req, options, srv, certfile + ** maybe we should do it only on demand... + */ + +- if (bitset(TLS_I_RSA_TMP, req) + # if SM_CONF_SHM +- && ShmId != SM_SHM_NO_ID && +- (rsa_tmp = RSA_generate_key(RSA_KEYLENGTH, RSA_F4, NULL, +- NULL)) == NULL +-# else /* SM_CONF_SHM */ +- && 0 /* no shared memory: no need to generate key now */ +-# endif /* SM_CONF_SHM */ +- ) ++ if (bitset(TLS_I_RSA_TMP, req) ++ && ShmId != SM_SHM_NO_ID) + { +- if (LogLevel > 7) ++ BIGNUM *bn; ++ ++ bn = BN_new(); ++ rsa_tmp = RSA_new(); ++ if (!bn || !rsa_tmp || !BN_set_word(bn, RSA_F4)) { ++ RSA_free(rsa_tmp); ++ rsa_tmp = NULL; ++ } ++ if (rsa_tmp) + { +- sm_syslog(LOG_WARNING, NOQID, +- "STARTTLS=%s, error: RSA_generate_key failed", +- who); +- if (LogLevel > 9) +- tlslogerr(LOG_WARNING, who); ++ if (!RSA_generate_key_ex(rsa_tmp, RSA_KEYLENGTH, bn, NULL)) ++ { ++ RSA_free(rsa_tmp); ++ rsa_tmp = NULL; ++ } ++ } ++ BN_free(bn); ++ if (!rsa_tmp) ++ { ++ if (LogLevel > 7) ++ { ++ sm_syslog(LOG_WARNING, NOQID, ++ "STARTTLS=%s, error: RSA_generate_key failed", ++ who); ++ if (LogLevel > 9) ++ tlslogerr(LOG_WARNING, who); ++ } ++ return false; + } +- return false; + } ++# else /* SM_CONF_SHM */ ++ /* no shared memory: no need to generate key now */ ++# endif /* SM_CONF_SHM */ + # endif /* !TLS_NO_RSA */ + + /* +@@ -1210,9 +1272,15 @@ inittls(ctx, req, options, srv, certfile + sm_dprintf("inittls: Generating %d bit DH parameters\n", bits); + + /* this takes a while! */ +- dsa = DSA_generate_parameters(bits, NULL, 0, NULL, +- NULL, 0, NULL); +- dh = DSA_dup_DH(dsa); ++ dsa = DSA_new(); ++ if (dsa) { ++ int r; ++ ++ r = DSA_generate_parameters_ex(dsa, bits, NULL, 0, ++ NULL, NULL, NULL); ++ if (r != 0) ++ dh = DSA_dup_DH(dsa); ++ } + DSA_free(dsa); + } + else if (dh == NULL && bitset(TLS_I_DHFIXED, req)) +@@ -1733,6 +1801,9 @@ tmp_rsa_key(s, export, keylength) + int export; + int keylength; + { ++ BIGNUM *bn; ++ int ret; ++ + # if SM_CONF_SHM + extern int ShmId; + extern int *PRSATmpCnt; +@@ -1742,10 +1813,22 @@ tmp_rsa_key(s, export, keylength) + return rsa_tmp; + # endif /* SM_CONF_SHM */ + +- if (rsa_tmp != NULL) +- RSA_free(rsa_tmp); +- rsa_tmp = RSA_generate_key(RSA_KEYLENGTH, RSA_F4, NULL, NULL); +- if (rsa_tmp == NULL) ++ if (rsa_tmp == NULL) { ++ rsa_tmp = RSA_new(); ++ if (!rsa_tmp) ++ return NULL; ++ } ++ ++ bn = BN_new(); ++ if (!bn) ++ return NULL; ++ if (!BN_set_word(bn, RSA_F4)) { ++ BN_free(bn); ++ return NULL; ++ } ++ ret = RSA_generate_key_ex(rsa_tmp, RSA_KEYLENGTH, bn, NULL); ++ BN_free(bn); ++ if (!ret) + { + if (LogLevel > 0) + sm_syslog(LOG_ERR, NOQID, +@@ -1971,9 +2054,9 @@ x509_verify_cb(ok, ctx) + { + if (LogLevel > 13) + tls_verify_log(ok, ctx, "x509"); +- if (ctx->error == X509_V_ERR_UNABLE_TO_GET_CRL) ++ if (X509_STORE_CTX_get_error(ctx) == X509_V_ERR_UNABLE_TO_GET_CRL) + { +- ctx->error = 0; ++ X509_STORE_CTX_set_error(ctx, 0); + return 1; /* override it */ + } + } +--- a/doc/op/op.me ++++ b/doc/op/op.me +@@ -10898,7 +10898,7 @@ C=FileName_of_CA_Certificate + ln -s $C `openssl x509 -noout -hash < $C`.0 + .)b + A better way to do this is to use the +-.b c_rehash ++.b "openssl rehash" + command that is part of the OpenSSL distribution + because it handles subject hash collisions + by incrementing the number in the suffix of the filename of the symbolic link, diff --git a/mail/sendmail/patches/201-openssl-1.1.1-ecdhe.patch b/mail/sendmail/patches/201-openssl-1.1.1-ecdhe.patch new file mode 100644 index 00000000..b2e2e297 --- /dev/null +++ b/mail/sendmail/patches/201-openssl-1.1.1-ecdhe.patch @@ -0,0 +1,20 @@ +Not needed for 8.16 + +--- a/sendmail/tls.c ++++ b/sendmail/tls.c +@@ -1325,13 +1325,8 @@ inittls(ctx, req, options, srv, certfile, keyfile, cacertpath, cacertfile, dhpar + } + + #if _FFR_TLS_EC +- ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); +- if (ecdh != NULL) +- { +- SSL_CTX_set_options(*ctx, SSL_OP_SINGLE_ECDH_USE); +- SSL_CTX_set_tmp_ecdh(*ctx, ecdh); +- EC_KEY_free(ecdh); +- } ++ SSL_CTX_set_options(*ctx, SSL_OP_SINGLE_ECDH_USE); ++ SSL_CTX_set_ecdh_auto(*ctx, 1); + #endif /* _FFR_TLS_EC */ + + } diff --git a/mail/sendmail/patches/202-openssl-deprecated.patch b/mail/sendmail/patches/202-openssl-deprecated.patch new file mode 100644 index 00000000..31245bd0 --- /dev/null +++ b/mail/sendmail/patches/202-openssl-deprecated.patch @@ -0,0 +1,76 @@ +Must be rebased for 8.16 + +--- a/sendmail/main.c ++++ b/sendmail/main.c +@@ -17,6 +17,9 @@ + #include + #include + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define OpenSSL_version_num SSLeay ++#endif + #ifndef lint + SM_UNUSED(static char copyright[]) = + "@(#) Copyright (c) 1998-2013 Proofpoint, Inc. and its suppliers.\n\ +@@ -650,7 +653,7 @@ main(argc, argv, envp) + sm_dprintf(" OpenSSL: compiled 0x%08x\n", + (uint) OPENSSL_VERSION_NUMBER); + sm_dprintf(" OpenSSL: linked 0x%08x\n", +- (uint) SSLeay()); ++ (uint) OpenSSL_version_num()); + } + #endif /* STARTTLS */ + +--- a/sendmail/tls.c ++++ b/sendmail/tls.c +@@ -16,9 +16,25 @@ SM_RCSID("@(#)$Id: tls.c,v 8.127 2013-11-27 02:51:11 gshapiro Exp $") + # include + # include + # include ++# include ++# include ++# include ++# include + # ifndef HASURANDOMDEV + # include + # endif /* ! HASURANDOMDEV */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define OpenSSL_version_num SSLeay ++#endif ++ ++#ifndef CRYPTO_thread_id ++#define CRYPTO_thread_id() (0UL) ++#endif ++ ++#ifndef SSL_CTX_set_tmp_rsa_callback ++#define SSL_CTX_set_tmp_rsa_callback(ctx, cb) while(0) (cb)(NULL, 0, 0) ++#endif ++ + # if !TLS_NO_RSA + static RSA *rsa_tmp = NULL; /* temporary RSA key */ + static RSA *tmp_rsa_key __P((SSL *, int, int)); +@@ -380,6 +396,7 @@ init_tls_library(fipsmode) + { + bool bv; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + /* basic TLS initialization, ignore result for now */ + SSL_library_init(); + SSL_load_error_strings(); +@@ -388,6 +405,7 @@ init_tls_library(fipsmode) + /* this is currently a macro for SSL_library_init */ + SSLeay_add_ssl_algorithms(); + # endif /* 0 */ ++#endif /* OPENSSL_VERSION_NUMBER */ + + bv = tls_rand_init(RandFile, 7); + # if _FFR_FIPSMODE +@@ -1207,7 +1225,7 @@ inittls(ctx, req, options, srv, certfile, keyfile, cacertpath, cacertfile, dhpar + ** just the compile time version. + */ + +- rt_version = SSLeay(); ++ rt_version = OpenSSL_version_num(); + if (rt_version >= 0x00908000L && rt_version <= 0x0090802fL) + { + comp_methods = SSL_COMP_get_compression_methods(); diff --git a/mail/ssmtp/Makefile b/mail/ssmtp/Makefile index fb976d5e..0b430cb2 100644 --- a/mail/ssmtp/Makefile +++ b/mail/ssmtp/Makefile @@ -9,9 +9,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ssmtp PKG_VERSION:=2.64 -PKG_RELEASE:=5 +PKG_RELEASE:=7 PKG_MAINTAINER:=Dirk Brenken -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later +PKG_CPE_ID:=cpe:/a:ssmtp:ssmtp PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.bz2 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/s/ssmtp diff --git a/mail/ssmtp/patches/020-openssl-deprecated.patch b/mail/ssmtp/patches/020-openssl-deprecated.patch new file mode 100644 index 00000000..c4cc6b2e --- /dev/null +++ b/mail/ssmtp/patches/020-openssl-deprecated.patch @@ -0,0 +1,13 @@ +--- a/ssmtp.c ++++ b/ssmtp.c +@@ -1046,8 +1046,10 @@ int smtp_open(char *host, int port) + /* Init SSL stuff */ + SSL_CTX *ctx = NULL; + X509 *server_cert; ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_load_error_strings(); + SSLeay_add_ssl_algorithms(); ++#endif + ctx = SSL_CTX_new(SSLv23_client_method()); + if(!ctx) { + log_event(LOG_ERR, "No SSL support initiated\n"); diff --git a/multimedia/crtmpserver/Makefile b/multimedia/crtmpserver/Makefile deleted file mode 100644 index f2b80d9e..00000000 --- a/multimedia/crtmpserver/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# -# Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=crtmpserver -PKG_REV:=b6fdcdb953d1e99c48a0c37a8c80f2cad2db443b -PKG_VERSION:=2012-07-18+git-$(PKG_REV) -PKG_RELEASE:=2 -PKG_BUILD_PARALLEL:=2 -PKG_MAINTAINER:=Thomas Heil -PKG_LICENSE:=GPL-3.0 - - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_MIRROR_HASH:=8d887996b6b8cb465ec59f3f713fca46161cbb804cacd2b5405f836083fb58ba -PKG_SOURCE_URL:=https://github.com/j0sh/crtmpserver.git -PKG_SOURCE_SUBDIR:=crtmpserver-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=git - -include $(INCLUDE_DIR)/package.mk - -define Package/crtmpserver - SECTION:=multimedia - CATEGORY:=Multimedia - DEPENDS:=+libopenssl +libstdcpp +liblua - TITLE:=C++ RTMP Server - URL:=http://www.rtmpd.com/ -endef - -define Package/crtmpserver/description -C++ RTMP Server it is a high performance streaming server able to -stream (live or recorded) in the following technologies: - * To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE) - * To and from embedded devices: iPhone, Android - * From surveillance cameras - * IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols - -Also, crtmpserver can be used as a high performance rendes-vous -server. For example, it enables you to do: - * Audio/Video conferencing - * Online gaming - * Online collaboration - * Simple/complex chat applications -endef - -define Package/crtmpserver/conffiles -/etc/crtmpserver.lua -endef - -# XXX: this hack handles the usr/bin vs bin difference of backfire and trunk -TS_BASE:=$(wildcard $(TOOLCHAIN_DIR)/bin/$(TARGET_CC)) -TS_BASE:=$(dir $(if $(TS_BASE),$(TS_BASE),$(wildcard $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CC)))) - -define Build/Configure - (cd $(PKG_BUILD_DIR)/builders/make; \ - cp linux.mk linux-openwrt-uclibc.mk; \ - $(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TS_BASE),' \ - -e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \ - -e 's,^CCOMPILER[[:space:]]*=.*,CCOMPILER=$(TARGET_CC),' \ - -e 's,^CXXCOMPILER[[:space:]]*=.*,CXXCOMPILER=$(TARGET_CXX),' \ - -e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \ - -e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \ - linux-openwrt-uclibc.mk) - (cd $(PKG_BUILD_DIR)/sources/common/include/; \ - echo '#define CRTMPSERVER_VERSION_RELEASE_NUMBER "$(PKG_VERSION)\n"' > version.h; \ - echo '#define CRTMPSERVER_VERSION_CODE_NAME "Git\n"' >> version.h) -endef - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \ - PLATFORM=linux-openwrt-uclibc -Wno-error -j6 -endef - -define Package/crtmpserver/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib/crtmpserver - $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/ - $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \ - $(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \ - $(1)/usr/lib/crtmpserver/$(app)/; \ - ) - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver.lua $(1)/etc/ - $(INSTALL_DIR) $(1)/usr/share/crtmpserver/appselector - $(INSTALL_DIR) $(1)/usr/share/crtmpserver/media - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/crtmpserver.init $(1)/etc/init.d/crtmpserver -endef - -$(eval $(call BuildPackage,crtmpserver)) - diff --git a/multimedia/crtmpserver/files/crtmpserver.init b/multimedia/crtmpserver/files/crtmpserver.init deleted file mode 100644 index cea35121..00000000 --- a/multimedia/crtmpserver/files/crtmpserver.init +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2010 OpenWrt.org - -START=99 -STOP=80 - -SERVICE_USE_PID=1 - -CRTMPSERVER_BIN="/usr/bin/crtmpserver" -CRTMPSERVER_CONFIG="/etc/crtmpserver.lua" -CRTMPSERVER_PID="/var/run/crtmpserver.pid" - -start() -{ - echo "start $CRTMPSERVER_BIN" - start-stop-daemon -S -x "$CRTMPSERVER_BIN" -- --daemon --pid="$CRTMPSERVER_PID" \ - "$CRTMPSERVER_CONFIG" -} -stop() { - - echo "stop $CRTMPSERVER_BIN" - start-stop-daemon -K -x $CRTMPSERVER_BIN -p $CRTMPSERVER_PID -} - -reload() -{ - stop - start -} - diff --git a/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch b/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch deleted file mode 100644 index cc49523a..00000000 --- a/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/builders/make/compile.mk -+++ b/builders/make/compile.mk -@@ -72,7 +72,7 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny - - #common - COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include --COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt - COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp") - COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o) - diff --git a/multimedia/crtmpserver/patches/020-add-rpath.patch b/multimedia/crtmpserver/patches/020-add-rpath.patch deleted file mode 100644 index 1ea83203..00000000 --- a/multimedia/crtmpserver/patches/020-add-rpath.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/builders/make/linux.mk -+++ b/builders/make/linux.mk -@@ -31,8 +31,8 @@ OPTIMIZATIONS = -O3 - COMPILE_FLAGS = $(FPIC) $(OPTIMIZATIONS) $(CFLAGS) - - #linking flags --dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,"\$$ORIGIN" --dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,"\$$ORIGIN" -+dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,/usr/lib/crtmpserver -+dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,/usr/lib/crtmpserver - - #compile switches - PLATFORM_DEFINES = \ diff --git a/multimedia/crtmpserver/patches/030-default-config.patch b/multimedia/crtmpserver/patches/030-default-config.patch deleted file mode 100644 index 2975f000..00000000 --- a/multimedia/crtmpserver/patches/030-default-config.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/builders/cmake/crtmpserver/crtmpserver.lua -+++ b/builders/cmake/crtmpserver/crtmpserver.lua -@@ -4,7 +4,7 @@ configuration= - { - -- if true, the server will run as a daemon. - -- NOTE: all console appenders will be ignored if this is a daemon -- daemon=false, -+ daemon=true, - -- the OS's path separator. Used in composing paths - pathSeparator="/", - -@@ -44,7 +44,7 @@ configuration= - { - -- this is the root directory of all applications - -- usually this is relative to the binary execuable -- rootDirectory="applications", -+ rootDirectory="/usr/lib/crtmpserver", - - - --this is where the applications array starts -@@ -68,7 +68,7 @@ configuration= - -- this is the folder from where the current application gets it's content. - -- It is optional. If not specified, it will be defaulted to: - -- //mediaFolder -- -- mediaFolder="/some/directory/where/media/files/are/stored" -+ mediaFolder="/media", - -- the application will also be known by that names. It is optional - --aliases= - --{ -@@ -89,13 +89,6 @@ configuration= - }, - { - ip="0.0.0.0", -- port=8081, -- protocol="inboundRtmps", -- sslKey="server.key", -- sslCert="server.crt" -- }, -- { -- ip="0.0.0.0", - port=8080, - protocol="inboundRtmpt" - }, -@@ -184,6 +177,7 @@ configuration= - name="samplefactory", - description="asdsadasdsa", - protocol="dynamiclinklibrary", -+ mediaFolder="/usr/share/ctmpserver/media", - aliases= - { - "httpOutboundTest" diff --git a/multimedia/crtmpserver/patches/040-use-select.patch b/multimedia/crtmpserver/patches/040-use-select.patch deleted file mode 100644 index 380208e8..00000000 --- a/multimedia/crtmpserver/patches/040-use-select.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/builders/make/linux.mk -+++ b/builders/make/linux.mk -@@ -38,7 +38,7 @@ dynamic_exec_flags = $(FPIC) $(OPTIMIZAT - PLATFORM_DEFINES = \ - -DLINUX \ - -DLITTLE_ENDIAN_BYTE_ALIGNED \ -- -DNET_EPOLL -+ -DNET_SELECT - - SSL_BASE=/usr/local - diff --git a/multimedia/crtmpserver/patches/050-add-missing-make-defines.patch b/multimedia/crtmpserver/patches/050-add-missing-make-defines.patch deleted file mode 100644 index 25694b8f..00000000 --- a/multimedia/crtmpserver/patches/050-add-missing-make-defines.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/builders/make/compile.mk -+++ b/builders/make/compile.mk -@@ -58,7 +58,7 @@ DEFINES = $(PLATFORM_DEFINES) $(FEATURES - - #library paths - SSL_INCLUDE=-I$(SSL_BASE)/include --SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto -+SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto -ldl - - #lua - LUA_INCLUDE=-I$(PROJECT_BASE_PATH)/3rdparty/lua-dev -@@ -72,25 +72,25 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny - - #common - COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include --COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt -+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) $(PROJECT_BASE_PATH)/builders/make/output/dynamic/liblua.so -ltinyxml -lcrypt -ldl - COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp") - COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o) - - #thelib - THELIB_INCLUDE=$(COMMON_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/thelib/include --THELIB_LIBS=$(COMMON_LIBS) -L$(OUTPUT_DYNAMIC) -lcommon -+THELIB_LIBS=$(COMMON_LIBS) -L$(OUTPUT_DYNAMIC) -lcommon -ldl - THELIB_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/thelib/src -type f -name "*.cpp") - THELIB_OBJS = $(THELIB_SRCS:.cpp=.thelib.o) - - #tests - TESTS_INCLUDE=$(THELIB_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/tests/include --TESTS_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -+TESTS_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -ldl - TESTS_SRCS=$(shell find $(PROJECT_BASE_PATH)/sources/tests/src -type f -name "*.cpp") - TESTS_OBJS=$(TESTS_SRCS:.cpp=.tests.o) - - #crtmpserver - CRTMPSERVER_INCLUDE=$(THELIB_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/crtmpserver/include --CRTMPSERVER_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -+CRTMPSERVER_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -ldl - CRTMPSERVER_SRCS=$(shell find $(PROJECT_BASE_PATH)/sources/crtmpserver/src -type f -name "*.cpp") - CRTMPSERVER_OBJS_DYNAMIC=$(CRTMPSERVER_SRCS:.cpp=.crtmpserver_dynamic.o) - CRTMPSERVER_OBJS_STATIC=$(CRTMPSERVER_SRCS:.cpp=.crtmpserver_static.o) diff --git a/multimedia/crtmpserver/patches/060-add-missing-includes.patch b/multimedia/crtmpserver/patches/060-add-missing-includes.patch deleted file mode 100644 index 7b9da39a..00000000 --- a/multimedia/crtmpserver/patches/060-add-missing-includes.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/sources/common/include/common.h -+++ b/sources/common/include/common.h -@@ -20,6 +20,10 @@ - #ifndef _COMMON_H - #define _COMMON_H - -+#include -+#include -+#include -+ - #include "defines.h" - #include "platform/platform.h" - #include "utils/utils.h" ---- a/sources/common/src/utils/logging/fileloglocation.cpp -+++ b/sources/common/src/utils/logging/fileloglocation.cpp -@@ -18,6 +18,10 @@ - */ - - -+#include -+#include -+#include -+ - #include "utils/logging/fileloglocation.h" - #include "utils/lua/luautils.h" - #include "utils/misc/file.h" diff --git a/multimedia/crtmpserver/patches/070-missing-include-gcc-47.patch b/multimedia/crtmpserver/patches/070-missing-include-gcc-47.patch deleted file mode 100644 index 534046f0..00000000 --- a/multimedia/crtmpserver/patches/070-missing-include-gcc-47.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/3rdparty/tinyxml/tinyxml.h -+++ b/3rdparty/tinyxml/tinyxml.h -@@ -39,6 +39,7 @@ distribution. - #include - #include - #include -+#include "lstate.h" - using namespace std; - - // Help out windows: diff --git a/multimedia/crtmpserver/patches/080-disable-apple-streaming.patch b/multimedia/crtmpserver/patches/080-disable-apple-streaming.patch deleted file mode 100644 index cde14fe4..00000000 --- a/multimedia/crtmpserver/patches/080-disable-apple-streaming.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/builders/make/apps.mk -+++ b/builders/make/apps.mk -@@ -110,6 +110,6 @@ vptests: thelib $(VPTESTS_OBJS) - %.vptests.o: %.cpp - $(CXXCOMPILER) $(COMPILE_FLAGS) $(DEFINES) $(VPTESTS_INCLUDE) -c $< -o $@ - --ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPLESTREAMINGCLIENT_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS) --ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPLESTREAMINGCLIENT -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS --applications: thelib admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests -+ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS) -+ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS -+applications: thelib admin appselector flvplayback proxypublish samplefactory stresstest vptests diff --git a/multimedia/crtmpserver/patches/080-musl-uint32_t.patch b/multimedia/crtmpserver/patches/080-musl-uint32_t.patch deleted file mode 100644 index 51d6712b..00000000 --- a/multimedia/crtmpserver/patches/080-musl-uint32_t.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- a/sources/common/include/platform/linux/max.h -+++ b/sources/common/include/platform/linux/max.h -@@ -21,87 +21,7 @@ - #ifndef _MAX_H - #define _MAX_H - --#ifdef UINT64_MAX --#undef UINT64_MAX --#endif -- --#ifdef INT64_MAX --#undef INT64_MAX --#endif -- --#ifdef UINT32_MAX --#undef UINT32_MAX --#endif -- --#ifdef INT32_MAX --#undef INT32_MAX --#endif -- --#ifdef UINT16_MAX --#undef UINT16_MAX --#endif -- --#ifdef INT16_MAX --#undef INT16_MAX --#endif -- --#ifdef UINT8_MAX --#undef UINT8_MAX --#endif -- --#ifdef INT8_MAX --#undef INT8_MAX --#endif -- -- -- --#ifndef UINT64_MAX --#define UINT64_MAX ((uint64_t)(0xffffffffffffffffULL)) --#endif -- --#ifndef INT64_MAX --#define INT64_MAX ((int64_t)(0x7fffffffffffffffLL)) --#endif -- --#ifndef INT64_MIN --#define INT64_MIN ((int64_t)(0x8000000000000000LL)) --#endif -- --#ifndef UINT32_MAX --#define UINT32_MAX ((uint32_t)(0xffffffffUL)) --#endif -- --#ifndef INT32_MAX --#define INT32_MAX ((int32_t)(0x7fffffffL)) --#endif -- --#ifndef INT32_MIN --#define INT32_MIN ((int32_t)(0x80000000L)) --#endif -- --#ifndef UINT16_MAX --#define UINT16_MAX ((uint16_t)(0xffff)) --#endif -- --#ifndef INT16_MAX --#define INT16_MAX ((int16_t)(0x7fff)) --#endif -- --#ifndef INT16_MIN --#define INT16_MIN ((int16_t)(0x8000)) --#endif -- --#ifndef UINT8_MAX --#define UINT8_MAX ((uint8_t)(0xff)) --#endif -- --#ifndef INT8_MAX --#define INT8_MAX ((int8_t)(0x7f)) --#endif -- --#ifndef INT8_MIN --#define INT8_MIN ((int8_t)(0x80)) --#endif -+#include - - #endif /* _MAX_H */ - #endif /* LINUX */ diff --git a/multimedia/ffmpeg/Config.in b/multimedia/ffmpeg/Config.in index e365dc6a..93cdd67c 100644 --- a/multimedia/ffmpeg/Config.in +++ b/multimedia/ffmpeg/Config.in @@ -42,13 +42,6 @@ config FFMPEG_CUSTOM_LARGE comment "Profiles" -config FFMPEG_CUSTOM_FFSERVER_SUPPORT - bool "Include support for ffserver (FFmpeg streaming server)" - select FFMPEG_CUSTOM_MUXER_ffm - select FFMPEG_CUSTOM_DEMUXER_ffm - select FFMPEG_CUSTOM_DEMUXER_rtsp - select FFMPEG_CUSTOM_PROTOCOL_rtp - config FFMPEG_CUSTOM_MINIDLNA_SUPPORT bool "Include support for minidlna" select FFMPEG_CUSTOM_DECODER_aac @@ -136,7 +129,6 @@ config FFMPEG_CUSTOM_AUDIO_DEC_SUPPORT config FFMPEG_CUSTOM_PROGRAMS bool "Include ffmpeg command-line utilities" select PACKAGE_ffmpeg-custom - select PACKAGE_ffserver-custom select PACKAGE_ffprobe-custom comment "External Libraries" @@ -311,9 +303,6 @@ comment "Muxers" config FFMPEG_CUSTOM_MUXER_ac3 bool "AC3" -config FFMPEG_CUSTOM_MUXER_ffm - bool "FFM (ffserver live feed)" - config FFMPEG_CUSTOM_MUXER_h264 bool "H.264 Raw Video" depends on FFMPEG_CUSTOM_PATENTED @@ -363,9 +352,6 @@ config FFMPEG_CUSTOM_DEMUXER_ape config FFMPEG_CUSTOM_DEMUXER_flac bool "FLAC" -config FFMPEG_CUSTOM_DEMUXER_ffm - bool "FFM (ffserver live feed)" - config FFMPEG_CUSTOM_DEMUXER_h264 bool "H.264 Raw Video" depends on FFMPEG_CUSTOM_PATENTED diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 8038e3d5..d0259516 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2017-2019 Ian Leonard +# Copyright (C) 2017-2020 Ian Leonard # Copyright (C) 2018 Ted Hess # # This is free software, licensed under the GNU General Public License v2. @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ffmpeg -PKG_VERSION:=3.4.7 -PKG_RELEASE:=5 +PKG_VERSION:=4.3 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://ffmpeg.org/releases/ -PKG_HASH:=efd01782fd29b62505c973f5b61a65632d7b435dc9f4a6c97e92e6afd36cf5c8 +PKG_HASH:=1d0ad06484f44bcb97eba5e93c40bcb893890f9f64aeb43e46cd9bb4cbd6795d PKG_MAINTAINER:=Ted Hess , \ Ian Leonard @@ -203,8 +203,6 @@ FFMPEG_PATENTED_DECODERS:= \ hevc \ vc1 \ -FFMPEG_PATENTED_ENCODERS:=$(FFMPEG_PATENDED_DECODERS) - FFMPEG_PATENTED_MUXERS:= \ h264 \ hevc \ @@ -295,32 +293,6 @@ endef Package/ffprobe-custom/description = $(Package/ffprobe/description) -define Package/ffserver -$(call Package/ffmpeg/Default) - SECTION:=multimedia - CATEGORY:=Multimedia - TITLE+= streaming server - DEPENDS+= +libffmpeg-full - VARIANT:=full -endef - -define Package/ffserver-custom -$(call Package/ffmpeg/Default) - SECTION:=multimedia - CATEGORY:=Multimedia - TITLE+= streaming server (custom) - DEPENDS+= @!ALL libffmpeg-custom - VARIANT:=custom -endef - -define Package/ffserver/description -$(call Package/ffmpeg/Default/description) - . - This package contains the FFmpeg streaming server. -endef - -Package/ffserver-custom/description = $(Package/ffserver/description) - define Package/libffmpeg/Default $(call Package/ffmpeg/Default) SECTION:=libs @@ -371,7 +343,7 @@ endef define Package/libffmpeg-full $(call Package/libffmpeg/Default) TITLE+= (full) - DEPENDS+= +alsa-lib +libopus \ + DEPENDS+= +alsa-lib +libgnutls +PACKAGE_libopus:libopus \ +SOFT_FLOAT:shine \ +!SOFT_FLOAT:lame-lib \ +PACKAGE_libx264:libx264 \ @@ -436,16 +408,10 @@ FFMPEG_CONFIGURE+= \ --disable-armv5te \ --disable-armv6 \ --disable-armv6t2 \ - --disable-inline-asm \ - --disable-mipsdsp \ - --disable-mipsdspr2 \ - --disable-mipsfpu \ - --disable-msa \ - --disable-mmi \ --disable-fast-unaligned \ --disable-runtime-cpudetect -else ifneq ($(findstring arm,$(CONFIG_ARCH)),) +else ifneq ($(findstring arm,$(CONFIG_ARCH))$(findstring aarch64,$(CONFIG_ARCH)),) FFMPEG_CONFIGURE+= \ --disable-runtime-cpudetect # XXX: GitHub issue 3320 ppc cpu with fpu but no altivec (WNDR4700) @@ -454,23 +420,16 @@ FFMPEG_CONFIGURE+= \ --disable-altivec endif -# libavcodec/mips/aacdec_mips.c build problem -# XXX: disable use of assembly on MIPS. Patches welcome. -ifneq ($(findstring mips,$(CONFIG_ARCH)),) -FFMPEG_CONFIGURE+= \ - --disable-asm --disable-inline-asm -endif - # selectively disable optimizations according to arch/cpu type ifneq ($(findstring arm,$(CONFIG_ARCH)),) FFMPEG_CONFIGURE+= --enable-lto - ifneq ($(findstring vfp,$(CONFIG_TARGET_OPTIMIZATION)),) + ifneq ($(findstring vfp,$(CONFIG_CPU_TYPE)),) FFMPEG_CONFIGURE+= --enable-vfp else FFMPEG_CONFIGURE+= --disable-vfp endif - ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),) + ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),) FFMPEG_CONFIGURE+= \ --enable-neon \ --enable-vfp @@ -479,6 +438,13 @@ ifneq ($(findstring arm,$(CONFIG_ARCH)),) endif endif +ifneq ($(findstring aarch64,$(CONFIG_ARCH)),) + FFMPEG_CONFIGURE+= \ + --enable-lto \ + --enable-neon \ + --enable-vfp +endif + ifeq ($(ARCH),x86_64) FFMPEG_CONFIGURE+= --enable-lto endif @@ -497,10 +463,9 @@ ifeq ($(BUILD_VARIANT),full) ) FFMPEG_CONFIGURE+= \ - --enable-avresample \ + --enable-gnutls \ $(if $(CONFIG_BUILD_PATENTED),, \ $(call FFMPEG_DISABLE,decoder,$(FFMPEG_PATENTED_DECODERS)) \ - $(call FFMPEG_DISABLE,encoder,$(FFMPEG_PATENTED_ENCODERS)) \ $(call FFMPEG_DISABLE,muxer,$(FFMPEG_PATENTED_MUXERS)) \ $(call FFMPEG_DISABLE,demuxer,$(FFMPEG_PATENTED_DEMUXERS)) \ $(call FFMPEG_DISABLE,parser,$(FFMPEG_PATENTED_PARSERS))) \ @@ -692,9 +657,9 @@ define Build/InstallDev/full $(INSTALL_DIR) $(1)/usr/include $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale} $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.{a,so*} $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale} $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale}.{a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/ ifneq ($(CONFIG_PACKAGE_libx264),) $(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/ @@ -751,13 +716,6 @@ endef Package/ffprobe-custom/install = $(Package/ffprobe/install) -define Package/ffserver/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/ -endef - -Package/ffserver-custom/install = $(Package/ffserver/install) - define Package/libffmpeg-custom/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/ @@ -772,7 +730,7 @@ endef # Only ffmpeg with libx264 is GPL (yes libpostproc); all other builds are lgpl (no libpostproc) define Package/libffmpeg-full/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,swresample,swscale}.so.* $(1)/usr/lib/ ifneq ($(CONFIG_PACKAGE_libx264),) $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/ endif @@ -787,10 +745,8 @@ Package/libffmpeg-audio-dec/install = $(Package/libffmpeg-custom/install) $(eval $(call BuildPackage,ffmpeg)) $(eval $(call BuildPackage,ffprobe)) -$(eval $(call BuildPackage,ffserver)) $(eval $(call BuildPackage,ffmpeg-custom)) $(eval $(call BuildPackage,ffprobe-custom)) -$(eval $(call BuildPackage,ffserver-custom)) $(eval $(call BuildPackage,libffmpeg-audio-dec)) $(eval $(call BuildPackage,libffmpeg-full)) $(eval $(call BuildPackage,libffmpeg-mini)) diff --git a/multimedia/ffmpeg/patches/020-ffmpeg-fix-build-with-fdk-aac-2.0.patch b/multimedia/ffmpeg/patches/020-ffmpeg-fix-build-with-fdk-aac-2.0.patch deleted file mode 100644 index b8bd26ed..00000000 --- a/multimedia/ffmpeg/patches/020-ffmpeg-fix-build-with-fdk-aac-2.0.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 141c960e21d2860e354f9b90df136184dd00a9a8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= -Date: Fri, 31 Aug 2018 14:25:30 +0300 -Subject: [PATCH] libfdk-aacenc: Fix building with libfdk-aac v2 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When flushing the encoder, we now need to provide non-null buffer -parameters for everything, even if they are unused. - -The encoderDelay parameter has been replaced by two, nDelay and -nDelayCore. - -Signed-off-by: Martin Storsjö ---- - libavcodec/libfdk-aacenc.c | 34 +++++++++++++++++++++++++--------- - 1 file changed, 25 insertions(+), 9 deletions(-) - -diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c -index c340a1e3e0c..2ad768ed44e 100644 ---- a/libavcodec/libfdk-aacenc.c -+++ b/libavcodec/libfdk-aacenc.c -@@ -26,6 +26,11 @@ - #include "audio_frame_queue.h" - #include "internal.h" - -+#define FDKENC_VER_AT_LEAST(vl0, vl1) \ -+ (defined(AACENCODER_LIB_VL0) && \ -+ ((AACENCODER_LIB_VL0 > vl0) || \ -+ (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1))) -+ - typedef struct AACContext { - const AVClass *class; - HANDLE_AACENCODER handle; -@@ -286,7 +291,11 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) - } - - avctx->frame_size = info.frameLength; -+#if FDKENC_VER_AT_LEAST(4, 0) -+ avctx->initial_padding = info.nDelay; -+#else - avctx->initial_padding = info.encoderDelay; -+#endif - ff_af_queue_init(avctx, &s->afq); - - if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { -@@ -319,28 +328,35 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, - int out_buffer_size, out_buffer_element_size; - void *in_ptr, *out_ptr; - int ret; -+ uint8_t dummy_buf[1]; - AACENC_ERROR err; - - /* handle end-of-stream small frame and flushing */ - if (!frame) { -+ /* Must be a non-null pointer, even if it's a dummy. We could use -+ * the address of anything else on the stack as well. */ -+ in_ptr = dummy_buf; -+ in_buffer_size = 0; -+ - in_args.numInSamples = -1; - } else { -- in_ptr = frame->data[0]; -- in_buffer_size = 2 * avctx->channels * frame->nb_samples; -- in_buffer_element_size = 2; -+ in_ptr = frame->data[0]; -+ in_buffer_size = 2 * avctx->channels * frame->nb_samples; - -- in_args.numInSamples = avctx->channels * frame->nb_samples; -- in_buf.numBufs = 1; -- in_buf.bufs = &in_ptr; -- in_buf.bufferIdentifiers = &in_buffer_identifier; -- in_buf.bufSizes = &in_buffer_size; -- in_buf.bufElSizes = &in_buffer_element_size; -+ in_args.numInSamples = avctx->channels * frame->nb_samples; - - /* add current frame to the queue */ - if ((ret = ff_af_queue_add(&s->afq, frame)) < 0) - return ret; - } - -+ in_buffer_element_size = 2; -+ in_buf.numBufs = 1; -+ in_buf.bufs = &in_ptr; -+ in_buf.bufferIdentifiers = &in_buffer_identifier; -+ in_buf.bufSizes = &in_buffer_size; -+ in_buf.bufElSizes = &in_buffer_element_size; -+ - /* The maximum packet size is 6144 bits aka 768 bytes per channel. */ - if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels), 0)) < 0) - return ret; diff --git a/multimedia/ffmpeg/patches/030-fdkaac-version.patch b/multimedia/ffmpeg/patches/030-fdkaac-version.patch deleted file mode 100644 index 5162ae89..00000000 --- a/multimedia/ffmpeg/patches/030-fdkaac-version.patch +++ /dev/null @@ -1,90 +0,0 @@ -From ffb9b7a6bab6c6bfd3dd9a7c32e3724209824999 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= -Date: Tue, 4 Sep 2018 11:29:37 +0300 -Subject: [PATCH] libfdk-aac: Consistently use a proper version check macro for - detecting features -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The previous version checks checked explicitly for the version -where the version define was added to the installed headers, -making an "#ifdef AACDECODER_LIB_VL0" enough. Now that we have -a need for more diverse version checks than this, convert all checks -to such checks. - -Signed-off-by: Martin Storsjö ---- - libavcodec/libfdk-aacdec.c | 13 ++++++++----- - libavcodec/libfdk-aacenc.c | 6 +++--- - 2 files changed, 11 insertions(+), 8 deletions(-) - -diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c -index 3be65155b5f..c3d3b70fc93 100644 ---- a/libavcodec/libfdk-aacdec.c -+++ b/libavcodec/libfdk-aacdec.c -@@ -25,9 +25,12 @@ - #include "avcodec.h" - #include "internal.h" - --/* The version macro is introduced the same time as the setting enum was -- * changed, so this check should suffice. */ --#ifndef AACDECODER_LIB_VL0 -+#define FDKDEC_VER_AT_LEAST(vl0, vl1) \ -+ (defined(AACDECODER_LIB_VL0) && \ -+ ((AACDECODER_LIB_VL0 > vl0) || \ -+ (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1))) -+ -+#if !FDKDEC_VER_AT_LEAST(2, 5) // < 2.5.10 - #define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS - #endif - -@@ -72,7 +75,7 @@ static const AVOption fdk_aac_dec_options[] = { - OFFSET(drc_level), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 127, AD, NULL }, - { "drc_heavy", "Dynamic Range Control: heavy compression, where [1] is on (RF mode) and [0] is off", - OFFSET(drc_heavy), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 1, AD, NULL }, --#ifdef AACDECODER_LIB_VL0 -+#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10 - { "level_limit", "Signal level limiting", OFFSET(level_limit), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, 1, AD }, - #endif - { NULL } -@@ -293,7 +296,7 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx) - } - } - --#ifdef AACDECODER_LIB_VL0 -+#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10 - if (aacDecoder_SetParam(s->handle, AAC_PCM_LIMITER_ENABLE, s->level_limit) != AAC_DEC_OK) { - av_log(avctx, AV_LOG_ERROR, "Unable to set in signal level limiting in the decoder\n"); - return AVERROR_UNKNOWN; -diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c -index 2ad768ed44e..92ad1762aea 100644 ---- a/libavcodec/libfdk-aacenc.c -+++ b/libavcodec/libfdk-aacenc.c -@@ -156,7 +156,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) - case 6: mode = MODE_1_2_2_1; sce = 2; cpe = 2; break; - /* The version macro is introduced the same time as the 7.1 support, so this - should suffice. */ --#ifdef AACENCODER_LIB_VL0 -+#if FDKENC_VER_AT_LEAST(3, 4) // 3.4.12 - case 8: - sce = 2; - cpe = 3; -@@ -291,7 +291,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) - } - - avctx->frame_size = info.frameLength; --#if FDKENC_VER_AT_LEAST(4, 0) -+#if FDKENC_VER_AT_LEAST(4, 0) // 4.0.0 - avctx->initial_padding = info.nDelay; - #else - avctx->initial_padding = info.encoderDelay; -@@ -412,7 +412,7 @@ static const uint64_t aac_channel_layout[] = { - AV_CH_LAYOUT_4POINT0, - AV_CH_LAYOUT_5POINT0_BACK, - AV_CH_LAYOUT_5POINT1_BACK, --#ifdef AACENCODER_LIB_VL0 -+#if FDKENC_VER_AT_LEAST(3, 4) // 3.4.12 - AV_CH_LAYOUT_7POINT1_WIDE_BACK, - AV_CH_LAYOUT_7POINT1, - #endif diff --git a/multimedia/ffmpeg/patches/030-h264-mips.patch b/multimedia/ffmpeg/patches/030-h264-mips.patch new file mode 100644 index 00000000..53ec3369 --- /dev/null +++ b/multimedia/ffmpeg/patches/030-h264-mips.patch @@ -0,0 +1,16 @@ +--- a/libavcodec/mips/cabac.h ++++ b/libavcodec/mips/cabac.h +@@ -28,6 +28,7 @@ + #include "libavutil/mips/mmiutils.h" + #include "config.h" + ++#ifndef __mips16 + #define get_cabac_inline get_cabac_inline_mips + static av_always_inline int get_cabac_inline_mips(CABACContext *c, + uint8_t * const state){ +@@ -116,4 +117,5 @@ static av_always_inline int get_cabac_inline_mips(CABACContext *c, + return bit; + } + ++#endif + #endif /* AVCODEC_MIPS_CABAC_H */ diff --git a/multimedia/ffmpeg/patches/040-fdkaac-eld.patch b/multimedia/ffmpeg/patches/040-fdkaac-eld.patch deleted file mode 100644 index 2f9880ef..00000000 --- a/multimedia/ffmpeg/patches/040-fdkaac-eld.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 7e929dac100916fc45cb95e231025f3439c20156 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= -Date: Tue, 4 Sep 2018 11:45:35 +0300 -Subject: [PATCH] libfdk-aacenc: Allow enabling the ELDv2 profile -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is a new feature in FDK v2. - -Signed-off-by: Martin Storsjö ---- - libavcodec/libfdk-aacenc.c | 27 ++++++++++++++++++++++++++- - 1 file changed, 26 insertions(+), 1 deletion(-) - -diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c -index 92ad1762aea..f71a276403e 100644 ---- a/libavcodec/libfdk-aacenc.c -+++ b/libavcodec/libfdk-aacenc.c -@@ -36,6 +36,7 @@ typedef struct AACContext { - HANDLE_AACENCODER handle; - int afterburner; - int eld_sbr; -+ int eld_v2; - int signaling; - int latm; - int header_period; -@@ -47,6 +48,9 @@ typedef struct AACContext { - static const AVOption aac_enc_options[] = { - { "afterburner", "Afterburner (improved quality)", offsetof(AACContext, afterburner), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, - { "eld_sbr", "Enable SBR for ELD (for SBR in other configurations, use the -profile parameter)", offsetof(AACContext, eld_sbr), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, -+#if FDKENC_VER_AT_LEAST(4, 0) // 4.0.0 -+ { "eld_v2", "Enable ELDv2 (LD-MPS extension for ELD stereo signals)", offsetof(AACContext, eld_v2), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, -+#endif - { "signaling", "SBR/PS signaling style", offsetof(AACContext, signaling), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 2, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" }, - { "default", "Choose signaling implicitly (explicit hierarchical by default, implicit if global header is disabled)", 0, AV_OPT_TYPE_CONST, { .i64 = -1 }, 0, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" }, - { "implicit", "Implicit backwards compatible signaling", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" }, -@@ -149,7 +153,28 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) - - switch (avctx->channels) { - case 1: mode = MODE_1; sce = 1; cpe = 0; break; -- case 2: mode = MODE_2; sce = 0; cpe = 1; break; -+ case 2: -+#if FDKENC_VER_AT_LEAST(4, 0) // 4.0.0 -+ // (profile + 1) to map from profile range to AOT range -+ if (aot == FF_PROFILE_AAC_ELD + 1 && s->eld_v2) { -+ if ((err = aacEncoder_SetParam(s->handle, AACENC_CHANNELMODE, -+ 128)) != AACENC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to enable ELDv2: %s\n", -+ aac_get_error(err)); -+ goto error; -+ } else { -+ mode = MODE_212; -+ sce = 1; -+ cpe = 0; -+ } -+ } else -+#endif -+ { -+ mode = MODE_2; -+ sce = 0; -+ cpe = 1; -+ } -+ break; - case 3: mode = MODE_1_2; sce = 1; cpe = 1; break; - case 4: mode = MODE_1_2_1; sce = 2; cpe = 1; break; - case 5: mode = MODE_1_2_2; sce = 1; cpe = 2; break; diff --git a/multimedia/ffmpeg/patches/050-fdkaac-define.patch b/multimedia/ffmpeg/patches/050-fdkaac-define.patch deleted file mode 100644 index 4a84ad8c..00000000 --- a/multimedia/ffmpeg/patches/050-fdkaac-define.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 2a9e1c122eed66be1b26b747342b848300b226c7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= -Date: Wed, 12 Sep 2018 23:03:12 +0300 -Subject: [PATCH] libfdk-aac: Don't use defined() in a #define -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -MSVC expands the preprocessor directives differently, making the -version check fail in the previous form. - -Clang can warn about this with -Wexpansion-to-defined (not currently -enabled by default): -warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] - -Signed-off-by: Martin Storsjö ---- - libavcodec/libfdk-aacdec.c | 9 ++++++--- - libavcodec/libfdk-aacenc.c | 9 ++++++--- - 2 files changed, 12 insertions(+), 6 deletions(-) - -diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c -index ca70a49ad46..63856232d9e 100644 ---- a/libavcodec/libfdk-aacdec.c -+++ b/libavcodec/libfdk-aacdec.c -@@ -25,10 +25,13 @@ - #include "avcodec.h" - #include "internal.h" - -+#ifdef AACDECODER_LIB_VL0 - #define FDKDEC_VER_AT_LEAST(vl0, vl1) \ -- (defined(AACDECODER_LIB_VL0) && \ -- ((AACDECODER_LIB_VL0 > vl0) || \ -- (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1))) -+ ((AACDECODER_LIB_VL0 > vl0) || \ -+ (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1)) -+#else -+#define FDKDEC_VER_AT_LEAST(vl0, vl1) 0 -+#endif - - #if !FDKDEC_VER_AT_LEAST(2, 5) // < 2.5.10 - #define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS -diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c -index f71a276403e..3b492ef8f48 100644 ---- a/libavcodec/libfdk-aacenc.c -+++ b/libavcodec/libfdk-aacenc.c -@@ -26,10 +26,13 @@ - #include "audio_frame_queue.h" - #include "internal.h" - -+#ifdef AACENCODER_LIB_VL0 - #define FDKENC_VER_AT_LEAST(vl0, vl1) \ -- (defined(AACENCODER_LIB_VL0) && \ -- ((AACENCODER_LIB_VL0 > vl0) || \ -- (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1))) -+ ((AACENCODER_LIB_VL0 > vl0) || \ -+ (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1)) -+#else -+#define FDKENC_VER_AT_LEAST(vl0, vl1) 0 -+#endif - - typedef struct AACContext { - const AVClass *class; diff --git a/multimedia/ffmpeg/patches/050-glibc.patch b/multimedia/ffmpeg/patches/050-glibc.patch new file mode 100644 index 00000000..870a87ad --- /dev/null +++ b/multimedia/ffmpeg/patches/050-glibc.patch @@ -0,0 +1,10 @@ +--- a/libavcodec/wmv2dsp.c ++++ b/libavcodec/wmv2dsp.c +@@ -263,6 +263,6 @@ av_cold void ff_wmv2dsp_init(WMV2DSPContext *c) + c->put_mspel_pixels_tab[6] = put_mspel8_mc22_c; + c->put_mspel_pixels_tab[7] = put_mspel8_mc32_c; + +- if (ARCH_MIPS) ++ if (ARCH_MIPS64) + ff_wmv2dsp_init_mips(c); + } diff --git a/multimedia/gerbera/Makefile b/multimedia/gerbera/Makefile new file mode 100644 index 00000000..851464c9 --- /dev/null +++ b/multimedia/gerbera/Makefile @@ -0,0 +1,85 @@ +# +# Copyright (C) 2011-2020 Entware +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gerbera +PKG_VERSION:=1.5.0 +PKG_RELEASE:=8 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/gerbera/gerbera/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=693a99b295bc79d842f036a6d04996d4676ac0791d65f3a1f7aab4badf9fb5ef + +PKG_MAINTAINER:= +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=LICENSE.md + +PKG_BUILD_DEPENDS:=libmatroska pugixml spdlog taglib +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/gerbera + SECTION:=multimedia + CATEGORY:=Multimedia + DEPENDS:=+file +libnpupnp +libsqlite3 +libexif +libuuid +libfmt $(ICONV_DEPENDS) + TITLE:=A free media server + URL:=https://gerbera.io + USERID:=gerbera:gerbera +endef + +define Package/gerbera/description + Gerbera - UPnP Media Server based on Mediatomb. +endef + +define Package/gerbera/conffiles +/etc/config/gerbera +endef + +CMAKE_OPTIONS += \ + -DCXX_FILESYSTEM_NO_LINK_NEEDED=$(if $(CONFIG_GCC_USE_VERSION_9),ON,OFF) \ + -DCXX_FILESYSTEM_STDCPPFS_NEEDED=$(if $(CONFIG_GCC_USE_VERSION_8),OFF,ON) \ + -DICONV_INCLUDE_DIR=$(ICONV_PREFIX)/include \ + -DICONV_LIBRARIES=$(ICONV_PREFIX)/lib/libiconv.a \ + -DWITH_MAGIC=ON \ + -DWITH_MYSQL=OFF \ + -DWITH_CURL=OFF \ + -DWITH_INOTIFY=ON \ + -DWITH_JS=OFF \ + -DWITH_TAGLIB=ON \ + -DWITH_AVCODEC=OFF \ + -DWITH_FFMPEGTHUMBNAILER=OFF \ + -DWITH_EXIF=ON \ + -DWITH_EXIV2=OFF \ + -DWITH_MATROSKA=ON \ + -DWITH_SYSTEMD=OFF \ + -DWITH_LASTFM=OFF \ + -DWITH_DEBUG=OFF \ + -DWITH_TESTS=OFF + +TARGET_CFLAGS += \ + -ffunction-sections \ + -fdata-sections \ + -flto \ + -I$(STAGING_DIR)/usr/include/npupnp/upnp +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + +define Package/gerbera/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gerbera $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/usr/share/gerbera $(1)/usr/share + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/gerbera.config $(1)/etc/config/gerbera + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/gerbera.init $(1)/etc/init.d/gerbera +endef + +$(eval $(call BuildPackage,gerbera)) diff --git a/multimedia/gerbera/files/gerbera.config b/multimedia/gerbera/files/gerbera.config new file mode 100644 index 00000000..6ada4aa9 --- /dev/null +++ b/multimedia/gerbera/files/gerbera.config @@ -0,0 +1,6 @@ +config gerbera config + option enabled '0' + option debug '0' + option user 'gerbera' + option group 'gerbera' + option home '/tmp/gerbera' diff --git a/multimedia/gerbera/files/gerbera.init b/multimedia/gerbera/files/gerbera.init new file mode 100644 index 00000000..191fb3b6 --- /dev/null +++ b/multimedia/gerbera/files/gerbera.init @@ -0,0 +1,48 @@ +#!/bin/sh /etc/rc.common + +START=82 + +USE_PROCD=1 +PROG=/usr/bin/gerbera + +start_service() { + local enabled + local debug + local user + local group + local home + + config_load 'gerbera' + config_get_bool enabled config 'enabled' '0' + config_get_bool debug config 'debug' '0' + + [ "$enabled" -eq 0 ] && { + echo "Gerbera not enabled. Please enable in /etc/config/gerbera" + return 1 + } + + config_get user config 'user' 'gerbera' + config_get group config 'group' 'gerbera' + config_get home config 'home' '/tmp/gerbera' + + [ -d "$home" ] || { + mkdir -p "$home" + chown "$user":"$group" "$home" + + gerbera -m "$home" -f '' --create-config > "$home/config.xml" 2> /dev/null + chown "$user":"$group" "$home/config.xml" + chmod 600 "$home/config.xml" + + echo "Created default gerbera config at $home/config.xml" + echo "Please edit to your liking and restart." + return 2 + } + + procd_open_instance + procd_set_param user "$user" + procd_set_param group "$group" + procd_set_param command "$PROG" -c "$home/config.xml" + procd_set_param stdout "$debug" + procd_set_param stderr 1 + procd_close_instance +} diff --git a/multimedia/gerbera/patches/010-iconv.patch b/multimedia/gerbera/patches/010-iconv.patch new file mode 100644 index 00000000..9145f76f --- /dev/null +++ b/multimedia/gerbera/patches/010-iconv.patch @@ -0,0 +1,36 @@ +From 77cae5ff9b8dff22bfebac905f1579562609dd35 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Mon, 4 May 2020 12:44:34 -0700 +Subject: [PATCH] remove iconv casting + +iconv_t is sometimes a pointer and other times an int. Remove casting +to make it work with the latter. + +Signed-off-by: Rosen Penev +--- + src/util/string_converter.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/util/string_converter.cc b/src/util/string_converter.cc +index 272787ad..e1724b39 100644 +--- a/src/util/string_converter.cc ++++ b/src/util/string_converter.cc +@@ -41,15 +41,15 @@ StringConverter::StringConverter(const std::string& from, const std::string& to) + dirty = false; + + cd = iconv_open(to.c_str(), from.c_str()); +- if (cd == reinterpret_cast(-1)) { +- cd = static_cast(nullptr); ++ if (!cd) { ++ cd = {}; + throw_std_runtime_error(std::string("iconv: ") + strerror(errno)); + } + } + + StringConverter::~StringConverter() + { +- if (cd != static_cast(nullptr)) ++ if (cd) + iconv_close(cd); + } + diff --git a/multimedia/gerbera/patches/020-pid.patch b/multimedia/gerbera/patches/020-pid.patch new file mode 100644 index 00000000..7ce75c70 --- /dev/null +++ b/multimedia/gerbera/patches/020-pid.patch @@ -0,0 +1,41 @@ +From 59d37af2d6afd3d0ab6e8c5f3ea099435150c349 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Tue, 2 Jun 2020 15:55:25 -0700 +Subject: [PATCH] add missing unistd header + +Error with pid_t. + +Found with musl + libcxx. + +Signed-off-by: Rosen Penev +--- + src/util/process.h | 2 ++ + src/util/process_executor.h | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/util/process.h b/src/util/process.h +index e79e016c..8778aa34 100644 +--- a/src/util/process.h ++++ b/src/util/process.h +@@ -35,6 +35,8 @@ + #include + #include + ++#include ++ + // forward declaration + class Config; + +diff --git a/src/util/process_executor.h b/src/util/process_executor.h +index eaccf451..2a724087 100644 +--- a/src/util/process_executor.h ++++ b/src/util/process_executor.h +@@ -35,6 +35,8 @@ + #include + #include + ++#include ++ + #include "executor.h" + + class ProcessExecutor : public Executor { diff --git a/multimedia/gerbera/patches/030-unistd.patch b/multimedia/gerbera/patches/030-unistd.patch new file mode 100644 index 00000000..5b50f03d --- /dev/null +++ b/multimedia/gerbera/patches/030-unistd.patch @@ -0,0 +1,74 @@ +From 89b289cde29c731f995642a341dc5fd3b47ec7a0 Mon Sep 17 00:00:00 2001 +From: Jean-Francois Dockes +Date: Mon, 4 May 2020 16:32:23 +0200 +Subject: [PATCH] The access() system call needs unistd.h, at least on Focal + +--- + src/file_request_handler.cc | 2 +- + src/iohandler/io_handler_chainer.cc | 2 +- + src/serve_request_handler.cc | 2 +- + src/util/upnp_quirks.cc | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/file_request_handler.cc b/src/file_request_handler.cc +index e8579b06..cfa3eaed 100644 +--- a/src/file_request_handler.cc ++++ b/src/file_request_handler.cc +@@ -30,9 +30,9 @@ + /// \file file_request_handler.cc + + #include "file_request_handler.h" // API +- + #include + #include ++#include + #include + + #include "config/config_manager.h" +diff --git a/src/iohandler/io_handler_chainer.cc b/src/iohandler/io_handler_chainer.cc +index e8701cd7..beaa9d03 100644 +--- a/src/iohandler/io_handler_chainer.cc ++++ b/src/iohandler/io_handler_chainer.cc +@@ -30,8 +30,8 @@ + /// \file io_handler_chainer.cc + + #include "io_handler_chainer.h" // API +- + #include ++#include + + #include "exceptions.h" + +diff --git a/src/serve_request_handler.cc b/src/serve_request_handler.cc +index 8eaf46af..210140a3 100644 +--- a/src/serve_request_handler.cc ++++ b/src/serve_request_handler.cc +@@ -30,8 +30,8 @@ + /// \file serve_request_handler.cc + + #include "serve_request_handler.h" +- + #include ++#include + #include + + #include "config/config_manager.h" +diff --git a/src/util/upnp_quirks.cc b/src/util/upnp_quirks.cc +index df137370..e6f510b4 100644 +--- a/src/util/upnp_quirks.cc ++++ b/src/util/upnp_quirks.cc +@@ -24,13 +24,13 @@ + /// \file upnp_quirks.cc + + #include "upnp_quirks.h" // API +- + #include "cds_objects.h" + #include "config/config_manager.h" + #include "server.h" + #include "util/tools.h" + #include "util/upnp_clients.h" + #include "util/upnp_headers.h" ++#include + + Quirks::Quirks(std::shared_ptr config, const struct sockaddr_storage* addr, const std::string& userAgent) + : config(std::move(config)) diff --git a/multimedia/gerbera/patches/040-npupnp.patch b/multimedia/gerbera/patches/040-npupnp.patch new file mode 100644 index 00000000..b82a4db4 --- /dev/null +++ b/multimedia/gerbera/patches/040-npupnp.patch @@ -0,0 +1,485 @@ +From 2ebccbb993dca41674de295f2d513abd568f971a Mon Sep 17 00:00:00 2001 +From: Jean-Francois Dockes +Date: Fri, 13 Mar 2020 09:19:04 +0100 +Subject: [PATCH] Quick changes for working with NPUPNP + +--- + CMakeLists.txt | 12 +++++------- + src/action_request.cc | 11 +++++++++++ + src/device_description_handler.cc | 4 ++++ + src/file_request_handler.cc | 4 ++++ + src/iohandler/file_io_handler.cc | 2 ++ + src/iohandler/io_handler.cc | 2 ++ + src/iohandler/mem_io_handler.cc | 2 ++ + src/serve_request_handler.cc | 9 ++++++++- + src/server.cc | 8 ++++++++ + src/transcoding/transcode_ext_handler.cc | 2 ++ + src/upnp_cds.cc | 12 +++++++++++- + src/upnp_cm.cc | 11 +++++++++++ + src/upnp_mrreg.cc | 10 +++++++++- + src/url_request_handler.cc | 6 ++++++ + src/util/upnp_clients.cc | 12 ++++++++++++ + src/util/upnp_headers.cc | 14 +++++++++++++- + src/util/upnp_headers.h | 2 ++ + src/web/web_request_handler.cc | 4 ++++ + 18 files changed, 116 insertions(+), 11 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 46f2ca5c..b51300d9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -293,13 +293,11 @@ if (LFS_FOUND) + target_link_libraries(gerbera ${LFS_LIBRARIES}) + endif() + +-find_package (LibUpnp REQUIRED) +-include_directories(${UPNP_INCLUDE_DIRS}) +-target_link_libraries (gerbera ${UPNP_LIBRARIES}) +- +-if (UPNP_VERSION_STRING VERSION_LESS "1.12.1") +- message(FATAL_ERROR "gerbera requires libupnp 1.12.1 or above.") +-endif() ++#### Hard-coded NPUPNP defs for now, just for testing ++add_definitions(-DUSING_NPUPNP) ++include_directories(/usr/include/npupnp/upnp) ++target_link_libraries (gerbera -lnpupnp) ++set (UPNP_HAS_IPV6 1) + + if (NOT UPNP_HAS_IPV6) + message(FATAL_ERROR "Gerbera requires libupnp with IPv6 support.") +diff --git a/src/action_request.cc b/src/action_request.cc +index 3aa4a991..29be6aaf 100644 +--- a/src/action_request.cc ++++ b/src/action_request.cc +@@ -65,11 +65,17 @@ std::string ActionRequest::getServiceID() const + + std::unique_ptr ActionRequest::getRequest() const + { ++#if !defined(USING_NPUPNP) + DOMString cxml = ixmlPrintDocument(UpnpActionRequest_get_ActionRequest(upnp_request)); ++#endif + auto request = std::make_unique(); ++#if defined(USING_NPUPNP) ++ auto ret = request->load_string(upnp_request->xmlAction.c_str()); ++#else + auto ret = request->load_string(cxml); + ixmlFreeDOMString(cxml); + ++#endif + if (ret.status != pugi::xml_parse_status::status_ok) + throw_std_runtime_error("Unable to parse ixml"); + +@@ -94,6 +100,7 @@ void ActionRequest::update() + std::string xml = buf.str(); + log_debug("ActionRequest::update(): {}", xml.c_str()); + ++#if !defined(USING_NPUPNP) + IXML_Document* result = nullptr; + int err = ixmlParseBufferEx(xml.c_str(), &result); + +@@ -105,6 +112,10 @@ void ActionRequest::update() + UpnpActionRequest_set_ActionResult(upnp_request, result); + UpnpActionRequest_set_ErrCode(upnp_request, errCode); + } ++#else ++ UpnpActionRequest_set_xmlResponse(upnp_request, xml); ++ UpnpActionRequest_set_ErrCode(upnp_request, errCode); ++#endif + } else { + // ok, here there can be two cases + // either the function below already did set an error code, +diff --git a/src/device_description_handler.cc b/src/device_description_handler.cc +index 6aca745e..cf2e8015 100644 +--- a/src/device_description_handler.cc ++++ b/src/device_description_handler.cc +@@ -45,7 +45,11 @@ void DeviceDescriptionHandler::getInfo(const char* filename, UpnpFileInfo* info) + { + // We should be able to do the generation here, but libupnp doesnt support the request cookies yet + UpnpFileInfo_set_FileLength(info, -1); ++#if defined(USING_NPUPNP) + UpnpFileInfo_set_ContentType(info, "application/xml"); ++#else ++ UpnpFileInfo_set_ContentType(info, ixmlCloneDOMString("application/xml")); ++#endif + UpnpFileInfo_set_IsReadable(info, 1); + UpnpFileInfo_set_IsDirectory(info, 0); + } +diff --git a/src/file_request_handler.cc b/src/file_request_handler.cc +index e8579b06..615f7e85 100644 +--- a/src/file_request_handler.cc ++++ b/src/file_request_handler.cc +@@ -238,7 +238,11 @@ void FileRequestHandler::getInfo(const char* filename, UpnpFileInfo* info) + + UpnpFileInfo_set_LastModified(info, statbuf.st_mtime); + UpnpFileInfo_set_IsDirectory(info, S_ISDIR(statbuf.st_mode)); ++#if defined(USING_NPUPNP) ++ UpnpFileInfo_set_ContentType(info, mimeType); ++#else + UpnpFileInfo_set_ContentType(info, ixmlCloneDOMString(mimeType.c_str())); ++#endif + + headers->writeHeaders(info); + +diff --git a/src/iohandler/file_io_handler.cc b/src/iohandler/file_io_handler.cc +index 7e239250..ab5155ec 100644 +--- a/src/iohandler/file_io_handler.cc ++++ b/src/iohandler/file_io_handler.cc +@@ -32,7 +32,9 @@ + #include "file_io_handler.h" // API + + #include ++#ifndef USING_NPUPNP + #include ++#endif + #include + + #include "cds_objects.h" +diff --git a/src/iohandler/io_handler.cc b/src/iohandler/io_handler.cc +index f9789425..75a36130 100644 +--- a/src/iohandler/io_handler.cc ++++ b/src/iohandler/io_handler.cc +@@ -31,7 +31,9 @@ + + #include "io_handler.h" // API + ++#ifndef USING_NPUPNP + #include ++#endif + #include + + #include "server.h" +diff --git a/src/iohandler/mem_io_handler.cc b/src/iohandler/mem_io_handler.cc +index 5574a16d..2916fd12 100644 +--- a/src/iohandler/mem_io_handler.cc ++++ b/src/iohandler/mem_io_handler.cc +@@ -35,7 +35,9 @@ + #include + #include + #include ++#ifndef USING_NPUPNP + #include ++#endif + #include + #include + #include +diff --git a/src/serve_request_handler.cc b/src/serve_request_handler.cc +index 8eaf46af..b9bd7b25 100644 +--- a/src/serve_request_handler.cc ++++ b/src/serve_request_handler.cc +@@ -94,7 +94,11 @@ void ServeRequestHandler::getInfo(const char* filename, UpnpFileInfo* info) + UpnpFileInfo_set_IsReadable(info, 0); + } + ++#if defined(USING_NPUPNP) ++ UpnpFileInfo_set_ContentType(info, mimetype); ++#else + UpnpFileInfo_set_ContentType(info, ixmlCloneDOMString(mimetype.c_str())); ++#endif + } else { + throw_std_runtime_error("Not a regular file: " + path); + } +@@ -157,8 +161,11 @@ std::unique_ptr ServeRequestHandler::open(const char* filename, + info->is_readable = 0; + } + +- ++#if defined(USING_NPUPNP) ++ info->content_type = mimetype; ++#else + info->content_type = ixmlCloneDOMString(mimetype.c_str()); ++#endif + */ + } else { + throw_std_runtime_error("Not a regular file: " + path); +diff --git a/src/server.cc b/src/server.cc +index 913a4913..7cbabc71 100644 +--- a/src/server.cc ++++ b/src/server.cc +@@ -398,9 +398,17 @@ int Server::handleUpnpClientEvent(Upnp_EventType eventType, const void* event) + case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE: + case UPNP_DISCOVERY_SEARCH_RESULT: { + auto d_event = reinterpret_cast(event); ++#if defined(USING_NPUPNP) ++ const char* userAgent = UpnpDiscovery_get_Os_cstr(d_event); ++#else + const char* userAgent = UpnpString_get_String(UpnpDiscovery_get_Os(d_event)); ++#endif + const struct sockaddr_storage* destAddr = UpnpDiscovery_get_DestAddr(d_event); ++#if defined(USING_NPUPNP) ++ const char* location = UpnpDiscovery_get_Location_cstr(d_event); ++#else + const char* location = UpnpString_get_String(UpnpDiscovery_get_Location(d_event)); ++#endif + + Clients::addClientByDiscovery(destAddr, userAgent, location); + break; +diff --git a/src/transcoding/transcode_ext_handler.cc b/src/transcoding/transcode_ext_handler.cc +index 4dad0e3f..412c1370 100644 +--- a/src/transcoding/transcode_ext_handler.cc ++++ b/src/transcoding/transcode_ext_handler.cc +@@ -37,7 +37,9 @@ + #include + #include + #include ++#ifndef USING_NPUPNP + #include ++#endif + #include + #include + #include +diff --git a/src/upnp_cds.cc b/src/upnp_cds.cc +index 6491fa78..a758655c 100644 +--- a/src/upnp_cds.cc ++++ b/src/upnp_cds.cc +@@ -284,6 +284,7 @@ void ContentDirectoryService::processSubscriptionRequest(const std::unique_ptrprint(buf, "", 0); + std::string xml = buf.str(); + ++#if !defined(USING_NPUPNP) + IXML_Document* event = nullptr; + int err = ixmlParseBufferEx(xml.c_str(), &event); + if (err != IXML_SUCCESS) { +@@ -295,6 +296,11 @@ void ContentDirectoryService::processSubscriptionRequest(const std::unique_ptrgetSubscriptionID().c_str()); + + ixmlDocument_free(event); ++#else ++ UpnpAcceptSubscriptionXML( ++ deviceHandle, config->getOption(CFG_SERVER_UDN).c_str(), ++ DESC_CDS_SERVICE_ID, xml, request->getSubscriptionID().c_str()); ++#endif + log_debug("end"); + } + +@@ -313,6 +319,7 @@ void ContentDirectoryService::sendSubscriptionUpdate(const std::string& containe + propset->print(buf, "", 0); + std::string xml = buf.str(); + ++#if !defined(USING_NPUPNP) + IXML_Document* event = nullptr; + int err = ixmlParseBufferEx(xml.c_str(), &event); + if (err != IXML_SUCCESS) { +@@ -323,8 +330,11 @@ void ContentDirectoryService::sendSubscriptionUpdate(const std::string& containe + UpnpNotifyExt(deviceHandle, + config->getOption(CFG_SERVER_UDN).c_str(), + DESC_CDS_SERVICE_ID, event); +- + ixmlDocument_free(event); ++#else ++ UpnpNotifyXML(deviceHandle, config->getOption(CFG_SERVER_UDN).c_str(), ++ DESC_CDS_SERVICE_ID, xml); ++#endif + + log_debug("end"); + } +diff --git a/src/upnp_cm.cc b/src/upnp_cm.cc +index aa608480..33f86bd2 100644 +--- a/src/upnp_cm.cc ++++ b/src/upnp_cm.cc +@@ -127,6 +127,7 @@ void ConnectionManagerService::processSubscriptionRequest(const std::unique_ptr< + propset->print(buf, "", 0); + std::string xml = buf.str(); + ++#if !defined(USING_NPUPNP) + IXML_Document* event = nullptr; + int err = ixmlParseBufferEx(xml.c_str(), &event); + if (err != IXML_SUCCESS) { +@@ -138,6 +139,11 @@ void ConnectionManagerService::processSubscriptionRequest(const std::unique_ptr< + DESC_CM_SERVICE_ID, event, request->getSubscriptionID().c_str()); + + ixmlDocument_free(event); ++#else ++ UpnpAcceptSubscriptionXML( ++ deviceHandle, config->getOption(CFG_SERVER_UDN).c_str(), ++ DESC_CM_SERVICE_ID, xml, request->getSubscriptionID().c_str()); ++#endif + } + + void ConnectionManagerService::sendSubscriptionUpdate(const std::string& sourceProtocol_CSV) +@@ -150,6 +156,7 @@ void ConnectionManagerService::sendSubscriptionUpdate(const std::string& sourceP + propset->print(buf, "", 0); + std::string xml = buf.str(); + ++#if !defined(USING_NPUPNP) + IXML_Document* event = nullptr; + int err = ixmlParseBufferEx(xml.c_str(), &event); + if (err != IXML_SUCCESS) { +@@ -162,4 +169,8 @@ void ConnectionManagerService::sendSubscriptionUpdate(const std::string& sourceP + DESC_CM_SERVICE_ID, event); + + ixmlDocument_free(event); ++#else ++ UpnpNotifyXML(deviceHandle, config->getOption(CFG_SERVER_UDN).c_str(), ++ DESC_CM_SERVICE_ID, xml); ++#endif + } +diff --git a/src/upnp_mrreg.cc b/src/upnp_mrreg.cc +index 16eefaed..f993f452 100644 +--- a/src/upnp_mrreg.cc ++++ b/src/upnp_mrreg.cc +@@ -34,7 +34,9 @@ + #include + + #include "config/config_manager.h" +-#include "ixml.h" ++#ifndef USING_NPUPNP ++#include ++#endif + #include "server.h" + #include "storage/storage.h" + #include "upnp_xml.h" +@@ -120,6 +122,7 @@ void MRRegistrarService::processSubscriptionRequest(const std::unique_ptrprint(buf, "", 0); + std::string xml = buf.str(); + ++#if !defined(USING_NPUPNP) + IXML_Document* event = nullptr; + int err = ixmlParseBufferEx(xml.c_str(), &event); + if (err != IXML_SUCCESS) { +@@ -131,6 +134,11 @@ void MRRegistrarService::processSubscriptionRequest(const std::unique_ptrgetSubscriptionID().c_str()); + + ixmlDocument_free(event); ++#else ++ UpnpAcceptSubscriptionXML( ++ deviceHandle, config->getOption(CFG_SERVER_UDN).c_str(), ++ DESC_MRREG_SERVICE_ID, xml, request->getSubscriptionID().c_str()); ++#endif + } + + // TODO: FIXME +diff --git a/src/url_request_handler.cc b/src/url_request_handler.cc +index f2a99c94..66af027b 100644 +--- a/src/url_request_handler.cc ++++ b/src/url_request_handler.cc +@@ -32,7 +32,9 @@ + #ifdef HAVE_CURL + #include "url_request_handler.h" // API + ++#ifndef USING_NPUPNP + #include ++#endif + #include + + #include "config/config_manager.h" +@@ -138,7 +140,11 @@ void URLRequestHandler::getInfo(const char* filename, UpnpFileInfo* info) + // ixmlCloneDOMString(header.c_str())); + // } + ++#if defined(USING_NPUPNP) ++ UpnpFileInfo_set_ContentType(info, mimeType); ++#else + UpnpFileInfo_set_ContentType(info, ixmlCloneDOMString(mimeType.c_str())); ++#endif + log_debug("web_get_info(): end"); + + /// \todo transcoding for get_info +diff --git a/src/util/upnp_clients.cc b/src/util/upnp_clients.cc +index ab02b58d..7bc85d77 100644 +--- a/src/util/upnp_clients.cc ++++ b/src/util/upnp_clients.cc +@@ -203,6 +203,15 @@ bool Clients::getInfoByType(const std::string& match, ClientMatchType type, cons + + bool Clients::downloadDescription(const std::string& location, std::unique_ptr& xml) + { ++#if defined(USING_NPUPNP) ++ std::string description, ct; ++ int errCode = UpnpDownloadUrlItem(location, description, ct); ++ if (errCode != UPNP_E_SUCCESS) { ++ log_debug("Error obtaining client description from {} -- error = {}", location, errCode); ++ return false; ++ } ++ const char *cxml = description.c_str(); ++#else + IXML_Document* descDoc = nullptr; + int errCode = UpnpDownloadXmlDoc(location.c_str(), &descDoc); + if (errCode != UPNP_E_SUCCESS) { +@@ -211,12 +220,15 @@ bool Clients::downloadDescription(const std::string& location, std::unique_ptr

(); + auto ret = xml->load_string(cxml); + ++#if !defined(USING_NPUPNP) + ixmlFreeDOMString(cxml); + ixmlDocument_free(descDoc); + ++#endif + if (ret.status != pugi::xml_parse_status::status_ok) { + log_debug("Unable to parse xml client description from {}", location); + return false; +diff --git a/src/util/upnp_headers.cc b/src/util/upnp_headers.cc +index c05cffe6..19ba88ca 100644 +--- a/src/util/upnp_headers.cc ++++ b/src/util/upnp_headers.cc +@@ -96,18 +96,29 @@ void Headers::writeHeaders(UpnpFileInfo* fileInfo) const + if (headers == nullptr) + return; + ++#if defined(USING_NPUPNP) ++ for (auto iter : *headers) { ++ fileInfo->response_headers.push_back(iter); ++ } ++#else + auto head = const_cast(UpnpFileInfo_get_ExtraHeadersList(fileInfo)); + for (auto iter : *headers) { + UpnpExtraHeaders* h = UpnpExtraHeaders_new(); + UpnpExtraHeaders_set_resp(h, formatHeader(iter, false).c_str()); + UpnpListInsert(head, UpnpListEnd(head), const_cast(UpnpExtraHeaders_get_node(h))); + } ++#endif + } + + std::unique_ptr> Headers::readHeaders(UpnpFileInfo* fileInfo) + { + auto ret = std::make_unique>(); + ++#if defined(USING_NPUPNP) ++ for (const auto& entry : fileInfo->request_headers) { ++ ret->insert(entry); ++ } ++#else + auto head = const_cast(UpnpFileInfo_get_ExtraHeadersList(fileInfo)); + UpnpListIter pos; + for (pos = UpnpListBegin(head); pos != UpnpListEnd(head); pos = UpnpListNext(head, pos)) { +@@ -116,6 +127,7 @@ std::unique_ptr> Headers::readHeaders(UpnpFil + auto add = parseHeader(header); + ret->insert(add); + } +- ++#endif ++ + return ret; + } +diff --git a/src/util/upnp_headers.h b/src/util/upnp_headers.h +index 9677d6e4..dd839236 100644 +--- a/src/util/upnp_headers.h ++++ b/src/util/upnp_headers.h +@@ -26,7 +26,9 @@ + #ifndef GERBERA_HEADERS_H + #define GERBERA_HEADERS_H + ++#if !defined(USING_NPUPNP) + #include ++#endif + #include + #include + #include +diff --git a/src/web/web_request_handler.cc b/src/web/web_request_handler.cc +index 71fc9fd5..2ca6601b 100644 +--- a/src/web/web_request_handler.cc ++++ b/src/web/web_request_handler.cc +@@ -120,7 +120,11 @@ void WebRequestHandler::getInfo(const char* filename, UpnpFileInfo* info) + + contentType = mimetype + "; charset=" + DEFAULT_INTERNAL_CHARSET; + ++#if defined(USING_NPUPNP) ++ UpnpFileInfo_set_ContentType(info, contentType); ++#else + UpnpFileInfo_set_ContentType(info, ixmlCloneDOMString(contentType.c_str())); ++#endif + Headers headers; + headers.addHeader(std::string { "Cache-Control" }, std::string { "no-cache, must-revalidate" }); + headers.writeHeaders(info); diff --git a/multimedia/gphoto2/Makefile b/multimedia/gphoto2/Makefile index e0515f67..a5c9e114 100644 --- a/multimedia/gphoto2/Makefile +++ b/multimedia/gphoto2/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gphoto2 -PKG_VERSION:=2.5.17 +PKG_VERSION:=2.5.23 PKG_RELEASE:=1 PKG_MAINTAINER:=Leonardo Medici PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/gphoto -PKG_HASH:=aa571039240c68a053be710ca41645aed0239fa2f0b737b8ec767fef29e3544f +PKG_HASH:=df87092100e7766c9d0a4323217c91908a9c891c0d3670ebf40b76903be458d1 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/multimedia/gphoto2/patches/001-automake-compat.patch b/multimedia/gphoto2/patches/001-automake-compat.patch index 3b24ffd5..3462749c 100644 --- a/multimedia/gphoto2/patches/001-automake-compat.patch +++ b/multimedia/gphoto2/patches/001-automake-compat.patch @@ -1,17 +1,13 @@ -Index: gphoto2-2.5.17/Makefile.am -=================================================================== ---- gphoto2-2.5.17.orig/Makefile.am -+++ gphoto2-2.5.17/Makefile.am +--- a/Makefile.am ++++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging po tests +SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 EXTRA_DIST = README.md -Index: gphoto2-2.5.17/Makefile.in -=================================================================== ---- gphoto2-2.5.17.orig/Makefile.in -+++ gphoto2-2.5.17/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in @@ -389,7 +389,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ @@ -21,11 +17,9 @@ Index: gphoto2-2.5.17/Makefile.in ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 EXTRA_DIST = README.md all: config.h -Index: gphoto2-2.5.17/configure.ac -=================================================================== ---- gphoto2-2.5.17.orig/configure.ac -+++ gphoto2-2.5.17/configure.ac -@@ -58,10 +58,7 @@ dnl ------------------------------------ +--- a/configure.ac ++++ b/configure.ac +@@ -58,10 +58,7 @@ dnl --------------------------------------------------------------------------- GP_GETTEXT_HACK([],[Lutz Müller and others],[${MAIL_GPHOTO_TRANSLATION}]) ALL_LINGUAS="az cs da de en_GB es eu fi fr hu id is it ja nl pa pl pt_BR ro ru rw sk sr sv uk vi zh_CN zh_TW" AM_GNU_GETTEXT_VERSION([0.14.1]) diff --git a/multimedia/gphoto2/patches/002-no-docs-test.patch b/multimedia/gphoto2/patches/002-no-docs-test.patch index df874163..7ede8c92 100644 --- a/multimedia/gphoto2/patches/002-no-docs-test.patch +++ b/multimedia/gphoto2/patches/002-no-docs-test.patch @@ -1,17 +1,13 @@ -Index: gphoto2-2.5.17/Makefile.am -=================================================================== ---- gphoto2-2.5.17.orig/Makefile.am -+++ gphoto2-2.5.17/Makefile.am +--- a/Makefile.am ++++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests +SUBDIRS = gphoto-m4 contrib gphoto2 packaging ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 EXTRA_DIST = README.md -Index: gphoto2-2.5.17/Makefile.in -=================================================================== ---- gphoto2-2.5.17.orig/Makefile.in -+++ gphoto2-2.5.17/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in @@ -389,7 +389,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ @@ -21,10 +17,8 @@ Index: gphoto2-2.5.17/Makefile.in ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4 EXTRA_DIST = README.md all: config.h -Index: gphoto2-2.5.17/configure.ac -=================================================================== ---- gphoto2-2.5.17.orig/configure.ac -+++ gphoto2-2.5.17/configure.ac +--- a/configure.ac ++++ b/configure.ac @@ -407,16 +407,10 @@ AC_CONFIG_FILES([ Makefile gphoto2/Makefile diff --git a/multimedia/graphicsmagick/Makefile b/multimedia/graphicsmagick/Makefile new file mode 100644 index 00000000..f7fd4229 --- /dev/null +++ b/multimedia/graphicsmagick/Makefile @@ -0,0 +1,104 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=graphicsmagick +PKG_VERSION:=1.3.35 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/GraphicsMagick-$(PKG_VERSION) +PKG_SOURCE:=GraphicsMagick-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/graphicsmagick +PKG_HASH:=7fd0b49903eb35df4ab5ca76139ab3f023f47485a4913fbdcf5c642c6e5f01fc + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=Copyright.txt +PKG_MAINTAINER:=Val Kulkov +PKG_CPE_ID:=cpe:/a:graphicsmagick:graphicsmagick + +PKG_BUILD_PARALLEL:=1 +DISABLE_NLS:= +PKG_BUILD_DEPENDS:=zlib freetype libpng libjpeg tiff + +include $(INCLUDE_DIR)/package.mk + +PKG_INSTALL:=1 + +define Package/graphicsmagick/Default + SECTION:=multimedia + CATEGORY:=Multimedia + TITLE:=Graphics manipulation tools + URL:=https://www.graphicsmagick.org/ + DEPENDS:=graphicsmagick +endef + +define Package/graphicsmagick + $(call Package/graphicsmagick/Default) + DEPENDS:=+libltdl +libpthread +zlib +libfreetype +libpng +libjpeg +libtiff +endef + +define Package/graphicsmagick/description +GraphicsMagick is a free and open-source software suite for displaying, +converting, and editing raster image and vector image files. It is a fork +of GraphicsMagick. +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-static \ + --enable-dependency-tracking \ + --with-modules \ + --with-threads \ + --without-magick-plus-plus \ + --without-perl \ + --without-bzlib \ + --without-dps \ + --without-fpx \ + --without-jbig \ + --without-webp \ + --with-jpeg \ + --without-jp2 \ + --without-lcms2 \ + --without-lzma \ + --with-png \ + --with-tiff \ + --without-trio \ + --with-ttf \ + --without-umem \ + --without-wmf \ + --without-xml \ + --with-zlib \ + --without-zstd \ + --without-x + +TARGET_CFLAGS += -flto + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +GMlibdir:=usr/lib/GraphicsMagick-$(PKG_VERSION) +define Package/graphicsmagick/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/$(GMlibdir) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/$(GMlibdir)/* $(1)/$(GMlibdir)/ +endef + +$(eval $(call BuildPackage,graphicsmagick)) + diff --git a/multimedia/grilo-plugins/Makefile b/multimedia/grilo-plugins/Makefile index 6fdbce2b..283fa78a 100644 --- a/multimedia/grilo-plugins/Makefile +++ b/multimedia/grilo-plugins/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2006-2015 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -8,24 +6,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=grilo-plugins -PKG_VERSION:=0.3.5 -PKG_RELEASE:=1 +PKG_VERSION:=0.3.11 +PKG_RELEASE:=2 PKG_MAINTAINER:=W. Michael Petullo - PKG_LICENSE:=LGPLv2.1 PKG_LICENSE_FILES:=COPYING PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNOME/grilo-plugins/0.3/ -PKG_HASH:=2977827b8ecb3e15535236180e57dc35e85058d111349bdb6a1597e62a5068fb - -PKG_BUILD_DEPENDS:=glib2 grilo +PKG_HASH:=dde2e605b1994341c6bf012493e056b406b08571834dea3b3c671d5b8b1dcd73 PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=meson/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +include ../../devel/meson/meson.mk define Package/grilo-plugins/Default SECTION:=multimedia @@ -43,15 +40,27 @@ endef define Package/grilo/decription Grilo is a framework that provides access to different sources of - multimedia content, using a pluggable system. This package contains + multimedia content, using a pluggable system. This package contains plugins to get information from a number of sources. endef -CONFIGURE_ARGS += \ - --enable-static \ - --without-libiconv-prefix \ - --without-libintl-prefix \ - --without-x \ +MESON_ARGS += \ + -Denable-filesystem=no \ + -Denable-optical-media=no \ + -Denable-youtube=no \ + -Denable-flickr=no \ + -Denable-podcasts=no \ + -Denable-bookmarks=no \ + -Denable-lua-factory=no \ + -Denable-metadata-store=no \ + -Denable-vimeo=no \ + -Denable-tracker=no \ + -Denable-local-metadata=no \ + -Denable-chromaprint=no \ + -Denable-thetvdb=no \ + -Denable-tmdb=no \ + -Denable-freebox=no \ + --wrap-mode=nodownload define Package/grilo-plugins/install $(INSTALL_DIR) $(1)/usr/lib/grilo-0.3 @@ -84,6 +93,6 @@ $(eval $(call BuildPlugin,dmap,DAAP and DPAP sharing,daap dpap,libdmapsharing,30 $(eval $(call BuildPlugin,gravatar,Gravatar provider,gravatar,,30)) $(eval $(call BuildPlugin,jamendo,Jamendo sharing,jamendo,,30)) $(eval $(call BuildPlugin,magnatune,Magnatune sharing,magnatune,,30)) -$(eval $(call BuildPlugin,opensubtitles,Openi subtitles provider,opensubtitles,,30)) +$(eval $(call BuildPlugin,opensubtitles,Open subtitles provider,opensubtitles,,30)) $(eval $(call BuildPlugin,raitv,Rai.tv sharing,raitv,,30)) $(eval $(call BuildPlugin,shoutcast,SHOUTcast sharing,shoutcast,,30)) diff --git a/multimedia/grilo-plugins/patches/001-grilo-plugins-0.3.5-no-itstool-xmllint.patch b/multimedia/grilo-plugins/patches/001-grilo-plugins-0.3.5-no-itstool-xmllint.patch deleted file mode 100644 index af60233d..00000000 --- a/multimedia/grilo-plugins/patches/001-grilo-plugins-0.3.5-no-itstool-xmllint.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff -u --recursive grilo-plugins-0.3.5-vanilla/configure grilo-plugins-0.3.5/configure ---- grilo-plugins-0.3.5-vanilla/configure 2018-01-07 21:45:18.874540074 -0500 -+++ grilo-plugins-0.3.5/configure 2018-01-07 21:46:31.145749381 -0500 -@@ -638,8 +638,6 @@ - LTLIBOBJS - LIBOBJS - YELP_HELP_RULES --XMLLINT --ITSTOOL - HELP_DIR - YELP_LC_DIST - YELP_LC_MEDIA_LINKS -@@ -1084,9 +1082,7 @@ - GOM_CFLAGS - GOM_LIBS - TRACKER_SPARQL_CFLAGS --TRACKER_SPARQL_LIBS --ITSTOOL --XMLLINT' -+TRACKER_SPARQL_LIBS' - - - # Initialize some variables set by options. -@@ -1855,8 +1851,6 @@ - C compiler flags for TRACKER_SPARQL, overriding pkg-config - TRACKER_SPARQL_LIBS - linker flags for TRACKER_SPARQL, overriding pkg-config -- ITSTOOL Path to the `itstool` command -- XMLLINT Path to the `xmllint` command - - Use these variables to override the choices made by `configure' or to help - it to find libraries and programs with nonstandard names/locations. -@@ -16976,89 +16970,6 @@ - - - --# Extract the first word of "itstool", so it can be a program name with args. --set dummy itstool; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_prog_ITSTOOL+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$ITSTOOL"; then -- ac_cv_prog_ITSTOOL="$ITSTOOL" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ITSTOOL="itstool" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --ITSTOOL=$ac_cv_prog_ITSTOOL --if test -n "$ITSTOOL"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ITSTOOL" >&5 --$as_echo "$ITSTOOL" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --if test x"$ITSTOOL" = x; then -- as_fn_error $? "itstool not found" "$LINENO" 5 --fi -- -- --# Extract the first word of "xmllint", so it can be a program name with args. --set dummy xmllint; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_prog_XMLLINT+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$XMLLINT"; then -- ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_XMLLINT="xmllint" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --XMLLINT=$ac_cv_prog_XMLLINT --if test -n "$XMLLINT"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 --$as_echo "$XMLLINT" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --if test x"$XMLLINT" = x; then -- as_fn_error $? "xmllint not found" "$LINENO" 5 --fi -- - YELP_HELP_RULES=' - HELP_ID ?= - HELP_POT ?= diff --git a/multimedia/grilo-plugins/patches/001-no-help-po-tests.patch b/multimedia/grilo-plugins/patches/001-no-help-po-tests.patch new file mode 100644 index 00000000..f711b53a --- /dev/null +++ b/multimedia/grilo-plugins/patches/001-no-help-po-tests.patch @@ -0,0 +1,15 @@ +Fix build error on OpenWrt build servers. See: + + https://github.com/openwrt/packages/pull/10433#issuecomment-549242840 + https://github.com/mesonbuild/meson/issues/821 + +diff -u --recursive grilo-plugins-0.3.10-vanilla/meson.build grilo-plugins-0.3.10/meson.build +--- grilo-plugins-0.3.10-vanilla/meson.build 2019-09-12 11:48:29.000000000 -0400 ++++ grilo-plugins-0.3.10/meson.build 2020-01-20 11:17:22.803149935 -0500 +@@ -173,6 +173,3 @@ + rootdir = include_directories('.') + + subdir('src') +-subdir('help') +-subdir('po') +-subdir('tests') diff --git a/multimedia/grilo-plugins/patches/010-backport-fix-whitespace.patch b/multimedia/grilo-plugins/patches/010-backport-fix-whitespace.patch new file mode 100644 index 00000000..7f693a08 --- /dev/null +++ b/multimedia/grilo-plugins/patches/010-backport-fix-whitespace.patch @@ -0,0 +1,1250 @@ +diff --git a/src/dmap/grl-common.c b/src/dmap/grl-common.c +index fa92df9..6a1da5e 100644 +--- a/src/dmap/grl-common.c ++++ b/src/dmap/grl-common.c +@@ -39,7 +39,7 @@ gchar * + grl_dmap_build_url (DMAPMdnsBrowserService *service) + { + return g_strdup_printf ("%s://%s:%u", +- service->service_name, +- service->host, +- service->port); ++ service->service_name, ++ service->host, ++ service->port); + } +diff --git a/src/dmap/grl-daap-db.c b/src/dmap/grl-daap-db.c +index 6621094..c931d91 100644 +--- a/src/dmap/grl-daap-db.c ++++ b/src/dmap/grl-daap-db.c +@@ -112,8 +112,8 @@ grl_daap_db_lookup_by_id (const DMAPDb *db, guint id) + + static void + grl_daap_db_foreach (const DMAPDb *db, +- GHFunc func, +- gpointer data) ++ GHFunc func, ++ gpointer data) + { + g_error ("Not implemented"); + } +@@ -135,7 +135,7 @@ set_insert (GHashTable *category, const char *category_name, char *set_name, Grl + id = g_strdup_printf ("%s-%s", category_name, set_name); + + container = grl_media_container_new (); +- grl_media_set_id (container, id); ++ grl_media_set_id (container, id); + grl_media_set_title (container, set_name); + + set = g_hash_table_lookup (category, container); +@@ -173,26 +173,16 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record) + GrlMedia *media; + + g_object_get (record, +- "songalbum", +- &album, +- "songartist", +- &artist, +- "bitrate", +- &bitrate, +- "duration", +- &duration, +- "songgenre", +- &genre, +- "title", +- &title, +- "track", +- &track, +- "disc", +- &disc, +- "location", +- &url, +- "has-video", +- &has_video, ++ "songalbum", &album, ++ "songartist", &artist, ++ "bitrate", &bitrate, ++ "duration", &duration, ++ "songgenre", &genre, ++ "title", &title, ++ "track", &track, ++ "disc", &disc, ++ "location", &url, ++ "has-video", &has_video, + NULL); + + id_s = g_strdup_printf ("%u", nextid); +@@ -203,8 +193,8 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record) + media = grl_media_audio_new (); + } + +- grl_media_set_id (media, id_s); +- grl_media_set_duration (media, duration); ++ grl_media_set_id (media, id_s); ++ grl_media_set_duration (media, duration); + + if (title) { + grl_media_set_title (media, title); +@@ -217,7 +207,7 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record) + } + + if (has_video == FALSE) { +- grl_media_set_bitrate (media, bitrate); ++ grl_media_set_bitrate (media, bitrate); + grl_media_set_track_number (media, track); + + if (disc != 0) { +@@ -249,7 +239,7 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record) + static gboolean + same_media (GrlMedia *a, GrlMedia *b) + { +- return (strcmp (grl_media_get_id (a), grl_media_get_id (b)) == 0); ++ return strcmp (grl_media_get_id (a), grl_media_get_id (b)) == 0; + } + + void +@@ -334,7 +324,7 @@ grl_daap_db_search (GrlDAAPDb *db, + results = g_hash_table_new (g_str_hash, g_str_equal); + + /* For albums and artists... */ +- for (i = 0; i < G_N_ELEMENTS(hash_tables); i++) { ++ for (i = 0; i < G_N_ELEMENTS (hash_tables); i++) { + g_hash_table_iter_init (&iter1, hash_tables[i]); + /* For each album or artist in above... */ + for (j = 0; g_hash_table_iter_next (&iter1, &key1, &val1); j++) { +@@ -396,10 +386,10 @@ grl_daap_db_init (GrlDAAPDb *db) + db->priv->albums_container = grl_media_container_new (); + db->priv->artists_container = grl_media_container_new (); + +- grl_media_set_id (GRL_MEDIA (db->priv->albums_container), ALBUMS_ID); ++ grl_media_set_id (GRL_MEDIA (db->priv->albums_container), ALBUMS_ID); + grl_media_set_title (GRL_MEDIA (db->priv->albums_container), ALBUMS_NAME); + +- grl_media_set_id (GRL_MEDIA (db->priv->artists_container), ARTISTS_ID); ++ grl_media_set_id (GRL_MEDIA (db->priv->artists_container), ARTISTS_ID); + grl_media_set_title (GRL_MEDIA (db->priv->artists_container), ARTISTS_NAME); + + db->priv->root = g_hash_table_new_full (container_hash, container_equal, g_object_unref, (GDestroyNotify) g_hash_table_destroy); +@@ -426,9 +416,9 @@ grl_daap_db_finalize (GObject *object) + + static void + grl_daap_db_set_property (GObject *object, +- guint prop_id, +- const GValue *value, +- GParamSpec *pspec) ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec) + { + switch (prop_id) { + default: +@@ -439,9 +429,9 @@ grl_daap_db_set_property (GObject *object, + + static void + grl_daap_db_get_property (GObject *object, +- guint prop_id, +- GValue *value, +- GParamSpec *pspec) ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec) + { + switch (prop_id) { + default: +diff --git a/src/dmap/grl-daap-db.h b/src/dmap/grl-daap-db.h +index f52a9b5..2548c50 100644 +--- a/src/dmap/grl-daap-db.h ++++ b/src/dmap/grl-daap-db.h +@@ -26,34 +26,34 @@ + + G_BEGIN_DECLS + +-#define TYPE_GRL_DAAP_DB \ +- (grl_daap_db_get_type ()) +- +-#define GRL_DAAP_DB(o) \ +- (G_TYPE_CHECK_INSTANCE_CAST ((o), \ +- TYPE_GRL_DAAP_DB, \ +- GrlDAAPDb)) +- +-#define GRL_DAAP_DB_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_CAST((k), \ +- TYPE_GRL_DAAP_DB, \ +- GrlDAAPDbClass)) +-#define IS_GRL_DAAP_DB(o) \ +- (G_TYPE_CHECK_INSTANCE_TYPE((o), \ +- TYPE_GRL_DAAP_DB)) +-#define IS_GRL_DAAP_DB_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_TYPE((k), \ +- TYPE_GRL_DAAP_DB_CLASS)) +- +-#define GRL_DAAP_DB_GET_CLASS(o) \ +- (G_TYPE_INSTANCE_GET_CLASS((o), \ +- TYPE_GRL_DAAP_DB, \ +- GrlDAAPDbClass)) ++#define TYPE_GRL_DAAP_DB (grl_daap_db_get_type ()) ++ ++#define GRL_DAAP_DB(o) \ ++ (G_TYPE_CHECK_INSTANCE_CAST ((o), \ ++ TYPE_GRL_DAAP_DB, \ ++ GrlDAAPDb)) + +-#define GRL_DAAP_DB_GET_PRIVATE(o) \ +- (G_TYPE_INSTANCE_GET_PRIVATE((o), \ +- TYPE_GRL_DAAP_DB, \ +- GrlDAAPDbPrivate)) ++#define GRL_DAAP_DB_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_CAST ((k), \ ++ TYPE_GRL_DAAP_DB, \ ++ GrlDAAPDbClass)) ++#define IS_GRL_DAAP_DB(o) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ ++ TYPE_GRL_DAAP_DB)) ++ ++#define IS_GRL_DAAP_DB_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((k), \ ++ TYPE_GRL_DAAP_DB_CLASS)) ++ ++#define GRL_DAAP_DB_GET_CLASS(o) \ ++ (G_TYPE_INSTANCE_GET_CLASS ((o), \ ++ TYPE_GRL_DAAP_DB, \ ++ GrlDAAPDbClass)) ++ ++#define GRL_DAAP_DB_GET_PRIVATE(o) \ ++ (G_TYPE_INSTANCE_GET_PRIVATE ((o), \ ++ TYPE_GRL_DAAP_DB, \ ++ GrlDAAPDbPrivate)) + + typedef struct GrlDAAPDbPrivate GrlDAAPDbPrivate; + +diff --git a/src/dmap/grl-daap-record-factory.c b/src/dmap/grl-daap-record-factory.c +index e986394..648fd85 100644 +--- a/src/dmap/grl-daap-record-factory.c ++++ b/src/dmap/grl-daap-record-factory.c +@@ -22,9 +22,9 @@ + #include "grl-daap-record.h" + + DMAPRecord * +-grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data) ++grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data) + { +- return DMAP_RECORD (grl_daap_record_new ()); ++ return DMAP_RECORD (grl_daap_record_new ()); + } + + static void +@@ -40,19 +40,19 @@ grl_daap_record_factory_class_init (GrlDAAPRecordFactoryClass *klass) + static void + grl_daap_record_factory_interface_init (gpointer iface, gpointer data) + { +- DMAPRecordFactoryIface *factory = iface; ++ DMAPRecordFactoryIface *factory = iface; + +- g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY); ++ g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY); + +- factory->create = grl_daap_record_factory_create; ++ factory->create = grl_daap_record_factory_create; + } + + G_DEFINE_TYPE_WITH_CODE (GrlDAAPRecordFactory, grl_daap_record_factory, G_TYPE_OBJECT, +- G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY, +- grl_daap_record_factory_interface_init)) ++ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY, ++ grl_daap_record_factory_interface_init)) + + GrlDAAPRecordFactory * + grl_daap_record_factory_new (void) + { +- return SIMPLE_DAAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DAAP_RECORD_FACTORY, NULL)); ++ return SIMPLE_DAAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DAAP_RECORD_FACTORY, NULL)); + } +diff --git a/src/dmap/grl-daap-record-factory.h b/src/dmap/grl-daap-record-factory.h +index 514713a..45aa69a 100644 +--- a/src/dmap/grl-daap-record-factory.h ++++ b/src/dmap/grl-daap-record-factory.h +@@ -25,32 +25,31 @@ + + G_BEGIN_DECLS + +-#define TYPE_SIMPLE_DAAP_RECORD_FACTORY \ +- (grl_daap_record_factory_get_type ()) +- +-#define SIMPLE_DAAP_RECORD_FACTORY(o) \ +- (G_TYPE_CHECK_INSTANCE_CAST((o), \ +- TYPE_SIMPLE_DAAP_RECORD_FACTORY, \ +- GrlDAAPRecordFactory)) +- +-#define SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_CAST((k), \ +- TYPE_SIMPLE_DAAP_RECORD_FACTORY, \ +- GrlDAAPRecordFactoryClass)) +- +-#define IS_SIMPLE_DAAP_RECORD_FACTORY(o) \ +- (G_TYPE_CHECK_INSTANCE_TYPE((o), \ +- TYPE_SIMPLE_DAAP_RECORD_FACTORY)) +- +-#define IS_SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_TYPE((k), \ +- TYPE_SIMPLE_DAAP_RECORD_FACTORY_CLASS)) +- +-#define SIMPLE_DAAP_RECORD_FACTORY_GET_CLASS(o) \ +- (G_TYPE_INSTANCE_GET_CLASS((o), \ +- TYPE_SIMPLE_DAAP_RECORD_FACTORY, \ ++#define TYPE_SIMPLE_DAAP_RECORD_FACTORY (grl_daap_record_factory_get_type ()) ++ ++#define SIMPLE_DAAP_RECORD_FACTORY(o) \ ++ (G_TYPE_CHECK_INSTANCE_CAST ((o), \ ++ TYPE_SIMPLE_DAAP_RECORD_FACTORY, \ ++ GrlDAAPRecordFactory)) ++ ++#define SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_CAST ((k), \ ++ TYPE_SIMPLE_DAAP_RECORD_FACTORY, \ + GrlDAAPRecordFactoryClass)) + ++#define IS_SIMPLE_DAAP_RECORD_FACTORY(o) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ ++ TYPE_SIMPLE_DAAP_RECORD_FACTORY)) ++ ++#define IS_SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((k), \ ++ TYPE_SIMPLE_DAAP_RECORD_FACTORY_CLASS)) ++ ++#define SIMPLE_DAAP_RECORD_FACTORY_GET_CLASS(o) \ ++ (G_TYPE_INSTANCE_GET_CLASS ((o), \ ++ TYPE_SIMPLE_DAAP_RECORD_FACTORY, \ ++ GrlDAAPRecordFactoryClass)) ++ + typedef struct GrlDAAPRecordFactoryPrivate GrlDAAPRecordFactoryPrivate; + + typedef struct { +@@ -61,11 +60,11 @@ typedef struct { + GObjectClass parent; + } GrlDAAPRecordFactoryClass; + +-GType grl_daap_record_factory_get_type (void); ++GType grl_daap_record_factory_get_type (void); + +-GrlDAAPRecordFactory *grl_daap_record_factory_new (void); ++GrlDAAPRecordFactory *grl_daap_record_factory_new (void); + +-DMAPRecord *grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data); ++DMAPRecord *grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data); + + #endif /* __SIMPLE_DAAP_RECORD_FACTORY */ + +diff --git a/src/dmap/grl-daap-record.c b/src/dmap/grl-daap-record.c +index d1721d2..82bf2f9 100644 +--- a/src/dmap/grl-daap-record.c ++++ b/src/dmap/grl-daap-record.c +@@ -69,9 +69,9 @@ enum { + + static void + grl_daap_record_set_property (GObject *object, +- guint prop_id, +- const GValue *value, +- GParamSpec *pspec) ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec) + { + GrlDAAPRecord *record = SIMPLE_DAAP_RECORD (object); + +@@ -86,27 +86,27 @@ grl_daap_record_set_property (GObject *object, + break; + case PROP_ALBUM: + g_free (record->priv->album); +- record->priv->album = g_value_dup_string(value); ++ record->priv->album = g_value_dup_string (value); + break; + case PROP_SORT_ALBUM: + g_free (record->priv->sort_album); +- record->priv->sort_album = g_value_dup_string(value); ++ record->priv->sort_album = g_value_dup_string (value); + break; + case PROP_ARTIST: + g_free (record->priv->artist); +- record->priv->artist = g_value_dup_string(value); ++ record->priv->artist = g_value_dup_string (value); + break; + case PROP_SORT_ARTIST: + g_free (record->priv->sort_artist); +- record->priv->sort_artist = g_value_dup_string(value); ++ record->priv->sort_artist = g_value_dup_string (value); + break; + case PROP_GENRE: + g_free (record->priv->genre); +- record->priv->genre = g_value_dup_string(value); ++ record->priv->genre = g_value_dup_string (value); + break; + case PROP_FORMAT: + g_free (record->priv->format); +- record->priv->format = g_value_dup_string(value); ++ record->priv->format = g_value_dup_string (value); + break; + case PROP_MEDIAKIND: + record->priv->mediakind = g_value_get_enum (value); +@@ -142,18 +142,16 @@ grl_daap_record_set_property (GObject *object, + record->priv->has_video = g_value_get_boolean (value); + break; + default: +- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, +- prop_id, +- pspec); ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } + } + + static void + grl_daap_record_get_property (GObject *object, +- guint prop_id, +- GValue *value, +- GParamSpec *pspec) ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec) + { + GrlDAAPRecord *record = SIMPLE_DAAP_RECORD (object); + +@@ -216,9 +214,7 @@ grl_daap_record_get_property (GObject *object, + g_value_set_boolean (value, record->priv->has_video); + break; + default: +- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, +- prop_id, +- pspec); ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } + } +diff --git a/src/dmap/grl-daap-record.h b/src/dmap/grl-daap-record.h +index 59558c4..7aae82d 100644 +--- a/src/dmap/grl-daap-record.h ++++ b/src/dmap/grl-daap-record.h +@@ -25,36 +25,35 @@ + + G_BEGIN_DECLS + +-#define TYPE_SIMPLE_DAAP_RECORD \ +- (grl_daap_record_get_type ()) +- +-#define SIMPLE_DAAP_RECORD(o) \ +- (G_TYPE_CHECK_INSTANCE_CAST((o), \ +- TYPE_SIMPLE_DAAP_RECORD, \ +- GrlDAAPRecord)) +- +-#define SIMPLE_DAAP_RECORD_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_CAST((k), \ +- TYPE_SIMPLE_DAAP_RECORD, \ +- GrlDAAPRecordClass)) +- +-#define IS_SIMPLE_DAAP_RECORD(o) \ +- (G_TYPE_CHECK_INSTANCE_TYPE((o), \ +- TYPE_SIMPLE_DAAP_RECORD)) +- +-#define IS_SIMPLE_DAAP_RECORD_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_TYPE((k), \ +- TYPE_SIMPLE_DAAP_RECORD_CLASS)) +- +-#define SIMPLE_DAAP_RECORD_GET_CLASS(o) \ +- (G_TYPE_INSTANCE_GET_CLASS((o), \ +- TYPE_SIMPLE_DAAP_RECORD, \ ++#define TYPE_SIMPLE_DAAP_RECORD (grl_daap_record_get_type ()) ++ ++#define SIMPLE_DAAP_RECORD(o) \ ++ (G_TYPE_CHECK_INSTANCE_CAST ((o), \ ++ TYPE_SIMPLE_DAAP_RECORD, \ ++ GrlDAAPRecord)) ++ ++#define SIMPLE_DAAP_RECORD_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_CAST ((k), \ ++ TYPE_SIMPLE_DAAP_RECORD, \ + GrlDAAPRecordClass)) + +-#define SIMPLE_DAAP_RECORD_GET_PRIVATE(o) \ +- (G_TYPE_INSTANCE_GET_PRIVATE((o), \ +- TYPE_SIMPLE_DAAP_RECORD, \ +- GrlDAAPRecordPrivate)) ++#define IS_SIMPLE_DAAP_RECORD(o) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ ++ TYPE_SIMPLE_DAAP_RECORD)) ++ ++#define IS_SIMPLE_DAAP_RECORD_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((k), \ ++ TYPE_SIMPLE_DAAP_RECORD_CLASS)) ++ ++#define SIMPLE_DAAP_RECORD_GET_CLASS(o) \ ++ (G_TYPE_INSTANCE_GET_CLASS ((o), \ ++ TYPE_SIMPLE_DAAP_RECORD, \ ++ GrlDAAPRecordClass)) ++ ++#define SIMPLE_DAAP_RECORD_GET_PRIVATE(o) \ ++ (G_TYPE_INSTANCE_GET_PRIVATE ((o), \ ++ TYPE_SIMPLE_DAAP_RECORD, \ ++ GrlDAAPRecordPrivate)) + + typedef struct GrlDAAPRecordPrivate GrlDAAPRecordPrivate; + +@@ -69,9 +68,9 @@ typedef struct { + + GType grl_daap_record_get_type (void); + +-GrlDAAPRecord *grl_daap_record_new (void); +-GInputStream *grl_daap_record_read (DAAPRecord *record, GError **error); +-gint grl_daap_record_get_id (DAAPRecord *record); ++GrlDAAPRecord *grl_daap_record_new (void); ++GInputStream *grl_daap_record_read (DAAPRecord *record, GError **error); ++gint grl_daap_record_get_id (DAAPRecord *record); + + #endif /* __SIMPLE_DAAP_RECORD */ + +diff --git a/src/dmap/grl-daap.c b/src/dmap/grl-daap.c +index 13cc7e3..f3c4115 100644 +--- a/src/dmap/grl-daap.c ++++ b/src/dmap/grl-daap.c +@@ -42,7 +42,7 @@ + /* --------- Logging -------- */ + + #define GRL_LOG_DOMAIN_DEFAULT daap_log_domain +-GRL_LOG_DOMAIN_STATIC(daap_log_domain); ++GRL_LOG_DOMAIN_STATIC (daap_log_domain); + + /* --- Plugin information --- */ + +@@ -111,19 +111,19 @@ grl_daap_plugin_init (GrlRegistry *registry, + sources = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); + + g_signal_connect (G_OBJECT (browser), +- "service-added", ++ "service-added", + G_CALLBACK (grl_daap_service_added_cb), + (gpointer) plugin); + + g_signal_connect (G_OBJECT (browser), +- "service-removed", ++ "service-removed", + G_CALLBACK (grl_daap_service_removed_cb), + (gpointer) plugin); + + if (!dmap_mdns_browser_start (browser, &error)) { + GRL_DEBUG ("error starting browser. code: %d message: %s", +- error->code, +- error->message); ++ error->code, ++ error->message); + g_error_free (error); + + g_hash_table_unref (connections); +@@ -138,12 +138,12 @@ grl_daap_plugin_init (GrlRegistry *registry, + GRL_PLUGIN_DEFINE (GRL_MAJOR, + GRL_MINOR, + DAAP_PLUGIN_ID, +- "DAAP", +- "A plugin for browsing DAAP servers", +- "W. Michael Petullo", ++ "DAAP", ++ "A plugin for browsing DAAP servers", ++ "W. Michael Petullo", + VERSION, +- "LGPL", +- "http://www.flyn.org", ++ "LGPL", ++ "http://www.flyn.org", + grl_daap_plugin_init, + NULL, + NULL); +@@ -166,10 +166,10 @@ grl_daap_source_new (DMAPMdnsBrowserService *service) + source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, service->name); + + source = g_object_new (GRL_DAAP_SOURCE_TYPE, +- "source-id", source_id, +- "source-name", service->name, +- "source-desc", source_desc, +- "supported-media", GRL_SUPPORTED_MEDIA_AUDIO, ++ "source-id", source_id, ++ "source-name", service->name, ++ "source-desc", source_desc, ++ "supported-media", GRL_SUPPORTED_MEDIA_AUDIO, + NULL); + + source->priv->service = service; +@@ -209,14 +209,14 @@ grl_daap_source_finalize (GObject *object) + static void + grl_daap_do_browse (ResultCbAndArgsAndDb *cb_and_db) + { +- grl_daap_db_browse(GRL_DAAP_DB(cb_and_db->db), +- cb_and_db->cb.container, +- cb_and_db->cb.source, +- cb_and_db->cb.op_id, +- cb_and_db->cb.skip, +- cb_and_db->cb.count, +- cb_and_db->cb.callback, +- cb_and_db->cb.user_data); ++ grl_daap_db_browse (GRL_DAAP_DB(cb_and_db->db), ++ cb_and_db->cb.container, ++ cb_and_db->cb.source, ++ cb_and_db->cb.op_id, ++ cb_and_db->cb.skip, ++ cb_and_db->cb.count, ++ cb_and_db->cb.callback, ++ cb_and_db->cb.user_data); + + g_free (cb_and_db); + } +@@ -224,13 +224,13 @@ grl_daap_do_browse (ResultCbAndArgsAndDb *cb_and_db) + static void + grl_daap_do_search (ResultCbAndArgsAndDb *cb_and_db) + { +- grl_daap_db_search(GRL_DAAP_DB(cb_and_db->db), +- cb_and_db->cb.source, +- cb_and_db->cb.op_id, +- (GHRFunc) cb_and_db->cb.predicate, +- cb_and_db->cb.predicate_data, +- cb_and_db->cb.callback, +- cb_and_db->cb.user_data); ++ grl_daap_db_search (GRL_DAAP_DB (cb_and_db->db), ++ cb_and_db->cb.source, ++ cb_and_db->cb.op_id, ++ (GHRFunc) cb_and_db->cb.predicate, ++ cb_and_db->cb.predicate_data, ++ cb_and_db->cb.callback, ++ cb_and_db->cb.user_data); + + g_free (cb_and_db); + } +diff --git a/src/dmap/grl-daap.h b/src/dmap/grl-daap.h +index 4912b05..1119495 100644 +--- a/src/dmap/grl-daap.h ++++ b/src/dmap/grl-daap.h +@@ -26,31 +26,30 @@ + + #include + +-#define GRL_DAAP_SOURCE_TYPE \ +- (grl_daap_source_get_type ()) +- +-#define GRL_DAAP_SOURCE(obj) \ +- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ +- GRL_DAAP_SOURCE_TYPE, \ +- GrlDaapSource)) +- +-#define GRL_IS_DAAP_SOURCE(obj) \ +- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ +- GRL_DAAP_SOURCE_TYPE)) +- +-#define GRL_DAAP_SOURCE_CLASS(klass) \ +- (G_TYPE_CHECK_CLASS_CAST((klass), \ +- GRL_DAAP_SOURCE_TYPE, \ +- GrlDaapSourceClass)) +- +-#define GRL_IS_DAAP_SOURCE_CLASS(klass) \ +- (G_TYPE_CHECK_CLASS_TYPE((klass), \ +- GRL_DAAP_SOURCE_TYPE)) +- +-#define GRL_DAAP_SOURCE_GET_CLASS(obj) \ +- (G_TYPE_INSTANCE_GET_CLASS ((obj), \ +- GRL_DAAP_SOURCE_TYPE, \ +- GrlDaapSourceClass)) ++#define GRL_DAAP_SOURCE_TYPE (grl_daap_source_get_type ()) ++ ++#define GRL_DAAP_SOURCE(obj) \ ++ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ ++ GRL_DAAP_SOURCE_TYPE, \ ++ GrlDaapSource)) ++ ++#define GRL_IS_DAAP_SOURCE(obj) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ ++ GRL_DAAP_SOURCE_TYPE)) ++ ++#define GRL_DAAP_SOURCE_CLASS(klass) \ ++ (G_TYPE_CHECK_CLASS_CAST ((klass), \ ++ GRL_DAAP_SOURCE_TYPE, \ ++ GrlDaapSourceClass)) ++ ++#define GRL_IS_DAAP_SOURCE_CLASS(klass) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((klass), \ ++ GRL_DAAP_SOURCE_TYPE)) ++ ++#define GRL_DAAP_SOURCE_GET_CLASS(obj) \ ++ (G_TYPE_INSTANCE_GET_CLASS ((obj), \ ++ GRL_DAAP_SOURCE_TYPE, \ ++ GrlDaapSourceClass)) + + typedef struct _GrlDaapSourcePrivate GrlDaapSourcePrivate; + typedef struct _GrlDaapSource GrlDaapSource; +diff --git a/src/dmap/grl-dpap-db.c b/src/dmap/grl-dpap-db.c +index 1f2d5ca..02ffd3a 100644 +--- a/src/dmap/grl-dpap-db.c ++++ b/src/dmap/grl-dpap-db.c +@@ -80,8 +80,8 @@ grl_dpap_db_lookup_by_id (const DMAPDb *db, guint id) + + static void + grl_dpap_db_foreach (const DMAPDb *db, +- GHFunc func, +- gpointer data) ++ GHFunc func, ++ gpointer data) + { + g_warning ("Not implemented"); + } +@@ -103,7 +103,7 @@ set_insert (GHashTable *category, const char *category_name, char *set_name, Grl + id = g_strdup_printf ("%s-%s", category_name, set_name); + + container = grl_media_container_new (); +- grl_media_set_id (container, id); ++ grl_media_set_id (container, id); + grl_media_set_title (container, set_name); + + set = g_hash_table_lookup (category, container); +@@ -142,35 +142,24 @@ grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record) + GrlMedia *media; + + g_object_get (record, +- "large-filesize", +- &largefilesize, +- "creation-date", +- &creationdate, +- "rating", +- &rating, +- "filename", +- &filename, +- "aspect-ratio", +- &aspectratio, +- "pixel-height", +- &height, +- "pixel-width", +- &width, +- "format", +- &format, +- "comments", +- &comments, +- "thumbnail", +- &thumbnail, +- "location", +- &url, ++ "large-filesize", &largefilesize, ++ "creation-date", &creationdate, ++ "rating", &rating, ++ "filename", &filename, ++ "aspect-ratio", &aspectratio, ++ "pixel-height", &height, ++ "pixel-width", &width, ++ "format", &format, ++ "comments", &comments, ++ "thumbnail", &thumbnail, ++ "location", &url, + NULL); + + id_s = g_strdup_printf ("%u", nextid); + + media = grl_media_image_new (); + +- grl_media_set_id (media, id_s); ++ grl_media_set_id (media, id_s); + + if (filename) + grl_media_set_title (media, filename); +@@ -181,7 +170,7 @@ grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record) + grl_media_set_url (media, url); + } + +- grl_media_set_width (media, width); ++ grl_media_set_width (media, width); + grl_media_set_height (media, height); + + set_insert (db->priv->photos, PHOTOS_ID, "Unknown", media); +@@ -195,7 +184,7 @@ grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record) + static gboolean + same_media (GrlMedia *a, GrlMedia *b) + { +- return (strcmp (grl_media_get_id (a), grl_media_get_id (b)) == 0); ++ return strcmp (grl_media_get_id (a), grl_media_get_id (b)) == 0; + } + + void +@@ -230,7 +219,7 @@ grl_dpap_db_browse (GrlDPAPDb *db, + if (hash_table == NULL) { + GError *error = g_error_new (GRL_CORE_ERROR, + GRL_CORE_ERROR_BROWSE_FAILED, +- "Invalid container identifier %s", ++ "Invalid container identifier %s", + container_id); + func (source, op_id, NULL, 0, user_data, error); + goto done; +@@ -334,7 +323,7 @@ grl_dpap_db_init (GrlDPAPDb *db) + + db->priv->photos_container = grl_media_container_new (); + +- grl_media_set_id (GRL_MEDIA (db->priv->photos_container), PHOTOS_ID); ++ grl_media_set_id (GRL_MEDIA (db->priv->photos_container), PHOTOS_ID); + grl_media_set_title (GRL_MEDIA (db->priv->photos_container), PHOTOS_NAME); + + db->priv->root = g_hash_table_new_full (container_hash, container_equal, g_object_unref, (GDestroyNotify) g_hash_table_destroy); +diff --git a/src/dmap/grl-dpap-db.h b/src/dmap/grl-dpap-db.h +index 4c17d1a..d3abcba 100644 +--- a/src/dmap/grl-dpap-db.h ++++ b/src/dmap/grl-dpap-db.h +@@ -26,34 +26,33 @@ + + G_BEGIN_DECLS + +-#define TYPE_GRL_DPAP_DB \ +- (grl_dpap_db_get_type ()) ++#define TYPE_GRL_DPAP_DB (grl_dpap_db_get_type ()) + +-#define GRL_DPAP_DB(o) \ +- (G_TYPE_CHECK_INSTANCE_CAST ((o), \ +- TYPE_GRL_DPAP_DB, \ +- GrlDPAPDb)) ++#define GRL_DPAP_DB(o) \ ++ (G_TYPE_CHECK_INSTANCE_CAST ((o), \ ++ TYPE_GRL_DPAP_DB, \ ++ GrlDPAPDb)) + +-#define GRL_DPAP_DB_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_CAST((k), \ +- TYPE_GRL_DPAP_DB, \ +- GrlDPAPDbClass)) +-#define IS_GRL_DPAP_DB(o) \ +- (G_TYPE_CHECK_INSTANCE_TYPE((o), \ +- TYPE_GRL_DPAP_DB)) +-#define IS_GRL_DPAP_DB_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_TYPE((k), \ +- TYPE_GRL_DPAP_DB_CLASS)) +- +-#define GRL_DPAP_DB_GET_CLASS(o) \ +- (G_TYPE_INSTANCE_GET_CLASS((o), \ +- TYPE_GRL_DPAP_DB, \ ++#define GRL_DPAP_DB_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_CAST ((k), \ ++ TYPE_GRL_DPAP_DB, \ + GrlDPAPDbClass)) ++#define IS_GRL_DPAP_DB(o) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ ++ TYPE_GRL_DPAP_DB)) ++#define IS_GRL_DPAP_DB_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((k), \ ++ TYPE_GRL_DPAP_DB_CLASS)) ++ ++#define GRL_DPAP_DB_GET_CLASS(o) \ ++ (G_TYPE_INSTANCE_GET_CLASS ((o), \ ++ TYPE_GRL_DPAP_DB, \ ++ GrlDPAPDbClass)) + +-#define GRL_DPAP_DB_GET_PRIVATE(o) \ +- (G_TYPE_INSTANCE_GET_PRIVATE((o), \ +- TYPE_GRL_DPAP_DB, \ +- GrlDPAPDbPrivate)) ++#define GRL_DPAP_DB_GET_PRIVATE(o) \ ++ (G_TYPE_INSTANCE_GET_PRIVATE ((o), \ ++ TYPE_GRL_DPAP_DB, \ ++ GrlDPAPDbPrivate)) + + typedef struct GrlDPAPDbPrivate GrlDPAPDbPrivate; + +diff --git a/src/dmap/grl-dpap-record-factory.c b/src/dmap/grl-dpap-record-factory.c +index 8174338..3d0c87a 100644 +--- a/src/dmap/grl-dpap-record-factory.c ++++ b/src/dmap/grl-dpap-record-factory.c +@@ -22,9 +22,9 @@ + #include "grl-dpap-record.h" + + DMAPRecord * +-grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data) ++grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data) + { +- return DMAP_RECORD (grl_dpap_record_new ()); ++ return DMAP_RECORD (grl_dpap_record_new ()); + } + + static void +@@ -40,19 +40,19 @@ grl_dpap_record_factory_class_init (GrlDPAPRecordFactoryClass *klass) + static void + grl_dpap_record_factory_interface_init (gpointer iface, gpointer data) + { +- DMAPRecordFactoryIface *factory = iface; ++ DMAPRecordFactoryIface *factory = iface; + +- g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY); ++ g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY); + +- factory->create = grl_dpap_record_factory_create; ++ factory->create = grl_dpap_record_factory_create; + } + + G_DEFINE_TYPE_WITH_CODE (GrlDPAPRecordFactory, grl_dpap_record_factory, G_TYPE_OBJECT, +- G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY, +- grl_dpap_record_factory_interface_init)) ++ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY, ++ grl_dpap_record_factory_interface_init)) + + GrlDPAPRecordFactory * + grl_dpap_record_factory_new (void) + { +- return SIMPLE_DPAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DPAP_RECORD_FACTORY, NULL)); ++ return SIMPLE_DPAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DPAP_RECORD_FACTORY, NULL)); + } +diff --git a/src/dmap/grl-dpap-record-factory.h b/src/dmap/grl-dpap-record-factory.h +index c2106b1..3f4ca54 100644 +--- a/src/dmap/grl-dpap-record-factory.h ++++ b/src/dmap/grl-dpap-record-factory.h +@@ -25,30 +25,29 @@ + + G_BEGIN_DECLS + +-#define TYPE_SIMPLE_DPAP_RECORD_FACTORY \ +- (grl_dpap_record_factory_get_type ()) ++#define TYPE_SIMPLE_DPAP_RECORD_FACTORY (grl_dpap_record_factory_get_type ()) + +-#define SIMPLE_DPAP_RECORD_FACTORY(o) \ +- (G_TYPE_CHECK_INSTANCE_CAST((o), \ +- TYPE_SIMPLE_DPAP_RECORD_FACTORY, \ +- GrlDPAPRecordFactory)) ++#define SIMPLE_DPAP_RECORD_FACTORY(o) \ ++ (G_TYPE_CHECK_INSTANCE_CAST ((o), \ ++ TYPE_SIMPLE_DPAP_RECORD_FACTORY, \ ++ GrlDPAPRecordFactory)) + +-#define SIMPLE_DPAP_RECORD_FACTORY_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_CAST((k), \ +- TYPE_SIMPLE_DPAP_RECORD_FACTORY, \ +- GrlDPAPRecordFactoryClass)) ++#define SIMPLE_DPAP_RECORD_FACTORY_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_CAST ((k), \ ++ TYPE_SIMPLE_DPAP_RECORD_FACTORY, \ ++ GrlDPAPRecordFactoryClass)) + +-#define IS_SIMPLE_DPAP_RECORD_FACTORY(o) \ +- (G_TYPE_CHECK_INSTANCE_TYPE((o), \ ++#define IS_SIMPLE_DPAP_RECORD_FACTORY(o) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ + TYPE_SIMPLE_DPAP_RECORD_FACTORY)) + +-#define IS_SIMPLE_DPAP_RECORD_FACTORY_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_TYPE((k), \ +- TYPE_SIMPLE_DPAP_RECORD_FACTORY_CLASS)) ++#define IS_SIMPLE_DPAP_RECORD_FACTORY_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((k), \ ++ TYPE_SIMPLE_DPAP_RECORD_FACTORY_CLASS)) + +-#define SIMPLE_DPAP_RECORD_FACTORY_GET_CLASS(o) \ +- (G_TYPE_INSTANCE_GET_CLASS((o), \ +- TYPE_SIMPLE_DPAP_RECORD_FACTORY, \ ++#define SIMPLE_DPAP_RECORD_FACTORY_GET_CLASS(o) \ ++ (G_TYPE_INSTANCE_GET_CLASS ((o), \ ++ TYPE_SIMPLE_DPAP_RECORD_FACTORY, \ + GrlDPAPRecordFactoryClass)) + + typedef struct GrlDPAPRecordFactoryPrivate GrlDPAPRecordFactoryPrivate; +@@ -61,11 +60,11 @@ typedef struct { + GObjectClass parent; + } GrlDPAPRecordFactoryClass; + +-GType grl_dpap_record_factory_get_type (void); ++GType grl_dpap_record_factory_get_type (void); + +-GrlDPAPRecordFactory *grl_dpap_record_factory_new (void); ++GrlDPAPRecordFactory *grl_dpap_record_factory_new (void); + +-DMAPRecord *grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data); ++DMAPRecord *grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data); + + #endif /* __SIMPLE_DPAP_RECORD_FACTORY */ + +diff --git a/src/dmap/grl-dpap-record.c b/src/dmap/grl-dpap-record.c +index 6281417..14eb1de 100644 +--- a/src/dmap/grl-dpap-record.c ++++ b/src/dmap/grl-dpap-record.c +@@ -61,9 +61,9 @@ G_DEFINE_TYPE_WITH_CODE (GrlDPAPRecord, grl_dpap_record, G_TYPE_OBJECT, + + static void + grl_dpap_record_set_property (GObject *object, +- guint prop_id, +- const GValue *value, +- GParamSpec *pspec) ++ guint prop_id, ++ const GValue *value, ++ GParamSpec *pspec) + { + GrlDPAPRecord *record = SIMPLE_DPAP_RECORD (object); + +@@ -116,9 +116,9 @@ grl_dpap_record_set_property (GObject *object, + + static void + grl_dpap_record_get_property (GObject *object, +- guint prop_id, +- GValue *value, +- GParamSpec *pspec) ++ guint prop_id, ++ GValue *value, ++ GParamSpec *pspec) + { + GrlDPAPRecord *record = SIMPLE_DPAP_RECORD (object); + +diff --git a/src/dmap/grl-dpap-record.h b/src/dmap/grl-dpap-record.h +index 4441740..203e57e 100644 +--- a/src/dmap/grl-dpap-record.h ++++ b/src/dmap/grl-dpap-record.h +@@ -25,36 +25,35 @@ + + G_BEGIN_DECLS + +-#define TYPE_SIMPLE_DPAP_RECORD \ +- (grl_dpap_record_get_type ()) +- +-#define SIMPLE_DPAP_RECORD(o) \ +- (G_TYPE_CHECK_INSTANCE_CAST((o), \ +- TYPE_SIMPLE_DPAP_RECORD, \ +- GrlDPAPRecord)) +- +-#define SIMPLE_DPAP_RECORD_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_CAST((k), \ +- TYPE_SIMPLE_DPAP_RECORD, \ +- GrlDPAPRecordClass)) +- +-#define IS_SIMPLE_DPAP_RECORD(o) \ +- (G_TYPE_CHECK_INSTANCE_TYPE((o), \ +- TYPE_SIMPLE_DPAP_RECORD)) +- +-#define IS_SIMPLE_DPAP_RECORD_CLASS(k) \ +- (G_TYPE_CHECK_CLASS_TYPE((k), \ +- TYPE_SIMPLE_DPAP_RECORD_CLASS)) +- +-#define SIMPLE_DPAP_RECORD_GET_CLASS(o) \ +- (G_TYPE_INSTANCE_GET_CLASS((o), \ +- TYPE_SIMPLE_DPAP_RECORD, \ ++#define TYPE_SIMPLE_DPAP_RECORD (grl_dpap_record_get_type ()) ++ ++#define SIMPLE_DPAP_RECORD(o) \ ++ (G_TYPE_CHECK_INSTANCE_CAST ((o), \ ++ TYPE_SIMPLE_DPAP_RECORD, \ ++ GrlDPAPRecord)) ++ ++#define SIMPLE_DPAP_RECORD_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_CAST ((k), \ ++ TYPE_SIMPLE_DPAP_RECORD, \ + GrlDPAPRecordClass)) + +-#define SIMPLE_DPAP_RECORD_GET_PRIVATE(o) \ +- (G_TYPE_INSTANCE_GET_PRIVATE((o), \ +- TYPE_SIMPLE_DPAP_RECORD, \ +- GrlDPAPRecordPrivate)) ++#define IS_SIMPLE_DPAP_RECORD(o) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ ++ TYPE_SIMPLE_DPAP_RECORD)) ++ ++#define IS_SIMPLE_DPAP_RECORD_CLASS(k) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((k), \ ++ TYPE_SIMPLE_DPAP_RECORD_CLASS)) ++ ++#define SIMPLE_DPAP_RECORD_GET_CLASS(o) \ ++ (G_TYPE_INSTANCE_GET_CLASS ((o), \ ++ TYPE_SIMPLE_DPAP_RECORD, \ ++ GrlDPAPRecordClass)) ++ ++#define SIMPLE_DPAP_RECORD_GET_PRIVATE(o) \ ++ (G_TYPE_INSTANCE_GET_PRIVATE ((o), \ ++ TYPE_SIMPLE_DPAP_RECORD, \ ++ GrlDPAPRecordPrivate)) + + typedef struct GrlDPAPRecordPrivate GrlDPAPRecordPrivate; + +@@ -69,9 +68,9 @@ typedef struct { + + GType grl_dpap_record_get_type (void); + +-GrlDPAPRecord *grl_dpap_record_new (void); +-GInputStream *grl_dpap_record_read (DPAPRecord *record, GError **error); +-gint grl_dpap_record_get_id (DPAPRecord *record); ++GrlDPAPRecord *grl_dpap_record_new (void); ++GInputStream *grl_dpap_record_read (DPAPRecord *record, GError **error); ++gint grl_dpap_record_get_id (DPAPRecord *record); + + #endif /* __SIMPLE_DPAP_RECORD */ + +diff --git a/src/dmap/grl-dpap.c b/src/dmap/grl-dpap.c +index 744de80..9829ec2 100644 +--- a/src/dmap/grl-dpap.c ++++ b/src/dmap/grl-dpap.c +@@ -42,7 +42,7 @@ + /* --------- Logging -------- */ + + #define GRL_LOG_DOMAIN_DEFAULT dmap_log_domain +-GRL_LOG_DOMAIN_STATIC(dmap_log_domain); ++GRL_LOG_DOMAIN_STATIC (dmap_log_domain); + + /* --- Plugin information --- */ + +@@ -51,10 +51,10 @@ GRL_LOG_DOMAIN_STATIC(dmap_log_domain); + + /* --- Grilo DPAP Private --- */ + +-#define GRL_DPAP_SOURCE_GET_PRIVATE(object) \ +- (G_TYPE_INSTANCE_GET_PRIVATE((object), \ +- GRL_DPAP_SOURCE_TYPE, \ +- GrlDpapSourcePrivate)) ++#define GRL_DPAP_SOURCE_GET_PRIVATE(object) \ ++ (G_TYPE_INSTANCE_GET_PRIVATE ((object), \ ++ GRL_DPAP_SOURCE_TYPE, \ ++ GrlDpapSourcePrivate)) + + struct _GrlDpapSourcePrivate { + DMAPMdnsBrowserService *service; +@@ -116,19 +116,19 @@ grl_dpap_plugin_init (GrlRegistry *registry, + sources = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); + + g_signal_connect (G_OBJECT (browser), +- "service-added", ++ "service-added", + G_CALLBACK (grl_dpap_service_added_cb), + (gpointer) plugin); + + g_signal_connect (G_OBJECT (browser), +- "service-removed", ++ "service-removed", + G_CALLBACK (grl_dpap_service_removed_cb), + (gpointer) plugin); + + if (!dmap_mdns_browser_start (browser, &error)) { + GRL_DEBUG ("error starting browser. code: %d message: %s", +- error->code, +- error->message); ++ error->code, ++ error->message); + g_error_free (error); + + g_hash_table_unref (connections); +@@ -143,12 +143,12 @@ grl_dpap_plugin_init (GrlRegistry *registry, + GRL_PLUGIN_DEFINE (GRL_MAJOR, + GRL_MINOR, + DPAP_PLUGIN_ID, +- "DPAP", +- "A plugin for browsing DPAP servers", +- "W. Michael Petullo", ++ "DPAP", ++ "A plugin for browsing DPAP servers", ++ "W. Michael Petullo", + VERSION, +- "LGPL", +- "http://www.flyn.org", ++ "LGPL", ++ "http://www.flyn.org", + grl_dpap_plugin_init, + NULL, + NULL); +@@ -171,10 +171,10 @@ grl_dpap_source_new (DMAPMdnsBrowserService *service) + source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, service->name); + + source = g_object_new (GRL_DPAP_SOURCE_TYPE, +- "source-id", source_id, +- "source-name", service->name, +- "source-desc", source_desc, +- "supported-media", GRL_SUPPORTED_MEDIA_IMAGE, ++ "source-id", source_id, ++ "source-name", service->name, ++ "source-desc", source_desc, ++ "supported-media", GRL_SUPPORTED_MEDIA_IMAGE, + NULL); + + source->priv->service = service; +@@ -214,14 +214,14 @@ grl_dpap_source_finalize (GObject *object) + static void + grl_dpap_do_browse (ResultCbAndArgsAndDb *cb_and_db) + { +- grl_dpap_db_browse(GRL_DPAP_DB(cb_and_db->db), +- cb_and_db->cb.container, +- cb_and_db->cb.source, +- cb_and_db->cb.op_id, +- cb_and_db->cb.skip, +- cb_and_db->cb.count, +- cb_and_db->cb.callback, +- cb_and_db->cb.user_data); ++ grl_dpap_db_browse (GRL_DPAP_DB (cb_and_db->db), ++ cb_and_db->cb.container, ++ cb_and_db->cb.source, ++ cb_and_db->cb.op_id, ++ cb_and_db->cb.skip, ++ cb_and_db->cb.count, ++ cb_and_db->cb.callback, ++ cb_and_db->cb.user_data); + + g_free (cb_and_db); + } +@@ -229,13 +229,13 @@ grl_dpap_do_browse (ResultCbAndArgsAndDb *cb_and_db) + static void + grl_dpap_do_search (ResultCbAndArgsAndDb *cb_and_db) + { +- grl_dpap_db_search(GRL_DPAP_DB(cb_and_db->db), +- cb_and_db->cb.source, +- cb_and_db->cb.op_id, +- (GHRFunc) cb_and_db->cb.predicate, +- cb_and_db->cb.predicate_data, +- cb_and_db->cb.callback, +- cb_and_db->cb.user_data); ++ grl_dpap_db_search (GRL_DPAP_DB (cb_and_db->db), ++ cb_and_db->cb.source, ++ cb_and_db->cb.op_id, ++ (GHRFunc) cb_and_db->cb.predicate, ++ cb_and_db->cb.predicate_data, ++ cb_and_db->cb.callback, ++ cb_and_db->cb.user_data); + + g_free (cb_and_db); + } +diff --git a/src/dmap/grl-dpap.h b/src/dmap/grl-dpap.h +index 1f36cfc..ee596b5 100644 +--- a/src/dmap/grl-dpap.h ++++ b/src/dmap/grl-dpap.h +@@ -26,31 +26,30 @@ + + #include + +-#define GRL_DPAP_SOURCE_TYPE \ +- (grl_dpap_source_get_type ()) ++#define GRL_DPAP_SOURCE_TYPE (grl_dpap_source_get_type ()) + +-#define GRL_DPAP_SOURCE(obj) \ +- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ +- GRL_DPAP_SOURCE_TYPE, \ +- GrlDpapSource)) ++#define GRL_DPAP_SOURCE(obj) \ ++ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ ++ GRL_DPAP_SOURCE_TYPE, \ ++ GrlDpapSource)) + +-#define GRL_IS_DPAP_SOURCE(obj) \ +- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ +- GRL_DPAP_SOURCE_TYPE)) ++#define GRL_IS_DPAP_SOURCE(obj) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ ++ GRL_DPAP_SOURCE_TYPE)) + +-#define GRL_DPAP_SOURCE_CLASS(klass) \ +- (G_TYPE_CHECK_CLASS_CAST((klass), \ +- GRL_DPAP_SOURCE_TYPE, \ +- GrlDpapSourceClass)) ++#define GRL_DPAP_SOURCE_CLASS(klass) \ ++ (G_TYPE_CHECK_CLASS_CAST ((klass), \ ++ GRL_DPAP_SOURCE_TYPE, \ ++ GrlDpapSourceClass)) + +-#define GRL_IS_DPAP_SOURCE_CLASS(klass) \ +- (G_TYPE_CHECK_CLASS_TYPE((klass), \ +- GRL_DPAP_SOURCE_TYPE)) ++#define GRL_IS_DPAP_SOURCE_CLASS(klass) \ ++ (G_TYPE_CHECK_CLASS_TYPE ((klass), \ ++ GRL_DPAP_SOURCE_TYPE)) + +-#define GRL_DPAP_SOURCE_GET_CLASS(obj) \ +- (G_TYPE_INSTANCE_GET_CLASS ((obj), \ +- GRL_DPAP_SOURCE_TYPE, \ +- GrlDpapSourceClass)) ++#define GRL_DPAP_SOURCE_GET_CLASS(obj) \ ++ (G_TYPE_INSTANCE_GET_CLASS ((obj), \ ++ GRL_DPAP_SOURCE_TYPE, \ ++ GrlDpapSourceClass)) + + typedef struct _GrlDpapSourcePrivate GrlDpapSourcePrivate; + typedef struct _GrlDpapSource GrlDpapSource; diff --git a/multimedia/grilo-plugins/patches/020-backport-add-missing-calls-to-free.patch b/multimedia/grilo-plugins/patches/020-backport-add-missing-calls-to-free.patch new file mode 100644 index 00000000..9b4cf0ea --- /dev/null +++ b/multimedia/grilo-plugins/patches/020-backport-add-missing-calls-to-free.patch @@ -0,0 +1,33 @@ +diff --git a/src/dmap/grl-daap-db.c b/src/dmap/grl-daap-db.c +index c931d91..f460113 100644 +--- a/src/dmap/grl-daap-db.c ++++ b/src/dmap/grl-daap-db.c +@@ -232,6 +232,11 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record) + + g_free (id_s); + g_object_unref (media); ++ g_free(album); ++ g_free(artist); ++ g_free(genre); ++ g_free(title); ++ g_free(url); + + return --nextid; + } +diff --git a/src/dmap/grl-dpap-db.c b/src/dmap/grl-dpap-db.c +index 02ffd3a..8be278b 100644 +--- a/src/dmap/grl-dpap-db.c ++++ b/src/dmap/grl-dpap-db.c +@@ -177,6 +177,12 @@ grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record) + + g_free (id_s); + g_object_unref (media); ++ g_free(filename); ++ g_free(aspectratio); ++ g_free(format); ++ g_free(comments); ++ g_free(url); ++ g_byte_array_unref(thumbnail); + + return --nextid; + } diff --git a/multimedia/grilo-plugins/patches/030-backport-libdmapsharing4.patch b/multimedia/grilo-plugins/patches/030-backport-libdmapsharing4.patch new file mode 100644 index 00000000..5eb2d1df --- /dev/null +++ b/multimedia/grilo-plugins/patches/030-backport-libdmapsharing4.patch @@ -0,0 +1,1490 @@ +diff --git a/meson.build b/meson.build +index 33a6f40..8a590b9 100644 +--- a/meson.build ++++ b/meson.build +@@ -62,7 +62,12 @@ gstreamer_dep = dependency('gstreamer-1.0', required: false) + gthread_dep = dependency('gthread-2.0', required: false) + json_glib_dep = dependency('json-glib-1.0', required: false) + libarchive_dep = dependency('libarchive', required: false) +-libdmapsharing_dep = dependency('libdmapsharing-3.0', version: '>= 2.9.12', required: false) ++libdmapsharing4_dep = dependency('libdmapsharing-4.0', version: '>= 3.9.4', required: false) ++if libdmapsharing4_dep.found() ++ libdmapsharing_dep = libdmapsharing4_dep ++else ++ libdmapsharing_dep = dependency('libdmapsharing-3.0', version: '>= 2.9.12', required: false) ++endif + libgdata_dep = dependency('libgdata', version: '>= 0.9.1', required: false) + libmediaart_dep = dependency('libmediaart-2.0', required: false) + libsoup_dep = dependency('libsoup-2.4', required: false) +diff --git a/src/dmap/grl-common.c b/src/dmap/grl-common.c +index 6a1da5e..74a965f 100644 +--- a/src/dmap/grl-common.c ++++ b/src/dmap/grl-common.c +@@ -33,13 +33,27 @@ + #include + #include + ++#include "grl-dmap-compat.h" + #include "grl-common.h" + + gchar * +-grl_dmap_build_url (DMAPMdnsBrowserService *service) ++grl_dmap_build_url (DmapMdnsService *service) + { +- return g_strdup_printf ("%s://%s:%u", +- service->service_name, +- service->host, +- service->port); ++ gchar *url = NULL; ++ gchar *service_name, *host; ++ guint port; ++ ++ service_name = grl_dmap_service_get_service_name (service); ++ host = grl_dmap_service_get_host (service); ++ port = grl_dmap_service_get_port (service); ++ ++ url = g_strdup_printf ("%s://%s:%u", ++ service_name, ++ host, ++ port); ++ ++ g_free (service_name); ++ g_free (host); ++ ++ return url; + } +diff --git a/src/dmap/grl-common.h b/src/dmap/grl-common.h +index e9c8327..d61df63 100644 +--- a/src/dmap/grl-common.h ++++ b/src/dmap/grl-common.h +@@ -24,9 +24,6 @@ + #ifndef _GRL_COMMON_H_ + #define _GRL_COMMON_H_ + +-#include +-#include +- + typedef struct { + GrlSourceResultCb callback; + GrlSource *source; +@@ -41,9 +38,9 @@ typedef struct { + + typedef struct { + ResultCbAndArgs cb; +- DMAPDb *db; ++ DmapDb *db; + } ResultCbAndArgsAndDb; + +-gchar *grl_dmap_build_url (DMAPMdnsBrowserService *service); ++gchar *grl_dmap_build_url (DmapMdnsService *service); + + #endif /* _GRL_COMMON_H_ */ +diff --git a/src/dmap/grl-daap-compat.h b/src/dmap/grl-daap-compat.h +new file mode 100644 +index 0000000..da9025f +--- /dev/null ++++ b/src/dmap/grl-daap-compat.h +@@ -0,0 +1,76 @@ ++/* ++ * Copyright (C) 2019 W. Michael Petullo ++ * Copyright (C) 2019 Igalia S.L. ++ * ++ * Contact: W. Michael Petullo ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public License ++ * as published by the Free Software Foundation; version 2.1 of ++ * the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ * ++ */ ++ ++#ifndef _GRL_DAAP_COMPAT_H_ ++#define _GRL_DAAP_COMPAT_H_ ++ ++#include "grl-dmap-compat.h" ++ ++#ifdef LIBDMAPSHARING_COMPAT ++ ++DMAPRecord *grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data, GError **error); ++guint grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record, GError **error); ++ ++/* Building against libdmapsharing 3 API. */ ++ ++#define dmap_av_connection_new daap_connection_new ++#define DmapAvRecord DAAPRecord ++#define DmapAvRecordInterface DAAPRecordIface ++#define DMAP_AV_RECORD DAAP_RECORD ++#define DMAP_TYPE_AV_RECORD DAAP_TYPE_RECORD ++#define IS_DMAP_AV_RECORD IS_DAAP_RECORD ++ ++static inline DmapRecord * ++grl_daap_record_factory_create_compat (DmapRecordFactory *factory, gpointer user_data) ++{ ++ return grl_daap_record_factory_create (factory, user_data, NULL); ++} ++ ++static inline guint ++grl_daap_db_add_compat (DmapDb *_db, DmapRecord *_record) ++{ ++ return grl_daap_db_add (_db, _record, NULL); ++} ++ ++#else ++ ++/* Building against libdmapsharing 4 API. */ ++ ++DmapRecord *grl_daap_record_factory_create (DmapRecordFactory *factory, gpointer user_data, GError **error); ++guint grl_daap_db_add (DmapDb *_db, DmapRecord *_record, GError **error); ++ ++static inline DmapRecord * ++grl_daap_record_factory_create_compat (DmapRecordFactory *factory, gpointer user_data, GError **error) ++{ ++ return grl_daap_record_factory_create (factory, user_data, error); ++} ++ ++static inline guint ++grl_daap_db_add_compat (DmapDb *_db, DmapRecord *_record, GError **error) ++{ ++ return grl_daap_db_add (_db, _record, error); ++} ++ ++#endif ++ ++#endif /* _GRL_DAAP_COMPAT_H_ */ +diff --git a/src/dmap/grl-daap-db.c b/src/dmap/grl-daap-db.c +index f460113..315370e 100644 +--- a/src/dmap/grl-daap-db.c ++++ b/src/dmap/grl-daap-db.c +@@ -54,8 +54,12 @@ + #include + #include + #include ++#include + #include ++#include + ++#include "grl-daap-compat.h" ++#include "grl-common.h" + #include "grl-daap-db.h" + + #define ALBUMS_ID "albums" +@@ -103,23 +107,23 @@ grl_daap_db_new (void) + return db; + } + +-static DMAPRecord * +-grl_daap_db_lookup_by_id (const DMAPDb *db, guint id) ++static DmapRecord * ++grl_daap_db_lookup_by_id (const DmapDb *db, guint id) + { + g_error ("Not implemented"); + return NULL; + } + + static void +-grl_daap_db_foreach (const DMAPDb *db, +- GHFunc func, ++grl_daap_db_foreach (const DmapDb *db, ++ DmapIdRecordFunc func, + gpointer data) + { + g_error ("Not implemented"); + } + + static gint64 +-grl_daap_db_count (const DMAPDb *db) ++grl_daap_db_count (const DmapDb *db) + { + g_error ("Not implemented"); + return 0; +@@ -150,14 +154,14 @@ set_insert (GHashTable *category, const char *category_name, char *set_name, Grl + g_object_unref (container); + } + +-static guint +-grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record) ++guint ++grl_daap_db_add (DmapDb *_db, DmapRecord *_record, GError **error) + { + g_assert (IS_GRL_DAAP_DB (_db)); +- g_assert (IS_DAAP_RECORD (_record)); ++ g_assert (IS_DMAP_AV_RECORD (_record)); + + GrlDAAPDb *db = GRL_DAAP_DB (_db); +- DAAPRecord *record = DAAP_RECORD (_record); ++ DmapAvRecord *record = DMAP_AV_RECORD (_record); + + gint duration = 0; + gint32 bitrate = 0, +@@ -232,11 +236,11 @@ grl_daap_db_add (DMAPDb *_db, DMAPRecord *_record) + + g_free (id_s); + g_object_unref (media); +- g_free(album); +- g_free(artist); +- g_free(genre); +- g_free(title); +- g_free(url); ++ g_free (album); ++ g_free (artist); ++ g_free (genre); ++ g_free (title); ++ g_free (url); + + return --nextid; + } +@@ -359,11 +363,11 @@ grl_daap_db_search (GrlDAAPDb *db, + static void + dmap_db_interface_init (gpointer iface, gpointer data) + { +- DMAPDbIface *daap_db = iface; ++ DmapDbInterface *daap_db = iface; + + g_assert (G_TYPE_FROM_INTERFACE (daap_db) == DMAP_TYPE_DB); + +- daap_db->add = grl_daap_db_add; ++ daap_db->add = grl_daap_db_add_compat; + daap_db->lookup_by_id = grl_daap_db_lookup_by_id; + daap_db->foreach = grl_daap_db_foreach; + daap_db->count = grl_daap_db_count; +diff --git a/src/dmap/grl-daap-db.h b/src/dmap/grl-daap-db.h +index 2548c50..1a37a3a 100644 +--- a/src/dmap/grl-daap-db.h ++++ b/src/dmap/grl-daap-db.h +@@ -24,6 +24,8 @@ + #include + #include + ++#include "grl-daap-compat.h" ++ + G_BEGIN_DECLS + + #define TYPE_GRL_DAAP_DB (grl_daap_db_get_type ()) +diff --git a/src/dmap/grl-daap-record-factory.c b/src/dmap/grl-daap-record-factory.c +index 648fd85..d0c590f 100644 +--- a/src/dmap/grl-daap-record-factory.c ++++ b/src/dmap/grl-daap-record-factory.c +@@ -1,5 +1,5 @@ + /* +- * DAAPRecord factory class ++ * DmapAvRecord factory class + * + * Copyright (C) 2008 W. Michael Petullo + * +@@ -18,11 +18,16 @@ + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include ++#include ++ ++#include "grl-daap-compat.h" ++#include "grl-common.h" + #include "grl-daap-record-factory.h" + #include "grl-daap-record.h" + +-DMAPRecord * +-grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data) ++DmapRecord * ++grl_daap_record_factory_create (DmapRecordFactory *factory, gpointer user_data, GError **error) + { + return DMAP_RECORD (grl_daap_record_new ()); + } +@@ -40,11 +45,11 @@ grl_daap_record_factory_class_init (GrlDAAPRecordFactoryClass *klass) + static void + grl_daap_record_factory_interface_init (gpointer iface, gpointer data) + { +- DMAPRecordFactoryIface *factory = iface; ++ DmapRecordFactoryInterface *factory = iface; + + g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY); + +- factory->create = grl_daap_record_factory_create; ++ factory->create = grl_daap_record_factory_create_compat; + } + + G_DEFINE_TYPE_WITH_CODE (GrlDAAPRecordFactory, grl_daap_record_factory, G_TYPE_OBJECT, +diff --git a/src/dmap/grl-daap-record-factory.h b/src/dmap/grl-daap-record-factory.h +index 45aa69a..f114bad 100644 +--- a/src/dmap/grl-daap-record-factory.h ++++ b/src/dmap/grl-daap-record-factory.h +@@ -23,6 +23,8 @@ + + #include + ++#include "grl-daap-compat.h" ++ + G_BEGIN_DECLS + + #define TYPE_SIMPLE_DAAP_RECORD_FACTORY (grl_daap_record_factory_get_type ()) +@@ -64,8 +66,6 @@ GType grl_daap_record_factory_get_type (void); + + GrlDAAPRecordFactory *grl_daap_record_factory_new (void); + +-DMAPRecord *grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data); +- + #endif /* __SIMPLE_DAAP_RECORD_FACTORY */ + + G_END_DECLS +diff --git a/src/dmap/grl-daap-record.c b/src/dmap/grl-daap-record.c +index 82bf2f9..4fa0c54 100644 +--- a/src/dmap/grl-daap-record.c ++++ b/src/dmap/grl-daap-record.c +@@ -20,6 +20,11 @@ + * + */ + ++#include ++#include ++ ++#include "grl-daap-compat.h" ++#include "grl-common.h" + #include "grl-daap-record.h" + + struct GrlDAAPRecordPrivate { +@@ -226,7 +231,7 @@ grl_daap_record_new (void) + } + + GInputStream * +-grl_daap_record_read (DAAPRecord *record, GError **error) ++grl_daap_record_read (DmapAvRecord *record, GError **error) + { + GFile *file; + GInputStream *stream; +@@ -280,9 +285,9 @@ grl_daap_record_class_init (GrlDAAPRecordClass *klass) + static void + grl_daap_record_daap_iface_init (gpointer iface, gpointer data) + { +- DAAPRecordIface *daap_record = iface; ++ DmapAvRecordInterface *daap_record = iface; + +- g_assert (G_TYPE_FROM_INTERFACE (daap_record) == DAAP_TYPE_RECORD); ++ g_assert (G_TYPE_FROM_INTERFACE (daap_record) == DMAP_TYPE_AV_RECORD); + + daap_record->read = grl_daap_record_read; + } +@@ -290,7 +295,7 @@ grl_daap_record_daap_iface_init (gpointer iface, gpointer data) + static void + grl_daap_record_dmap_iface_init (gpointer iface, gpointer data) + { +- DMAPRecordIface *dmap_record = iface; ++ DmapRecordInterface *dmap_record = iface; + + g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD); + } +@@ -298,7 +303,7 @@ grl_daap_record_dmap_iface_init (gpointer iface, gpointer data) + + G_DEFINE_TYPE_WITH_CODE (GrlDAAPRecord, grl_daap_record, G_TYPE_OBJECT, + G_ADD_PRIVATE (GrlDAAPRecord) +- G_IMPLEMENT_INTERFACE (DAAP_TYPE_RECORD, grl_daap_record_daap_iface_init) ++ G_IMPLEMENT_INTERFACE (DMAP_TYPE_AV_RECORD, grl_daap_record_daap_iface_init) + G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, grl_daap_record_dmap_iface_init)) + + static void +diff --git a/src/dmap/grl-daap-record.h b/src/dmap/grl-daap-record.h +index 7aae82d..42782b1 100644 +--- a/src/dmap/grl-daap-record.h ++++ b/src/dmap/grl-daap-record.h +@@ -23,6 +23,8 @@ + + #include + ++#include "grl-daap-compat.h" ++ + G_BEGIN_DECLS + + #define TYPE_SIMPLE_DAAP_RECORD (grl_daap_record_get_type ()) +@@ -69,8 +71,8 @@ typedef struct { + GType grl_daap_record_get_type (void); + + GrlDAAPRecord *grl_daap_record_new (void); +-GInputStream *grl_daap_record_read (DAAPRecord *record, GError **error); +-gint grl_daap_record_get_id (DAAPRecord *record); ++GInputStream *grl_daap_record_read (DmapAvRecord *record, GError **error); ++gint grl_daap_record_get_id (DmapAvRecord *record); + + #endif /* __SIMPLE_DAAP_RECORD */ + +diff --git a/src/dmap/grl-daap.c b/src/dmap/grl-daap.c +index f3c4115..962f2b8 100644 +--- a/src/dmap/grl-daap.c ++++ b/src/dmap/grl-daap.c +@@ -33,6 +33,7 @@ + #include + #include + ++#include "grl-daap-compat.h" + #include "grl-common.h" + #include "grl-daap.h" + #include "grl-daap-db.h" +@@ -52,12 +53,12 @@ GRL_LOG_DOMAIN_STATIC (daap_log_domain); + /* --- Grilo DAAP Private --- */ + + struct _GrlDaapSourcePrivate { +- DMAPMdnsBrowserService *service; ++ DmapMdnsService *service; + }; + + /* --- Data types --- */ + +-static GrlDaapSource *grl_daap_source_new (DMAPMdnsBrowserService *service); ++static GrlDaapSource *grl_daap_source_new (DmapMdnsService *service); + + static void grl_daap_source_finalize (GObject *object); + +@@ -74,16 +75,16 @@ static void grl_daap_source_search (GrlSource *source, + GrlSourceSearchSpec *ss); + + +-static void grl_daap_service_added_cb (DMAPMdnsBrowser *browser, +- DMAPMdnsBrowserService *service, ++static void grl_daap_service_added_cb (DmapMdnsBrowser *browser, ++ DmapMdnsService *service, + GrlPlugin *plugin); + +-static void grl_daap_service_removed_cb (DMAPMdnsBrowser *browser, ++static void grl_daap_service_removed_cb (DmapMdnsBrowser *browser, + const gchar *service_name, + GrlPlugin *plugin); + + /* ===================== Globals ======================= */ +-static DMAPMdnsBrowser *browser; ++static DmapMdnsBrowser *browser; + /* Maps URIs to DBs */ + static GHashTable *connections; + /* Map DAAP services to Grilo media sources */ +@@ -106,7 +107,7 @@ grl_daap_plugin_init (GrlRegistry *registry, + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + +- browser = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP); ++ browser = dmap_mdns_browser_new (DMAP_MDNS_SERVICE_TYPE_DAAP); + connections = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); + sources = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); + +@@ -153,8 +154,10 @@ GRL_PLUGIN_DEFINE (GRL_MAJOR, + G_DEFINE_TYPE_WITH_PRIVATE (GrlDaapSource, grl_daap_source, GRL_TYPE_SOURCE) + + static GrlDaapSource * +-grl_daap_source_new (DMAPMdnsBrowserService *service) ++grl_daap_source_new (DmapMdnsService *service) + { ++ gchar *name; ++ gchar *service_name; + gchar *source_desc; + gchar *source_id; + +@@ -162,12 +165,15 @@ grl_daap_source_new (DMAPMdnsBrowserService *service) + + GRL_DEBUG ("grl_daap_source_new"); + +- source_desc = g_strdup_printf (SOURCE_DESC_TEMPLATE, service->name); +- source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, service->name); ++ name = grl_dmap_service_get_name (service); ++ service_name = grl_dmap_service_get_service_name (service); ++ ++ source_desc = g_strdup_printf (SOURCE_DESC_TEMPLATE, name); ++ source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, name); + + source = g_object_new (GRL_DAAP_SOURCE_TYPE, + "source-id", source_id, +- "source-name", service->name, ++ "source-name", service_name, + "source-desc", source_desc, + "supported-media", GRL_SUPPORTED_MEDIA_AUDIO, + NULL); +@@ -176,6 +182,8 @@ grl_daap_source_new (DMAPMdnsBrowserService *service) + + g_free (source_desc); + g_free (source_id); ++ g_free (service_name); ++ g_free (name); + + return source; + } +@@ -209,7 +217,7 @@ grl_daap_source_finalize (GObject *object) + static void + grl_daap_do_browse (ResultCbAndArgsAndDb *cb_and_db) + { +- grl_daap_db_browse (GRL_DAAP_DB(cb_and_db->db), ++ grl_daap_db_browse (GRL_DAAP_DB (cb_and_db->db), + cb_and_db->cb.container, + cb_and_db->cb.source, + cb_and_db->cb.op_id, +@@ -236,7 +244,7 @@ grl_daap_do_search (ResultCbAndArgsAndDb *cb_and_db) + } + + static void +-browse_connected_cb (DMAPConnection *connection, ++browse_connected_cb (DmapConnection *connection, + gboolean result, + const char *reason, + ResultCbAndArgsAndDb *cb_and_db) +@@ -261,7 +269,7 @@ browse_connected_cb (DMAPConnection *connection, + } + + static void +-search_connected_cb (DMAPConnection *connection, ++search_connected_cb (DmapConnection *connection, + gboolean result, + const char *reason, + ResultCbAndArgsAndDb *cb_and_db) +@@ -286,8 +294,8 @@ search_connected_cb (DMAPConnection *connection, + } + + static void +-grl_daap_service_added_cb (DMAPMdnsBrowser *browser, +- DMAPMdnsBrowserService *service, ++grl_daap_service_added_cb (DmapMdnsBrowser *browser, ++ DmapMdnsService *service, + GrlPlugin *plugin) + { + GrlRegistry *registry = grl_registry_get_default (); +@@ -301,13 +309,16 @@ grl_daap_service_added_cb (DMAPMdnsBrowser *browser, + GRL_SOURCE (source), + NULL); + if (source != NULL) { +- g_hash_table_insert (sources, g_strdup (service->name), g_object_ref (source)); ++ gchar *name; ++ name = grl_dmap_service_get_name (service); ++ g_hash_table_insert (sources, g_strdup (name), g_object_ref (source)); + g_object_remove_weak_pointer (G_OBJECT (source), (gpointer *) &source); ++ g_free (name); + } + } + + static void +-grl_daap_service_removed_cb (DMAPMdnsBrowser *browser, ++grl_daap_service_removed_cb (DmapMdnsBrowser *browser, + const gchar *service_name, + GrlPlugin *plugin) + { +@@ -323,14 +334,14 @@ grl_daap_service_removed_cb (DMAPMdnsBrowser *browser, + } + + static void +-grl_daap_connect (gchar *name, gchar *host, guint port, ResultCbAndArgsAndDb *cb_and_db, DMAPConnectionCallback callback) ++grl_daap_connect (gchar *name, gchar *host, guint port, ResultCbAndArgsAndDb *cb_and_db, DmapConnectionFunc callback) + { +- DMAPRecordFactory *factory; +- DMAPConnection *connection; ++ DmapRecordFactory *factory; ++ DmapConnection *connection; + + factory = DMAP_RECORD_FACTORY (grl_daap_record_factory_new ()); +- connection = DMAP_CONNECTION (daap_connection_new (name, host, port, DMAP_DB (cb_and_db->db), factory)); +- dmap_connection_connect (connection, (DMAPConnectionCallback) callback, cb_and_db); ++ connection = DMAP_CONNECTION (dmap_av_connection_new (name, host, port, DMAP_DB (cb_and_db->db), factory)); ++ dmap_connection_start (connection, (DmapConnectionFunc) callback, cb_and_db); + } + + static gboolean +@@ -397,15 +408,25 @@ grl_daap_source_browse (GrlSource *source, + browse_connected_cb (NULL, TRUE, NULL, cb_and_db); + } else { + /* Connect */ ++ gchar *name, *host; ++ guint port; ++ + cb_and_db->db = DMAP_DB (grl_daap_db_new ()); + +- grl_daap_connect (dmap_source->priv->service->name, +- dmap_source->priv->service->host, +- dmap_source->priv->service->port, ++ name = grl_dmap_service_get_name (dmap_source->priv->service); ++ host = grl_dmap_service_get_host (dmap_source->priv->service); ++ port = grl_dmap_service_get_port (dmap_source->priv->service); ++ ++ grl_daap_connect (name, ++ host, ++ port, + cb_and_db, +- (DMAPConnectionCallback) browse_connected_cb); ++ (DmapConnectionFunc) browse_connected_cb); + + g_hash_table_insert (connections, g_strdup (url), cb_and_db->db); ++ ++ g_free (name); ++ g_free (host); + } + + g_free (url); +@@ -417,7 +438,7 @@ static void grl_daap_source_search (GrlSource *source, + GrlDaapSource *dmap_source = GRL_DAAP_SOURCE (source); + + ResultCbAndArgsAndDb *cb_and_db; +- DMAPMdnsBrowserService *service = dmap_source->priv->service; ++ DmapMdnsService *service = dmap_source->priv->service; + gchar *url = grl_dmap_build_url (service); + + cb_and_db = g_new (ResultCbAndArgsAndDb, 1); +@@ -435,9 +456,25 @@ static void grl_daap_source_search (GrlSource *source, + search_connected_cb (NULL, TRUE, NULL, cb_and_db); + } else { + /* Connect */ ++ gchar *name, *host; ++ guint port; ++ + cb_and_db->db = DMAP_DB (grl_daap_db_new ()); +- grl_daap_connect (service->name, service->host, service->port, cb_and_db, (DMAPConnectionCallback) search_connected_cb); ++ ++ name = grl_dmap_service_get_name (dmap_source->priv->service); ++ host = grl_dmap_service_get_host (dmap_source->priv->service); ++ port = grl_dmap_service_get_port (dmap_source->priv->service); ++ ++ grl_daap_connect (name, ++ host, ++ port, ++ cb_and_db, ++ (DmapConnectionFunc) search_connected_cb); ++ + g_hash_table_insert (connections, g_strdup (url), cb_and_db->db); ++ ++ g_free (name); ++ g_free (host); + } + + g_free (url); +diff --git a/src/dmap/grl-daap.h b/src/dmap/grl-daap.h +index 1119495..5271435 100644 +--- a/src/dmap/grl-daap.h ++++ b/src/dmap/grl-daap.h +@@ -26,6 +26,8 @@ + + #include + ++#include "grl-daap-compat.h" ++ + #define GRL_DAAP_SOURCE_TYPE (grl_daap_source_get_type ()) + + #define GRL_DAAP_SOURCE(obj) \ +diff --git a/src/dmap/grl-dmap-compat.h b/src/dmap/grl-dmap-compat.h +new file mode 100644 +index 0000000..cd1934f +--- /dev/null ++++ b/src/dmap/grl-dmap-compat.h +@@ -0,0 +1,108 @@ ++/* ++ * Copyright (C) 2019 W. Michael Petullo ++ * Copyright (C) 2019 Igalia S.L. ++ * ++ * Contact: W. Michael Petullo ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public License ++ * as published by the Free Software Foundation; version 2.1 of ++ * the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ * ++ */ ++ ++#ifndef _GRL_DMAP_COMPAT_H_ ++#define _GRL_DMAP_COMPAT_H_ ++ ++#ifdef LIBDMAPSHARING_COMPAT ++ ++/* Building against libdmapsharing 3 API. */ ++ ++#define DmapConnection DMAPConnection ++#define DmapConnectionFunc DMAPConnectionCallback ++#define dmap_connection_start dmap_connection_connect ++#define DmapDb DMAPDb ++#define DmapDbInterface DMAPDbIface ++#define DmapIdRecordFunc GHFunc ++#define DmapMdnsBrowser DMAPMdnsBrowser ++#define DmapMdnsService DMAPMdnsBrowserService ++#define DMAP_MDNS_SERVICE_TYPE_DAAP DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP ++#define DMAP_MDNS_SERVICE_TYPE_DPAP DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP ++#define DmapRecord DMAPRecord ++#define DmapRecordFactory DMAPRecordFactory ++#define DmapRecordFactoryInterface DMAPRecordFactoryIface ++#define DmapRecordInterface DMAPRecordIface ++ ++static inline gchar * ++grl_dmap_service_get_name (DmapMdnsService *service) ++{ ++ return g_strdup (service->name); ++} ++ ++static inline gchar * ++grl_dmap_service_get_service_name (DmapMdnsService *service) ++{ ++ return g_strdup (service->service_name); ++} ++ ++static inline gchar * ++grl_dmap_service_get_host (DmapMdnsService *service) ++{ ++ return g_strdup (service->host); ++} ++ ++static inline guint ++grl_dmap_service_get_port (DmapMdnsService *service) ++{ ++ return service->port; ++} ++ ++#else ++ ++/* Building against libdmapsharing 4 API. */ ++ ++static inline gchar * ++grl_dmap_service_get_name (DmapMdnsService *service) ++{ ++ gchar *name; ++ g_object_get (service, "name", &name, NULL); ++ return name; ++} ++ ++static inline gchar * ++grl_dmap_service_get_service_name (DmapMdnsService *service) ++{ ++ gchar *service_name; ++ g_object_get (service, "service-name", &service_name, NULL); ++ return service_name; ++} ++ ++static inline gchar * ++grl_dmap_service_get_host (DmapMdnsService *service) ++{ ++ gchar *host; ++ g_object_get (service, "host", &host, NULL); ++ return host; ++} ++ ++static inline guint ++grl_dmap_service_get_port (DmapMdnsService *service) ++{ ++ guint port; ++ g_object_get (service, "port", &port, NULL); ++ return port; ++} ++ ++#endif ++ ++#endif /* _GRL_DMAP_COMPAT_H_ */ +diff --git a/src/dmap/grl-dpap-compat.h b/src/dmap/grl-dpap-compat.h +new file mode 100644 +index 0000000..b996464 +--- /dev/null ++++ b/src/dmap/grl-dpap-compat.h +@@ -0,0 +1,116 @@ ++/* ++ * Copyright (C) 2019 W. Michael Petullo ++ * Copyright (C) 2019 Igalia S.L. ++ * ++ * Contact: W. Michael Petullo ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public License ++ * as published by the Free Software Foundation; version 2.1 of ++ * the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ * ++ */ ++ ++#ifndef _GRL_DPAP_COMPAT_H_ ++#define _GRL_DPAP_COMPAT_H_ ++ ++#include "grl-dmap-compat.h" ++ ++#ifdef LIBDMAPSHARING_COMPAT ++ ++DMAPRecord *grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data, GError **error); ++guint grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record, GError **error); ++ ++/* Building against libdmapsharing 3 API. */ ++ ++#define dmap_image_connection_new dpap_connection_new ++#define DmapImageRecord DPAPRecord ++#define DmapImageRecordInterface DPAPRecordIface ++#define DMAP_IMAGE_RECORD DPAP_RECORD ++#define DMAP_TYPE_IMAGE_RECORD DPAP_TYPE_RECORD ++#define IS_DMAP_IMAGE_RECORD IS_DPAP_RECORD ++ ++static inline DmapRecord * ++grl_dpap_record_factory_create_compat (DmapRecordFactory *factory, gpointer user_data) ++{ ++ return grl_dpap_record_factory_create (factory, user_data, NULL); ++} ++ ++static inline void ++set_thumbnail (GValue *value, GByteArray *thumbnail) ++{ ++ g_value_set_pointer (value, thumbnail); ++} ++ ++static inline GByteArray * ++get_thumbnail (GByteArray *thumbnail, const GValue *value) ++{ ++ if (thumbnail) ++ g_byte_array_unref (thumbnail); ++ return g_byte_array_ref (g_value_get_pointer (value)); ++} ++ ++static inline void ++unref_thumbnail (GByteArray *thumbnail) ++{ ++ g_byte_array_unref (thumbnail); ++} ++ ++static inline guint ++grl_dpap_db_add_compat (DMAPDb *_db, DmapRecord *_record) ++{ ++ return grl_dpap_db_add (_db, _record, NULL); ++} ++ ++#else ++ ++/* Building against libdmapsharing 4 API. */ ++ ++DmapRecord *grl_dpap_record_factory_create (DmapRecordFactory *factory, gpointer user_data, GError **error); ++guint grl_dpap_db_add (DmapDb *_db, DmapRecord *_record, GError **error); ++ ++static inline void ++set_thumbnail (GValue *value, GArray *thumbnail) ++{ ++ g_value_set_boxed (value, thumbnail); ++} ++ ++static inline GArray * ++get_thumbnail (GArray *thumbnail, const GValue *value) ++{ ++ if (thumbnail) ++ g_array_unref (thumbnail); ++ return g_value_get_boxed (value); ++} ++ ++static inline void ++unref_thumbnail (GArray *thumbnail) ++{ ++ g_array_unref (thumbnail); ++} ++ ++static inline DmapRecord * ++grl_dpap_record_factory_create_compat (DmapRecordFactory *factory, gpointer user_data, GError **error) ++{ ++ return grl_dpap_record_factory_create (factory, user_data, error); ++} ++ ++static inline guint ++grl_dpap_db_add_compat (DmapDb *_db, DmapRecord *_record, GError **error) ++{ ++ return grl_dpap_db_add (_db, _record, error); ++} ++ ++#endif ++ ++#endif /* _GRL_DPAP_COMPAT_H_ */ +diff --git a/src/dmap/grl-dpap-db.c b/src/dmap/grl-dpap-db.c +index 8be278b..cd647ee 100644 +--- a/src/dmap/grl-dpap-db.c ++++ b/src/dmap/grl-dpap-db.c +@@ -24,12 +24,16 @@ + #include "config.h" + #endif + ++#include + #include + #include + #include + #include + #include ++#include + ++#include "grl-dpap-compat.h" ++#include "grl-common.h" + #include "grl-dpap-db.h" + + #define PHOTOS_ID "photos" +@@ -71,23 +75,23 @@ grl_dpap_db_new (void) + return db; + } + +-static DMAPRecord * +-grl_dpap_db_lookup_by_id (const DMAPDb *db, guint id) ++static DmapRecord * ++grl_dpap_db_lookup_by_id (const DmapDb *db, guint id) + { + g_warning ("Not implemented"); + return NULL; + } + + static void +-grl_dpap_db_foreach (const DMAPDb *db, +- GHFunc func, ++grl_dpap_db_foreach (const DmapDb *db, ++ DmapIdRecordFunc func, + gpointer data) + { + g_warning ("Not implemented"); + } + + static gint64 +-grl_dpap_db_count (const DMAPDb *db) ++grl_dpap_db_count (const DmapDb *db) + { + g_warning ("Not implemented"); + return 0; +@@ -118,21 +122,21 @@ set_insert (GHashTable *category, const char *category_name, char *set_name, Grl + g_object_unref (container); + } + +-static guint +-grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record) ++guint ++grl_dpap_db_add (DmapDb *_db, DmapRecord *_record, GError **error) + { + g_assert (IS_GRL_DPAP_DB (_db)); +- g_assert (IS_DPAP_RECORD (_record)); ++ g_assert (IS_DMAP_IMAGE_RECORD (_record)); + + GrlDPAPDb *db = GRL_DPAP_DB (_db); +- DPAPRecord *record = DPAP_RECORD (_record); ++ DmapImageRecord *record = DMAP_IMAGE_RECORD (_record); + + gint height = 0, + width = 0, + largefilesize = 0, + creationdate = 0, + rating = 0; +- GByteArray *thumbnail = NULL; ++ GArray *thumbnail = NULL; + gchar *id_s = NULL, + *filename = NULL, + *aspectratio = NULL, +@@ -177,12 +181,12 @@ grl_dpap_db_add (DMAPDb *_db, DMAPRecord *_record) + + g_free (id_s); + g_object_unref (media); +- g_free(filename); +- g_free(aspectratio); +- g_free(format); +- g_free(comments); +- g_free(url); +- g_byte_array_unref(thumbnail); ++ g_free (filename); ++ g_free (aspectratio); ++ g_free (format); ++ g_free (comments); ++ g_free (url); ++ g_array_unref (thumbnail); + + return --nextid; + } +@@ -298,11 +302,11 @@ grl_dpap_db_search (GrlDPAPDb *db, + static void + dmap_db_interface_init (gpointer iface, gpointer data) + { +- DMAPDbIface *dpap_db = iface; ++ DmapDbInterface *dpap_db = iface; + + g_assert (G_TYPE_FROM_INTERFACE (dpap_db) == DMAP_TYPE_DB); + +- dpap_db->add = grl_dpap_db_add; ++ dpap_db->add = grl_dpap_db_add_compat; + dpap_db->lookup_by_id = grl_dpap_db_lookup_by_id; + dpap_db->foreach = grl_dpap_db_foreach; + dpap_db->count = grl_dpap_db_count; +diff --git a/src/dmap/grl-dpap-db.h b/src/dmap/grl-dpap-db.h +index d3abcba..a21ad7a 100644 +--- a/src/dmap/grl-dpap-db.h ++++ b/src/dmap/grl-dpap-db.h +@@ -24,6 +24,8 @@ + #include + #include + ++#include "grl-dpap-compat.h" ++ + G_BEGIN_DECLS + + #define TYPE_GRL_DPAP_DB (grl_dpap_db_get_type ()) +diff --git a/src/dmap/grl-dpap-record-factory.c b/src/dmap/grl-dpap-record-factory.c +index 3d0c87a..860d957 100644 +--- a/src/dmap/grl-dpap-record-factory.c ++++ b/src/dmap/grl-dpap-record-factory.c +@@ -18,11 +18,18 @@ + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include ++#include ++ ++#include "grl-dpap-compat.h" ++#include "grl-common.h" + #include "grl-dpap-record-factory.h" + #include "grl-dpap-record.h" + +-DMAPRecord * +-grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data) ++DmapRecord * ++grl_dpap_record_factory_create (DmapRecordFactory *factory, ++ gpointer user_data, ++ GError **error) + { + return DMAP_RECORD (grl_dpap_record_new ()); + } +@@ -40,11 +47,11 @@ grl_dpap_record_factory_class_init (GrlDPAPRecordFactoryClass *klass) + static void + grl_dpap_record_factory_interface_init (gpointer iface, gpointer data) + { +- DMAPRecordFactoryIface *factory = iface; ++ DmapRecordFactoryInterface *factory = iface; + + g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY); + +- factory->create = grl_dpap_record_factory_create; ++ factory->create = grl_dpap_record_factory_create_compat; + } + + G_DEFINE_TYPE_WITH_CODE (GrlDPAPRecordFactory, grl_dpap_record_factory, G_TYPE_OBJECT, +diff --git a/src/dmap/grl-dpap-record-factory.h b/src/dmap/grl-dpap-record-factory.h +index 3f4ca54..899fd0a 100644 +--- a/src/dmap/grl-dpap-record-factory.h ++++ b/src/dmap/grl-dpap-record-factory.h +@@ -23,6 +23,8 @@ + + #include + ++#include "grl-dpap-compat.h" ++ + G_BEGIN_DECLS + + #define TYPE_SIMPLE_DPAP_RECORD_FACTORY (grl_dpap_record_factory_get_type ()) +@@ -64,7 +66,7 @@ GType grl_dpap_record_factory_get_type (void); + + GrlDPAPRecordFactory *grl_dpap_record_factory_new (void); + +-DMAPRecord *grl_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data); ++DmapRecord *grl_dpap_record_factory_create (DmapRecordFactory *factory, gpointer user_data, GError **error); + + #endif /* __SIMPLE_DPAP_RECORD_FACTORY */ + +diff --git a/src/dmap/grl-dpap-record.c b/src/dmap/grl-dpap-record.c +index 14eb1de..0afb2b8 100644 +--- a/src/dmap/grl-dpap-record.c ++++ b/src/dmap/grl-dpap-record.c +@@ -20,6 +20,11 @@ + * + */ + ++#include ++#include ++ ++#include "grl-dpap-compat.h" ++#include "grl-common.h" + #include "grl-dpap-record.h" + + struct GrlDPAPRecordPrivate { +@@ -28,7 +33,7 @@ struct GrlDPAPRecordPrivate { + gint creationdate; + gint rating; + char *filename; +- GByteArray *thumbnail; ++ void *thumbnail; /* GByteArray or GArray, depending on libdmapsharing ver. */ + char *aspectratio; + gint height; + gint width; +@@ -56,7 +61,7 @@ static void grl_dpap_record_dpap_iface_init (gpointer iface, gpointer data); + + G_DEFINE_TYPE_WITH_CODE (GrlDPAPRecord, grl_dpap_record, G_TYPE_OBJECT, + G_ADD_PRIVATE (GrlDPAPRecord) +- G_IMPLEMENT_INTERFACE (DPAP_TYPE_RECORD, grl_dpap_record_dpap_iface_init) ++ G_IMPLEMENT_INTERFACE (DMAP_TYPE_IMAGE_RECORD, grl_dpap_record_dpap_iface_init) + G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, grl_dpap_record_dmap_iface_init)) + + static void +@@ -104,9 +109,7 @@ grl_dpap_record_set_property (GObject *object, + record->priv->comments = g_value_dup_string (value); + break; + case PROP_THUMBNAIL: +- if (record->priv->thumbnail) +- g_byte_array_unref (record->priv->thumbnail); +- record->priv->thumbnail = g_byte_array_ref (g_value_get_pointer (value)); ++ record->priv->thumbnail = get_thumbnail (record->priv->thumbnail, value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); +@@ -154,7 +157,7 @@ grl_dpap_record_get_property (GObject *object, + g_value_set_static_string (value, record->priv->comments); + break; + case PROP_THUMBNAIL: +- g_value_set_pointer (value, record->priv->thumbnail); ++ set_thumbnail (value, record->priv->thumbnail); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); +@@ -169,7 +172,7 @@ grl_dpap_record_new (void) + } + + GInputStream * +-grl_dpap_record_read (DPAPRecord *record, GError **error) ++grl_dpap_record_read (DmapImageRecord *record, GError **error) + { + GFile *file; + GInputStream *stream; +@@ -215,9 +218,9 @@ grl_dpap_record_class_init (GrlDPAPRecordClass *klass) + static void + grl_dpap_record_dpap_iface_init (gpointer iface, gpointer data) + { +- DPAPRecordIface *dpap_record = iface; ++ DmapImageRecordInterface *dpap_record = iface; + +- g_assert (G_TYPE_FROM_INTERFACE (dpap_record) == DPAP_TYPE_RECORD); ++ g_assert (G_TYPE_FROM_INTERFACE (dpap_record) == DMAP_TYPE_IMAGE_RECORD); + + dpap_record->read = grl_dpap_record_read; + } +@@ -225,7 +228,7 @@ grl_dpap_record_dpap_iface_init (gpointer iface, gpointer data) + static void + grl_dpap_record_dmap_iface_init (gpointer iface, gpointer data) + { +- DMAPRecordIface *dmap_record = iface; ++ DmapRecordInterface *dmap_record = iface; + + g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD); + } +@@ -242,7 +245,7 @@ grl_dpap_record_finalize (GObject *object) + g_free (record->priv->comments); + + if (record->priv->thumbnail) +- g_byte_array_unref (record->priv->thumbnail); ++ unref_thumbnail (record->priv->thumbnail); + + G_OBJECT_CLASS (grl_dpap_record_parent_class)->finalize (object); + } +diff --git a/src/dmap/grl-dpap-record.h b/src/dmap/grl-dpap-record.h +index 203e57e..77eece0 100644 +--- a/src/dmap/grl-dpap-record.h ++++ b/src/dmap/grl-dpap-record.h +@@ -23,6 +23,8 @@ + + #include + ++#include "grl-dpap-compat.h" ++ + G_BEGIN_DECLS + + #define TYPE_SIMPLE_DPAP_RECORD (grl_dpap_record_get_type ()) +@@ -69,8 +71,8 @@ typedef struct { + GType grl_dpap_record_get_type (void); + + GrlDPAPRecord *grl_dpap_record_new (void); +-GInputStream *grl_dpap_record_read (DPAPRecord *record, GError **error); +-gint grl_dpap_record_get_id (DPAPRecord *record); ++GInputStream *grl_dpap_record_read (DmapImageRecord *record, GError **error); ++gint grl_dpap_record_get_id (DmapImageRecord *record); + + #endif /* __SIMPLE_DPAP_RECORD */ + +diff --git a/src/dmap/grl-dpap.c b/src/dmap/grl-dpap.c +index 9829ec2..6339654 100644 +--- a/src/dmap/grl-dpap.c ++++ b/src/dmap/grl-dpap.c +@@ -33,6 +33,7 @@ + #include + #include + ++#include "grl-dpap-compat.h" + #include "grl-common.h" + #include "grl-dpap.h" + #include "grl-dpap-db.h" +@@ -57,12 +58,12 @@ GRL_LOG_DOMAIN_STATIC (dmap_log_domain); + GrlDpapSourcePrivate)) + + struct _GrlDpapSourcePrivate { +- DMAPMdnsBrowserService *service; ++ DmapMdnsService *service; + }; + + /* --- Data types --- */ + +-static GrlDpapSource *grl_dpap_source_new (DMAPMdnsBrowserService *service); ++static GrlDpapSource *grl_dpap_source_new (DmapMdnsService *service); + + static void grl_dpap_source_finalize (GObject *object); + +@@ -79,16 +80,16 @@ static void grl_dpap_source_search (GrlSource *source, + GrlSourceSearchSpec *ss); + + +-static void grl_dpap_service_added_cb (DMAPMdnsBrowser *browser, +- DMAPMdnsBrowserService *service, ++static void grl_dpap_service_added_cb (DmapMdnsBrowser *browser, ++ DmapMdnsService *service, + GrlPlugin *plugin); + +-static void grl_dpap_service_removed_cb (DMAPMdnsBrowser *browser, ++static void grl_dpap_service_removed_cb (DmapMdnsBrowser *browser, + const gchar *service_name, + GrlPlugin *plugin); + + /* ===================== Globals ======================= */ +-static DMAPMdnsBrowser *browser; ++static DmapMdnsBrowser *browser; + /* Maps URIs to DBs */ + static GHashTable *connections; + /* Map DPAP services to Grilo media sources */ +@@ -111,7 +112,7 @@ grl_dpap_plugin_init (GrlRegistry *registry, + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + +- browser = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP); ++ browser = dmap_mdns_browser_new (DMAP_MDNS_SERVICE_TYPE_DPAP); + connections = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); + sources = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); + +@@ -158,8 +159,10 @@ GRL_PLUGIN_DEFINE (GRL_MAJOR, + G_DEFINE_TYPE_WITH_PRIVATE (GrlDpapSource, grl_dpap_source, GRL_TYPE_SOURCE) + + static GrlDpapSource * +-grl_dpap_source_new (DMAPMdnsBrowserService *service) ++grl_dpap_source_new (DmapMdnsService *service) + { ++ gchar *name; ++ gchar *service_name; + gchar *source_desc; + gchar *source_id; + +@@ -167,12 +170,14 @@ grl_dpap_source_new (DMAPMdnsBrowserService *service) + + GRL_DEBUG ("grl_dpap_source_new"); + +- source_desc = g_strdup_printf (SOURCE_DESC_TEMPLATE, service->name); +- source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, service->name); ++ name = grl_dmap_service_get_name (service); ++ service_name = grl_dmap_service_get_service_name (service); ++ source_desc = g_strdup_printf (SOURCE_DESC_TEMPLATE, name); ++ source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, name); + + source = g_object_new (GRL_DPAP_SOURCE_TYPE, + "source-id", source_id, +- "source-name", service->name, ++ "source-name", service_name, + "source-desc", source_desc, + "supported-media", GRL_SUPPORTED_MEDIA_IMAGE, + NULL); +@@ -181,6 +186,8 @@ grl_dpap_source_new (DMAPMdnsBrowserService *service) + + g_free (source_desc); + g_free (source_id); ++ g_free (service_name); ++ g_free (name); + + return source; + } +@@ -241,7 +248,7 @@ grl_dpap_do_search (ResultCbAndArgsAndDb *cb_and_db) + } + + static void +-browse_connected_cb (DMAPConnection *connection, ++browse_connected_cb (DmapConnection *connection, + gboolean result, + const char *reason, + ResultCbAndArgsAndDb *cb_and_db) +@@ -266,7 +273,7 @@ browse_connected_cb (DMAPConnection *connection, + } + + static void +-search_connected_cb (DMAPConnection *connection, ++search_connected_cb (DmapConnection *connection, + gboolean result, + const char *reason, + ResultCbAndArgsAndDb *cb_and_db) +@@ -291,8 +298,8 @@ search_connected_cb (DMAPConnection *connection, + } + + static void +-grl_dpap_service_added_cb (DMAPMdnsBrowser *browser, +- DMAPMdnsBrowserService *service, ++grl_dpap_service_added_cb (DmapMdnsBrowser *browser, ++ DmapMdnsService *service, + GrlPlugin *plugin) + { + GrlRegistry *registry = grl_registry_get_default (); +@@ -306,13 +313,16 @@ grl_dpap_service_added_cb (DMAPMdnsBrowser *browser, + GRL_SOURCE (source), + NULL); + if (source != NULL) { +- g_hash_table_insert (sources, g_strdup (service->name), g_object_ref (source)); ++ gchar *name; ++ name = grl_dmap_service_get_name (service); ++ g_hash_table_insert (sources, g_strdup (name), g_object_ref (source)); + g_object_remove_weak_pointer (G_OBJECT (source), (gpointer *) &source); ++ g_free (name); + } + } + + static void +-grl_dpap_service_removed_cb (DMAPMdnsBrowser *browser, ++grl_dpap_service_removed_cb (DmapMdnsBrowser *browser, + const gchar *service_name, + GrlPlugin *plugin) + { +@@ -328,14 +338,14 @@ grl_dpap_service_removed_cb (DMAPMdnsBrowser *browser, + } + + static void +-grl_dpap_connect (gchar *name, gchar *host, guint port, ResultCbAndArgsAndDb *cb_and_db, DMAPConnectionCallback callback) ++grl_dpap_connect (gchar *name, gchar *host, guint port, ResultCbAndArgsAndDb *cb_and_db, DmapConnectionFunc callback) + { +- DMAPRecordFactory *factory; +- DMAPConnection *connection; ++ DmapRecordFactory *factory; ++ DmapConnection *connection; + + factory = DMAP_RECORD_FACTORY (grl_dpap_record_factory_new ()); +- connection = DMAP_CONNECTION (dpap_connection_new (name, host, port, DMAP_DB (cb_and_db->db), factory)); +- dmap_connection_connect (connection, (DMAPConnectionCallback) callback, cb_and_db); ++ connection = DMAP_CONNECTION (dmap_image_connection_new (name, host, port, DMAP_DB (cb_and_db->db), factory)); ++ dmap_connection_start (connection, (DmapConnectionFunc) callback, cb_and_db); + } + + static gboolean +@@ -396,15 +406,25 @@ grl_dpap_source_browse (GrlSource *source, + browse_connected_cb (NULL, TRUE, NULL, cb_and_db); + } else { + /* Connect */ ++ gchar *name, *host; ++ guint port; ++ + cb_and_db->db = DMAP_DB (grl_dpap_db_new ()); + +- grl_dpap_connect (dmap_source->priv->service->name, +- dmap_source->priv->service->host, +- dmap_source->priv->service->port, ++ name = grl_dmap_service_get_name (dmap_source->priv->service); ++ host = grl_dmap_service_get_host (dmap_source->priv->service); ++ port = grl_dmap_service_get_port (dmap_source->priv->service); ++ ++ grl_dpap_connect (name, ++ host, ++ port, + cb_and_db, +- (DMAPConnectionCallback) browse_connected_cb); ++ (DmapConnectionFunc) browse_connected_cb); + + g_hash_table_insert (connections, g_strdup (url), cb_and_db->db); ++ ++ g_free (name); ++ g_free (host); + } + + g_free (url); +@@ -416,7 +436,7 @@ static void grl_dpap_source_search (GrlSource *source, + GrlDpapSource *dmap_source = GRL_DPAP_SOURCE (source); + + ResultCbAndArgsAndDb *cb_and_db; +- DMAPMdnsBrowserService *service = dmap_source->priv->service; ++ DmapMdnsService *service = dmap_source->priv->service; + gchar *url = grl_dmap_build_url (service); + + cb_and_db = g_new (ResultCbAndArgsAndDb, 1); +@@ -434,9 +454,25 @@ static void grl_dpap_source_search (GrlSource *source, + search_connected_cb (NULL, TRUE, NULL, cb_and_db); + } else { + /* Connect */ ++ gchar *name, *host; ++ guint port; ++ + cb_and_db->db = DMAP_DB (grl_dpap_db_new ()); +- grl_dpap_connect (service->name, service->host, service->port, cb_and_db, (DMAPConnectionCallback) search_connected_cb); ++ ++ name = grl_dmap_service_get_name (dmap_source->priv->service); ++ host = grl_dmap_service_get_host (dmap_source->priv->service); ++ port = grl_dmap_service_get_port (dmap_source->priv->service); ++ ++ grl_dpap_connect (name, ++ host, ++ port, ++ cb_and_db, ++ (DmapConnectionFunc) search_connected_cb); ++ + g_hash_table_insert (connections, g_strdup (url), cb_and_db->db); ++ ++ g_free (name); ++ g_free (host); + } + + g_free (url); +diff --git a/src/dmap/grl-dpap.h b/src/dmap/grl-dpap.h +index ee596b5..30cd61e 100644 +--- a/src/dmap/grl-dpap.h ++++ b/src/dmap/grl-dpap.h +@@ -26,6 +26,8 @@ + + #include + ++#include "grl-dpap-compat.h" ++ + #define GRL_DPAP_SOURCE_TYPE (grl_dpap_source_get_type ()) + + #define GRL_DPAP_SOURCE(obj) \ +diff --git a/src/dmap/meson.build b/src/dmap/meson.build +index 2907a80..817ff5d 100644 +--- a/src/dmap/meson.build ++++ b/src/dmap/meson.build +@@ -31,6 +31,15 @@ dpap_sources = [ + 'grl-dpap.h', + ] + ++args = [ ++ '-DG_LOG_DOMAIN="GrlDmap"', ++ '-DHAVE_CONFIG_H', ++] ++ ++if not libdmapsharing4_dep.found() ++ args += '-DLIBDMAPSHARING_COMPAT' ++endif ++ + configure_file(output: 'config.h', + configuration: cdata) + +@@ -39,17 +48,11 @@ shared_library('grldaap', + install: true, + install_dir: pluginsdir, + dependencies: must_deps + plugins[dmap_idx][REQ_DEPS] + plugins[dmap_idx][OPT_DEPS], +- c_args: [ +- '-DG_LOG_DOMAIN="GrlDmap"', +- '-DHAVE_CONFIG_H', +- ]) ++ c_args: args) + + shared_library('grldpap', + sources: dpap_sources, + install: true, + install_dir: pluginsdir, + dependencies: must_deps + plugins[dmap_idx][REQ_DEPS] + plugins[dmap_idx][OPT_DEPS], +- c_args: [ +- '-DG_LOG_DOMAIN="GrlDmap"', +- '-DHAVE_CONFIG_H', +- ]) ++ c_args: args) diff --git a/multimedia/grilo/Makefile b/multimedia/grilo/Makefile index 67e05f16..8e5d2870 100644 --- a/multimedia/grilo/Makefile +++ b/multimedia/grilo/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2009-2015 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -8,27 +6,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=grilo -PKG_VERSION:=0.3.4 -PKG_RELEASE:=1 - -PKG_MAINTAINER:=W. Michael Petullo - -PKG_LICENSE:=LGPLv2.1 -PKG_LICENSE_FILES:=COPYING +PKG_VERSION:=0.3.12 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNOME/grilo/0.3/ -PKG_HASH:=7c6964053b42574c2f14715d2392a02ea5cbace955eb73e067c77aa3e43b066e +PKG_HASH:=dbfbd6082103288592af97568180b9cc81a336a274ed5160412f87675ec11a71 -PKG_BUILD_DEPENDS:=glib2 libsoup libxml2 +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=vala/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk - -TARGET_LDFLAGS+= \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib +include ../../devel/meson/meson.mk define Package/grilo SECTION:=multimedia @@ -40,9 +34,17 @@ endef define Package/grilo/decription Grilo is a framework that provides access to different sources of - multimedia content, using a pluggable system. + multimedia content, using a pluggable system. endef +MESON_ARGS += \ + -Denable-grl-net=true \ + -Denable-grl-pls=false \ + -Denable-gtk-doc=false \ + -Denable-introspection=false \ + -Denable-test-ui=false \ + -Denable-vala=false + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ $(CP) \ @@ -56,13 +58,13 @@ define Build/InstallDev $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ $(1)/usr/lib/pkgconfig/ - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi/ + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/vala-`$(STAGING_DIR_HOSTPKG)/bin/valac --api-version`/vapi/ # Note: this are compiled elsewhere because grilo refuses to # generate VAPI files unless gobject-introspection exists; # OpenWrt does not yet have a gobject-introspection package. $(INSTALL_DATA) \ ./files/*.vapi \ - $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi + $(STAGING_DIR_HOSTPKG)/share/vala-`$(STAGING_DIR_HOSTPKG)/bin/valac --api-version`/vapi endef define Package/grilo/install diff --git a/multimedia/grilo/files/grilo-0.3.vapi b/multimedia/grilo/files/grilo-0.3.vapi index 6bcd1bdb..bb05dae4 100644 --- a/multimedia/grilo/files/grilo-0.3.vapi +++ b/multimedia/grilo/files/grilo-0.3.vapi @@ -1,264 +1,511 @@ -/* grilo-0.3.vapi generated by vapigen-0.30, do not modify. */ +/* grilo-0.3.vapi generated by vapigen-0.34, do not modify. */ [CCode (cprefix = "Grl", gir_namespace = "Grl", gir_version = "0.3", lower_case_cprefix = "grl_")] namespace Grl { [CCode (cheader_filename = "grilo.h", type_id = "grl_caps_get_type ()")] public class Caps : GLib.Object { [CCode (has_construct_function = false)] + [Version (since = "0.2.0")] public Caps (); + [Version (since = "0.2.0")] public unowned GLib.List get_key_filter (); + [Version (since = "0.2.0")] public unowned GLib.List get_key_range_filter (); + [Version (since = "0.2.0")] public Grl.TypeFilter get_type_filter (); + [Version (since = "0.2.0")] public bool is_key_filter (Grl.KeyID key); + [Version (since = "0.2.0")] public bool is_key_range_filter (Grl.KeyID key); + [Version (since = "0.2.0")] public void set_key_filter (GLib.List keys); + [Version (since = "0.2.0")] public void set_key_range_filter (GLib.List keys); + [Version (since = "0.2.0")] public void set_type_filter (Grl.TypeFilter filter); + [Version (since = "0.2.0")] public bool test_option (string key, GLib.Value value); } [CCode (cheader_filename = "grilo.h", type_id = "grl_config_get_type ()")] public class Config : GLib.Object { - [CCode (array_length = false, array_null_terminated = true)] - public weak void*[] _grl_reserved; + [CCode (array_length = false)] + public weak void* _grl_reserved[8]; [CCode (has_construct_function = false)] + [Version (since = "0.1.4")] public Config (string plugin, string? source); + [Version (since = "0.1.4")] public string get_api_key (); + [Version (since = "0.1.9")] public uint8 get_api_key_blob (size_t size); + [Version (since = "0.1.4")] public string get_api_secret (); + [Version (since = "0.1.4")] public string get_api_token (); + [Version (since = "0.2.6")] public string get_api_token_secret (); + [Version (since = "0.1.9")] public uint8 get_binary (string param, size_t? size); + [Version (since = "0.1.8")] public bool get_boolean (string param); + [Version (since = "0.1.5")] public float get_float (string param); + [Version (since = "0.1.5")] public int get_int (string param); + [Version (since = "0.1.8")] public string get_password (); + [Version (since = "0.1.4")] public string get_plugin (); public string get_source (); + [Version (since = "0.1.5")] public string get_string (string param); + [Version (since = "0.1.8")] public string get_username (); + [Version (since = "0.1.8")] public bool has_param (string param); + [Version (since = "0.1.5")] public void @set (string param, GLib.Value value); + [Version (since = "0.1.4")] public void set_api_key (string key); + [Version (since = "0.1.9")] public void set_api_key_blob (uint8 blob, size_t size); + [Version (since = "0.1.4")] public void set_api_secret (string secret); + [Version (since = "0.1.4")] public void set_api_token (string token); + [Version (since = "0.2.6")] public void set_api_token_secret (string secret); + [Version (since = "0.1.9")] public void set_binary (string param, uint8 blob, size_t size); + [Version (since = "0.1.8")] public void set_boolean (string param, bool value); + [Version (since = "0.1.5")] public void set_float (string param, float value); + [Version (since = "0.1.5")] public void set_int (string param, int value); + [Version (since = "0.1.8")] public void set_password (string password); + [Version (since = "0.1.4")] public void set_plugin (string plugin); + [Version (since = "0.1.4")] public void set_source (string source); + [Version (since = "0.1.5")] public void set_string (string param, string value); + [Version (since = "0.1.8")] public void set_username (string username); } [CCode (cheader_filename = "grilo.h", type_id = "grl_data_get_type ()")] public class Data : GLib.Object { - [CCode (array_length = false, array_null_terminated = true)] - public weak void*[] _grl_reserved; + [CCode (array_length = false)] + public weak void* _grl_reserved[8]; [CCode (has_construct_function = false)] + [Version (since = "0.1.4")] public Data (); + [Version (since = "0.1.10")] public void add_binary (Grl.KeyID key, uint8 buf, size_t size); + [Version (since = "0.2.0")] public void add_boxed (Grl.KeyID key, void* boxed); + [Version (since = "0.1.10")] public void add_float (Grl.KeyID key, float floatvalue); + [Version (since = "0.3.6")] + public bool add_for_id (string key_name, GLib.Value value); + [Version (since = "0.1.10")] public void add_int (Grl.KeyID key, int intvalue); + [Version (since = "0.2.12")] public void add_int64 (Grl.KeyID key, int64 intvalue); + [Version (since = "0.1.10")] public void add_related_keys (Grl.RelatedKeys relkeys); + [Version (since = "0.1.10")] public void add_string (Grl.KeyID key, string strvalue); + [Version (since = "0.1.10")] public Grl.Data dup (); + [Version (since = "0.1.4")] public unowned GLib.Value? @get (Grl.KeyID key); + [Version (since = "0.1.9")] public uint8 get_binary (Grl.KeyID key, out size_t size); + [Version (since = "0.2.3")] public bool get_boolean (Grl.KeyID key); + [Version (since = "0.2.0")] public void* get_boxed (Grl.KeyID key); + [Version (since = "0.1.5")] public float get_float (Grl.KeyID key); + [Version (since = "0.1.4")] public int get_int (Grl.KeyID key); + [Version (since = "0.2.12")] public int64 get_int64 (Grl.KeyID key); + [Version (since = "0.1.4")] public GLib.List get_keys (); + [Version (since = "0.1.10")] public unowned Grl.RelatedKeys get_related_keys (Grl.KeyID key, uint index); + [Version (since = "0.1.13")] public GLib.List get_single_values_for_key (Grl.KeyID key); + [Version (since = "0.1.13")] public GLib.List get_single_values_for_key_string (Grl.KeyID key); + [Version (since = "0.1.4")] public unowned string get_string (Grl.KeyID key); + [Version (since = "0.1.4")] public bool has_key (Grl.KeyID key); + [Version (since = "0.1.10")] public uint length (Grl.KeyID key); + [Version (since = "0.1.4")] public void remove (Grl.KeyID key); + [Version (since = "0.1.10")] public void remove_nth (Grl.KeyID key, uint index); + [Version (since = "0.1.4")] public void @set (Grl.KeyID key, GLib.Value value); + [Version (since = "0.1.9")] public void set_binary (Grl.KeyID key, uint8 buf, size_t size); + [Version (since = "0.2.3")] public void set_boolean (Grl.KeyID key, bool boolvalue); + [Version (since = "0.2.0")] public void set_boxed (Grl.KeyID key, void* boxed); + [Version (since = "0.1.5")] public void set_float (Grl.KeyID key, float floatvalue); + [Version (since = "0.3.6")] + public bool set_for_id (string key_name, GLib.Value value); + [Version (since = "0.1.4")] public void set_int (Grl.KeyID key, int intvalue); + [Version (since = "0.2.12")] public void set_int64 (Grl.KeyID key, int64 intvalue); + [Version (since = "0.1.10")] public void set_related_keys (Grl.RelatedKeys relkeys, uint index); + [Version (since = "0.1.4")] public void set_string (Grl.KeyID key, string strvalue); } - [CCode (cheader_filename = "grilo.h")] + [CCode (cheader_filename = "grilo.h", has_type_id = false)] [Compact] public class LogDomain { + [Version (since = "0.1.7")] public void free (); } [CCode (cheader_filename = "grilo.h", type_id = "grl_media_get_type ()")] public class Media : Grl.Data { [CCode (has_construct_function = false)] public Media (); + [Version (since = "0.3.0")] public void add_artist (string artist); + [Version (since = "0.1.10")] public void add_author (string author); + [Version (since = "0.3.0")] public void add_director (string director); + [Version (since = "0.1.10")] public void add_external_player (string player); + [Version (since = "0.1.10")] public void add_external_url (string url); + [Version (since = "0.3.0")] public void add_genre (string genre); + [Version (since = "0.2.3")] public void add_keyword (string keyword); + [Version (since = "0.3.0")] public void add_lyrics (string lyrics); + [Version (since = "0.3.0")] public void add_mb_artist_id (string mb_artist_id); + [Version (since = "0.3.0")] public void add_performer (string performer); + [Version (since = "0.3.0")] public void add_producer (string producer); + [Version (since = "0.2.3")] public void add_region_data (string region, GLib.DateTime publication_date, string certificate); + [Version (since = "0.1.10")] public void add_thumbnail (string thumbnail); + [Version (since = "0.1.10")] public void add_thumbnail_binary (uint8 thumbnail, size_t size); + [Version (since = "0.3.0")] public void add_url_data (string url, string mime, int bitrate, float framerate, int width, int height); [CCode (cname = "grl_media_audio_new", has_construct_function = false)] + [Version (since = "0.1.4")] public Media.audio_new (); [CCode (cname = "grl_media_container_new", has_construct_function = false)] + [Version (since = "0.3.0")] public Media.container_new (); + [Version (since = "0.3.0")] public unowned string get_album (); + [Version (since = "0.3.1")] + public unowned string get_album_artist (); + [Version (since = "0.3.1")] + public int get_album_disc_number (); + [Version (since = "0.3.0")] public unowned string get_artist (); + [Version (since = "0.3.0")] public unowned string get_artist_nth (uint index); + [Version (since = "0.1.4")] public unowned string get_author (); + [Version (since = "0.1.10")] public unowned string get_author_nth (uint index); + [Version (since = "0.3.0")] public int get_bitrate (); + [Version (since = "0.3.0")] public unowned string get_camera_model (); + [Version (since = "0.1.6")] public unowned string get_certificate (); + [Version (since = "0.3.0")] public int get_childcount (); + [Version (since = "0.3.1")] + public unowned string get_composer (); + [Version (since = "0.3.1")] + public unowned string get_composer_nth (uint index); + [Version (since = "0.2.0")] public unowned GLib.DateTime get_creation_date (); + [Version (since = "0.1.4")] public unowned string get_description (); + [Version (since = "0.3.0")] public unowned string get_director (); + [Version (since = "0.3.0")] public unowned string get_director_nth (uint index); + [Version (since = "0.1.4")] public int get_duration (); + [Version (since = "0.3.0")] public int get_episode (); + [Version (since = "0.3.0")] public unowned string get_episode_title (); + [Version (since = "0.3.0")] public float get_exposure_time (); + [Version (since = "0.1.6")] public unowned string get_external_url (); + [Version (since = "0.1.10")] public unowned string get_external_url_nth (uint index); + [Version (since = "0.2.3")] public bool get_favourite (); + [Version (since = "0.3.0")] public unowned string get_flash_used (); + [Version (since = "0.3.0")] public float get_framerate (); + [Version (since = "0.3.0")] public unowned string get_genre (); + [Version (since = "0.3.0")] public unowned string get_genre_nth (uint index); + [Version (since = "0.3.0")] public int get_height (); + [Version (since = "0.1.4")] public unowned string get_id (); + [Version (since = "0.3.0")] public float get_iso_speed (); + [Version (since = "0.2.3")] public unowned string get_keyword (); + [Version (since = "0.2.3")] public unowned string get_keyword_nth (uint index); + [Version (since = "0.3.0")] public GLib.DateTime get_last_played (); + [Version (since = "0.1.4")] public int get_last_position (); + [Version (since = "0.1.6")] public unowned string get_license (); + [Version (since = "0.3.0")] public unowned string get_lyrics (); + [Version (since = "0.3.0")] public unowned string get_lyrics_nth (uint index); + [Version (since = "0.3.0")] public unowned string get_mb_album_id (); + [Version (since = "0.3.0")] public unowned string get_mb_artist_id (); + [Version (since = "0.3.0")] public unowned string get_mb_artist_id_nth (uint index); + [Version (since = "0.3.0")] public unowned string get_mb_recording_id (); + [Version (since = "0.3.0")] public unowned string get_mb_track_id (); + [Version (since = "0.3.0")] public Grl.MediaType get_media_type (); + [Version (since = "0.1.4")] public unowned string get_mime (); + [Version (since = "0.2.0")] public unowned GLib.DateTime get_modification_date (); + [Version (since = "0.3.0")] public int get_orientation (); + [Version (since = "0.3.0")] public unowned string get_original_title (); + [Version (since = "0.3.0")] public unowned string get_performer (); + [Version (since = "0.3.0")] public unowned string get_performer_nth (uint index); + [Version (since = "0.1.4")] public int get_play_count (); + [Version (since = "0.1.6")] public unowned string get_player (); + [Version (since = "0.1.10")] public unowned string get_player_nth (uint index); + [Version (since = "0.3.0")] public unowned string get_producer (); + [Version (since = "0.3.0")] public unowned string get_producer_nth (uint index); + [Version (since = "0.2.0")] public unowned GLib.DateTime get_publication_date (); + [Version (since = "0.1.5")] public float get_rating (); + [Version (since = "0.2.3")] public unowned string get_region (); + [Version (since = "0.2.3")] public unowned string get_region_data (out unowned GLib.DateTime publication_date, out unowned string certificate); + [Version (since = "0.2.3")] public unowned string get_region_data_nth (uint index, out unowned GLib.DateTime publication_date, out unowned string certificate); + [Version (since = "0.3.0")] public int get_season (); + [Version (since = "0.3.0")] public unowned string get_show (); + [Version (since = "0.1.4")] public unowned string get_site (); + [Version (since = "0.2.10")] public int64 get_size (); + [Version (since = "0.1.4")] public unowned string get_source (); + [Version (since = "0.1.19")] public float get_start_time (); + [Version (since = "0.1.6")] public unowned string get_studio (); + [Version (since = "0.1.4")] public unowned string get_thumbnail (); + [Version (since = "0.1.9")] public uint8 get_thumbnail_binary (size_t size); + [Version (since = "0.1.10")] public uint8 get_thumbnail_binary_nth (size_t size, uint index); + [Version (since = "0.1.10")] public unowned string get_thumbnail_nth (uint index); + [Version (since = "0.1.4")] public unowned string get_title (); + [Version (since = "0.3.0")] public int get_track_number (); + [Version (since = "0.1.4")] public unowned string get_url (); + [Version (since = "0.3.0")] public unowned string get_url_data (out unowned string mime, out int bitrate, float framerate, int width, int height); + [Version (since = "0.3.0")] public unowned string get_url_data_nth (uint index, out unowned string mime, out int bitrate, float framerate, int width, int height); + [Version (since = "0.3.0")] public int get_width (); [CCode (cname = "grl_media_image_new", has_construct_function = false)] + [Version (since = "0.1.4")] public Media.image_new (); + [Version (since = "0.3.0")] public bool is_audio (); + [Version (since = "0.3.0")] public bool is_container (); + [Version (since = "0.3.0")] public bool is_image (); + [Version (since = "0.3.0")] public bool is_video (); + [Version (since = "0.1.6")] public string serialize (); + [Version (since = "0.3.0")] public void set_album (string album); + [Version (since = "0.3.1")] + public void set_album_artist (string album_artist); + [Version (since = "0.3.1")] + public void set_album_disc_number (int disc_number); + [Version (since = "0.3.0")] public void set_artist (string artist); + [Version (since = "0.1.4")] public void set_author (string author); + [Version (since = "0.3.0")] public void set_bitrate (int bitrate); + [Version (since = "0.3.0")] public void set_camera_model (string camera_model); + [Version (since = "0.1.6")] public void set_certificate (string certificate); + [Version (since = "0.3.0")] public void set_childcount (int childcount); + [Version (since = "0.3.1")] + public void set_composer (string composer); + [Version (since = "0.2.0")] public void set_creation_date (GLib.DateTime creation_date); + [Version (since = "0.1.4")] public void set_description (string description); + [Version (since = "0.3.0")] public void set_director (string director); + [Version (since = "0.1.4")] public void set_duration (int duration); + [Version (since = "0.3.0")] public void set_episode (int episode); + [Version (since = "0.3.0")] public void set_episode_title (string episode_title); + [Version (since = "0.3.0")] public void set_exposure_time (float exposure_time); + [Version (since = "0.1.6")] public void set_external_player (string player); + [Version (since = "0.1.6")] public void set_external_url (string url); + [Version (since = "0.2.3")] public void set_favourite (bool favourite); + [Version (since = "0.3.0")] public void set_flash_used (string flash_used); + [Version (since = "0.3.0")] public void set_framerate (float framerate); + [Version (since = "0.3.0")] public void set_genre (string genre); + [Version (since = "0.3.0")] public void set_height (int height); + [Version (since = "0.1.4")] public void set_id (string id); + [Version (since = "0.3.0")] public void set_iso_speed (float iso_speed); + [Version (since = "0.2.3")] public void set_keyword (string keyword); + [Version (since = "0.3.0")] public void set_last_played (GLib.DateTime last_played); + [Version (since = "0.1.4")] public void set_last_position (int last_position); + [Version (since = "0.1.6")] public void set_license (string license); + [Version (since = "0.3.0")] public void set_lyrics (string lyrics); + [Version (since = "0.3.0")] public void set_mb_album_id (string mb_album_id); + [Version (since = "0.3.0")] public void set_mb_artist_id (string mb_artist_id); + [Version (since = "0.3.0")] public void set_mb_recording_id (string mb_recording_id); + [Version (since = "0.3.0")] public void set_mb_track_id (string mb_track_id); + [Version (since = "0.1.4")] public void set_mime (string mime); + [Version (since = "0.2.0")] public void set_modification_date (GLib.DateTime modification_date); + [Version (since = "0.3.0")] public void set_orientation (int orientation); + [Version (since = "0.3.0")] public void set_original_title (string original_title); + [Version (since = "0.3.0")] public void set_performer (string performer); + [Version (since = "0.1.4")] public void set_play_count (int play_count); + [Version (since = "0.3.0")] public void set_producer (string producer); + [Version (since = "0.2.0")] public void set_publication_date (GLib.DateTime date); + [Version (since = "0.1.5")] public void set_rating (float rating, float max); + [Version (since = "0.2.3")] public void set_region (string region); + [Version (since = "0.2.3")] public void set_region_data (string region, GLib.DateTime publication_date, string certificate); + [Version (since = "0.3.0")] public void set_season (int season); + [Version (since = "0.3.0")] public void set_show (string show); + [Version (since = "0.1.4")] public void set_site (string site); + [Version (since = "0.2.10")] public void set_size (int64 size); + [Version (since = "0.1.4")] public void set_source (string source); + [Version (since = "0.1.6")] public void set_studio (string studio); + [Version (since = "0.1.4")] public void set_thumbnail (string thumbnail); + [Version (since = "0.1.9")] public void set_thumbnail_binary (uint8 thumbnail, size_t size); + [Version (since = "0.1.4")] public void set_title (string title); + [Version (since = "0.3.0")] public void set_track_number (int track_number); + [Version (since = "0.1.4")] public void set_url (string url); + [Version (since = "0.3.0")] public void set_url_data (string url, string mime, int bitrate, float framerate, int width, int height); + [Version (since = "0.3.0")] public void set_width (int width); + [Version (since = "0.1.6")] public static Grl.Media unserialize (string serial); [CCode (cname = "grl_media_video_new", has_construct_function = false)] + [Version (since = "0.1.4")] public Media.video_new (); [NoAccessorMethod] public Grl.MediaType media_type { get; set construct; } @@ -266,47 +513,69 @@ namespace Grl { [CCode (cheader_filename = "grilo.h", type_id = "grl_operation_options_get_type ()")] public class OperationOptions : GLib.Object { [CCode (has_construct_function = false)] + [Version (since = "0.2.0")] public OperationOptions (Grl.Caps? caps); + [Version (since = "0.2.0")] public Grl.OperationOptions copy (); + [Version (since = "0.2.0")] public int get_count (); + [Version (since = "0.2.0")] public unowned GLib.Value? get_key_filter (Grl.KeyID key); + [Version (since = "0.2.0")] public GLib.List get_key_filter_list (); + [Version (since = "0.2.0")] public void get_key_range_filter (Grl.KeyID key, out GLib.Value min_value, out GLib.Value max_value); + [Version (since = "0.2.0")] public GLib.List get_key_range_filter_list (); + [Version (since = "0.2.12")] public Grl.ResolutionFlags get_resolution_flags (); + [Version (since = "0.2.0")] public uint get_skip (); + [Version (since = "0.2.0")] public Grl.TypeFilter get_type_filter (); - public bool key_is_set (string key); + [Version (since = "0.2.0")] public bool obey_caps (Grl.Caps caps, out Grl.OperationOptions supported_options, out Grl.OperationOptions unsupported_options); + [Version (since = "0.2.0")] public bool set_count (int count); + [Version (since = "0.2.0")] public bool set_key_filter_dictionary (GLib.HashTable filters); + [Version (since = "0.2.0")] public bool set_key_filter_value (Grl.KeyID key, GLib.Value value); + [Version (since = "0.2.0")] public bool set_key_range_filter_value (Grl.KeyID key, GLib.Value? min_value, GLib.Value? max_value); + [Version (since = "0.2.12")] public bool set_resolution_flags (Grl.ResolutionFlags flags); + [Version (since = "0.2.0")] public bool set_skip (uint skip); + [Version (since = "0.2.0")] public bool set_type_filter (Grl.TypeFilter filter); } [CCode (cheader_filename = "grilo.h", type_id = "grl_plugin_get_type ()")] public class Plugin : GLib.Object { [CCode (has_construct_function = false)] protected Plugin (); + [Version (since = "0.2.0")] public unowned string get_author (); + [Version (since = "0.2.0")] public unowned string get_description (); + [Version (since = "0.2.0")] public unowned string get_filename (); + [Version (since = "0.2.0")] public unowned string get_id (); + [Version (since = "0.2.0")] public unowned string get_license (); + [Version (since = "0.3.0")] public unowned string get_module_name (); + [Version (since = "0.2.0")] public unowned string get_name (); + [Version (since = "0.2.0")] public unowned string get_site (); + [Version (since = "0.2.0")] public GLib.List get_sources (); + [Version (since = "0.2.0")] public unowned string get_version (); - public void register_keys (); - public void set_filename (string filename); - public void set_id (string id); - public void set_module (GLib.Module module); - public void set_module_name (string module_name); - public void unload (); [NoAccessorMethod] + [Version (since = "0.2.0")] public bool loaded { get; } } [CCode (cheader_filename = "grilo.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "grl_range_value_get_type ()")] @@ -325,62 +594,109 @@ namespace Grl { public class Registry : GLib.Object { [CCode (has_construct_function = false)] protected Registry (); + [Version (since = "0.3.0")] public bool activate_all_plugins (); + [Version (since = "0.3.0")] public bool activate_plugin_by_id (string plugin_id) throws GLib.Error; + [Version (since = "0.2.0")] public bool add_config (owned Grl.Config config) throws GLib.Error; + [Version (since = "0.2.0")] public bool add_config_from_file (string config_file) throws GLib.Error; + [Version (since = "0.2.8")] public bool add_config_from_resource (string resource_path) throws GLib.Error; + [Version (since = "0.2.0")] public void add_directory (string path); + [Version (since = "0.2.0")] public static unowned Grl.Registry get_default (); + [Version (since = "0.2.0")] public GLib.List get_metadata_keys (); + [Version (since = "0.2.0")] public GLib.List get_plugins (bool only_loaded); + [Version (since = "0.2.0")] public GLib.List get_sources (bool ranked); + [Version (since = "0.2.0")] public GLib.List get_sources_by_operations (Grl.SupportedOps ops, bool ranked); + [Version (since = "0.2.0")] public bool load_all_plugins (bool activate) throws GLib.Error; + [Version (since = "0.2.0")] public bool load_plugin (string library_filename) throws GLib.Error; + [Version (since = "0.2.0")] public bool load_plugin_directory (string path) throws GLib.Error; + [Version (since = "0.2.0")] public Grl.KeyID lookup_metadata_key (string key_name); + [Version (since = "0.2.0")] public unowned string lookup_metadata_key_desc (Grl.KeyID key); + [Version (since = "0.2.0")] public unowned string lookup_metadata_key_name (Grl.KeyID key); + [Version (since = "0.2.0")] public unowned GLib.List lookup_metadata_key_relation (Grl.KeyID key); + [Version (since = "0.2.0")] public GLib.Type lookup_metadata_key_type (Grl.KeyID key); + [Version (since = "0.2.0")] public unowned Grl.Plugin lookup_plugin (string plugin_id); + [Version (since = "0.2.0")] public unowned Grl.Source lookup_source (string source_id); + [Version (since = "0.2.0")] public bool metadata_key_validate (Grl.KeyID key, GLib.Value value); + [Version (since = "0.3.0")] public Grl.KeyID register_metadata_key (owned GLib.ParamSpec param_spec, Grl.KeyID bind_key) throws GLib.Error; - public Grl.KeyID register_metadata_key_system (GLib.ParamSpec param_spec, Grl.KeyID key, Grl.KeyID bind_key) throws GLib.Error; + [Version (since = "0.2.0")] public bool register_source (Grl.Plugin plugin, owned Grl.Source source) throws GLib.Error; - public void restrict_plugins (string plugins); - public void shutdown (); + [Version (since = "0.2.0")] public bool unload_plugin (string plugin_id) throws GLib.Error; + [Version (since = "0.2.0")] public bool unregister_source (Grl.Source source) throws GLib.Error; + [Version (since = "0.2.10")] public signal void metadata_key_added (string key); + [Version (since = "0.2.0")] public signal void source_added (Grl.Source source); + [Version (since = "0.2.0")] public signal void source_removed (Grl.Source source); } [CCode (cheader_filename = "grilo.h", type_id = "grl_related_keys_get_type ()")] public class RelatedKeys : GLib.Object { [CCode (has_construct_function = false)] + [Version (since = "0.1.10")] public RelatedKeys (); + [Version (since = "0.1.10")] public Grl.RelatedKeys dup (); + [Version (since = "0.1.10")] public unowned GLib.Value? @get (Grl.KeyID key); + [Version (since = "0.1.10")] public uint8 get_binary (Grl.KeyID key, out size_t size); + [Version (since = "0.2.3")] public bool get_boolean (Grl.KeyID key); + [Version (since = "0.2.0")] public void* get_boxed (Grl.KeyID key); + [Version (since = "0.1.10")] public float get_float (Grl.KeyID key); + [Version (since = "0.1.10")] public int get_int (Grl.KeyID key); + [Version (since = "0.2.12")] public int64 get_int64 (Grl.KeyID key); + [Version (since = "0.1.13")] public GLib.List get_keys (); + [Version (since = "0.1.10")] public unowned string get_string (Grl.KeyID key); + [Version (since = "0.1.10")] public bool has_key (Grl.KeyID key); + [Version (since = "0.2.3")] public void remove (Grl.KeyID key); + [Version (since = "0.1.10")] public void @set (Grl.KeyID key, GLib.Value value); + [Version (since = "0.1.10")] public void set_binary (Grl.KeyID key, uint8 buf, size_t size); + [Version (since = "0.2.3")] public void set_boolean (Grl.KeyID key, bool booleanvalue); + [Version (since = "0.2.0")] public void set_boxed (Grl.KeyID key, void* boxed); + [Version (since = "0.1.10")] public void set_float (Grl.KeyID key, float floatvalue); + [Version (since = "0.1.10")] public void set_int (Grl.KeyID key, int intvalue); + [Version (since = "0.2.12")] public void set_int64 (Grl.KeyID key, int64 intvalue); + [Version (since = "0.1.10")] public void set_string (Grl.KeyID key, string strvalue); } [CCode (cheader_filename = "grilo.h", type_id = "grl_source_get_type ()")] @@ -389,88 +705,135 @@ namespace Grl { protected Source (); [NoWrapper] public virtual void browse (Grl.SourceBrowseSpec bs); + [Version (since = "0.2.0")] public GLib.List browse_sync (Grl.Media? container, GLib.List keys, Grl.OperationOptions options) throws GLib.Error; [NoWrapper] public virtual void cancel (uint operation_id); [CCode (cname = "grl_source_browse")] + [Version (since = "0.2.0")] public uint do_browse (Grl.Media? container, GLib.List keys, Grl.OperationOptions options, Grl.SourceResultCb callback); [CCode (cname = "grl_source_query")] + [Version (since = "0.2.0")] public uint do_query (string query, GLib.List keys, Grl.OperationOptions options, Grl.SourceResultCb callback); [CCode (cname = "grl_source_remove")] + [Version (since = "0.2.0")] public void do_remove (Grl.Media media, Grl.SourceRemoveCb callback); [CCode (cname = "grl_source_resolve")] - public uint do_resolve (Grl.Media? media, GLib.List keys, Grl.OperationOptions options, Grl.SourceResolveCb callback); + [Version (since = "0.2.0")] + public uint do_resolve (owned Grl.Media? media, GLib.List keys, Grl.OperationOptions options, Grl.SourceResolveCb callback); [CCode (cname = "grl_source_search")] + [Version (since = "0.2.0")] public uint do_search (string text, GLib.List keys, Grl.OperationOptions options, Grl.SourceResultCb callback); [CCode (cname = "grl_source_store")] + [Version (since = "0.3.0")] public void do_store (Grl.Media? parent, Grl.Media media, Grl.WriteFlags flags, Grl.SourceStoreCb callback); [CCode (cname = "grl_source_store_metadata")] + [Version (since = "0.2.0")] public void do_store_metadata (Grl.Media media, GLib.List? keys, Grl.WriteFlags flags, Grl.SourceStoreCb callback); + [Version (since = "0.2.0")] public uint get_auto_split_threshold (); + [Version (since = "0.2.0")] public virtual unowned Grl.Caps get_caps (Grl.SupportedOps operation); + [Version (since = "0.2.0")] public unowned string get_description (); + [Version (since = "0.2.8")] public unowned GLib.Icon get_icon (); + [Version (since = "0.2.0")] public unowned string get_id (); + [Version (since = "0.2.0")] public uint get_media_from_uri (string uri, GLib.List keys, Grl.OperationOptions options, Grl.SourceResolveCb callback); + [Version (since = "0.2.0")] public Grl.Media get_media_from_uri_sync (string uri, GLib.List keys, Grl.OperationOptions options) throws GLib.Error; + [Version (since = "0.2.0")] public unowned string get_name (); + [Version (since = "0.2.0")] public unowned Grl.Plugin get_plugin (); + [Version (since = "0.2.0")] public int get_rank (); + [Version (since = "0.3.0")] public Grl.SupportedMedia get_supported_media (); [CCode (cname = "grl_source_supported_operations")] + [Version (since = "0.2.0")] public uint get_supported_operations (); [CCode (array_length = false, array_null_terminated = true)] + [Version (since = "0.2.10")] public unowned string[] get_tags (); + [Version (since = "0.2.0")] public virtual bool may_resolve (Grl.Media media, Grl.KeyID key_id, GLib.List missing_keys); [NoWrapper] public virtual void media_from_uri (Grl.SourceMediaFromUriSpec mfus); + [Version (since = "0.2.0")] public void notify_change (Grl.Media? media, Grl.SourceChangeType change_type, bool location_unknown); + [Version (since = "0.2.0")] public void notify_change_list (owned GLib.GenericArray changed_medias, Grl.SourceChangeType change_type, bool location_unknown); + [Version (since = "0.2.0")] public virtual bool notify_change_start () throws GLib.Error; + [Version (since = "0.2.0")] public virtual bool notify_change_stop () throws GLib.Error; [NoWrapper] public virtual void query (Grl.SourceQuerySpec qs); + [Version (since = "0.2.0")] public GLib.List query_sync (string query, GLib.List keys, Grl.OperationOptions options) throws GLib.Error; [NoWrapper] public virtual void remove (Grl.SourceRemoveSpec rs); + [Version (since = "0.2.0")] public void remove_sync (Grl.Media media) throws GLib.Error; [NoWrapper] public virtual void resolve (Grl.SourceResolveSpec ms); - public Grl.Media resolve_sync (Grl.Media? media, GLib.List keys, Grl.OperationOptions options) throws GLib.Error; + [Version (since = "0.2.0")] + public Grl.Media resolve_sync (owned Grl.Media? media, GLib.List keys, Grl.OperationOptions options) throws GLib.Error; [NoWrapper] public virtual void search (Grl.SourceSearchSpec ss); + [Version (since = "0.2.0")] public GLib.List search_sync (string text, GLib.List keys, Grl.OperationOptions options) throws GLib.Error; + [Version (since = "0.2.0")] public void set_auto_split_threshold (uint threshold); + [Version (since = "0.2.0")] public virtual unowned GLib.List slow_keys (); [NoWrapper] public virtual void store (Grl.SourceStoreSpec ss); [NoWrapper] public virtual void store_metadata (Grl.SourceStoreMetadataSpec sms); + [Version (since = "0.2.0")] public GLib.List store_metadata_sync (Grl.Media media, GLib.List? keys, Grl.WriteFlags flags) throws GLib.Error; + [Version (since = "0.3.0")] public void store_sync (Grl.Media? parent, Grl.Media media, Grl.WriteFlags flags) throws GLib.Error; + [Version (since = "0.2.0")] public virtual unowned GLib.List supported_keys (); [NoWrapper] public virtual Grl.SupportedOps supported_operations (); + [Version (since = "0.2.0")] public virtual bool test_media_from_uri (string uri); + [Version (since = "0.2.0")] public virtual unowned GLib.List writable_keys (); + [Version (since = "0.2.0")] public uint auto_split_threshold { get; set; } [NoAccessorMethod] + [Version (since = "0.2.0")] public Grl.Plugin plugin { owned get; set construct; } [NoAccessorMethod] + [Version (since = "0.2.0")] public int rank { get; set construct; } [NoAccessorMethod] + [Version (since = "0.2.0")] public string source_desc { owned get; set construct; } [NoAccessorMethod] + [Version (since = "0.2.8")] public GLib.Icon source_icon { owned get; set construct; } [NoAccessorMethod] + [Version (since = "0.2.0")] public string source_id { owned get; set construct; } [NoAccessorMethod] + [Version (since = "0.2.0")] public string source_name { owned get; set construct; } [CCode (array_length = false, array_null_terminated = true)] [NoAccessorMethod] + [Version (since = "0.2.10")] public string[] source_tags { owned get; set construct; } [NoAccessorMethod] + [Version (since = "0.2.3")] public Grl.SupportedMedia supported_media { get; set construct; } + [Version (since = "0.2.0")] public signal void content_changed (GLib.GenericArray changed_medias, Grl.SourceChangeType change_type, bool location_unknown); } [CCode (cheader_filename = "grilo.h")] @@ -589,6 +952,12 @@ namespace Grl { public static Grl.KeyID MB_RECORDING_ID; [CCode (cname = "GRL_METADATA_KEY_AUDIO_TRACK")] public static Grl.KeyID AUDIO_TRACK; + [CCode (cname = "GRL_METADATA_KEY_ALBUM_DISC_NUMBER")] + public static Grl.KeyID ALBUM_DISC_NUMBER; + [CCode (cname = "GRL_METADATA_KEY_COMPOSER")] + public static Grl.KeyID COMPOSER; + [CCode (cname = "GRL_METADATA_KEY_ALBUM_ARTIST")] + public static Grl.KeyID ALBUM_ARTIST; [CCode (cname = "GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN")] public static uint CHILDCOUNT_UNKNOWN; [CCode (cname = "GRL_SOURCE_REMAINING_UNKNOWN")] @@ -712,6 +1081,7 @@ namespace Grl { LAST } [CCode (cheader_filename = "grilo.h", cprefix = "GRL_MEDIA_SERIALIZE_", type_id = "grl_media_serialize_type_get_type ()")] + [Version (since = "0.2.3")] public enum MediaSerializeType { BASIC, PARTIAL, @@ -787,8 +1157,6 @@ namespace Grl { FULL } [CCode (cheader_filename = "grilo.h", has_target = false)] - public delegate void OperationCancelCb (void* data); - [CCode (cheader_filename = "grilo.h", has_target = false)] public delegate void PluginDeinitFunc (Grl.Plugin plugin); [CCode (cheader_filename = "grilo.h", has_target = false)] public delegate void PluginRegisterKeysFunc (Grl.Registry registry, Grl.Plugin plugin); @@ -824,6 +1192,10 @@ namespace Grl { public const string KEYID_FORMAT; [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_ALBUM")] public const int METADATA_KEY_ALBUM; + [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_ALBUM_ARTIST")] + public const int METADATA_KEY_ALBUM_ARTIST; + [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_ALBUM_DISC_NUMBER")] + public const int METADATA_KEY_ALBUM_DISC_NUMBER; [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_ARTIST")] public const int METADATA_KEY_ARTIST; [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_AUDIO_TRACK")] @@ -840,6 +1212,8 @@ namespace Grl { public const int METADATA_KEY_CHILDCOUNT; [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN")] public const int METADATA_KEY_CHILDCOUNT_UNKNOWN; + [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_COMPOSER")] + public const int METADATA_KEY_COMPOSER; [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_CREATION_DATE")] public const int METADATA_KEY_CREATION_DATE; [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_DESCRIPTION")] @@ -940,18 +1314,6 @@ namespace Grl { public const int METADATA_KEY_URL; [CCode (cheader_filename = "grilo.h", cname = "GRL_METADATA_KEY_WIDTH")] public const int METADATA_KEY_WIDTH; - [CCode (cheader_filename = "grilo.h", cname = "GRL_OPERATION_OPTION_COUNT")] - public const string OPERATION_OPTION_COUNT; - [CCode (cheader_filename = "grilo.h", cname = "GRL_OPERATION_OPTION_KEY_EQUAL_FILTER")] - public const string OPERATION_OPTION_KEY_EQUAL_FILTER; - [CCode (cheader_filename = "grilo.h", cname = "GRL_OPERATION_OPTION_KEY_RANGE_FILTER")] - public const string OPERATION_OPTION_KEY_RANGE_FILTER; - [CCode (cheader_filename = "grilo.h", cname = "GRL_OPERATION_OPTION_RESOLUTION_FLAGS")] - public const string OPERATION_OPTION_RESOLUTION_FLAGS; - [CCode (cheader_filename = "grilo.h", cname = "GRL_OPERATION_OPTION_SKIP")] - public const string OPERATION_OPTION_SKIP; - [CCode (cheader_filename = "grilo.h", cname = "GRL_OPERATION_OPTION_TYPE_FILTER")] - public const string OPERATION_OPTION_TYPE_FILTER; [CCode (cheader_filename = "grilo.h", cname = "GRL_PADDING")] public const int PADDING; [CCode (cheader_filename = "grilo.h", cname = "GRL_PADDING_SMALL")] @@ -977,8 +1339,10 @@ namespace Grl { [CCode (cheader_filename = "grilo.h", cname = "GRL_SOURCE_REMAINING_UNKNOWN")] public const int SOURCE_REMAINING_UNKNOWN; [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.2.0")] public static GLib.DateTime date_time_from_iso8601 (string date); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.2.8")] public static void deinit (); [CCode (cheader_filename = "grilo.h")] public static GLib.Value? g_value_dup (GLib.Value value); @@ -991,43 +1355,42 @@ namespace Grl { [CCode (cheader_filename = "grilo.h")] public static GLib.Value? g_value_new (GLib.Type g_type); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.1.6")] public static void init ([CCode (array_length_cname = "argc", array_length_pos = 0.5)] ref unowned string[]? argv); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.1.6")] public static GLib.OptionGroup init_get_option_group (); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.1.7")] public static void log_configure (string config); [CCode (cheader_filename = "grilo.h")] - public static void marshal_VOID__BOXED_ENUM_BOOLEAN (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); - [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.1.6")] public static unowned string metadata_key_get_desc (Grl.KeyID key); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.1.6")] public static unowned string metadata_key_get_name (Grl.KeyID key); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.2.0")] public static GLib.Type metadata_key_get_type (Grl.KeyID key); [CCode (cheader_filename = "grilo.h")] - public static void metadata_key_setup_system_keys (Grl.Registry registry); - [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.2.0")] public static void multiple_get_media_from_uri (string uri, GLib.List keys, Grl.OperationOptions options, Grl.SourceResolveCb callback); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.2.0")] public static uint multiple_search (GLib.List? sources, string text, GLib.List keys, Grl.OperationOptions options, Grl.SourceResultCb callback); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.2.0")] public static GLib.List multiple_search_sync (GLib.List? sources, string text, GLib.List keys, Grl.OperationOptions options) throws GLib.Error; [CCode (cheader_filename = "grilo.h")] public static void operation_cancel (uint operation_id); [CCode (cheader_filename = "grilo.h")] - public static uint operation_generate_id (); - [CCode (cheader_filename = "grilo.h")] public static void* operation_get_data (uint operation_id); [CCode (cheader_filename = "grilo.h")] - public static void operation_init (); - [CCode (cheader_filename = "grilo.h")] - public static void operation_remove (uint operation_id); - [CCode (cheader_filename = "grilo.h")] public static void operation_set_data (uint operation_id, void* user_data); [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.2.7")] public static void operation_set_data_full (uint operation_id, void* user_data, GLib.DestroyNotify? destroy_func); [CCode (cheader_filename = "grilo.h")] - public static void operation_set_private_data (uint operation_id, void* private_data, [CCode (destroy_notify_pos = 3.1)] owned Grl.OperationCancelCb cancel_cb); - [CCode (cheader_filename = "grilo.h")] + [Version (since = "0.1.6")] public static void paging_translate (uint skip, uint count, uint max_page_size, uint page_size, uint page_number, uint internal_offset); } diff --git a/multimedia/grilo/files/grilo-net-0.3.vapi b/multimedia/grilo/files/grilo-net-0.3.vapi index b5f6cef9..b3c962db 100644 --- a/multimedia/grilo/files/grilo-net-0.3.vapi +++ b/multimedia/grilo/files/grilo-net-0.3.vapi @@ -1,4 +1,4 @@ -/* grilo-net-0.3.vapi generated by vapigen-0.30, do not modify. */ +/* grilo-net-0.3.vapi generated by vapigen-0.34, do not modify. */ [CCode (cprefix = "GrlNet", gir_namespace = "GrlNet", gir_version = "0.3", lower_case_cprefix = "grl_net_")] namespace GrlNet { @@ -8,12 +8,16 @@ namespace GrlNet { public Wc (); public static GLib.Quark error_quark (); public void flush_delayed_requests (); - public async bool request_async (string uri, GLib.Cancellable? cancellable, out unowned string content, out size_t length) throws GLib.Error; + public async bool request_async (string uri, GLib.Cancellable? cancellable, [CCode (array_length_cname = "length", array_length_pos = 2.1, array_length_type = "gsize")] out uint8[] content) throws GLib.Error; [CCode (finish_name = "grl_net_wc_request_finish")] - public async bool request_with_headers_async (string uri, GLib.Cancellable? cancellable, ..., out unowned string content, out size_t length) throws GLib.Error; + [Version (since = "0.2.2")] + public async bool request_with_headers_async (string uri, GLib.Cancellable? cancellable, ..., [CCode (array_length_cname = "length", array_length_pos = 2.1, array_length_type = "gsize")] out uint8[] content) throws GLib.Error; [CCode (finish_name = "grl_net_wc_request_finish")] - public async bool request_with_headers_hash_async (string uri, GLib.HashTable? headers, GLib.Cancellable? cancellable, out unowned string content, out size_t length) throws GLib.Error; + [Version (since = "0.2.2")] + public async bool request_with_headers_hash_async (string uri, GLib.HashTable? headers, GLib.Cancellable? cancellable, [CCode (array_length_cname = "length", array_length_pos = 2.1, array_length_type = "gsize")] out uint8[] content) throws GLib.Error; + [Version (since = "0.1.12")] public void set_cache (bool use_cache); + [Version (since = "0.1.12")] public void set_cache_size (uint cache_size); public void set_log_level (uint log_level); public void set_throttling (uint throttling); diff --git a/multimedia/gst1-libav/Makefile b/multimedia/gst1-libav/Makefile index d6336b0c..b4ae09a7 100644 --- a/multimedia/gst1-libav/Makefile +++ b/multimedia/gst1-libav/Makefile @@ -8,24 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gst1-libav -PKG_VERSION:=1.16.2 +PKG_VERSION:=1.17.1 PKG_RELEASE:=1 -PKG_MAINTAINER:=W. Michael Petullo \ - Ted Hess - PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-libav -PKG_HASH:=c724f612700c15a933c7356fbeabb0bb9571fb5538f8b1b54d4d2d94188deef2 - -PKG_LICENSE:=GPL-2.0 LGPL-2.0 -PKG_LICENSE_FILES:=COPYING COPYING.LIB - +PKG_HASH:=9d8d73a7944f776199c7648b3b7330f940b10dc4e08a6509185ae43cb456cb1f PKG_BUILD_DIR:=$(BUILD_DIR)/gst-libav-$(PKG_VERSION) +PKG_MAINTAINER:=W. Michael Petullo \ + Ted Hess +PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later +PKG_LICENSE_FILES:=COPYING COPYING.LIB + PKG_FIXUP:=autoreconf PKG_INSTALL:=1 - PKG_USE_MIPS16:=0 GST_VERSION:=1.0 @@ -111,6 +108,7 @@ PKG_CONFIG_DEPENDS:= \ include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +include ../../devel/meson/meson.mk define Package/gst1-libav SECTION:=multimedia @@ -119,7 +117,7 @@ define Package/gst1-libav URL:=https://www.gstreamer.net/modules/gst-libav.html DEPENDS:= +libgstreamer1 +gstreamer1-plugins-base \ +gst1-mod-alsa +libgst1audio +libgst1pbutils +libgst1video \ - +libbz2 +liblzma + +libbz2 +liblzma +libffmpeg-full endef define Package/gst1-libav/description diff --git a/multimedia/gst1-plugins-bad/Makefile b/multimedia/gst1-plugins-bad/Makefile index ea29e1ea..227b74be 100644 --- a/multimedia/gst1-plugins-bad/Makefile +++ b/multimedia/gst1-plugins-bad/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gst1-plugins-bad -PKG_VERSION:=1.16.2 +PKG_VERSION:=1.17.1 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-bad-$(PKG_VERSION) PKG_SOURCE:=gst-plugins-bad-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-bad/ -PKG_HASH:=f1cb7aa2389569a5343661aae473f0a940a90b872001824bc47fa8072a041e74 +PKG_HASH:=598937c818d0955543318203faa28d826eb68d487934be4737e999ad272210d0 PKG_MAINTAINER:=W. Michael Petullo \ Ted Hess @@ -97,6 +97,7 @@ GST_COND_SELECT = -D$(1)=$(if $(CONFIG_PACKAGE_gst1-mod-$(1)),en,dis)abled GST_VERSION:=1.0 MESON_ARGS += \ + $(call GST_COND_SELECT,accurip) \ $(call GST_COND_SELECT,adpcmdec) \ $(call GST_COND_SELECT,adpcmenc) \ $(call GST_COND_SELECT,aiff) \ @@ -111,6 +112,7 @@ MESON_ARGS += \ -Dcamerabin2=$(if $(CONFIG_PACKAGE_gst1-mod-camerabin),en,dis)abled \ $(call GST_COND_SELECT,coloreffects) \ -Ddebugutils=$(if $(CONFIG_PACKAGE_gst1-mod-debugutilsbad),en,dis)abled \ + $(call GST_COND_SELECT,dvbsubenc) \ $(call GST_COND_SELECT,dvbsuboverlay) \ $(call GST_COND_SELECT,dvdspu) \ $(call GST_COND_SELECT,faceoverlay) \ @@ -148,6 +150,7 @@ MESON_ARGS += \ $(call GST_COND_SELECT,smooth) \ $(call GST_COND_SELECT,speed) \ $(call GST_COND_SELECT,subenc) \ + $(call GST_COND_SELECT,switchbin) \ $(call GST_COND_SELECT,timecode) \ -Dvideofilters=$(if $(CONFIG_PACKAGE_gst1-mod-videofiltersbad),en,dis)abled \ $(call GST_COND_SELECT,videoframe_audiolevel) \ @@ -155,13 +158,13 @@ MESON_ARGS += \ $(call GST_COND_SELECT,videosignal) \ $(call GST_COND_SELECT,vmnc) \ -Dy4m=$(if $(CONFIG_PACKAGE_gst1-mod-y4mdec),en,dis)abled \ - $(call GST_COND_SELECT,yadif) \ \ -Dopencv=disabled \ -Dwayland=disabled \ -Dx11=disabled \ \ -Daom=disabled \ + -Davtp=disabled \ -Dandroidmedia=disabled \ -Dapplemedia=disabled \ -Dassrender=disabled \ @@ -174,6 +177,7 @@ MESON_ARGS += \ -Dcurl=disabled \ -Dcurl-ssh2=disabled \ -Dd3dvideosink=disabled \ + -Dd3d11=disabled \ -Ddash=disabled \ -Ddc1394=disabled \ -Ddecklink=disabled \ @@ -194,18 +198,20 @@ MESON_ARGS += \ -Dipcpipeline=disabled \ -Diqa=disabled \ -Dkate=disabled \ + -Dkms=disabled \ -Dladspa=disabled \ -Dlibde265=disabled \ -Dlibmms=disabled \ -Dlv2=disabled \ + -Dmediafoundation=disabled \ + -Dmicrodns=disabled \ -Dmodplug=disabled \ -Dmpeg2enc=disabled \ -Dmplex=disabled \ -Dmsdk=disabled \ -Dmusepack=disabled \ -Dneon=disabled \ - -Dnvdec=disabled \ - -Dnvenc=disabled \ + -Dnvcodec=disabled \ -Dofa=disabled \ -Dopenal=disabled \ -Dopenexr=disabled \ @@ -220,6 +226,7 @@ MESON_ARGS += \ -Drtmp=disabled \ $(call GST_COND_SELECT,sbc) \ -Dsctp=disabled \ + $(call GST_COND_SELECT,shm) \ -Dsmoothstreaming=disabled \ $(call GST_COND_SELECT,sndfile) \ -Dsoundtouch=disabled \ @@ -230,11 +237,11 @@ MESON_ARGS += \ -Dtinyalsa=disabled \ -Dttml=disabled \ -Duvch264=disabled \ - -Dvdpau=disabled \ -Dvoaacenc=disabled \ -Dvoamrwbenc=disabled \ -Dvulkan=disabled \ -Dwasapi=disabled \ + -Dwasapi2=disabled \ $(call GST_COND_SELECT,webp) \ -Dwebrtc=disabled \ -Dwebrtcdsp=disabled \ @@ -243,7 +250,10 @@ MESON_ARGS += \ -Dwinscreencap=disabled \ -Dx265=disabled \ -Dzbar=disabled \ + -Dzxing=disabled \ -Dwpe=disabled \ + -Dmagicleap=disabled \ + -Dv4l2codecs=disabled \ \ $(call GST_COND_SELECT,hls) \ -Dhls-crypto=nettle \ @@ -253,7 +263,9 @@ MESON_ARGS += \ -Dorc=disabled \ -Dgobject-cast-checks=disabled \ -Dglib-asserts=disabled \ - -Dglib-checks=disabled + -Dglib-checks=disabled \ + -Dextra-checks=disabled \ + -Ddoc=disabled define Package/gst1-plugins-bad/install /bin/true @@ -343,18 +355,13 @@ $(eval $(call GstBuildPlugin,audiomixmatrix,audiomixmatrix support,audio,,)) $(eval $(call GstBuildPlugin,audiovisualizers,audiovisualizers support,audio,,)) $(eval $(call GstBuildPlugin,autoconvert,autoconvert support,,,)) $(eval $(call GstBuildPlugin,bayer,bayer support,video,,)) -$(eval $(call GstBuildPlugin,bluez,bluez support,,,+bluez-libs)) -$(eval $(call GstBuildPlugin,bz2,bzip2 support,,,+libbz2)) $(eval $(call GstBuildPlugin,camerabin,camerabin support,basecamerabinsrc photography pbutils app,,)) $(eval $(call GstBuildPlugin,coloreffects,coloreffects support,video,,)) -#$(eval $(call GstBuildPlugin,dataurisrc,dataurisrc support,,,)) $(eval $(call GstBuildPlugin,debugutilsbad,debugutils support,video,,)) -$(eval $(call GstBuildPlugin,dtls,DTLS support,,,+libopenssl)) +$(eval $(call GstBuildPlugin,dvbsubenc,dvbsubenc support,video,,)) $(eval $(call GstBuildPlugin,dvbsuboverlay,dvbsuboverlay support,video,,)) $(eval $(call GstBuildPlugin,dvdspu,dvdspu support,video,,)) -$(eval $(call GstBuildPlugin,faad,faad support,audio,,+libfaad2)) $(eval $(call GstBuildPlugin,faceoverlay,faceoverlay support,pbutils,,)) -$(eval $(call GstBuildPlugin,fbdevsink,fbdev support,video,,)) $(eval $(call GstBuildPlugin,festival,festival support,audio,,)) $(eval $(call GstBuildPlugin,fieldanalysis,fieldanalysis support,audio,,)) $(eval $(call GstBuildPlugin,freeverb,freeverb support,,,)) @@ -362,7 +369,6 @@ $(eval $(call GstBuildPlugin,frei0r,frei0r support,controller video,,)) $(eval $(call GstBuildPlugin,gaudieffects,gaudieffects support,audio,,)) $(eval $(call GstBuildPlugin,gdp,gdp support,,,)) $(eval $(call GstBuildPlugin,geometrictransform,geometrictransform support,,,)) -$(eval $(call GstBuildPlugin,hls,HLS support,pbutils adaptivedemux,multifile,+libnettle)) $(eval $(call GstBuildPlugin,id3tag,id3tag support,tag,,)) $(eval $(call GstBuildPlugin,inter,inter support,,,)) $(eval $(call GstBuildPlugin,interlace,interlace support,,,)) @@ -378,32 +384,41 @@ $(eval $(call GstBuildPlugin,mpegpsmux,mpegpsmux support,,,)) #$(eval $(call GstBuildPlugin,mpegtsmux,mpegtsmux support,video,,)) $(eval $(call GstBuildPlugin,mxf,mxf support,audio video,,)) $(eval $(call GstBuildPlugin,netsim,netsim support,,,)) -$(eval $(call GstBuildPlugin,opusparse,OPUS streams library,pbutils,,+libopus)) $(eval $(call GstBuildPlugin,pcapparse,pcapparse support,,,)) $(eval $(call GstBuildPlugin,pnm,pnm support,video,,)) $(eval $(call GstBuildPlugin,proxy,proxy support,,,)) $(eval $(call GstBuildPlugin,removesilence,removesilence support,audio,,)) $(eval $(call GstBuildPlugin,rfbsrc,librfb support,video,,)) $(eval $(call GstBuildPlugin,rtponvif,rtponvif support,,,)) -$(eval $(call GstBuildPlugin,sbc,sbc support,audio,,+sbc)) $(eval $(call GstBuildPlugin,sdpelem,sdp support,rtp sdp,,)) $(eval $(call GstBuildPlugin,segmentclip,segmentclip support,audio,,)) -$(eval $(call GstBuildPlugin,shm,POSIX shared memory source and sink,,,+librt)) $(eval $(call GstBuildPlugin,siren,siren support,audio rtp,,)) $(eval $(call GstBuildPlugin,smooth,smooth support,,,)) -$(eval $(call GstBuildPlugin,sndfile,sndfile support,audio,,+libsndfile)) $(eval $(call GstBuildPlugin,speed,speed support,audio,,)) $(eval $(call GstBuildPlugin,subenc,subenc support,controller,,)) -#$(eval $(call GstBuildPlugin,srtp,srtp support,rtp,,+libsrtp)) +$(eval $(call GstBuildPlugin,switchbin,switchbin support,,,)) $(eval $(call GstBuildPlugin,timecode,timecode support,,,)) $(eval $(call GstBuildPlugin,videofiltersbad,videofiltersbad support,,,)) $(eval $(call GstBuildPlugin,videoframe_audiolevel,videoframe_audiolevel support,,,)) #$(eval $(call GstBuildPlugin,videoparsersbad,videoparsersbad support,,,)) $(eval $(call GstBuildPlugin,videosignal,videosignal support,,,)) $(eval $(call GstBuildPlugin,vmnc,vmnc support,,,)) -$(eval $(call GstBuildPlugin,webp,webp support,,,+libwebp)) $(eval $(call GstBuildPlugin,y4mdec,y4mdec support,,,)) -$(eval $(call GstBuildPlugin,yadif,yadif support,,,)) + +$(eval $(call GstBuildPlugin,bluez,bluez support,,,+bluez-libs)) +#$(eval $(call GstBuildPlugin,bz2,bzip2 support,,,+libbz2)) +#$(eval $(call GstBuildPlugin,dataurisrc,dataurisrc support,,,)) +$(eval $(call GstBuildPlugin,dtls,DTLS support,,,+libopenssl)) +$(eval $(call GstBuildPlugin,faad,faad support,audio,,+libfaad2)) +$(eval $(call GstBuildPlugin,fbdevsink,fbdev support,video,,)) +$(eval $(call GstBuildPlugin,hls,HLS support,pbutils adaptivedemux,multifile,+libnettle)) +$(eval $(call GstBuildPlugin,opusparse,OPUS streams library,pbutils,,+libopus)) +$(eval $(call GstBuildPlugin,sbc,sbc support,audio,,+sbc)) +$(eval $(call GstBuildPlugin,shm,POSIX shared memory source and sink,,,+librt)) +$(eval $(call GstBuildPlugin,sndfile,sndfile support,audio,,+libsndfile)) +#$(eval $(call GstBuildPlugin,srtp,srtp support,rtp,,+libsrtp)) +$(eval $(call GstBuildPlugin,webp,webp support,,,+libwebp)) +#$(eval $(call GstBuildPlugin,yadif,yadif support,,,)) $(eval $(call BuildPackage,gstreamer1-plugins-bad)) $(eval $(call BuildPackage,gst1-plugins-bad)) diff --git a/multimedia/gst1-plugins-base/Makefile b/multimedia/gst1-plugins-base/Makefile index b6d8a30a..624ba993 100644 --- a/multimedia/gst1-plugins-base/Makefile +++ b/multimedia/gst1-plugins-base/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gst1-plugins-base -PKG_VERSION:=1.16.2 +PKG_VERSION:=1.17.1 PKG_RELEASE:=1 PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-base -PKG_HASH:=b13e73e2fe74a4166552f9577c3dcb24bed077021b9c7fa600d910ec6987816a +PKG_HASH:=c0d8a84e3262e706ebc88831ca7349e5ae221274ef362599734573b3d3c028f3 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION) PKG_MAINTAINER:=W. Michael Petullo \ @@ -148,10 +148,13 @@ MESON_ARGS += \ \ $(call GST_COND_SELECT,alsa) \ $(call GST_COND_SELECT,cdparanoia) \ + $(call GST_COND_SELECT,libvisual) \ $(call GST_COND_SELECT,ogg) \ $(call GST_COND_SELECT,opus) \ $(call GST_COND_SELECT,pango) \ $(call GST_COND_SELECT,theora) \ + $(call GST_COND_SELECT,tremor) \ + -Dtremor=$(if $(CONFIG_PACKAGE_gst1-mod-ivorbisdec),en,dis)abled \ $(call GST_COND_SELECT,vorbis) \ -Dx11=disabled \ -Dxshm=disabled \ @@ -160,13 +163,13 @@ MESON_ARGS += \ -Dexamples=disabled \ -Dtests=disabled \ -Dtools=disabled \ - -Dgtk_doc=disabled \ -Dintrospection=disabled \ -Dnls=enabled \ -Dorc=disabled \ -Dgobject-cast-checks=disabled \ -Dglib-asserts=disabled \ - -Dglib-checks=disabled + -Dglib-checks=disabled \ + -Ddoc=disabled define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION) @@ -281,24 +284,37 @@ define GstBuildPlugin $$(eval $$(call BuildPackage,gst1-mod-$(1))) endef -$(eval $(call GstBuildPlugin,alsa,ALSA,audio tag,,+alsa-lib)) +$(eval $(call GstBuildPlugin,adder,adder,audio,,)) $(eval $(call GstBuildPlugin,app,app,app,,)) $(eval $(call GstBuildPlugin,audioconvert,audio format conversion,audio,,)) +$(eval $(call GstBuildPlugin,audiomixer,audio mixing,audio,,)) $(eval $(call GstBuildPlugin,audiorate,audio rate adjusting,audio tag,,)) $(eval $(call GstBuildPlugin,audioresample,audio resampling,audio tag,,)) $(eval $(call GstBuildPlugin,audiotestsrc,audio test,audio tag controller,,)) -$(eval $(call GstBuildPlugin,playback,media decoder (v2),pbutils,,)) +$(eval $(call GstBuildPlugin,compositor,video compositor,video,,)) +$(eval $(call GstBuildPlugin,encoding,encoding plugin,pbutils video,,)) $(eval $(call GstBuildPlugin,gio,GIO,,,)) -$(eval $(call GstBuildPlugin,ogg,Ogg,riff tag pbutils video,,+libogg)) -$(eval $(call GstBuildPlugin,opus,OPUS plugin library,pbutils video,,+libopus)) +$(eval $(call GstBuildPlugin,overlaycomposition,overlay composition,video,,)) +$(eval $(call GstBuildPlugin,pbtypes,pbtypes,video,,)) +$(eval $(call GstBuildPlugin,playback,playback,pbutils,,)) +$(eval $(call GstBuildPlugin,subparse,subparse,video,,)) +$(eval $(call GstBuildPlugin,rawparse,parse raw media,audio video,,)) $(eval $(call GstBuildPlugin,tcp,TCP,net,,)) -$(eval $(call GstBuildPlugin,theora,Theora,tag video,,+libogg +libtheora)) $(eval $(call GstBuildPlugin,typefindfunctions,'typefind' functions,audio pbutils tag video,,)) $(eval $(call GstBuildPlugin,videoconvert,video format conversion,video,,)) $(eval $(call GstBuildPlugin,videorate,Adjusts video frames,video,,)) $(eval $(call GstBuildPlugin,videoscale,Resizes video,video,,)) $(eval $(call GstBuildPlugin,videotestsrc,video test,video,,+liboil)) $(eval $(call GstBuildPlugin,volume,volume,audio controller,,+liboil)) + +$(eval $(call GstBuildPlugin,alsa,ALSA audio source/sink,audio tag,,+alsa-lib)) +$(eval $(call GstBuildPlugin,ivorbisdec,Integer Vorbis decoder plugin for devices without floating point,audio tag,,+libvorbisidec)) +#$(eval $(call GstBuildPlugin,cdparanoia,cdparanoia,,+libcdparanoia)) +#$(eval $(call GstBuildPlugin,libvisual,libvisual audio visualization,,+alsa-lib)) +$(eval $(call GstBuildPlugin,ogg,ogg parser muxer demuxer,riff tag pbutils video,,+libogg)) +$(eval $(call GstBuildPlugin,opus,OPUS audio codec,pbutils video,,+libopus)) +#$(eval $(call GstBuildPlugin,pango,Pango text rendering and overlay plugin,,+libopus)) +$(eval $(call GstBuildPlugin,theora,Theora,tag video,,+libogg +libtheora)) $(eval $(call GstBuildPlugin,vorbis,Vorbis,audio tag,ogg,+libvorbis)) $(eval $(call BuildPackage,gstreamer1-plugins-base)) diff --git a/multimedia/gst1-plugins-good/Makefile b/multimedia/gst1-plugins-good/Makefile index dc229c26..07f4d601 100644 --- a/multimedia/gst1-plugins-good/Makefile +++ b/multimedia/gst1-plugins-good/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gst1-plugins-good -PKG_VERSION:=1.16.2 +PKG_VERSION:=1.17.1 PKG_RELEASE:=1 PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-good/ -PKG_HASH:=40bb3bafda25c0b739c8fc36e48380fccf61c4d3f83747e97ac3f9b0171b1319 +PKG_HASH:=ea8957460ed38261e5c4bf6a8bf98d946298b756a695b27c9b1209aa7b76b0d7 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION) PKG_MAINTAINER:=W. Michael Petullo \ @@ -131,41 +131,42 @@ MESON_ARGS += \ $(call GST_COND_SELECT,spectrum) \ $(call GST_COND_SELECT,udp) \ $(call GST_COND_SELECT,videobox) \ + $(call GST_COND_SELECT,videocrop) \ $(call GST_COND_SELECT,videofilter) \ $(call GST_COND_SELECT,videomixer) \ $(call GST_COND_SELECT,wavenc) \ $(call GST_COND_SELECT,wavparse) \ $(call GST_COND_SELECT,y4m) \ \ - -Daalib=disabled \ - -Dbz2=disabled \ - -Dcairo=disabled \ + $(call GST_COND_SELECT,aalib) \ + $(call GST_COND_SELECT,bz2) \ + $(call GST_COND_SELECT,cairo) \ -Ddirectsound=disabled \ - -Ddv=disabled \ - -Ddv1394=disabled \ - $(call GST_COND_SELECT,flac) \ + $(call GST_COND_SELECT,dv) \ + -Ddv1394=$(if $(CONFIG_PACKAGE_gst1-mod-1394),en,dis)abled \ + $(call GST_COND_SELECT,flac) \ -Dgdk-pixbuf=disabled \ -Dgtk3=disabled \ -Djack=disabled \ - $(call GST_COND_SELECT,jpeg) \ - $(call GST_COND_SELECT,lame) \ - -Dlibcaca=disabled \ - $(call GST_COND_SELECT,mpg123) \ + $(call GST_COND_SELECT,jpeg) \ + $(call GST_COND_SELECT,lame) \ + -Dlibcaca=disabled \ + $(call GST_COND_SELECT,mpg123) \ -Doss=$(if $(CONFIG_PACKAGE_gst1-mod-ossaudio),en,dis)abled \ - $(call GST_COND_SELECT,oss4) \ + $(call GST_COND_SELECT,oss4) \ -Dosxaudio=disabled \ -Dosxvideo=disabled \ - $(call GST_COND_SELECT,png) \ - -Dpulse=disabled \ + $(call GST_COND_SELECT,png) \ + $(call GST_COND_SELECT,pulse) \ -Dqt5=disabled \ - $(call GST_COND_SELECT,shout2) \ - $(call GST_COND_SELECT,soup) \ - $(call GST_COND_SELECT,speex) \ - -Dtaglib=disabled \ - -Dtwolame=disabled \ - $(call GST_COND_SELECT,vpx) \ + $(call GST_COND_SELECT,shout2) \ + $(call GST_COND_SELECT,soup) \ + $(call GST_COND_SELECT,speex) \ + $(call GST_COND_SELECT,taglib) \ + $(call GST_COND_SELECT,twolame) \ + $(call GST_COND_SELECT,vpx) \ -Dwaveform=disabled \ - -Dwavpack=disabled \ + $(call GST_COND_SELECT,wavpack) \ \ -Dximagesrc=disabled \ -Dv4l2=$(if $(CONFIG_PACKAGE_gst1-mod-video4linux2),en,dis)abled \ @@ -175,7 +176,8 @@ MESON_ARGS += \ -Dorc=disabled \ -Dgobject-cast-checks=disabled \ -Dglib-asserts=disabled \ - -Dglib-checks=disabled + -Dglib-checks=disabled \ + -Ddoc=disabled define Package/gst1-plugins-good/install /bin/true @@ -217,10 +219,8 @@ define GstBuildPlugin $$(eval $$(call BuildPackage,gst1-mod-$(1))) endef -#$(eval $(call GstBuildPlugin,1394,IEEE 1394 support,,,)) $(eval $(call GstBuildPlugin,alaw,alaw codec,audio,,)) $(eval $(call GstBuildPlugin,alpha,alpha support,video,,)) -$(eval $(call GstBuildPlugin,alphacolor,alphacolor support,video,,)) $(eval $(call GstBuildPlugin,apetag,apetag support,audio pbutils tag video,,)) $(eval $(call GstBuildPlugin,audiofx,audio effects,audio fft controller,,)) $(eval $(call GstBuildPlugin,audioparsers,audioparsers,audio tag pbutils,,)) @@ -229,59 +229,64 @@ $(eval $(call GstBuildPlugin,autodetect,format auto-detection,,,)) $(eval $(call GstBuildPlugin,avi,avi support,audio riff tag video,,)) $(eval $(call GstBuildPlugin,cutter,audio cutter,audio,,)) $(eval $(call GstBuildPlugin,debug,debugging,,,)) -$(eval $(call GstBuildPlugin,deinterlace,deinterlace support,video,,)) +#$(eval $(call GstBuildPlugin,deinterlace,deinterlace support,video,,)) $(eval $(call GstBuildPlugin,dtmf,dtmf support,rtp,,)) -#$(eval $(call GstBuildPlugin,dv,dv support,audio tag video,,)) $(eval $(call GstBuildPlugin,effectv,effectvsupport,video,,)) $(eval $(call GstBuildPlugin,equalizer,audio equalizer,audio controller,,)) -$(eval $(call GstBuildPlugin,flac,FLAC codec,audio pbutils tag,,+libflac)) $(eval $(call GstBuildPlugin,flv,flv codec,audio pbutils tag video,,)) $(eval $(call GstBuildPlugin,flxdec,flx codec,,,)) -#$(eval $(call GstBuildPlugin,gdkpixbuf,gdkpixbuf support,video,,)) -$(eval $(call GstBuildPlugin,goom2k1,goom support,audio video pbutils,,)) $(eval $(call GstBuildPlugin,goom,goom support,audio video pbutils,,)) +$(eval $(call GstBuildPlugin,goom2k1,goom support,audio video pbutils,,)) $(eval $(call GstBuildPlugin,icydemux,icy demuxer,audio tag,,)) $(eval $(call GstBuildPlugin,id3demux,ID3v1/v2 demuxer,pbutils tag,,)) $(eval $(call GstBuildPlugin,imagefreeze,imagefreeze support,,,)) $(eval $(call GstBuildPlugin,interleave,audio interleave,audio,,)) $(eval $(call GstBuildPlugin,isomp4,isomp4 support,audio pbutils riff rtp tag video,,)) -#$(eval $(call GstBuildPlugin,jack,jack support,audio,,)) -$(eval $(call GstBuildPlugin,jpeg,jpeg support,video,,+libjpeg)) -$(eval $(call GstBuildPlugin,lame,MP3 encoder (using LAME),audio,,+lame-lib)) $(eval $(call GstBuildPlugin,level,audio level,audio,,)) $(eval $(call GstBuildPlugin,matroska,matroska support,audio pbutils riff tag video,,)) -$(eval $(call GstBuildPlugin,mpg123,MP3 decoder (using mpg123),audio tag,,+libid3tag +mpg123)) -$(eval $(call GstBuildPlugin,mulaw,mulaw support,audio,,)) +$(eval $(call GstBuildPlugin,monoscope,monoscope,,,)) $(eval $(call GstBuildPlugin,multifile,multiple files access,video,,)) $(eval $(call GstBuildPlugin,multipart,multipart stream handling,,,)) -$(eval $(call GstBuildPlugin,navigationtest,navigationtest support,video,,)) -$(eval $(call GstBuildPlugin,oss4,OSS 4 audio support,audio tag,,)) -$(eval $(call GstBuildPlugin,ossaudio,OSS audio support,audio,,)) -$(eval $(call GstBuildPlugin,png,png support,video,,+libpng)) -#$(eval $(call GstBuildPlugin,pulse,pulse support,audio pbutils tag video,,)) $(eval $(call GstBuildPlugin,replaygain,volume normalization,pbutils,,)) -$(eval $(call GstBuildPlugin,rtpmanager,RTP manager,audio net rtp tag pbutils video,,)) $(eval $(call GstBuildPlugin,rtp,RTP,audio rtp tag pbutils video,,)) +$(eval $(call GstBuildPlugin,rtpmanager,RTP manager,audio net rtp tag pbutils video,,)) $(eval $(call GstBuildPlugin,rtsp,RTSP,net rtp rtsp sdp,,)) $(eval $(call GstBuildPlugin,shapewipe,shapewipe support,video,,)) -$(eval $(call GstBuildPlugin,shout2,shout2 support,audio,,+libshout)) $(eval $(call GstBuildPlugin,smpte,smpte support,video,,)) -$(eval $(call GstBuildPlugin,soup,soup input,audio tag,,+libsoup)) $(eval $(call GstBuildPlugin,spectrum,spectrum data output,audio fft,,)) -$(eval $(call GstBuildPlugin,speex,speex support,audio tag,,+libspeex)) -#$(eval $(call GstBuildPlugin,taglib,taglib support,tag,,)) $(eval $(call GstBuildPlugin,udp,UDP,net,,)) -$(eval $(call GstBuildPlugin,video4linux2,video4linux2 support,video allocators,,+libv4l)) $(eval $(call GstBuildPlugin,videobox,videobox support,video,,)) $(eval $(call GstBuildPlugin,videocrop,videocrop support,video,,)) $(eval $(call GstBuildPlugin,videofilter,videofilter support,video,,)) $(eval $(call GstBuildPlugin,videomixer,videomixer support,video,,)) -$(eval $(call GstBuildPlugin,vpx,vpx support,tag video,,+libvpx)) $(eval $(call GstBuildPlugin,wavenc,Wav encoder,riff,,)) -#$(eval $(call GstBuildPlugin,wavpack,Wav packer,audio riff tag,,)) $(eval $(call GstBuildPlugin,wavparse,Wav parser,audio riff tag,,)) -#$(eval $(call GstBuildPlugin,ximagesrc,ximagesrc support,video,,)) #$(eval $(call GstBuildPlugin,y4m,sty4menc support,video,,)) +#$(eval $(call GstBuildPlugin,1394,IEEE 1394 support,,,)) +#$(eval $(call GstBuildPlugin,aalib,aalib text console video sink,,,)) +#$(eval $(call GstBuildPlugin,alphacolor,alphacolor support,video,,)) +#$(eval $(call GstBuildPlugin,dv,dv support,audio tag video,,)) +$(eval $(call GstBuildPlugin,flac,FLAC codec,audio pbutils tag,,+libflac)) +#$(eval $(call GstBuildPlugin,gdkpixbuf,gdkpixbuf support,video,,)) +#$(eval $(call GstBuildPlugin,jack,jack support,audio,,)) +$(eval $(call GstBuildPlugin,jpeg,jpeg support,video,,+libjpeg)) +$(eval $(call GstBuildPlugin,lame,MP3 encoder (using LAME),audio,,+lame-lib)) +$(eval $(call GstBuildPlugin,mpg123,MP3 decoder (using mpg123),audio tag,,+libid3tag +mpg123)) +$(eval $(call GstBuildPlugin,mulaw,mulaw support,audio,,)) +$(eval $(call GstBuildPlugin,navigationtest,navigationtest support,video,,)) +$(eval $(call GstBuildPlugin,oss4,OSS 4 audio support,audio tag,,)) +$(eval $(call GstBuildPlugin,ossaudio,OSS audio support,audio,,)) +$(eval $(call GstBuildPlugin,png,png support,video,,+libpng)) +#$(eval $(call GstBuildPlugin,pulse,pulse support,audio pbutils tag video,,+pulseaudio)) +$(eval $(call GstBuildPlugin,shout2,shout2 support,audio,,+libshout)) +$(eval $(call GstBuildPlugin,soup,soup input,audio tag,,+libsoup)) +$(eval $(call GstBuildPlugin,speex,speex support,audio tag,,+libspeex)) +#$(eval $(call GstBuildPlugin,taglib,taglib support,tag,,)) +$(eval $(call GstBuildPlugin,video4linux2,video4linux2 support,video allocators,,+libv4l)) +$(eval $(call GstBuildPlugin,vpx,vpx support,tag video,,+libvpx)) +#$(eval $(call GstBuildPlugin,wavpack,Wav packer,audio riff tag,,)) +#$(eval $(call GstBuildPlugin,ximagesrc,ximagesrc support,video,,)) + $(eval $(call BuildPackage,gstreamer1-plugins-good)) $(eval $(call BuildPackage,gst1-plugins-good)) diff --git a/multimedia/gst1-plugins-ugly/Makefile b/multimedia/gst1-plugins-ugly/Makefile index de6e50a7..0d934738 100644 --- a/multimedia/gst1-plugins-ugly/Makefile +++ b/multimedia/gst1-plugins-ugly/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gst1-plugins-ugly -PKG_VERSION:=1.16.2 +PKG_VERSION:=1.17.1 PKG_RELEASE:=1 PKG_SOURCE:=gst-plugins-ugly-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-ugly -PKG_HASH:=5500415b865e8b62775d4742cbb9f37146a50caecfc0e7a6fc0160d3c560fbca +PKG_HASH:=a5e564107120b5b27c48709c5dfdb266737def5b3eb7aaabaddd304d425d8f21 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-ugly-$(PKG_VERSION) PKG_MAINTAINER:=W. Michael Petullo \ @@ -113,7 +113,8 @@ MESON_ARGS += \ -Dtests=disabled \ -Dgobject-cast-checks=disabled \ -Dglib-asserts=disabled \ - -Dglib-checks=disabled + -Dglib-checks=disabled \ + -Ddoc=disabled define Package/gst1-plugins-ugly/install /bin/true diff --git a/multimedia/gstreamer1/Makefile b/multimedia/gstreamer1/Makefile index b0293ac7..a33c3609 100644 --- a/multimedia/gstreamer1/Makefile +++ b/multimedia/gstreamer1/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gstreamer1 -PKG_VERSION:=1.16.2 +PKG_VERSION:=1.17.1 PKG_RELEASE:=1 PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer -PKG_HASH:=e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e +PKG_HASH:=f63566152755aab98414feb859ea8b00d3b07cad2486f304a8feec1265e5aa0e PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION) PKG_MAINTAINER:=W. Michael Petullo \ @@ -121,14 +121,16 @@ MESON_ARGS += \ -Dregistry=false \ -Dtracer_hooks=false \ -Dptp-helper-setuid-user=none \ - -Dextra-checks=false \ + -Dptp-helper-setuid-group=none \ -Doption-parsing=false \ -Dpoisoning=false \ + -Dmemory-alignment=malloc \ -Dcheck=enabled \ -Dlibunwind=disabled \ -Dlibdw=disabled \ -Ddbghelp=disabled \ -Dbash-completion=disabled \ + -Dcoretracers=disabled \ -Dexamples=disabled \ -Dbenchmarks=disabled \ -Dtools=enabled \ @@ -136,7 +138,9 @@ MESON_ARGS += \ -Dintrospection=disabled \ -Dnls=enabled \ -Dgobject-cast-checks=disabled \ - -Dglib-asserts=disabled + -Dglib-asserts=disabled \ + -Dextra-checks=disabled \ + -Ddoc=disabled define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION) diff --git a/multimedia/gstreamer1/patches/001-no-translations.patch b/multimedia/gstreamer1/patches/001-no-translations.patch deleted file mode 100644 index e6c68640..00000000 --- a/multimedia/gstreamer1/patches/001-no-translations.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -9,7 +9,6 @@ aclocal_DATA = gst-element-check-1.0.m4 - SUBDIRS = pkgconfig \ - gst libs plugins tests \ - docs \ -- po \ - m4 \ - common \ - data -@@ -22,7 +21,6 @@ endif - DIST_SUBDIRS = pkgconfig \ - gst libs plugins tools tests \ - docs \ -- po \ - m4 \ - common \ - data ---- a/configure.ac -+++ b/configure.ac -@@ -1108,7 +1108,6 @@ libs/gst/net/Makefile - plugins/Makefile - plugins/elements/Makefile - plugins/tracers/Makefile --po/Makefile.in - tests/Makefile - tests/benchmarks/Makefile - tests/check/Makefile diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile index b65c77ef..da7601ea 100644 --- a/multimedia/icecast/Makefile +++ b/multimedia/icecast/Makefile @@ -6,18 +6,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icecast -PKG_VERSION:=2.4.3 -PKG_RELEASE:=3 +PKG_VERSION:=2.4.4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.xiph.org/releases/icecast/ -PKG_HASH:=c85ca48c765d61007573ee1406a797ae6cb31fb5961a42e7f1c87adb45ddc592 +PKG_HASH:=49b5979f9f614140b6a38046154203ee28218d8fc549888596a683ad604e4d44 PKG_MAINTAINER:=André Gaul , \ Ted Hess PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:icecast:icecast PKG_FIXUP:=autoreconf PKG_INSTALL:= 1 @@ -30,7 +31,7 @@ define Package/icecast DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libvorbisidec TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams USERID:=icecast=87:icecast=87 - URL:=http://www.icecast.org/ + URL:=https://icecast.org/ endef define Package/icecast/description diff --git a/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch b/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch index 49861d2e..b24de8c6 100644 --- a/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch +++ b/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch @@ -1,3 +1,50 @@ +--- a/m4/ogg.m4 ++++ b/m4/ogg.m4 +@@ -29,7 +29,7 @@ XIPH_GCC_WARNING([-I$ogg_prefix/include],, + ]) + AC_CACHE_CHECK([for libogg], xt_cv_lib_ogg, + [dnl +-OGG_LIBS="-logg" ++OGG_LIBS="-lvorbisidec" + + # + # check if the installed Ogg is sufficiently new. +diff --git a/m4/vorbis.m4 b/m4/vorbis.m4 +index 17add29..066dc2a 100644 +--- a/m4/vorbis.m4 ++++ b/m4/vorbis.m4 +@@ -38,9 +38,9 @@ if test "x$vorbis_prefix" != "x$ogg_prefix"; then + ]) + fi + +-VORBIS_LIBS="-lvorbis" +-VORBISFILE_LIBS="-lvorbisfile" +-VORBISENC_LIBS="-lvorbisenc" ++VORBIS_LIBS="-lvorbisidec" ++VORBISFILE_LIBS="-lvorbisidec" ++VORBISENC_LIBS="-lvorbisidec" + + xt_save_LIBS="$LIBS" + xt_save_LDFLAGS="$LDFLAGS" +@@ -58,18 +58,6 @@ AC_TRY_LINK_FUNC(ogg_stream_init, [xt_lib_vorbis=ok], + ) + ]) + +-if test "x$xt_lib_vorbis" = "xok"; then +-# +-# Now check if the installed Vorbis is sufficiently new. +-# +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +-#include +-#include +- ], [ +-struct ovectl_ratemanage_arg a; +-])],,[xt_lib_vorbis="old version found"]) +-AC_MSG_RESULT([$xt_lib_vorbis]) +-fi + CPPFLAGS="$xt_save_CPPFLAGS" + LIBS="$xt_save_LIBS" + LDFLAGS="$xt_save_LDFLAGS" --- a/src/format_vorbis.c +++ b/src/format_vorbis.c @@ -19,7 +19,7 @@ @@ -17,7 +64,7 @@ typedef struct vorbis_codec_tag { -@@ -583,3 +584,91 @@ static refbuf_t *process_vorbis_page (og +@@ -583,3 +584,91 @@ static refbuf_t *process_vorbis_page (ogg_state_t *ogg_info, return NULL; } @@ -109,48 +156,3 @@ + oggpack_writeclear(&opb); + return 0; +} ---- a/m4/vorbis.m4 -+++ b/m4/vorbis.m4 -@@ -38,9 +38,9 @@ if test "x$vorbis_prefix" != "x$ogg_pref - ]) - fi - --VORBIS_LIBS="-lvorbis" --VORBISFILE_LIBS="-lvorbisfile" --VORBISENC_LIBS="-lvorbisenc" -+VORBIS_LIBS="-lvorbisidec" -+VORBISFILE_LIBS="-lvorbisidec" -+VORBISENC_LIBS="-lvorbisidec" - - xt_save_LIBS="$LIBS" - xt_save_LDFLAGS="$LDFLAGS" -@@ -58,18 +58,6 @@ AC_TRY_LINK_FUNC(ogg_stream_init, [xt_li - ) - ]) - --if test "x$xt_lib_vorbis" = "xok"; then --# --# Now check if the installed Vorbis is sufficiently new. --# --AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ --#include --#include -- ], [ --struct ovectl_ratemanage_arg a; --])],,[xt_lib_vorbis="old version found"]) --AC_MSG_RESULT([$xt_lib_vorbis]) --fi - CPPFLAGS="$xt_save_CPPFLAGS" - LIBS="$xt_save_LIBS" - LDFLAGS="$xt_save_LDFLAGS" ---- a/m4/ogg.m4 -+++ b/m4/ogg.m4 -@@ -29,7 +29,7 @@ XIPH_GCC_WARNING([-I$ogg_prefix/include] - ]) - AC_CACHE_CHECK([for libogg], xt_cv_lib_ogg, - [dnl --OGG_LIBS="-logg" -+OGG_LIBS="-lvorbisidec" - - # - # check if the installed Ogg is sufficiently new. diff --git a/multimedia/icecast/patches/005-no_examples_doc_win32.patch b/multimedia/icecast/patches/005-no_examples_doc_win32.patch index 178df546..43c6266c 100644 --- a/multimedia/icecast/patches/005-no_examples_doc_win32.patch +++ b/multimedia/icecast/patches/005-no_examples_doc_win32.patch @@ -9,7 +9,7 @@ EXTRA_DIST = HACKING m4/acx_pthread.m4 m4/ogg.m4 \ m4/theora.m4 m4/vorbis.m4 m4/speex.m4 \ -@@ -11,7 +11,7 @@ EXTRA_DIST = HACKING m4/acx_pthread.m4 m +@@ -11,7 +11,7 @@ EXTRA_DIST = HACKING m4/acx_pthread.m4 m4/ogg.m4 \ m4/xiph_types.m4 m4/xiph_xml2.m4 docdir = $(datadir)/doc/$(PACKAGE) diff --git a/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch b/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch index 8da6e33b..ad179226 100644 --- a/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch +++ b/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch @@ -1,6 +1,6 @@ --- a/m4/xiph_curl.m4 +++ b/m4/xiph_curl.m4 -@@ -52,7 +52,7 @@ AC_CHECK_HEADERS([curl/curl.h],, curl_ok +@@ -52,7 +52,7 @@ AC_CHECK_HEADERS([curl/curl.h],, curl_ok="no") AC_MSG_CHECKING(for libcurl) if test "$curl_ok" = "yes" then diff --git a/multimedia/icecast/patches/020-icecast_config_for_openwrt.patch b/multimedia/icecast/patches/020-icecast_config_for_openwrt.patch index d3282f2e..43f1614b 100644 --- a/multimedia/icecast/patches/020-icecast_config_for_openwrt.patch +++ b/multimedia/icecast/patches/020-icecast_config_for_openwrt.patch @@ -7,7 +7,7 @@ - localhost + OpenWrt - + @@ -234,11 +234,9 @@ diff --git a/multimedia/imagemagick/Makefile b/multimedia/imagemagick/Makefile new file mode 100644 index 00000000..3da21608 --- /dev/null +++ b/multimedia/imagemagick/Makefile @@ -0,0 +1,141 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=imagemagick +PKG_VERSION:=7.0.9 +PKG_REVISION:=5 +PKG_RELEASE:=1 +PKG_MAINTAINER:=Val Kulkov + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REVISION).tar.gz +PKG_SOURCE_URL:=http://github.com/ImageMagick/ImageMagick/archive/$(PKG_VERSION)-$(PKG_REVISION) +PKG_HASH:=d15abd31e7e18f7edec47df156773a23e5100386e55c6ce50f5353e9572d3413 +PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(PKG_VERSION)-$(PKG_REVISION) + +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:imagemagick:imagemagick + +PKG_USE_MIPS16:=0 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/imagemagick/Default + SECTION:=multimedia + CATEGORY:=Multimedia + TITLE:=Image manipulation tools + URL:=https://www.imagemagick.org/ +endef + +define Package/imagemagick + $(call Package/imagemagick/Default) + DEPENDS:=+libltdl +libpthread +zlib +libfreetype +libpng +libjpeg +libtiff +endef + +define Package/imagemagick/description +ImageMagick is a free and open-source software suite for displaying, +converting, and editing raster image and vector image files. +NOTE: this package may not be suitable for many embedded devices because +of its large size. Consider using extroot or alternatively consider +graphicsmagick which is smaller but similar in functionality. +endef + +define Package/imagemagick/conffiles +/etc/ImageMagick-7/colors.xml +/etc/ImageMagick-7/delegates.xml +/etc/ImageMagick-7/log.xml +/etc/ImageMagick-7/mime.xml +/etc/ImageMagick-7/policy.xml +/etc/ImageMagick-7/quantization-table.xml +/etc/ImageMagick-7/thresholds.xml +/etc/ImageMagick-7/type-apple.xml +/etc/ImageMagick-7/type-dejavu.xml +/etc/ImageMagick-7/type-ghostscript.xml +/etc/ImageMagick-7/type-urw-base35.xml +/etc/ImageMagick-7/type-windows.xml +/etc/ImageMagick-7/type.xml +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-static \ + --disable-docs \ + --enable-dependency-tracking \ + --with-modules \ + --with-threads \ + --with-ltdl \ + --with-zlib \ + --disable-hdri \ + --with-quantum-depth=8 \ + --disable-deprecated \ + --disable-cipher \ + --without-bzlib \ + --without-autotrace \ + --without-djvu \ + --without-dps \ + --without-fftw \ + --without-flif \ + --without-fpx \ + --without-fontconfig \ + --without-gslib \ + --without-gvc \ + --without-heic \ + --without-jbig \ + --without-lcms \ + --without-lqr \ + --without-lzma \ + --without-magick-plus-plus \ + --without-openexr \ + --without-openjp2 \ + --without-raqm \ + --without-raw \ + --without-webp \ + --without-x \ + --without-zstd \ + --without-gslib \ + --without-gvc \ + --without-pango \ + --without-perl \ + --without-rsvg \ + --without-wmf \ + --without-xml \ + --with-freetype \ + --with-jpeg \ + --with-png \ + --with-tiff + +TARGET_CFLAGS += -flto + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +IMlibdir:=usr/lib/ImageMagick-$(PKG_VERSION) +define Package/imagemagick/install + $(INSTALL_DIR) $(1)/etc $(1)/usr/bin $(1)/$(IMlibdir) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(RM) $(1)/usr/bin/*-config + $(CP) $(PKG_INSTALL_DIR)/etc/ImageMagick-* $(1)/etc/ + $(CP) $(PKG_INSTALL_DIR)/$(IMlibdir)/* $(1)/$(IMlibdir)/ +endef + +$(eval $(call BuildPackage,imagemagick)) diff --git a/multimedia/lcdgrilo/Makefile b/multimedia/lcdgrilo/Makefile index a6423659..0df60dee 100644 --- a/multimedia/lcdgrilo/Makefile +++ b/multimedia/lcdgrilo/Makefile @@ -9,19 +9,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lcdgrilo PKG_VERSION:=0.0.12 -PKG_RELEASE:=1 - -PKG_MAINTAINER:=W. Michael Petullo - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.flyn.org/projects/lcdgrilo PKG_HASH:=2e5028fff7a90b1a3688c466f048e978a52d9a4da20a382546d5e5bd42e2fc6a -PKG_BUILD_DEPENDS:=vala +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=vala/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -29,9 +30,9 @@ include $(INCLUDE_DIR)/nls.mk define Package/lcdgrilo SECTION:=multimedia CATEGORY:=Multimedia - DEPENDS:=+grilo +grilo-plugins +libgee +libgstreamer1 + DEPENDS:=+grilo +grilo-plugins +gstreamer1-libs +libgee +libgstreamer1 TITLE:=lcdgrilo - URL:=http://www.flyn.org/projects/lcdgrilo/ + URL:=https://www.flyn.org/projects/lcdgrilo/ endef define Package/lcdgrilo/decription diff --git a/multimedia/lcdgrilo/patches/010-remove-check-dependency.patch b/multimedia/lcdgrilo/patches/010-remove-check-dependency.patch new file mode 100644 index 00000000..cd69e225 --- /dev/null +++ b/multimedia/lcdgrilo/patches/010-remove-check-dependency.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -85,7 +85,6 @@ AM_CONDITIONAL(USE_GSTREAMER, test x"$HA + AC_SUBST(GSTREAMER_CFLAGS) + AC_SUBST(GSTREAMER_LIBS) + +-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no) + AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes") + + AM_PROG_VALAC([0.11.4]) diff --git a/multimedia/lcdgrilo/patches/020-vala.patch b/multimedia/lcdgrilo/patches/020-vala.patch new file mode 100644 index 00000000..c35e227d --- /dev/null +++ b/multimedia/lcdgrilo/patches/020-vala.patch @@ -0,0 +1,11 @@ +--- a/src/lcdgrilo.vala ++++ b/src/lcdgrilo.vala +@@ -47,7 +47,7 @@ private class LCDPlayer { + private int current = 0; + private Transitions transitions; + private MainLoop loop; +- private Gee.ArrayList sources = new Gee.ArrayList (); ++ private Gee.ArrayList sources = new Gee.ArrayList (); + private uint watch_id = 0; + + public LCDPlayer () { diff --git a/multimedia/minidlna/Makefile b/multimedia/minidlna/Makefile index 5e47cd49..b701fcaa 100644 --- a/multimedia/minidlna/Makefile +++ b/multimedia/minidlna/Makefile @@ -8,21 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=minidlna -PKG_VERSION:=1.2.1 -PKG_RELEASE:=6 +PKG_RELEASE:=7 -PKG_SOURCE_URL:=@SF/minidlna -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=67388ba23ab0c7033557a32084804f796aa2a796db7bb2b770fb76ac2a742eec +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://git.code.sf.net/p/minidlna/git +PKG_SOURCE_DATE:=2019-12-09 +PKG_SOURCE_VERSION:=0763719f2776f91114bc5564919896f28e078c77 +PKG_MIRROR_HASH:=93030a80eff44c0ec13f54daf3b2ba345b70ef8645e0343a34092f37d6f9e8dd -PKG_LICENSE:=GPL-2.0 BSD-3-Clause +PKG_MAINTAINER:= +PKG_LICENSE:=GPL-2.0-or-later BSD-3-Clause PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd -PKG_MAINTAINER:=Knyazkov Dmitry - PKG_FIXUP:=autoreconf - -PKG_BUILD_PARALLEL:=0 +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=util-linux include $(INCLUDE_DIR)/package.mk @@ -33,9 +33,10 @@ define Package/minidlna CATEGORY:=Multimedia TITLE:=UPnP A/V & DLNA Media Server URL:=http://minidlna.sourceforge.net/ - DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg-full \ + DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \ +libid3tag +libflac +libvorbis +libuuid \ $(ICONV_DEPENDS) $(INTL_DEPENDS) + USERID:=minidlna:minidlna endef define Package/minidlna/description @@ -47,37 +48,26 @@ define Package/minidlna/conffiles /etc/config/minidlna endef -TARGET_CPPFLAGS += \ - -I$(ICONV_PREFIX)/include \ - -I$(INTL_PREFIX)/include \ - -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \ - -TARGET_LDFLAGS += \ - -L$(ICONV_PREFIX)/lib \ - -L$(INTL_PREFIX)/lib \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ - -MAKE_FLAGS +=\ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - ICONV_LIBS="-liconv $(if $(INTL_FULL),-lintl)" \ - -CONFIGURE_ARGS +=\ +CONFIGURE_ARGS += \ --with-libiconv-prefix="$(ICONV_PREFIX)" \ --with-libintl-prefix="$(INTL_PREFIX)" \ --with-os-name="OpenWrt Linux" \ --with-os-version="$(LINUX_VERSION)" \ - --with-os-url="http://openwrt.org/" \ + --with-os-url="https://openwrt.org/" \ --with-db-path="/var/run/minidlna" \ - --with-log-path="/var/log" \ + --with-log-path="/var/log" + +TARGET_CFLAGS += -DHAVE_CLOCK_GETTIME define Package/minidlna/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlnad $(1)/usr/bin/minidlna + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/minidlnad $(1)/usr/sbin/minidlnad $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/minidlna.init $(1)/etc/init.d/minidlna $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) ./files/minidlna.config $(1)/etc/config/minidlna + $(INSTALL_DIR) $(1)/etc/sysctl.d + $(INSTALL_CONF) ./files/minidlna.sysctl $(1)/etc/sysctl.d/30-minidlna.conf endef $(eval $(call BuildPackage,minidlna)) diff --git a/multimedia/minidlna/files/minidlna.config b/multimedia/minidlna/files/minidlna.config index 924a99ea..4ffeadb0 100644 --- a/multimedia/minidlna/files/minidlna.config +++ b/multimedia/minidlna/files/minidlna.config @@ -1,10 +1,10 @@ config minidlna config - option 'enabled' '1' + option enabled '0' + option user 'minidlna' option port '8200' option interface 'br-lan' option friendly_name 'OpenWrt DLNA Server' option db_dir '/var/run/minidlna' - option log_dir '/var/log' option inotify '1' option enable_tivo '0' option wide_links '0' @@ -14,5 +14,6 @@ config minidlna config option serial '12345678' option model_number '1' option root_container '.' + option uuid '' list media_dir '/mnt' option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg' diff --git a/multimedia/minidlna/files/minidlna.init b/multimedia/minidlna/files/minidlna.init index ab3e1894..326dc2a0 100644 --- a/multimedia/minidlna/files/minidlna.init +++ b/multimedia/minidlna/files/minidlna.init @@ -1,16 +1,12 @@ #!/bin/sh /etc/rc.common # Copyright (C) 2010 OpenWrt.org -START=99 +START=81 -SERVICE_USE_PID=1 -SERVICE_PID_FILE=/var/run/minidlna/minidlna.pid +PROG=/usr/sbin/minidlnad +USE_PROCD=1 -MINIDLNA_CONFIG_FILE="/tmp/minidlna.conf" - -minidlna_cfg_append() { - echo "$1" >> "$MINIDLNA_CONFIG_FILE" -} +MINIDLNA_CONFIG_FILE="/var/etc/minidlna.conf" minidlna_cfg_addbool() { local cfg="$1" @@ -20,7 +16,7 @@ minidlna_cfg_addbool() { config_get_bool val "$cfg" "$key" "$def" [ "$val" -gt 0 ] && val="yes" || val="no" - minidlna_cfg_append "$key=$val" + echo "$key=$val" } minidlna_cfg_addstr() { @@ -30,13 +26,12 @@ minidlna_cfg_addstr() { local val config_get val "$cfg" "$key" "$def" - [ -n "$val" ] && minidlna_cfg_append "$key=$val" + [ -n "$val" ] && echo "$key=$val" } minidlna_cfg_add_media_dir() { local val=$1 - - minidlna_cfg_append "media_dir=$val" + echo "media_dir=$val" } minidlna_create_config() { @@ -44,56 +39,71 @@ minidlna_create_config() { local port local interface - config_get port $cfg port - config_get interface $cfg interface + config_get port "$cfg" port + config_get interface "$cfg" interface - [ -z "$interface" -o -t "$port" ] && return 1 + { [ -z "$interface" ] || [ -t "$port" ]; } && return 1 - echo "# this file is generated automatically, don't edit" > "$MINIDLNA_CONFIG_FILE" + mkdir -p /var/etc + echo "# this file is generated automatically, don't edit" - minidlna_cfg_append "port=$port" - minidlna_cfg_append "network_interface=$interface" + echo "port=$port" + echo "network_interface=$interface" - minidlna_cfg_addstr $cfg friendly_name - minidlna_cfg_addstr $cfg db_dir - minidlna_cfg_addstr $cfg log_dir - minidlna_cfg_addstr $cfg log_level 'error' - minidlna_cfg_addbool $cfg inotify '1' - minidlna_cfg_addbool $cfg enable_tivo '0' - minidlna_cfg_addbool $cfg wide_links '0' - minidlna_cfg_addbool $cfg strict_dlna '0' - minidlna_cfg_addstr $cfg album_art_names - minidlna_cfg_addstr $cfg presentation_url - minidlna_cfg_addstr $cfg notify_interval '900' - minidlna_cfg_addstr $cfg serial '12345678' - minidlna_cfg_addstr $cfg model_number '1' - minidlna_cfg_addstr $cfg minissdpsocket - minidlna_cfg_addstr $cfg root_container '.' + minidlna_cfg_addstr "$cfg" friendly_name + minidlna_cfg_addstr "$cfg" user + minidlna_cfg_addstr "$cfg" db_dir + minidlna_cfg_addstr "$cfg" log_level 'error' + minidlna_cfg_addbool "$cfg" inotify '1' + minidlna_cfg_addbool "$cfg" enable_tivo '0' + minidlna_cfg_addbool "$cfg" wide_links '0' + minidlna_cfg_addbool "$cfg" strict_dlna '0' + minidlna_cfg_addstr "$cfg" album_art_names + minidlna_cfg_addstr "$cfg" presentation_url + minidlna_cfg_addstr "$cfg" notify_interval '900' + minidlna_cfg_addstr "$cfg" serial '12345678' + minidlna_cfg_addstr "$cfg" model_number '1' + minidlna_cfg_addstr "$cfg" minissdpsocket + minidlna_cfg_addstr "$cfg" root_container '.' + minidlna_cfg_addstr "$cfg" uuid '019f9a56-ff60-44c0-9edc-eae88d09fa05' config_list_foreach "$cfg" "media_dir" minidlna_cfg_add_media_dir return 0 -} +} > "$MINIDLNA_CONFIG_FILE" -start() { +start_service() { local enabled local db_dir - local log_dir + local user + local val config_load 'minidlna' config_get_bool enabled config 'enabled' '0' [ "$enabled" -gt 0 ] || return 1 + config_get val "config" uuid + [ "$val" = '' ] && uci set minidlna.config.uuid="$(cat /proc/sys/kernel/random/uuid)" && uci commit minidlna + minidlna_create_config config || return 1 - + config_get db_dir config 'db_dir' '/var/run/minidlna' - config_get log_dir config 'log_dir' '/var/log' + config_get user config 'user' 'minidlna' - mkdir -m 0755 -p $db_dir - mkdir -m 0755 -p $log_dir - service_start /usr/bin/minidlna -f "$MINIDLNA_CONFIG_FILE" + [ -d "$db_dir" ] || { + mkdir -m 755 -p "$db_dir" + chown -R "$user":"$user" "$db_dir" + } + + procd_open_instance + procd_set_param command "$PROG" + procd_append_param command -S -f "$MINIDLNA_CONFIG_FILE" + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param respawn + procd_close_instance } -stop() { - service_stop /usr/bin/minidlna +service_triggers() { + procd_add_reload_trigger "minidlna" } diff --git a/multimedia/minidlna/files/minidlna.sysctl b/multimedia/minidlna/files/minidlna.sysctl new file mode 100644 index 00000000..aaf460e1 --- /dev/null +++ b/multimedia/minidlna/files/minidlna.sysctl @@ -0,0 +1,2 @@ +# this is the desired value for minidlna +fs.inotify.max_user_watches=65536 diff --git a/multimedia/minidlna/patches/001-dont-build-po-files.patch b/multimedia/minidlna/patches/001-dont-build-po-files.patch new file mode 100644 index 00000000..7d9f6b63 --- /dev/null +++ b/multimedia/minidlna/patches/001-dont-build-po-files.patch @@ -0,0 +1,25 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -17,7 +17,7 @@ + + AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@ + +-SUBDIRS=po ++SUBDIRS= + + sbin_PROGRAMS = minidlnad + check_PROGRAMS = testupnpdescgen +--- a/configure.ac ++++ b/configure.ac +@@ -647,6 +647,8 @@ case "$target_os" in + esac + + +-AC_OUTPUT([ po/Makefile.in +-Makefile +-]) ++# AC_OUTPUT([ po/Makefile.in ++# Makefile ++# ]) ++AC_CONFIG_FILES([Makefile]) ++AC_OUTPUT diff --git a/multimedia/minidlna/patches/001-support-ape-format.patch b/multimedia/minidlna/patches/001-support-ape-format.patch deleted file mode 100644 index ea2772a9..00000000 --- a/multimedia/minidlna/patches/001-support-ape-format.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -uNr a/metadata.c b/metadata.c ---- a/metadata.c -+++ b/metadata.c -@@ -330,6 +330,11 @@ - strcpy(type, "flc"); - m.mime = strdup("audio/x-flac"); - } -+ else if( ends_with(path, ".ape") ) -+ { -+ strcpy(type, "ape"); -+ m.mime = strdup("audio/x-ape"); -+ } - else if( ends_with(path, ".wav") ) - { - strcpy(type, "wav"); -diff -uNr a/upnpglobalvars.h b/upnpglobalvars.h ---- a/upnpglobalvars.h -+++ b/upnpglobalvars.h -@@ -165,6 +165,7 @@ - "http-get:*:audio/mp4:*," \ - "http-get:*:audio/x-wav:*," \ - "http-get:*:audio/x-flac:*," \ -+ "http-get:*:audio/x-ape:*," \ - "http-get:*:application/ogg:*" - - #define DLNA_FLAG_DLNA_V1_5 0x00100000 -diff -uNr a/utils.c b/utils.c ---- a/utils.c -+++ b/utils.c -@@ -339,6 +339,8 @@ - return "flac"; - else if( strcmp(mime+6, "flac") == 0 ) - return "flac"; -+ else if( strcmp(mime+6, "ape") == 0 ) -+ return "ape"; - else if( strcmp(mime+6, "x-wav") == 0 ) - return "wav"; - else if( strncmp(mime+6, "L16", 3) == 0 ) -@@ -410,7 +412,7 @@ - { - return (ends_with(file, ".mp3") || ends_with(file, ".flac") || - ends_with(file, ".wma") || ends_with(file, ".asf") || -- ends_with(file, ".fla") || ends_with(file, ".flc") || -+ ends_with(file, ".fla") || ends_with(file, ".flc") || ends_with(file, ".ape") || - ends_with(file, ".m4a") || ends_with(file, ".aac") || - ends_with(file, ".mp4") || ends_with(file, ".m4p") || - ends_with(file, ".wav") || ends_with(file, ".ogg") || diff --git a/multimedia/minidlna/patches/002-dont-build-po-files.patch b/multimedia/minidlna/patches/002-dont-build-po-files.patch deleted file mode 100644 index 38623246..00000000 --- a/multimedia/minidlna/patches/002-dont-build-po-files.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -17,7 +17,7 @@ - - AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@ - --SUBDIRS=po -+SUBDIRS= - - sbin_PROGRAMS = minidlnad - check_PROGRAMS = testupnpdescgen ---- a/configure.ac -+++ b/configure.ac -@@ -644,6 +644,8 @@ case "$target_os" in - esac - - --AC_OUTPUT([ po/Makefile.in --Makefile --]) -+# AC_OUTPUT([ po/Makefile.in -+# Makefile -+# ]) -+AC_CONFIG_FILES([Makefile]) -+AC_OUTPUT diff --git a/multimedia/minidlna/patches/005-added-support-RMVB.patch b/multimedia/minidlna/patches/005-added-support-RMVB.patch new file mode 100644 index 00000000..86f65051 --- /dev/null +++ b/multimedia/minidlna/patches/005-added-support-RMVB.patch @@ -0,0 +1,64 @@ +From e4a045e92b864dc148ca46be94668c5b67132405 Mon Sep 17 00:00:00 2001 +From: VergLsm +Date: Fri, 31 Jan 2020 10:01:12 +0000 +Subject: [PATCH] Added support RMVB. + +--- + metadata.c | 4 ++++ + upnpglobalvars.h | 3 ++- + utils.c | 3 +++ + 3 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/metadata.c b/metadata.c +index 9cd86dc..2d13480 100644 +--- a/metadata.c ++++ b/metadata.c +@@ -862,6 +862,10 @@ GetVideoMetadata(const char *path, const char *name) + xasprintf(&m.mime, "video/x-matroska"); + else if( strcmp(ctx->iformat->name, "flv") == 0 ) + xasprintf(&m.mime, "video/x-flv"); ++ else if( strcmp(ctx->iformat->name, "rm") == 0 ) ++ xasprintf(&m.mime, "video/x-pn-realvideo"); ++ else if( strcmp(ctx->iformat->name, "rmvb") == 0 ) ++ xasprintf(&m.mime, "video/x-pn-realvideo"); + if( m.mime ) + goto video_no_dlna; + +diff --git a/upnpglobalvars.h b/upnpglobalvars.h +index 1a2fb5e..2cbe24c 100644 +--- a/upnpglobalvars.h ++++ b/upnpglobalvars.h +@@ -172,7 +172,8 @@ + "http-get:*:audio/x-wav:*," \ + "http-get:*:audio/x-flac:*," \ + "http-get:*:audio/x-dsd:*," \ +- "http-get:*:application/ogg:*" ++ "http-get:*:application/ogg:*,"\ ++ "http-get:*:video/x-pn-realvideo:*" + + #define DLNA_FLAG_DLNA_V1_5 0x00100000 + #define DLNA_FLAG_HTTP_STALLING 0x00200000 +diff --git a/utils.c b/utils.c +index dc936f9..006f611 100644 +--- a/utils.c ++++ b/utils.c +@@ -377,6 +377,8 @@ mime_to_ext(const char * mime) + return "3gp"; + else if( strncmp(mime+6, "x-tivo-mpeg", 11) == 0 ) + return "TiVo"; ++ else if( strcmp(mime+6, "x-pn-realvideo") == 0 ) ++ return "rm"; + break; + case 'i': + if( strcmp(mime+6, "jpeg") == 0 ) +@@ -401,6 +403,7 @@ is_video(const char * file) + ends_with(file, ".m2t") || ends_with(file, ".mkv") || + ends_with(file, ".vob") || ends_with(file, ".ts") || + ends_with(file, ".flv") || ends_with(file, ".xvid") || ++ ends_with(file, ".rm") || ends_with(file, ".rmvb") || + #ifdef TIVO_SUPPORT + ends_with(file, ".TiVo") || + #endif +-- +2.20.1 + diff --git a/multimedia/minidlna/patches/010-lg.patch b/multimedia/minidlna/patches/010-lg.patch new file mode 100644 index 00000000..1fb48b13 --- /dev/null +++ b/multimedia/minidlna/patches/010-lg.patch @@ -0,0 +1,24 @@ +From eb473817d73b8740f27955f93950029fdfc9d73e Mon Sep 17 00:00:00 2001 +From: Daniel Kamil Kozar +Date: Sat, 15 Dec 2018 00:55:20 +0100 +Subject: [PATCH] LG webOS 3.5 devices require audio/flac in order to detect + FLAC + +Imported from https://sourceforge.net/p/minidlna/patches/176/ +--- + clients.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clients.c b/clients.c +index 42f0d1c..d324eab 100644 +--- a/clients.c ++++ b/clients.c +@@ -164,7 +164,7 @@ struct client_type_s client_types[] = + + /* USER-AGENT: Linux/2.6.35 UPnP/1.0 DLNADOC/1.50 INTEL_NMPR/2.0 LGE_DLNA_SDK/1.6.0 */ + { ELGNetCastDevice, +- FLAG_DLNA | FLAG_CAPTION_RES, ++ FLAG_DLNA | FLAG_CAPTION_RES | FLAG_MIME_FLAC_FLAC, + "LG", + "LGE_DLNA_SDK/1.6.0", + EUserAgent diff --git a/multimedia/minidlna/patches/010-libav-fix.patch b/multimedia/minidlna/patches/010-libav-fix.patch deleted file mode 100644 index 59245998..00000000 --- a/multimedia/minidlna/patches/010-libav-fix.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/libav.h -+++ b/libav.h -@@ -167,7 +167,7 @@ - static inline int - lav_is_thumbnail_stream(AVStream *s, uint8_t **data, int *size) - { --#if LIBAVFORMAT_VERSION_INT >= ((54<<16)+(6<<8)) -+/*if LIBAVFORMAT_VERSION_INT >= ((54<<16)+(6<<8)) - if (s->disposition & AV_DISPOSITION_ATTACHED_PIC && - s->codec->codec_id == AV_CODEC_ID_MJPEG) - { -@@ -177,6 +177,6 @@ - *size = s->attached_pic.size; - return 1; - } --#endif -+endif*/ - return 0; - } diff --git a/multimedia/minidlna/patches/020-add-support-for-dsd.patch b/multimedia/minidlna/patches/020-add-support-for-dsd.patch deleted file mode 100755 index 7631f0db..00000000 --- a/multimedia/minidlna/patches/020-add-support-for-dsd.patch +++ /dev/null @@ -1,981 +0,0 @@ -diff --git a/metadata.c b/metadata.c -index 2bfa8b9..dd2fec5 100644 ---- a/metadata.c -+++ b/metadata.c -@@ -337,6 +337,16 @@ GetAudioMetadata(const char *path, char *name) - strcpy(type, "pcm"); - m.mime = strdup("audio/L16"); - } -+ else if( ends_with(path, ".dsf") ) -+ { -+ strcpy(type, "dsf"); -+ m.mime = strdup("audio/x-dsd"); -+ } -+ else if( ends_with(path, ".dff") ) -+ { -+ strcpy(type, "dff"); -+ m.mime = strdup("audio/x-dsd"); -+ } - else - { - DPRINTF(E_WARN, L_METADATA, "Unhandled file extension on %s\n", path); -diff --git a/tagutils/.dirstamp b/tagutils/.dirstamp -new file mode 100644 -index 0000000..e69de29 -diff --git a/tagutils/tagutils-dff.c b/tagutils/tagutils-dff.c -new file mode 100644 -index 0000000..b250838 ---- /dev/null -+++ b/tagutils/tagutils-dff.c -@@ -0,0 +1,393 @@ -+//========================================================================= -+// FILENAME : tagutils-dff.c -+// DESCRIPTION : DFF metadata reader -+//========================================================================= -+// Copyright (c) 2014 Takeshich NAKAMURA -+//========================================================================= -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . -+ */ -+#define GET_DFF_INT64(p) ((((uint64_t)((p)[0])) << 56) | \ -+ (((uint64_t)((p)[1])) << 48) | \ -+ (((uint64_t)((p)[2])) << 40) | \ -+ (((uint64_t)((p)[3])) << 32) | \ -+ (((uint64_t)((p)[4])) << 24) | \ -+ (((uint64_t)((p)[5])) << 16) | \ -+ (((uint64_t)((p)[6])) << 8) | \ -+ (((uint64_t)((p)[7])) )) -+ -+#define GET_DFF_INT32(p) ((((uint32_t)((p)[0])) << 24) | \ -+ (((uint32_t)((p)[1])) << 16) | \ -+ (((uint32_t)((p)[2])) << 8) | \ -+ (((uint32_t)((p)[3])) )) -+ -+#define GET_DFF_INT16(p) ((((uint16_t)((p)[0])) << 8) | \ -+ (((uint16_t)((p)[1])) )) -+ -+static int -+_get_dfffileinfo(char *file, struct song_metadata *psong) -+{ -+ FILE *fp; -+ uint32_t len; -+ uint32_t rt; -+ unsigned char hdr[32] = {0}; -+ -+ uint64_t totalsize = 0; -+ uint64_t propckDataSize = 0; -+ uint64_t count = 0; -+ uint32_t samplerate = 0; -+ uint16_t channels = 0; -+ //DST -+ uint64_t dstickDataSize = 0; -+ uint32_t numFrames = 0; -+ uint16_t frameRate = 0; -+ unsigned char frteckData[18] = {0}; -+ unsigned char dstickData[12] = {0}; -+ uint64_t totalcount = 0; -+ unsigned char ckbuf[12] = {0}; -+ unsigned char compressionType[4] = {0}; -+ unsigned char dsdsdckData[12] = {0}; -+ uint64_t dsdsdckDataSize = 0; -+ uint64_t cmprckDataSize = 0; -+ uint64_t abssckDataSize = 0; -+ uint64_t lscockDataSize = 0; -+ uint64_t comtckDataSize = 0; -+ uint64_t diinckDataSize = 0; -+ uint64_t diarckDataSize = 0; -+ uint64_t ditickDataSize = 0; -+ uint64_t manfckDataSize = 0; -+ -+ //DPRINTF(E_DEBUG,L_SCANNER,"Getting DFF fileinfo =%s\n",file); -+ -+ if((fp = fopen(file, "rb")) == NULL) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not create file handle\n"); -+ return -1; -+ } -+ -+ len = 32; -+ //Form DSD chunk -+ if(!(rt = fread(hdr, len, 1,fp))) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not read Form DSD chunk from %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ if(strncmp((char*)hdr, "FRM8", 4)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid Form DSD chunk in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ totalsize = GET_DFF_INT64(hdr + 4) ; -+ -+ if(strncmp((char*)hdr+12, "DSD ", 4)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid Form DSD chunk in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ //FVER chunk -+ if(strncmp((char*)hdr+16, "FVER", 4)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid Format Version Chunk in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ totalsize -= 16; -+ while(totalcount < totalsize - 4) -+ { -+ -+ if(!(rt = fread(ckbuf, sizeof(ckbuf), 1,fp))) -+ { -+ //DPRINTF(E_WARN, L_SCANNER, "Could not read chunk header from %s\n", file); -+ //fclose(fp); -+ //return -1; -+ break; -+ } -+ -+ //Property chunk -+ if(strncmp((char*)ckbuf, "PROP", 4) == 0) -+ { -+ -+ -+ propckDataSize = GET_DFF_INT64(ckbuf + 4); -+ totalcount += propckDataSize + 12; -+ -+ unsigned char propckData[propckDataSize]; -+ -+ if(!(rt = fread(propckData, propckDataSize, 1,fp))) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not read Property chunk from %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ if(strncmp((char*)propckData, "SND ", 4)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid Property chunk in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ count += 4; -+ while(count < propckDataSize) -+ { -+ if(strncmp((char*)propckData+count, "FS ", 4) == 0) -+ { -+ //Sample Rate Chunk -+ count += 12; -+ samplerate = GET_DFF_INT32(propckData+count); -+ psong->samplerate = samplerate; -+ count += 4; -+ -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "Sample Rate is %d\n", psong->samplerate); -+ }else if(strncmp((char*)propckData+count, "CHNL", 4) == 0) -+ { -+ //Channels Chunk -+ count += 12; -+ channels = GET_DFF_INT16(propckData+count); -+ psong->channels = channels; -+ count += channels * 4 + 2; -+ -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "channels is %d\n", channels); -+ }else if(strncmp((char*)propckData+count, "CMPR", 4) == 0) -+ { -+ //Compression Type Chunk -+ count += 4; -+ cmprckDataSize = GET_DFF_INT64(propckData+count); -+ count += 8; -+ strncpy((char*)compressionType,(char*)propckData+count,4); -+ count += cmprckDataSize; -+ -+ }else if(strncmp((char*)propckData+count, "ABSS", 4) == 0) -+ { -+ //Absolute Start Time Chunk -+ count += 4; -+ abssckDataSize = GET_DFF_INT64(propckData+count); -+ count += abssckDataSize + 8; -+ -+ }else if(strncmp((char*)propckData+count, "LSCO", 4) == 0) -+ { -+ //Loudsperaker Configuration Chunk -+ count += 4; -+ lscockDataSize = GET_DFF_INT64(propckData+count); -+ count += lscockDataSize + 8; -+ -+ }else{ -+ break; -+ } -+ } -+ -+ //bitrate bitpersample is 1bit -+ psong->bitrate = channels * samplerate * 1; -+ -+ //DSD/DST Sound Data Chunk -+ len = 12; -+ if(!(rt = fread(dsdsdckData, len, 1,fp))) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not read DSD/DST Sound Data chunk from %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ if(strncmp((char*)compressionType,(char*)dsdsdckData , 4)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid DSD/DST Sound Data chunk in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ if(strncmp((char*)dsdsdckData,"DSD " , 4) == 0) -+ { -+ //DSD -+ dsdsdckDataSize = GET_DFF_INT64(dsdsdckData+4); -+ totalcount += dsdsdckDataSize + 12; -+ psong->song_length = (int)((double)dsdsdckDataSize / (double)samplerate / (double)channels * 8 * 1000); -+ -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "songlength is %d\n", psong->song_length); -+ -+ fseeko(fp, dsdsdckDataSize,SEEK_CUR); -+ }else if(strncmp((char*)dsdsdckData,"DST " , 4) == 0) -+ { -+ //DST -+ dsdsdckDataSize = GET_DFF_INT64(dsdsdckData+4); -+ totalcount += dsdsdckDataSize + 12; -+ -+ //DST Frame Information chunk -+ if(!(rt = fread(frteckData, 18, 1,fp))) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not read DST Frame Information chunk from %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ if(strncmp((char*)frteckData ,"FRTE", 4) == 0) -+ { -+ //uint64_t frteckDataSize = GET_DFF_INT64(frteckData+4); -+ numFrames = GET_DFF_INT32((char*)frteckData+12); -+ frameRate = GET_DFF_INT16((char*)frteckData+16); -+ -+ psong->song_length = numFrames / frameRate * 1000; -+ -+ fseeko(fp, dsdsdckDataSize-18,SEEK_CUR); -+ }else -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid DST Frame Information chunk in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ //DST Sound Index Chunk -+ if(!(rt = fread(dstickData, 12, 1,fp))) -+ { -+ if (ferror(fp)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not read DST Sound Index chunk from %s\n", file); -+ fclose(fp); -+ return -1; -+ }else -+ { -+ //EOF -+ break; -+ } -+ } -+ -+ if(strncmp((char*)dstickData ,"DSTI", 4) == 0) -+ { -+ dstickDataSize = GET_DFF_INT64(dstickData+4); -+ totalcount += dstickDataSize + 12; -+ fseeko(fp, dstickDataSize,SEEK_CUR); -+ }else -+ { -+ fseeko(fp, -12,SEEK_CUR); -+ } -+ }else -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid DSD/DST Sound Data chunk in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ }else if(!strncmp((char*)ckbuf ,"COMT", 4)) -+ { -+ //COMT Chunk -+ comtckDataSize = GET_DFF_INT64(ckbuf+4); -+ totalcount += comtckDataSize + 12; -+ fseeko(fp, comtckDataSize,SEEK_CUR); -+ -+ }else if(!strncmp((char*)ckbuf ,"DIIN", 4)) -+ { -+ //Edited Master Information chunk -+ diinckDataSize = GET_DFF_INT64(ckbuf+4); -+ unsigned char diinckData[diinckDataSize]; -+ totalcount += diinckDataSize + 12; -+ -+ if(!(rt = fread(diinckData, diinckDataSize, 1,fp))) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not read Edited Master Information chunk from %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ uint64_t icount = 0; -+ while(icount < diinckDataSize) -+ { -+ if(!strncmp((char*)diinckData+icount ,"EMID", 4)) -+ { -+ //Edited Master ID chunk -+ icount += 4; -+ icount += GET_DFF_INT64(diinckData+icount) + 8; -+ -+ }else if(!strncmp((char*)diinckData+icount ,"MARK", 4)) -+ { -+ //Master Chunk -+ icount += 4; -+ icount += GET_DFF_INT64(diinckData+icount) + 8; -+ -+ }else if(!strncmp((char*)diinckData+icount ,"DIAR", 4)) -+ { -+ //Artist Chunk -+ icount += 4; -+ diarckDataSize = GET_DFF_INT64(diinckData+icount); -+ unsigned char arttext[diarckDataSize +1 - 4]; -+ -+ icount += 12; -+ -+ memset(arttext,0x00,sizeof(arttext)); -+ strncpy((char*)arttext,(char*)diinckData+icount,sizeof(arttext)-1); -+ psong->contributor[ROLE_ARTIST] = strdup((char*)&arttext[0]); -+ -+ icount += diarckDataSize - 4; -+ -+ }else if(!strncmp((char*)diinckData+icount ,"DITI", 4)) -+ { -+ //Title Chunk -+ icount += 4; -+ ditickDataSize = GET_DFF_INT64(diinckData+icount); -+ unsigned char titletext[ditickDataSize+1 - 4]; -+ -+ icount += 12; -+ -+ memset(titletext,0x00,sizeof(titletext)); -+ strncpy((char*)titletext,(char*)diinckData+icount,sizeof(titletext)-1); -+ psong->title = strdup((char*)&titletext[0]); -+ icount += ditickDataSize - 4; -+ -+ }else -+ { -+ break; -+ } -+ } -+ }else if(!strncmp((char*)ckbuf ,"MANF", 4)) -+ { -+ //Manufacturer Specific Chunk -+ manfckDataSize = GET_DFF_INT64(ckbuf+4); -+ totalcount += manfckDataSize + 12; -+ fseeko(fp, manfckDataSize,SEEK_CUR); -+ -+ } -+ } -+ -+ fclose(fp); -+ -+ //DPRINTF(E_DEBUG, L_SCANNER, "totalsize is 0x%016lx\n", (long unsigned int)totalsize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "propckDataSize is 0x%016lx\n", (long unsigned int)propckDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "cmprckDataSize is 0x%016lx\n", (long unsigned int)cmprckDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "abssckDataSize is 0x%016lx\n", (long unsigned int)abssckDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "lscockDataSize is 0x%016lx\n", (long unsigned int)lscockDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "dsdsdckDataSize is 0x%016lx\n", (long unsigned int)dsdsdckDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "dstickDataSize is 0x%016lx\n", (long unsigned int)dstickDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "comtckDataSize is 0x%016lx\n", (long unsigned int)comtckDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "diinckDataSize is 0x%016lx\n", (long unsigned int)diinckDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "diarckDataSize is 0x%016lx\n", (long unsigned int)diarckDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "ditickDataSize is 0x%016lx\n", (long unsigned int)ditickDataSize); -+ //DPRINTF(E_DEBUG, L_SCANNER, "manfckDataSize is 0x%016lx\n", (long unsigned int)manfckDataSize); -+ -+ -+ //DPRINTF(E_DEBUG, L_SCANNER, "Got dff fileinfo successfully=%s\n", file); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "TITLE is %s\n",psong->title ); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "ARTIST is %s\n",psong->contributor[ROLE_ARTIST]); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "samplerate is %d\n", psong->samplerate); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "song_length is %d\n", psong->song_length); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "channels are %d\n", psong->channels); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "bitrate is %d\n", psong->bitrate); -+ -+ xasprintf(&(psong->dlna_pn), "DFF"); -+ return 0; -+} -diff --git a/tagutils/tagutils-dff.h b/tagutils/tagutils-dff.h -new file mode 100644 -index 0000000..7f3e3a4 ---- /dev/null -+++ b/tagutils/tagutils-dff.h -@@ -0,0 +1,22 @@ -+//========================================================================= -+// FILENAME : tagutils-dff.h -+// DESCRIPTION : DFF metadata reader -+//========================================================================= -+// Copyright (c) 2014 Takeshich NAKAMURA -+//========================================================================= -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . -+ */ -+static int _get_dfffileinfo(char *file, struct song_metadata *psong); -diff --git a/tagutils/tagutils-dsf.c b/tagutils/tagutils-dsf.c -new file mode 100644 -index 0000000..49d1132 ---- /dev/null -+++ b/tagutils/tagutils-dsf.c -@@ -0,0 +1,428 @@ -+//========================================================================= -+// FILENAME : tagutils-dsf.c -+// DESCRIPTION : DSF metadata reader -+//========================================================================= -+// Copyright (c) 2014 Takeshich NAKAMURA -+// based on tagutils-mp3.c -+//========================================================================= -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . -+ */ -+ -+#define GET_DSF_INT64(p) ((((uint64_t)((p)[7])) << 56) | \ -+ (((uint64_t)((p)[6])) << 48) | \ -+ (((uint64_t)((p)[5])) << 40) | \ -+ (((uint64_t)((p)[4])) << 32) | \ -+ (((uint64_t)((p)[3])) << 24) | \ -+ (((uint64_t)((p)[2])) << 16) | \ -+ (((uint64_t)((p)[1])) << 8) | \ -+ (((uint64_t)((p)[0])))) -+ -+#define GET_DSF_INT32(p) ((((uint8_t)((p)[3])) << 24) | \ -+ (((uint8_t)((p)[2])) << 16) | \ -+ (((uint8_t)((p)[1])) << 8) | \ -+ (((uint8_t)((p)[0])))) -+ -+static int -+_get_dsftags(char *file, struct song_metadata *psong) -+{ -+ struct id3_tag *pid3tag; -+ struct id3_frame *pid3frame; -+ int err; -+ int index; -+ int used; -+ unsigned char *utf8_text; -+ int genre = WINAMP_GENRE_UNKNOWN; -+ int have_utf8; -+ int have_text; -+ id3_ucs4_t const *native_text; -+ char *tmp; -+ int got_numeric_genre; -+ id3_byte_t const *image; -+ id3_length_t image_size = 0; -+ -+ FILE *fp; -+ struct id3header *pid3; -+ uint32_t len; -+ unsigned char hdr[28] = {0}; -+ uint64_t total_size = 0; -+ uint64_t pointer_to_metadata_chunk = 0; -+ uint64_t metadata_chunk_size = 0; -+ unsigned char *id3tagbuf = NULL; -+ -+ //DEBUG DPRINTF(E_DEBUG,L_SCANNER,"Getting DSF file info\n"); -+ -+ if((fp = fopen(file, "rb")) == NULL) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not create file handle\n"); -+ return -1; -+ } -+ -+ len = 28; -+ if(!(len = fread(hdr, len, 1,fp))) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not read DSD Chunk from %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ if(strncmp((char*)hdr, "DSD ", 4)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid DSD Chunk header in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ total_size = GET_DSF_INT64(hdr + 12); -+ pointer_to_metadata_chunk = GET_DSF_INT64(hdr + 20); -+ metadata_chunk_size = total_size - pointer_to_metadata_chunk; -+ -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "%llu\n", total_size); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "%llu\n", pointer_to_metadata_chunk); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "%llu\n", metadata_chunk_size); -+ -+ //check invalid metadata -+ if(total_size == 0) -+ { -+ fclose(fp); -+ DPRINTF(E_INFO, L_SCANNER, "Invalid TotalDataSize in %s\n", file); -+ return 0; -+ } -+ -+ if(pointer_to_metadata_chunk == 0) -+ { -+ fclose(fp); -+ DPRINTF(E_INFO, L_SCANNER, "Metadata doesn't exist %s\n", file); -+ return 0; -+ } -+ -+ if(total_size > pointer_to_metadata_chunk) -+ { -+ metadata_chunk_size = total_size - pointer_to_metadata_chunk; -+ } -+ else -+ { -+ fclose(fp); -+ DPRINTF(E_INFO, L_SCANNER, "Invalid PointerToMetadata in %s\n", file); -+ return 0; -+ } -+ -+ fseeko(fp, pointer_to_metadata_chunk,SEEK_SET); -+ -+ id3tagbuf = (unsigned char *)malloc(sizeof(unsigned char)*metadata_chunk_size); -+ if(id3tagbuf == NULL) -+ { -+ fclose(fp); -+ DPRINTF(E_WARN, L_SCANNER, "Out of memory.Big MetadataSize in %s\n",file); -+ return -1; -+ } -+ memset(id3tagbuf, 0,sizeof(unsigned char)*metadata_chunk_size); -+ -+ if(!(len = fread(id3tagbuf,metadata_chunk_size,1,fp))) -+ { -+ fclose(fp); -+ free(id3tagbuf); -+ DPRINTF(E_WARN, L_SCANNER, "Could not read Metadata Chunk from %s\n", file); -+ return -1; -+ } -+ -+ pid3tag = id3_tag_parse(id3tagbuf,metadata_chunk_size); -+ -+ if(!pid3tag) -+ { -+ free(id3tagbuf); -+ err = errno; -+ fclose(fp); -+ errno = err; -+ DPRINTF(E_WARN, L_SCANNER, "Cannot get ID3 tag for %s\n", file); -+ return -1; -+ } -+ -+ pid3 = (struct id3header*)id3tagbuf; -+ -+ if(strncmp((char*)pid3->id, "ID3", 3) == 0) -+ { -+ char tagversion[16]; -+ -+ /* found an ID3 header... */ -+ snprintf(tagversion, sizeof(tagversion), "ID3v2.%d.%d", -+ pid3->version[0], pid3->version[1]); -+ psong->tagversion = strdup(tagversion); -+ } -+ pid3 = NULL; -+ -+ index = 0; -+ while((pid3frame = id3_tag_findframe(pid3tag, "", index))) -+ { -+ used = 0; -+ utf8_text = NULL; -+ native_text = NULL; -+ have_utf8 = 0; -+ have_text = 0; -+ -+ if(!strcmp(pid3frame->id, "YTCP")) /* for id3v2.2 */ -+ { -+ psong->compilation = 1; -+ DPRINTF(E_DEBUG, L_SCANNER, "Compilation: %d [%s]\n", psong->compilation, basename(file)); -+ } -+ else if(!strcmp(pid3frame->id, "APIC") && !image_size) -+ { -+ if( (strcmp((char*)id3_field_getlatin1(&pid3frame->fields[1]), "image/jpeg") == 0) || -+ (strcmp((char*)id3_field_getlatin1(&pid3frame->fields[1]), "image/jpg") == 0) || -+ (strcmp((char*)id3_field_getlatin1(&pid3frame->fields[1]), "jpeg") == 0) ) -+ { -+ image = id3_field_getbinarydata(&pid3frame->fields[4], &image_size); -+ if( image_size ) -+ { -+ psong->image = malloc(image_size); -+ memcpy(psong->image, image, image_size); -+ psong->image_size = image_size; -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "Found thumbnail: %d\n", psong->image_size); -+ } -+ } -+ } -+ -+ if(((pid3frame->id[0] == 'T') || (strcmp(pid3frame->id, "COMM") == 0)) && -+ (id3_field_getnstrings(&pid3frame->fields[1]))) -+ have_text = 1; -+ -+ if(have_text) -+ { -+ native_text = id3_field_getstrings(&pid3frame->fields[1], 0); -+ -+ if(native_text) -+ { -+ have_utf8 = 1; -+ if(lang_index >= 0) -+ utf8_text = _get_utf8_text(native_text); // through iconv -+ else -+ utf8_text = (unsigned char*)id3_ucs4_utf8duplicate(native_text); -+ -+ if(!strcmp(pid3frame->id, "TIT2")) -+ { -+ used = 1; -+ psong->title = (char*)utf8_text; -+ } -+ else if(!strcmp(pid3frame->id, "TPE1")) -+ { -+ used = 1; -+ psong->contributor[ROLE_ARTIST] = (char*)utf8_text; -+ } -+ else if(!strcmp(pid3frame->id, "TALB")) -+ { -+ used = 1; -+ psong->album = (char*)utf8_text; -+ } -+ else if(!strcmp(pid3frame->id, "TCOM")) -+ { -+ used = 1; -+ psong->contributor[ROLE_COMPOSER] = (char*)utf8_text; -+ } -+ else if(!strcmp(pid3frame->id, "TIT1")) -+ { -+ used = 1; -+ psong->grouping = (char*)utf8_text; -+ } -+ else if(!strcmp(pid3frame->id, "TPE2")) -+ { -+ used = 1; -+ psong->contributor[ROLE_BAND] = (char*)utf8_text; -+ } -+ else if(!strcmp(pid3frame->id, "TPE3")) -+ { -+ used = 1; -+ psong->contributor[ROLE_CONDUCTOR] = (char*)utf8_text; -+ } -+ else if(!strcmp(pid3frame->id, "TCON")) -+ { -+ used = 1; -+ psong->genre = (char*)utf8_text; -+ got_numeric_genre = 0; -+ if(psong->genre) -+ { -+ if(!strlen(psong->genre)) -+ { -+ genre = WINAMP_GENRE_UNKNOWN; -+ got_numeric_genre = 1; -+ } -+ else if(isdigit(psong->genre[0])) -+ { -+ genre = atoi(psong->genre); -+ got_numeric_genre = 1; -+ } -+ else if((psong->genre[0] == '(') && (isdigit(psong->genre[1]))) -+ { -+ genre = atoi((char*)&psong->genre[1]); -+ got_numeric_genre = 1; -+ } -+ -+ if(got_numeric_genre) -+ { -+ if((genre < 0) || (genre > WINAMP_GENRE_UNKNOWN)) -+ genre = WINAMP_GENRE_UNKNOWN; -+ free(psong->genre); -+ psong->genre = strdup(winamp_genre[genre]); -+ } -+ } -+ } -+ else if(!strcmp(pid3frame->id, "COMM")) -+ { -+ used = 1; -+ psong->comment = (char*)utf8_text; -+ } -+ else if(!strcmp(pid3frame->id, "TPOS")) -+ { -+ tmp = (char*)utf8_text; -+ strsep(&tmp, "/"); -+ if(tmp) -+ { -+ psong->total_discs = atoi(tmp); -+ } -+ psong->disc = atoi((char*)utf8_text); -+ } -+ else if(!strcmp(pid3frame->id, "TRCK")) -+ { -+ tmp = (char*)utf8_text; -+ strsep(&tmp, "/"); -+ if(tmp) -+ { -+ psong->total_tracks = atoi(tmp); -+ } -+ psong->track = atoi((char*)utf8_text); -+ } -+ else if(!strcmp(pid3frame->id, "TDRC")) -+ { -+ psong->year = atoi((char*)utf8_text); -+ } -+ else if(!strcmp(pid3frame->id, "TLEN")) -+ { -+ psong->song_length = atoi((char*)utf8_text); -+ } -+ else if(!strcmp(pid3frame->id, "TBPM")) -+ { -+ psong->bpm = atoi((char*)utf8_text); -+ } -+ else if(!strcmp(pid3frame->id, "TCMP")) -+ { -+ psong->compilation = (char)atoi((char*)utf8_text); -+ } -+ } -+ } -+ -+ // check if text tag -+ if((!used) && (have_utf8) && (utf8_text)) -+ free(utf8_text); -+ -+ // v2 COMM -+ if((!strcmp(pid3frame->id, "COMM")) && (pid3frame->nfields == 4)) -+ { -+ native_text = id3_field_getstring(&pid3frame->fields[2]); -+ if(native_text) -+ { -+ utf8_text = (unsigned char*)id3_ucs4_utf8duplicate(native_text); -+ if((utf8_text) && (strncasecmp((char*)utf8_text, "iTun", 4) != 0)) -+ { -+ // read comment -+ free(utf8_text); -+ -+ native_text = id3_field_getfullstring(&pid3frame->fields[3]); -+ if(native_text) -+ { -+ utf8_text = (unsigned char*)id3_ucs4_utf8duplicate(native_text); -+ if(utf8_text) -+ { -+ free(psong->comment); -+ psong->comment = (char*)utf8_text; -+ } -+ } -+ } -+ else -+ { -+ free(utf8_text); -+ } -+ } -+ } -+ -+ index++; -+ } -+ -+ id3_tag_delete(pid3tag); -+ free(id3tagbuf); -+ fclose(fp); -+ //DPRINTF(E_DEBUG, L_SCANNER, "Got id3tag successfully for file=%s\n", file); -+ return 0; -+} -+ -+static int -+_get_dsffileinfo(char *file, struct song_metadata *psong) -+{ -+ FILE *fp; -+ int len = 80; -+ unsigned char hdr[len]; -+ uint32_t channelnum; -+ uint32_t samplingfrequency; -+ uint32_t bitpersample; -+ uint64_t samplecount; -+ -+ if((fp = fopen(file, "rb")) == NULL) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not create file handle\n"); -+ return -1; -+ } -+ -+ if(!(len = fread(hdr, len, 1,fp))) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Could not read chunks from %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ if(strncmp((char*)hdr, "DSD ", 4)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid DSD Chunk headerin %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ if(strncmp((char*)hdr+28, "fmt ", 4)) -+ { -+ DPRINTF(E_WARN, L_SCANNER, "Invalid fmt Chunk header in %s\n", file); -+ fclose(fp); -+ return -1; -+ } -+ -+ channelnum = GET_DSF_INT32(hdr + 52); -+ samplingfrequency = GET_DSF_INT32(hdr + 56); -+ bitpersample = GET_DSF_INT32(hdr + 60); -+ samplecount = GET_DSF_INT64(hdr + 64); -+ -+ psong->bitrate = channelnum * samplingfrequency * bitpersample; -+ psong->samplesize = bitpersample; -+ psong->samplerate = samplingfrequency; -+ psong->song_length = (samplecount / samplingfrequency) * 1000; -+ psong->channels = channelnum; -+ -+ //DEBUG DPRINTF(E_INFO, L_SCANNER, "Got fileinfo successfully from =%s\n", file); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "bitrate is %d\n", psong->bitrate); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "samplesize is %d\n", psong->samplesize); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "samplerate is %d\n", psong->samplerate); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "song_length is %d\n", psong->song_length); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "channels are %d\n", psong->channels); -+ //DEBUG DPRINTF(E_DEBUG, L_SCANNER, "samplecount are %lld\n", samplecount); -+ fclose(fp); -+ -+ xasprintf(&(psong->dlna_pn), "DSF"); -+ return 0; -+} -diff --git a/tagutils/tagutils-dsf.h b/tagutils/tagutils-dsf.h -new file mode 100644 -index 0000000..9b7634e ---- /dev/null -+++ b/tagutils/tagutils-dsf.h -@@ -0,0 +1,23 @@ -+//========================================================================= -+// FILENAME : tagutils-dsf.h -+// DESCRIPTION : DSF metadata reader -+//========================================================================= -+// Copyright (c) 2014 Takeshich NAKAMURA -+//========================================================================= -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . -+ */ -+static int _get_dsffileinfo(char *file, struct song_metadata *psong); -+static int _get_dsftags(char *file, struct song_metadata *psong); -diff --git a/tagutils/tagutils.c b/tagutils/tagutils.c -index 794e7b9..bb75eb6 100644 ---- a/tagutils/tagutils.c -+++ b/tagutils/tagutils.c -@@ -107,6 +107,8 @@ char *winamp_genre[] = { - #include "tagutils-asf.h" - #include "tagutils-wav.h" - #include "tagutils-pcm.h" -+#include "tagutils-dsf.h" -+#include "tagutils-dff.h" - - static int _get_tags(char *file, struct song_metadata *psong); - static int _get_fileinfo(char *file, struct song_metadata *psong); -@@ -130,6 +132,8 @@ static taghandler taghandlers[] = { - { "asf", 0, _get_asffileinfo }, - { "wav", _get_wavtags, _get_wavfileinfo }, - { "pcm", 0, _get_pcmfileinfo }, -+ { "dsf", _get_dsftags, _get_dsffileinfo }, -+ { "dff", 0, _get_dfffileinfo }, - { NULL, 0 } - }; - -@@ -144,6 +148,8 @@ static taghandler taghandlers[] = { - #include "tagutils-asf.c" - #include "tagutils-wav.c" - #include "tagutils-pcm.c" -+#include "tagutils-dsf.c" -+#include "tagutils-dff.c" - #include "tagutils-plist.c" - - //********************************************************************************* -diff --git a/upnpglobalvars.h b/upnpglobalvars.h -index c4b9158..c7a7747 100644 ---- a/upnpglobalvars.h -+++ b/upnpglobalvars.h -@@ -169,6 +169,7 @@ - "http-get:*:audio/mp4:*," \ - "http-get:*:audio/x-wav:*," \ - "http-get:*:audio/x-flac:*," \ - "http-get:*:audio/x-ape:*," \ -+ "http-get:*:audio/x-dsd:*," \ - "http-get:*:application/ogg:*" - - #define DLNA_FLAG_DLNA_V1_5 0x00100000 -diff --git a/utils.c b/utils.c -index 5a233dc..d010b41 100644 ---- a/utils.c -+++ b/utils.c -@@ -331,6 +331,8 @@ mime_to_ext(const char * mime) - return "3gp"; - else if( strcmp(mime, "application/ogg") == 0 ) - return "ogg"; -+ else if( strcmp(mime+6, "x-dsd") == 0 ) -+ return "dsd"; - break; - case 'v': - if( strcmp(mime+6, "avi") == 0 ) -@@ -398,7 +400,8 @@ is_audio(const char * file) - ends_with(file, ".m4a") || ends_with(file, ".aac") || - ends_with(file, ".mp4") || ends_with(file, ".m4p") || - ends_with(file, ".wav") || ends_with(file, ".ogg") || -- ends_with(file, ".pcm") || ends_with(file, ".3gp")); -+ ends_with(file, ".pcm") || ends_with(file, ".3gp") || -+ ends_with(file, ".dsf") || ends_with(file, ".dff")); - } - - int diff --git a/multimedia/minidlna/patches/020-wrap_container_definitions_into_a_structure.patch b/multimedia/minidlna/patches/020-wrap_container_definitions_into_a_structure.patch new file mode 100644 index 00000000..4733b32f --- /dev/null +++ b/multimedia/minidlna/patches/020-wrap_container_definitions_into_a_structure.patch @@ -0,0 +1,124 @@ +From e0065b8343bc963a89556449e00f1d20086cc1f1 Mon Sep 17 00:00:00 2001 +From: Daniel Kamil Kozar +Date: Sat, 15 Dec 2018 16:26:37 +0100 +Subject: [PATCH] Wrap container definitions into a structure + +--- + containers.c | 25 +++++++++++++++++++++++++ + containers.h | 8 ++++++++ + scanner.c | 33 ++++++--------------------------- + 3 files changed, 39 insertions(+), 27 deletions(-) + +diff --git a/containers.c b/containers.c +index f5cece1..19a0bb1 100644 +--- a/containers.c ++++ b/containers.c +@@ -23,6 +23,31 @@ + #include "containers.h" + #include "log.h" + ++const struct container_s containers[] = { ++ { "0","-1", "root" }, ++ { MUSIC_ID, "0", "Music" }, ++ { MUSIC_ALL_ID, MUSIC_ID, "All Music" }, ++ { MUSIC_GENRE_ID, MUSIC_ID, "Genre" }, ++ { MUSIC_ARTIST_ID, MUSIC_ID, "Artist" }, ++ { MUSIC_ALBUM_ID, MUSIC_ID, "Album" }, ++ { MUSIC_DIR_ID, MUSIC_ID, "Folders" }, ++ { MUSIC_PLIST_ID, MUSIC_ID, "Playlists" }, ++ ++ { VIDEO_ID, "0", "Video" }, ++ { VIDEO_ALL_ID, VIDEO_ID, "All Video" }, ++ { VIDEO_DIR_ID, VIDEO_ID, "Folders" }, ++ ++ { IMAGE_ID, "0", "Pictures" }, ++ { IMAGE_ALL_ID, IMAGE_ID, "All Pictures" }, ++ { IMAGE_DATE_ID, IMAGE_ID, "Date Taken" }, ++ { IMAGE_CAMERA_ID, IMAGE_ID, "Camera" }, ++ { IMAGE_DIR_ID, IMAGE_ID, "Folders" }, ++ ++ { BROWSEDIR_ID, "0", "Browse Folders" }, ++ ++ { 0, 0, 0 } ++}; ++ + #define NINETY_DAYS "7776000" + + const char *music_id = MUSIC_ID; +diff --git a/containers.h b/containers.h +index aef77c5..1fcf7cd 100644 +--- a/containers.h ++++ b/containers.h +@@ -16,6 +16,14 @@ + * along with MiniDLNA. If not, see . + */ + ++struct container_s { ++ const char *object_id; ++ const char *parent_id; ++ const char *name; ++}; ++ ++extern const struct container_s containers[]; ++ + struct magic_container_s { + const char *name; + const char *objectid_match; +diff --git a/scanner.c b/scanner.c +index a730567..eb26c9e 100644 +--- a/scanner.c ++++ b/scanner.c +@@ -529,30 +529,7 @@ insert_file(const char *name, const char *path, const char *parentID, int object + int + CreateDatabase(void) + { +- int ret, i; +- const char *containers[] = { "0","-1", "root", +- MUSIC_ID, "0", _("Music"), +- MUSIC_ALL_ID, MUSIC_ID, _("All Music"), +- MUSIC_GENRE_ID, MUSIC_ID, _("Genre"), +- MUSIC_ARTIST_ID, MUSIC_ID, _("Artist"), +- MUSIC_ALBUM_ID, MUSIC_ID, _("Album"), +- MUSIC_DIR_ID, MUSIC_ID, _("Folders"), +- MUSIC_PLIST_ID, MUSIC_ID, _("Playlists"), +- +- VIDEO_ID, "0", _("Video"), +- VIDEO_ALL_ID, VIDEO_ID, _("All Video"), +- VIDEO_DIR_ID, VIDEO_ID, _("Folders"), +- +- IMAGE_ID, "0", _("Pictures"), +- IMAGE_ALL_ID, IMAGE_ID, _("All Pictures"), +- IMAGE_DATE_ID, IMAGE_ID, _("Date Taken"), +- IMAGE_CAMERA_ID, IMAGE_ID, _("Camera"), +- IMAGE_DIR_ID, IMAGE_ID, _("Folders"), +- +- BROWSEDIR_ID, "0", _("Browse Folders"), +- 0 }; +- +- ret = sql_exec(db, create_objectTable_sqlite); ++ int ret = sql_exec(db, create_objectTable_sqlite); + if( ret != SQLITE_OK ) + goto sql_failed; + ret = sql_exec(db, create_detailTable_sqlite); +@@ -576,16 +553,18 @@ CreateDatabase(void) + ret = sql_exec(db, "INSERT into SETTINGS values ('UPDATE_ID', '0')"); + if( ret != SQLITE_OK ) + goto sql_failed; +- for( i=0; containers[i]; i=i+3 ) ++ for( int i=0; containers[i].name; ++i ) + { ++ const struct container_s *c = &containers[i]; ++ const char *name = _(c->name); + ret = sql_exec(db, "INSERT into OBJECTS (OBJECT_ID, PARENT_ID, DETAIL_ID, CLASS, NAME)" + " values " + "('%s', '%s', %lld, 'container.storageFolder', '%q')", +- containers[i], containers[i+1], GetFolderMetadata(containers[i+2], NULL, NULL, NULL, 0), containers[i+2]); ++ c->object_id, c->parent_id, GetFolderMetadata(name, NULL, NULL, NULL, 0), name); + if( ret != SQLITE_OK ) + goto sql_failed; + } +- for( i=0; magic_containers[i].objectid_match; i++ ) ++ for( int i=0; magic_containers[i].objectid_match; i++ ) + { + struct magic_container_s *magic = &magic_containers[i]; + if (!magic->name) diff --git a/multimedia/minidlna/patches/030-add-rm-rmbv-webm-format.patch b/multimedia/minidlna/patches/030-add-rm-rmbv-webm-format.patch deleted file mode 100644 index e0460f4c..00000000 --- a/multimedia/minidlna/patches/030-add-rm-rmbv-webm-format.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 4189368bba79d944edb54d4c7d476565e98c3e8b Mon Sep 17 00:00:00 2001 -From: lqs -Date: Sun, 21 Apr 2019 09:48:00 +0000 -Subject: [PATCH] add webm/rm/rmvb support - ---- - metadata.c | 8 ++++++++ - upnpglobalvars.h | 5 ++++- - utils.c | 4 +++- - 3 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/metadata.c b/metadata.c -index 9cd86dc..f1207da 100644 ---- a/metadata.c -+++ b/metadata.c -@@ -862,6 +862,10 @@ GetVideoMetadata(const char *path, const char *name) - xasprintf(&m.mime, "video/x-matroska"); - else if( strcmp(ctx->iformat->name, "flv") == 0 ) - xasprintf(&m.mime, "video/x-flv"); -+ else if( strcmp(ctx->iformat->name, "rm") == 0 ) -+ xasprintf(&m.mime, "application/vnd.rn-realmedia"); -+ else if( strcmp(ctx->iformat->name, "rmvb") == 0 ) -+ xasprintf(&m.mime, "application/vnd.rn-realmedia-vbr"); - if( m.mime ) - goto video_no_dlna; - -@@ -1538,6 +1542,10 @@ GetVideoMetadata(const char *path, const char *name) - xasprintf(&m.mime, "video/x-matroska"); - else if( strcmp(ctx->iformat->name, "flv") == 0 ) - xasprintf(&m.mime, "video/x-flv"); -+ else if( strcmp(ctx->iformat->name, "rm") == 0 ) -+ xasprintf(&m.mime, "application/vnd.rn-realmedia"); -+ else if( strcmp(ctx->iformat->name, "rmvb") == 0 ) -+ xasprintf(&m.mime, "application/vnd.rn-realmedia-vbr"); - else - DPRINTF(E_WARN, L_METADATA, "%s: Unhandled format: %s\n", path, ctx->iformat->name); - } -diff --git a/upnpglobalvars.h b/upnpglobalvars.h -index 1a2fb5e..cc0cc99 100644 ---- a/upnpglobalvars.h -+++ b/upnpglobalvars.h -@@ -172,7 +172,10 @@ - "http-get:*:audio/x-wav:*," \ - "http-get:*:audio/x-flac:*," \ - "http-get:*:audio/x-dsd:*," \ -- "http-get:*:application/ogg:*" -+ "http-get:*:application/ogg:*" \ -+ "http-get:*:application/vnd.rn-realmedia:*" \ -+ "http-get:*:application/vnd.rn-realmedia-vbr:*" \ -+ "http-get:*:video/webm:*" - - #define DLNA_FLAG_DLNA_V1_5 0x00100000 - #define DLNA_FLAG_HTTP_STALLING 0x00200000 -diff --git a/utils.c b/utils.c -index dc936f9..03ba850 100644 ---- a/utils.c -+++ b/utils.c -@@ -404,7 +404,9 @@ is_video(const char * file) - #ifdef TIVO_SUPPORT - ends_with(file, ".TiVo") || - #endif -- ends_with(file, ".mov") || ends_with(file, ".3gp")); -+ ends_with(file, ".mov") || ends_with(file, ".3gp") || -+ ends_with(file, ".rm") || ends_with(file, ".rmvb") || -+ ends_with(file, ".webm")); - } - - int diff --git a/multimedia/minidlna/patches/030-mark_all_instances_of_magic_container_s_as_const.patch b/multimedia/minidlna/patches/030-mark_all_instances_of_magic_container_s_as_const.patch new file mode 100644 index 00000000..44a27665 --- /dev/null +++ b/multimedia/minidlna/patches/030-mark_all_instances_of_magic_container_s_as_const.patch @@ -0,0 +1,125 @@ +From d297624e533d6d4274c750e3769749c3d7f121c8 Mon Sep 17 00:00:00 2001 +From: Daniel Kamil Kozar +Date: Sat, 15 Dec 2018 16:34:30 +0100 +Subject: [PATCH] Mark all instances of magic_container_s as const + +--- + containers.c | 38 +++++++++++++++++++------------------- + containers.h | 6 +++--- + scanner.c | 2 +- + upnpsoap.c | 6 +++--- + 4 files changed, 26 insertions(+), 26 deletions(-) + +--- a/containers.c ++++ b/containers.c +@@ -50,23 +50,23 @@ + + #define NINETY_DAYS "7776000" + +-const char *music_id = MUSIC_ID; +-const char *music_all_id = MUSIC_ALL_ID; +-const char *music_genre_id = MUSIC_GENRE_ID; +-const char *music_artist_id = MUSIC_ARTIST_ID; +-const char *music_album_id = MUSIC_ALBUM_ID; +-const char *music_plist_id = MUSIC_PLIST_ID; +-const char *music_dir_id = MUSIC_DIR_ID; +-const char *video_id = VIDEO_ID; +-const char *video_all_id = VIDEO_ALL_ID; +-const char *video_dir_id = VIDEO_DIR_ID; +-const char *image_id = IMAGE_ID; +-const char *image_all_id = IMAGE_ALL_ID; +-const char *image_date_id = IMAGE_DATE_ID; +-const char *image_camera_id = IMAGE_CAMERA_ID; +-const char *image_dir_id = IMAGE_DIR_ID; ++static const char *music_id = MUSIC_ID; ++static const char *music_all_id = MUSIC_ALL_ID; ++static const char *music_genre_id = MUSIC_GENRE_ID; ++static const char *music_artist_id = MUSIC_ARTIST_ID; ++static const char *music_album_id = MUSIC_ALBUM_ID; ++static const char *music_plist_id = MUSIC_PLIST_ID; ++static const char *music_dir_id = MUSIC_DIR_ID; ++static const char *video_id = VIDEO_ID; ++static const char *video_all_id = VIDEO_ALL_ID; ++static const char *video_dir_id = VIDEO_DIR_ID; ++static const char *image_id = IMAGE_ID; ++static const char *image_all_id = IMAGE_ALL_ID; ++static const char *image_date_id = IMAGE_DATE_ID; ++static const char *image_camera_id = IMAGE_CAMERA_ID; ++static const char *image_dir_id = IMAGE_DIR_ID; + +-struct magic_container_s magic_containers[] = ++const struct magic_container_s magic_containers[] = + { + /* Alternate root container */ + { NULL, +@@ -149,7 +149,7 @@ struct magic_container_s magic_container + { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0 } + }; + +-struct magic_container_s * ++const struct magic_container_s * + in_magic_container(const char *id, int flags, const char **real_id) + { + size_t len; +@@ -179,7 +179,7 @@ in_magic_container(const char *id, int f + return NULL; + } + +-struct magic_container_s * ++const struct magic_container_s * + check_magic_container(const char *id, int flags) + { + int i; +--- a/containers.h ++++ b/containers.h +@@ -38,7 +38,7 @@ struct magic_container_s { + int required_flags; + }; + +-extern struct magic_container_s magic_containers[]; ++extern const struct magic_container_s magic_containers[]; + +-struct magic_container_s *in_magic_container(const char *id, int flags, const char **real_id); +-struct magic_container_s *check_magic_container(const char *id, int flags); ++const struct magic_container_s *in_magic_container(const char *id, int flags, const char **real_id); ++const struct magic_container_s *check_magic_container(const char *id, int flags); +--- a/scanner.c ++++ b/scanner.c +@@ -566,7 +566,7 @@ CreateDatabase(void) + } + for( int i=0; magic_containers[i].objectid_match; i++ ) + { +- struct magic_container_s *magic = &magic_containers[i]; ++ const struct magic_container_s *magic = &magic_containers[i]; + if (!magic->name) + continue; + if( sql_get_int_field(db, "SELECT 1 from OBJECTS where OBJECT_ID = '%s'", magic->objectid_match) == 0 ) +--- a/upnpsoap.c ++++ b/upnpsoap.c +@@ -800,7 +800,7 @@ add_res(char *size, char *duration, char + } + + static int +-get_child_count(const char *object, struct magic_container_s *magic) ++get_child_count(const char *object, const struct magic_container_s *magic) + { + int ret; + +@@ -1297,7 +1297,7 @@ BrowseContentDirectory(struct upnphttp * + "" + "<DIDL-Lite" + CONTENT_DIRECTORY_SCHEMAS; +- struct magic_container_s *magic; ++ const struct magic_container_s *magic; + char *zErrMsg = NULL; + char *sql, *ptr; + struct Response args; +@@ -1819,7 +1819,7 @@ SearchContentDirectory(struct upnphttp * + "" + "<DIDL-Lite" + CONTENT_DIRECTORY_SCHEMAS; +- struct magic_container_s *magic; ++ const struct magic_container_s *magic; + char *zErrMsg = NULL; + char *sql, *ptr; + struct Response args; diff --git a/multimedia/minidlna/patches/040-heroes.patch b/multimedia/minidlna/patches/040-heroes.patch new file mode 100644 index 00000000..5c2d3139 --- /dev/null +++ b/multimedia/minidlna/patches/040-heroes.patch @@ -0,0 +1,27 @@ +From 972fb2bbfdb7118551da45c5828c9e74be581fc4 Mon Sep 17 00:00:00 2001 +From: Daniel Kamil Kozar +Date: Sat, 15 Dec 2018 21:55:52 +0100 +Subject: [PATCH] What about David Bowie's "Heroes"? + +--- + utils.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/utils.c b/utils.c +index dc936f9..dfa2b65 100644 +--- a/utils.c ++++ b/utils.c +@@ -87,13 +87,6 @@ trim(char *str) + len--; + } + +- if (str[0] == '"' && str[len-1] == '"') +- { +- str[0] = '\0'; +- str[len-1] = '\0'; +- str++; +- } +- + return str; + } + diff --git a/multimedia/minidlna/patches/060-reduce_duplication_in_sql_c.patch b/multimedia/minidlna/patches/060-reduce_duplication_in_sql_c.patch new file mode 100644 index 00000000..c2372173 --- /dev/null +++ b/multimedia/minidlna/patches/060-reduce_duplication_in_sql_c.patch @@ -0,0 +1,192 @@ +From be9de8b2e0864b46498496af9ffdc31c0e7b764a Mon Sep 17 00:00:00 2001 +From: Daniel Kamil Kozar +Date: Sun, 16 Dec 2018 14:21:58 +0100 +Subject: [PATCH] Reduce duplication in sql.c + +--- + sql.c | 166 ++++++++++++++++++++-------------------------------------- + 1 file changed, 58 insertions(+), 108 deletions(-) + +--- a/sql.c ++++ b/sql.c +@@ -65,122 +65,72 @@ sql_get_table(sqlite3 *db, const char *s + return ret; + } + ++#define sql_get_field(type, column_get_fn) \ ++ va_list ap;\ ++ int counter, result;\ ++ char *sql;\ ++ type ret;\ ++ sqlite3_stmt *stmt;\ ++ \ ++ va_start(ap, fmt);\ ++ sql = sqlite3_vmprintf(fmt, ap);\ ++ va_end(ap);\ ++\ ++ /*DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); */ \ ++\ ++ switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))\ ++ {\ ++ case SQLITE_OK:\ ++ break;\ ++ default:\ ++ DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);\ ++ sqlite3_free(sql);\ ++ return -1;\ ++ }\ ++\ ++ for (counter = 0;\ ++ ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;\ ++ counter++) {\ ++ /* While SQLITE_BUSY has a built in timeout,\ ++ * SQLITE_LOCKED does not, so sleep */\ ++ if (result == SQLITE_LOCKED)\ ++ sleep(1);\ ++ }\ ++\ ++ switch (result)\ ++ {\ ++ case SQLITE_DONE:\ ++ /* no rows returned */\ ++ ret = 0;\ ++ break;\ ++ case SQLITE_ROW:\ ++ if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)\ ++ {\ ++ ret = 0;\ ++ break;\ ++ }\ ++ ret = column_get_fn(stmt, 0);\ ++ break;\ ++ default:\ ++ DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);\ ++ ret = -1;\ ++ break;\ ++ }\ ++ sqlite3_free(sql);\ ++ sqlite3_finalize(stmt);\ ++\ ++ return ret; ++ + int + sql_get_int_field(sqlite3 *db, const char *fmt, ...) + { +- va_list ap; +- int counter, result; +- char *sql; +- int ret; +- sqlite3_stmt *stmt; +- +- va_start(ap, fmt); +- sql = sqlite3_vmprintf(fmt, ap); +- va_end(ap); +- +- //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); +- +- switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL)) +- { +- case SQLITE_OK: +- break; +- default: +- DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql); +- sqlite3_free(sql); +- return -1; +- } +- +- for (counter = 0; +- ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2; +- counter++) { +- /* While SQLITE_BUSY has a built in timeout, +- * SQLITE_LOCKED does not, so sleep */ +- if (result == SQLITE_LOCKED) +- sleep(1); +- } +- +- switch (result) +- { +- case SQLITE_DONE: +- /* no rows returned */ +- ret = 0; +- break; +- case SQLITE_ROW: +- if (sqlite3_column_type(stmt, 0) == SQLITE_NULL) +- { +- ret = 0; +- break; +- } +- ret = sqlite3_column_int(stmt, 0); +- break; +- default: +- DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql); +- ret = -1; +- break; +- } +- sqlite3_free(sql); +- sqlite3_finalize(stmt); +- +- return ret; ++ sql_get_field(int, sqlite3_column_int) + } + + int64_t + sql_get_int64_field(sqlite3 *db, const char *fmt, ...) + { +- va_list ap; +- int counter, result; +- char *sql; +- int64_t ret; +- sqlite3_stmt *stmt; +- +- va_start(ap, fmt); +- sql = sqlite3_vmprintf(fmt, ap); +- va_end(ap); +- +- //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); +- +- switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL)) +- { +- case SQLITE_OK: +- break; +- default: +- DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql); +- sqlite3_free(sql); +- return -1; +- } +- +- for (counter = 0; +- ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2; +- counter++) { +- /* While SQLITE_BUSY has a built in timeout, +- * SQLITE_LOCKED does not, so sleep */ +- if (result == SQLITE_LOCKED) +- sleep(1); +- } +- +- switch (result) +- { +- case SQLITE_DONE: +- /* no rows returned */ +- ret = 0; +- break; +- case SQLITE_ROW: +- if (sqlite3_column_type(stmt, 0) == SQLITE_NULL) +- { +- ret = 0; +- break; +- } +- ret = sqlite3_column_int64(stmt, 0); +- break; +- default: +- DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql); +- ret = -1; +- break; +- } +- sqlite3_free(sql); +- sqlite3_finalize(stmt); +- +- return ret; ++ sql_get_field(int64_t, sqlite3_column_int64) + } + + char * diff --git a/multimedia/minidlna/patches/070-return-void.patch b/multimedia/minidlna/patches/070-return-void.patch new file mode 100644 index 00000000..7109dd94 --- /dev/null +++ b/multimedia/minidlna/patches/070-return-void.patch @@ -0,0 +1,21 @@ +From ce34745bb19a649c8570ef0a3da9ffd5e941548e Mon Sep 17 00:00:00 2001 +From: Daniel Kamil Kozar +Date: Sun, 30 Dec 2018 22:49:50 +0100 +Subject: [PATCH] No return in a function returning non-void + +--- + upnpdescgen.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/upnpdescgen.c b/upnpdescgen.c +index 85ce185..78d5754 100644 +--- a/upnpdescgen.c ++++ b/upnpdescgen.c +@@ -525,6 +525,7 @@ genXML(char *str, int *len, int *tmplen, const struct XMLElt *p) + pile[top].eltname = eltname; + } + } ++ return str; + } + + /* genRootDesc() : diff --git a/multimedia/minisatip/Makefile b/multimedia/minisatip/Makefile new file mode 100644 index 00000000..8d2eb8f9 --- /dev/null +++ b/multimedia/minisatip/Makefile @@ -0,0 +1,62 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=minisatip +PKG_VERSION:=1.0.3 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/catalinii/minisatip/tar.gz/$(PKG_VERSION)? +PKG_HASH:=04d208369331ef0ee165766438a80ed826bb6a6552bbc56a38a6f2dd04603da3 + +PKG_MAINTAINER:=Daniel Kucera +PKG_LICENSE:=GPL-2.0-or-later + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/minisatip + TITLE:=SATIP server + URL:=https://github.com/catalinii/minisatip + SECTION:=multimedia + CATEGORY:=Multimedia + DEPENDS:=+MINISATIP_AES:libopenssl +endef + +define Package/minisatip/config + if PACKAGE_minisatip + + config MINISATIP_AES + bool "OpenSSL (AES as part of DVBAPI)" + default n + + config MINISATIP_CLIENT + bool "SatIP Client" + default y + + endif +endef + +ifeq ($(CONFIG_MINISATIP_AES),) + CONFIGURE_ARGS += --disable-dvbaes +endif + +ifeq ($(CONFIG_MINISATIP_CLIENT),) + CONFIGURE_ARGS += --disable-satipc +endif + +define Package/minisatip/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/minisatip $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/minisatip/html/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/html/* $(1)/usr/share/minisatip/html + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/minisatip.init $(1)/etc/init.d/minisatip +endef + +$(eval $(call BuildPackage,minisatip)) diff --git a/multimedia/minisatip/files/minisatip.init b/multimedia/minisatip/files/minisatip.init new file mode 100644 index 00000000..17a283c0 --- /dev/null +++ b/multimedia/minisatip/files/minisatip.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 +START=99 + +start_service() { + procd_open_instance minisatip + procd_set_param command /usr/bin/minisatip -f -R /usr/share/minisatip/html + + procd_set_param respawn + + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance +} + diff --git a/multimedia/minisatip/patches/010-gcc10.patch b/multimedia/minisatip/patches/010-gcc10.patch new file mode 100644 index 00000000..465e3263 --- /dev/null +++ b/multimedia/minisatip/patches/010-gcc10.patch @@ -0,0 +1,43 @@ +From b7a9982022ea54d87d310a041c38c6c69b6e49da Mon Sep 17 00:00:00 2001 +From: Klaas de Waal +Date: Sun, 17 May 2020 23:00:09 +0200 +Subject: [PATCH] Fix declaration and definition of global variables + +Definition of global variable httpc now in utils.c with declaration in utils.h. +Definition of global variable source_map now in adapter.c with declaration in adapter.h. +This fixes multiple defined symbol linking errors with linking issue with multiple defined symbols +in Fedora 32 with gcc version 10.1.1 20200507 (Red Hat 10.1.1-1) (GCC) +--- + src/adapter.c | 1 + + src/adapter.h | 2 +- + src/utils.c | 2 ++ + src/utils.h | 3 ++- + 4 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/utils.c b/src/utils.c +index 8c27954..5be35fd 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -63,6 +63,8 @@ + int MAX_SINFO; + char pn[256]; + ++Shttp_client *httpc[MAX_HTTPC]; ++ + typedef struct tmpinfo + { + unsigned char enabled; +diff --git a/src/utils.h b/src/utils.h +index 6ef1831..efcccfa 100644 +--- a/src/utils.h ++++ b/src/utils.h +@@ -88,7 +88,8 @@ typedef struct struct_http_client + + #define get_httpc(i) ((i >= 0 && i < MAX_HTTPC && httpc[i] && httpc[i]->enabled) ? httpc[i] : NULL) + +-Shttp_client *httpc[MAX_HTTPC]; ++extern Shttp_client *httpc[MAX_HTTPC]; ++ + int http_client(char *url, char *request, void *callback, void *opaque); + + unsigned char *getItem(uint32_t key); diff --git a/multimedia/mjpg-streamer/Config.in b/multimedia/mjpg-streamer/Config.in deleted file mode 100644 index 4a29ba9f..00000000 --- a/multimedia/mjpg-streamer/Config.in +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# - -if PACKAGE_mjpg-streamer - -config MJPG_STREAMER_V4L2 - bool "Compile input_uvc with libv4l2 (camera controls)" - default n - select PACKAGE_libv4l - -config MJPG_STREAMER_INPUT_FILE - bool "Install input file plugin" - default n - -config MJPG_STREAMER_INPUT_UVC - bool "Install input uvc plugin" - default y - -config MJPG_STREAMER_INPUT_TESTPICTURE - bool "Install input testpicture plugin" - default n - -config MJPG_STREAMER_OUTPUT_FILE - bool "Install output file plugin" - default n - -config MJPG_STREAMER_OUTPUT_HTTP - bool "Install output http plugin" - default y - -config MJPG_STREAMER_WWW - bool "Install complete Web UI files (includes cambozola)" - default n - -endif diff --git a/multimedia/mjpg-streamer/Makefile b/multimedia/mjpg-streamer/Makefile index bc8e44ce..8cffb58b 100644 --- a/multimedia/mjpg-streamer/Makefile +++ b/multimedia/mjpg-streamer/Makefile @@ -6,75 +6,212 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mjpg-streamer -PKG_REV:=182 -PKG_VERSION:=r$(PKG_REV) -PKG_RELEASE:=10 +PKG_VERSION:=2019-05-24 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/jacksonliam/mjpg-streamer +PKG_SOURCE_VERSION:=501f6362c5afddcfb41055f97ae484252c85c912 +PKG_MIRROR_HASH:=9e1f098c5092ae6cc70916caf9d45808a312333973524725ae5e729a4af18657 + PKG_MAINTAINER:=Roger D , \ Ted Hess - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).1.tar.xz -PKG_SOURCE_URL:=https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer-experimental -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=svn -PKG_MIRROR_HASH:=ccff417d0a34f7cee12c7984f77788267b1da0f2a7d849bc1b2e3614e670078b - -PKG_LICENSE:=GPL-2.0 +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=LICENSE -include $(INCLUDE_DIR)/package.mk +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l zmq protobuf-c/host -PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk define Package/mjpg-streamer SECTION:=multimedia CATEGORY:=Multimedia TITLE:=MJPG-streamer DEPENDS:=+libpthread +libjpeg +MJPG_STREAMER_V4L2:libv4l - URL:=http://mjpg-streamer.wiki.sourceforge.net/ - MENU:=1 + URL:=https://github.com/jacksonliam/mjpg-streamer endef -define Package/mjpg-streamer/description +define Package/mjpg-streamer/Default/description Streaming application for Linux-UVC compatible webcams endef -define Package/mjpg-streamer/config - source "$(SOURCE)/Config.in" +define Package/mjpg-streamer/description +$(call Package/mjpg-streamer/Default/description) endef -EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) - define Package/mjpg-streamer/conffiles /etc/config/mjpg-streamer endef +define Package/mjpg-streamer/config +if PACKAGE_mjpg-streamer-input-uvc + +config MJPG_STREAMER_V4L2 + bool "Build input_uvc with libv4l2 (camera controls)" + default n + select PACKAGE_libv4l +endif +endef + +define Package/mjpg-streamer/Default + SECTION:=multimedia + CATEGORY:=Multimedia + TITLE:=MJPG-streamer + URL:=https://github.com/jacksonliam/mjpg-streamer + DEPENDS:=mjpg-streamer +endef + +define Package/mjpg-streamer-input-file +$(call Package/mjpg-streamer/Default) + TITLE+= (file input) +endef + +define Package/mjpg-streamer-input-file/description +$(call Package/mjpg-streamer/Default/description) + +This package provides the file input plugin. +endef + +define Package/mjpg-streamer-input-uvc +$(call Package/mjpg-streamer/Default) + TITLE+= (UVC input) +endef + +define Package/mjpg-streamer-input-uvc/description +$(call Package/mjpg-streamer/Default/description) + +This package provides the UVC input plugin. +endef + +define Package/mjpg-streamer-input-http +$(call Package/mjpg-streamer/Default) + TITLE+= (HTTP input) +endef + +define Package/mjpg-streamer-input-http/description +$(call Package/mjpg-streamer/Default/description) + +This package provides the http input plugin. +endef + +define Package/mjpg-streamer-output-rtsp +$(call Package/mjpg-streamer/Default) + TITLE+= (RTSP output) +endef + +define Package/mjpg-streamer-output-rtsp/description +$(call Package/mjpg-streamer/Default/description) + +This package provides the RTSP output plugin. +endef + +define Package/mjpg-streamer-output-udp +$(call Package/mjpg-streamer/Default) + TITLE+= (UDP output) +endef + +define Package/mjpg-streamer-output-udp/description +$(call Package/mjpg-streamer/Default/description) + +This package provides the UDP output plugin. +endef + +define Package/mjpg-streamer-output-file +$(call Package/mjpg-streamer/Default) + TITLE+= (file output) +endef + +define Package/mjpg-streamer-output-file/description +$(call Package/mjpg-streamer/Default/description) + +This package provides the file output plugin. +endef + +define Package/mjpg-streamer-output-http +$(call Package/mjpg-streamer/Default) + TITLE+= (HTTP output) +endef + +define Package/mjpg-streamer-output-http/description +$(call Package/mjpg-streamer/Default/description) + +This package provides the HTTP output plugin. +endef + +define Package/mjpg-streamer-output-zmq +$(call Package/mjpg-streamer/Default) + TITLE+= (zmq output) + DEPENDS+= +libzmq +libprotobuf-c +endef + +define Package/mjpg-streamer-output-zmq/description +$(call Package/mjpg-streamer/Default/description) + +This package provides the ZeroMQ output plugin. +endef + +define Package/mjpg-streamer-www +$(call Package/mjpg-streamer/Default) + TITLE+= (full www) + CONFLICTS:=mjpg-streamer-www-simple +endef + +define Package/mjpg-streamer-www/description +$(call Package/mjpg-streamer/Default/description) + +This package provides full version of the web content. +Includes cambozola applet. +endef + +define Package/mjpg-streamer-www-simple +$(call Package/mjpg-streamer/Default) + TITLE+= (simple www) +endef + +define Package/mjpg-streamer-www-simple/description +$(call Package/mjpg-streamer/Default/description) + +This package provides simple version of the web content. +endef + +CMAKE_OPTIONS += -DCMAKE_SKIP_RPATH=FALSE + CAMBOZOLA:=cambozola-0.936.tar.gz # Distribution URL doesn't always have the correct version # Using the OpenWrt mirror provides a stable version # orig-URL:=http://www.andywilcock.com/code/cambozola define Download/cambozola - URL:=http://mirror2.openwrt.org/sources + URL:=https://sources.openwrt.org/ FILE:=$(CAMBOZOLA) - MD5SUM:=35c45188aa9635aef2b745c35c311396 + HASH:=4e4e92d95673edd051e6b4d36bed8c5328873f5fc374073760b457d4be33415b endef -# Fetch latest cambozola that works with latest Java(s) -# Yes, I know this is ugly +# redefine prepare to extract to our build dir +# apply patches define Build/Prepare - $(call Build/Prepare/Default) - ifeq ($(CONFIG_MJPG_STREAMER_WWW),y) + rm -rf $(PKG_BUILD_DIR)/ + mkdir -p $(PKG_BUILD_DIR)/ + $(TAR) -xJf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip=2 + $(Build/Patch) + # Fetch latest cambozola that works with latest Java(s) + # Yes, I know this is ugly + ifneq ($(CONFIG_PACKAGE_mjpg-streamer-www),) $(eval $(call Download,cambozola)) - $(TAR) -xvf $(DL_DIR)/$(CAMBOZOLA) --strip=2 --wildcards \ + $(TAR) -xf $(DL_DIR)/$(CAMBOZOLA) --strip=2 --wildcards \ -C $(PKG_BUILD_DIR)/www */dist/cambozola.jar endif endef define Build/Configure $(RM) $(PKG_BUILD_DIR)/plugins/input_uvc/uvcvideo.h +$(call Build/Configure/Default) endef +TARGET_LDFLAGS+= -ljpeg + ifeq ($(CONFIG_MJPG_STREAMER_V4L2),y) TARGET_CFLAGS+= -DUSE_LIBV4L2 TARGET_LDFLAGS+= -lv4l2 @@ -82,35 +219,72 @@ endif define Package/mjpg-streamer/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mjpg_streamer $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc/config $(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer $(INSTALL_DIR) $(1)/etc/hotplug.d/usb $(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer - $(INSTALL_DIR) $(1)/usr/lib -ifeq ($(CONFIG_MJPG_STREAMER_INPUT_FILE),y) - $(CP) $(PKG_BUILD_DIR)/input_file.so $(1)/usr/lib -endif -ifeq ($(CONFIG_MJPG_STREAMER_INPUT_UVC),y) - $(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib -endif -ifeq ($(CONFIG_MJPG_STREAMER_INPUT_TESTPICTURE),y) - $(CP) $(PKG_BUILD_DIR)/input_testpicture.so $(1)/usr/lib -endif -ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_FILE),y) - $(CP) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib -endif -ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_HTTP),y) - $(CP) $(PKG_BUILD_DIR)/output_http.so $(1)/usr/lib +endef + +define Package/mjpg-streamer-input-file/install + $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_file.so $(1)/usr/lib/mjpg-streamer +endef + +define Package/mjpg-streamer-input-uvc/install + $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_uvc.so $(1)/usr/lib/mjpg-streamer +endef + +define Package/mjpg-streamer-input-http/install + $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/input_http.so $(1)/usr/lib/mjpg-streamer +endef + +define Package/mjpg-streamer-output-rtsp/install + $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_rtsp.so $(1)/usr/lib/mjpg-streamer +endef + +define Package/mjpg-streamer-output-udp/install + $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_udp.so $(1)/usr/lib/mjpg-streamer +endef + +define Package/mjpg-streamer-output-file/install + $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_file.so $(1)/usr/lib/mjpg-streamer +endef + +define Package/mjpg-streamer-output-http/install + $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_http.so $(1)/usr/lib/mjpg-streamer +endef + +define Package/mjpg-streamer-output-zmq/install + $(INSTALL_DIR) $(1)/usr/lib/mjpg-streamer + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mjpg-streamer/output_zmqserver.so $(1)/usr/lib/mjpg-streamer +endef + +define Package/mjpg-streamer-www/install $(INSTALL_DIR) $(1)/www/webcam - ifeq ($(CONFIG_MJPG_STREAMER_WWW),y) - $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/* $(1)/www/webcam - else - $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/stream_simple.html $(1)/www/webcam/index.html - endif -endif + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mjpg-streamer/www/* $(1)/www/webcam +endef + +define Package/mjpg-streamer-www-simple/install + $(INSTALL_DIR) $(1)/www/webcam + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mjpg-streamer/www/stream_simple.html $(1)/www/webcam/index.html endef $(eval $(call BuildPackage,mjpg-streamer)) +$(eval $(call BuildPackage,mjpg-streamer-input-file)) +$(eval $(call BuildPackage,mjpg-streamer-input-uvc)) +$(eval $(call BuildPackage,mjpg-streamer-input-http)) +$(eval $(call BuildPackage,mjpg-streamer-output-rtsp)) +$(eval $(call BuildPackage,mjpg-streamer-output-file)) +$(eval $(call BuildPackage,mjpg-streamer-output-http)) +$(eval $(call BuildPackage,mjpg-streamer-output-zmq)) +$(eval $(call BuildPackage,mjpg-streamer-www)) +$(eval $(call BuildPackage,mjpg-streamer-www-simple)) diff --git a/multimedia/mjpg-streamer/files/mjpg-streamer.config b/multimedia/mjpg-streamer/files/mjpg-streamer.config index a40d7873..1e577991 100644 --- a/multimedia/mjpg-streamer/files/mjpg-streamer.config +++ b/multimedia/mjpg-streamer/files/mjpg-streamer.config @@ -11,5 +11,6 @@ config mjpg-streamer 'core' option led 'auto' option www '/www/webcam' option port '8080' + #option listen_ip '192.168.1.1' option username 'openwrt' option password 'openwrt' diff --git a/multimedia/mjpg-streamer/files/mjpg-streamer.init b/multimedia/mjpg-streamer/files/mjpg-streamer.init index b7c7ec38..a1edf8c3 100644 --- a/multimedia/mjpg-streamer/files/mjpg-streamer.init +++ b/multimedia/mjpg-streamer/files/mjpg-streamer.init @@ -14,73 +14,119 @@ error() { start_instance() { local s="$1" + local enabled config_get_bool enabled "$1" 'enabled' 0 - [ $enabled -eq 0 ] && return + [ "$enabled" ] || return + local input config_get input "$s" 'input' - if [ -z "$input" ]; then + [ -z "$input" ] && { error "in section '$s' option input is missing" return 1 - fi + } + local output config_get output "$s" 'output' - if [ -z "$output" ]; then + [ -z "$output" ] && { error "in section '$s' option output is missing" return 1 - fi + } local input_arg - if [ "x$input" = 'xuvc' ]; then + [ "x$input" = 'xuvc' ] && { input_arg="input_uvc.so" + local device config_get device "$s" 'device' - if [ ! -c "$device" ]; then + [ -c "$device" ] || { error "device '$device' does not exist" return 1 - fi + } input_arg="${input_arg} --device $device" + local fps config_get fps "$s" 'fps' [ -n "$fps" ] && input_arg="${input_arg} --fps $fps" + local yuv config_get_bool yuv "$s" 'yuv' 0 - if [ $yuv -ne 0 ]; then + [ "$yuv" -ne 0 ] && { input_arg="${input_arg} --yuv" + local quality config_get quality "$s" 'quality' [ -n "$quality" ] && input_arg="${input_arg} --quality $quality" - fi + } + local resolution config_get resolution "$s" 'resolution' [ -n "$resolution" ] && input_arg="${input_arg} --resolution $resolution" + local led config_get led "$s" 'led' [ -n "$led" ] && input_arg="${input_arg} --led $led" - fi + } - if [ -z "$input_arg" ]; then + [ -z "$input_arg" ] && { error "unsuported input option '$input' in section '$s'" return 1 - fi + } local output_arg - if [ "x$output" = 'xhttp' ]; then + [ "x$output" = 'xhttp' ] && { output_arg="output_http.so" + local port config_get port "$s" 'port' [ -n "$port" ] && output_arg="${output_arg} --port $port" + local listen_ip + config_get listen_ip "$s" 'listen_ip' + [ -n "$listen_ip" ] && output_arg="${output_arg} --listen $listen_ip" + + local www config_get www "$s" 'www' [ -n "$www" ] && output_arg="${output_arg} --www $www" + local username config_get username "$s" 'username' + local password config_get password "$s" 'password' [ -n "$username" ] && [ -n "$password" ] && output_arg="${output_arg} --credentials $username:$password" - fi + } - if [ -z "$output_arg" ]; then + [ "x$output" = 'xfile' ] && { + output_arg="output_file.so" + + local folder + config_get folder "$s" 'folder' + [ -n "$folder" ] && output_arg="${output_arg} --folder $folder" + + local delay + config_get delay "$s" 'delay' + [ -n "$delay" ] && output_arg="${output_arg} --delay $delay" + + local link + config_get link "$s" 'link' + [ -n "$link" ] && output_arg="${output_arg} --link $link" + + local ringbuffer + config_get ringbuffer "$s" 'ringbuffer' + [ -n "$ringbuffer" ] && output_arg="${output_arg} --size $ringbuffer" + + local exceed + config_get exceed "$s" 'exceed' + [ -n "$exceed" ] && output_arg="${output_arg} --exceed $exceed" + + local command + config_get command "$s" 'command' + [ -n "$command" ] && output_arg="${output_arg} --command $command" + + } + + [ -z "$output_arg" ] && { error "unsuported output option '$output' in section '$s'" return 1 - fi + } procd_open_instance procd_set_param command "$PROG" --input "$input_arg" --output "$output_arg" diff --git a/multimedia/mjpg-streamer/patches/005-musl_compatibility.patch b/multimedia/mjpg-streamer/patches/005-musl_compatibility.patch index c758eb95..3bdbd654 100644 --- a/multimedia/mjpg-streamer/patches/005-musl_compatibility.patch +++ b/multimedia/mjpg-streamer/patches/005-musl_compatibility.patch @@ -10,4 +10,4 @@ + #include /* for videodev2.h */ #include - + #include diff --git a/multimedia/mjpg-streamer/patches/010-enable_additional_plugins.patch b/multimedia/mjpg-streamer/patches/010-enable_additional_plugins.patch deleted file mode 100644 index 4713a08d..00000000 --- a/multimedia/mjpg-streamer/patches/010-enable_additional_plugins.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -33,12 +33,12 @@ APP_BINARY = mjpg_streamer - - # define the names and targets of the plugins - PLUGINS = input_uvc.so --#PLUGINS += output_file.so -+PLUGINS += output_file.so - #PLUGINS += output_udp.so - PLUGINS += output_http.so - PLUGINS += input_testpicture.so - #PLUGINS += output_autofocus.so --#PLUGINS += input_file.so -+PLUGINS += input_file.so - # PLUGINS += input_pylon.so - # PLUGINS += input_megatec.so - # PLUGINS += output_mars2020.so diff --git a/multimedia/mjpg-streamer/patches/010-optional-plugins-selection.patch b/multimedia/mjpg-streamer/patches/010-optional-plugins-selection.patch new file mode 100644 index 00000000..f695389a --- /dev/null +++ b/multimedia/mjpg-streamer/patches/010-optional-plugins-selection.patch @@ -0,0 +1,25 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,9 +58,9 @@ find_library(JPEG_LIB jpeg) + + add_subdirectory(plugins/input_file) + add_subdirectory(plugins/input_http) +-add_subdirectory(plugins/input_opencv) +-add_subdirectory(plugins/input_raspicam) +-add_subdirectory(plugins/input_ptp2) ++#add_subdirectory(plugins/input_opencv) ++#add_subdirectory(plugins/input_raspicam) ++#add_subdirectory(plugins/input_ptp2) + add_subdirectory(plugins/input_uvc) + + # +@@ -71,7 +71,7 @@ add_subdirectory(plugins/output_file) + add_subdirectory(plugins/output_http) + add_subdirectory(plugins/output_rtsp) + add_subdirectory(plugins/output_udp) +-add_subdirectory(plugins/output_viewer) ++#add_subdirectory(plugins/output_viewer) + add_subdirectory(plugins/output_zmqserver) + + # + # mjpg_streamer executable diff --git a/multimedia/mjpg-streamer/patches/020-remove-auto-lib-selection.patch b/multimedia/mjpg-streamer/patches/020-remove-auto-lib-selection.patch new file mode 100644 index 00000000..0e5a1513 --- /dev/null +++ b/multimedia/mjpg-streamer/patches/020-remove-auto-lib-selection.patch @@ -0,0 +1,55 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,8 +49,7 @@ set (MJPG_STREAMER_PLUGIN_INSTALL_PATH " + # Global dependencies + # + +-find_library(JPEG_LIB jpeg) +- ++#find_library(JPEG_LIB jpeg) + + # + # Input plugins +--- a/plugins/input_uvc/CMakeLists.txt ++++ b/plugins/input_uvc/CMakeLists.txt +@@ -9,27 +9,27 @@ if (PLUGIN_INPUT_UVC) + add_definitions(-DLINUX -D_GNU_SOURCE) + + find_library(V4L2_LIB v4l2) +- find_library(JPEG_LIB jpeg) ++# find_library(JPEG_LIB jpeg) + +- if (V4L2_LIB) +- add_definitions(-DUSE_LIBV4L2) +- endif (V4L2_LIB) ++# if (V4L2_LIB) ++# add_definitions(-DUSE_LIBV4L2) ++# endif (V4L2_LIB) + +- if (NOT JPEG_LIB) +- add_definitions(-DNO_LIBJPEG) +- endif (NOT JPEG_LIB) ++# if (NOT JPEG_LIB) ++# add_definitions(-DNO_LIBJPEG) ++# endif (NOT JPEG_LIB) + + MJPG_STREAMER_PLUGIN_COMPILE(input_uvc dynctrl.c + input_uvc.c + jpeg_utils.c + v4l2uvc.c) + +- if (V4L2_LIB) +- target_link_libraries(input_uvc ${V4L2_LIB}) +- endif (V4L2_LIB) ++# if (V4L2_LIB) ++# target_link_libraries(input_uvc ${V4L2_LIB}) ++# endif (V4L2_LIB) + +- if (JPEG_LIB) +- target_link_libraries(input_uvc ${JPEG_LIB}) +- endif (JPEG_LIB) ++# if (JPEG_LIB) ++# target_link_libraries(input_uvc ${JPEG_LIB}) ++# endif (JPEG_LIB) + + endif() diff --git a/multimedia/mjpg-streamer/patches/020-remove_gcc_debug_options.patch b/multimedia/mjpg-streamer/patches/020-remove_gcc_debug_options.patch deleted file mode 100644 index 00d831e0..00000000 --- a/multimedia/mjpg-streamer/patches/020-remove_gcc_debug_options.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/plugins/input_uvc/Makefile -+++ b/plugins/input_uvc/Makefile -@@ -13,7 +13,7 @@ OTHER_HEADERS = ../../mjpg_streamer.h .. - - CFLAGS += -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC - --CFLAGS += -g -DDEBUG -+#CFLAGS += -g -DDEBUG - - ifeq ($(USE_LIBV4L2),true) - LFLAGS += -lv4l2 ---- a/plugins/output_file/Makefile -+++ b/plugins/output_file/Makefile -@@ -12,7 +12,7 @@ CC = gcc - OTHER_HEADERS = ../../mjpg_streamer.h ../../utils.h ../output.h ../input.h - - CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC --CFLAGS += -DDEBUG -g -+#CFLAGS += -DDEBUG -g - LFLAGS += -lpthread -ldl - - all: output_file.so ---- a/plugins/output_udp/Makefile -+++ b/plugins/output_udp/Makefile -@@ -14,7 +14,7 @@ CC = gcc - OTHER_HEADERS = ../../mjpg_streamer.h ../../utils.h ../output.h ../input.h - - CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC --CFLAGS += -DDEBUG -+#CFLAGS += -DDEBUG - LFLAGS += -lpthread -ldl - - all: output_udp.so diff --git a/multimedia/mjpg-streamer/patches/030-allow_16_char_device_names.patch b/multimedia/mjpg-streamer/patches/030-allow_16_char_device_names.patch deleted file mode 100644 index 0f8660ad..00000000 --- a/multimedia/mjpg-streamer/patches/030-allow_16_char_device_names.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/plugins/input_uvc/v4l2uvc.c -+++ b/plugins/input_uvc/v4l2uvc.c -@@ -69,7 +69,7 @@ int init_videoIn(struct vdIn *vd, char * - vd->videodevice = (char *) calloc(1, 16 * sizeof(char)); - vd->status = (char *) calloc(1, 100 * sizeof(char)); - vd->pictName = (char *) calloc(1, 80 * sizeof(char)); -- snprintf(vd->videodevice, 12, "%s", device); -+ snprintf(vd->videodevice, 16, "%s", device); - vd->toggleAvi = 0; - vd->getPict = 0; - vd->signalquit = 1; diff --git a/multimedia/mjpg-streamer/patches/030-remove-git-hash-version-number.patch b/multimedia/mjpg-streamer/patches/030-remove-git-hash-version-number.patch new file mode 100644 index 00000000..e776ce40 --- /dev/null +++ b/multimedia/mjpg-streamer/patches/030-remove-git-hash-version-number.patch @@ -0,0 +1,24 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,21 +18,6 @@ include(FeatureSummary) + include(mjpg_streamer_utils) + + # +-# Get the current git hash +-# +-execute_process( +- COMMAND git rev-parse HEAD +- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +- RESULT_VARIABLE GIT_RESULT +- OUTPUT_VARIABLE GIT_HASH +- OUTPUT_STRIP_TRAILING_WHITESPACE +-) +- +-if(GIT_RESULT EQUAL 0) +- add_definitions("-DGIT_HASH=\"${GIT_HASH}\"") +-endif() +- +-# + # Options + # + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") diff --git a/multimedia/mjpg-streamer/patches/035-remove_build_date-time.patch b/multimedia/mjpg-streamer/patches/035-remove_build_date-time.patch deleted file mode 100644 index f2d05194..00000000 --- a/multimedia/mjpg-streamer/patches/035-remove_build_date-time.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -15,8 +15,8 @@ DESTDIR = /usr/local - # set the compiler to use - CC = gcc - --SVNDEV := -D'SVN_REV="$(shell svnversion -c .)"' --CFLAGS += $(SVNDEV) -+#SVNDEV := -D'SVN_REV="$(shell svnversion -c .)"' -+#CFLAGS += $(SVNDEV) - - # general compile flags, enable all warnings to make compile more verbose - CFLAGS += -DLINUX -D_GNU_SOURCE -Wall ---- a/mjpg_streamer.c -+++ b/mjpg_streamer.c -@@ -253,15 +253,12 @@ int main(int argc, char *argv[]) - /* v, version */ - case 6: - case 7: -- printf("MJPG Streamer Version: %s\n" \ -- "Compilation Date.....: %s\n" \ -- "Compilation Time.....: %s\n", -+ printf("MJPG Streamer Version: %s\n", - #ifdef SVN_REV -- SVN_REV, -+ SVN_REV); - #else -- SOURCE_VERSION, -+ SOURCE_VERSION); - #endif -- __DATE__, __TIME__); - return 0; - break; - diff --git a/multimedia/mjpg-streamer/patches/040-Buffer-the-bytesused-variable-from-struct-v4l2_buffe.patch b/multimedia/mjpg-streamer/patches/040-Buffer-the-bytesused-variable-from-struct-v4l2_buffe.patch deleted file mode 100644 index a228f420..00000000 --- a/multimedia/mjpg-streamer/patches/040-Buffer-the-bytesused-variable-from-struct-v4l2_buffe.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 19202b54698b343a0207d7e213448e32b8e58fc3 Mon Sep 17 00:00:00 2001 -From: Olliver Schinagl -Date: Wed, 29 Oct 2014 09:34:41 +0100 -Subject: [PATCH 1/7] Buffer the bytesused variable from struct v4l2_buffer - -Starting with kernel versions 3.16, (DE)Queing of buffers has been fixed -after it was leaking data for ages. in the struct v4l2_buffer is the -bytesused element which indicates the size of the buffer. This however -gets cleared whenever the buffer gets requeued and is thus no longer -valid. - -This patch copies the bytesused variable so it is available until the -next frame captured again. - -Signed-off-by: Olliver Schinagl ---- - plugins/input_uvc/input_uvc.c | 6 +++--- - plugins/input_uvc/v4l2uvc.c | 2 ++ - plugins/input_uvc/v4l2uvc.h | 1 + - 3 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/plugins/input_uvc/input_uvc.c b/plugins/input_uvc/input_uvc.c -index e6c74fd..64f66cb 100644 ---- a/plugins/input_uvc/input_uvc.c -+++ b/plugins/input_uvc/input_uvc.c -@@ -482,7 +482,7 @@ void *cam_thread(void *arg) - exit(EXIT_FAILURE); - } - -- //DBG("received frame of size: %d from plugin: %d\n", pcontext->videoIn->buf.bytesused, pcontext->id); -+ //DBG("received frame of size: %d from plugin: %d\n", pcontext->videoIn->tmpbytesused, pcontext->id); - - /* - * Workaround for broken, corrupted frames: -@@ -491,7 +491,7 @@ void *cam_thread(void *arg) - * For example a VGA (640x480) webcam picture is normally >= 8kByte large, - * corrupted frames are smaller. - */ -- if(pcontext->videoIn->buf.bytesused < minimum_size) { -+ if(pcontext->videoIn->tmpbytesused < minimum_size) { - DBG("dropping too small frame, assuming it as broken\n"); - continue; - } -@@ -529,7 +529,7 @@ void *cam_thread(void *arg) - } else { - #endif - //DBG("copying frame from input: %d\n", (int)pcontext->id); -- pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->buf.bytesused); -+ pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->tmpbytesused); - #ifndef NO_LIBJPEG - } - #endif -diff --git a/plugins/input_uvc/v4l2uvc.c b/plugins/input_uvc/v4l2uvc.c -index c5a5aa4..d11510c 100644 ---- a/plugins/input_uvc/v4l2uvc.c -+++ b/plugins/input_uvc/v4l2uvc.c -@@ -532,6 +532,7 @@ int uvcGrab(struct vdIn *vd) - */ - - memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused); -+ vd->tmpbytesused = vd->buf.bytesused; - - if(debug) - fprintf(stderr, "bytes in used %d \n", vd->buf.bytesused); -@@ -570,6 +571,7 @@ int close_v4l2(struct vdIn *vd) - if(vd->tmpbuffer) - free(vd->tmpbuffer); - vd->tmpbuffer = NULL; -+ vd->tmpbytesused = 0; - free(vd->framebuffer); - vd->framebuffer = NULL; - free(vd->videodevice); -diff --git a/plugins/input_uvc/v4l2uvc.h b/plugins/input_uvc/v4l2uvc.h -index 022c57e..2c7c8ba 100644 ---- a/plugins/input_uvc/v4l2uvc.h -+++ b/plugins/input_uvc/v4l2uvc.h -@@ -83,6 +83,7 @@ struct vdIn { - struct v4l2_requestbuffers rb; - void *mem[NB_BUFFER]; - unsigned char *tmpbuffer; -+ int tmpbytesused; - unsigned char *framebuffer; - streaming_state streamingState; - int grabmethod; --- -1.9.1 - diff --git a/multimedia/mjpg-streamer/patches/041-Stop-leaking-data-via-struct-v4l2_buffer.patch b/multimedia/mjpg-streamer/patches/041-Stop-leaking-data-via-struct-v4l2_buffer.patch deleted file mode 100644 index 4f45da5d..00000000 --- a/multimedia/mjpg-streamer/patches/041-Stop-leaking-data-via-struct-v4l2_buffer.patch +++ /dev/null @@ -1,242 +0,0 @@ -From 11b28b36a8711b53658e8bbc50435595522f91ba Mon Sep 17 00:00:00 2001 -From: Olliver Schinagl -Date: Wed, 29 Oct 2014 11:21:16 +0100 -Subject: [PATCH 2/7] Stop leaking data via struct v4l2_buffer - -Before the 3.16 kernel, the v4l2_buffer was leaking data and violating -its own spec. Since 3.16 this has been corrected and after calling the -QBUF ioctl, the struct gets cleaned up. - -Right now, input_uvc assumes the buffer is valid at all times. This no -longer being true, this patch removes the v4l2_buffer from the vdIn -struct. Certain values are still needed outside of this buffer however, -the length buffer in the buffer array 'mem' and the timestamp. These are -now stored in the vdIn struct. - -All of this is still somewhat hackish, as a) the processing of the image -should really be done inside the uvcGrab function between the queuing -and dequeing of the buffers (or separate that into 3 functions, deq, q -and process and call them from input_uvc). b) we are still copying the -image using memcpy, which is something we don't really want and defeats -the purpose of using a mmap in the first place. Changing this however -requires some heavier re-architecting and in the end, may still not be avoided. - -More information about this bug and change can be found on the -linux-media mailing list[0] with the title uvcvideo fails on 3.16 and -3.17 kernels. - -[0] http://www.spinics.net/lists/linux-media/msg81515.html - -Signed-off-by: Olliver Schinagl ---- - plugins/input_uvc/input_uvc.c | 6 ++-- - plugins/input_uvc/v4l2uvc.c | 64 +++++++++++++++++++++++-------------------- - plugins/input_uvc/v4l2uvc.h | 4 ++- - 3 files changed, 41 insertions(+), 33 deletions(-) - -diff --git a/plugins/input_uvc/input_uvc.c b/plugins/input_uvc/input_uvc.c -index 64f66cb..64ef56c 100644 ---- a/plugins/input_uvc/input_uvc.c -+++ b/plugins/input_uvc/input_uvc.c -@@ -500,8 +500,8 @@ void *cam_thread(void *arg) - if (pcontext->videoIn->soft_framedrop == 1) { - unsigned long last = pglobal->in[pcontext->id].timestamp.tv_sec * 1000 + - (pglobal->in[pcontext->id].timestamp.tv_usec/1000); // convert to ms -- unsigned long current = pcontext->videoIn->buf.timestamp.tv_sec * 1000 + -- pcontext->videoIn->buf.timestamp.tv_usec/1000; // convert to ms -+ unsigned long current = pcontext->videoIn->tmptimestamp.tv_sec * 1000 + -+ pcontext->videoIn->tmptimestamp.tv_usec/1000; // convert to ms - - // if the requested time did not esplashed skip the frame - if ((current - last) < pcontext->videoIn->frame_period_time) { -@@ -543,7 +543,7 @@ void *cam_thread(void *arg) - #endif - - /* copy this frame's timestamp to user space */ -- pglobal->in[pcontext->id].timestamp = pcontext->videoIn->buf.timestamp; -+ pglobal->in[pcontext->id].timestamp = pcontext->videoIn->tmptimestamp; - - /* signal fresh_frame */ - pthread_cond_broadcast(&pglobal->in[pcontext->id].db_update); -diff --git a/plugins/input_uvc/v4l2uvc.c b/plugins/input_uvc/v4l2uvc.c -index d11510c..7ec5eec 100644 ---- a/plugins/input_uvc/v4l2uvc.c -+++ b/plugins/input_uvc/v4l2uvc.c -@@ -217,6 +217,9 @@ static int init_v4l2(struct vdIn *vd) - { - int i; - int ret = 0; -+ struct v4l2_buffer buf; -+ -+ - if((vd->fd = OPEN_VIDEO(vd->videodevice, O_RDWR)) == -1) { - perror("ERROR opening V4L interface"); - DBG("errno: %d", errno); -@@ -375,26 +378,27 @@ static int init_v4l2(struct vdIn *vd) - * map the buffers - */ - for(i = 0; i < NB_BUFFER; i++) { -- memset(&vd->buf, 0, sizeof(struct v4l2_buffer)); -- vd->buf.index = i; -- vd->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -- vd->buf.memory = V4L2_MEMORY_MMAP; -- ret = xioctl(vd->fd, VIDIOC_QUERYBUF, &vd->buf); -+ memset(&buf, 0, sizeof(struct v4l2_buffer)); -+ buf.index = i; -+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -+ buf.memory = V4L2_MEMORY_MMAP; -+ ret = xioctl(vd->fd, VIDIOC_QUERYBUF, &buf); - if(ret < 0) { - perror("Unable to query buffer"); - goto fatal; - } - - if(debug) -- fprintf(stderr, "length: %u offset: %u\n", vd->buf.length, vd->buf.m.offset); -+ fprintf(stderr, "length: %u offset: %u\n", buf.length, buf.m.offset); - - vd->mem[i] = mmap(0 /* start anywhere */ , -- vd->buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, vd->fd, -- vd->buf.m.offset); -+ buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, vd->fd, -+ buf.m.offset); - if(vd->mem[i] == MAP_FAILED) { - perror("Unable to map buffer"); - goto fatal; - } -+ vd->memlength[i] = buf.length; - if(debug) - fprintf(stderr, "Buffer mapped at address %p.\n", vd->mem[i]); - } -@@ -403,11 +407,11 @@ static int init_v4l2(struct vdIn *vd) - * Queue the buffers. - */ - for(i = 0; i < NB_BUFFER; ++i) { -- memset(&vd->buf, 0, sizeof(struct v4l2_buffer)); -- vd->buf.index = i; -- vd->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -- vd->buf.memory = V4L2_MEMORY_MMAP; -- ret = xioctl(vd->fd, VIDIOC_QBUF, &vd->buf); -+ memset(&buf, 0, sizeof(struct v4l2_buffer)); -+ buf.index = i; -+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -+ buf.memory = V4L2_MEMORY_MMAP; -+ ret = xioctl(vd->fd, VIDIOC_QBUF, &buf); - if(ret < 0) { - perror("Unable to queue buffer"); - goto fatal;; -@@ -499,17 +503,18 @@ int memcpy_picture(unsigned char *out, unsigned char *buf, int size) - int uvcGrab(struct vdIn *vd) - { - #define HEADERFRAME1 0xaf -+ struct v4l2_buffer buf; - int ret; - - if(vd->streamingState == STREAMING_OFF) { - if(video_enable(vd)) - goto err; - } -- memset(&vd->buf, 0, sizeof(struct v4l2_buffer)); -- vd->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -- vd->buf.memory = V4L2_MEMORY_MMAP; -+ memset(&buf, 0, sizeof(struct v4l2_buffer)); -+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; -+ buf.memory = V4L2_MEMORY_MMAP; - -- ret = xioctl(vd->fd, VIDIOC_DQBUF, &vd->buf); -+ ret = xioctl(vd->fd, VIDIOC_DQBUF, &buf); - if(ret < 0) { - perror("Unable to dequeue buffer"); - goto err; -@@ -517,33 +522,34 @@ int uvcGrab(struct vdIn *vd) - - switch(vd->formatIn) { - case V4L2_PIX_FMT_MJPEG: -- if(vd->buf.bytesused <= HEADERFRAME1) { -+ if(buf.bytesused <= HEADERFRAME1) { - /* Prevent crash - * on empty image */ - fprintf(stderr, "Ignoring empty buffer ...\n"); - return 0; - } - -- /* memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused); -+ /* memcpy(vd->tmpbuffer, vd->mem[buf.index], buf.bytesused); - -- memcpy (vd->tmpbuffer, vd->mem[vd->buf.index], HEADERFRAME1); -+ memcpy (vd->tmpbuffer, vd->mem[buf.index], HEADERFRAME1); - memcpy (vd->tmpbuffer + HEADERFRAME1, dht_data, sizeof(dht_data)); -- memcpy (vd->tmpbuffer + HEADERFRAME1 + sizeof(dht_data), vd->mem[vd->buf.index] + HEADERFRAME1, (vd->buf.bytesused - HEADERFRAME1)); -+ memcpy (vd->tmpbuffer + HEADERFRAME1 + sizeof(dht_data), vd->mem[buf.index] + HEADERFRAME1, (buf.bytesused - HEADERFRAME1)); - */ - -- memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused); -- vd->tmpbytesused = vd->buf.bytesused; -+ memcpy(vd->tmpbuffer, vd->mem[buf.index], buf.bytesused); -+ vd->tmpbytesused = buf.bytesused; -+ vd->tmptimestamp = buf.timestamp; - - if(debug) -- fprintf(stderr, "bytes in used %d \n", vd->buf.bytesused); -+ fprintf(stderr, "bytes in used %d \n", buf.bytesused); - break; - case V4L2_PIX_FMT_RGB565: - case V4L2_PIX_FMT_YUYV: - case V4L2_PIX_FMT_RGB24: -- if(vd->buf.bytesused > vd->framesizeIn) -- memcpy(vd->framebuffer, vd->mem[vd->buf.index], (size_t) vd->framesizeIn); -+ if(buf.bytesused > vd->framesizeIn) -+ memcpy(vd->framebuffer, vd->mem[buf.index], (size_t) vd->framesizeIn); - else -- memcpy(vd->framebuffer, vd->mem[vd->buf.index], (size_t) vd->buf.bytesused); -+ memcpy(vd->framebuffer, vd->mem[buf.index], (size_t) buf.bytesused); - break; - - default: -@@ -551,7 +557,7 @@ int uvcGrab(struct vdIn *vd) - break; - } - -- ret = xioctl(vd->fd, VIDIOC_QBUF, &vd->buf); -+ ret = xioctl(vd->fd, VIDIOC_QBUF, &buf); - if(ret < 0) { - perror("Unable to requeue buffer"); - goto err; -@@ -947,7 +953,7 @@ int setResolution(struct vdIn *vd, int width, int height) - DBG("Unmap buffers\n"); - int i; - for(i = 0; i < NB_BUFFER; i++) -- munmap(vd->mem[i], vd->buf.length); -+ munmap(vd->mem[i], vd->memlength[i]); - - if(CLOSE_VIDEO(vd->fd) == 0) { - DBG("Device closed successfully\n"); -diff --git a/plugins/input_uvc/v4l2uvc.h b/plugins/input_uvc/v4l2uvc.h -index 2c7c8ba..e625957 100644 ---- a/plugins/input_uvc/v4l2uvc.h -+++ b/plugins/input_uvc/v4l2uvc.h -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - - #include /* for videodev2.h */ - #include -@@ -79,11 +80,12 @@ struct vdIn { - char *pictName; - struct v4l2_capability cap; - struct v4l2_format fmt; -- struct v4l2_buffer buf; - struct v4l2_requestbuffers rb; - void *mem[NB_BUFFER]; -+ int memlength[NB_BUFFER]; - unsigned char *tmpbuffer; - int tmpbytesused; -+ struct timeval tmptimestamp; - unsigned char *framebuffer; - streaming_state streamingState; - int grabmethod; --- -1.9.1 - diff --git a/multimedia/mjpg-streamer/patches/050-fix-yuv-capture.patch b/multimedia/mjpg-streamer/patches/050-fix-yuv-capture.patch deleted file mode 100644 index 0c4d27a6..00000000 --- a/multimedia/mjpg-streamer/patches/050-fix-yuv-capture.patch +++ /dev/null @@ -1,58 +0,0 @@ -Binary files a/ipkg-ar71xx/mjpg-streamer/usr/lib/input_uvc.so and b/ipkg-ar71xx/mjpg-streamer/usr/lib/input_uvc.so differ -diff -ur a/plugins/input_uvc/input_uvc.c b/plugins/input_uvc/input_uvc.c ---- a/plugins/input_uvc/input_uvc.c 2015-03-02 09:14:05.000000000 +0200 -+++ b/plugins/input_uvc/input_uvc.c 2015-03-02 09:18:22.000000000 +0200 -@@ -311,6 +311,10 @@ - } - memset(cams[id].videoIn, 0, sizeof(struct vdIn)); - -+ /* Non-MJPEG formats seem to fail with unlimited FPS */ -+ if (format != V4L2_PIX_FMT_MJPEG && fps == -1) -+ fps = 15; -+ - /* display the parsed values */ - IPRINT("Using V4L2 device.: %s\n", dev); - IPRINT("Desired Resolution: %i x %i\n", width, height); -diff -ur a/plugins/input_uvc/jpeg_utils.c b/plugins/input_uvc/jpeg_utils.c ---- a/plugins/input_uvc/jpeg_utils.c 2015-03-02 09:17:02.000000000 +0300 -+++ b/plugins/input_uvc/jpeg_utils.c 2015-03-02 09:25:18.000000000 +0200 -@@ -198,7 +198,7 @@ - } - - row_pointer = (JSAMPROW*)line_buffer; -- jpeg_write_scanlines(&cinfo, row_pointer, 1); -+ jpeg_write_scanlines(&cinfo, &row_pointer, 1); - } - } else if (vd->formatIn == V4L2_PIX_FMT_RGB565) { - while(cinfo.next_scanline < vd->height) { -@@ -220,7 +220,7 @@ - } - - row_pointer = (JSAMPROW*)line_buffer; -- jpeg_write_scanlines(&cinfo, row_pointer, 1); -+ jpeg_write_scanlines(&cinfo, &row_pointer, 1); - } - } else if (vd->formatIn == V4L2_PIX_FMT_RGB24) { - jpeg_write_scanlines(&cinfo, (JSAMPROW*)vd->framebuffer, vd->height); -diff -ur a/plugins/input_uvc/v4l2uvc.c b/plugins/input_uvc/v4l2uvc.c ---- a/plugins/input_uvc/v4l2uvc.c 2015-03-02 09:14:05.000000000 +0200 -+++ b/plugins/input_uvc/v4l2uvc.c 2015-03-02 09:22:09.000000000 +0200 -@@ -338,11 +338,15 @@ - vd->frame_period_time = 1000/vd->fps; // calcualate frame period time in ms - IPRINT("Frame period time ......: %ld ms\n", vd->frame_period_time); - -- // set FPS to maximum in order to minimize the lagging - memset(setfps, 0, sizeof(struct v4l2_streamparm)); - setfps->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - setfps->parm.capture.timeperframe.numerator = 1; -- setfps->parm.capture.timeperframe.denominator = 255; -+ if (vd->formatIn == V4L2_PIX_FMT_MJPEG) -+ // set FPS to maximum in order to minimize the lagging -+ setfps->parm.capture.timeperframe.denominator = 255; -+ else -+ setfps->parm.capture.timeperframe.denominator = vd->fps; -+ - ret = xioctl(vd->fd, VIDIOC_S_PARM, setfps); - if (ret) { - perror("Unable to set the FPS\n"); - diff --git a/multimedia/mjpg-streamer/patches/060-fix-sigtrap-in-v4l2uvc.patch b/multimedia/mjpg-streamer/patches/060-fix-sigtrap-in-v4l2uvc.patch deleted file mode 100644 index e0b58379..00000000 --- a/multimedia/mjpg-streamer/patches/060-fix-sigtrap-in-v4l2uvc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/plugins/input_uvc/v4l2uvc.c -+++ b/plugins/input_uvc/v4l2uvc.c -@@ -130,7 +130,7 @@ int init_videoIn(struct vdIn *vd, char * - return -1; - } - -- memcpy(&pglobal->in[id].in_formats[pglobal->in[id].formatCount], &fmtdesc, sizeof(input_format)); -+ memcpy(&pglobal->in[id].in_formats[pglobal->in[id].formatCount], &fmtdesc, sizeof(struct v4l2_fmtdesc)); - - if(fmtdesc.pixelformat == format) - pglobal->in[id].currentFormat = pglobal->in[id].formatCount; diff --git a/multimedia/motion/Makefile b/multimedia/motion/Makefile index 1f0fca7b..283adc72 100644 --- a/multimedia/motion/Makefile +++ b/multimedia/motion/Makefile @@ -8,52 +8,57 @@ include $(TOPDIR)/rules.mk PKG_NAME:=motion -PKG_VERSION=3.4.0-20141018-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=3 +PKG_VERSION:=4.3.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-release-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/Motion-Project/motion/tar.gz/release-$(PKG_VERSION)? +PKG_HASH:=545712b10fc4a0134e994b7d8a3773c1c22f0bf4bd7afea7d7ffff357aca9ea5 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION) PKG_MAINTAINER:=Roger D -PKG_LICENSE:=GPLv2 +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:lavrsen:motion -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/Mr-Dave/motion.git -PKG_SOURCE_VERSION:=9479d910f2149b5558788bb86f97f26522794212 - -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_MIRROR_HASH:=02602c775ec3829dac59aed16ea6b0d78f77a435b9c360db1a05cb27227da97e -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk define Package/motion SECTION:=multimedia CATEGORY:=Multimedia - DEPENDS:=+libjpeg +libpthread + DEPENDS:=+libjpeg +libpthread +libmicrohttpd $(INTL_DEPENDS) +TARGET_bcm27xx:bcm27xx-userland TITLE:=webcam motion sensing and logging - URL:=http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome + URL:=https://motion-project.github.io/ endef define Package/motion/conffiles +/etc/config/motion /etc/motion.conf endef -CONFIGURE_ARGS+= \ - --without-optimizecpu \ +CONFIGURE_ARGS += \ + --without-bktr \ + --without-webp \ + --with$(if $(CONFIG_TARGET_bcm27xx),,out)-mmal \ --without-ffmpeg \ - --without-jpeg-mmx \ - --without-sdl \ + --without-mariadb \ --without-mysql \ --without-pgsql \ --without-sqlite3 \ + --without-optimizecpu define Package/motion/install - $(INSTALL_DIR) $(1)/etc - $(CP) $(PKG_BUILD_DIR)/motion-dist.conf $(1)/etc/motion.conf + $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d + $(INSTALL_CONF) ./files/motion.conf $(1)/etc/config/motion + $(INSTALL_BIN) ./files/motion.init $(1)/etc/init.d/motion + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/motion/motion-dist.conf $(1)/etc/motion.conf $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/motion $(1)/usr/bin/ - + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/motion $(1)/usr/bin/ endef $(eval $(call BuildPackage,motion)) diff --git a/multimedia/motion/files/motion.conf b/multimedia/motion/files/motion.conf new file mode 100644 index 00000000..3155b5e0 --- /dev/null +++ b/multimedia/motion/files/motion.conf @@ -0,0 +1,2 @@ +config motion general + option enabled '0' diff --git a/multimedia/motion/files/motion.init b/multimedia/motion/files/motion.init new file mode 100644 index 00000000..2aae9209 --- /dev/null +++ b/multimedia/motion/files/motion.init @@ -0,0 +1,22 @@ +#!/bin/sh /etc/rc.common + +START=94 +USE_PROCD=1 + +PROG="/usr/bin/motion" +CONF="/etc/motion.conf" + +start_service() { + local enabled + + config_load "motion" + config_get_bool enabled "general" "enabled" 0 + [ "$enabled" -gt 0 ] || return 1 + + procd_open_instance + + procd_set_param command "$PROG" + procd_append_param command -c "$CONF" + + procd_close_instance +} diff --git a/multimedia/motion/patches/010-no-po-man.patch b/multimedia/motion/patches/010-no-po-man.patch new file mode 100644 index 00000000..05b8dc44 --- /dev/null +++ b/multimedia/motion/patches/010-no-po-man.patch @@ -0,0 +1,21 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,6 +1,6 @@ + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = src po man ++SUBDIRS = src + + sysconfdir = @sysconfdir@/$(PACKAGE) + sysconf_DATA = \ +--- a/configure.ac ++++ b/configure.ac +@@ -472,8 +472,6 @@ AC_SUBST(AM_LDFLAGS, "$TEMP_LDFLAGS") + AC_CONFIG_FILES([ + Makefile + src/Makefile +- po/Makefile.in +- man/Makefile + data/camera1-dist.conf + data/camera2-dist.conf + data/camera3-dist.conf diff --git a/multimedia/motion/patches/100-musl-compat.patch b/multimedia/motion/patches/100-musl-compat.patch deleted file mode 100644 index b788e269..00000000 --- a/multimedia/motion/patches/100-musl-compat.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/motion.c -+++ b/motion.c -@@ -2630,6 +2630,17 @@ int main (int argc, char **argv) - struct sigaction sigchild_action; - setup_signals(&sig_handler_action, &sigchild_action); - -+ /* -+ * Create and a thread attribute for the threads we spawn later on. -+ * PTHREAD_CREATE_DETACHED means to create threads detached, i.e. -+ * their termination cannot be synchronized through 'pthread_join'. -+ */ -+ pthread_attr_init(&thread_attr); -+ pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED); -+ -+ /* Create the TLS key for thread number. */ -+ pthread_key_create(&tls_key_threadnr, NULL); -+ - motion_startup(1, argc, argv); - - #ifdef HAVE_FFMPEG -@@ -2648,17 +2659,6 @@ int main (int argc, char **argv) - if (cnt_list[0]->conf.setup_mode) - MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "%s: Motion running in setup mode."); - -- /* -- * Create and a thread attribute for the threads we spawn later on. -- * PTHREAD_CREATE_DETACHED means to create threads detached, i.e. -- * their termination cannot be synchronized through 'pthread_join'. -- */ -- pthread_attr_init(&thread_attr); -- pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED); -- -- /* Create the TLS key for thread number. */ -- pthread_key_create(&tls_key_threadnr, NULL); -- - do { - if (restart) { - /* ---- a/motion.h -+++ b/motion.h -@@ -84,7 +84,7 @@ - #endif - - /* strerror_r() XSI vs GNU */ --#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) -+#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || (!defined(__GLIBC__)) - #define XSI_STRERROR_R - #endif - diff --git a/multimedia/tvheadend/Makefile b/multimedia/tvheadend/Makefile index c026a50f..9108b929 100644 --- a/multimedia/tvheadend/Makefile +++ b/multimedia/tvheadend/Makefile @@ -9,15 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tvheadend PKG_VERSION:=4.0.10 -PKG_RELEASE:=1 +PKG_RELEASE:=4 -PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_HASH:=afe42bcf683e8576ca8ccd4755ea308f79195e92f7c30fc5961973e238f49105 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/tvheadend/tvheadend.git -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/tvheadend/tvheadend/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=f610e7d9f3bf6cff05cd73830a66ee0c74bc5291c4c9d08369364c4c681ebf23 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=LICENSE.md @@ -76,8 +72,6 @@ CONFIGURE_ARGS += \ --disable-libav \ --enable-bundle -TARGET_CFLAGS += -Wno-error=pointer-compare - define Build/Prepare $(call Build/Prepare/Default) echo 'Tvheadend $(shell echo $(PKG_SOURCE_VERSION) | sed "s/^v//")~openwrt$(PKG_RELEASE)' \ diff --git a/multimedia/tvheadend/patches/010-openssl-deprecated.patch b/multimedia/tvheadend/patches/010-openssl-deprecated.patch new file mode 100644 index 00000000..5416ef7f --- /dev/null +++ b/multimedia/tvheadend/patches/010-openssl-deprecated.patch @@ -0,0 +1,42 @@ +--- a/src/main.c ++++ b/src/main.c +@@ -965,10 +965,12 @@ main(int argc, char **argv) + sigprocmask(SIG_BLOCK, &set, NULL); + trap_init(argv[0]); + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + /* SSL library init */ + OPENSSL_config(NULL); + SSL_load_error_strings(); + SSL_library_init(); ++#endif + + /* Initialise configuration */ + notify_init(); +@@ -1159,8 +1161,11 @@ main(int argc, char **argv) + #endif + free(opt_satip_xml.str); + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + /* OpenSSL - welcome to the "cleanup" hell */ ++#ifndef OPENSSL_NO_ENGINE + ENGINE_cleanup(); ++#endif + RAND_cleanup(); + CRYPTO_cleanup_all_ex_data(); + EVP_cleanup(); +@@ -1168,12 +1173,13 @@ main(int argc, char **argv) + #ifndef OPENSSL_NO_COMP + COMP_zlib_cleanup(); + #endif +- ERR_remove_state(0); ++ ERR_remove_thread_state(NULL); + ERR_free_strings(); + #ifndef OPENSSL_NO_COMP + sk_SSL_COMP_free(SSL_COMP_get_compression_methods()); + #endif + /* end of OpenSSL cleanup code */ ++#endif + + #if ENABLE_DBUS_1 + extern void dbus_shutdown(void); diff --git a/multimedia/tvheadend/patches/020-strncpy-issue.patch b/multimedia/tvheadend/patches/020-strncpy-issue.patch new file mode 100644 index 00000000..e9dc9106 --- /dev/null +++ b/multimedia/tvheadend/patches/020-strncpy-issue.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 8c5e380..baef144 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,7 +28,7 @@ PROG := $(BUILDDIR)/tvheadend + # + + CFLAGS += -g -O2 -Wunused-result +-CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations ++#CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations + CFLAGS += -Wmissing-prototypes + CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing + CFLAGS += -D_FILE_OFFSET_BITS=64 diff --git a/multimedia/v4l2rtspserver/Makefile b/multimedia/v4l2rtspserver/Makefile index 9d442ec2..9bedabf2 100644 --- a/multimedia/v4l2rtspserver/Makefile +++ b/multimedia/v4l2rtspserver/Makefile @@ -5,23 +5,29 @@ # See /LICENSE for more information. include $(TOPDIR)/rules.mk - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/mpromonet/v4l2rtspserver.git -PKG_SOURCE_VERSION:=d7e8dd4d35a802219222642a2e3b28f2dc5069c1 -PKG_DATE:=2017-12-20 PKG_NAME:=v4l2rtspserver -PKG_VERSION:=$(PKG_DATE)-$(PKG_SOURCE_VERSION) +PKG_VERSION:=0.1.9 PKG_RELEASE:=1 -PKG_MAINTAINER:=Roger Dammit -LIVE555_VERSION:=2017.10.28 -LIVE555_MD5SUM:=a5acd14c4fa7b50f7270304d3b4a70ae +#cannot use codeload as this uses submodules +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/mpromonet/v4l2rtspserver +PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_MIRROR_HASH:=bcb68170f6b6a3560902673c4145d0311d4f661b2ed3d71ed1ee1a58bdde96d2 + +LIVE555_VERSION:=2019.11.22 +LIVE555_HASH:=cd10fbd2d28d0bc39c12ec57b9f6b13fab3bfc7005f5ac8f9c94a9eb34179e90 LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz -CMAKE_INSTALL:=1 +PKG_MAINTAINER:=Roger Dammit +PKG_LICENSE:=Unlicense +PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -29,57 +35,46 @@ define Package/v4l2rtspserver SECTION:=multimedia CATEGORY:=Multimedia TITLE:=v4l2rtspserver - DEPENDS:=+libstdcpp + DEPENDS:=$(CXX_DEPENDS) URL:=https://github.com/mpromonet/v4l2rtspserver -endef +endef define Package/v4l2rtspserver/description RTSP server for v4L2 video sources endef define Package/v4l2rtspserver/conffiles - /etc/config/v4l2rtspserver +/etc/config/v4l2rtspserver endef define Download/live555 URL:=https://download.videolan.org/pub/contrib/live555/ FILE:=$(LIVE555_FILE) - MD5SUM:=$(LIVE555_MD5SUM) + HASH:=$(LIVE555_HASH) endef +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + +CMAKE_OPTIONS += -DALSA=OFF -DLIVE555CFLAGS="$(TARGET_CFLAGS) -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1 -DVERSION=\\\"$(PKG_VERSION)\\\"" + define Build/Prepare $(Build/Prepare/Default) - ## need to compile some dependencies so that cmake will find them - - # build live555 - $(eval $(call Download,live555)) - - mkdir -p $(PKG_BUILD_DIR)/live555 - $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live555 - $(CP) files/config.openwrt $(PKG_BUILD_DIR)/live555 - ( cd $(PKG_BUILD_DIR)/live555; ./genMakefiles openwrt ) - - $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/live555 - $(MAKE) -C $(PKG_BUILD_DIR)/live555 PREFIX="$(STAGING_DIR)/usr/" install - - # build v4l2wrapper - $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/v4l2wrapper CFLAGS="$(TARGET_CFLAGS) -I $(PKG_BUILD_DIR)/v4l2wrapper/inc" - $(CP) $(PKG_BUILD_DIR)/v4l2wrapper/libv4l2wrapper.a $(PKG_BUILD_DIR) - - # patch cmake file - $(SED) 's/DEBUG/RELEASE/' $(PKG_BUILD_DIR)/CMakeLists.txt + # download live555 + $(eval $(call Download,live555)) + mkdir -p $(PKG_BUILD_DIR)/live + $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live endef define Package/v4l2rtspserver/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/ - mv $(1)/usr/bin/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/v4l2rtspserver + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v4l2rtspserver $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) files/v4l2rtspserver.init $(1)/etc/init.d/v4l2rtspserver $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) files/v4l2rtspserver.config $(1)/etc/config/v4l2rtspserver -endef +endef $(eval $(call BuildPackage,v4l2rtspserver)) diff --git a/multimedia/v4l2rtspserver/files/config.openwrt b/multimedia/v4l2rtspserver/files/config.openwrt deleted file mode 100644 index 0c879889..00000000 --- a/multimedia/v4l2rtspserver/files/config.openwrt +++ /dev/null @@ -1,19 +0,0 @@ -COMPILE_OPTS = $(INCLUDES) -I. -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1 -C = c -C_COMPILER = $(GCC) -CFLAGS += $(COMPILE_OPTS) -C_FLAGS = $(CFLAGS) -CPP = cpp -CPLUSPLUS_COMPILER = $(AS) # optimizations are only in AR apparently, so use instead of CXX -CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 -CPLUSPLUS_FLAGS += $(CPPFLAGS) -fexceptions -OBJ = o -LINK = $(CXX) -o -LINK_OPTS = -L. $(LDFLAGS) -CONSOLE_LINK_OPTS = $(LINK_OPTS) -LIBRARY_LINK = $(AR) cr -LIBRARY_LINK_OPTS = -LIB_SUFFIX = a -LIBS_FOR_CONSOLE_APPLICATION = $(CXXLIBS) -LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) -EXE = diff --git a/multimedia/v4l2rtspserver/files/v4l2rtspserver.init b/multimedia/v4l2rtspserver/files/v4l2rtspserver.init index e4c837e8..7a19ef52 100644 --- a/multimedia/v4l2rtspserver/files/v4l2rtspserver.init +++ b/multimedia/v4l2rtspserver/files/v4l2rtspserver.init @@ -40,10 +40,6 @@ start_instance() { config_get path "$s" 'path' config_get format "$s" 'format' - # pull out resolution width and height from string - local w="$(echo $resolution | cut -d'x' -f1)" - local h="$(echo $resolution | cut -d'x' -f2)" - # make sure format is uppercase format="$(echo $format | tr a-z A-Z)" @@ -52,9 +48,10 @@ start_instance() { args="$args -P $port" args="$args -u ${path}" args="$args -F $fps" - args="$args -W $w" - args="$args -H $h" - args="$args -f$format" + args="$args -G ${resolution}" + if [ ! -z "$format" ]; then + args="$args -f$format" + fi args="$args -c" # fixes issue with corrupt frames with H264 if [ -n "$username" ]; then diff --git a/multimedia/xupnpd/Makefile b/multimedia/xupnpd/Makefile index 34649417..f82594cc 100644 --- a/multimedia/xupnpd/Makefile +++ b/multimedia/xupnpd/Makefile @@ -8,16 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xupnpd -PKG_REV:=7ff74b2d5288fbc35c4f6fcb94466d408b1f853c -PKG_VERSION:=2017-10-31 +PKG_REV:=e4e542d9b6d0043d470fda283e2cd325bbb91950 +PKG_VERSION:=2018-11-20 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/clark15b/xupnpd.git -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_MIRROR_HASH:=333e9938556c9a02b28732b5512626b991c65eaf0eb60d38e29f72ec513d312f +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/clark15b/xupnpd/tar.gz/$(PKG_REV)? +PKG_HASH:=9177b7d5615172fe64f1b6120e5239c0b818ba4bff1f26916fe39fb69eefee4f +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REV) PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:=LICENSE diff --git a/multimedia/youtube-dl/Makefile b/multimedia/youtube-dl/Makefile index 34455640..8736d146 100644 --- a/multimedia/youtube-dl/Makefile +++ b/multimedia/youtube-dl/Makefile @@ -8,46 +8,41 @@ include $(TOPDIR)/rules.mk PKG_NAME:=youtube-dl -PKG_VERSION:=2018.03.10 +PKG_VERSION:=2020.6.16.1 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://yt-dl.org/downloads/$(PKG_VERSION)/ -PKG_HASH:=4bfadccb19e379ce38f5601c72dacf0ac5e03881230afee6df2152ab42fa75c5 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PYPI_NAME:=youtube_dl +PKG_HASH:=9fc0389a1bbbeb609a5bb4ad5630dea107a9d1a24c73721c611a78c234309a75 +PKG_MAINTAINER:=Adrian Panella , Josef Schlehofer PKG_LICENSE:=Unlicense PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Adrian Panella - -PKG_BUILD_DEPENDS:=python/host zip/host +include ../../lang/python/pypi.mk include $(INCLUDE_DIR)/package.mk +include ../../lang/python/python3-package.mk define Package/youtube-dl SECTION:=multimedia CATEGORY:=Multimedia - TITLE:=utility to download videos from YouTube.com - DEPENDS:=+python-openssl +python-email +python-xml +python-codecs +python-ctypes +ca-certificates - URL:=https://youtube-dl.org + TITLE:=Utility to download videos from YouTube.com + URL:=https://yt-dl.org + DEPENDS:= \ + +ca-certificates \ + +python3 \ + +python3-email \ + +python3-xml \ + +python3-codecs \ + +python3-ctypes \ + +python3-setuptools endef define Package/youtube-dl/description - youtube-dl is a small command-line program to download videos - from YouTube.com and a few more sites. - It requires the Python interpreter. -endef - -define Package/youtube-dl/install - $(INSTALL_DIR) $(1)/usr/bin - - python -m compileall $(PKG_BUILD_DIR)/youtube_dl/ - cd $(PKG_BUILD_DIR) && zip --quiet youtube-dl-c.zip youtube_dl/*.pyc youtube_dl/*/*.pyc - cd $(PKG_BUILD_DIR) && zip --quiet --junk-paths youtube-dl-c.zip youtube_dl/__main__.pyc - echo '#!/usr/bin/env python' > $(PKG_BUILD_DIR)/youtube-dl-c - cat $(PKG_BUILD_DIR)/youtube-dl-c.zip >> $(PKG_BUILD_DIR)/youtube-dl-c - - $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/youtube-dl-c $(1)/usr/bin/youtube-dl + youtube-dl is a small command-line program to download videos + from YouTube.com and other video sites. + It requires the Python3 interpreter. endef +$(eval $(call Py3Package,youtube-dl)) $(eval $(call BuildPackage,youtube-dl)) +$(eval $(call BuildPackage,youtube-dl-src)) diff --git a/net/netopeer2/Config_keystored.in b/net/Netopeer2/Config_keystored.in similarity index 100% rename from net/netopeer2/Config_keystored.in rename to net/Netopeer2/Config_keystored.in diff --git a/net/Netopeer2/Makefile b/net/Netopeer2/Makefile new file mode 100644 index 00000000..76767f42 --- /dev/null +++ b/net/Netopeer2/Makefile @@ -0,0 +1,128 @@ +# +# Copyright (C) 2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# Warning by default OpenWrt does not have a root password which is necessery for NETCONF server. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=Netopeer2 +PKG_VERSION:=1.1.27 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=e3914aae78d19f445a37ef37408f7ce209ebf0b05deb412b1bc56a021448885f + +PKG_MAINTAINER:=Mislav Novakovic +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE + +CMAKE_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/netopeer2-keystored/config + source "$(SOURCE)/Config_keystored.in" +endef + +define Package/netopeer2-server + SECTION:=utils + CATEGORY:=Utilities + TITLE:=NETCONF server + URL:=https://github.com/CESNET/Netopeer2 + DEPENDS:=+libcurl +libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo + MENU:=1 +endef + +define Package/netopeer2-cli + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Netopeer2 cli tool + URL:=https://github.com/CESNET/Netopeer2 + DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl +endef + +define Package/netopeer2-keystored + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Netopeer2 key store management + URL:=https://github.com/CESNET/Netopeer2 + DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen + MENU:=1 +endef + +define Package/netopeer2/description + Netopeer2 is a set of tools implementing network configuration tools based on the NETCONF + Protocol. This is the second generation of the toolset, originally available as the Netopeer + project. Netopeer2 is based on the new generation of the NETCONF and YANG libraries - + libyang and libnetconf2. The Netopeer server uses sysrepo as a NETCONF datastore implementation. +endef + +CMAKE_OPTIONS += \ + -DGENERATE_HOSTKEY:BOOL=OFF \ + -DINSTALL_MODULES:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=release + +#-DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys \ + +define Package/netopeer2-server/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netopeer2-server $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/etc/sysrepo/yang + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-ssh-server@2019-07-02.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-tls-server@2019-07-02.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/iana-crypt-hash@2014-08-06.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-x509-cert-to-name@2014-12-10.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-server@2019-07-02.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-monitoring@2010-10-04.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-acm@2018-02-14.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-nmda@2019-01-07.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf@2013-09-29.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-datastores@2017-08-17.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-crypto-types@2019-07-02.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/iana-crypt-hash@2014-08-06.yang $(1)/etc/sysrepo/yang/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-tcp-server@2019-07-02.yang $(1)/etc/sysrepo/yang/ + + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/98_netopeer2-server + + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/netopeer2-server.init $(1)/etc/init.d/netopeer2-server + + $(INSTALL_DIR) $(1)/usr/share/netopeer2-server + $(INSTALL_DATA) ./files/stock_config.xml $(1)/usr/share/netopeer2-server +endef + +define Package/netopeer2-cli/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netopeer2-cli $(1)/usr/bin/ +endef + +define Package/netopeer2-keystored/install + $(INSTALL_DIR) $(1)/etc/sysrepo/yang + $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-keystore@2019-07-02.yang $(1)/etc/sysrepo/yang/ + + $(INSTALL_DIR) $(1)/etc/uci-defaults + + $(INSTALL_DIR) $(1)/etc/keystored/keys +ifeq ($(CONFIG_SSH_KEYS),y) + $(INSTALL_BIN) ./files/netopeer2-keystored-keygen.default $(1)/etc/uci-defaults/97_netopeer2-keystored +else + $(INSTALL_BIN) ./files/netopeer2-keystored.default $(1)/etc/uci-defaults/97_netopeer2-keystored + #ssh key name is specified in ./files/stock_config.xml file, you will need to provide the ssh keys yourself. + $(INSTALL_DATA) ./files/ssh_host_rsa_key.pem $(1)/etc/keystored/keys + $(INSTALL_DATA) ./files/ssh_host_rsa_key.pub.pem $(1)/etc/keystored/keys +endif + +endef + +$(eval $(call BuildPackage,netopeer2-server)) +$(eval $(call BuildPackage,netopeer2-cli)) +$(eval $(call BuildPackage,netopeer2-keystored)) diff --git a/net/Netopeer2/files/netopeer2-keystored-keygen.default b/net/Netopeer2/files/netopeer2-keystored-keygen.default new file mode 100644 index 00000000..aa8bb993 --- /dev/null +++ b/net/Netopeer2/files/netopeer2-keystored-keygen.default @@ -0,0 +1,22 @@ +#!/bin/sh + +# Warning, problems can occur if the device restarts in the middle of this uci-default script + +if [ -x /bin/sysrepoctl ]; then + match=$(sysrepoctl -l | grep "ietf-keystore ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2019-07-02.yang -o root:root -p 600 + if [ -x /bin/sysrepocfg ]; then + sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore + rm /usr/share/netopeer2-keystored/stock_key_config.xml + fi + + #generate ssh keys + if [ ! -f "/etc/keystored/keys/ssh_host_rsa_key.pem" ]; then + ssh-keygen -m pem -t rsa -q -N "" -f /etc/keystored/keys/ssh_host_rsa_key.pem + chmod go-rw /etc/keystored/keys/ssh_host_rsa_key.pem + fi + fi +fi + +exit 0 diff --git a/net/Netopeer2/files/netopeer2-keystored.default b/net/Netopeer2/files/netopeer2-keystored.default new file mode 100644 index 00000000..4ec74e92 --- /dev/null +++ b/net/Netopeer2/files/netopeer2-keystored.default @@ -0,0 +1,16 @@ +#!/bin/sh + +# Warning, problems can occur if the device restarts in the middle of this uci-default script + +if [ -x /bin/sysrepoctl ]; then + match=$(sysrepoctl -l | grep "ietf-keystore ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2019-07-02.yang -o root:root -p 600 + if [ -x /bin/sysrepocfg ]; then + sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore + rm /usr/share/netopeer2-keystored/stock_key_config.xml + fi + fi +fi + +exit 0 diff --git a/net/Netopeer2/files/netopeer2-server.default b/net/Netopeer2/files/netopeer2-server.default new file mode 100644 index 00000000..ec91d204 --- /dev/null +++ b/net/Netopeer2/files/netopeer2-server.default @@ -0,0 +1,59 @@ +#!/bin/sh + +# Warning, problems can occur if the device restarts in the middle of this uci-default script + +if [ -x /bin/sysrepoctl ]; then + match=$(sysrepoctl -l | grep "ietf-ssh-server ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server@2019-07-02.yang -p 600 + fi + + match=$(sysrepoctl -l | grep "ietf-tls-server ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server@2019-07-02.yang -p 600 + fi + + match=$(sysrepoctl -l | grep "iana-crypt-hash ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang -p 600 + fi + + match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang -p 600 + fi + + match=$(sysrepoctl -l | grep "ietf-netconf-server ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server@2019-07-02.yang -o root:root -p 600 + sysrepoctl -m ietf-netconf-server -e listen + sysrepoctl -m ietf-netconf-server -e ssh-listen + sysrepoctl -m ietf-netconf-server -e tls-listen + sysrepoctl -m ietf-netconf-server -e call-home + sysrepoctl -m ietf-netconf-server -e ssh-call-home + sysrepoctl -m ietf-netconf-server -e tls-call-home + sysrepoctl -m ietf-netconf -e url + if [ -x /bin/sysrepocfg ]; then + sysrepocfg -f xml -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server + rm /usr/share/netopeer2-server/stock_config.xml + fi + fi + + match=$(sysrepoctl -l | grep "ietf-netconf-monitoring ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang -o root:root -p 600 + fi + + match=$(sysrepoctl -l | grep "ietf-netconf-with-defaults ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf@2013-09-29.yang -o root:root -p 600 + fi + + match=$(sysrepoctl -l | grep "ietf-datastores ") + if [ ! "$match" ]; then + sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-datastores@2017-08-17.yang -o root:root -p 600 + fi + +fi + +exit 0 diff --git a/net/Netopeer2/files/netopeer2-server.init b/net/Netopeer2/files/netopeer2-server.init new file mode 100644 index 00000000..6b2c133b --- /dev/null +++ b/net/Netopeer2/files/netopeer2-server.init @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common + +START=99 +STOP=11 + +USE_PROCD=1 +PROG=/bin/netopeer2-server + +start_service() { + procd_open_instance + procd_set_param command $PROG + procd_append_param command -d -v 0 + procd_set_param respawn + procd_close_instance +} + +stop_service() +{ + service_stop ${PROG} + rm /var/run/netopeer2-server.pid +} diff --git a/net/netopeer2/files/stock_config.xml b/net/Netopeer2/files/stock_config.xml similarity index 100% rename from net/netopeer2/files/stock_config.xml rename to net/Netopeer2/files/stock_config.xml diff --git a/net/Netopeer2/patches/001-openss_1.1_support.patch b/net/Netopeer2/patches/001-openss_1.1_support.patch new file mode 100644 index 00000000..5069ef9b --- /dev/null +++ b/net/Netopeer2/patches/001-openss_1.1_support.patch @@ -0,0 +1,11 @@ +--- a/cli/commands.c 2020-05-08 16:29:28.284509842 +0300 ++++ b/cli/commands.c 2020-05-08 16:29:38.856397844 +0300 +@@ -1727,7 +1727,7 @@ + BIO_printf(bio_out, "\n"); + + BIO_printf(bio_out, "Valid until: "); +- ASN1_TIME_print(bio_out, X509_get_notAfter(cert)); ++ ASN1_TIME_print(bio_out, X509_get0_notAfter(cert)); + BIO_printf(bio_out, "\n"); + + has_san = 0; diff --git a/net/Netopeer2/patches/010-gcc10.patch b/net/Netopeer2/patches/010-gcc10.patch new file mode 100644 index 00000000..60862898 --- /dev/null +++ b/net/Netopeer2/patches/010-gcc10.patch @@ -0,0 +1,22 @@ +--- a/cli/commands.h ++++ b/cli/commands.h +@@ -17,7 +17,7 @@ + + #include "cli_version.h" + +-char some_msg[4096]; ++static char some_msg[4096]; + #define INSTRUCTION(format,args...) {snprintf(some_msg,4095,format,##args);printf("\n %s",some_msg);} + #define ERROR(function,format,args...) {snprintf(some_msg,4095,format,##args);fprintf(stderr,"%s: %s\n",function,some_msg);} + +--- a/src/log.h ++++ b/src/log.h +@@ -36,7 +36,7 @@ extern uint8_t np2_sr_verbose_level; + /** + * @brief netopeer2 flag whether to print messages to stderr (only if not daemon). + */ +-uint8_t np2_stderr_log; ++extern uint8_t np2_stderr_log; + + /** + * @brief internal printing function, follows the levels from libnetconf2 diff --git a/net/acme/Makefile b/net/acme/Makefile index 2e5a53fc..3a65e8ca 100644 --- a/net/acme/Makefile +++ b/net/acme/Makefile @@ -8,26 +8,24 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acme -PKG_VERSION:=2.8.3 -PKG_RELEASE:=2 +PKG_VERSION:=2.8.6 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/Neilpang/acme.sh/tar.gz/$(PKG_VERSION)? -PKG_HASH:=bdec71377a764919ac277e26d71ef7e24087f7f05171921888b70de6ab6e2cbc +PKG_SOURCE_URL:=https://github.com/acmesh-official/acme.sh/archive/$(PKG_VERSION).tar.gz +PKG_HASH:=fd36cb749466296ded521ceacda3fc841ec76be620900d1116e0492d171c1d9f PKG_BUILD_DIR:=$(BUILD_DIR)/acme.sh-$(PKG_VERSION) PKG_MAINTAINER:=Toke Høiland-Jørgensen PKG_LICENSE:=GPL-3.0-only PKG_LICENSE_FILES:=LICENSE.md -LUCI_DIR:=/usr/lib/lua/luci - include $(INCLUDE_DIR)/package.mk define Package/acme SECTION:=net CATEGORY:=Network - DEPENDS:=+gnu-wget +ca-bundle +openssl-util +socat + DEPENDS:=+wget-ssl +ca-bundle +openssl-util +socat TITLE:=ACME (Letsencrypt) client URL:=https://acme.sh PKGARCH:=all @@ -59,6 +57,11 @@ define Package/acme/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/acme.sh $(1)/usr/lib/acme/acme.sh endef +define Package/acme/prerm +#!/bin/sh +sed -i '/\/etc\/init\.d\/acme start/d' /etc/crontabs/root +endef + define Package/acme-dnsapi SECTION:=net CATEGORY:=Network @@ -76,43 +79,5 @@ define Package/acme-dnsapi/install $(INSTALL_DATA) $(PKG_BUILD_DIR)/dnsapi/*.sh $(1)/usr/lib/acme/dnsapi endef -define Package/luci-app-acme - SECTION:=luci - CATEGORY:=LuCI - TITLE:=ACME package - LuCI interface - DEPENDS:= lua luci-base +acme - SUBMENU:=3. Applications - PKGARCH:=all -endef - -define Package/luci-app-acme/description - Control the ACME Letsencrypt certificate interface -endef - -define Package/luci-app-acme/install - $(INSTALL_DIR) $(1)$(LUCI_DIR)/controller $(1)$(LUCI_DIR)/model/cbi - $(INSTALL_DATA) ./files/acme-controller.lua $(1)$(LUCI_DIR)/controller/acme.lua - $(INSTALL_DATA) ./files/acme-cbi.lua $(1)$(LUCI_DIR)/model/cbi/acme.lua - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_BIN) ./files/uci-defaults-acme $(1)/etc/uci-defaults/luci-acme -endef - -define Package/luci-app-acme/postinst -#!/bin/sh -[ -x /etc/uci-defaults/luci-acme ] && /etc/uci-defaults/luci-acme || exit 0 -endef - -define Package/luci-app-acme/postrm -#!/bin/sh -which uci > /dev/null || exit 0 -uci -q get ucitrack.@acme[0] > /dev/null && { - uci delete ucitrack.@acme[0] - uci commit -} -exit 0 -endef - - $(eval $(call BuildPackage,acme)) $(eval $(call BuildPackage,acme-dnsapi)) -$(eval $(call BuildPackage,luci-app-acme)) diff --git a/net/acme/files/acme-cbi.lua b/net/acme/files/acme-cbi.lua deleted file mode 100644 index 5fc860e3..00000000 --- a/net/acme/files/acme-cbi.lua +++ /dev/null @@ -1,108 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2016 Toke Høiland-Jørgensen - -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation; either version 3 of the License, or (at your option) any later -# version. - -]]-- - -local fs = require "nixio.fs" - -local nginx_presence = fs.access("/usr/sbin/nginx") or false -local uhttpd_presence = fs.access("/usr/sbin/uhttpd") or false - -m = Map("acme", translate("ACME certificates"), - translate("This configures ACME (Letsencrypt) automatic certificate installation. " .. - "Simply fill out this to have the router configured with Letsencrypt-issued " .. - "certificates for the web interface. " .. - "Note that the domain names in the certificate must already be configured to " .. - "point at the router's public IP address. " .. - "Once configured, issuing certificates can take a while. " .. - "Check the logs for progress and any errors.")) - -s = m:section(TypedSection, "acme", translate("ACME global config")) -s.anonymous = true - -st = s:option(Value, "state_dir", translate("State directory"), - translate("Where certs and other state files are kept.")) -st.rmempty = false -st.datatype = "directory" - -ae = s:option(Value, "account_email", translate("Account email"), - translate("Email address to associate with account key.")) -ae.rmempty = false -ae.datatype = "minlength(1)" - -d = s:option(Flag, "debug", translate("Enable debug logging")) -d.rmempty = false - -cs = m:section(TypedSection, "cert", translate("Certificate config")) -cs.anonymous = false -cs.addremove = true - -e = cs:option(Flag, "enabled", translate("Enabled")) -e.rmempty = false - -us = cs:option(Flag, "use_staging", translate("Use staging server"), - translate("Get certificate from the Letsencrypt staging server " .. - "(use for testing; the certificate won't be valid).")) -us.rmempty = false - -kl = cs:option(ListValue, "keylength", translate("Key size"), - translate("Key size (and type) for the generated certificate.")) -kl:value("2048", "RSA 2048 bits") -kl:value("3072", "RSA 3072 bits") -kl:value("4096", "RSA 4096 bits") -kl:value("ec-256", "ECC 256 bits") -kl:value("ec-384", "ECC 384 bits") -kl.default = "2048" -kl.rmempty = false - -if uhttpd_presence then -u = cs:option(Flag, "update_uhttpd", translate("Use for uhttpd"), - translate("Update the uhttpd config with this certificate once issued " .. - "(only select this for one certificate)." .. - "Is also available luci-app-uhttpd to configure uhttpd form the LuCI interface.")) -u.rmempty = false -end - -if nginx_presence then -u = cs:option(Flag, "update_nginx", translate("Use for nginx"), - translate("Update the nginx config with this certificate once issued " .. - "(only select this for one certificate)." .. - "Nginx must support ssl, if not it won't start as it needs to be " .. - "compiled with ssl support to use cert options")) -u.rmempty = false -end - -wr = cs:option(Value, "webroot", translate("Webroot directory"), - translate("Webserver root directory. Set this to the webserver " .. - "document root to run Acme in webroot mode. The web " .. - "server must be accessible from the internet on port 80.")) -wr.optional = true - -dom = cs:option(DynamicList, "domains", translate("Domain names"), - translate("Domain names to include in the certificate. " .. - "The first name will be the subject name, subsequent names will be alt names. " .. - "Note that all domain names must point at the router in the global DNS.")) -dom.datatype = "list(string)" - -dns = cs:option(Value, "dns", translate("DNS API"), - translate("To use DNS mode to issue certificates, set this to the name of a DNS API supported by acme.sh. " .. - "See https://github.com/Neilpang/acme.sh/tree/master/dnsapi for the list of available APIs. " .. - "In DNS mode, the domain name does not have to resolve to the router IP. " .. - "DNS mode is also the only mode that supports wildcard certificates. " .. - "Using this mode requires the acme-dnsapi package to be installed.")) -dns.optional = true - -cred = cs:option(DynamicList, "credentials", translate("DNS API credentials"), - translate("The credentials for the DNS API mode selected above. " .. - "See https://github.com/Neilpang/acme.sh/tree/master/dnsapi#how-to-use-dns-api for the format of credentials required by each API. " .. - "Add multiple entries here in KEY=VAL shell variable format to supply multiple credential variables.")) -cred.datatype = "list(string)" - -return m diff --git a/net/acme/files/acme-controller.lua b/net/acme/files/acme-controller.lua deleted file mode 100644 index acdd688e..00000000 --- a/net/acme/files/acme-controller.lua +++ /dev/null @@ -1,7 +0,0 @@ -module("luci.controller.acme", package.seeall) - -function index() - entry({"admin", "services", "acme"}, - cbi("acme"), - _("ACME certs"), 50).dependent = false -end diff --git a/net/acme/files/acme.config b/net/acme/files/acme.config index 95565c83..50f013b9 100644 --- a/net/acme/files/acme.config +++ b/net/acme/files/acme.config @@ -3,11 +3,31 @@ config acme option account_email 'email@example.org' option debug 0 +config cert 'example_wildcard' + option enabled 0 + option use_staging 1 + option keylength 2048 + option update_uhttpd 1 + option update_nginx 1 + list domains example.org + list domains sub.example.org + list domains *.sub.example.org + # option user_setup "path-to-custom-setup.script" + # option user_cleanup "path-to-custom-cleanup.script" + option dns "dns_freedns" + list credentials 'FREEDNS_User="ssladmin@example.org"' + list credentials 'FREEDNS_Password="1234"' + option calias "example.com" + option dalias "dalias.example.com" + config cert 'example' option enabled 0 option use_staging 1 option keylength 2048 option update_uhttpd 1 option update_nginx 1 - option webroot "" list domains example.org + list domains sub.example.org + option webroot "" + # option user_setup "path-to-custom-setup.script" + # option user_cleanup "path-to-custom-cleanup.script" diff --git a/net/acme/files/run.sh b/net/acme/files/run.sh index 3d25321d..41ad60d1 100644 --- a/net/acme/files/run.sh +++ b/net/acme/files/run.sh @@ -20,6 +20,7 @@ DEBUG=0 NGINX_WEBSERVER=0 UPDATE_NGINX=0 UPDATE_UHTTPD=0 +USER_CLEANUP= . /lib/functions.sh @@ -32,17 +33,17 @@ check_cron() log() { - logger -t acme -s -p daemon.info "$@" + logger -t acme -s -p daemon.info -- "$@" } err() { - logger -t acme -s -p daemon.err "$@" + logger -t acme -s -p daemon.err -- "$@" } debug() { - [ "$DEBUG" -eq "1" ] && logger -t acme -s -p daemon.debug "$@" + [ "$DEBUG" -eq "1" ] && logger -t acme -s -p daemon.debug -- "$@" } get_listeners() { @@ -148,6 +149,11 @@ post_checks() NGINX_WEBSERVER=0 /etc/init.d/nginx restart fi + + if [ -n "$USER_CLEANUP" ] && [ -f "$USER_CLEANUP" ]; then + log "Running user-provided cleanup script from $USER_CLEANUP." + "$USER_CLEANUP" || return 1 + fi } err_out() @@ -165,9 +171,12 @@ int_out() is_staging() { - local main_domain="$1" + local main_domain + local domain_dir + main_domain="$1" + domain_dir="$2" - grep -q "acme-staging" "$STATE_DIR/$main_domain/${main_domain}.conf" + grep -q "acme-staging" "${domain_dir}/${main_domain}.conf" return $? } @@ -180,25 +189,34 @@ issue_cert() local update_uhttpd local update_nginx local keylength + local keylength_ecc=0 local domains local main_domain local moved_staging=0 local failed_dir local webroot local dns + local user_setup + local user_cleanup local ret + local domain_dir config_get_bool enabled "$section" enabled 0 config_get_bool use_staging "$section" use_staging config_get_bool update_uhttpd "$section" update_uhttpd config_get_bool update_nginx "$section" update_nginx + config_get calias "$section" calias + config_get dalias "$section" dalias config_get domains "$section" domains config_get keylength "$section" keylength config_get webroot "$section" webroot config_get dns "$section" dns + config_get user_setup "$section" user_setup + config_get user_cleanup "$section" user_cleanup UPDATE_NGINX=$update_nginx UPDATE_UHTTPD=$update_uhttpd + USER_CLEANUP=$user_cleanup [ "$enabled" -eq "1" ] || return @@ -207,7 +225,19 @@ issue_cert() set -- $domains main_domain=$1 - [ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1 + if [ -n "$user_setup" ] && [ -f "$user_setup" ]; then + log "Running user-provided setup script from $user_setup." + "$user_setup" "$main_domain" || return 1 + else + [ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1 + fi + + if echo $keylength | grep -q "^ec-"; then + domain_dir="$STATE_DIR/${main_domain}_ecc" + keylength_ecc=1 + else + domain_dir="$STATE_DIR/${main_domain}" + fi log "Running ACME for $main_domain" @@ -217,13 +247,14 @@ issue_cert() } config_list_foreach "$section" credentials handle_credentials - if [ -e "$STATE_DIR/$main_domain" ]; then - if [ "$use_staging" -eq "0" ] && is_staging "$main_domain"; then + if [ -e "$domain_dir" ]; then + if [ "$use_staging" -eq "0" ] && is_staging "$main_domain" "$domain_dir"; then log "Found previous cert issued using staging server. Moving it out of the way." - mv "$STATE_DIR/$main_domain" "$STATE_DIR/$main_domain.staging" + mv "$domain_dir" "${domain_dir}.staging" moved_staging=1 else log "Found previous cert config. Issuing renew." + [ "$keylength_ecc" -eq "1" ] && acme_args="$acme_args --ecc" run_acme --home "$STATE_DIR" --renew -d "$main_domain" $acme_args && ret=0 || ret=1 post_checks return $ret @@ -239,6 +270,16 @@ issue_cert() if [ -n "$dns" ]; then log "Using dns mode" acme_args="$acme_args --dns $dns" + if [ -n "$dalias" ]; then + log "Using domain alias for dns mode" + acme_args="$acme_args --domain-alias $dalias" + if [ -n "$calias" ]; then + err "Both domain and challenge aliases are defined. Ignoring the challenge alias." + fi + elif [ -n "$calias" ]; then + log "Using challenge alias for dns mode" + acme_args="$acme_args --challenge-alias $calias" + fi elif [ -z "$webroot" ]; then log "Using standalone mode" acme_args="$acme_args --standalone --listen-v6" @@ -253,26 +294,26 @@ issue_cert() fi if ! run_acme --home "$STATE_DIR" --issue $acme_args; then - failed_dir="$STATE_DIR/${main_domain}.failed-$(date +%s)" + failed_dir="${domain_dir}.failed-$(date +%s)" err "Issuing cert for $main_domain failed. Moving state to $failed_dir" - [ -d "$STATE_DIR/$main_domain" ] && mv "$STATE_DIR/$main_domain" "$failed_dir" + [ -d "$domain_dir" ] && mv "$domain_dir" "$failed_dir" if [ "$moved_staging" -eq "1" ]; then err "Restoring staging certificate" - mv "$STATE_DIR/${main_domain}.staging" "$STATE_DIR/${main_domain}" + mv "${domain_dir}.staging" "${domain_dir}" fi post_checks return 1 fi if [ -e /etc/init.d/uhttpd ] && [ "$update_uhttpd" -eq "1" ]; then - uci set uhttpd.main.key="$STATE_DIR/${main_domain}/${main_domain}.key" - uci set uhttpd.main.cert="$STATE_DIR/${main_domain}/fullchain.cer" + uci set uhttpd.main.key="${domain_dir}/${main_domain}.key" + uci set uhttpd.main.cert="${domain_dir}/fullchain.cer" # commit and reload is in post_checks fi if [ -e /etc/init.d/nginx ] && [ "$update_nginx" -eq "1" ]; then - sed -i "s#ssl_certificate\ .*#ssl_certificate $STATE_DIR/${main_domain}/fullchain.cer;#g" /etc/nginx/nginx.conf - sed -i "s#ssl_certificate_key\ .*#ssl_certificate_key $STATE_DIR/${main_domain}/${main_domain}.key;#g" /etc/nginx/nginx.conf + sed -i "s#ssl_certificate\ .*#ssl_certificate ${domain_dir}/fullchain.cer;#g" /etc/nginx/nginx.conf + sed -i "s#ssl_certificate_key\ .*#ssl_certificate_key ${domain_dir}/${main_domain}.key;#g" /etc/nginx/nginx.conf # commit and reload is in post_checks fi diff --git a/net/acme/files/uci-defaults-acme b/net/acme/files/uci-defaults-acme deleted file mode 100644 index 182b488c..00000000 --- a/net/acme/files/uci-defaults-acme +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@acme[-1] - add ucitrack acme - add_list ucitrack.@bcp38[0].init=acme - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/net/adblock/Makefile b/net/adblock/Makefile index 88b6e5d7..328911a2 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -1,14 +1,14 @@ # -# Copyright (c) 2015-2018 Dirk Brenken (dev@brenken.org) +# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org) # This is free software, licensed under the GNU General Public License v3. # include $(TOPDIR)/rules.mk PKG_NAME:=adblock -PKG_VERSION:=3.5.5 -PKG_RELEASE:=2 -PKG_LICENSE:=GPL-3.0+ +PKG_VERSION:=4.0.6 +PKG_RELEASE:=1 +PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken include $(INCLUDE_DIR)/package.mk @@ -17,12 +17,12 @@ define Package/adblock SECTION:=net CATEGORY:=Network TITLE:=Powerful adblock script to block ad/abuse domains by using DNS - DEPENDS:=+jshn +jsonfilter + DEPENDS:=+jshn +jsonfilter +coreutils +coreutils-sort +ca-bundle +opkg PKGARCH:=all endef define Package/adblock/description -Powerful adblock script to block ad/abuse domains via dnsmasq, unbound, named, kresd or dnscrypt-proxy. +Powerful adblock script to block ad/abuse domains via dnsmasq, unbound, named or kresd. The script supports many domain blacklist sites plus manual black- and whitelist overrides. Please see https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md for further information. @@ -45,7 +45,7 @@ endef define Package/adblock/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./files/adblock.sh $(1)/usr/bin/ + $(INSTALL_BIN) ./files/adblock.sh $(1)/usr/bin $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/adblock.init $(1)/etc/init.d/adblock @@ -54,9 +54,12 @@ define Package/adblock/install $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/config/adblock $(INSTALL_DIR) $(1)/etc/adblock - $(INSTALL_CONF) ./files/adblock.notify $(1)/etc/adblock/ - $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock/ - $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock/ + $(INSTALL_BIN) ./files/adblock.mail $(1)/etc/adblock + $(INSTALL_BIN) ./files/adblock.monitor $(1)/etc/adblock + $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock + $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock + $(INSTALL_CONF) ./files/adblock.sources $(1)/etc/adblock + gzip -9 $(1)/etc/adblock/adblock.sources endef $(eval $(call BuildPackage,adblock)) diff --git a/net/adblock/files/README.md b/net/adblock/files/README.md index fb785662..da834bd4 100644 --- a/net/adblock/files/README.md +++ b/net/adblock/files/README.md @@ -1,164 +1,192 @@ -# dns based ad/abuse domain blocking +# DNS based ad/abuse domain blocking ## Description -A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other wlan gadget...getting rid of annoying ads, trackers and other abuse sites (like facebook ;-) is simple: block them with your router. When the dns server on your router receives dns requests, you will sort out queries that ask for the resource records of ad servers and return a simple 'NXDOMAIN'. This is nothing but **N**on-e**X**istent Internet or Intranet domain name, if domain name is unable to resolved using the dns server, a condition called the 'NXDOMAIN' occurred. +A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other (wlan) gadget!? Getting rid of annoying ads, trackers and other abuse sites (like facebook) is simple: block them with your router. When the DNS server on your router receives DNS requests, you will sort out queries that ask for the resource records of ad servers and return a simple 'NXDOMAIN'. This is nothing but **N**on-e**X**istent Internet or Intranet domain name, if domain name is unable to resolved using the DNS server, a condition called the 'NXDOMAIN' occurred. ## Main Features -* support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses): - * [adaway](https://adaway.org) - * => infrequent updates, approx. 400 entries (enabled by default) - * [adguard](https://adguard.com) - * => numerous updates on the same day, approx. 12.000 entries - * [bitcoin](https://github.com/hoshsadiq/adblock-nocoin-list) - * => infrequent updates, approx. 15 entries - * [blacklist]() - * => static local blacklist, located by default in '/etc/adblock/adblock.blacklist' - * [disconnect](https://disconnect.me) - * => numerous updates on the same day, approx. 6.500 entries (enabled by default) - * [dshield](http://dshield.org) - * => daily updates, approx. 4.500 entries - * [feodotracker](https://feodotracker.abuse.ch) - * => daily updates, approx. 0-10 entries - * [hphosts](https://hosts-file.net) - * => monthly updates, approx. 50.000 entries - * [malwaredomains](http://malwaredomains.com) - * => daily updates, approx. 16.000 entries - * [malwaredomainlist](http://www.malwaredomainlist.com) - * => daily updates, approx. 1.500 entries - * [openphish](https://openphish.com) - * => numerous updates on the same day, approx. 1.800 entries - * [ransomware tracker](https://ransomwaretracker.abuse.ch) - * => daily updates, approx. 150 entries - * [reg_cn](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt) - * => regional blocklist for China, daily updates, approx. 1.600 entries - * [reg_cz](https://raw.githubusercontent.com/qxstyles/turris-hole-czech-block-list/master/turris-hole-czech-block-list) - * => regional blocklist for Czechia, maintained by Turris Omnia Users, infrequent updates, approx. 100 entries - * [reg_de](https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt) - * => regional blocklist for Germany, daily updates, approx. 9.200 entries - * [reg_id](https://easylist-downloads.adblockplus.org/abpindo+easylist.txt) - * => regional blocklist for Indonesia, daily updates, approx. 800 entries - * [reg_nl](https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt) - * => regional blocklist for the Netherlands, weekly updates, approx. 1300 entries - * [reg_pl](http://adblocklist.org) - * => regional blocklist for Poland, daily updates, approx. 50 entries - * [reg_ro](https://easylist-downloads.adblockplus.org/rolist+easylist.txt) - * => regional blocklist for Romania, weekly updates, approx. 600 entries - * [reg_ru](https://code.google.com/p/ruadlist) - * => regional blocklist for Russia, weekly updates, approx. 2.000 entries - * [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default) - * => daily updates, approx. 32.000 entries (a short description of all categories can be found [online](http://www.shallalist.de/categories.html)) - * [spam404](http://www.spam404.com) - * => infrequent updates, approx. 5.000 entries - * [sysctl/cameleon](http://sysctl.org/cameleon) - * => weekly updates, approx. 21.000 entries - * [ut_capitole](https://dsi.ut-capitole.fr/blacklists) (categories "cryptojacking" "ddos" "malware" "phishing" "warez" enabled by default) - * => daily updates, approx. 64.000 entries (a short description of all categories can be found [online](https://dsi.ut-capitole.fr/blacklists/index_en.php)) - * [urlhaus](https://urlhaus.abuse.ch) - * => numerous updates on the same day, approx. 3.500 entries - * [whocares](http://someonewhocares.org) - * => weekly updates, approx. 12.000 entries - * [winhelp](http://winhelp2002.mvps.org) - * => infrequent updates, approx. 15.000 entries - * [winspy](https://github.com/crazy-max/WindowsSpyBlocker) - * => infrequent updates, approx. 120 entries - * [youtube](https://api.hackertarget.com/hostsearch/?q=googlevideo.com) - * => dynamic request API to filter "random" youtube ad domains (experimental!), approx. 150 entries - * [yoyo](http://pgl.yoyo.org/adservers) - * => weekly updates, approx. 2.500 entries (enabled by default) - * [zeus tracker](https://zeustracker.abuse.ch) - * => daily updates, approx. 440 entries -* zero-conf like automatic installation & setup, usually no manual changes needed -* simple but yet powerful adblock engine: adblock does not use error prone external iptables rulesets, http pixel server instances and things like that -* supports five different dns backends / blocklist formats: dnsmasq, unbound, named (bind), kresd and dnscrypt-proxy -* supports six different download utilities: uclient-fetch, wget, curl, aria2c, wget-nossl, busybox-wget -* Really fast downloads & list processing as they are handled in parallel as background jobs in a configurable 'Download Queue' -* provides 'http only' mode without installed ssl library for all non-SSL blocklist sources -* supports a wide range of router modes, even AP modes are supported -* full IPv4 and IPv6 support -* provides top level domain compression ('tld compression'), this feature removes thousands of needless host entries from the blocklist and lowers the memory footprint for the dns backend -* blocklist source parsing by fast & flexible regex rulesets -* overall duplicate removal in central blocklist 'adb_list.overall' -* additional whitelist for manual overrides, located by default in /etc/adblock/adblock.whitelist -* quality checks during blocklist update to ensure a reliable dns backend service -* minimal status & error logging to syslog, enable debug logging to receive more output -* procd based init system support (start/stop/restart/reload/suspend/resume/query/status) -* procd network interface trigger support or classic time based startup -* keep the dns cache intact after adblock processing (currently supported by unbound, named and kresd) -* conditional dns backend restarts by old/new blocklist comparison with sha256sum (default) or md5sum -* suspend & resume adblock actions temporarily without blocklist reloading -* output comprehensive runtime information via LuCI or via 'status' init command -* query function to quickly identify blocked (sub-)domains, e.g. for whitelisting -* strong LuCI support -* optional: force dns requests to local resolver -* optional: force overall sort / duplicate removal for low memory devices (handle with care!) -* optional: automatic blocklist backup & restore, they will be used in case of download errors or during startup in backup mode -* optional: 'backup mode' to re-use blocklist backups during startup, get fresh lists only via reload or restart action -* optional: 'Jail' blocklist generation which builds an additional list (/tmp/adb_list.jail) to block access to all domains except those listed in the whitelist file. You can use this restrictive blocklist manually e.g. for guest wifi or kidsafe configurations -* optional: send notification emails in case of a processing error or if the overall domain count is ≤ 0 -* optional: add new adblock sources on your own, see example below +* Support of the following fully pre-configured domain blocklist sources (free for private usage, for commercial use please check their individual licenses) + +| Source | Enabled | Size | Focus | Information | +| :------------------ | :-----: | :--- | :--------------- | :-------------------------------------------------------------------------------- | +| adaway | x | S | mobile | [Link](https://github.com/AdAway/adaway.github.io) | +| adguard | x | L | general | [Link](https://adguard.com) | +| anti_ad | | L | compilation | [Link](https://github.com/privacy-protection-tools/anti-AD/blob/master/README.md) | +| andryou | | L | compilation | [Link](https://gitlab.com/andryou/block/-/blob/master/readme.md) | +| anudeep | | M | compilation | [Link](https://github.com/anudeepND/blacklist) | +| bitcoin | | S | mining | [Link](https://github.com/hoshsadiq/adblock-nocoin-list) | +| disconnect | x | S | general | [Link](https://disconnect.me) | +| dshield | | XL | general | [Link](https://dshield.org) | +| energized_blugo | | XL | compilation | [Link](https://energized.pro) | +| energized_blu | | XL | compilation | [Link](https://energized.pro) | +| energized_porn | | XXL | compilation+porn | [Link](https://energized.pro) | +| energized_ultimate | | XXL | compilation | [Link](https://energized.pro) | +| energized_unified | | XXL | compilation | [Link](https://energized.pro) | +| malwaredomains | | M | malware | [Link](https://malwaredomains.com) | +| malwarelist | | S | malware | [Link](https://www.malwaredomainlist.com) | +| notracking | | XL | tracking | [Link](https://github.com/notracking/hosts-blocklists) | +| oisd_nl | | XXL | general | [Link](https://oisd.nl) | +| openphish | | S | phishing | [Link](https://openphish.com) | +| phishing_army | | S | phishing | [Link](https://phishing.army) | +| reg_cn | | M | reg_china | [Link](https://easylist.to) | +| reg_cz | | M | reg_czech+slovak | [Link](https://easylist.to) | +| reg_de | | M | reg_germany | [Link](https://easylist.to) | +| reg_es | | M | reg_espania | [Link](https://easylist.to) | +| reg_fi | | S | reg_finland | [Link](https://github.com/finnish-easylist-addition) | +| reg_fr | | S | reg_france | [Link](https://forums.lanik.us/viewforum.php?f=91) | +| reg_id | | M | reg_indonesia | [Link](https://easylist.to) | +| reg_kr | | M | reg_korea | [Link](https://list-kr.github.io) | +| reg_nl | | M | reg_netherlands | [Link](https://easylist.to) | +| reg_pl | | M | reg_poland | [Link](https://kadantiscam.netlify.com) | +| reg_ro | | M | reg_romania | [Link](https://easylist.to) | +| reg_ru | | M | reg_russia | [Link](https://easylist.to) | +| reg_vn | | M | reg_vietnam | [Link](https://bigdargon.github.io/hostsVN) | +| shallalist | | L | general | [Link](http://www.shallalist.de) | +| shallalist_porn | | XXL | general+porn | [Link](http://www.shallalist.de) | +| smarttv | | S | smarttv | [Link](https://github.com/Perflyst/PiHoleBlocklist) | +| spam404 | | S | general | [Link](https://github.com/Dawsey21) | +| stevenblack | | L | compilation | [Link](https://github.com/StevenBlack/hosts) | +| stevenblack_porn | | L | compilation+porn | [Link](https://github.com/StevenBlack/hosts) | +| stopforumspam | | S | spam | [Link](https://www.stopforumspam.com) | +| sysctl | | M | general | [Link](http://sysctl.org/cameleon) | +| utcapitole | | L | general | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php) | +| utcapitole_porn | | XXL | general+porn | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php) | +| wally3k | | S | compilation | [Link](https://firebog.net/about) | +| whocares | | M | general | [Link](https://someonewhocares.org) | +| winhelp | | S | general | [Link](http://winhelp2002.mvps.org) | +| winspy | | S | win_telemetry | [Link](https://github.com/crazy-max/WindowsSpyBlocker) | +| youtube | | M | youtube | [Link](https://github.com/kboghdady/youTube_ads_4_pi-hole) | +| yoyo | x | S | general | [Link](http://pgl.yoyo.org/adservers) | + +* List of supported and fully pre-configured adblock sources, already active sources are pre-selected. + To avoid OOM errors, please do not select too many lists! + List size information with the respective domain ranges as follows: + • S (-10k), M (10k-30k) and L (30k-80k) should work for 128 MByte devices, + • XL (80k-200k) should work for 256-512 MByte devices, + • XXL (200k-) needs more RAM and Multicore support, e.g. x86 or raspberry devices. +* Zero-conf like automatic installation & setup, usually no manual changes needed +* Simple but yet powerful adblock engine: adblock does not use error prone external iptables rulesets, http pixel server instances and things like that +* Supports five different DNS backend formats: dnsmasq, unbound, named (bind), kresd or raw (e.g. used by dnscrypt-proxy) +* Supports four different SSL-enabled download utilities: uclient-fetch, wget, curl or aria2c +* Supports SafeSearch for google, bing, duckduckgo, yandex, youtube and pixabay +* Fast downloads & list processing as they are handled in parallel running background jobs with multicore support +* Supports a wide range of router modes, even AP modes are supported +* Full IPv4 and IPv6 support +* Provides top level domain compression ('tld compression'), this feature removes thousands of needless host entries from the blocklist and lowers the memory footprint for the DNS backend +* Provides a 'DNS File Reset', where the generated DNS blocklist file will be purged after DNS backend loading to save storage space +* Source parsing by fast & flexible regex rulesets, all rules and source information are placed in an external/compredd JSON file ('/etc/adblock/adblock.sources.gz') +* Overall duplicate removal in generated blocklist file 'adb_list.overall' +* Additional local blacklist for manual overrides, located in '/etc/adblock/adblock.blacklist' +* Additional local whitelist for manual overrides, located in '/etc/adblock/adblock.whitelist' +* Quality checks during blocklist update to ensure a reliable DNS backend service +* Minimal status & error logging to syslog, enable debug logging to receive more output +* Procd based init system support ('start', 'stop', 'restart', 'reload', 'enable', 'disable', 'running', 'status', 'suspend', 'resume', 'query', 'report', 'list', 'timer') +* Auto-Startup via procd network interface trigger or via classic time based startup +* Suspend & Resume adblock temporarily without blocklist reloading +* Provides comprehensive runtime information +* Provides a detailed DNS Query Report with DNS related information about client requests, top (blocked) domains and more +* Provides a powerful query function to quickly find blocked (sub-)domains, e.g. for whitelisting +* Provides an easily configurable blocklist update scheduler called 'Refresh Timer' +* Includes an option to generate an additional, restrictive 'adb_list.jail' to block access to all domains except those listed in the whitelist file. You can use this restrictive blocklist manually e.g. for guest wifi or kidsafe configurations +* Includes an option to force DNS requests to the local resolver +* Automatic blocklist backup & restore, these backups will be used in case of download errors and during startup +* Send notification E-Mails in case of a processing error or if the overall domain count is ≤ 0 +* Add new adblock sources on your own, see example below +* Strong LuCI support, all relevant options are exposed to the web frontend ## Prerequisites -* [OpenWrt](https://openwrt.org), tested with the stable release series (18.06) and with the latest snapshot -* a usual setup with an enabled dns backend at minimum - dump AP modes without a working dns backend are _not_ supported -* a download utility: - * to support all blocklist sources a full version (with ssl support) of 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required - * for limited devices with real memory constraints, adblock provides also a 'http only' option and supports wget-nossl and uclient-fetch (without libustream-ssl) as well - * for more configuration options see examples below +* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07.x) and with the latest rolling snapshot releases. On turris devices it has been successfully tested with TurrisOS 5.1.x + Please note: Older OpenWrt releases like 18.06.x or 17.01.x are _not_ supported! + Please note: Devices with less than 128 MByte RAM are _not_ supported! +* A usual setup with an enabled DNS backend at minimum - dump AP modes without a working DNS backend are _not_ supported +* A download utility with SSL support: 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required +* A certificate store such as 'ca-bundle' or 'ca-certificates', as adblock checks the validity of the SSL certificates of all download sites by default +* Optional E-Mail notification support: for E-Mail notifications you need to install the additional 'msmtp' package +* Optional DNS Query Report support: for DNS reporting you need to install the additional package 'tcpdump-mini' or 'tcpdump' +* Optional support for gnu awk as alternative to the busybox default, install the additional package 'gawk' ## Installation & Usage -* install 'adblock' (_opkg install adblock_) -* at minimum configure the appropriate dns backend ('dnsmasq' by default), the download utility and enable the adblock service in _/etc/config/adblock_ -* control the adblock service manually with _/etc/init.d/adblock_ start/stop/restart/reload/suspend/resume/status or use the LuCI frontend +* Update your local opkg repository (_opkg update_) +* Install 'adblock' (_opkg install adblock_). The adblock service is enabled by default +* Install the LuCI companion package 'luci-app-adblock' (_opkg install luci-app-adblock_) +* It's strongly recommended to use the LuCI frontend to easily configure all aspects of adblock, the application is located in LuCI under the 'Services' menu +* Update from a former adblock version is easy. During the update a backup is made of the old configuration '/etc/config/adblock-backup' and replaced by the new config - that's all -## LuCI adblock companion package -* for easy management of the various blocklist sources and adblock runtime options you should use the provided LuCI frontend -* install 'luci-app-adblock' (_opkg install luci-app-adblock_) -* the application is located in LuCI under 'Services' menu +## Adblock CLI Options +* All important adblock functions are accessible via CLI as well. +Please note: The 'status' command in 19.07.x and TurrisOS is only available via 'status_service' +


+/etc/init.d/adblock 
+Syntax: /etc/init.d/adblock [command]
 
-## Tweaks
-* **runtime information:** the adblock status is available via _/etc/init.d/adblock status_ (see example below)
-* **debug logging:** for script debugging please set the config option 'adb\_debug' to '1' and check the runtime output with _logread -e "adblock"_
-* **storage expansion:** to process and store all blocklist sources at once it might helpful to enlarge your temp directory with a swap partition => see [OpenWrt Wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
-* **add white- / blacklist entries:** add domain white- or blacklist entries to always-allow or -deny certain (sub) domains, by default both lists are empty and located in _/etc/adblock_. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below)
-* **backup & restore blocklists:** enable this feature, to restore automatically the latest compressed backup of your blocklists in case of any processing error (e.g. a single blocklist source is not available during update). Please use an (external) solid partition and _not_ your volatile router temp directory for this
-* **download queue size:** for further download & list processing performance improvements you can raise the 'adb\_maxqueue' value, e.g. '8' or '16' should be safe
-* **scheduled list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below)
-* **change startup behaviour:** by default the startup will be triggered by the 'wan' procd interface trigger. Choose 'none' to disable automatic startups, 'timed' to use a classic timeout (default 30 sec.) or select another trigger interface
-* **suspend & resume adblocking:** to quickly switch the adblock service 'on' or 'off', simply use _/etc/init.d/adblock [suspend|resume]_
-* **domain query:** to query the active blocklist for a certain domain, please use the LuCI frontend or run _/etc/init.d/adblock query ``_ (see example below)
-* **add new list sources:** you could add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below)
-* **disable active dns probing in windows 10:** to prevent a yellow exclamation mark on your internet connection icon (which wrongly means connected, but no internet), please change the following registry key/value from "1" to "0" _HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\EnableActiveProbing_
+Available commands:
+	start	Start the service
+	stop	Stop the service
+	restart	Restart the service
+	reload	Reload configuration files (or restart if service does not implement reload)
+	enable	Enable service autostart
+	disable	Disable service autostart
+	running	Check if service is running
+	status	Service status
+	suspend	Suspend adblock processing
+	resume	Resume adblock processing
+	query	<domain> Query active blocklists and backups for a specific domain
+	report	[<search>] Print DNS statistics with an optional search parameter
+	list	[[<add>|<remove>] [source(s)]] List available adblock sources or add/remove them from config
+	timer	<action> <hour> [<minute>] [<weekday>] Set a cron based update interval
+
-## Further adblock config options -* usually the pre-configured adblock setup works quite well and no manual overrides are needed -* the following options apply to the 'global' config section: - * adb\_enabled => main switch to enable/disable adblock service (default: '0', disabled) - * adb\_debug => enable/disable adblock debug output (default: '0', disabled) - * adb\_fetchutil => name of the used download utility: 'uclient-fetch', 'wget', 'curl', 'aria2c', 'wget-nossl'. 'busybox' (default: 'uclient-fetch') - * adb\_fetchparm => special config options for the download utility (default: not set) - * adb\_dns => select the dns backend for your environment: 'dnsmasq', 'unbound', 'named', 'kresd' or 'dnscrypt-proxy' (default: 'dnsmasq') - * adb\_dnsdir => target directory for the generated blocklist 'adb_list.overall' (default: not set, use dns backend default) - * adb\_trigger => set the startup trigger to a certain interface, to 'timed' or to 'none' (default: 'wan') +## Adblock Config Options +* Usually the auto pre-configured adblock setup works quite well and no manual overrides are needed -* the following options apply to the 'extra' config section: - * adb\_triggerdelay => additional trigger delay in seconds before adblock processing begins (int/default: '2') - * adb\_forcedns => force dns requests to local resolver (bool/default: '0', disabled) - * adb\_forcesrt => force overall sort on low memory devices with less than 64 MB RAM (bool/default: '0', disabled) - * adb\_backup_mode => do not automatically update blocklists during startup, use backups instead (bool/default: '0', disabled) - * adb\_maxqueue => size of the download queue to handle downloads & list processing in parallel (int/default: '4') - * adb\_jail => builds an additional 'Jail' list (/tmp/adb_list.jail) to block access to all domains except those listed in the whitelist file (bool/default: '0', disabled) - * adb\_dnsflush => flush DNS cache after adblock processing, i.e. enable the old restart behavior (bool/default: '0', disabled) - * adb\_notify => send notification emails in case of a processing error or if the overall domain count is ≤ 0 (bool/default: '0', disabled) - * adb\_notifycnt => Raise minimum domain count email notification trigger (int/default: '0') +| Option | Default | Description/Valid Values | +| :----------------- | :--------------------------------- | :--------------------------------------------------------------------------------------------- | +| adb_enabled | 1, enabled | set to 0 to disable the adblock service | +| adb_srcarc | -, /etc/adblock/adblock.sources.gz | full path to the used adblock source archive | +| adb_srcfile | -, /tmp/adb_sources.json | full path to the used adblock source file, which has a higher precedence than the archive file | +| adb_dns | -, auto-detected | 'dnsmasq', 'unbound', 'named', 'kresd' or 'raw' | +| adb_fetchutil | -, auto-detected | 'uclient-fetch', 'wget', 'curl' or 'aria2c' | +| adb_fetchparm | -, auto-detected | config options for the selected download utility, e.g. to disable the certificate check | +| adb_trigger | -, not set | trigger network interface or 'not set' to use a time-based startup | +| adb_triggerdelay | 2 | additional trigger delay in seconds before adblock processing begins | +| adb_debug | 0, disabled | set to 1 to enable the debug output | +| adb_nice | 0, standard prio. | valid nice level range 0-19 of the adblock processes | +| adb_forcedns | 0, disabled | set to 1 to force DNS requests to the local resolver | +| adb_maxqueue | 4 | size of the download queue to handle downloads & list processing in parallel | +| adb_dnsdir | -, auto-detected | path for the generated blocklist file 'adb_list.overall' | +| adb_dnstimeout | 10 | timeout in seconds to wait for a successful DNS backend restart | +| adb_dnsinstance | 0, first instance | set to the relevant dns backend instance used by adblock (dnsmasq only) | +| adb_dnsfilereset | 0, disabled | set to 1 to purge the final DNS blocklist file after DNS backend loading | +| adb_dnsflush | 0, disabled | set to 1 to flush the DNS Cache before & after adblock processing | +| adb_dnsinotify | -, not set | set to 1 to prevent adblock triggered restarts for DNS backends with autoload functions | +| adb_dnsallow | -, not set | set to 1 to disable selective DNS whitelisting (RPZ pass through) | +| adb_lookupdomain | example.com | external domain to check for a successful DNS backend restart or 'false' to disable this check | +| adb_portlist | 53 853 5353 | space separated list of firewall ports which should be redirected locally | +| adb_report | 0, disabled | set to 1 to enable the background tcpdump gathering process for reporting | +| adb_reportdir | /tmp | path for DNS related report files | +| adb_repiface | -, auto-detected | name of the reporting interface or 'any' used by tcpdump | +| adb_replisten | 53 | space separated list of reporting port(s) used by tcpdump | +| adb_repchunkcnt | 5 | report chunk count used by tcpdump | +| adb_repchunksize | 1 | report chunk size used by tcpdump in MB | +| adb_backup | 1, enabled | set to 0 to disable the backup function | +| adb_backupdir | /tmp | path for adblock backups | +| adb_tmpbase | /tmp | path for all adblock related runtime operations, e.g. downloading, sorting, merging etc. | +| adb_safesearch | 0, disabled | set to 1 to enforce SafeSearch for google, bing, duckduckgo, yandex, youtube and pixabay | +| adb_safesearchlist | -, not set | Limit SafeSearch to certain provider (see above) | +| adb_safesearchmod | 0, disabled | set to 1 to enable moderate SafeSearch filters for youtube | +| adb_mail | 0, disabled | set to 1 to enable notification E-Mails in case of a processing errors | +| adb_mailreceiver | -, not set | receiver address for adblock notification E-Mails | +| adb_mailsender | no-reply@adblock | sender address for adblock notification E-Mails | +| adb_mailtopic | adblock notification | topic for adblock notification E-Mails | +| adb_mailprofile | adb_notify | mail profile used in 'msmtp' for adblock notification E-Mails | +| adb_mailcnt | 0 | minimum domain count to trigger E-Mail notifications | +| adb_jail | 0 | set to 1 to enable the additional, restrictive 'adb_list.jail' creation | +| adb_jaildir | /tmp | path for the generated jail list | ## Examples -**change default dns backend to 'unbound':** - -Adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/unbound' where unbound can find them in its jail. -To preserve the DNS cache after adblock processing you need to install 'unbound-control'. - -**change default dns backend to 'named' (bind):** +**Change the DNS backend to 'unbound':** +No further configuration is needed, adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/unbound' by default. +**Change the DNS backend to 'named' (bind):** Adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/bind'. To preserve the DNS cache after adblock processing you need to install & configure 'bind-rdnc'. To use the blocklist please modify '/etc/bind/named.conf': @@ -174,23 +202,12 @@ and at the end of the file add: allow-transfer { none; }; }; - -**change default dns backend to 'kresd':** -The knot-resolver (kresd) is only available on Turris Omnia devices. -Adblock deposits the final blocklist 'adb_list.overall' in '/etc/kresd', no further configuration needed. - -**change default dns backend to 'dnscrypt-proxy':** - -The required 'blacklist' option of dnscrypt-proxy is not enabled by default, because the package will be compiled without plugins support. -Take a custom OpenWrt build with plugins support to use this feature. Adblock deposits the final blocklist 'adb_list.overall' in '/tmp'. -To use the blocklist please modify '/etc/config/dnscrypt-proxy' per instance: -

-  list blacklist 'domains:/tmp/adb_list.overall'
-
- -**enable email notification via msmtp:** +**Change the DNS backend to 'kresd':** +Adblock deposits the final blocklist 'adb_list.overall' in '/etc/kresd', no further configuration needed. +Please note: The knot-resolver (kresd) is only available on Turris devices and does not support the SafeSearch functionality yet. +**Enable E-Mail notification via 'msmtp':** To use the email notification you have to install & configure the package 'msmtp'. Modify the file '/etc/msmtprc':

@@ -209,104 +226,69 @@ from            dev.adblock@gmail.com
 user            dev.adblock
 password        xxx
 
-Edit the file '/etc/adblock/adblock.notify' and change at least the 'mail_receiver'. -Finally make this file executable via 'chmod' and test it directly. If no more errors come up you can comment 'mail_debug', too. - -**receive adblock runtime information:** +Finally enable E-Mail support and add a valid E-Mail receiver address in LuCI. +**Service status output:** +In LuCI you'll see the realtime status in the 'Runtime' section on the overview page. +To get the status in the CLI, just call _/etc/init.d/adblock status_ or _/etc/init.d/adblock status\_service_ (in 19.07 and TurrisOS):

-/etc/init.d/adblock status
+/etc/init.d/adblock status_service
 ::: adblock runtime information
   + adblock_status  : enabled
-  + adblock_version : 3.5.5
-  + overall_domains : 97199 (backup mode)
-  + fetch_utility   : /bin/uclient-fetch (libustream-ssl)
-  + dns_backend     : unbound (/var/lib/unbound)
-  + last_rundate    : 01.09.2018 07:09:16
-  + system_release  : PC Engines APU, OpenWrt SNAPSHOT r7986-dc9388ac55
+  + adblock_version : 4.0.2
+  + blocked_domains : 52420
+  + active_sources  : adaway adguard andryou bitcoin disconnect winspy yoyo 
+  + dns_backend     : kresd, /etc/kresd
+  + run_utils       : /usr/bin/curl, /bin/awk
+  + run_ifaces      : trigger: trm_wwan, report: br-lan
+  + run_directories : base: /tmp, backup: /tmp, report: /tmp, jail: /tmp
+  + run_flags       : backup: 1, reset: 0, flush: 0, force: 1, search: 0, report: 1, mail: 0, jail: 0
+  + last_run        : start, 0m 17s, 496/198/218, 03.04.2020 08:55:14
+  + system          : CZ.NIC Turris Mox Board, TurrisOS 5.1.0 81264ebb51991aa2d17489852854e3b5ec3f514d
 
- -**cronjob for a regular block list update (/etc/crontabs/root):** +The 'last\_run' line includes the used start type, the run duration, the memory footprint after DNS backend loading (total/free/available) and the date/time of the last run. +**Edit, add new adblock sources:** +The adblock blocklist sources are stored in an external, compressed JSON file '/etc/adblock/adblock.sources.gz'. +This file is directly parsed in LuCI and accessible via CLI, just call _/etc/init.d/adblock list_:

-0 06 * * *    /etc/init.d/adblock reload
+/etc/init.d/adblock list
+::: Available adblock sources
+:::
+    Name                 Enabled   Size   Focus               Info URL
+    ------------------------------------------------------------------
+  + adaway               x         S      mobile              https://adaway.org
+  + adguard              x         L      general             https://adguard.com
+  + andryou              x         L      compilation         https://gitlab.com/andryou/block/-/blob/master/readme.md
+  + bitcoin              x         S      mining              https://github.com/hoshsadiq/adblock-nocoin-list
+  + disconnect           x         S      general             https://disconnect.me
+  + dshield                        XL     general             https://www.dshield.org
+[...]
+  + winhelp                        S      general             http://winhelp2002.mvps.org
+  + winspy               x         S      win_telemetry       https://github.com/crazy-max/WindowsSpyBlocker
+  + yoyo                 x         S      general             https://pgl.yoyo.org
 
- -**blacklist entry (/etc/adblock/adblock.blacklist):** +To add new or edit existing sources extract the compressed JSON file _gunzip /etc/adblock/adblock.sources.gz_. +A valid JSON source object contains the following required information, e.g.:

-ads.example.com
-
-This entry blocks the following (sub)domains:
-  http://ads.example.com/foo.gif
-  http://server1.ads.example.com/foo.gif
-  https://ads.example.com:8000/
-
-This entry does not block:
-  http://ads.example.com.ua/foo.gif
-  http://example.com/
+	[...]
+	"adaway": {
+		"url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
+		"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+		"size": "S",
+		"focus": "mobile",
+		"descurl": "https://github.com/AdAway/adaway.github.io"
+	},
+	[...]
 
- -**whitelist entry (/etc/adblock/adblock.whitelist):** - -

-here.com
-
-This entry removes the following (sub)domains from the blocklist:
-  maps.here.com
-  here.com
-
-This entry does not remove:
-  where.com
-  www.adwhere.com
-
- -**query the active blocklist for a certain (sub-)domain, e.g. for whitelisting:** - -The query function checks against the submitted (sub-)domain and recurses automatically to the upper top level domain. For every (sub-)domain it returns the first ten relevant results. -

-/etc/init.d/adblock query www.example.google.com
-::: results for domain 'www.example.google.com'
-  - no match
-::: results for domain 'example.google.com'
-  - no match
-::: results for domain 'google.com'
-  + ads.google.com
-  + adservices.google.com
-  + adwords.google.com
-  + ampcid.google.com
-  + analytics.google.com
-  + gg.google.com
-  + google.com.analytics.kdgsrltkcun.com
-  + googleadapis.l.google.com
-  + id.google.com
-  + pagead-googlehosted.l.google.com
-  + [...]
-
- -**add a new blocklist source:** - -1. the easy way ... -example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt -Adblock already supports an easylist source, called 'reg_ru'. To add the additional local easylist as a new source, copy the existing config source section and change only -the source name, the url and the description - that's all! -

-config source 'reg_ro'
-  option enabled '0'
-  option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
-  option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
-  option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
-
- -2. a bit harder ... -To add a really new source with different domain/host format you have to write a suitable awk one-liner on your own, so basic awk skills are needed. As a starting point check the already existing awk rulesets 'adb_src_rset' in the config file, probably you need only small changes for your individual list. Download the desired list and test your new awk string locally. The output result should be a sequential list with one domain/host per line - nothing more. If your awk one-liner works quite well, add a new source section to the adblock config file and test the new source. +Add an unique object name, make the required changes to 'url', 'rule', 'size' and 'descurl' and finally compress the changed JSON file _gzip /etc/adblock/adblock.sources.gz_ to use the new source object in adblock. +Please note: if you're going to add new sources on your own, please make a copy of the default file and work with that copy further on, cause the default will be overwritten with every adblock update. To reference your copy set the option 'adb\_srcarc' which points by default to '/etc/adblock/adblock.sources.gz' +Please note: when adblock starts, it looks for the uncompressed 'adb\_srcfile', only if this file is not found the archive 'adb\_srcarc' is unpacked once and then the uncompressed file is used ## Support -Please join the adblock discussion in this [forum thread](https://forum.lede-project.org/t/adblock-2-x-support-thread/507) or contact me by mail - -## Removal -* stop all adblock related services with _/etc/init.d/adblock stop_ -* optional: remove the adblock package (_opkg remove adblock_) +Please join the adblock discussion in this [forum thread](https://forum.openwrt.org/t/adblock-support-thread/507) or contact me by mail Have fun! -Dirk +Dirk + diff --git a/net/adblock/files/adblock.conf b/net/adblock/files/adblock.conf index c68b82cb..a7ad738e 100644 --- a/net/adblock/files/adblock.conf +++ b/net/adblock/files/adblock.conf @@ -1,212 +1,15 @@ -# adblock configuration, for further information -# see 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md' config adblock 'global' - option adb_enabled '0' - option adb_dns 'dnsmasq' - option adb_fetchutil 'uclient-fetch' - option adb_trigger 'wan' - -config adblock 'extra' + option adb_enabled '1' option adb_debug '0' - option adb_forcesrt '0' option adb_forcedns '0' - option adb_backup '0' + option adb_safesearch '0' + option adb_dnsfilereset '0' + option adb_mail '0' + option adb_report '0' + option adb_backup '1' option adb_maxqueue '4' - -config source 'adaway' - option adb_src 'https://adaway.org/hosts.txt' - option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}' - option adb_src_desc 'focus on mobile ads, infrequent updates, approx. 400 entries' - option enabled '1' - -config source 'adguard' - option adb_src 'https://filters.adtidy.org/windows/filters/15.txt' - option adb_src_rset 'BEGIN{FS=\"[/|^|\r]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+([\/\^\r]|$)/{print tolower(\$3)}' - option adb_src_desc 'combined adguard dns filter list, frequent updates, approx. 17.000 entries' - option enabled '0' - -config source 'bitcoin' - option adb_src 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt' - option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}' - option adb_src_desc 'focus on malicious bitcoin mining sites, infrequent updates, approx. 80 entries' - option enabled '0' - -config source 'blacklist' - option adb_src '/etc/adblock/adblock.blacklist' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'static local domain blacklist, always deny these domains' - option enabled '1' - -config source 'disconnect' - option adb_src 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'mozilla driven blocklist, numerous updates on the same day, approx. 4.700 entries' - option enabled '1' - -config source 'dshield' - option adb_src 'https://www.dshield.org/feeds/suspiciousdomains_Low.txt' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'generic blocklist, daily updates, approx. 3.500 entries' - option enabled '0' - -config source 'feodo' - option adb_src 'https://feodotracker.abuse.ch/blocklist/?download=domainblocklist' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'focus on feodo botnet, daily updates, approx. 0-10 entries' - option enabled '0' - -config source 'hphosts' - option adb_src 'https://hosts-file.net/ad_servers.txt' - option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|\$)+/{print tolower(\$2)}' - option adb_src_desc 'broad blocklist, monthly updates, approx. 19.200 entries' - option enabled '0' - -config source 'malware' - option adb_src 'https://mirror.espoch.edu.ec/malwaredomains/justdomains' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'broad blocklist, daily updates, approx. 18.300 entries' - option enabled '0' - -config source 'malwarelist' - option adb_src 'http://www.malwaredomainlist.com/hostslist/hosts.txt' - option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}' - option adb_src_desc 'focus on malware, daily updates, approx. 1.200 entries' - option enabled '0' - -config source 'openphish' - option adb_src 'https://openphish.com/feed.txt' - option adb_src_rset 'BEGIN{FS=\"/\"}/^http[s]?:\/\/([[:alnum:]_-]+\.)+[[:alpha:]]+(\/|$)/{print tolower(\$3)}' - option adb_src_desc 'focus on phishing, numerous updates on the same day, approx. 2.400 entries' - option enabled '0' - -config source 'ransomware' - option adb_src 'https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'focus on ransomware by abuse.ch, numerous updates on the same day, approx. 1900 entries' - option enabled '0' - -config source 'reg_cn' - option adb_src 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt' - option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}' - option adb_src_desc 'focus on chinese ads plus generic easylist additions, daily updates, approx. 11.700 entries' - option enabled '0' - -config source 'reg_cz' - option adb_src 'https://raw.githubusercontent.com/qxstyles/turris-hole-czech-block-list/master/turris-hole-czech-block-list' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'focus on czech ads maintained by Turris Omnia Users, infrequent updates, approx. 100 entries' - option enabled '0' - -config source 'reg_de' - option adb_src 'https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt' - option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}' - option adb_src_desc 'focus on german ads plus generic easylist additions, daily updates, approx. 9.200 entries' - option enabled '0' - -config source 'reg_id' - option adb_src 'https://easylist-downloads.adblockplus.org/abpindo+easylist.txt' - option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}' - option adb_src_desc 'focus on indonesian ads plus generic easylist additions, weekly updates, approx. 9.600 entries' - option enabled '0' - -config source 'reg_nl' - option adb_src 'https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt' - option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}' - option adb_src_desc 'focus on dutch ads plus generic easylist additions, weekly updates, approx. 9.400 entries' - option enabled '0' - -config source 'reg_pl' - option adb_src 'http://adblocklist.org/adblock-pxf-polish.txt' - option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}' - option adb_src_desc 'focus on polish ads, daily updates, approx. 90 entries' - option enabled '0' - -config source 'reg_ro' - option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt' - option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}' - option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries' - option enabled '0' - -config source 'reg_ru' - option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt' - option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}' - option adb_src_desc 'focus on russian ads plus generic easylist additions, weekly updates, approx. 14.500 entries' - option enabled '0' - -config source 'shalla' - option adb_src 'http://www.shallalist.de/Downloads/shallalist.tar.gz' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check http://www.shallalist.de/categories.html for more categories' - list adb_src_cat 'adv' - list adb_src_cat 'costtraps' - list adb_src_cat 'spyware' - list adb_src_cat 'tracker' - list adb_src_cat 'warez' - option enabled '0' - -config source 'spam404' - option adb_src 'https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}' - option adb_src_desc 'generic blocklist, infrequent updates, approx. 6.000 entries' - option enabled '0' - -config source 'sysctl' - option adb_src 'http://sysctl.org/cameleon/hosts' - option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}' - option adb_src_desc 'broad blocklist, weekly updates, approx. 16.500 entries' - option enabled '0' - -config source 'urlhaus' - option adb_src 'https://urlhaus.abuse.ch/downloads/rpz' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}' - option adb_src_desc 'urlhaus RPZ domains by abuse.ch, numerous updates on the same day, approx. 3.500 entries' - option enabled '0' - -config source 'ut_capitole' - option adb_src 'https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check https://dsi.ut-capitole.fr/blacklists/index_en.php for more categories' - list adb_src_cat 'publicite' - list adb_src_cat 'cryptojacking' - list adb_src_cat 'ddos' - list adb_src_cat 'malware' - list adb_src_cat 'phishing' - list adb_src_cat 'warez' - option enabled '0' - -config source 'whocares' - option adb_src 'http://someonewhocares.org/hosts/hosts' - option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}' - option adb_src_desc 'broad blocklist, weekly updates, approx. 10.000 entries' - option enabled '0' - -config source 'winspy' - option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt' - option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}' - option adb_src_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 300 entries' - option enabled '0' - -config source 'winhelp' - option adb_src 'http://winhelp2002.mvps.org/hosts.txt' - option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}' - option adb_src_desc 'broad blocklist, infrequent updates, approx. 13.000 entries' - option enabled '0' - -config source 'youtube' - option adb_src 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com' - option adb_src_rset 'BEGIN{FS=\",\"}/^(r[0-9]+\.){1,1}([[:alnum:]_-]+\.)+[[:alpha:]]+/{sub(/\./,\"---\");print tolower(\$1)}' - option adb_src_desc 'focus on youtube ad-related subdomains, dynamic request API, approx. 150 entries' - option enabled '0' - -config source 'yoyo' - option adb_src 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'focus on ad related domains, weekly updates, approx. 2.400 entries' - option enabled '1' - -config source 'zeus' - option adb_src 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist' - option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' - option adb_src_desc 'focus on zeus botnet by abuse.ch, daily updates, approx. 400 entries' - option enabled '0' + list adb_sources 'adaway' + list adb_sources 'adguard' + list adb_sources 'disconnect' + list adb_sources 'yoyo' diff --git a/net/adblock/files/adblock.init b/net/adblock/files/adblock.init index 2ae2b086..780e3b6b 100755 --- a/net/adblock/files/adblock.init +++ b/net/adblock/files/adblock.init @@ -1,42 +1,51 @@ #!/bin/sh /etc/rc.common -# +# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org) +# This is free software, licensed under the GNU General Public License v3. START=30 USE_PROCD=1 -EXTRA_COMMANDS="suspend resume query status" +EXTRA_COMMANDS="suspend resume query report list timer status_service" EXTRA_HELP=" suspend Suspend adblock processing resume Resume adblock processing - query Query active blocklists for specific domains - status Print runtime information" + query Query active blocklists and backups for a specific domain + report [] Print DNS statistics with an optional search parameter + list [[|] [source(s)]] List available adblock sources or add/remove them from config + timer [] [] Set a cron based update interval" adb_init="/etc/init.d/adblock" adb_script="/usr/bin/adblock.sh" adb_pidfile="/var/run/adblock.pid" +if [ -s "${adb_pidfile}" ] && { [ "${action}" = "start" ] || [ "${action}" = "stop" ] || \ + [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "report" ] || \ + [ "${action}" = "suspend" ] || [ "${action}" = "resume" ] || [ "${action}" = "query" ] || \ + { [ "${action}" = "list" ] && [ -n "${1}" ]; }; } +then + exit 0 +fi + boot() { - adb_boot=1 + [ -s "${adb_pidfile}" ] && > "${adb_pidfile}" rc_procd start_service } start_service() { - if [ $("${adb_init}" enabled; printf "%u" ${?}) -eq 0 ] + if [ "$("${adb_init}" enabled; printf "%u" ${?})" -eq 0 ] then - if [ -n "${adb_boot}" ] + if [ "${action}" = "boot" ] then - local trigger="$(uci_get adblock global adb_trigger)" - if [ "${trigger}" != "timed" ] + if [ -n "$(uci_get adblock global adb_trigger)" ] then return 0 fi fi - local nice="$(uci_get adblock extra adb_nice)" procd_open_instance "adblock" procd_set_param command "${adb_script}" "${@}" procd_set_param pidfile "${adb_pidfile}" - procd_set_param nice ${nice:-0} + procd_set_param nice "$(uci_get adblock global adb_nice "0")" procd_set_param stdout 1 procd_set_param stderr 1 procd_close_instance @@ -51,7 +60,6 @@ reload_service() stop_service() { rc_procd "${adb_script}" stop - rc_procd start_service } restart() @@ -61,52 +69,182 @@ restart() suspend() { - [ -s "${adb_pidfile}" ] && return 1 - rc_procd "${adb_script}" suspend + rc_procd start_service suspend } resume() { - [ -s "${adb_pidfile}" ] && return 1 - rc_procd "${adb_script}" resume + rc_procd start_service resume } query() { - [ -s "${adb_pidfile}" ] && return 1 rc_procd "${adb_script}" query "${1}" } -status() +report() { - local key keylist value rtfile="$(uci_get adblock extra adb_rtfile)" + rc_procd "${adb_script}" report "${1:-"+"}" "${2:-"50"}" "${3:-"true"}" "${4:-"cli"}" +} - rtfile="${rtfile:-"/tmp/adb_runtime.json"}" +list() +{ + local src_archive src_file src_enabled enabled name action="${1}" + + if [ "${action}" = "add" ] || [ "${action}" = "remove" ] + then + shift + for name in "${@}" + do + if [ "${action}" = "add" ] + then + if [ -z "$(uci_get adblock global adb_sources | grep -Fo "${name}")" ] + then + uci_add_list adblock global adb_sources "${name}" + printf "%s\\n" "::: adblock source '${name}' added to config" + fi + else + if [ -n "$(uci_get adblock global adb_sources | grep -Fo "${name}")" ] + then + uci_remove_list adblock global adb_sources "${name}" + printf "%s\\n" "::: adblock source '${name}' removed from config" + fi + fi + done + if [ -n "$(uci -q changes adblock)" ] + then + uci_commit adblock + "${adb_init}" start + fi + else + src_archive="$(uci_get adblock global adb_srcarc "/etc/adblock/adblock.sources.gz")" + src_file="$(uci_get adblock global adb_srcfile "/tmp/adb_sources.json")" + src_enabled="$(uci -q show adblock.global.adb_sources)" + if [ -r "${src_archive}" ] + then + zcat "${src_archive}" > "${src_file}" + else + printf "%s\\n" "::: adblock source archive '${src_archive}' not found" + fi + if [ -r "${src_file}" ] + then + src_enabled="${src_enabled#*=}" + src_enabled="${src_enabled//\'}" + printf "%s\\n" "::: Available adblock sources" + printf "%s\\n" ":::" + printf "%-25s%-10s%-7s%-21s%s\\n" " Name" "Enabled" "Size" "Focus" "Info URL" + printf "%s\\n" " -------------------------------------------------------------------" + json_load_file "${src_file}" + json_get_keys keylist + for key in ${keylist} + do + json_select "${key}" + json_get_var size "size" + json_get_var focus "focus" + json_get_var descurl "descurl" + json_get_var url "url" + json_get_var rule "rule" + if [ -n "${url}" ] && [ -n "${rule}" ] + then + if [ -n "$(printf "%s" "${src_enabled}" | grep -Fo "${key}")" ] + then + enabled="x" + else + enabled=" " + fi + src_enabled="${src_enabled/${key}}" + printf " + %-21s%-10s%-7s%-21s%s\\n" "${key:0:20}" "${enabled}" "${size:0:3}" "${focus:0:20}" "${descurl:0:50}" + else + src_enabled="${src_enabled} ${key}" + fi + json_select .. + done + if [ -n "${src_enabled// }" ] + then + printf "%s\\n" " ----------------------------------------------" + printf "%s\\n" " Sources without valid configuration" + printf "%s\\n" " ----------------------------------------------" + for key in ${src_enabled} + do + printf " - %s\\n" "${key:0:20}" + done + fi + else + printf "%s\\n" "::: adblock source file '${src_file}' not found" + fi + fi +} + +status_service() +{ + local key keylist value rtfile + + rtfile="$(uci_get adblock global adb_rtfile "/tmp/adb_runtime.json")" if [ -s "${rtfile}" ] then - printf "%s\n" "::: adblock runtime information" + printf "%s\\n" "::: adblock runtime information" json_load_file "${rtfile}" json_select data json_get_keys keylist for key in ${keylist} do json_get_var value "${key}" - printf " + %-15s : %s\n" "${key}" "${value}" + if [ "${key}" = "active_sources" ] + then + printf " + %-15s : " "${key}" + json_select "${key}" + index=1 + while json_get_type status "${index}" && [ "${status}" = "object" ] + do + json_get_values source "${index}" + printf "%s " "${source}" + index=$((index+1)) + done + printf "\\n" + json_select ".." + else + printf " + %-15s : %s\\n" "${key}" "${value}" + fi done else - printf "%s\n" "::: no adblock runtime information available" + printf "%s\\n" "::: no adblock runtime information available" + fi +} + +timer() +{ + local action="${1}" hour="${2}" minute="${3:-0}" weekday="${4:-"*"}" + + hour="${hour//[[:alpha:]]/}" + minute="${minute//[[:alpha:]]/}" + if [ -n "${action}" ] && [ -n "${hour}" ] && [ -n "${minute}" ] && [ -n "${weekday}" ] && \ + [ "${hour}" -ge 0 ] && [ "${hour}" -le 23 ] && \ + [ "${minute}" -ge 0 ] && [ "${minute}" -le 59 ] + then + if [ -r "/etc/crontabs/root" ] + then + search="${adb_init//\//\\/}" + search="${search//./\\.}" + sed -i "/${search}/d" "/etc/crontabs/root" + fi + printf "%02d %02d %s\\n" "${minute}" "${hour}" "* * ${weekday} ${adb_init} ${action}" >> "/etc/crontabs/root" + /etc/init.d/cron restart + else + printf "%s\\n" "::: the refresh timer could not been updated" fi } service_triggers() { - local trigger="$(uci_get adblock global adb_trigger)" - local delay="$(uci_get adblock extra adb_triggerdelay)" + local trigger delay type - if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ] + PROCD_RELOAD_DELAY=$((delay*1000)) + trigger="$(uci_get adblock global adb_trigger)" + delay="$(uci_get adblock global adb_triggerdelay "2")" + type="$(uci_get adblock global adb_starttype "start")" + if [ -n "${trigger}" ] then - PROCD_RELOAD_DELAY=$((${delay:-2} * 1000)) - procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" start + procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" "${type}" fi procd_add_reload_trigger "adblock" } diff --git a/net/adblock/files/adblock.mail b/net/adblock/files/adblock.mail new file mode 100755 index 00000000..ca9d206d --- /dev/null +++ b/net/adblock/files/adblock.mail @@ -0,0 +1,81 @@ +#!/bin/sh +# send mail script for adblock notifications +# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org) +# This is free software, licensed under the GNU General Public License v3. + +# Please note: you have to manually install and configure the package 'msmtp' before using this script + +LC_ALL=C +PATH="/usr/sbin:/usr/bin:/sbin:/bin" + +if [ -r "/lib/functions.sh" ] +then + . "/lib/functions.sh" + adb_debug="$(uci_get adblock global adb_debug "0")" + adb_mailsender="$(uci_get adblock global adb_mailsender "no-reply@adblock")" + adb_mailreceiver="$(uci_get adblock global adb_mailreceiver)" + adb_mailtopic="$(uci_get adblock global adb_mailtopic "adblock notification")" + adb_mailprofile="$(uci_get adblock global adb_mailprofile "adb_notify")" +fi +adb_ver="${1}" +adb_mail="$(command -v msmtp)" +adb_logger="$(command -v logger)" +adb_logread="$(command -v logread)" +adb_rc=1 + +f_log() +{ + local class="${1}" log_msg="${2}" + + if [ -x "${adb_logger}" ] + then + "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}" + else + printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}" + fi +} + +if [ -z "${adb_mailreceiver}" ] +then + f_log "err" "please set the mail receiver with the 'adb_mailreceiver' option" + exit ${adb_rc} +fi + +if [ "${adb_debug}" -eq 1 ] +then + debug="--debug" +fi + +adb_mailhead="From: ${adb_mailsender}\\nTo: ${adb_mailreceiver}\\nSubject: ${adb_mailtopic}\\nReply-to: ${adb_mailsender}\\nMime-Version: 1.0\\nContent-Type: text/html\\nContent-Disposition: inline\\n\\n" + +# info preparation +# +sys_info="$(strings /etc/banner 2>/dev/null; ubus call system board | sed -e 's/\"release\": {//' | sed -e 's/^[ \t]*//' | sed -e 's/[{}\",]//g' | sed -e 's/[ ]/ \t/' | sed '/^$/d' 2>/dev/null)" +adb_info="$(/etc/init.d/adblock status 2>/dev/null)" +if [ -f "/var/log/messages" ] +then + log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)" +elif [ -x "${adb_logread}" ] +then + log_info="$("${adb_logread}" -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')" +fi + +# mail body +# +adb_mailtext="
"
+adb_mailtext="${adb_mailtext}\\n++\\n++ System Information ++\\n++\\n${sys_info}"
+adb_mailtext="${adb_mailtext}\\n\\n++\\n++ Adblock Information ++\\n++\\n${adb_info}"
+adb_mailtext="${adb_mailtext}\\n\\n++\\n++ Logfile Information ++\\n++\\n${log_info}"
+adb_mailtext="${adb_mailtext}
" + +# send mail +# +if [ -x "${adb_mail}" ] +then + printf "%b" "${adb_mailhead}${adb_mailtext}" 2>/dev/null | "${adb_mail}" ${debug} -a "${adb_mailprofile}" "${adb_mailreceiver}" >/dev/null 2>&1 + adb_rc=${?} + f_log "info" "mail sent to '${adb_mailreceiver}' with rc '${adb_rc}'" +else + f_log "err" "msmtp mail daemon not found" +fi +exit ${adb_rc} diff --git a/net/adblock/files/adblock.monitor b/net/adblock/files/adblock.monitor new file mode 100755 index 00000000..7fe90c8c --- /dev/null +++ b/net/adblock/files/adblock.monitor @@ -0,0 +1,37 @@ +#!/bin/sh +# ubus monitor to trace dns backend events and conditionally restart adblock +# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org) +# This is free software, licensed under the GNU General Public License v3. + +LC_ALL=C +PATH="/usr/sbin:/usr/bin:/sbin:/bin" + +if [ -r "/lib/functions.sh" ] +then + . "/lib/functions.sh" + adb_dns="$(uci_get adblock global adb_dns)" +fi +adb_ver="${1}" +adb_ubus="$(command -v ubus)" +adb_logger="$(command -v logger)" + +f_log() +{ + local class="${1}" log_msg="${2}" + + if [ -x "${adb_logger}" ] + then + "${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}" + else + printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}" + fi +} + +if [ -x "${adb_ubus}" ] && [ -n "${adb_dns}" ] +then + f_log "info" "ubus/adblock monitor started" + "${adb_ubus}" -S -M r -m invoke monitor | \ + { grep -qE "\"method\":\"(set|signal)\",\"data\":\{\"name\":\"${adb_dns}\""; [ $? -eq 0 ] && /etc/init.d/adblock start; } +else + f_log "err" "can't start ubus/adblock monitor" +fi diff --git a/net/adblock/files/adblock.notify b/net/adblock/files/adblock.notify deleted file mode 100644 index 54f0288d..00000000 --- a/net/adblock/files/adblock.notify +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# -# adblock send mail script for msmtp -# written by Dirk Brenken (dev@brenken.org) -# Please note: you have to install and configure the package 'msmtp' before using this script. - -# This is free software, licensed under the GNU General Public License v3. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -LC_ALL=C -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -mail_ver="1.0.4" -mail_daemon="$(command -v msmtp)" -mail_profile="adb_notify" -#mail_debug="--debug" -mail_rc=1 - -# mail header & mail receiver check -# -mail_receiver="" -mail_sender="no-reply@adblock" -mail_topic="${HOSTNAME}: adblock notification" -mail_head="From: ${mail_sender}\nTo: ${mail_receiver}\nSubject: ${mail_topic}\nReply-to: ${mail_sender}\nMime-Version: 1.0\nContent-Type: text/html\nContent-Disposition: inline\n\n" - -if [ -z "${mail_receiver}" ] -then - logger -p "err" -t "adblock-notify-${mail_ver}[${$}]" "please supply/customize the 'mail_receiver' in '/etc/adblock/adblock.notify'" - exit ${mail_rc} -fi - -# mail daemon check -# -if [ ! -x "${mail_daemon}" ] -then - mail_daemon="$(command -v sendmail)" -fi - -# info preparation -# -sys_info="$(strings /etc/banner 2>/dev/null; ubus call system board | sed -e 's/\"release\": {//' | sed -e 's/^[ \t]*//' | sed -e 's/[{}\",]//g' | sed -e 's/[ ]/ \t/' | sed '/^$/d' 2>/dev/null)" -adb_info="$(/etc/init.d/adblock status 2>/dev/null)" -if [ -f "/var/log/messages" ] -then - log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)" -else - log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')" -fi - -# mail body -# -mail_text="
"
-mail_text="${mail_text}\n++\n++ System Information ++\n++\n${sys_info}"
-mail_text="${mail_text}\n\n++\n++ Adblock Information ++\n++\n${adb_info}"
-mail_text="${mail_text}\n\n++\n++ Logfile Information ++\n++\n${log_info}"
-mail_text="${mail_text}
" - -# send mail -# -if [ -x "${mail_daemon}" ] -then - printf "%b" "${mail_head}${mail_text}" 2>/dev/null | "${mail_daemon}" ${mail_debug} -a "${mail_profile}" "${mail_receiver}" >/dev/null 2>&1 - mail_rc=${?} - logger -p "info" -t "adblock-notify-${mail_ver}[${$}]" "mail sent to '${mail_receiver}' with rc '${mail_rc}'" -else - logger -p "err" -t "adblock-notify-${mail_ver}[${$}]" "msmtp mail daemon not found" -fi - -exit ${mail_rc} diff --git a/net/adblock/files/adblock.sh b/net/adblock/files/adblock.sh index a8eb1563..d545a670 100755 --- a/net/adblock/files/adblock.sh +++ b/net/adblock/files/adblock.sh @@ -1,274 +1,444 @@ #!/bin/sh # dns based ad/abuse domain blocking -# written by Dirk Brenken (dev@brenken.org) - +# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org) # This is free software, licensed under the GNU General Public License v3. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . + +# set (s)hellcheck exceptions +# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188 # set initial defaults # -LC_ALL=C -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -adb_ver="3.5.5-2" -adb_sysver="unknown" +export LC_ALL=C +export PATH="/usr/sbin:/usr/bin:/sbin:/bin" +set -o pipefail +adb_ver="4.0.6" adb_enabled=0 adb_debug=0 -adb_backup_mode=0 -adb_forcesrt=0 adb_forcedns=0 -adb_jail=0 adb_maxqueue=4 -adb_notify=0 -adb_notifycnt=0 +adb_dnsfilereset=0 +adb_dnsflush=0 +adb_dnstimeout=20 +adb_safesearch=0 +adb_safesearchlist="" +adb_safesearchmod=0 +adb_report=0 +adb_trigger="" adb_triggerdelay=0 -adb_backup=0 -adb_backupdir="/mnt" -adb_fetchutil="uclient-fetch" -adb_dns="dnsmasq" +adb_backup=1 +adb_mail=0 +adb_mailcnt=0 +adb_jail=0 +adb_dns="" adb_dnsprefix="adb_list" +adb_locallist="blacklist whitelist" +adb_tmpbase="/tmp" +adb_backupdir="/tmp" +adb_reportdir="/tmp" +adb_jaildir="/tmp" +adb_pidfile="/var/run/adblock.pid" +adb_blacklist="/etc/adblock/adblock.blacklist" +adb_whitelist="/etc/adblock/adblock.whitelist" +adb_ubusservice="/etc/adblock/adblock.monitor" +adb_mailservice="/etc/adblock/adblock.mail" adb_dnsfile="${adb_dnsprefix}.overall" adb_dnsjail="${adb_dnsprefix}.jail" -adb_dnsflush=0 -adb_whitelist="/etc/adblock/adblock.whitelist" -adb_rtfile="/tmp/adb_runtime.json" -adb_hashutil="$(command -v sha256sum)" -adb_hashold="" -adb_hashnew="" -adb_cnt="" -adb_rc=0 +adb_srcarc="/etc/adblock/adblock.sources.gz" +adb_srcfile="${adb_tmpbase}/adb_sources.json" +adb_rtfile="${adb_tmpbase}/adb_runtime.json" +adb_loggercmd="$(command -v logger)" +adb_dumpcmd="$(command -v tcpdump)" +adb_lookupcmd="$(command -v nslookup)" +adb_fetchutil="" +adb_portlist="53 853 5353" +adb_repiface="" +adb_replisten="53" +adb_repchunkcnt="5" +adb_repchunksize="1" +adb_lookupdomain="example.com" adb_action="${1:-"start"}" -adb_pidfile="/var/run/adblock.pid" +adb_packages="" +adb_sources="" +adb_cnt="" -# load adblock environment +# load & check adblock environment # -f_envload() +f_load() { - local dns_up sys_call sys_desc sys_model sys_ver cnt=0 - - # get system information - # - sys_call="$(ubus -S call system board 2>/dev/null)" - if [ -n "${sys_call}" ] + adb_sysver="$(ubus -S call system board 2>/dev/null | jsonfilter -e '@.model' -e '@.release.description' | \ + "${adb_awk}" 'BEGIN{ORS=", "}{print $0}' | "${adb_awk}" '{print substr($0,1,length($0)-2)}')" + f_conf + if [ "${adb_action}" != "report" ] then - sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')" - sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')" - sys_ver="$(cat /etc/turris-version 2>/dev/null)" - if [ -n "${sys_ver}" ] - then - sys_desc="${sys_desc}/${sys_ver}" - fi - adb_sysver="${sys_model}, ${sys_desc}" + f_dns + f_fetch fi - # check hash utility - # - if [ ! -x "${adb_hashutil}" ] - then - adb_hashutil="$(command -v md5sum)" - fi - - # parse 'global' and 'extra' section by callback - # - config_cb() - { - local type="${1}" - if [ "${type}" = "adblock" ] - then - option_cb() - { - local option="${1}" - local value="${2}" - eval "${option}=\"${value}\"" - } - else - reset_cb - fi - } - - # parse 'source' typed sections - # - parse_config() - { - local value opt section="${1}" options="enabled adb_src adb_src_rset adb_src_cat" - eval "adb_sources=\"${adb_sources} ${section}\"" - for opt in ${options} - do - config_get value "${section}" "${opt}" - if [ -n "${value}" ] - then - eval "${opt}_${section}=\"${value}\"" - fi - done - } - - # load adblock config - # - config_load adblock - config_foreach parse_config source - - # check dns backend - # - case "${adb_dns}" in - dnsmasq) - adb_dnsinstance="${adb_dnsinstance:-"0"}" - adb_dnsuser="${adb_dnsuser:-"dnsmasq"}" - adb_dnsdir="${adb_dnsdir:-"/tmp"}" - adb_dnsheader="" - adb_dnsdeny="awk '{print \"server=/\"\$0\"/\"}'" - adb_dnsallow="awk '{print \"server=/\"\$0\"/#\"}'" - adb_dnshalt="server=/#/" - ;; - unbound) - adb_dnsinstance="${adb_dnsinstance:-"0"}" - adb_dnsuser="${adb_dnsuser:-"unbound"}" - adb_dnsdir="${adb_dnsdir:-"/var/lib/unbound"}" - adb_dnsheader="" - adb_dnsdeny="awk '{print \"local-zone: \042\"\$0\"\042 static\"}'" - adb_dnsallow="awk '{print \"local-zone: \042\"\$0\"\042 transparent\"}'" - adb_dnshalt="local-zone: \".\" static" - ;; - named) - adb_dnsinstance="${adb_dnsinstance:-"0"}" - adb_dnsuser="${adb_dnsuser:-"bind"}" - adb_dnsdir="${adb_dnsdir:-"/var/lib/bind"}" - adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost." - adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'" - adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'" - adb_dnshalt="* CNAME ." - ;; - kresd) - adb_dnsinstance="${adb_dnsinstance:-"0"}" - adb_dnsuser="${adb_dnsuser:-"root"}" - adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}" - adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost." - adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'" - adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'" - adb_dnshalt="* CNAME ." - ;; - dnscrypt-proxy) - adb_dnsinstance="${adb_dnsinstance:-"0"}" - adb_dnsuser="${adb_dnsuser:-"nobody"}" - adb_dnsdir="${adb_dnsdir:-"/tmp"}" - adb_dnsheader="" - adb_dnsdeny="awk '{print \$0}'" - adb_dnsallow="" - adb_dnshalt="" - ;; - esac - - # check adblock status - # - if [ ${adb_enabled} -eq 0 ] + if [ "${adb_enabled}" -eq 0 ] then f_extconf f_temp f_rmdns + f_bgserv "stop" f_jsnup "disabled" - f_log "info" "adblock is currently disabled, please set adb_enabled to '1' to use this service" + f_log "info" "adblock is currently disabled, please set the config option 'adb_enabled' to '1' to use this service" exit 0 fi +} - if [ -d "${adb_dnsdir}" ] && [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ] +# check & set environment +# +f_env() +{ + adb_starttime="$(date "+%s")" + f_log "info" "adblock instance started ::: action: ${adb_action}, priority: ${adb_nice:-"0"}, pid: ${$}" + f_jsnup "running" + f_extconf + f_temp + + if [ "${adb_dnsflush}" -eq 1 ] then - printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" + printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" + f_dnsup fi - if [ "${adb_action}" = "start" ] && [ "${adb_trigger}" = "timed" ] + if [ ! -r "${adb_srcfile}" ] + then + if [ -r "${adb_srcarc}" ] + then + zcat "${adb_srcarc}" > "${adb_srcfile}" + else + f_log "err" "adblock source archive not found" + fi + fi + if [ -r "${adb_srcfile}" ] + then + json_load_file "${adb_srcfile}" + else + f_log "err" "adblock source file not found" + fi +} + +# load adblock config +# +f_conf() +{ + local cnt=0 cnt_max=10 + + if [ ! -r "/etc/config/adblock" ] || [ -n "$(uci -q show adblock.@source[0])" ] + then + if { [ -r "/etc/config/adblock-opkg" ] && [ -z "$(uci -q show adblock-opkg.@source[0])" ]; } || \ + { [ -r "/rom/etc/config/adblock" ] && [ -z "$(uci -q show /rom/etc/config/adblock.@source[0])" ]; } + then + if [ -r "/etc/config/adblock" ] + then + cp -pf "/etc/config/adblock" "/etc/config/adblock-backup" + fi + if [ -r "/etc/config/adblock-opkg" ] + then + cp -pf "/etc/config/adblock-opkg" "/etc/config/adblock" + elif [ -r "/rom/etc/config/adblock" ] + then + cp -pf "/rom/etc/config/adblock" "/etc/config/adblock" + fi + f_log "info" "missing or old adblock config replaced with new valid default config" + else + f_log "err" "unrecoverable adblock config error, please re-install the package via opkg with the '--force-reinstall --force-maintainer' options" + fi + fi + + config_cb() + { + option_cb() + { + local option="${1}" + local value="${2}" + eval "${option}=\"${value}\"" + } + list_cb() + { + local option="${1}" + local value="${2}" + if [ "${option}" = "adb_sources" ] + then + eval "${option}=\"$(printf "%s" "${adb_sources}") ${value}\"" + elif [ "${option}" = "adb_safesearchlist" ] + then + eval "${option}=\"$(printf "%s" "${adb_safesearchlist}") ${value}\"" + fi + } + } + config_load adblock + + if [ -z "${adb_fetchutil}" ] || [ -z "${adb_dns}" ] + then + while [ -z "${adb_packages}" ] && [ "${cnt}" -le "${cnt_max}" ] + do + adb_packages="$(opkg list-installed 2>/dev/null)" + cnt=$((cnt+1)) + sleep 1 + done + if [ -z "${adb_packages}" ] + then + f_log "err" "local opkg package repository is not available, please set 'adb_fetchutil' and 'adb_dns' manually" + fi + fi +} + +# load dns backend config +# +f_dns() +{ + local util utils dns_up cnt=0 + + if [ -z "${adb_dns}" ] + then + utils="knot-resolver named unbound dnsmasq raw" + for util in ${utils} + do + if [ "${util}" = "raw" ] || [ -n "$(printf "%s" "${adb_packages}" | grep "^${util}")" ] + then + if [ "${util}" = "knot-resolver" ] + then + util="kresd" + fi + if [ "${util}" = "raw" ] || [ -x "$(command -v "${util}")" ] + then + adb_dns="${util}" + uci_set adblock global adb_dns "${util}" + f_uci "adblock" + break + fi + fi + done + elif [ "${adb_dns}" != "raw" ] && [ ! -x "$(command -v "${adb_dns}")" ] + then + unset adb_dns + fi + + if [ -n "${adb_dns}" ] + then + case "${adb_dns}" in + "dnsmasq") + adb_dnsinotify="${adb_dnsinotify:-"0"}" + adb_dnsinstance="${adb_dnsinstance:-"0"}" + adb_dnsuser="${adb_dnsuser:-"dnsmasq"}" + adb_dnsdir="${adb_dnsdir:-"/tmp/dnsmasq.d"}" + adb_dnsheader="${adb_dnsheader}" + adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"address=/\"\$0\"/\"}'"}" + adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"local=/\"\$0\"/#\"}'"}" + adb_dnssafesearch="${adb_dnssafesearch:-"${adb_awk} -v item=\"\$item\" '{print \"address=/\"\$0\"/\"item\"\"}'"}" + adb_dnsstop="${adb_dnsstop:-"address=/#/"}" + ;; + "unbound") + adb_dnsinotify="${adb_dnsinotify:-"0"}" + adb_dnsinstance="${adb_dnsinstance:-"0"}" + adb_dnsuser="${adb_dnsuser:-"unbound"}" + adb_dnsdir="${adb_dnsdir:-"/var/lib/unbound"}" + adb_dnsheader="${adb_dnsheader}" + adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"local-zone: \\042\"\$0\"\\042 static\"}'"}" + adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"local-zone: \\042\"\$0\"\\042 transparent\"}'"}" + adb_dnssafesearch="${adb_dnssafesearch:-"${adb_awk} -v item=\"\$item\" '{type=\"AAAA\";if(match(item,/^([0-9]{1,3}\.){3}[0-9]{1,3}$/)){type=\"A\"}}{print \"local-data: \\042\"\$0\" \"type\" \"item\"\\042\"}'"}" + adb_dnsstop="${adb_dnsstop:-"local-zone: \".\" static"}" + ;; + "named") + adb_dnsinotify="${adb_dnsinotify:-"0"}" + adb_dnsinstance="${adb_dnsinstance:-"0"}" + adb_dnsuser="${adb_dnsuser:-"bind"}" + adb_dnsdir="${adb_dnsdir:-"/var/lib/bind"}" + adb_dnsheader="${adb_dnsheader:-"\$TTL 2h\n@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)\n IN NS localhost.\n"}" + adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"\"\$0\" CNAME .\\n*.\"\$0\" CNAME .\"}'"}" + adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"}" + adb_dnssafesearch="${adb_dnssafesearch:-"${adb_awk} -v item=\"\$item\" '{print \"\"\$0\" CNAME \"item\".\\n*.\"\$0\" CNAME \"item\".\"}'"}" + adb_dnsstop="${adb_dnsstop:-"* CNAME ."}" + ;; + "kresd") + adb_dnsinotify="${adb_dnsinotify:-"0"}" + adb_dnsinstance="${adb_dnsinstance:-"0"}" + adb_dnsuser="${adb_dnsuser:-"root"}" + adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}" + adb_dnsheader="${adb_dnsheader:-"\$TTL 2h\n@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)\n"}" + adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"\"\$0\" CNAME .\\n*.\"\$0\" CNAME .\"}'"}" + adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"}" + adb_dnssafesearch="${adb_dnssafesearch:-"${adb_awk} -v item=\"\$item\" '{type=\"AAAA\";if(match(item,/^([0-9]{1,3}\.){3}[0-9]{1,3}$/)){type=\"A\"}}{print \"\"\$0\" \"type\" \"item\"\"}'"}" + adb_dnsstop="${adb_dnsstop:-"* CNAME ."}" + ;; + "raw") + adb_dnsinotify="${adb_dnsinotify:-"0"}" + adb_dnsinstance="${adb_dnsinstance:-"0"}" + adb_dnsuser="${adb_dnsuser:-"root"}" + adb_dnsdir="${adb_dnsdir:-"/tmp"}" + adb_dnsheader="${adb_dnsheader}" + adb_dnsdeny="${adb_dnsdeny:-"0"}" + adb_dnsallow="${adb_dnsallow:-"1"}" + adb_dnssafesearch="${adb_dnssafesearch:-"0"}" + adb_dnsstop="${adb_dnsstop:-"0"}" + ;; + esac + fi + + if [ "${adb_dns}" != "raw" ] && { [ -z "${adb_dns}" ] || [ ! -x "$(command -v "${adb_dns}")" ]; } + then + f_log "err" "dns backend not found, please set 'adb_dns' manually" + fi + + if [ "${adb_dns}" != "raw" ] && { [ "${adb_dnsdir}" = "${adb_tmpbase}" ] || [ "${adb_dnsdir}" = "${adb_backupdir}" ] || \ + [ "${adb_dnsdir}" = "${adb_reportdir}" ] || [ "${adb_dnsdir}" = "${adb_jaildir}" ]; } + then + f_log "err" "dns directory '${adb_dnsdir}' has been misconfigured, it must not point to the 'adb_tmpbase', 'adb_backupdir', 'adb_reportdir' or 'adb_jaildir'" + fi + + if [ "${adb_action}" = "start" ] && [ -z "${adb_trigger}" ] then sleep ${adb_triggerdelay} fi - while [ ${cnt} -le 30 ] - do - dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)" - if [ "${dns_up}" = "true" ] - then - break - fi - sleep 1 - cnt=$((cnt+1)) - done + if [ "${adb_dns}" != "raw" ] && [ "${adb_action}" != "stop" ] + then + while [ "${cnt}" -le 30 ] + do + dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)" + if [ "${dns_up}" = "true" ] + then + break + fi + sleep 1 + cnt=$((cnt+1)) + done - if [ "${dns_up}" != "true" ] || [ -z "${adb_dns}" ] || [ ! -x "$(command -v ${adb_dns})" ] - then - f_log "err" "'${adb_dns}' not running or not executable" - elif [ ! -d "${adb_dnsdir}" ] - then - f_log "err" "'${adb_dnsdir}' backend directory not found" + if [ -n "${adb_dnsdir}" ] && [ ! -d "${adb_dnsdir}" ] + then + mkdir -p "${adb_dnsdir}" + if [ "${?}" -eq 0 ] + then + f_log "info" "dns backend directory '${adb_dnsdir}' created" + else + f_log "err" "dns backend directory '${adb_dnsdir}' could not be created" + fi + fi + + if [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ] + then + printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" + fi + + if [ "${dns_up}" != "true" ] + then + f_dnsup 4 + if [ "${?}" -ne 0 ] + then + f_log "err" "dns backend '${adb_dns}' not running or executable" + fi + fi + + if [ "${adb_backup}" -eq 1 ] && [ -n "${adb_backupdir}" ] && [ ! -d "${adb_backupdir}" ] + then + mkdir -p "${adb_backupdir}" + if [ "${?}" -eq 0 ] + then + f_log "info" "backup directory '${adb_backupdir}' created" + else + f_log "err" "backup backend directory '${adb_backupdir}' could not be created" + fi + fi + + if [ -n "${adb_jaildir}" ] && [ ! -d "${adb_jaildir}" ] + then + mkdir -p "${adb_jaildir}" + if [ "${?}" -eq 0 ] + then + f_log "info" "jail directory '${adb_jaildir}' created" + else + f_log "err" "jail directory '${adb_jaildir}' could not be created" + fi + fi fi + f_log "debug" "f_dns ::: dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_file: ${adb_dnsfile}, dns_user: ${adb_dnsuser}, dns_inotify: ${adb_dnsinotify}, dns_instance: ${adb_dnsinstance}, backup: ${adb_backup}, backup_dir: ${adb_backupdir}, jail_dir: ${adb_jaildir}" } -# check environment +# load fetch utility # -f_envcheck() +f_fetch() { - local ssl_lib + local util utils cnt=0 - # startup message - # - f_log "info" "adblock instance started ::: action: ${adb_action}, priority: ${adb_nice:-"0"}, pid: ${$}" - f_jsnup "running" - - # check external uci config files - # - f_extconf - - # check fetch utility - # - case "${adb_fetchutil}" in - uclient-fetch) - if [ -f "/lib/libustream-ssl.so" ] + if [ -z "${adb_fetchutil}" ] + then + utils="aria2c curl wget uclient-fetch" + for util in ${utils} + do + if { [ "${util}" = "uclient-fetch" ] && [ -n "$(printf "%s" "${adb_packages}" | grep "^libustream-")" ]; } || \ + { [ "${util}" = "wget" ] && [ -n "$(printf "%s" "${adb_packages}" | grep "^wget -")" ]; } || \ + [ "${util}" = "curl" ] || [ "${util}" = "aria2c" ] then - adb_fetchparm="${adb_fetchparm:-"--timeout=10 --no-check-certificate -O"}" - ssl_lib="libustream-ssl" - else - adb_fetchparm="${adb_fetchparm:-"--timeout=10 -O"}" + if [ -x "$(command -v "${util}")" ] + then + adb_fetchutil="${util}" + uci_set adblock global adb_fetchutil "${util}" + f_uci "adblock" + break + fi fi + done + elif [ ! -x "$(command -v "${adb_fetchutil}")" ] + then + unset adb_fetchutil + fi + case "${adb_fetchutil}" in + "aria2c") + adb_fetchparm="${adb_fetchparm:-"--timeout=20 --allow-overwrite=true --auto-file-renaming=false --check-certificate=true --dir= -o"}" ;; - wget) - adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"}" - ssl_lib="built-in" + "curl") + adb_fetchparm="${adb_fetchparm:-"--connect-timeout 20 --silent --show-error --location -o"}" ;; - wget-nossl) - adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 -O"}" + "uclient-fetch") + adb_fetchparm="${adb_fetchparm:-"--timeout=20 -O"}" ;; - busybox) - adb_fetchparm="${adb_fetchparm:-"-O"}" - ;; - curl) - adb_fetchparm="${adb_fetchparm:-"--connect-timeout 10 --insecure -o"}" - ssl_lib="built-in" - ;; - aria2c) - adb_fetchparm="${adb_fetchparm:-"--timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o"}" - ssl_lib="built-in" + "wget") + adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=20 -O"}" ;; esac - adb_fetchutil="$(command -v "${adb_fetchutil}")" - - if [ ! -x "${adb_fetchutil}" ] || [ -z "${adb_fetchutil}" ] || [ -z "${adb_fetchparm}" ] + if [ -n "${adb_fetchutil}" ] && [ -n "${adb_fetchparm}" ] then - f_log "err" "download utility not found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package" + adb_fetchutil="$(command -v "${adb_fetchutil}")" + else + f_log "err" "download utility with SSL support not found, please install 'uclient-fetch' with a 'libustream-*' variant or another download utility like 'wget', 'curl' or 'aria2'" fi - adb_fetchinfo="${adb_fetchutil} (${ssl_lib:-"-"})" - f_temp + f_log "debug" "f_fetch ::: fetch_util: ${adb_fetchutil:-"-"}, fetch_parm: ${adb_fetchparm:-"-"}" } -# create temporary files and directories +# create temporary files, directories and set dependent options # f_temp() { - if [ -z "${adb_tmpdir}" ] + local cpu core cores + + cpu="$(grep -c '^processor' /proc/cpuinfo 2>/dev/null)" + core="$(grep -cm1 '^core id' /proc/cpuinfo 2>/dev/null)" + if [ "${cpu}" -eq 0 ] then - adb_tmpdir="$(mktemp -p /tmp -d)" - adb_tmpload="$(mktemp -p ${adb_tmpdir} -tu)" - adb_tmpfile="$(mktemp -p ${adb_tmpdir} -tu)" + cpu=1 + fi + if [ "${core}" -eq 0 ] + then + core=1 + fi + cores=$((cpu*core)) + + if [ -d "${adb_tmpbase}" ] + then + adb_tmpdir="$(mktemp -p "${adb_tmpbase}" -d)" + adb_tmpload="$(mktemp -p "${adb_tmpdir}" -tu)" + adb_tmpfile="$(mktemp -p "${adb_tmpdir}" -tu)" + adb_srtopts="--temporary-directory=${adb_tmpdir} --compress-program=gzip --batch-size=32 --parallel=${cores}" + else + f_log "err" "the temp base directory '${adb_tmpbase}' does not exist/is not mounted yet, please create the directory or raise the 'adb_triggerdelay' to defer the adblock start" fi if [ ! -s "${adb_pidfile}" ] then - printf '%s' "${$}" > "${adb_pidfile}" + printf "%s" "${$}" > "${adb_pidfile}" fi + f_log "debug" "f_temp ::: tmp_base: ${adb_tmpbase:-"-"}, tmp_dir: ${adb_tmpdir:-"-"}, cores: ${cores:-"-"}, sort_options: ${adb_srtopts}, pid_file: ${adb_pidfile:-"-"}" } # remove temporary files and directories @@ -279,28 +449,30 @@ f_rmtemp() then rm -rf "${adb_tmpdir}" fi + rm -f "${adb_srcfile}" > "${adb_pidfile}" + f_log "debug" "f_rmtemp ::: tmp_dir: ${adb_tmpdir:-"-"}, src_file: ${adb_srcfile:-"-"}, pid_file: ${adb_pidfile:-"-"}" } -# remove dns related files and directories +# remove dns related files # f_rmdns() { - if [ -n "${adb_dns}" ] + local status + + status="$(ubus -S call service list '{"name":"adblock"}' 2>/dev/null | jsonfilter -l1 -e '@["adblock"].instances.*.running' 2>/dev/null)" + if [ "${adb_dns}" = "raw" ] || { [ -n "${adb_dns}" ] && [ -n "${status}" ]; } then - f_hash - printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" - > "${adb_dnsdir}/.${adb_dnsfile}" > "${adb_rtfile}" - rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz - f_hash - if [ ${?} -eq 1 ] + if [ "${adb_backup}" -eq 1 ] then - f_dnsup + rm -f "${adb_backupdir}/${adb_dnsprefix}".*.gz fi - f_rmtemp + printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" + f_dnsup 4 fi - f_log "debug" "f_rmdns::: dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_prefix: ${adb_dnsprefix}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir}" + f_rmtemp + f_log "debug" "f_rmdns ::: dns: ${adb_dns}, status: ${status:-"-"}, dns_dir: ${adb_dnsdir}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir:-"-"}" } # commit uci changes @@ -311,389 +483,568 @@ f_uci() if [ -n "${config}" ] then - change="$(uci -q changes "${config}" | awk '{ORS=" "; print $0}')" + change="$(uci -q changes "${config}" | "${adb_awk}" '{ORS=" "; print $0}')" if [ -n "${change}" ] then uci_commit "${config}" case "${config}" in - firewall) - /etc/init.d/firewall reload >/dev/null 2>&1 + "firewall") + "/etc/init.d/firewall" reload >/dev/null 2>&1 ;; - *) - /etc/init.d/"${adb_dns}" reload >/dev/null 2>&1 + "resolver") + printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" + f_count + f_jsnup "running" + "/etc/init.d/${adb_dns}" reload >/dev/null 2>&1 ;; esac fi + f_log "debug" "f_uci ::: config: ${config}, change: ${change}" fi - f_log "debug" "f_uci ::: config: ${config}, change: ${change}" } -# list/overall count +# get list counter # f_count() { - local mode="${1}" + local file mode="${1}" name="${2}" adb_cnt=0 - if [ -s "${adb_dnsdir}/${adb_dnsfile}" ] && ([ -z "${mode}" ] || [ "${mode}" = "final" ]) - then - adb_cnt="$(( $(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}") - $(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.add_whitelist") ))" - if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ] - then - adb_cnt="$(( (${adb_cnt} - $(printf '%s' "${adb_dnsheader}" | grep -c "^")) / 2 ))" - fi - elif [ -s "${adb_tmpfile}" ] - then - adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}")" - fi + case "${mode}" in + "blacklist") + if [ -s "${adb_tmpfile}.${name}" ] + then + adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}.${name}")" + fi + ;; + "whitelist") + if [ -s "${adb_tmpdir}/tmp.raw.${name}" ] + then + adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.raw.${name}")" + rm -f "${adb_tmpdir}/tmp.raw.${name}" + fi + ;; + "safesearch") + if [ -s "${adb_tmpdir}/tmp.safesearch.${name}" ] + then + adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.safesearch.${name}")" + fi + ;; + "merge") + if [ -s "${adb_tmpdir}/${adb_dnsfile}" ] + then + adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/${adb_dnsfile}")" + fi + ;; + "download"|"backup"|"restore") + if [ -s "${src_tmpfile}" ] + then + adb_cnt="$(wc -l 2>/dev/null < "${src_tmpfile}")" + fi + ;; + "final") + if [ -s "${adb_dnsdir}/${adb_dnsfile}" ] + then + adb_cnt="$(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}")" + if [ -s "${adb_tmpdir}/tmp.add.whitelist" ] + then + adb_cnt=$((adb_cnt-$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.add.whitelist"))) + fi + for file in "${adb_tmpdir}/tmp.safesearch".* + do + if [ -r "${file}" ] + then + adb_cnt=$((adb_cnt-$(wc -l 2>/dev/null < "${file}"))) + fi + done + if [ -n "${adb_dnsheader}" ] + then + adb_cnt=$(((adb_cnt-$(printf "${adb_dnsheader}" | grep -c "^"))/2)) + fi + fi + ;; + esac } # set external config options # f_extconf() { - local uci_config port port_list="53 853 5353" + local config config_dir config_file port fwcfg case "${adb_dns}" in - dnsmasq) - uci_config="dhcp" - if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] + "dnsmasq") + config="dhcp" + config_dir="$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" confdir | grep -Fo "${adb_dnsdir}")" + if [ "${adb_enabled}" -eq 1 ] && [ -z "${config_dir}" ] then - uci_set dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile "${adb_dnsdir}/${adb_dnsfile}" - elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] - then - uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile + uci_set dhcp "@dnsmasq[${adb_dnsinstance}]" confdir "${adb_dnsdir}" 2>/dev/null fi ;; - kresd) - uci_config="resolver" - if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] + "kresd") + config="resolver" + config_file="$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" + if [ "${adb_enabled}" -eq 1 ] && [ -z "${config_file}" ] then uci -q add_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}" - elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] + elif [ "${adb_enabled}" -eq 0 ] && [ -n "${config_file}" ] then uci -q del_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}" fi - if [ ${adb_enabled} -eq 1 ] && [ ${adb_dnsflush} -eq 0 ] && [ "$(uci_get resolver kresd keep_cache)" != "1" ] - then - uci_set resolver kresd keep_cache "1" - elif [ ${adb_enabled} -eq 0 ] || ([ ${adb_dnsflush} -eq 1 ] && [ "$(uci_get resolver kresd keep_cache)" = "1" ]) - then - uci_set resolver kresd keep_cache "0" - fi ;; esac - f_uci "${uci_config}" + f_uci "${config}" - uci_config="firewall" - if [ ${adb_enabled} -eq 1 ] && [ ${adb_forcedns} -eq 1 ] && \ - [ -z "$(uci_get firewall adblock_dns_53)" ] && [ $(/etc/init.d/firewall enabled; printf '%u' ${?}) -eq 0 ] + config="firewall" + fwcfg="$(uci -qNX show "${config}")" + if [ "${adb_enabled}" -eq 1 ] && [ "${adb_forcedns}" -eq 1 ] && \ + [ "$(/etc/init.d/firewall enabled; printf "%u" ${?})" -eq 0 ] then - for port in ${port_list} + for port in ${adb_portlist} do - uci_add firewall "redirect" "adblock_dns_${port}" - uci_set firewall "adblock_dns_${port}" "name" "Adblock DNS, port ${port}" - uci_set firewall "adblock_dns_${port}" "src" "lan" - uci_set firewall "adblock_dns_${port}" "proto" "tcp udp" - uci_set firewall "adblock_dns_${port}" "src_dport" "${port}" - uci_set firewall "adblock_dns_${port}" "dest_port" "${port}" - uci_set firewall "adblock_dns_${port}" "target" "DNAT" + if [ -z "$(printf "%s" "${fwcfg}" | grep -Fo -m1 "adblock_dns_${port}")" ] + then + uci -q batch <<-EOC + set firewall."adblock_dns_${port}"="redirect" + set firewall."adblock_dns_${port}".name="Adblock DNS, port ${port}" + set firewall."adblock_dns_${port}".src="lan" + set firewall."adblock_dns_${port}".proto="tcp udp" + set firewall."adblock_dns_${port}".src_dport="${port}" + set firewall."adblock_dns_${port}".dest_port="${port}" + set firewall."adblock_dns_${port}".target="DNAT" + EOC + fi done - elif [ -n "$(uci_get firewall adblock_dns_53)" ] && ([ ${adb_enabled} -eq 0 ] || [ ${adb_forcedns} -eq 0 ]) + elif [ "${adb_enabled}" -eq 0 ] || [ "${adb_forcedns}" -eq 0 ] then - for port in ${port_list} + for port in ${adb_portlist} do - uci_remove firewall "adblock_dns_${port}" + if [ -n "$(printf "%s" "${fwcfg}" | grep -Fo -m1 "adblock_dns_${port}")" ] + then + uci_remove firewall "adblock_dns_${port}" + fi done fi - f_uci "${uci_config}" + f_uci "${config}" } -# restart of the dns backend +# restart dns backend # f_dnsup() { - local dns_up cache_util cache_rc cnt=0 + local dns_service dns_up dns_pid dns_procfile restart_rc cnt=0 out_rc=4 in_rc="${1:-0}" - if [ ${adb_dnsflush} -eq 0 ] && [ ${adb_enabled} -eq 1 ] && [ "${adb_rc}" -eq 0 ] + if [ "${adb_dns}" = "raw" ] || { [ "${in_rc}" -eq 0 ] && [ "${adb_dnsinotify}" -eq 1 ]; } then - case "${adb_dns}" in - dnsmasq) - killall -q -HUP "${adb_dns}" - cache_rc=${?} - ;; - unbound) - cache_util="$(command -v unbound-control)" - if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -f "${adb_dnsdir}"/unbound.conf ] - then - "${cache_util}" -c "${adb_dnsdir}"/unbound.conf dump_cache > "${adb_tmpdir}"/adb_cache.dump 2>/dev/null - fi - "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1 - ;; - kresd) - cache_util="keep_cache" - "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1 - cache_rc=${?} - ;; - named) - cache_util="$(command -v rndc)" - if [ -x "${cache_util}" ] && [ -f /etc/bind/rndc.conf ] - then - "${cache_util}" -c /etc/bind/rndc.conf reload >/dev/null 2>&1 - cache_rc=${?} - else - "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1 - fi - ;; - *) - "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1 - ;; - esac + out_rc=0 else "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1 + restart_rc="${?}" fi - - adb_rc=1 - while [ ${cnt} -le 10 ] - do - dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")" - if [ "${dns_up}" = "true" ] - then - case "${adb_dns}" in - unbound) - cache_util="$(command -v unbound-control)" - if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -s "${adb_tmpdir}"/adb_cache.dump ] + if [ "${restart_rc}" = "0" ] + then + while [ "${cnt}" -le "${adb_dnstimeout}" ] + do + dns_service="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}")" + dns_up="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")" + dns_pid="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.pid")" + dns_procfile="$(ls -l "/proc/${dns_pid}/fd" 2>/dev/null | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" + if [ "${dns_up}" = "true" ] && [ -n "${dns_pid}" ] && [ -z "${dns_procfile}" ] + then + if [ -x "${adb_lookupcmd}" ] && [ "${adb_lookupdomain}" != "false" ] + then + "${adb_lookupcmd}" "${adb_lookupdomain}" >/dev/null 2>&1 + if [ "${?}" -eq 0 ] then - while [ ${cnt} -le 10 ] - do - "${cache_util}" -c "${adb_dnsdir}"/unbound.conf load_cache < "${adb_tmpdir}"/adb_cache.dump >/dev/null 2>&1 - cache_rc=${?} - if [ ${cache_rc} -eq 0 ] - then - break - fi - cnt=$((cnt+1)) - sleep 1 - done + out_rc=0 + break fi - ;; - esac - adb_rc=0 - break - fi - cnt=$((cnt+1)) - sleep 1 - done - f_log "debug" "f_dnsup::: cache_util: ${cache_util:-"-"}, cache_rc: ${cache_rc:-"-"}, cache_flush: ${adb_dnsflush}, cache_cnt: ${cnt}, rc: ${adb_rc}" - return ${adb_rc} + else + sleep ${adb_dnstimeout} + cnt=${adb_dnstimeout} + out_rc=0 + break + fi + fi + cnt=$((cnt+1)) + sleep 1 + done + fi + f_log "debug" "f_dnsup ::: lookup_util: ${adb_lookupcmd:-"-"}, lookup_domain: ${adb_lookupdomain:-"-"}, restart_rc: ${restart_rc:-"-"}, dns_timeout: ${adb_dnstimeout}, dns_cnt: ${cnt}, in_rc: ${in_rc}, out_rc: ${out_rc}" + return "${out_rc}" } # backup/restore/remove blocklists # f_list() { - local file mode="${1}" in_rc="${adb_rc}" + local hold file rset item array safe_url safe_ips safe_cname safe_domains out_rc mode="${1}" src_name="${2:-"${src_name}"}" in_rc="${src_rc:-0}" cnt=1 ffiles="-maxdepth 1 -name ${adb_dnsprefix}.*.gz" case "${mode}" in - backup) - if [ -d "${adb_backupdir}" ] + "blacklist"|"whitelist") + src_name="${mode}" + if [ "${src_name}" = "blacklist" ] && [ -s "${adb_blacklist}" ] then - gzip -cf "${adb_tmpfile}" 2>/dev/null > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" - adb_rc=${?} - fi - ;; - restore) - if [ -d "${adb_backupdir}" ] && [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ] + rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}" + "${adb_awk}" "${rset}" "${adb_blacklist}" | \ + "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${adb_tmpdir}/tmp.raw.${src_name}" + sort ${adb_srtopts} -u "${adb_tmpdir}/tmp.raw.${src_name}" 2>/dev/null > "${adb_tmpfile}.${src_name}" + out_rc="${?}" + rm -f "${adb_tmpdir}/tmp.raw.${src_name}" + elif [ "${src_name}" = "whitelist" ] && [ -s "${adb_whitelist}" ] then - gunzip -cf "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null > "${adb_tmpfile}" - adb_rc=${?} - fi - ;; - remove) - if [ -d "${adb_backupdir}" ] - then - rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" - fi - adb_rc=${?} - ;; - merge) - for file in "${adb_tmpfile}".* - do - cat "${file}" 2>/dev/null >> "${adb_tmpdir}/${adb_dnsfile}" - if [ ${?} -ne 0 ] + rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}" + "${adb_awk}" "${rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw.${src_name}" + out_rc="${?}" + if [ "${out_rc}" -eq 0 ] then - adb_rc=${?} - break + rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^(|.*\\\\.)\"\$1\"$\")}" + "${adb_awk}" "${rset}" "${adb_tmpdir}/tmp.raw.${src_name}" > "${adb_tmpdir}/tmp.rem.${src_name}" + out_rc="${?}" + if [ "${out_rc}" -eq 0 ] && [ "${adb_dnsallow}" != "1" ] + then + eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw.${src_name}" > "${adb_tmpdir}/tmp.add.${src_name}" + out_rc="${?}" + if [ "${out_rc}" -eq 0 ] && [ "${adb_jail}" = "1" ] && [ "${adb_dnsstop}" != "0" ] + then + > "${adb_jaildir}/${adb_dnsjail}" + if [ -n "${adb_dnsheader}" ] + then + printf "${adb_dnsheader}" >> "${adb_jaildir}/${adb_dnsjail}" + fi + cat "${adb_tmpdir}/tmp.add.${src_name}" >> "${adb_jaildir}/${adb_dnsjail}" + printf "%s\n" "${adb_dnsstop}" >> "${adb_jaildir}/${adb_dnsjail}" + fi + fi fi - rm -f "${file}" - done - adb_tmpfile="${adb_tmpdir}/${adb_dnsfile}" + fi ;; - final) - > "${adb_dnsdir}/${adb_dnsfile}" - - if [ -s "${adb_tmpdir}/tmp.add_whitelist" ] + "safesearch") + case "${src_name}" in + "google") + rset="/^(\\.[[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{printf \"%s\n%s\n\",tolower(\"www\"\$1),tolower(substr(\$1,2,length(\$1)))}" + safe_url="https://www.google.com/supported_domains" + safe_ips="216.239.38.120 2001:4860:4802:32::78" + safe_cname="forcesafesearch.google.com" + safe_domains="${adb_tmpdir}/tmp.load.safesearch.${src_name}" + if [ "${adb_backup}" -eq 1 ] && [ -s "${adb_backupdir}/safesearch.${src_name}.gz" ] + then + zcat "${adb_backupdir}/safesearch.${src_name}.gz" > "${safe_domains}" + out_rc="${?}" + else + "${adb_fetchutil}" ${adb_fetchparm} "${safe_domains}" "${safe_url}" 2>/dev/null + out_rc="${?}" + if [ "${adb_backup}" -eq 1 ] && [ "${out_rc}" -eq 0 ] + then + gzip -cf "${safe_domains}" > "${adb_backupdir}/safesearch.${src_name}.gz" + fi + fi + if [ "${out_rc}" -eq 0 ] + then + "${adb_awk}" "${rset}" "${safe_domains}" > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" + out_rc="${?}" + fi + ;; + "bing") + safe_ips="204.79.197.220 ::FFFF:CC4F:C5DC" + safe_cname="strict.bing.com" + safe_domains="www.bing.com" + printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" + out_rc="${?}" + ;; + "duckduckgo") + safe_ips="50.16.250.179 54.208.102.2 52.204.96.252" + safe_cname="safe.duckduckgo.com" + safe_domains="duckduckgo.com" + printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" + out_rc="${?}" + ;; + "pixabay") + safe_ips="104.18.82.97 2606:4700::6812:8d57 2606:4700::6812:5261" + safe_cname="safesearch.pixabay.com" + safe_domains="pixabay.com" + printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" + out_rc="${?}" + ;; + "yandex") + safe_ips="213.180.193.56" + safe_cname="familysearch.yandex.ru" + safe_domains="ya.ru yandex.ru yandex.com yandex.com.tr yandex.ua yandex.by yandex.ee yandex.lt yandex.lv yandex.md yandex.uz yandex.tm yandex.tj yandex.az" + printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" + out_rc="${?}" + ;; + "youtube") + if [ "${adb_safesearchmod}" -eq 0 ] + then + safe_ips="216.239.38.120 2001:4860:4802:32::78" + safe_cname="restrict.youtube.com" + else + safe_ips="216.239.38.119 2001:4860:4802:32::77" + safe_cname="restrictmoderate.youtube.com" + fi + safe_domains="www.youtube.com m.youtube.com youtubei.googleapis.com youtube.googleapis.com www.youtube-nocookie.com" + printf "%s\n" ${safe_domains} > "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" + out_rc="${?}" + ;; + esac + if [ "${out_rc}" -eq 0 ] then - cat "${adb_tmpdir}/tmp.add_whitelist" >> "${adb_dnsdir}/${adb_dnsfile}" + > "${adb_tmpdir}/tmp.safesearch.${src_name}" + if [ "${adb_dns}" = "named" ] + then + array="${safe_cname}" + else + array="${safe_ips}" + fi + for item in ${array} + do + eval "${adb_dnssafesearch}" "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" >> "${adb_tmpdir}/tmp.safesearch.${src_name}" + if [ "${?}" -ne 0 ] + then + rm -f "${adb_tmpdir}/tmp.safesearch.${src_name}" + break + fi + done + out_rc="${?}" + rm -f "${adb_tmpdir}/tmp.raw.safesearch.${src_name}" fi - - if [ -s "${adb_tmpdir}/tmp.rem_whitelist" ] + ;; + "backup") + ( + gzip -cf "${src_tmpfile}" > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" + out_rc="${?}" + )& + ;; + "restore") + if [ -n "${src_name}" ] && [ -s "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ] then - grep -vf "${adb_tmpdir}/tmp.rem_whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" >> "${adb_dnsdir}/${adb_dnsfile}" + zcat "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" > "${src_tmpfile}" + out_rc="${?}" + elif [ -z "${src_name}" ] + then + for file in "${adb_backupdir}/${adb_dnsprefix}".*.gz + do + if [ -r "${file}" ] + then + name="${file##*/}" + name="${name%.*}" + zcat "${file}" > "${adb_tmpfile}.${name}" & + hold=$((cnt%adb_maxqueue)) + if [ "${hold}" -eq 0 ] + then + wait + fi + cnt=$((cnt+1)) + fi + done + wait + out_rc="${?}" else - eval "${adb_dnsdeny}" "${adb_tmpdir}/${adb_dnsfile}" >> "${adb_dnsdir}/${adb_dnsfile}" + out_rc=4 fi - - if [ ${?} -eq 0 ] && [ -n "${adb_dnsheader}" ] + if [ "${adb_action}" != "start" ] && [ "${adb_action}" != "resume" ] && [ -n "${src_name}" ] && [ "${out_rc}" -ne 0 ] then - printf '%s\n' "${adb_dnsheader}" | cat - "${adb_dnsdir}/${adb_dnsfile}" > "${adb_tmpdir}/${adb_dnsfile}" - mv -f "${adb_tmpdir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}" + adb_sources="${adb_sources/${src_name}}" fi - adb_rc=${?} + ;; + "remove") + if [ "${adb_backup}" -eq 1 ] + then + rm "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null + fi + out_rc="${?}" + adb_sources="${adb_sources/${src_name}}" + ;; + "merge") + if [ "${adb_backup}" -eq 1 ] + then + for src_name in ${adb_sources} + do + ffiles="${ffiles} -a ! -name ${adb_dnsprefix}.${src_name}.gz" + done + if [ "${adb_safesearch}" -eq 1 ] && [ "${adb_dnssafesearch}" != "0" ] + then + ffiles="${ffiles} -a ! -name safesearch.google.gz" + fi + find "${adb_backupdir}" ${ffiles} -print0 2>/dev/null | xargs -0 rm 2>/dev/null + fi + unset src_name + sort ${adb_srtopts} -mu "${adb_tmpfile}".* 2>/dev/null > "${adb_tmpdir}/${adb_dnsfile}" + out_rc="${?}" + rm -f "${adb_tmpfile}".* + ;; + "final") + unset src_name + if [ -n "${adb_dnsheader}" ] + then + printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" + else + > "${adb_dnsdir}/${adb_dnsfile}" + fi + if [ -s "${adb_tmpdir}/tmp.add.whitelist" ] + then + cat "${adb_tmpdir}/tmp.add.whitelist" >> "${adb_dnsdir}/${adb_dnsfile}" + fi + for file in "${adb_tmpdir}/tmp.safesearch".* + do + if [ -r "${file}" ] + then + cat "${file}" >> "${adb_dnsdir}/${adb_dnsfile}" + fi + done + if [ "${adb_dnsdeny}" != "0" ] + then + eval "${adb_dnsdeny}" "${adb_tmpdir}/${adb_dnsfile}" >> "${adb_dnsdir}/${adb_dnsfile}" + else + mv "${adb_tmpdir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}" + fi + out_rc="${?}" ;; esac - f_count "${mode}" - f_log "debug" "f_list ::: name: ${src_name:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, in_rc: ${in_rc}, out_rc: ${adb_rc}" + f_count "${mode}" "${src_name}" + out_rc="${out_rc:-"${in_rc}"}" + f_log "debug" "f_list ::: name: ${src_name:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, in_rc: ${in_rc}, out_rc: ${out_rc}" + return "${out_rc}" } # top level domain compression # f_tld() { - local cnt cnt_srt cnt_tld source="${1}" temp="${1}.tld" + local cnt cnt_tld source="${1}" temp_tld="${1}.tld" - cnt="$(wc -l 2>/dev/null < "${source}")" - awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${source}" > "${temp}" - if [ ${?} -eq 0 ] + "${adb_awk}" '{if(NR==1){tld=$NF};while(getline){if(index($NF,tld".")==0){print tld;tld=$NF}}print tld}' "${source}" | \ + "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${temp_tld}" + if [ "${?}" -eq 0 ] then - sort -u "${temp}" > "${source}" - if [ ${?} -eq 0 ] - then - cnt_srt="$(wc -l 2>/dev/null < "${source}")" - awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "${source}" > "${temp}" - if [ ${?} -eq 0 ] - then - awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${temp}" > "${source}" - if [ ${?} -eq 0 ] - then - cnt_tld="$(wc -l 2>/dev/null < "${source}")" - else - mv -f "${temp}" > "${source}" - fi - fi - else - mv -f "${temp}" "${source}" - fi + mv -f "${temp_tld}" "${source}" + cnt_tld="$(wc -l 2>/dev/null < "${source}")" + else + rm -f "${temp_tld}" fi - f_log "debug" "f_tld ::: source: ${source}, cnt: ${cnt:-"-"}, cnt_srt: ${cnt_srt:-"-"}, cnt_tld: ${cnt_tld:-"-"}" -} - -# blocklist hash compare -# -f_hash() -{ - local hash hash_rc=1 - - if [ -x "${adb_hashutil}" ] && [ -f "${adb_dnsdir}/${adb_dnsfile}" ] - then - hash="$(${adb_hashutil} "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null | awk '{print $1}')" - if [ -z "${adb_hashold}" ] && [ -n "${hash}" ] - then - adb_hashold="${hash}" - elif [ -z "${adb_hashnew}" ] && [ -n "${hash}" ] - then - adb_hashnew="${hash}" - fi - if [ -n "${adb_hashold}" ] && [ -n "${adb_hashnew}" ] - then - if [ "${adb_hashold}" = "${adb_hashnew}" ] - then - hash_rc=0 - fi - adb_hashold="" - adb_hashnew="" - fi - fi - f_log "debug" "f_hash ::: hash_util: ${adb_hashutil}, hash: ${hash}, out_rc: ${hash_rc}" - return ${hash_rc} + f_log "debug" "f_tld ::: source: ${source}, cnt: ${adb_cnt:-"-"}, cnt_tld: ${cnt_tld:-"-"}" } # suspend/resume adblock processing # f_switch() { - local mode="${1}" + local status entry done="false" mode="${1}" - if [ ! -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "suspend" ] + json_load_file "${adb_rtfile}" >/dev/null 2>&1 + json_select "data" >/dev/null 2>&1 + json_get_var status "adblock_status" + if [ "${mode}" = "suspend" ] && [ "${status}" = "enabled" ] then - f_hash - cat "${adb_dnsdir}/${adb_dnsfile}" > "${adb_dnsdir}/.${adb_dnsfile}" - printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" - f_hash - elif [ -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "resume" ] + f_env + printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" + f_count + done="true" + elif [ "${mode}" = "resume" ] && [ "${status}" = "paused" ] then - f_hash - cat "${adb_dnsdir}/.${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}" - > "${adb_dnsdir}/.${adb_dnsfile}" - f_hash + f_env + f_main + done="true" fi - if [ ${?} -eq 1 ] + if [ "${done}" = "true" ] then - f_temp - f_dnsup + if [ "${mode}" = "suspend" ] + then + f_bgserv "stop" + f_dnsup + fi + if [ "${mode}" = "resume" ] + then + f_bgserv "start" + fi f_jsnup "${mode}" f_log "info" "${mode} adblock processing" - f_rmtemp - exit 0 fi + f_rmtemp } # query blocklist for certain (sub-)domains # f_query() { - local search result prefix suffix field domain="${1}" tld="${1#*.}" + local search result prefix suffix field query_start query_end query_timeout=30 domain="${1}" tld="${1#*.}" if [ -z "${domain}" ] || [ "${domain}" = "${tld}" ] then - printf '%s\n' "::: invalid domain input, please submit a single domain, e.g. 'doubleclick.net'" + printf "%s\\n" "::: invalid input, please submit a single (sub-)domain :::" else case "${adb_dns}" in - dnsmasq) - prefix=".*[\/\.]" - suffix="(\/)" + "dnsmasq") + prefix=".*[\\/\\.]" + suffix="(\\/)" field=2 ;; - unbound) - prefix=".*[\"\.]" + "unbound") + prefix=".*[\"\\.]" suffix="(static)" field=3 ;; - named) - prefix="[^\*].*[\.]" - suffix="( \.)" + "named") + prefix="[^\\*].*[\\.]" + suffix="( \\.)" field=1 ;; - kresd) - prefix="[^\*].*[\.]" - suffix="( \.)" + "kresd") + prefix="[^\\*].*[\\.]" + suffix="( \\.)" field=1 ;; - dnscrypt-proxy) - prefix=".*[\.]" + "raw") + prefix=".*[\\.]" suffix="" field=1 ;; esac - while [ "${domain}" != "${tld}" ] - do - search="${domain//./\.}" - result="$(awk -F '/|\"| ' "/^($search|${prefix}+${search}.*${suffix}$)/{i++;{printf(\" + %s\n\",\$${field})};if(i>9){printf(\" + %s\n\",\"[...]\");exit}}" "${adb_dnsdir}/${adb_dnsfile}")" - printf '%s\n' "::: results for domain '${domain}'" - printf '%s\n' "${result:-" - no match"}" - domain="${tld}" - tld="${domain#*.}" - done + query_start="$(date "+%s")" + if [ "${adb_dnsfilereset}" -eq 0 ] + then + while [ "${domain}" != "${tld}" ] + do + search="${domain//[+*~%\$&\"\']/}" + search="${search//./\\.}" + result="$("${adb_awk}" -F '/|\"|\t| ' "/^(${search}|${prefix}+${search}.*${suffix})$/{i++;if(i<=9){printf \" + %s\\n\",\$${field}}else if(i==10){printf \" + %s\\n\",\"[...]\";exit}}" "${adb_dnsdir}/${adb_dnsfile}")" + printf "%s\\n%s\\n%s\\n" ":::" "::: domain '${domain}' in active blocklist" ":::" + printf "%s\\n\\n" "${result:-" - no match"}" + domain="${tld}" + tld="${domain#*.}" + done + fi + if [ "${adb_backup}" -eq 1 ] && [ -d "${adb_backupdir}" ] + then + search="${1//[+*~%\$&\"\']/}" + search="${search//./\\.}" + printf "%s\\n%s\\n%s\\n" ":::" "::: domain '${1}' in backups and black-/whitelist" ":::" + for file in "${adb_backupdir}/${adb_dnsprefix}".*.gz "${adb_blacklist}" "${adb_whitelist}" + do + suffix="${file##*.}" + if [ "${suffix}" = "gz" ] + then + zcat "${file}" 2>/dev/null | \ + "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' | "${adb_awk}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\\n\",f,\"[...]\"}};END{exit rc}" + else + "${adb_awk}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\\n\",f,\"[...]\"}};END{exit rc}" "${file}" + fi + if [ "${?}" -eq 0 ] + then + result="true" + query_end="$(date "+%s")" + if [ "$((query_end-query_start))" -gt "${query_timeout}" ] + then + printf "%s\\n\\n" " - [...]" + break + fi + fi + done + if [ "${result}" != "true" ] + then + printf "%s\\n\\n" " - no match" + fi + fi fi } @@ -701,60 +1052,82 @@ f_query() # f_jsnup() { - local run_time bg_pid status="${1:-"enabled"}" mode="normal mode" no_mail=0 + local runtime utils memory bg_pid status="${1:-"enabled"}" - if [ ${adb_rc} -gt 0 ] + case "${status}" in + "enabled"|"error") + adb_endtime="$(date "+%s")" + memory="$("${adb_awk}" '/^MemTotal|^MemFree|^MemAvailable/{ORS="/"; print int($2/1000)}' "/proc/meminfo" 2>/dev/null | "${adb_awk}" '{print substr($0,1,length($0)-1)}')" + if [ "$(( (adb_endtime-adb_starttime)/60 ))" -lt 60 ] + then + runtime="${adb_action}, $(( (adb_endtime-adb_starttime)/60 ))m $(( (adb_endtime-adb_starttime)%60 ))s, ${memory:-0}, $(date "+%d.%m.%Y %H:%M:%S")" + else + runtime="${adb_action}, n/a, ${memory:-0}, $(date "+%d.%m.%Y %H:%M:%S")" + fi + if [ "${status}" = "error" ] + then + adb_cnt=0 + fi + ;; + "suspend") + status="paused" + ;; + "resume") + status="" + ;; + esac + json_load_file "${adb_rtfile}" >/dev/null 2>&1 + json_select "data" >/dev/null 2>&1 + if [ "${?}" -eq 0 ] then - status="error" - run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")" + if [ -z "${adb_fetchutil}" ] || [ -z "${adb_awk}" ] + then + json_get_var utils "utilities" + else + utils="${adb_fetchutil}, ${adb_awk}" + fi + if [ -z "${adb_cnt}" ] + then + json_get_var adb_cnt "blocked_domains" + adb_cnt="${adb_cnt%% *}" + fi + if [ -z "${runtime}" ] + then + json_get_var runtime "last_run" + fi fi - if [ "${status}" = "enabled" ] - then - run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")" - fi - if [ "${status}" = "suspend" ] - then - status="paused" - fi - if [ "${status}" = "resume" ] - then - no_mail=1 - status="enabled" - fi - if [ ${adb_backup_mode} -eq 1 ] - then - mode="backup mode" - fi - - if [ -z "${adb_fetchinfo}" ] - then - json_get_var adb_fetchinfo "fetch_utility" - fi - if [ -z "${adb_cnt}" ] - then - json_get_var adb_cnt "overall_domains" - adb_cnt="${adb_cnt%% *}" - fi - if [ -z "${run_time}" ] - then - json_get_var run_time "last_rundate" - fi - json_add_string "adblock_status" "${status}" + > "${adb_rtfile}" + json_load_file "${adb_rtfile}" >/dev/null 2>&1 + json_init + json_add_object "data" + json_add_string "adblock_status" "${status:-"enabled"}" json_add_string "adblock_version" "${adb_ver}" - json_add_string "overall_domains" "${adb_cnt:-0} (${mode})" - json_add_string "fetch_utility" "${adb_fetchinfo:-"-"}" - json_add_string "dns_backend" "${adb_dns} (${adb_dnsdir})" - json_add_string "last_rundate" "${run_time:-"-"}" - json_add_string "system_release" "${adb_sysver}" + json_add_string "blocked_domains" "${adb_cnt:-0}" + json_add_array "active_sources" + for entry in ${adb_sources} + do + json_add_object + json_add_string "source" "${entry}" + json_close_object + done + json_close_array + json_add_string "dns_backend" "${adb_dns:-"-"}, ${adb_dnsdir:-"-"}" + json_add_string "run_utils" "${utils:-"-"}" + json_add_string "run_ifaces" "trigger: ${adb_trigger:-"-"}, report: ${adb_repiface:-"-"}" + json_add_string "run_directories" "base: ${adb_tmpbase}, backup: ${adb_backupdir}, report: ${adb_reportdir}, jail: ${adb_jaildir}" + json_add_string "run_flags" "backup: ${adb_backup}, reset: ${adb_dnsfilereset}, flush: ${adb_dnsflush}, force: ${adb_forcedns}, search: ${adb_safesearch}, report: ${adb_report}, mail: ${adb_mail}, jail: ${adb_jail}" + json_add_string "last_run" "${runtime:-"-"}" + json_add_string "system" "${adb_sysver}" + json_close_object json_dump > "${adb_rtfile}" - if [ ${adb_notify} -eq 1 ] && [ ${no_mail} -eq 0 ] && [ -x /etc/adblock/adblock.notify ] && \ - ([ "${status}" = "error" ] || ([ "${status}" = "enabled" ] && [ ${adb_cnt} -le ${adb_notifycnt} ])) + if [ "${adb_mail}" -eq 1 ] && [ -x "${adb_mailservice}" ] && \ + { [ "${status}" = "error" ] || { [ "${status}" = "enabled" ] && [ "${adb_cnt}" -le "${adb_mailcnt}" ]; } } then - (/etc/adblock/adblock.notify >/dev/null 2>&1) & - bg_pid=${!} + ( "${adb_mailservice}" "${adb_ver}" >/dev/null 2>&1 )& + bg_pid="${!}" fi - f_log "debug" "f_jsnup::: status: ${status}, mode: ${mode}, cnt: ${adb_cnt}, notify: ${adb_notify}, notify_cnt: ${adb_notifycnt}, notify_pid: ${bg_pid:-"-"}" + f_log "debug" "f_jsnup ::: status: ${status:-"-"}, cnt: ${adb_cnt}, mail: ${adb_mail}, mail_service: ${adb_mailservice}, mail_cnt: ${adb_mailcnt}, mail_pid: ${bg_pid:-"-"}" } # write to syslog @@ -763,80 +1136,95 @@ f_log() { local class="${1}" log_msg="${2}" - if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${adb_debug} -eq 1 ]) + if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${adb_debug}" -eq 1 ]; } then - logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}" + if [ -x "${adb_loggercmd}" ] + then + "${adb_loggercmd}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}" + else + printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}" + fi if [ "${class}" = "err" ] then f_rmdns - f_jsnup - logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'" + f_bgserv "stop" + f_jsnup "error" exit 1 fi fi } +# start ubus monitor service to trace dns backend events +# +f_bgserv() +{ + local bg_pid status="${1}" + + bg_pid="$(pgrep -f "^/bin/sh ${adb_ubusservice}.*|^/bin/ubus -S -M r -m invoke monitor|^grep -qF \"method\":\"set\",\"data\":\\{\"name\":\"${adb_dns}\"" | "${adb_awk}" '{ORS=" "; print $1}')" + if [ "${adb_dns}" != "raw" ] && [ -z "${bg_pid}" ] && [ "${status}" = "start" ] \ + && [ -x "${adb_ubusservice}" ] && [ "${adb_dnsfilereset}" -eq 1 ] + then + ( "${adb_ubusservice}" "${adb_ver}" & ) + elif [ -n "${bg_pid}" ] && [ "${status}" = "stop" ] + then + kill -HUP "${bg_pid}" 2>/dev/null + fi + f_log "debug" "f_bgserv ::: status: ${status:-"-"}, bg_pid: ${bg_pid:-"-"}, dns_filereset: ${adb_dnsfilereset:-"-"}, ubus_service: ${adb_ubusservice:-"-"}" +} + # main function for blocklist processing # f_main() { - local tmp_load tmp_file src_name src_rset src_url src_log src_arc src_cat cat list entry suffix mem_total mem_free enabled cnt=1 + local src_tmpload src_tmpfile src_name src_rset src_url src_log src_arc src_cat src_item src_list src_entries src_suffix src_rc entry keylist memory cnt=1 - mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)" - mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)" - tmp_load="${adb_tmpload}" - tmp_file="${adb_tmpfile}" - > "${adb_dnsdir}/.${adb_dnsfile}" - > "${adb_tmpdir}/tmp.raw_whitelist" - > "${adb_tmpdir}/tmp.add_whitelist" - > "${adb_tmpdir}/tmp.rem_whitelist" - f_log "debug" "f_main ::: dns: ${adb_dns}, fetch_util: ${adb_fetchinfo}, backup: ${adb_backup}, backup_mode: ${adb_backup_mode}, dns_jail: ${adb_jail}, force_srt: ${adb_forcesrt}, force_dns: ${adb_forcedns}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${adb_maxqueue}" + memory="$("${adb_awk}" '/^MemTotal|^MemFree|^MemAvailable/{ORS="/"; print int($2/1000)}' "/proc/meminfo" 2>/dev/null | "${adb_awk}" '{print substr($0,1,length($0)-1)}')" + f_log "debug" "f_main ::: memory: ${memory:-0}, max_queue: ${adb_maxqueue}, safe_search: ${adb_safesearch}, force_dns: ${adb_forcedns}, awk: ${adb_awk}" - # prepare whitelist entries + # white- and blacklist preparation # - if [ -s "${adb_whitelist}" ] - then - adb_whitelist_rset="/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}" - awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw_whitelist" - f_tld "${adb_tmpdir}/tmp.raw_whitelist" + for entry in ${adb_locallist} + do + ( f_list "${entry}" "${entry}" )& + done - adb_whitelist_rset="/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\.\",\"\\\.\",\$1);print tolower(\"^\"\$1\"\\\|\\\.\"\$1)}" - awk "${adb_whitelist_rset}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.rem_whitelist" - - if [ -n "${adb_dnsallow}" ] - then - eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.add_whitelist" - fi - fi - - # build 'dnsjail' list + # safe search preparation # - if [ ${adb_jail} -eq 1 ] + if [ "${adb_safesearch}" -eq 1 ] && [ "${adb_dnssafesearch}" != "0" ] then - cat "${adb_tmpdir}/tmp.add_whitelist" > "/tmp/${adb_dnsjail}" - printf '%s\n' "${adb_dnshalt}" >> "/tmp/${adb_dnsjail}" - if [ -n "${adb_dnsheader}" ] + if [ -z "${adb_safesearchlist}" ] then - printf '%s\n' "${adb_dnsheader}" | cat - "/tmp/${adb_dnsjail}" > "${adb_tmpdir}/tmp.dnsjail" - cat "${adb_tmpdir}/tmp.dnsjail" > "/tmp/${adb_dnsjail}" + adb_safesearchlist="google bing duckduckgo pixabay yandex youtube" fi + for entry in ${adb_safesearchlist} + do + ( f_list safesearch "${entry}" )& + done fi + wait # main loop # for src_name in ${adb_sources} do - enabled="$(eval printf '%s' \"\${enabled_${src_name}\}\")" - src_url="$(eval printf '%s' \"\${adb_src_${src_name}\}\")" - src_rset="$(eval printf '%s' \"\${adb_src_rset_${src_name}\}\")" - src_cat="$(eval printf '%s' \"\${adb_src_cat_${src_name}\}\")" - adb_tmpload="${tmp_load}.${src_name}" - adb_tmpfile="${tmp_file}.${src_name}" + json_select "${src_name}" >/dev/null 2>&1 + if [ "${?}" -ne 0 ] + then + adb_sources="${adb_sources/${src_name}}" + continue + fi + json_get_var src_url "url" >/dev/null 2>&1 + json_get_var src_rset "rule" >/dev/null 2>&1 + json_get_values src_cat "categories" >/dev/null 2>&1 + json_select .. + src_tmpload="${adb_tmpload}.${src_name}.load" + src_tmpsort="${adb_tmpload}.${src_name}.sort" + src_tmpfile="${adb_tmpfile}.${src_name}" + src_rc=4 # basic pre-checks # - f_log "debug" "f_main ::: name: ${src_name}, enabled: ${enabled}" - if [ "${enabled}" != "1" ] || [ -z "${src_url}" ] || [ -z "${src_rset}" ] + if [ -z "${src_url}" ] || [ -z "${src_rset}" ] then f_list remove continue @@ -844,225 +1232,427 @@ f_main() # backup mode # - if [ ${adb_backup_mode} -eq 1 ] && [ "${adb_action}" = "start" ] && [ "${src_name}" != "blacklist" ] + if [ "${adb_backup}" -eq 1 ] && { [ "${adb_action}" = "start" ] || [ "${adb_action}" = "resume" ]; } then f_list restore - if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ] + if [ "${?}" -eq 0 ] && [ -s "${src_tmpfile}" ] then - if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ] - then - f_tld "${adb_tmpfile}" - fi continue fi fi # download queue processing # - if [ "${src_name}" = "blacklist" ] - then - if [ -s "${src_url}" ] - then - ( - src_log="$(cat "${src_url}" > "${adb_tmpload}" 2>&1)" - adb_rc=${?} - if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ] - then - awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}" - adb_rc=${?} - if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ] - then - rm -f "${adb_tmpload}" - f_list download - if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ] - then - f_tld "${adb_tmpfile}" - fi - fi - else - src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')" - f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}" - fi - ) & - else - continue - fi - elif [ -n "${src_cat}" ] + if [ -n "${src_cat}" ] then ( src_arc="${adb_tmpdir}/${src_url##*/}" src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${src_arc}" "${src_url}" 2>&1)" - adb_rc=${?} - if [ ${adb_rc} -eq 0 ] && [ -s "${src_arc}" ] + src_rc="${?}" + if [ "${src_rc}" -eq 0 ] && [ -s "${src_arc}" ] then - list="$(tar -tzf "${src_arc}")" - suffix="$(eval printf '%s' \"\${adb_src_suffix_${src_name}:-\"domains\"\}\")" - for cat in ${src_cat} + unset src_entries + src_suffix="$(eval printf "%s" \"\$\{adb_src_suffix_${src_name}:-\"domains\"\}\")" + src_list="$(tar -tzf "${src_arc}" 2>/dev/null)" + for src_item in ${src_cat} do - entry="$(printf '%s' "${list}" | grep -E "[\^/]+${cat}/${suffix}")" - if [ -n "${entry}" ] - then - tar -xOzf "${src_arc}" "${entry}" >> "${adb_tmpload}" - adb_rc=${?} - if [ ${adb_rc} -ne 0 ] - then - break - fi - fi + src_entries="${src_entries} $(printf "%s" "${src_list}" | grep -E "${src_item}/${src_suffix}$")" done - else - src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')" - f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}" - fi - if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ] - then - rm -f "${src_arc}" - awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}" - adb_rc=${?} - if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ] + if [ -n "${src_entries}" ] + then + tar -xOzf "${src_arc}" ${src_entries} 2>/dev/null > "${src_tmpload}" + src_rc="${?}" + fi + rm -f "${src_arc}" + else + src_log="$(printf "%s" "${src_log}" | "${adb_awk}" '{ORS=" ";print $0}')" + f_log "info" "download of '${src_name}' failed, url: ${src_url}, rule: ${src_rset:-"-"}, categories: ${src_cat:-"-"}, rc: ${src_rc}, log: ${src_log:-"-"}" + fi + if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpload}" ] + then + if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ] + then + "${adb_awk}" "${src_rset}" "${src_tmpload}" | sed "s/\r//g" | \ + grep -Evf "${adb_tmpdir}/tmp.rem.whitelist" | "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" + else + "${adb_awk}" "${src_rset}" "${src_tmpload}" | sed "s/\r//g" | \ + "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" + fi + rm -f "${src_tmpload}" + sort ${adb_srtopts} -u "${src_tmpsort}" 2>/dev/null > "${src_tmpfile}" + src_rc="${?}" + rm -f "${src_tmpsort}" + if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpfile}" ] then - rm -f "${adb_tmpload}" f_list download - if [ ${adb_backup} -eq 1 ] + if [ "${adb_backup}" -eq 1 ] then f_list backup fi - if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ] - then - f_tld "${adb_tmpfile}" - fi - elif [ ${adb_backup} -eq 1 ] + elif [ "${adb_backup}" -eq 1 ] && [ "${adb_action}" != "start" ] then + f_log "info" "archive preparation of '${src_name}' failed, categories: ${src_cat:-"-"}, entries: ${src_entries}, rc: ${src_rc}" f_list restore + rm -f "${src_tmpfile}" fi - elif [ ${adb_backup} -eq 1 ] + elif [ "${adb_backup}" -eq 1 ] && [ "${adb_action}" != "start" ] then + f_log "info" "archive extraction of '${src_name}' failed, categories: ${src_cat:-"-"}, entries: ${src_entries}, rc: ${src_rc}" f_list restore fi - ) & + )& + continue else ( - src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${adb_tmpload}" "${src_url}" 2>&1)" - adb_rc=${?} - if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ] + src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${src_tmpload}" "${src_url}" 2>&1)" + src_rc="${?}" + if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpload}" ] then - awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}" - adb_rc=${?} - if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ] + if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ] + then + "${adb_awk}" "${src_rset}" "${src_tmpload}" | sed "s/\r//g" | \ + grep -Evf "${adb_tmpdir}/tmp.rem.whitelist" | "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" + else + "${adb_awk}" "${src_rset}" "${src_tmpload}" | sed "s/\r//g" | \ + "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" + fi + rm -f "${src_tmpload}" + sort ${adb_srtopts} -u "${src_tmpsort}" 2>/dev/null > "${src_tmpfile}" + src_rc="${?}" + rm -f "${src_tmpsort}" + if [ "${src_rc}" -eq 0 ] && [ -s "${src_tmpfile}" ] then - rm -f "${adb_tmpload}" f_list download - if [ ${adb_backup} -eq 1 ] + if [ "${adb_backup}" -eq 1 ] then f_list backup fi - if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ] - then - f_tld "${adb_tmpfile}" - fi - elif [ ${adb_backup} -eq 1 ] + elif [ "${adb_backup}" -eq 1 ] && [ "${adb_action}" != "start" ] then + f_log "info" "preparation of '${src_name}' failed, rc: ${src_rc}" f_list restore + rm -f "${src_tmpfile}" fi else - src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')" - f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}" - if [ ${adb_backup} -eq 1 ] + src_log="$(printf "%s" "${src_log}" | "${adb_awk}" '{ORS=" ";print $0}')" + f_log "info" "download of '${src_name}' failed, url: ${src_url}, rule: ${src_rset:-"-"}, categories: ${src_cat:-"-"}, rc: ${src_rc}, log: ${src_log:-"-"}" + if [ "${adb_backup}" -eq 1 ] && [ "${adb_action}" != "start" ] then f_list restore fi fi - ) & + )& fi - hold=$(( cnt % adb_maxqueue )) - if [ ${hold} -eq 0 ] + hold=$((cnt%adb_maxqueue)) + if [ "${hold}" -eq 0 ] then wait fi - cnt=$(( cnt + 1 )) + cnt=$((cnt+1)) done - - # list merge - # wait - src_name="overall" - adb_tmpfile="${tmp_file}" f_list merge - # overall sort and conditional dns restart + # tld compression and dns restart # - f_hash - if [ -s "${adb_tmpdir}/${adb_dnsfile}" ] + if [ "${?}" -eq 0 ] && [ -s "${adb_tmpdir}/${adb_dnsfile}" ] then - if ([ ${mem_total} -ge 64 ] && [ ${mem_free} -ge 40 ]) || [ ${adb_forcesrt} -eq 1 ] - then - f_tld "${adb_tmpdir}/${adb_dnsfile}" - fi + f_tld "${adb_tmpdir}/${adb_dnsfile}" f_list final else - > "${adb_dnsdir}/${adb_dnsfile}" + printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" fi chown "${adb_dnsuser}" "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null - f_hash - if [ ${?} -eq 1 ] + f_dnsup + if [ "${?}" -eq 0 ] then - f_dnsup - fi - f_jsnup - if [ ${?} -eq 0 ] - then - f_log "info" "blocklist with overall ${adb_cnt} domains loaded successfully (${adb_sysver})" + if [ "${adb_action}" != "resume" ] + then + f_jsnup "enabled" + fi + if [ "${adb_dns}" != "raw" ] && [ "${adb_dnsfilereset}" -eq 1 ] + then + printf "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}" + f_log "info" "blocklist with overall ${adb_cnt} blocked domains loaded successfully and reset afterwards (${adb_sysver})" + f_bgserv "start" + else + f_log "info" "blocklist with overall ${adb_cnt} blocked domains loaded successfully (${adb_sysver})" + fi else - f_log "err" "dns backend restart with active blocklist failed" + f_log "err" "dns backend restart with adblock blocklist failed" fi f_rmtemp - exit ${adb_rc} } +# trace dns queries via tcpdump and prepare a report +# +f_report() +{ + local iface bg_pid status total start end blocked percent top_list top array item index hold ports cnt=0 search="${1}" count="${2}" process="${3}" print="${4}" + + if [ "${adb_report}" -eq 1 ] && [ ! -x "${adb_dumpcmd}" ] + then + f_log "info" "Please install the package 'tcpdump' or 'tcpdump-mini' to use the reporting feature" + elif [ "${adb_report}" -eq 0 ] && [ "${adb_action}" = "report" ] + then + f_log "info" "Please enable the 'DNS Report' option to use the reporting feature" + fi + + if [ -x "${adb_dumpcmd}" ] + then + bg_pid="$(pgrep -f "^${adb_dumpcmd}.*adb_report\\.pcap$" | "${adb_awk}" '{ORS=" "; print $1}')" + if [ "${adb_report}" -eq 0 ] || { [ -n "${bg_pid}" ] && { [ "${adb_action}" = "stop" ] || [ "${adb_action}" = "restart" ]; } } + then + if [ -n "${bg_pid}" ] + then + kill -HUP "${bg_pid}" 2>/dev/null + while $(kill -0 "${bg_pid}" 2>/dev/null) + do + sleep 1 + done + unset bg_pid + fi + fi + fi + + if [ -x "${adb_dumpcmd}" ] && [ "${adb_report}" -eq 1 ] + then + if [ -z "${bg_pid}" ] && [ "${adb_action}" != "report" ] && [ "${adb_action}" != "stop" ] + then + for port in ${adb_replisten} + do + if [ -z "${ports}" ] + then + ports="port ${port}" + else + ports="${ports} or port ${port}" + fi + done + if [ -z "${adb_repiface}" ] + then + network_get_device iface "lan" + if [ -n "${iface}" ] + then + adb_repiface="${iface}" + else + network_get_physdev iface "lan" + if [ -n "${iface}" ] + then + adb_repiface="${iface}" + fi + fi + if [ -n "${adb_repiface}" ] + then + uci_set adblock global adb_repiface "${adb_repiface}" + f_uci "adblock" + fi + fi + if [ -n "${adb_reportdir}" ] && [ ! -d "${adb_reportdir}" ] + then + mkdir -p "${adb_reportdir}" + f_log "info" "report directory '${adb_reportdir}' created" + fi + if [ -n "${adb_repiface}" ] && [ -d "${adb_reportdir}" ] + then + ( "${adb_dumpcmd}" -nn -s0 -l -i ${adb_repiface} ${ports} -C${adb_repchunksize} -W${adb_repchunkcnt} -w "${adb_reportdir}/adb_report.pcap" >/dev/null 2>&1 & ) + bg_pid="$(pgrep -f "^${adb_dumpcmd}.*adb_report\\.pcap$" | "${adb_awk}" '{ORS=" "; print $1}')" + else + f_log "info" "Please set the name of the reporting network device 'adb_repiface' manually" + fi + fi + + if [ "${adb_action}" = "report" ] && [ "${process}" = "true" ] + then + > "${adb_reportdir}/adb_report.raw" + for file in "${adb_reportdir}/adb_report.pcap"* + do + ( + "${adb_dumpcmd}" -tttt -r "${file}" 2>/dev/null | \ + "${adb_awk}" -v cnt="${cnt}" '!/\.lan\. |PTR\? | SOA\? /&&/ A[\? ]+|NXDomain|0\.0\.0\.0/{a=$1;b=substr($2,0,8);c=$4;sub(/\.[0-9]+$/,"",c);d=cnt $7;sub(/\*$/,"",d); + e=$(NF-1);sub(/[0-9]\/[0-9]\/[0-9]|0\.0\.0\.0/,"NX",e);sub(/\.$/,"",e);sub(/([0-9]{1,3}\.){3}[0-9]{1,3}/,"OK",e);printf "%s\t%s\t%s\t%s\t%s\n",d,e,a,b,c}' >> "${adb_reportdir}/adb_report.raw" + )& + hold=$((cnt%adb_maxqueue)) + if [ "${hold}" -eq 0 ] + then + wait + fi + cnt=$((cnt+1)) + done + wait + if [ -s "${adb_reportdir}/adb_report.raw" ] + then + sort ${adb_srtopts} -k1 -k3 -k4 -k5 -k1 -ur "${adb_reportdir}/adb_report.raw" | \ + "${adb_awk}" '{currA=($1+0);currB=$1;currC=substr($1,length($1),1);if(reqA==currB){reqA=0;printf "%s\t%s\n",d,$2}else if(currC=="+"){reqA=currA;d=$3"\t"$4"\t"$5"\t"$2}}' | \ + sort ${adb_srtopts} -k1 -k2 -k3 -k4 -ur > "${adb_reportdir}/adb_report.srt" + rm -f "${adb_reportdir}/adb_report.raw" + fi + + if [ -s "${adb_reportdir}/adb_report.srt" ] + then + start="$("${adb_awk}" 'END{printf "%s_%s",$1,$2}' "${adb_reportdir}/adb_report.srt")" + end="$("${adb_awk}" 'NR==1{printf "%s_%s",$1,$2}' "${adb_reportdir}/adb_report.srt")" + total="$(wc -l < "${adb_reportdir}/adb_report.srt")" + blocked="$("${adb_awk}" '{if($5=="NX")cnt++}END{printf "%s",cnt}' "${adb_reportdir}/adb_report.srt")" + percent="$("${adb_awk}" -v t="${total}" -v b="${blocked}" 'BEGIN{printf "%.2f%s",b/t*100,"%"}')" + > "${adb_reportdir}/adb_report.json" + printf "%s" "{ \"data\": { " >> "${adb_reportdir}/adb_report.json" + printf "%s" "\"start_date\": \"${start%_*}\", " >> "${adb_reportdir}/adb_report.json" + printf "%s" "\"start_time\": \"${start#*_}\", " >> "${adb_reportdir}/adb_report.json" + printf "%s" "\"end_date\": \"${end%_*}\", " >> "${adb_reportdir}/adb_report.json" + printf "%s" "\"end_time\": \"${end#*_}\", " >> "${adb_reportdir}/adb_report.json" + printf "%s" "\"total\": \"${total}\", " >> "${adb_reportdir}/adb_report.json" + printf "%s" "\"blocked\": \"${blocked}\", " >> "${adb_reportdir}/adb_report.json" + printf "%s" "\"percent\": \"${percent}\", " >> "${adb_reportdir}/adb_report.json" + + top_list="top_clients top_domains top_blocked" + for top in ${top_list} + do + printf "%s" " \"${top}\": [ " >> "${adb_reportdir}/adb_report.json" + case "${top}" in + "top_clients") + "${adb_awk}" '{print $3}' "${adb_reportdir}/adb_report.srt" | sort ${adb_srtopts} | uniq -c | \ + sort ${adb_srtopts} -nr | "${adb_awk}" '{ORS=" ";if(NR==1)printf "{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2; else if(NR<10)printf ", { \"count\": \"%s\", \"address\": \"%s\" }",$1,$2}' >> "${adb_reportdir}/adb_report.json" + ;; + "top_domains") + "${adb_awk}" '{if($5!="NX")print $4}' "${adb_reportdir}/adb_report.srt" | sort ${adb_srtopts} | uniq -c | \ + sort ${adb_srtopts} -nr | "${adb_awk}" '{ORS=" ";if(NR==1)printf "{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2; else if(NR<10)printf ", { \"count\": \"%s\", \"address\": \"%s\" }",$1,$2}' >> "${adb_reportdir}/adb_report.json" + ;; + "top_blocked") + "${adb_awk}" '{if($5=="NX")print $4}' "${adb_reportdir}/adb_report.srt" | sort ${adb_srtopts} | uniq -c | \ + sort ${adb_srtopts} -nr | "${adb_awk}" '{ORS=" ";if(NR==1)printf "{ \"count\": \"%s\", \"address\": \"%s\" }",$1,$2; else if(NR<10)printf ", { \"count\": \"%s\", \"address\": \"%s\" }",$1,$2}' >> "${adb_reportdir}/adb_report.json" + ;; + esac + printf "%s" " ], " >> "${adb_reportdir}/adb_report.json" + done + search="${search//./\\.}" + search="${search//[+*~%\$&\"\' ]/}" + "${adb_awk}" "BEGIN{i=0;printf \"\\\"requests\\\": [ \" }/(${search})/{i++;if(i==1)printf \"{ \\\"date\\\": \\\"%s\\\", \\\"time\\\": \\\"%s\\\", \\\"client\\\": \\\"%s\\\", \\\"domain\\\": \\\"%s\\\", \\\"rc\\\": \\\"%s\\\" }\",\$1,\$2,\$3,\$4,\$5;else if(i<=${count})printf \", { \\\"date\\\": \\\"%s\\\", \\\"time\\\": \\\"%s\\\", \\\"client\\\": \\\"%s\\\", \\\"domain\\\": \\\"%s\\\", \\\"rc\\\": \\\"%s\\\" }\",\$1,\$2,\$3,\$4,\$5}END{printf \" ] } }\n\"}" "${adb_reportdir}/adb_report.srt" >> "${adb_reportdir}/adb_report.json" + rm -f "${adb_reportdir}/adb_report.srt" + fi + fi + + if [ -s "${adb_reportdir}/adb_report.json" ] + then + if [ "${print}" = "cli" ] + then + printf "%s\\n%s\\n%s\\n" ":::" "::: Adblock DNS-Query Report" ":::" + json_load_file "${adb_reportdir}/adb_report.json" + json_select "data" + json_get_keys keylist + for key in ${keylist} + do + json_get_var value "${key}" + eval "${key}=\"${value}\"" + done + printf " + %s\\n + %s\\n" "Start ::: ${start_date}, ${start_time}" "End ::: ${end_date}, ${end_time}" + printf " + %s\\n + %s %s\\n" "Total ::: ${total}" "Blocked ::: ${blocked}" "(${percent})" + + top_list="top_clients top_domains top_blocked requests" + for top in ${top_list} + do + case "${top}" in + "top_clients") + item="::: Top 10 Clients" + ;; + "top_domains") + item="::: Top 10 Domains" + ;; + "top_blocked") + item="::: Top 10 Blocked Domains" + ;; + esac + if json_get_type status "${top}" && [ "${top}" != "requests" ] && [ "${status}" = "array" ] + then + printf "%s\\n%s\\n%s\\n" ":::" "${item}" ":::" + json_select "${top}" + index=1 + while json_get_type status "${index}" && [ "${status}" = "object" ] + do + json_get_values item "${index}" + printf " + %-9s::: %s\\n" ${item} + index=$((index+1)) + done + elif json_get_type status "${top}" && [ "${top}" = "requests" ] && [ "${status}" = "array" ] + then + printf "%s\\n%s\\n%s\\n" ":::" "::: Latest DNS Queries" ":::" + printf "%-15s%-15s%-45s%-50s%s\\n" "Date" "Time" "Client" "Domain" "Answer" + json_select "${top}" + index=1 + while json_get_type status "${index}" && [ "${status}" = "object" ] + do + json_get_values item "${index}" + printf "%-15s%-15s%-45s%-50s%s\\n" ${item} + index=$((index+1)) + done + fi + json_select ".." + done + elif [ "${print}" = "json" ] + then + cat "${adb_reportdir}/adb_report.json" + fi + fi + fi + f_log "debug" "f_report ::: action: ${adb_action}, report: ${adb_report}, search: ${1}, count: ${2}, process: ${3}, print: ${4}, dump_util: ${adb_dumpcmd}, repdir: ${adb_reportdir}, repiface: ${adb_repiface:-"-"}, replisten: ${adb_replisten}, repchunksize: ${adb_repchunksize}, repchunkcnt: ${adb_repchunkcnt}, bg_pid: ${bg_pid}" +} + +# awk selection +# +adb_awk="$(command -v gawk)" +if [ -z "${adb_awk}" ] +then + adb_awk="$(command -v awk)" +fi + # source required system libraries # -if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ] +if [ -r "/lib/functions.sh" ] && [ -r "/lib/functions/network.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ] then . "/lib/functions.sh" + . "/lib/functions/network.sh" . "/usr/share/libubox/jshn.sh" else f_log "err" "system libraries not found" fi -# initialize json runtime file -# -json_load_file "${adb_rtfile}" >/dev/null 2>&1 -json_select data >/dev/null 2>&1 -if [ ${?} -ne 0 ] -then - > "${adb_rtfile}" - json_init - json_add_object "data" -fi - # handle different adblock actions # -f_envload +f_load case "${adb_action}" in - stop) + "stop") + f_bgserv "stop" + f_report "+" "50" "false" "false" f_rmdns ;; - restart) + "restart") + f_bgserv "stop" + f_report "+" "50" "false" "false" f_rmdns - f_envcheck + f_env f_main ;; - suspend) - f_switch suspend + "suspend") + if [ "${adb_dns}" != "raw" ] + then + f_switch suspend + fi ;; - resume) - f_switch resume + "resume") + if [ "${adb_dns}" != "raw" ] + then + f_switch resume + fi ;; - query) + "report") + f_report "${2}" "${3}" "${4}" "${5}" + ;; + "query") f_query "${2}" ;; - start|reload) - f_envcheck + "start"|"reload") + f_bgserv "stop" + f_report "+" "50" "false" "false" + f_env f_main ;; esac diff --git a/net/adblock/files/adblock.sources b/net/adblock/files/adblock.sources new file mode 100644 index 00000000..a6093a71 --- /dev/null +++ b/net/adblock/files/adblock.sources @@ -0,0 +1,350 @@ +{ + "adaway": { + "url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt", + "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "S", + "focus": "mobile", + "descurl": "https://github.com/AdAway/adaway.github.io" + }, + "adguard": { + "url": "https://filters.adtidy.org/windows/filters/15.txt", + "rule": "BEGIN{FS=\"[\/|^|\\r]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+[\\/\\^\\r]+$/{print tolower($3)}", + "size": "L", + "focus": "general", + "descurl": "https://adguard.com" + }, + "andryou": { + "url": "https://gitlab.com/andryou/block/raw/master/kouhai-compressed-domains", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "L", + "focus": "compilation", + "descurl": "https://gitlab.com/andryou/block/-/blob/master/readme.md" + }, + "anti_ad": { + "url": "https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "L", + "focus": "compilation", + "descurl": "https://github.com/privacy-protection-tools/anti-AD/blob/master/README.md" + }, + "anudeep": { + "url": "https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt", + "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "M", + "focus": "compilation", + "descurl": "https://github.com/anudeepND/blacklist" + }, + "bitcoin": { + "url": "https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt", + "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "S", + "focus": "mining", + "descurl": "https://github.com/hoshsadiq/adblock-nocoin-list" + }, + "disconnect": { + "url": "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "S", + "focus": "general", + "descurl": "https://disconnect.me" + }, + "dshield": { + "url": "https://www.dshield.org/feeds/suspiciousdomains_Low.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "XL", + "focus": "general", + "descurl": "https://www.dshield.org" + }, + "energized_blugo": { + "url": "https://block.energized.pro/bluGo/formats/domains.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "XL", + "focus": "compilation", + "descurl": "https://energized.pro" + }, + "energized_blu": { + "url": "https://block.energized.pro/blu/formats/domains.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "XL", + "focus": "compilation", + "descurl": "https://energized.pro" + }, + "energized_porn": { + "url": "https://block.energized.pro/porn/formats/domains.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "XXL", + "focus": "compilation+porn", + "descurl": "https://energized.pro" + }, + "energized_ultimate": { + "url": "https://block.energized.pro/ultimate/formats/domains.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "XXL", + "focus": "compilation", + "descurl": "https://energized.pro" + }, + "energized_unified": { + "url": "https://block.energized.pro/unified/formats/domains.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "XXL", + "focus": "compilation", + "descurl": "https://energized.pro" + }, + "malwaredomains": { + "url": "http://mirror.espoch.edu.ec/malwaredomains/justdomains", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "M", + "focus": "malware", + "descurl": "https://www.malwaredomains.com" + }, + "malwarelist": { + "url": "https://www.malwaredomainlist.com/hostslist/hosts.txt", + "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "S", + "focus": "malware", + "descurl": "https://www.malwaredomainlist.com" + }, + "notracking": { + "url": "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "XL", + "focus": "tracking", + "descurl": "https://github.com/notracking/hosts-blocklists" + }, + "oisd_nl": { + "url": "https://abp.oisd.nl/", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "XXL", + "focus": "general", + "descurl": "https://oisd.nl" + }, + "openphish": { + "url": "https://openphish.com/feed.txt", + "rule": "BEGIN{FS=\"\/\"}/^http[s]?:\\/\\/([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+(\\/|$)/{print tolower($3)}", + "size": "S", + "focus": "phishing", + "descurl": "https://openphish.com" + }, + "phishing_army": { + "url": "https://phishing.army/download/phishing_army_blocklist_extended.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "S", + "focus": "phishing", + "descurl": "https://phishing.army" + }, + "reg_cn": { + "url": "https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "M", + "focus": "reg_china", + "descurl": "https://easylist.to" + }, + "reg_cz": { + "url": "https://easylist-downloads.adblockplus.org/easylistczechslovak+easylist.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "M", + "focus": "reg_czech+slovak", + "descurl": "https://easylist.to" + }, + "reg_de": { + "url": "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "M", + "focus": "reg_germany", + "descurl": "https://easylist.to" + }, + "reg_es": { + "url": "https://easylist-downloads.adblockplus.org/easylistspanish+easylist.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "M", + "focus": "reg_spain", + "descurl": "https://easylist.to" + }, + "reg_fi": { + "url": "https://raw.githubusercontent.com/finnish-easylist-addition/finnish-easylist-addition/master/Finland_adb.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "S", + "focus": "reg_finland", + "descurl": "https://github.com/finnish-easylist-addition" + }, + "reg_fr": { + "url": "https://easylist-downloads.adblockplus.org/liste_fr.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "S", + "focus": "reg_france", + "descurl": "https://forums.lanik.us/viewforum.php?f=91" + }, + "reg_id": { + "url": "https://easylist-downloads.adblockplus.org/abpindo+easylist.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "M", + "focus": "reg_indonesia", + "descurl": "https://easylist.to" + }, + "reg_kr": { + "url": "https://raw.githubusercontent.com/List-KR/List-KR/master/filter.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "S", + "focus": "reg_korea", + "descurl": "https://list-kr.github.io" + }, + "reg_nl": { + "url": "https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "M", + "focus": "reg_netherlands", + "descurl": "https://easylist.to" + }, + "reg_pl": { + "url": "https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt", + "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "S", + "focus": "reg_poland", + "descurl": "https://kadantiscam.netlify.com" + }, + "reg_ro": { + "url": "https://easylist-downloads.adblockplus.org/rolist+easylist.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "M", + "focus": "reg_romania", + "descurl": "https://easylist.to" + }, + "reg_ru": { + "url": "https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt", + "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}", + "size": "M", + "focus": "reg_russia", + "descurl": "https://easylist.to" + }, + "reg_vn": { + "url": "https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts", + "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "S", + "focus": "reg_vietnam", + "descurl": "https://bigdargon.github.io/hostsVN" + }, + "shallalist": { + "url": "http://www.shallalist.de/Downloads/shallalist.tar.gz", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "categories": [ + "adv", "costtraps", "spyware", "tracker", "warez" + ], + "size": "L", + "focus": "general", + "descurl": "http://www.shallalist.de" + }, + "shallalist_porn": { + "url": "http://www.shallalist.de/Downloads/shallalist.tar.gz", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "categories": [ + "adv", "costtraps", "porn", "spyware", "tracker", "warez" + ], + "size": "XXL", + "focus": "general+porn", + "descurl": "http://www.shallalist.de" + }, + "smarttv": { + "url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "S", + "focus": "smarttv", + "descurl": "https://github.com/Perflyst/PiHoleBlocklist" + }, + "spam404": { + "url": "https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "S", + "focus": "general", + "descurl": "https://github.com/Dawsey21" + }, + "stevenblack": { + "url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts", + "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "L", + "focus": "compilation", + "descurl": "https://github.com/StevenBlack/hosts" + }, + "stevenblack_porn": { + "url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts", + "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "L", + "focus": "compilation", + "descurl": "https://github.com/StevenBlack/hosts" + }, + "stopforumspam": { + "url": "https://www.stopforumspam.com/downloads/toxic_domains_whole.txt", + "rule": "/^[[:space:]]*([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "S", + "focus": "spam", + "descurl": "https://www.stopforumspam.com" + }, + "sysctl": { + "url": "http://sysctl.org/cameleon/hosts", + "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "M", + "focus": "general", + "descurl": "http://sysctl.org/cameleon" + }, + "utcapitole": { + "url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "categories": [ + "publicite", "bitcoin", "cryptojacking", "ddos", "malware", "phishing", "warez" + ], + "size": "L", + "focus": "general", + "descurl": "https://dsi.ut-capitole.fr/blacklists/index_en.php" + }, + "utcapitole_porn": { + "url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "categories": [ + "adult", "publicite", "bitcoin", "cryptojacking", "ddos", "malware", "phishing", "warez" + ], + "size": "XXL", + "focus": "general+porn", + "descurl": "https://dsi.ut-capitole.fr/blacklists/index_en.php" + }, + "wally3k": { + "url": "https://v.firebog.net/hosts/static/w3kbl.txt", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "S", + "focus": "compilation", + "descurl": "https://firebog.net/about" + }, + "whocares": { + "url": "https://someonewhocares.org/hosts/hosts", + "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "M", + "focus": "general", + "descurl": "https://someonewhocares.org" + }, + "winhelp": { + "url": "http://winhelp2002.mvps.org/hosts.txt", + "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "S", + "focus": "general", + "descurl": "http://winhelp2002.mvps.org" + }, + "winspy": { + "url": "https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt", + "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}", + "size": "S", + "focus": "win_telemetry", + "descurl": "https://github.com/crazy-max/WindowsSpyBlocker" + }, + "youtube": { + "url": "https://raw.githubusercontent.com/kboghdady/youTube_ads_4_pi-hole/master/black.list", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "M", + "focus": "youtube", + "descurl": "https://github.com/kboghdady/youTube_ads_4_pi-hole" + }, + "yoyo": { + "url": "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext", + "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", + "size": "S", + "focus": "general", + "descurl": "https://pgl.yoyo.org" + } +} diff --git a/net/addrwatch/Makefile b/net/addrwatch/Makefile index 8b683eeb..15fc5051 100644 --- a/net/addrwatch/Makefile +++ b/net/addrwatch/Makefile @@ -8,16 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=addrwatch -PKG_VERSION:=0.8 -PKG_RELEASE:=2 +PKG_VERSION:=1.0.2 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-master.tar.gz -PKG_SOURCE_URL:=https://github.com/fln/addrwatch/releases/download/$(PKG_VERSION)/ -PKG_HASH:=0455bd8d2e18a793e1182712bf4df3e54a5b7575f82f5b79b60deef19ff93df8 -PKG_LICENSE:=GPL-3.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/fln/addrwatch/releases/download/v$(PKG_VERSION) +PKG_HASH:=f04e143da881cd63c299125b592cfb85e4812abbd146f419a1894c00f2ae6208 + +PKG_MAINTAINER:=Ondrej Caletka +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-master -PKG_FIXUP:=autoreconf + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone include $(INCLUDE_DIR)/package.mk @@ -28,11 +31,10 @@ define Package/addrwatch DEPENDS:=+libpcap +libevent2 TITLE:=IPv4/IPv6 and ethernet address pairing tool URL:=https://github.com/fln/addrwatch - MAINTAINER:=Ondrej Caletka endef define Package/addrwatch/description - This is a tool similar to arpwatch. It main purpose is to monitor network and + This is a tool similar to arpwatch. It main purpose is to monitor network and log discovered ethernet/ip pairings. Addrwatch is extremely useful in networks with IPv6 autoconfiguration (RFC4862) enabled. It allows to track IPv6 addresses of hosts using IPv6 privacy extensions (RFC4941). @@ -43,8 +45,8 @@ define Package/addrwatch/conffiles endef define Package/addrwatch/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/addrwatch $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/config $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/addrwatch $(1)/usr/bin/ $(INSTALL_BIN) ./files/addrwatch.init $(1)/etc/init.d/addrwatch $(INSTALL_CONF) ./files/addrwatch.config $(1)/etc/config/addrwatch endef diff --git a/net/addrwatch/files/addrwatch.init b/net/addrwatch/files/addrwatch.init index fb0ea469..7b0f74cf 100644 --- a/net/addrwatch/files/addrwatch.init +++ b/net/addrwatch/files/addrwatch.init @@ -5,7 +5,7 @@ START=50 USE_PROCD=1 validate_section_addrwatch() { - uci_validate_section addrwatch addrwatch "${1}" \ + uci_load_validate addrwatch addrwatch "$1" "$2" \ 'disabled:bool:0' \ 'interface:list(string):lan' \ 'syslog:bool:1' \ @@ -17,16 +17,13 @@ validate_section_addrwatch() { 'blacklist:list(or(ip4addr,ip6addr))' \ 'hashsize:range(1,65536):1024'\ 'ratelimit:integer:3600' - return $? } start_instance() { local cfg="$1" - local disabled interface syslog output quiet verbose ipv4only ipv6only - local blacklist hashsize ratelimit local netdevs="" - validate_section_addrwatch "${cfg}" || { + [ "$2" = 0 ] || { echo "validation of config $cfg failed" return 1 } @@ -34,14 +31,14 @@ start_instance() { for iface in $interface; do local netdev - network_get_physdev netdev "${iface}" - append netdevs "${netdev}" + network_get_physdev netdev "$iface" + append netdevs "$netdev" done procd_open_instance procd_set_param command /usr/sbin/addrwatch - [ "${syslog}" -eq 1 ] && procd_append_param command --syslog - [ -n "${output}" ] && procd_append_param command --output "$output" + [ "$syslog" -eq 1 ] && procd_append_param command --syslog + [ -n "$output" ] && procd_append_param command --output "$output" [ "$quiet" -eq 1 ] && procd_append_param command --quiet [ "$verbose" -eq 1 ] && procd_append_param command --verbose [ "$ipv4only" -eq 1 ] && procd_append_param command --ipv4only @@ -49,14 +46,14 @@ start_instance() { [ -n "$hashsize" ] && procd_append_param command --hashsize "$hashsize" [ -n "$ratelimit" ] && procd_append_param command --ratelimit "$ratelimit" for blitem in $blacklist; do - procd_append_param command "--blacklist=${blitem}" + procd_append_param command "--blacklist=$blitem" done procd_append_param command $netdevs procd_set_param netdev $netdevs procd_set_param respawn procd_open_trigger for iface in $interface; do - procd_add_interface_trigger "interface.*" ${iface} /etc/init.d/addrwatch reload + procd_add_interface_trigger "interface.*" $iface /etc/init.d/addrwatch reload done procd_close_trigger procd_close_instance @@ -65,9 +62,10 @@ start_instance() { start_service() { . /lib/functions/network.sh config_load 'addrwatch' - config_foreach start_instance 'addrwatch' + config_foreach validate_section_addrwatch 'addrwatch' start_instance } service_triggers() { procd_add_reload_trigger 'addrwatch' + procd_add_validation validate_section_addrwatch } diff --git a/net/addrwatch/patches/001-fix-sys_siglist.patch b/net/addrwatch/patches/001-fix-sys_siglist.patch deleted file mode 100644 index 53032b5f..00000000 --- a/net/addrwatch/patches/001-fix-sys_siglist.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -56,9 +56,6 @@ AC_CHECK_HEADERS([arpa/inet.h netinet/in - # Checks for typedefs, structures, and compiler characteristics. - AC_C_INLINE - AC_TYPE_PID_T --AC_CHECK_DECLS([sys_siglist], [], [ -- AC_MSG_ERROR([Unable to find sys_siglist declaration.]) --], [[#include ]]) - AC_TYPE_UINT32_T - AC_TYPE_UINT16_T - AC_TYPE_UINT8_T ---- a/src/addrwatch.c -+++ b/src/addrwatch.c -@@ -339,7 +339,7 @@ void reload_cb(evutil_socket_t fd, short - void reload_cb(int fd, short events, void *arg) - #endif - { -- log_msg(LOG_DEBUG, "Received signal (%d), %s", fd, sys_siglist[fd]); -+ log_msg(LOG_DEBUG, "Received signal (%d), %s", fd, strsignal(fd)); - log_msg(LOG_DEBUG, "Reopening output files"); - - output_flatfile_reload(); -@@ -353,7 +353,7 @@ void stop_cb(evutil_socket_t fd, short e - void stop_cb(int fd, short events, void *arg) - #endif - { -- log_msg(LOG_DEBUG, "Received signal (%d), %s", fd, sys_siglist[fd]); -+ log_msg(LOG_DEBUG, "Received signal (%d), %s", fd, strsignal(fd)); - #if HAVE_LIBEVENT2 - event_base_loopbreak(cfg.eb); - #else diff --git a/net/addrwatch/patches/002-fix-uclibc-sysconf.patch b/net/addrwatch/patches/002-fix-uclibc-sysconf.patch index c3c0e2e0..96d3ee2d 100644 --- a/net/addrwatch/patches/002-fix-uclibc-sysconf.patch +++ b/net/addrwatch/patches/002-fix-uclibc-sysconf.patch @@ -1,6 +1,6 @@ --- a/src/addrwatch.c +++ b/src/addrwatch.c -@@ -492,7 +492,7 @@ int main(int argc, char *argv[]) +@@ -501,7 +501,7 @@ int main(int argc, char *argv[]) argp_parse(&argp, argc, argv, 0, &optind, 0); if (!cfg.hostname) { diff --git a/net/aggregate/Makefile b/net/aggregate/Makefile index 1eb3d2ee..c20f95ba 100644 --- a/net/aggregate/Makefile +++ b/net/aggregate/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=aggregate PKG_VERSION:=1.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://ftp.isc.org/isc/aggregate/ diff --git a/net/aggregate/patches/500-cross_compile_flags.patch b/net/aggregate/patches/500-cross_compile_flags.patch new file mode 100644 index 00000000..b7392fbb --- /dev/null +++ b/net/aggregate/patches/500-cross_compile_flags.patch @@ -0,0 +1,14 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -25,8 +25,9 @@ + INSTALL = @INSTALL@ + DEFS = @DEFS@ + LIBS = @LIBS@ +-CFLAGS = -O +-LDFLAGS = -s ++CFLAGS = @CFLAGS@ ++CPPFLAGS = @CPPFLAGS@ ++LDFLAGS = @LDFLAGS@ + prefix = @prefix@ + + SHELL = /bin/sh diff --git a/net/apache/Config.in b/net/apache/Config.in deleted file mode 100644 index 5eb42b30..00000000 --- a/net/apache/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -menu "Configuration" - depends on PACKAGE_apache - -config APACHE_HTTP2 - bool - prompt "Enable HTTP2" - help - Enable HTTPS2 support. - default n - -endmenu diff --git a/net/apache/Makefile b/net/apache/Makefile index 9b133834..8efcb77f 100644 --- a/net/apache/Makefile +++ b/net/apache/Makefile @@ -8,87 +8,118 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apache -PKG_VERSION:=2.4.28 +PKG_VERSION:=2.4.43 PKG_RELEASE:=2 PKG_SOURCE_NAME:=httpd -PKG_MAINTAINER:=Thomas Heil -PKG_LICENSE:=Apache License PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@APACHE/httpd/ -PKG_HASH:=c1197a3a62a4ab5c584ab89b249af38cf28b4adee9c0106b62999fd29f920666 +PKG_HASH:=a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION) +PKG_MAINTAINER:=Thomas Heil , \ + Sebastian Kemper +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_CPE_ID:=cpe:/a:apache:http_server + +PKG_BUILD_DEPENDS:=openssl + +PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS:= \ + CONFIG_PACKAGE_apache-mod-deflate \ + CONFIG_PACKAGE_apache-mod-http2 \ + CONFIG_PACKAGE_apache-mod-ldap \ + CONFIG_PACKAGE_apache-mod-lua \ + CONFIG_PACKAGE_apache-mod-md \ + CONFIG_PACKAGE_apache-mod-proxy \ + CONFIG_PACKAGE_apache-mod-proxy-html \ + CONFIG_PACKAGE_apache-mod-session-crypto \ + CONFIG_PACKAGE_apache-mod-suexec \ + CONFIG_PACKAGE_apache-mod-webdav \ + CONFIG_PACKAGE_apache-suexec + +PKG_FIXUP:=autoreconf + PKG_INSTALL:=1 -PKG_CONFIG_DEPENDS := \ - CONFIG_APACHE_HTTP2 - -ADDITIONAL_MODULES:= -ifeq ($(CONFIG_APACHE_HTTP2),y) - ADDITIONAL_MODULES += --enable-http2 -endif -ifneq ($(CONFIG_APACHE_HTTP2),y) - ADDITIONAL_MODULES += --enable-http2=no -endif - include $(INCLUDE_DIR)/package.mk +# without nls.mk mod_xml2enc might not find the iconv headers +include $(INCLUDE_DIR)/nls.mk define Package/apache/Default SECTION:=net CATEGORY:=Network SUBMENU:=Web Servers/Proxies TITLE:=The Apache Web Server - URL:=http://httpd.apache.org/ + URL:=https://httpd.apache.org/ endef define Package/apache/Default/description - The Apache Web Server is a powerful and flexible HTTP/1.1 compliant - web server. Originally designed as a replacement for the NCSA HTTP - Server, it has grown to be the most popular web server on the Internet. -endef - -define Package/apache/config - source "$(SOURCE)/Config.in" +The Apache HTTP Server Project is a collaborative software development +effort aimed at creating a robust, commercial-grade, featureful, and +freely-available source code implementation of an HTTP (Web) server. endef define Package/apache $(call Package/apache/Default) - DEPENDS:=+libapr +libaprutil +libpcre +libopenssl +unixodbc +zlib +APACHE_HTTP2:libnghttp2 + USERID:=apache=377:apache=377 + DEPENDS:=+libapr +libaprutil +libpcre endef define Package/apache/description $(call Package/apache/Default/description) - . - This package contains the Apache web server and utility programs. - . - Take care that you don't include apache at the moment into your image - please select it only as module because busybox will override - /usr/sbin/httpd. It'll be solved soon. If you need to include this - package in the image anyway, remove httpd from busybox - (Base system --> Configuration --> Networking Utilities --> httpd). - Also you should take care for the initscripts, apache's httpd isn't - compatible with the one from busybox, so if you want to use apache - for running your webif, you'll need to change the parameters in the - scripts and configure the rest in /etc/httpd.conf. + +This package contains the Apache web server and utility programs. + endef define Package/apache/conffiles -/etc/apache/httpd.conf -/etc/apache/extra/httpd-autoindex.conf -/etc/apache/extra/httpd-dav.conf -/etc/apache/extra/httpd-default.conf -/etc/apache/extra/httpd-info.conf -/etc/apache/extra/httpd-languages.conf -/etc/apache/extra/httpd-manual.conf -/etc/apache/extra/httpd-mpm.conf -/etc/apache/extra/httpd-multilang-errordoc.conf -/etc/apache/extra/httpd-ssl.conf -/etc/apache/extra/httpd-userdir.conf -/etc/apache/extra/httpd-vhosts.conf -/etc/apache/magic -/etc/apache/mime.types +/etc/apache2/apache2.conf +/etc/apache2/extra/httpd-autoindex.conf +/etc/apache2/extra/httpd-dav.conf +/etc/apache2/extra/httpd-default.conf +/etc/apache2/extra/httpd-info.conf +/etc/apache2/extra/httpd-languages.conf +/etc/apache2/extra/httpd-manual.conf +/etc/apache2/extra/httpd-mpm.conf +/etc/apache2/extra/httpd-multilang-errordoc.conf +/etc/apache2/extra/httpd-ssl.conf +/etc/apache2/extra/httpd-userdir.conf +/etc/apache2/extra/httpd-vhosts.conf +/etc/apache2/extra/proxy-html.conf +/etc/apache2/magic +/etc/apache2/mime.types +/etc/init.d/apache2 +endef + +define Package/apache-ab +$(call Package/apache/Default) + TITLE:=Apache benchmark utility + DEPENDS:=apache +libopenssl +endef + +define Package/apache-ab/description +$(call Package/apache/Default/description) + +Apache server benchmarking utility. + +endef + +define Package/apache-error +$(call Package/apache/Default) + TITLE:=Error documents + DEPENDS:=apache +endef + +define Package/apache-error/description +$(call Package/apache/Default/description) + +Apache multi language custom error documents. + endef define Package/apache-icons @@ -99,91 +130,261 @@ endef define Package/apache-icons/description $(call Package/apache/Default/description) - . - This package contains the icons from Apache. + +This package contains the icons from Apache. + endef -TARGET_CFLAGS += $(FPIC) -TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -TARGET_LDFLAGS += -lpthread - -define Build/Configure - $(call Build/Configure/Default, \ - --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \ - --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \ - --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \ - $(ADDITIONAL_MODULES) \ - --enable-http \ - --with-crypto \ - --with-sqlit3="$(STAGING_DIR)/usr" \ - --with-openssl="$(STAGING_DIR)/usr" \ - --enable-ssl \ - --enable-proxy \ - --disable-disk-cache \ - --enable-maintainer-mode \ - --with-mpm=prefork \ - --with-mpm=worker \ - --enable-mime-magic \ - --without-suexec-bin \ - --sysconfdir=/etc/apache \ - ap_cv_void_ptr_lt_long=no \ - logfiledir="/var/log" \ - runtimedir="/var/run" \ - EXTRA_LIBS="-ldl -lpthread -lcrypto -lrt -lssl" \ - ) +define Package/apache-suexec +$(call Package/apache/Default) + TITLE:=Apache suEXEC + DEPENDS:=apache endef +define Package/apache-suexec/description +$(call Package/apache/Default/description) + +This package contains the suEXEC utility from Apache. + +endef + +define Package/apache-utils +$(call Package/apache/Default) + TITLE:=Apache utilities + DEPENDS:=apache +endef + +define Package/apache-utils/description +$(call Package/apache/Default/description) + +Apache utility programs for webservers. + +endef + +define Package/apache/install/mod + $(INSTALL_DIR) $(1)/usr/lib/apache2 + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/lib/apache2/mod_$(2).so \ + $(1)/usr/lib/apache2 +endef + +CONFIGURE_ARGS+= \ + --$(if $(CONFIG_PACKAGE_apache-mod-http2),en,dis)able-http2 \ + --$(if $(CONFIG_PACKAGE_apache-mod-lua),en,dis)able-lua \ + --$(if $(CONFIG_PACKAGE_apache-mod-md),en,dis)able-md \ + --$(if $(CONFIG_PACKAGE_apache-mod-proxy),en,dis)able-proxy \ + --$(if $(CONFIG_PACKAGE_apache-mod-session-crypto),en,dis)able-session-crypto \ + --$(if $(CONFIG_PACKAGE_apache-mod-ssl),en,dis)able-ssl \ + --datadir=/usr/share/apache2 \ + --disable-imagemap \ + --disable-luajit \ + --enable-authn-alias \ + --enable-authn-anon \ + --enable-cache \ + --enable-cgi \ + --enable-cgid \ + --enable-dbd \ + --enable-disk-cache \ + --enable-exception-hook \ + --enable-file-cache \ + --enable-layout=OpenWrt \ + --enable-mem-cache \ + --enable-mods-shared=all \ + --enable-mpms-shared=all \ + --enable-so \ + --libexecdir=/usr/lib/apache2 \ + --sysconfdir=/etc/apache2 \ + --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \ + --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \ + --with-mpm=prefork \ + --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \ + --with-program-name=apache2 \ + --with-ssl + +ifneq ($(CONFIG_PACKAGE_apache-mod-deflate),) +CONFIGURE_ARGS+= \ + --enable-deflate \ + --with-z="$(STAGING_DIR)/usr" +else +CONFIGURE_ARGS+= \ + --disable-deflate \ + --without-z +endif + +ifneq ($(CONFIG_PACKAGE_apache-mod-ldap),) +CONFIGURE_ARGS+= \ + --enable-authnz-ldap \ + --enable-ldap +else +CONFIGURE_ARGS+= \ + --disable-authnz-ldap \ + --disable-ldap +endif + +ifneq ($(CONFIG_PACKAGE_apache-mod-proxy),) +CONFIGURE_ARGS+= \ + --enable-proxy \ + --enable-proxy-connect \ + --enable-proxy-ftp \ + --enable-proxy-http +else +CONFIGURE_ARGS+= \ + --disable-proxy +endif + +ifneq ($(CONFIG_PACKAGE_apache-mod-proxy-html),) +CONFIGURE_ARGS+= \ + --enable-proxy-html \ + --enable-xml2enc \ + --with-libxml2="$(STAGING_DIR)/usr" +else +CONFIGURE_ARGS+= \ + --disable-proxy-html \ + --disable-xml2enc +endif + +ifneq ($(CONFIG_PACKAGE_apache-mod-suexec)$(CONFIG_PACKAGE_apache-suexec),) +CONFIGURE_ARGS+= \ + --enable-suexec \ + --with-suexec-bin=/usr/lib/apache2/suexec_dir/suexec \ + --with-suexec-caller=apache \ + --with-suexec-logfile=/var/log/apache2/suexec.log +else +CONFIGURE_ARGS+= \ + --disable-suexec +endif + +ifneq ($(CONFIG_PACKAGE_apache-mod-webdav),) +CONFIGURE_ARGS+= \ + --enable-dav \ + --enable-dav-fs \ + --enable-dav-lock +else +CONFIGURE_ARGS+= \ + --disable-dav +endif + +CONFIGURE_VARS += \ + ac_cv_gettid=yes \ + ap_cv_void_ptr_lt_long=no + define Build/InstallDev - rm -rf $(PKG_INSTALL_DIR)/usr/man/ \ - $(PKG_INSTALL_DIR)/usr/share/manual/ - # if you need docs take a look into the build-dir :) - $(INSTALL_DIR) $(1)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/* \ - $(1)/etc - $(INSTALL_DIR) $(1)/usr/include/apache - $(CP) $(PKG_INSTALL_DIR)/usr/include/* \ - $(1)/usr/include/apache - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \ - $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* \ - $(1)/usr/sbin - $(INSTALL_DIR) $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/share/* \ - $(1)/usr/share -endef - -define Package/apache/preinst - rm /usr/sbin/httpd - echo -e "You should take a look in the initscripts, busybox's httpd \n\ - uses some parameters which are maybe unsupported by apache." + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/apxs $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/include/apache2 + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/apache2/* \ + $(1)/usr/include/apache2 + $(INSTALL_DIR) $(1)/usr/lib/apache2 + $(INSTALL_DIR) $(1)/usr/share/apache2/build + $(CP) $(PKG_INSTALL_DIR)/usr/share/apache2/build/* \ + $(1)/usr/share/apache2/build + $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' \ + $(1)/usr/share/apache2/build/config_vars.mk endef define Package/apache/install - $(INSTALL_DIR) $(1)/usr/sbin - # we don't need apxs on the router, it's just for building apache modules. - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{ab,dbmmanage,htdbm,htdigest,htpasswd,httxt2dbm,logresolve} $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{apachectl,checkgid,envvars,envvars-std,htcacheclean,httpd,rotatelogs} $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/ - $(INSTALL_DIR) $(1)/etc/apache - $(CP) $(PKG_INSTALL_DIR)/etc/apache/{httpd.conf,magic,mime.types,extra} $(1)/etc/apache/ + $(INSTALL_DIR) $(1)/etc/apache2/extra + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/apache2/extra/* \ + $(1)/etc/apache2/extra + $(SED) '/^LoadModule session_crypto_module/s/^/#/' \ + $(PKG_INSTALL_DIR)/etc/apache2/apache2.conf + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/etc/apache2/{apache2.conf,magic,mime.types} \ + $(1)/etc/apache2 + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/apache2.init $(1)/etc/init.d/apache2 + $(INSTALL_DIR) $(1)/usr/lib/apache2 + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/apache2/*.so \ + $(1)/usr/lib/apache2 + rm -f $(1)/usr/lib/apache2/mod_{*ldap,dav*,deflate,http2,lbmethod_*,lua,md,proxy*,proxy_html,session_crypto,ssl,suexec,xml2enc}.so + $(INSTALL_DIR) $(1)/usr/share/apache2/{cgi-bin,htdocs} + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/apache2/cgi-bin/* \ + $(1)/usr/share/apache2/cgi-bin + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/apache2/htdocs/* \ + $(1)/usr/share/apache2/htdocs + $(INSTALL_DIR) $(1)/usr/{,s}bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/{dbmmanage,htdbm,htdigest,htpasswd,httxt2dbm,logresolve} \ + $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{apachectl,apache2} \ + $(1)/usr/sbin endef -define Package/apache/postrm - rm -rf /usr/sbin/httpd - ln -s /bin/busybox /usr/sbin/httpd - echo -e "You may need to change your initscripts back for the use \n\ - with busybox's httpd." +define Package/apache-ab/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ab $(1)/usr/bin +endef + +define Package/apache-error/install + $(INSTALL_DIR) $(1)/usr/share/apache2/error + $(CP) $(PKG_INSTALL_DIR)/usr/share/apache2/error/* \ + $(1)/usr/share/apache2/error endef define Package/apache-icons/install - $(INSTALL_DIR) $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/ + $(INSTALL_DIR) $(1)/usr/share/apache2 + $(CP) $(PKG_INSTALL_DIR)/usr/share/apache2/icons \ + $(1)/usr/share/apache2 +endef + +define Package/apache-suexec/install + $(INSTALL_DIR) -m0750 $(1)/usr/lib/apache2/suexec_dir + $(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/sbin/suexec \ + $(1)/usr/lib/apache2/suexec_dir +endef + +define Package/apache-utils/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/{checkgid,envvars*,htcacheclean,rotatelogs} \ + $(1)/usr/sbin +endef + +# Directory "suexec_dir" is installed with '-m0750' above and contains +# SUID binary "suexec". Below post-install script changes the group of +# "suexec_dir" to apache, so user apache can access the folder (and the +# SUID binary). The script only changes the group if the directory is +# currently owned by "root:root". +define Package/apache-suexec/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + dir="/usr/lib/apache2/suexec_dir" + if ! [ -L "$$dir" ] && [ -d "$$dir" ] && [ -O "$$dir" ] && [ -G "$$dir" ]; then + chown :apache "$$dir" + fi +fi +exit 0 +endef + +define Package/apache/Module +define Package/apache-mod-$(1) +$(call Package/apache/Default) + TITLE:=$(2) module + DEPENDS:=apache $(patsubst +%,+PACKAGE_apache-mod-$(1):%,$(4)) +endef +define Package/apache-mod-$(1)/description +$(subst \n,$(newline),$(3)) +endef +define Package/apache-mod-$(1)/install +$(foreach m,$(5),$(call Package/apache/install/mod,$$(1),$(m));) +endef +$$(eval $$(call BuildPackage,apache-mod-$(1))) endef $(eval $(call BuildPackage,apache)) +$(eval $(call BuildPackage,apache-ab)) +$(eval $(call BuildPackage,apache-error)) $(eval $(call BuildPackage,apache-icons)) +$(eval $(call BuildPackage,apache-suexec)) +$(eval $(call BuildPackage,apache-utils)) +$(eval $(call Package/apache/Module,deflate,Deflate,Deflate support for the Apache HTTP server.,+zlib,deflate)) +$(eval $(call Package/apache/Module,http2,HTTP2,HTTP/2 transport layer for the Apache HTTP Server.,+libnghttp2 +libopenssl,http2)) +$(eval $(call Package/apache/Module,ldap,LDAP,LDAP authentication/authorization module for the Apache HTTP Server.,+libaprutil-ldap,authnz_ldap ldap)) +$(eval $(call Package/apache/Module,lua,Lua,Lua support for the Apache HTTP server.,+liblua,lua)) +$(eval $(call Package/apache/Module,md,Managed Domain handling,Managed Domain handling.,+libcurl +jansson +libopenssl,md)) +$(eval $(call Package/apache/Module,proxy,Proxy,Proxy modules for the Apache HTTP Server.,,proxy proxy_ajp proxy_balancer proxy_connect proxy_express proxy_fcgi proxy_fdpass proxy_ftp proxy_hcheck proxy_http proxy_scgi proxy_uwsgi proxy_wstunnel lbmethod_byrequests lbmethod_heartbeat lbmethod_bytraffic lbmethod_bybusyness)) +$(eval $(call Package/apache/Module,proxy-html,Proxy HTML,HTML and XML content filters for the Apache HTTP Server.,+apache-mod-proxy +libxml2,proxy_html xml2enc)) +$(eval $(call Package/apache/Module,session-crypto,Session crypto,Session encryption support for the Apache HTTP Server.,+libaprutil-crypto-openssl,session_crypto)) +$(eval $(call Package/apache/Module,ssl,SSL/TLS,SSL/TLS module for the Apache HTTP Server.,+libopenssl,ssl)) +$(eval $(call Package/apache/Module,suexec,suEXEC,suEXEC module for the Apache HTTP Server.,+apache-suexec,suexec)) +$(eval $(call Package/apache/Module,webdav,WebDAV,WebDAV support for the Apache HTTP Server.,,dav dav_fs dav_lock)) diff --git a/net/apache/files/apache2.init b/net/apache/files/apache2.init new file mode 100644 index 00000000..df2e2646 --- /dev/null +++ b/net/apache/files/apache2.init @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common + +START=99 + +reload() { + apachectl -k restart +} + +restart() { + apachectl -k restart +} + +start() { + mkdir -p -m 0750 /var/log/apache2 + mkdir -p /var/run/apache2 + apachectl -k start +} + +stop() { + apachectl -k stop +} diff --git a/net/apache/patches/001-Makefile_in.patch b/net/apache/patches/001-Makefile_in.patch deleted file mode 100644 index 0bccfd3b..00000000 --- a/net/apache/patches/001-Makefile_in.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/server/Makefile.in -+++ b/server/Makefile.in -@@ -26,7 +26,10 @@ gen_test_char: $(gen_test_char_OBJECTS) - $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS) - - test_char.h: gen_test_char -- ./gen_test_char > test_char.h -+ true -+# ./gen_test_char > test_char.h -+# doesn't matter if you run it on the buildhost or on an wl500gd, -+# same output on both, so i just patched in the test_char.h :). - - util.lo: test_char.h - diff --git a/net/apache/patches/001-cross-compile.patch b/net/apache/patches/001-cross-compile.patch new file mode 100644 index 00000000..71b743db --- /dev/null +++ b/net/apache/patches/001-cross-compile.patch @@ -0,0 +1,57 @@ +Fix cross-compilation + +Fetched httpd-2.4.x-cross_compile.diff from upstream bugtracker: +https://issues.apache.org/bugzilla/show_bug.cgi?id=51257#c6 + +which is a bundle of upstream revisions: + http://svn.apache.org/viewvc?view=revision&revision=1327907 + http://svn.apache.org/viewvc?view=revision&revision=1328390 + http://svn.apache.org/viewvc?view=revision&revision=1328714 + +Signed-off-by: Bernd Kuhls + +--- a/server/Makefile.in ++++ b/server/Makefile.in +@@ -24,9 +24,14 @@ TARGETS = delete-exports $(LTLIBRARY_NAM + include $(top_builddir)/build/rules.mk + include $(top_srcdir)/build/library.mk + ++ifdef CC_FOR_BUILD ++gen_test_char: gen_test_char.c ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $< ++else + gen_test_char_OBJECTS = gen_test_char.lo + gen_test_char: $(gen_test_char_OBJECTS) + $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS) ++endif + + test_char.h: gen_test_char + ./gen_test_char > test_char.h +--- a/configure.in ++++ b/configure.in +@@ -206,6 +206,14 @@ AC_PROG_CPP + dnl Try to get c99 support for variadic macros + ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99]) + ++dnl In case of cross compilation we set CC_FOR_BUILD to cc unless ++dnl we got already CC_FOR_BUILD from environment. ++if test "x${build_alias}" != "x${host_alias}"; then ++ if test "x${CC_FOR_BUILD}" = "x"; then ++ CC_FOR_BUILD=cc ++ fi ++fi ++ + if test "x${cache_file}" = "x/dev/null"; then + # Likewise, ensure that CC and CPP are passed through to the pcre + # configure script iff caching is disabled (the autoconf 2.5x default). +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -55,6 +55,8 @@ AC_DEFUN([APACHE_GEN_CONFIG_VARS],[ + APACHE_SUBST(CPPFLAGS) + APACHE_SUBST(CFLAGS) + APACHE_SUBST(CXXFLAGS) ++ APACHE_SUBST(CC_FOR_BUILD) ++ APACHE_SUBST(CFLAGS_FOR_BUILD) + APACHE_SUBST(LTFLAGS) + APACHE_SUBST(LDFLAGS) + APACHE_SUBST(LT_LDFLAGS) diff --git a/net/apache/patches/002-test_char_h.patch b/net/apache/patches/002-test_char_h.patch deleted file mode 100644 index ad07704b..00000000 --- a/net/apache/patches/002-test_char_h.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: httpd-2.4.25/server/test_char.h -=================================================================== ---- /dev/null -+++ httpd-2.4.25/server/test_char.h -@@ -0,0 +1,23 @@ -+/* this file is automatically generated by gen_test_char, do not edit */ -+#define T_ESCAPE_SHELL_CMD (1) -+#define T_ESCAPE_PATH_SEGMENT (2) -+#define T_OS_ESCAPE_PATH (4) -+#define T_HTTP_TOKEN_STOP (8) -+#define T_ESCAPE_LOGITEM (16) -+#define T_ESCAPE_FORENSIC (32) -+ -+static const unsigned char test_char_table[256] = { -+ 32,62,62,62,62,62,62,62,62,62,63,62,62,62,62,62,62,62,62,62, -+ 62,62,62,62,62,62,62,62,62,62,62,62,14,0,23,6,1,38,1,1, -+ 9,9,1,0,8,0,0,10,0,0,0,0,0,0,0,0,0,0,40,15, -+ 15,8,15,15,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -+ 0,0,0,0,0,0,0,0,0,0,0,15,31,15,7,0,7,0,0,0, -+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -+ 0,0,0,15,39,15,1,62,54,54,54,54,54,54,54,54,54,54,54,54, -+ 54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54, -+ 54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54, -+ 54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54, -+ 54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54, -+ 54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54, -+ 54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54 -+}; -Index: httpd-2.4.25/server/util.c -=================================================================== ---- httpd-2.4.25.orig/server/util.c -+++ httpd-2.4.25/server/util.c -@@ -96,6 +96,16 @@ - #undef APLOG_MODULE_INDEX - #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX - -+#define T_ESCAPE_SHELL_CMD (0x01) -+#define T_ESCAPE_PATH_SEGMENT (0x02) -+#define T_OS_ESCAPE_PATH (0x04) -+#define T_HTTP_TOKEN_STOP (0x08) -+#define T_ESCAPE_LOGITEM (0x10) -+#define T_ESCAPE_FORENSIC (0x20) -+#define T_ESCAPE_URLENCODED (0x40) -+#define T_HTTP_CTRLS (0x80) -+#define T_VCHAR_OBSTEXT (0x100) -+ - /* - * Examine a field value (such as a media-/content-type) string and return - * it sans any parameters; e.g., strip off any ';charset=foo' and the like. diff --git a/net/apache/patches/003-logdir_fix.patch b/net/apache/patches/003-logdir_fix.patch deleted file mode 100644 index fd22410d..00000000 --- a/net/apache/patches/003-logdir_fix.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: httpd-2.4.25/build/mkconfNW.awk -=================================================================== ---- httpd-2.4.25.orig/build/mkconfNW.awk -+++ httpd-2.4.25/build/mkconfNW.awk -@@ -23,7 +23,7 @@ BEGIN { - A["sysconfdir"] = "conf" - A["iconsdir"] = "icons" - A["manualdir"] = "manual" -- A["runtimedir"] = "logs" -+ A["runtimedir"] = "log" - A["errordir"] = "error" - A["proxycachedir"] = "proxy" - -Index: httpd-2.4.25/config.layout -=================================================================== ---- httpd-2.4.25.orig/config.layout -+++ httpd-2.4.25/config.layout -@@ -28,8 +28,8 @@ - cgidir: ${datadir}/cgi-bin - includedir: ${prefix}/include - localstatedir: ${prefix} -- runtimedir: ${localstatedir}/logs -- logfiledir: ${localstatedir}/logs -+ runtimedir: ${localstatedir}/log -+ logfiledir: ${localstatedir}/log - proxycachedir: ${localstatedir}/proxy - - -@@ -150,7 +150,7 @@ - includedir: ${prefix}/include - localstatedir: /var${prefix} - runtimedir: ${localstatedir}/run -- logfiledir: ${localstatedir}/logs -+ logfiledir: ${localstatedir}/log - proxycachedir: ${localstatedir}/proxy - - diff --git a/net/apache/patches/004-fix-scoreboard-location.patch b/net/apache/patches/004-fix-scoreboard-location.patch new file mode 100644 index 00000000..09f2ff7a --- /dev/null +++ b/net/apache/patches/004-fix-scoreboard-location.patch @@ -0,0 +1,11 @@ +--- a/include/scoreboard.h ++++ b/include/scoreboard.h +@@ -40,7 +40,7 @@ extern "C" { + + /* Scoreboard file, if there is one */ + #ifndef DEFAULT_SCOREBOARD +-#define DEFAULT_SCOREBOARD "logs/apache_runtime_status" ++#define DEFAULT_SCOREBOARD "log/apache2/apache_runtime_status" + #endif + + /* Scoreboard info on a process is, for now, kept very brief --- diff --git a/net/apache/patches/004-pidfile_fix.patch b/net/apache/patches/004-pidfile_fix.patch deleted file mode 100644 index 647f821a..00000000 --- a/net/apache/patches/004-pidfile_fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: httpd-2.4.25/include/scoreboard.h -=================================================================== ---- httpd-2.4.25.orig/include/scoreboard.h -+++ httpd-2.4.25/include/scoreboard.h -@@ -40,7 +40,7 @@ extern "C" { - - /* Scoreboard file, if there is one */ - #ifndef DEFAULT_SCOREBOARD --#define DEFAULT_SCOREBOARD "logs/apache_runtime_status" -+#define DEFAULT_SCOREBOARD "log/apache_runtime_status" - #endif - - /* Scoreboard info on a process is, for now, kept very brief --- diff --git a/net/apache/patches/005-httpd_conf.patch b/net/apache/patches/005-httpd_conf.patch index 04a73a9e..9de32fe8 100644 --- a/net/apache/patches/005-httpd_conf.patch +++ b/net/apache/patches/005-httpd_conf.patch @@ -1,63 +1,13 @@ -Index: httpd-2.4.25/docs/conf/httpd.conf.in -=================================================================== ---- httpd-2.4.25.orig/docs/conf/httpd.conf.in -+++ httpd-2.4.25/docs/conf/httpd.conf.in -@@ -63,7 +63,6 @@ Listen @@Port@@ - # Example: - # LoadModule foo_module modules/mod_foo.so - # --@@LoadModule@@ - - - # -@@ -74,8 +73,8 @@ Listen @@Port@@ +--- a/docs/conf/httpd.conf.in ++++ b/docs/conf/httpd.conf.in +@@ -74,8 +74,8 @@ Listen @@Port@@ # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # -User daemon -Group daemon -+User nobody -+Group nogroup ++User apache ++Group apache -@@ -188,7 +187,7 @@ ErrorLog "@rel_logfiledir@/error_log" - # Possible values include: debug, info, notice, warn, error, crit, - # alert, emerg. - # --LogLevel warn -+LogLevel debug - - - # -@@ -330,7 +329,7 @@ LogLevel warn - # contents of the file itself to determine its type. The MIMEMagicFile - # directive tells the module where the hint definitions are located. - # --#MIMEMagicFile @rel_sysconfdir@/magic -+MIMEMagicFile @rel_sysconfdir@/magic - - # - # Customizable error responses come in three flavors: -@@ -360,7 +359,7 @@ LogLevel warn - # Defaults: EnableMMAP On, EnableSendfile Off - # - #EnableMMAP off --#EnableSendfile on -+EnableSendfile off - - # Supplemental configuration - # -@@ -411,8 +410,8 @@ Include @rel_sysconfdir@/extra/proxy-htm - # starting without SSL on platforms with no /dev/random equivalent - # but a statically compiled-in mod_ssl. - # -- --SSLRandomSeed startup builtin --SSLRandomSeed connect builtin -- -+# -+#SSLRandomSeed startup builtin -+#SSLRandomSeed connect builtin -+# - diff --git a/net/apache/patches/010-reproducible-builds.patch b/net/apache/patches/010-reproducible-builds.patch index 7a5324b6..8d73efec 100644 --- a/net/apache/patches/010-reproducible-builds.patch +++ b/net/apache/patches/010-reproducible-builds.patch @@ -5,10 +5,8 @@ Author: Jean-Michel Vourgère Forwarded: no Last-Update: 2015-08-11 -Index: apache2/server/buildmark.c -=================================================================== ---- apache2.orig/server/buildmark.c -+++ apache2/server/buildmark.c +--- a/server/buildmark.c ++++ b/server/buildmark.c @@ -17,11 +17,7 @@ #include "ap_config.h" #include "httpd.h" @@ -22,16 +20,14 @@ Index: apache2/server/buildmark.c AP_DECLARE(const char *) ap_get_server_built() { -Index: apache2/server/Makefile.in -=================================================================== ---- apache2.orig/server/Makefile.in -+++ apache2/server/Makefile.in +--- a/server/Makefile.in ++++ b/server/Makefile.in @@ -1,3 +1,4 @@ +export LC_ALL = C CLEAN_TARGETS = gen_test_char test_char.h \ ApacheCoreOS2.def httpd.exp export_files \ -@@ -80,8 +81,8 @@ httpd.exp: exports.c export_vars.h +@@ -87,8 +88,8 @@ httpd.exp: exports.c export_vars.h @echo "#! ." > $@ @echo "* This file was AUTOGENERATED at build time." >> $@ @echo "* Please do not edit by hand." >> $@ diff --git a/net/apcupsd/Makefile b/net/apcupsd/Makefile index da18a0e1..00f33d51 100644 --- a/net/apcupsd/Makefile +++ b/net/apcupsd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apcupsd PKG_VERSION:=3.14.14 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_MAINTAINER:=Othmar Truniger PKG_LICENSE:=GPL-2.0 @@ -18,6 +18,7 @@ PKG_LICENSE_FILES:=COPYING PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/apcupsd PKG_HASH:=db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867 +PKG_CPE_ID:=cpe:/a:apc:apcupsd PKG_BUILD_DEPENDS:=libgd @@ -39,6 +40,8 @@ define Package/apcupsd-cgi URL:=http://www.apcupsd.org/ endef +CONFIGURE_VARS += SHUTDOWN=/sbin/halt SCRIPTSHELL=/bin/sh WALL=/bin/true APCUPSD_MAIL=/bin/true + define Build/Configure $(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/ $(call Build/Configure/Default, \ diff --git a/net/apcupsd/files/apccontrol b/net/apcupsd/files/apccontrol index 25493541..740298f3 100644 --- a/net/apcupsd/files/apccontrol +++ b/net/apcupsd/files/apccontrol @@ -20,7 +20,7 @@ exec_prefix=/usr APCPID=/var/run/apcupsd.pid APCUPSD=/usr/sbin/apcupsd -SHUTDOWN=/sbin/shutdown +SHUTDOWN=/sbin/halt SCRIPTSHELL=/bin/sh SCRIPTDIR=/etc/apcupsd WALL=true @@ -101,11 +101,11 @@ case "$1" in ;; doreboot) echo "UPS ${2} initiating Reboot Sequence" | ${WALL} - ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot" + echo "apcupsd UPS ${2} initiated reboot" && /sbin/reboot ;; doshutdown) echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} - ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown" + echo "apcupsd UPS ${2} initiated shutdown" && /sbin/halt ;; annoyme) echo "Power problems with UPS ${2}. Please logoff." | ${WALL} diff --git a/net/apcupsd/patches/015-drop-doc.patch b/net/apcupsd/patches/015-drop-doc.patch new file mode 100644 index 00000000..fb90b22c --- /dev/null +++ b/net/apcupsd/patches/015-drop-doc.patch @@ -0,0 +1,10 @@ +--- a/Makefile.orig 2019-04-04 18:19:45.007668656 +0200 ++++ a/Makefile 2019-04-04 18:23:00.723165465 +0200 +@@ -1,6 +1,6 @@ + topdir:=. + +-SUBDIRS=src platforms doc ++SUBDIRS=src platforms + include autoconf/targets.mak + + # Force platforms/ to build after src/ diff --git a/net/apfree-wifidog/Makefile b/net/apfree-wifidog/Makefile new file mode 100644 index 00000000..370ba70b --- /dev/null +++ b/net/apfree-wifidog/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2018 Dengfeng Liu +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=apfree-wifidog +PKG_VERSION:=3.11.1716 +PKG_RELEASE:=4 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/liudf0716/apfree_wifidog.git +PKG_SOURCE_VERSION:=$(PKG_VERSION) +PKG_MIRROR_HASH:=76eda57e40b919091281305344bc57fc732a779d7944f57bd5de87914ba127d1 + +PKG_MAINTAINER:=Dengfeng Liu +PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/apfree-wifidog + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + DEPENDS:=+zlib +iptables-mod-extra +iptables-mod-ipopt +kmod-ipt-nat +iptables-mod-nat-extra \ + +libjson-c +ipset +libip4tc +libevent2 +libevent2-openssl +libuci +px5g + TITLE:=Apfree's wireless captive portal solution + URL:=https://github.com/liudf0716/apfree_wifidog +endef + +define Package/apfree-wifidog/description + The ApFree Wifidog project is a complete and embeddable captive portal + solution for wireless community groups or individuals who wish to open a free + Hotspot while still preventing abuse of their Internet connection. + It's enhanced wifidog +endef + +define Package/apfree-wifidog/conffiles +/etc/config/wifidogx +endef + +define Package/apfree-wifidog/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidogx $(1)/usr/bin/wifidogx + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctlx $(1)/usr/bin/wdctlx + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) ./files/wdping $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html.front $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html.rear $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/authserver-offline.html $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/internet-offline.html $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/wifidogx.init $(1)/etc/init.d/wifidogx + $(INSTALL_DIR) $(1)/etc/config + $(CP) ./files/wifidogx.conf $(1)/etc/config/wifidogx +endef + +$(eval $(call BuildPackage,apfree-wifidog)) diff --git a/net/apfree-wifidog/README.md b/net/apfree-wifidog/README.md new file mode 100644 index 00000000..7c2dea6e --- /dev/null +++ b/net/apfree-wifidog/README.md @@ -0,0 +1,125 @@ +![ApFreeWiFiDog](https://github.com/liudf0716/apfree_wifidog/blob/master/logo.png) + + +[![license][1]][2] +[![PRs Welcome][3]][4] +[![Issue Welcome][5]][6] +[![Release Version][7]][8] +[![OpenWRT][11]][12] +[![Join the QQ Group][15]][16] + + +[1]: https://img.shields.io/badge/license-GPLV3-brightgreen.svg?style=plastic +[2]: https://github.com/liudf0716/apfree_wifidog/blob/master/COPYING +[3]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=plastic +[4]: https://github.com/liudf0716/apfree_wifidog/pulls +[5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=plastic +[6]: https://github.com/liudf0716/apfree_wifidog/issues/new +[7]: https://img.shields.io/badge/release-3.11.1716-red.svg?style=plastic +[8]: https://github.com/liudf0716/apfree_wifidog/releases +[11]: https://img.shields.io/badge/Platform-%20OpenWRT%7C%20LEDE%20-brightgreen.svg?style=plastic +[12]: https://github.com/KunTengRom/kunteng-lede-17.01.4 +[13]: https://img.shields.io/badge/KunTeng-Inside-blue.svg?style=plastic +[14]: https://www.kunteng.org.cn +[15]: https://img.shields.io/badge/chat-qq%20group-brightgreen.svg +[16]: https://jq.qq.com/?_wv=1027&k=4ADDSev + +## ApFree WiFiDog: A high performance captive portal solution for HTTP(s) + +ApFree WiFiDog is a high performance captive portal solution for HTTP(s), which mainly used in ([LEDE](https://github.com/lede-project/source)&[Openwrt](https://github.com/openwrt/openwrt)) platform. + + +**[中文介绍](https://github.com/liudf0716/apfree_wifidog/blob/master/README_ZH.md)** + +## Enhancement of apfree-wifidog + +In fact, the title should be why we choose apfree-wifidog, the reason was the following: + +> Stable + +apfree-wifidog was widely used in tens of thousands device, which were running in business scene. In order to improve its stable, we rewrite all iptables rule by api instead of fork call, which will easily cause deadlock in multithread-fork running environment. we also re-write the code and replace libhttpd (which unmaitained for years) with libevent + +> Performance + +apfree-wifidog's http request-response is more quick, u can find statistic data in our test document + +> HTTPs redirect + +apfree-wifidog support https redirect, in current internet environment, captive portal solution without supporting https redirect will become unsuitable gradually + + +> More features + +apfree-wifidog support mac temporary-pass, ip,domain,pan-domain,white-mac,black-mac rule and etc. all these rules can be applied without restarting wifidog + +> MQTT support + +by enable mqtt support, u can remotely deliver such as trusted ip, domian and pan-domain rules to apfree wifidog + +> Compitable with wifidog protocol + +u don't need to modify your wifidog authentication server to adapt apfree-wifidog; if u have pression on server-side, apfree wifidog's improved protocol can greatly relieve it, which disabled by default + + +## Getting started + +before starting apfree-wifidog, we must know how to configure it. apfree-wifidog use OpenWrt standard uci config system, all your apfree-wifidog configure information stored in `/etc/confg/wifidogx`, which will be parsed by `/etc/init.d/wifidogx` to /tmp/wifidog.conf, apfree-wifidog's real configure file is `/tmp/wifidog.conf` + +The default apfree-wifidog UCI configuration file like this: + +``` +config wifidog + option gateway_interface 'br-lan' + option auth_server_hostname 'wifidog.kunteng.org.cn' + option auth_server_port 443 + option auth_server_path '/wifidog/' + option check_interval 60 + option client_timeout 5 + option apple_cna 1 + option thread_number 5 + option wired_passed 0 + option enable 0 +``` + +> auth_server_hostname was apfree-wifidog auth server, it can be domain or ip; wifidog.kunteng.org.cn is a free auth server we provided, it was also [open source](https://github.com/wificoin-project/wwas) + +> apple_cna 1 apple captive detect deceive; 2 apple captive detect deceive to disallow portal page appear + +> wired_passed means whether LAN access devices need to auth or not, value 1 means no need to auth + +> enable means whether start apfree-wifidog when we executed `/etc/init.d/wifidogx start`, if u wanted to start apfree-wifidog, you must set enable to 1 before executing `/etc/init.d/wifidogx start` + +### How to support https redirect + +In order to support https redirect, apfree-wifidog need x509 pem cert and private key, u can generate youself like this: + +``` +PX5G_BIN="/usr/sbin/px5g" +OPENSSL_BIN="/usr/bin/openssl" +APFREE_CERT="/etc/apfree.crt" +APFREE_KEY="/etc/apfree.key" + +generate_keys() { + local days bits country state location commonname + + # Prefer px5g for certificate generation (existence evaluated last) + local GENKEY_CMD="" + local UNIQUEID=$(dd if=/dev/urandom bs=1 count=4 | hexdump -e '1/1 "%02x"') + [ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -sha256 -outform pem -nodes" + [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -pem" + [ -n "$GENKEY_CMD" ] && { + $GENKEY_CMD \ + -days ${days:-730} -newkey rsa:${bits:-2048} -keyout "${APFREE_KEY}.new" -out "${APFREE_CERT}.new" \ + -subj /C="${country:-CN}"/ST="${state:-localhost}"/L="${location:-Unknown}"/O="${commonname:-ApFreeWiFidog}$UNIQUEID"/CN="${commonname:-ApFreeWiFidog}" + sync + mv "${APFREE_KEY}.new" "${APFREE_KEY}" + mv "${APFREE_CERT}.new" "${APFREE_CERT}" + } +} + +``` + +or when u start `/etc/init.d/wifidogx start`, it will generate it automatically + + +For more information, please refer to the upstream [project page](https://github.com/liudf0716/apfree_wifidog) diff --git a/net/apfree-wifidog/files/wdping b/net/apfree-wifidog/files/wdping new file mode 100644 index 00000000..1174e1ac --- /dev/null +++ b/net/apfree-wifidog/files/wdping @@ -0,0 +1,7 @@ +#!/bin/sh +IP=$1 +[ -x /usr/sbin/fping ] && { + fping -t 100 -c 1 $IP &> /dev/null && echo 1 || echo 0 +} || { + ping -w 1 -c 1 $IP &> /dev/null && echo 1 || echo 0 +} diff --git a/net/apfree-wifidog/files/wifidogx.conf b/net/apfree-wifidog/files/wifidogx.conf new file mode 100644 index 00000000..b9cff567 --- /dev/null +++ b/net/apfree-wifidog/files/wifidogx.conf @@ -0,0 +1,9 @@ +config wifidog + option gateway_interface 'br-lan' + option auth_server_hostname 'change wifidog.kunteng.org.cn to your auth server domain or ip' + option auth_server_port 443 + option auth_server_path '/wifidog/' + option check_interval 60 + option client_timeout 5 + option wired_passed 0 + option disabled 1 diff --git a/net/apfree-wifidog/files/wifidogx.init b/net/apfree-wifidog/files/wifidogx.init new file mode 100644 index 00000000..b537c0ce --- /dev/null +++ b/net/apfree-wifidog/files/wifidogx.init @@ -0,0 +1,285 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2018 Dengfeng Liu + +. /lib/functions/network.sh + +START=99 + +USE_PROCD=1 +PROG=/usr/bin/wifidogx +CONFIGFILE=/tmp/wifidogx.conf + +EXTRA_COMMANDS="status" +EXTRA_HELP=" status Print the status of the service" + +PX5G_BIN="/usr/sbin/px5g" +OPENSSL_BIN="/usr/bin/openssl" +APFREE_CERT="/etc/apfree.crt" +APFREE_KEY="/etc/apfree.key" + +generate_keys() { + local days bits country state location commonname + local UNIQUEID GENKEY_CMD + + # Prefer px5g for certificate generation (existence evaluated last) + UNIQUEID=$(hexdump -n 4 -e '4/1 "%02x" "\n"' /dev/urandom) + [ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -sha256 -outform pem -nodes" + [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -pem" + [ -n "$GENKEY_CMD" ] && { + $GENKEY_CMD \ + -days "${days:-720}" -newkey rsa:"${bits:-2048}" -keyout "${APFREE_KEY}.new" -out "${APFREE_CERT}.new" \ + -subj /C="${country:-CN}"/ST="${state:-Beijing}"/L="${location:-Unknown}"/O="${commonname:-ApFreeWiFidog}$UNIQUEID"/CN="${commonname:-ApFreeWiFidog}" + sync + mv "${APFREE_KEY}.new" "${APFREE_KEY}" + mv "${APFREE_CERT}.new" "${APFREE_CERT}" + } +} + +service_trigger() { + procd_add_reload_trigger "wifidogx" +} + +echo_firewall_rule() { + echo " FirewallRule $1" +} + +prepare_mqtt_conf() { + local cfg=$1 + local serveraddr + local serverport + + config_get serveraddr "$cfg" "serveraddr" + config_get serverport "$cfg" "serverport" + [ -z "${serveraddr}" ] || [ -z "${serverport}" ] && return 1 + + cat <<-EOF >>${CONFIGFILE} + MQTT { + ServerAddr ${serveraddr} + ServerPort ${serverport} + } + EOF +} + +prepare_wifidog_conf() { + local cfg=$1 + local enable + local gateway_id + local gateway_interface + local auth_server_hostname + local auth_server_path + local auth_server_path_login + local auth_server_path_portal + local auth_server_path_msg + local auth_server_path_ping + local auth_server_path_auth + local delta_traffic + local check_interval + local client_timeout + local trusted_domains + local js_filter + local trusted_maclist + local untrusted_maclist + local pool_mode + local thread_number + local queue_size + local wired_passed + local trusted_iplist + local trusted_pan_domains + local proxy_port + local no_auth + local apple_cna + local update_domain_interval + local dns_timeout + local default_gateway_id + local external_interface + local auth_server_port + + [ -f ${CONFIGFILE} ] && rm -f ${CONFIGFILE} + + config_get enable "${cfg}" "disabled" 0 + if [ "${enable}" = "0" ]; then + echo "wifidogx disabled in /etc/config/wifidogx file, please set disabled to 0 to enable it" >&2 + return + fi + + default_gateway_id=$(sed -e 's/://g' /sys/class/net/br-lan/address) + + network_get_device external_interface wan + + config_get gateway_id "${cfg}" "gateway_id" "${default_gateway_id}" + config_get gateway_interface "${cfg}" "gateway_interface" "br-lan" + config_get auth_server_hostname "${cfg}" "auth_server_hostname" + config_get auth_server_port "${cfg}" "auth_server_port" "80" + config_get auth_server_path "${cfg}" "auth_server_path" "/wifidog/" + config_get auth_server_path_login "${cfg}" "auth_server_path_login" + config_get auth_server_path_portal "${cfg}" "auth_server_path_portal" + config_get auth_server_path_msg "${cfg}" "auth_server_path_msg" + config_get auth_server_path_ping "${cfg}" "auth_server_path_ping" + config_get auth_server_path_auth "${cfg}" "auth_server_path_auth" + config_get delta_traffic "${cfg}" "delta_traffic" + config_get check_interval "${cfg}" "check_interval" "60" + config_get js_filter "${cfg}" "js_filter" 1 + config_get client_timeout "${cfg}" "client_timeout" "5" + config_get trusted_domains "${cfg}" "trusted_domains" + config_get trusted_maclist "${cfg}" "trusted_maclist" + config_get untrusted_maclist "${cfg}" "untrusted_maclist" + config_get pool_mode "${cfg}" "pool_mode" 0 + config_get thread_number "${cfg}" "thread_number" 20 + config_get queue_size "${cfg}" "queue_size" 200 + config_get wired_passed "${cfg}" "wired_passed" 1 + config_get trusted_iplist "${cfg}" "trusted_iplist" + config_get trusted_pan_domains "${cfg}" "trusted_pan_domains" + config_get proxy_port "${cfg}" "proxy_port" + config_get no_auth "${cfg}" "no_auth" + config_get apple_cna "${cfg}" "bypass_apple_cna" + config_get update_domain_interval "${cfg}" "update_domain_interval" + config_get dns_timeout "${cfg}" "dns_timeout" + + local set_auth_server_path_login + local set_auth_server_path_portal + local set_auth_server_path_msg + local set_auth_server_path_ping + local set_auth_server_path_auth + local set_delta_traffic + local set_trusted_maclist + local set_untrusted_maclist + local set_trusted_domains + local set_trusted_iplist + local set_trusted_pan_domains + local set_proxy_port + local set_no_auth + local set_firewall_rule_global + local set_firewall_rule_validating_users + local set_firewall_rule_known_users + local set_firewall_rule_auth_is_down + local set_firewall_rule_unknown_users + local set_firewall_rule_locked_users + local set_apple_cna + local set_update_domain_interval + local set_dns_timeout + + set_auth_server_path_login=$([ -n "$auth_server_path_login" ] && echo " LoginScriptPathFragment $auth_server_path_login") + set_auth_server_path_portal=$([ -n "$auth_server_path_portal" ] && echo " PortalScriptPathFragment $auth_server_path_portal") + set_auth_server_path_msg=$([ -n "$auth_server_path_msg" ] && echo " MsgScriptPathFragment $auth_server_path_msg") + set_auth_server_path_ping=$([ -n "$auth_server_path_ping" ] && echo " PingScriptPathFragment $auth_server_path_ping") + set_auth_server_path_auth=$([ -n "$auth_server_path_auth" ] && echo " AuthScriptPathFragment $auth_server_path_auth") + set_delta_traffic=$([ -n "$delta_traffic" ] && echo "DeltaTraffic $delta_traffic") + set_trusted_maclist=$([ -n "$trusted_maclist" ] && echo "TrustedMACList $trusted_maclist") + set_untrusted_maclist=$([ -n "$untrusted_maclist" ] && echo "UntrustedMACList $untrusted_maclist") + set_trusted_domains=$([ -n "$trusted_domains" ] && echo "TrustedDomains $trusted_domains") + set_trusted_iplist=$([ -n "$trusted_iplist" ] && echo "TrustedIpList $trusted_iplist") + set_trusted_pan_domains=$([ -n "$trusted_pan_domains" ] && echo "TrustedPanDomains $trusted_pan_domains") + set_proxy_port=$([ -n "$proxy_port" ] && echo "Proxyport $proxy_port") + set_no_auth=$([ -n "$no_auth" ] && echo "NoAuth $no_auth") + set_firewall_rule_global=$(config_list_foreach "$cfg" "firewall_rule_global" echo_firewall_rule) + set_firewall_rule_validating_users=$(config_list_foreach "$cfg" "firewall_rule_validating_users" echo_firewall_rule) + set_firewall_rule_known_users=$(config_list_foreach "$cfg" "firewall_rule_known_users" echo_firewall_rule) + set_firewall_rule_auth_is_down=$(config_list_foreach "$cfg" "firewall_rule_auth_is_down" echo_firewall_rule) + set_firewall_rule_unknown_users=$(config_list_foreach "$cfg" "firewall_rule_unknown_users" echo_firewall_rule) + set_firewall_rule_locked_users=$(config_list_foreach "$cfg" "firewall_rule_locked_users" echo_firewall_rule) + set_apple_cna=$([ -n "$apple_cna" ] && echo "BypassAppleCNA $apple_cna") + set_update_domain_interval=$([ -n "$update_domain_interval" ] && echo "UpdateDomainInterval $update_domain_interval") + set_dns_timeout=$([ -n "$dns_timeout" ] && echo "DNSTimeout $dns_timeout") + + cat <<-EOF >$CONFIGFILE + GatewayID $gateway_id + GatewayInterface $gateway_interface + Externalinterface $external_interface + + AuthServer { + Hostname $auth_server_hostname + HTTPPort $auth_server_port + Path $auth_server_path + $set_auth_server_path_login + $set_auth_server_path_portal + $set_auth_server_path_msg + $set_auth_server_path_ping + $set_auth_server_path_auth + } + + $set_delta_traffic + CheckInterval $check_interval + ClientTimeout $client_timeout + JsFilter $js_filter + WiredPassed $wired_passed + $set_trusted_domains + $set_untrusted_maclist + $set_trusted_maclist + $set_trusted_iplist + $set_trusted_pan_domains + $set_proxy_port + $set_no_auth + $set_apple_cna + $set_update_domain_interval + $set_dns_timeout + + FirewallRuleSet global { + $set_firewall_rule_global + } + + FirewallRuleSet validating-users { + $set_firewall_rule_validating_users + FirewallRule allow to 0.0.0.0/0 + } + + FirewallRuleSet known-users { + $set_firewall_rule_known_users + FirewallRule allow to 0.0.0.0/0 + } + + FirewallRuleSet auth-is-down { + $set_firewall_rule_auth_is_down + } + + FirewallRuleSet unknown-users { + $set_firewall_rule_unknown_users + FirewallRule allow udp port 53 + FirewallRule allow tcp port 53 + FirewallRule allow udp port 67 + FirewallRule allow tcp port 67 + } + + FirewallRuleSet locked-users { + $set_firewall_rule_locked_users + FirewallRule block to 0.0.0.0/0 + } +EOF +} + +init_config() { + config_load wifidogx + config_foreach prepare_wifidog_conf wifidog + + if [ ! -f ${CONFIGFILE} ]; then + echo "no wifidogx.conf, exit..." >&2 + exit + fi + + if [ -s "${APFREE_CERT}" ] && [ -s "${APFREE_KEY}" ]; then + generate_keys + fi + + if [ -s ${APFREE_KEY} ] && [ -s ${APFREE_CERT} ]; then + echo "no cert or key, exit..." >&2 + exit + fi + + config_foreach prepare_mqtt_conf mqtt + + sed -i -e '/^$/d' ${CONFIGFILE} +} + +start_service() { + init_config + + procd_open_instance + # -f: run in foreground + procd_set_param command $PROG -c $CONFIGFILE -f -d 0 + procd_set_param respawn # respawn automatically if something died + procd_set_param file $CONFIGFILE + procd_close_instance +} + +status_service() { + /usr/bin/wdctlx status +} diff --git a/net/apfree-wifidog/patches/010-openssl-deprecated.patch b/net/apfree-wifidog/patches/010-openssl-deprecated.patch new file mode 100644 index 00000000..ece9ce34 --- /dev/null +++ b/net/apfree-wifidog/patches/010-openssl-deprecated.patch @@ -0,0 +1,18 @@ +--- a/src/gateway.c ++++ b/src/gateway.c +@@ -78,10 +78,14 @@ openssl_init(void) + ERR_load_crypto_strings(); + SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); +-#endif + debug (LOG_DEBUG, "Using OpenSSL version \"%s\"\nand libevent version \"%s\"\n", + SSLeay_version (SSLEAY_VERSION), + event_get_version ()); ++#else ++ debug (LOG_DEBUG, "Using OpenSSL version \"%s\"\nand libevent version \"%s\"\n", ++ OpenSSL_version (OPENSSL_VERSION), ++ event_get_version ()); ++#endif + } + + static void diff --git a/net/apinger/Makefile b/net/apinger/Makefile index e8ae8a81..1c52c757 100644 --- a/net/apinger/Makefile +++ b/net/apinger/Makefile @@ -8,23 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apinger -PKG_VERSION:=0.6.1 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_SOURCE_DATE:=2015-04-09 +PKG_SOURCE_VERSION:=78eb328721ba1a10571c19df95acddcb5f0c17c8 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/Jajcus/apinger.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=c7da72f7ec26eedd7fd8d224c0e10787b204f94e -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=c6739bef32568877ad63dbfa8e34b617a287e225a0344d4c41ba891e1f25d487 +PKG_SOURCE_URL:=https://github.com/Jajcus/apinger +PKG_MIRROR_HASH:=4ada1330fc5d0adc0216d141f5e3b494df7a4c6500bbffce1efeab3d58684f7e PKG_MAINTAINER:=Alex Samorukov -PKG_LICENSE:= GPL-2.0 +PKG_LICENSE:=GPL-2.0-only +PKG_REMOVE_FILES:=autogen.sh PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=0 include $(INCLUDE_DIR)/package.mk @@ -33,7 +32,6 @@ define Package/apinger CATEGORY:=Network TITLE:=Tool which monitors various IP devices by simple ICMP echo requests URL:=https://github.com/Jajcus/apinger - PKG_MAINTAINER:=Alex Samorukov endef define Package/apinger/description @@ -51,10 +49,6 @@ define Package/apinger/conffiles /etc/apinger.conf endef -define Build/Configure - $(call Build/Configure/Default) -endef - define Package/apinger/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apinger $(1)/usr/sbin/ diff --git a/net/apinger/patches/001-autoreconf.patch b/net/apinger/patches/001-autoreconf.patch deleted file mode 100644 index cb5bd454..00000000 --- a/net/apinger/patches/001-autoreconf.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- apinger-0.6.1/acinclude.m4 2003-10-21 12:44:48.000000000 +0000 -+++ apinger-0.6.1/acinclude.m4 2015-04-08 15:27:37.451903960 +0000 -@@ -39,9 +39,7 @@ - [$jk_inet_includes - $jk_icmp_includes]) - --AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,\ --struct icmp.icmp_cksum, struct icmp.icmp_seq,\ --struct icmp.icmp_id],[], -+AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,struct icmp.icmp_cksum, struct icmp.icmp_seq,struct icmp.icmp_id],[], - AC_MSG_ERROR(struct icmp not defined or not compatible), - [$jk_inet_includes - $jk_icmp_includes]) diff --git a/net/apinger/patches/002-run_as_user.patch b/net/apinger/patches/002-run_as_user.patch index 16d64acc..ca36e97a 100644 --- a/net/apinger/patches/002-run_as_user.patch +++ b/net/apinger/patches/002-run_as_user.patch @@ -1,6 +1,6 @@ ---- apinger-0.6.1/src/apinger.conf.orig 2015-04-08 16:05:24.558919722 +0000 -+++ apinger-0.6.1/src/apinger.conf 2015-04-08 16:07:47.089170236 +0000 -@@ -9,7 +9,7 @@ +--- a/src/apinger.conf ++++ b/src/apinger.conf +@@ -8,7 +8,7 @@ ## User and group the pinger should run as user "nobody" diff --git a/net/apinger/patches/003-no_docs.patch b/net/apinger/patches/003-no_docs.patch index c08f44de..ecfca2d7 100644 --- a/net/apinger/patches/003-no_docs.patch +++ b/net/apinger/patches/003-no_docs.patch @@ -1,5 +1,5 @@ ---- apinger-0.6.1/Makefile.am.orig 2015-04-08 16:47:40.999990050 +0000 -+++ apinger-0.6.1/Makefile.am 2015-04-08 16:48:07.565220137 +0000 +--- a/Makefile.am ++++ b/Makefile.am @@ -1,7 +1,7 @@ EXTRA_DIST = autogen.sh TODO BUGS diff --git a/net/apinger/patches/010-poll.patch b/net/apinger/patches/010-poll.patch new file mode 100644 index 00000000..760079e5 --- /dev/null +++ b/net/apinger/patches/010-poll.patch @@ -0,0 +1,24 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -23,7 +23,7 @@ AC_HEADER_SYS_WAIT + AC_CHECK_HEADERS([arpa/inet.h errno.h malloc.h \ + stddef.h stdlib.h string.h sys/socket.h \ + sys/time.h syslog.h unistd.h time.h \ +- assert.h sys/poll.h signal.h pwd.h grp.h stdarg.h\ ++ assert.h poll.h signal.h pwd.h grp.h stdarg.h\ + limits.h sys/wait.h sched.h sys/ioctl.h sys/uio.h]) + AC_HEADER_TIME + +--- a/src/apinger.c ++++ b/src/apinger.c +@@ -33,8 +33,8 @@ + #ifdef HAVE_SYS_WAIT_H + # include + #endif +-#ifdef HAVE_SYS_POLL_H +-# include ++#ifdef HAVE_POLL_H ++# include + #endif + #ifdef HAVE_ARPA_INET_H + # include diff --git a/net/aria2/Makefile b/net/aria2/Makefile index 961d076e..1573d8ee 100644 --- a/net/aria2/Makefile +++ b/net/aria2/Makefile @@ -8,14 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=aria2 PKG_VERSION:=1.35.0 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/ PKG_HASH:=1e2b7fd08d6af228856e51c07173cfcf987528f1ac97e04c5af4a47642617dfd PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 PKG_MAINTAINER:=Imre Kaloz , \ Hsing-Wang Liao @@ -86,6 +85,10 @@ CONFIGURE_ARGS += \ TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto TARGET_LDFLAGS += -Wl,--gc-sections -flto +define Package/aria2/conffiles +/etc/config/aria2 +endef + define Package/aria2/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aria2c $(1)/usr/bin diff --git a/net/ariang/Makefile b/net/ariang/Makefile index 7fac5e82..4f18bd61 100644 --- a/net/ariang/Makefile +++ b/net/ariang/Makefile @@ -1,27 +1,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ariang +PKG_VERSION:=1.1.6 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/mayswind/AriaNg-DailyBuild -PKG_SOURCE_DATE:=2018-02-21 -PKG_SOURCE_VERSION:=f71a67cbb034aebcd076db3fadc1b9d8cdc470c7 -PKG_MIRROR_HASH:=13b07acbe29a68929295a82deb5a0122d8a56e328f783b6bc1efe9c72b99a702 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/mayswind/AriaNg-DailyBuild/tar.gz/$(PKG_VERSION)? +PKG_HASH:=ac5a55f1549c5458dab4422ddf420055909e11d6e5ec8db0f13e52241f6c2917 +PKG_BUILD_DIR:=$(BUILD_DIR)/AriaNg-DailyBuild-$(PKG_VERSION) +PKG_MAINTAINER:=Ansuel Smith PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Ansuel Smith include $(INCLUDE_DIR)/package.mk -define Package/ariang +define Package/ariang/default SECTION:=net CATEGORY:=Network SUBMENU:=Download Manager - DEPENDS:=+uhttpd +aria2 - TITLE:=AriaNg is a web frontend making aria2 easier to use. - URL:=https://github.com/mayswind/AriaNg + DEPENDS:=+aria2 + TITLE:=AriaNg webui + URL:=https://ariang.mayswind.net PKGARCH:=all endef @@ -29,6 +29,20 @@ define Package/ariang/description AriaNg is a web frontend making aria2 easier to use. AriaNg is written in pure html & javascript, thus it does not need any compilers or runtime environment. endef +Package/ariang-nginx/description = $(Package/ariang/description) + +define Package/ariang + $(Package/ariang/default) + DEPENDS += +uhttpd + TITLE += for uhttpd webserver +endef + +define Package/ariang-nginx + $(Package/ariang/default) + DEPENDS += +nginx + TITLE += for nginx webserver +endef + define Build/Compile endef @@ -45,4 +59,13 @@ define Package/ariang/install $(1)/www/ariang endef +define Package/ariang-nginx/install + $(Package/ariang/install) + $(INSTALL_DIR) $(1)/etc/nginx/conf.d/ + $(INSTALL_BIN) ./files/ariang.locations $(1)/etc/nginx/conf.d/ + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/80_ariang-nginx-support $(1)/etc/uci-defaults/80_ariang-nginx-support +endef + $(eval $(call BuildPackage,ariang)) +$(eval $(call BuildPackage,ariang-nginx)) diff --git a/net/ariang/files/80_ariang-nginx-support b/net/ariang/files/80_ariang-nginx-support new file mode 100644 index 00000000..0a89ccd1 --- /dev/null +++ b/net/ariang/files/80_ariang-nginx-support @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -x /etc/init.d/nginx ] && /etc/init.d/nginx running && /etc/init.d/nginx reload + +exit 0 diff --git a/net/ariang/files/ariang.locations b/net/ariang/files/ariang.locations new file mode 100644 index 00000000..28b0a8ad --- /dev/null +++ b/net/ariang/files/ariang.locations @@ -0,0 +1,4 @@ +location /ariang { + index index.html; + alias /www/ariang/; +} \ No newline at end of file diff --git a/net/arp-scan/Makefile b/net/arp-scan/Makefile index 147bd429..f68cbf83 100644 --- a/net/arp-scan/Makefile +++ b/net/arp-scan/Makefile @@ -8,17 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=arp-scan -PKG_VERSION:=1.9-40-g69b2f70 +PKG_VERSION:=1.9.7 PKG_RELEASE:=1 -PKG_LICENSE:=GPL-3.0 -PKG_MAINTAINER:=Sergey Urushkin -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/royhills/arp-scan.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=69b2f70588565385f3a61d9b1f100f01747cd5e1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=1cfb670ddd1763dbf5c712aaefe4d6c4f825011969e36484e6c442794324f721 +PKG_SOURCE_URL:=https://codeload.github.com/royhills/arp-scan/tar.gz/$(PKG_VERSION)? +PKG_HASH:=e03c36e4933c655bd0e4a841272554a347cd0136faf42c4a6564059e0761c039 + +PKG_MAINTAINER:=Sergey Urushkin +PKG_LICENSE:=GPL-3.0-or-later PKG_FIXUP:=autoreconf @@ -27,13 +25,17 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk -define Package/arp-scan +define Package/arp-scan/default + SUBMENU:=arp-scan SECTION:=net CATEGORY:=Network + URL:=https://github.com/royhills/arp-scan +endef + +define Package/arp-scan +$(call Package/arp-scan/default) TITLE:=ARP scanner DEPENDS:=+libpcap - URL:=https://github.com/royhills/arp-scan - PKG_MAINTAINER:=Sergey Urushkin endef define Package/arp-scan/description @@ -45,4 +47,36 @@ define Package/arp-scan/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arp-scan $(1)/usr/bin/ endef +define Package/arp-scan/postinst +cat < -PKG_LICENSE:=GPL-2.0 +PKG_VERSION:=0.7.2 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=ae4c6f09cadb8d2150c3ce32d88f19036a54e8211f22d723e97864bb5e18f92d +PKG_HASH:=1ad080674e9f974217b3a703e7356c6c8446dc5e7b2014d0d06e1bfaa11b5041 + +PKG_MAINTAINER:=Daniel Danzberger +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=LICENSE + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -38,17 +43,18 @@ define Package/atftpd endef CONFIGURE_ARGS += \ + --disable-debug \ --disable-libwrap define Package/atftp/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/atftp $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atftp $(1)/usr/bin/ endef define Package/atftpd/install $(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/atftpd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)//usr/sbin/atftpd $(1)/usr/sbin/ endef $(eval $(call BuildPackage,atftp)) diff --git a/net/atftp/patches/04-cdefs.patch b/net/atftp/patches/04-cdefs.patch new file mode 100644 index 00000000..1d3f3e2e --- /dev/null +++ b/net/atftp/patches/04-cdefs.patch @@ -0,0 +1,22 @@ +--- a/argz.h ++++ b/argz.h +@@ -39,6 +39,7 @@ + #define _ARGZ_H 1 + + #include ++#include + + #define __need_error_t + #include +@@ -76,9 +77,9 @@ extern error_t argz_create_sep (__const char *__restrict __string, + + /* Returns the number of strings in ARGZ. */ + extern size_t __argz_count (__const char *__argz, size_t __len) +- __THROW __attribute_pure__; ++ __THROW; + extern size_t argz_count (__const char *__argz, size_t __len) +- __THROW __attribute_pure__; ++ __THROW; + + /* Puts pointers to each string in ARGZ into ARGV, which must be large enough + to hold them all. */ diff --git a/net/autossh/files/autossh.config b/net/autossh/files/autossh.config index 2147d537..faee881a 100644 --- a/net/autossh/files/autossh.config +++ b/net/autossh/files/autossh.config @@ -1,6 +1,6 @@ config autossh - option ssh '-i /etc/dropbear/id_rsa -N -T -R 2222:localhost:22 user@host' - option gatetime '0' - option monitorport '20000' - option poll '180' - option enabled '0' + option ssh '-i /etc/dropbear/id_rsa -N -T -R 2222:localhost:22 user@host' + option gatetime '0' + option monitorport '20000' + option poll '600' + option enabled '0' diff --git a/net/autossh/files/autossh.init b/net/autossh/files/autossh.init index fa44d05e..e21b3910 100644 --- a/net/autossh/files/autossh.init +++ b/net/autossh/files/autossh.init @@ -14,8 +14,6 @@ start_instance() { [ "$enabled" = 1 ] || exit 0 - export HOME=/root - export AUTOSSH_PATH=ssh export AUTOSSH_GATETIME="${gatetime:-30}" export AUTOSSH_POLL="${poll:-600}" service_start /usr/sbin/autossh -M ${monitorport:-20000} -f ${ssh} diff --git a/net/banip/Makefile b/net/banip/Makefile index 26a88014..7a8b8a08 100644 --- a/net/banip/Makefile +++ b/net/banip/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=banip -PKG_VERSION:=0.3.10 +PKG_VERSION:=0.3.11 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/banip/files/banip.service b/net/banip/files/banip.service index 45d1a62f..eab59cc3 100755 --- a/net/banip/files/banip.service +++ b/net/banip/files/banip.service @@ -29,7 +29,7 @@ if [ -x "${ban_logread}" ] then f_log "info" "log/banIP service started" "${ban_logread}" -f -e "${ban_sshdaemon}\|luci: failed login" | \ - { grep -qE "Exit before auth|luci: failed login|[0-9]+ \[preauth\]$"; [ $? -eq 0 ] && /etc/init.d/banip refresh; } + { grep -q "Exit before auth\|luci: failed login\|error: maximum authentication attempts exceeded"; [ $? -eq 0 ] && /etc/init.d/banip refresh; } else f_log "err" "can't start log/banIP service" fi diff --git a/net/banip/files/banip.sh b/net/banip/files/banip.sh index 0a0f4d0f..14c4e838 100755 --- a/net/banip/files/banip.sh +++ b/net/banip/files/banip.sh @@ -13,7 +13,7 @@ # LC_ALL=C PATH="/usr/sbin:/usr/bin:/sbin:/bin" -ban_ver="0.3.10" +ban_ver="0.3.11" ban_basever="" ban_enabled=0 ban_automatic="1" @@ -280,13 +280,16 @@ f_envcheck() # if [ -z "${ban_sshdaemon}" ] then - utils="dropbear sshd" + utils="sshd dropbear" for util in ${utils} do if [ -x "$(command -v "${util}")" ] then - ban_sshdaemon="${util}" - break + if [ "$("/etc/init.d/${util}" enabled; printf "%u" ${?})" -eq 0 ] + then + ban_sshdaemon="${util}" + break + fi fi done fi @@ -636,7 +639,13 @@ f_main() local src_name src_on src_url src_rset src_setipv src_settype src_ruletype src_cat src_log src_addon src_ts src_rc local wan_input wan_forward lan_input lan_forward target_src target_dst ssh_log luci_log - ssh_log="$(logread -e "${ban_sshdaemon}" | grep -o "${ban_sshdaemon}.*" | sed 's/:[0-9]*$//g')" + if [ "${ban_sshdaemon}" = "dropbear" ] + then + ssh_log="$(logread -e "${ban_sshdaemon}" | grep -o "${ban_sshdaemon}.*" | sed 's/:[0-9]*$//g')" + elif [ "${ban_sshdaemon}" = "sshd" ] + then + ssh_log="$(logread -e "${ban_sshdaemon}" | grep -o "${ban_sshdaemon}.*" | sed 's/ port.*$//g')" + fi luci_log="$(logread -e "luci: failed login" | grep -o "luci:.*")" mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)" mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)" @@ -748,7 +757,7 @@ f_main() done elif [ "${ban_sshdaemon}" = "sshd" ] then - src_addon="$(printf "%s\\n" "${ssh_log}" | grep -E "[0-9]+ \[preauth\]$" | awk 'match($0,/([0-9]{1,3}\.){3}[0-9]{1,3}$/){ORS=" ";print substr($0,RSTART,RLENGTH)}')" + src_addon="$(printf "%s\\n" "${ssh_log}" | grep -F "error: maximum authentication attempts exceeded" | awk 'match($0,/([0-9]{1,3}\.){3}[0-9]{1,3}$/){ORS=" ";print substr($0,RSTART,RLENGTH)}')" fi src_addon="${src_addon} $(printf "%s\\n" "${luci_log}" | awk 'match($0,/([0-9]{1,3}\.){3}[0-9]{1,3}$/){ORS=" ";print substr($0,RSTART,RLENGTH)}')" ;; @@ -762,7 +771,7 @@ f_main() done elif [ "${ban_sshdaemon}" = "sshd" ] then - src_addon="$(printf "%s\\n" "${ssh_log}" | grep -E "[0-9]+ \[preauth\]$" | awk 'match($0,/(([0-9A-f]{0,4}::?){1,7}[0-9A-f]{0,4}$)/){ORS=" ";print substr($0,RSTART,RLENGTH)}')" + src_addon="$(printf "%s\\n" "${ssh_log}" | grep -F "error: maximum authentication attempts exceeded" | awk 'match($0,/(([0-9A-f]{0,4}::?){1,7}[0-9A-f]{0,4}$)/){ORS=" ";print substr($0,RSTART,RLENGTH)}')" fi src_addon="${src_addon} $(printf "%s\\n" "${luci_log}" | awk 'match($0,/(([0-9A-f]{0,4}::?){1,7}[0-9A-f]{0,4}$)/){ORS=" ";print substr($0,RSTART,RLENGTH)}')" ;; diff --git a/net/bcp38/Makefile b/net/bcp38/Makefile index 70ac63c8..c5ca8419 100644 --- a/net/bcp38/Makefile +++ b/net/bcp38/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bcp38 PKG_VERSION:=5 -PKG_RELEASE:=4 -PKG_LICENCE:=GPL-3.0+ +PKG_RELEASE:=6 +PKG_LICENCE:=GPL-3.0-or-later include $(INCLUDE_DIR)/package.mk @@ -20,6 +20,7 @@ define Package/bcp38 URL:=https://github.com/dtaht/ceropackages-3.10 MAINTAINER:=Toke Høiland-Jørgensen DEPENDS:=+ipset + PKGARCH:=all endef define Package/bcp38/description diff --git a/net/bcp38/files/bcp38.config b/net/bcp38/files/bcp38.config index fc785ebe..488daab6 100644 --- a/net/bcp38/files/bcp38.config +++ b/net/bcp38/files/bcp38.config @@ -3,8 +3,6 @@ config bcp38 option interface 'eth1' option detect_upstream 1 list match '127.0.0.0/8' - list match '0.0.0.0/8' # RFC 1700 - list match '240.0.0.0/4' # RFC 5745 list match '192.0.2.0/24' # RFC 5737 list match '198.51.100.0/24' # RFC 5737 list match '203.0.113.0/24' # RFC 5737 diff --git a/net/beanstalkd/Makefile b/net/beanstalkd/Makefile index db9d2573..3bedb09b 100644 --- a/net/beanstalkd/Makefile +++ b/net/beanstalkd/Makefile @@ -19,6 +19,7 @@ PKG_HASH:=6d5155ab347b731640495b1f0df6a4a849e84194d2ef0c2ec6af3879ee1aca2c PKG_MAINTAINER:=Philip Prindeville PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:wildbit:beanstalkd include $(INCLUDE_DIR)/package.mk diff --git a/net/bfdd/Makefile b/net/bfdd/Makefile new file mode 100644 index 00000000..6cd5beb8 --- /dev/null +++ b/net/bfdd/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2019 Lucian Cristian +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bfdd +PKG_SOURCE_DATE:=2019-08-22 +PKG_RELEASE:=2 + +PKG_SOURCE_VERSION:=c54534beb524afc3972039f57b56ec65332b43f7 +PKG_SOURCE_URL:=https://codeload.github.com/rzalamena/bfdd/tar.gz/$(PKG_SOURCE_VERSION)? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz +PKG_HASH:=8b65f502163aacfe43bb897464f3bf44bc5af4cc85d23b7c644e329abf89cc5f + +PKG_MAINTAINER:=Lucian Cristian +PKG_LICENSE:=GPL-2.0-or-later + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/bfdd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=BFD daemon + URL:=https://github.com/rzalamena/bfdd + DEPENDS:=+libevent2 +libjson-c +endef + +define Package/bfdd/description + A port of Cumulus BFD daemon to a more portable daemon. + + Bidirectional Forwarding Detection (BFD) is a network protocol that is used to + detect faults between two forwarding engines connected by a link. It provides + low-overhead detection of faults even on physical media that doesn't support + failure detection of any kind, such as Ethernet, virtual circuits, tunnels and + MPLS Label Switched Paths. +endef + +define Package/bfdd/conffiles +/etc/bfdd/bfdd.json +endef + +TARGET_CFLAGS += -D_GNU_SOURCE + +define Package/bfdd/install + $(INSTALL_DIR) \ + $(1)/usr/sbin \ + $(1)/etc/bfdd \ + $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/{bfdd,bfdctl} $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/bfdd.init $(1)/etc/init.d/bfdd + $(INSTALL_CONF) ./files/bfdd.template.json $(1)/etc/bfdd/bfdd.json +endef + +$(eval $(call BuildPackage,bfdd)) diff --git a/net/bfdd/files/bfdd.init b/net/bfdd/files/bfdd.init new file mode 100644 index 00000000..a1889c10 --- /dev/null +++ b/net/bfdd/files/bfdd.init @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common + +START=99 +STOP=10 +USE_PROCD=1 + +PROG="/usr/sbin/bfdd" +CONF="/etc/bfdd/bfdd.json" + +start_service() { + procd_open_instance + procd_set_param command $PROG -c $CONF + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param respawn + procd_close_instance +} diff --git a/net/bfdd/files/bfdd.template.json b/net/bfdd/files/bfdd.template.json new file mode 100644 index 00000000..344c64bc --- /dev/null +++ b/net/bfdd/files/bfdd.template.json @@ -0,0 +1,57 @@ +{ + "ipv4": [ + { + "_create-only": "optional, defaults to false", + "_create-only-help": "If create-only is true then bfdd will return failure if a peer with the same target exists", + "create-only": true, + + "_multihop": "optional defaults to false", + "multihop": false, + + "_peer-address": "mandatory", + "peer-address": "127.0.0.1", + + "_local-address": "mandatory on multihop", + "local-address": "127.0.0.1", + + "_local-interface": "optional", + "local-interface": "enp0s3", + + "_label": "optional", + "label": "peer1", + + "_vxlan": "optional, defaults to 0", + "vxlan": 100, + + "_vrf-name": "optional", + "vrf-name": "netns1", + + "_detect-multiplier": "optional, defaults to 3", + "detect-multiplier": 3, + + "_receive-interval": "optional, defaults to 300 milliseconds", + "receive-interval": 300, + + "_transmit-interval": "optional, defaults to 300 milliseconds", + "transmit-interval": 300, + + "_echo-interval": "optional, defaults to 50 milliseconds", + "echo-interval": 50, + + "_echo-mode": "optional, defaults to false", + "echo-mode": false, + + "_shutdown": "optional, defaults to false", + "shutdown": false + } + ], + "ipv6": [ + ], + "label": [ + { + "_label": "mandatory to identify the peer without addresses", + "_label-help": "peer must have been already created in ipv4 or ipv6", + "label": "peer1", + } + ] +} diff --git a/net/bfdd/patches/002-ipv6_musl_fix.patch b/net/bfdd/patches/002-ipv6_musl_fix.patch new file mode 100644 index 00000000..8ee41b93 --- /dev/null +++ b/net/bfdd/patches/002-ipv6_musl_fix.patch @@ -0,0 +1,10 @@ +--- a/bfd_packet.c 2019-08-15 02:45:47.270120616 +0300 ++++ b/bfd_packet.c 2019-08-15 02:44:38.266117706 +0300 +@@ -34,7 +34,6 @@ + #include + #include + #include +-#include + + #include + #include diff --git a/net/bfdd/patches/010-uclibc.patch b/net/bfdd/patches/010-uclibc.patch new file mode 100644 index 00000000..4c603efb --- /dev/null +++ b/net/bfdd/patches/010-uclibc.patch @@ -0,0 +1,13 @@ +diff --git a/bfd_packet.c b/bfd_packet.c +index e8f99f9..2c9fa91 100644 +--- a/bfd_packet.c ++++ b/bfd_packet.c +@@ -29,6 +29,8 @@ + #define _UAPI_IPV6_H + #endif /* _UAPI_IPV6_H */ + ++#define _GNU_SOURCE ++ + #include + #include + #include diff --git a/net/bind/Config.in b/net/bind/Config.in index ed373464..ab27b18e 100644 --- a/net/bind/Config.in +++ b/net/bind/Config.in @@ -1,19 +1,5 @@ if PACKAGE_bind-server -config BIND_ENABLE_FILTER_AAAA - bool - default y - prompt "Enable filtering of AAAA records returned to the client" - help - BIND 9 has an option to filter AAAA (IPv6 address) records - returned to the client based on the transport used for the - query, and other filtering conditions. This filtering does - not affect the recursive queries made by the server (if - any) as a result of the client request. - - Additional details are available at - https://kb.isc.org/article/AA-00576/0/Filter-AAAA-option-in-BIND-9-.html - config BIND_LIBJSON bool default n @@ -33,5 +19,4 @@ config BIND_LIBXML2 libxml2 is required to report server statistics in XML format. Building with libjson support will require the libxml2 package to be installed as well. - endif diff --git a/net/bind/Makefile b/net/bind/Makefile index 1005eae3..1cf1d375 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2006-2012 OpenWrt.org -# 2014-2017 Noah Meyerhans +# 2014-2020 Noah Meyerhans # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,36 +9,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bind -PKG_VERSION:=9.11.2-P1 -PKG_RELEASE:=1 +PKG_VERSION:=9.16.4 +PKG_RELEASE:=2 USERID:=bind=57:bind=57 PKG_MAINTAINER:=Noah Meyerhans -PKG_LICENSE := BSD-3-Clause +PKG_LICENSE:=MPL-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:isc:bind -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:= \ - http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \ - http://ftp.isc.org/isc/bind9/$(PKG_VERSION) -PKG_HASH:=cec31548832fca3f85d95178d4019b7d702039e8595d4c93914feba337df1212 + https://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \ + https://ftp.isc.org/isc/bind9/$(PKG_VERSION) +PKG_HASH:=7522088d3daac8bcabaae37998178e09139ef5ccae6631cb1d8a625b770f370a PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libtool.m4 PKG_INSTALL:=1 PKG_USE_MIPS16:=0 +PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS := \ - CONFIG_BIND_ENABLE_FILTER_AAAA \ CONFIG_BIND_LIBJSON \ CONFIG_BIND_LIBXML2 -ifdef CONFIG_BIND_LIBXML2 - PKG_BUILD_DEPENDS += libxml2 -endif -ifdef CONFIG_BIND_LIBJSON - PKG_BUILD_DEPENDS += libjson-c -endif +PKG_BUILD_DEPENDS += BIND_LIBXML2:libxml2 BIND_LIBJSON:libjson-c include $(INCLUDE_DIR)/package.mk @@ -54,27 +51,27 @@ endef define Package/bind-libs SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libopenssl +zlib + DEPENDS:=+libopenssl +zlib +libpthread +libatomic +libuv \ + +BIND_LIBXML2:libxml2 +BIND_LIBJSON:libjson-c TITLE:=bind shared libraries URL:=https://www.isc.org/software/bind -ifdef CONFIG_BIND_LIBJSON - DEPENDS+= +libjson-c -endif -ifdef CONFIG_BIND_LIBXML2 - DEPENDS+= +libxml2 -endif endef define Package/bind-server $(call Package/bind/Default) TITLE+= DNS server - DEPENDS+= +@OPENSSL_WITH_DEPRECATED endef define Package/bind-server/config source "$(SOURCE)/Config.in" endef +define Package/bind-server-filter-aaaa + $(call Package/bind-server) + DEPENDS:=bind-server + TITLE+= filter AAAA plugin +endef + define Package/bind-client $(call Package/bind/Default) TITLE+= dynamic DNS client @@ -83,6 +80,13 @@ endef define Package/bind-tools $(call Package/bind/Default) TITLE+= administration tools (all) + DEPENDS:= \ + +bind-check \ + +bind-dig \ + +bind-nslookup \ + +bind-dnssec \ + +bind-host \ + +bind-rndc endef define Package/bind-rndc @@ -110,40 +114,40 @@ define Package/bind-dig TITLE+= DNS excavation tool endef +define Package/bind-nslookup + $(call Package/bind/Default) + TITLE+= nslookup utility + ALTERNATIVES:= \ + 200:/usr/bin/nslookup:/usr/libexec/nslookup-bind +endef + export BUILD_CC="$(TARGET_CC)" +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --with-randomdev="/dev/urandom" \ - --disable-threads \ --disable-linux-caps \ --with-openssl="$(STAGING_DIR)/usr" \ --with-libtool \ --without-lmdb \ - --enable-epoll=yes \ - --with-gost=no \ - --with-gssapi=no \ - --with-ecdsa=$(if $(CONFIG_OPENSSL_WITH_EC),yes,no) \ - --with-readline=no \ + --enable-epoll \ + --without-gssapi \ + --without-readline \ + --without-python \ --sysconfdir=/etc/bind -ifdef CONFIG_BIND_ENABLE_FILTER_AAAA - CONFIGURE_ARGS += \ - --enable-filter-aaaa -endif - ifdef CONFIG_BIND_LIBJSON + TARGET_CFLAGS += -DHAVE_JSON_C -UHAVE_JSON CONFIGURE_ARGS += \ - --with-libjson="$(STAGING_DIR)/usr" + --with-json-c=yes else CONFIGURE_ARGS += \ - --with-libjson=no + --with-json-c=no endif ifdef CONFIG_BIND_LIBXML2 CONFIGURE_ARGS += \ - --with-libxml2="$(STAGING_DIR)/usr" + --with-libxml2=yes else CONFIGURE_ARGS += \ --with-libxml2=no @@ -177,6 +181,7 @@ define Package/bind-server/install ./files/bind/db.255 \ ./files/bind/db.local \ ./files/bind/db.root \ + ./files/bind/bind.keys \ $(1)/etc/bind/ $(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf $(INSTALL_DIR) $(1)/etc/init.d @@ -193,6 +198,11 @@ define Package/bind-server/conffiles /etc/bind/named.conf endef +define Package/bind-server-filter-aaaa/install + $(INSTALL_DIR) $(1)/usr/lib/named + $(CP) $(PKG_INSTALL_DIR)/usr/lib/named/filter-aaaa.so $(1)/usr/lib/named +endef + define Package/bind-client/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/ @@ -200,16 +210,7 @@ endef define Package/bind-tools/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-settime $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/delv $(1)/usr/bin/ endef define Package/bind-rndc/install @@ -241,8 +242,14 @@ define Package/bind-dig/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/ endef +define Package/bind-nslookup/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nslookup $(1)/usr/libexec/nslookup-bind +endef + $(eval $(call BuildPackage,bind-libs)) $(eval $(call BuildPackage,bind-server)) +$(eval $(call BuildPackage,bind-server-filter-aaaa)) $(eval $(call BuildPackage,bind-client)) $(eval $(call BuildPackage,bind-tools)) $(eval $(call BuildPackage,bind-rndc)) @@ -250,3 +257,4 @@ $(eval $(call BuildPackage,bind-check)) $(eval $(call BuildPackage,bind-dnssec)) $(eval $(call BuildPackage,bind-host)) $(eval $(call BuildPackage,bind-dig)) +$(eval $(call BuildPackage,bind-nslookup)) diff --git a/net/bind/files/bind/bind.keys b/net/bind/files/bind/bind.keys new file mode 100644 index 00000000..db22d4bc --- /dev/null +++ b/net/bind/files/bind/bind.keys @@ -0,0 +1,69 @@ +# The bind.keys file is used to override the built-in DNSSEC trust anchors +# which are included as part of BIND 9. As of the current release, the only +# trust anchors it contains are those for the DNS root zone ("."), and for +# the ISC DNSSEC Lookaside Validation zone ("dlv.isc.org"). Trust anchors +# for any other zones MUST be configured elsewhere; if they are configured +# here, they will not be recognized or used by named. +# +# The built-in trust anchors are provided for convenience of configuration. +# They are not activated within named.conf unless specifically switched on. +# To use the built-in root key, set "dnssec-validation auto;" in +# named.conf options. To use the built-in DLV key, set +# "dnssec-lookaside auto;". Without these options being set, +# the keys in this file are ignored. +# +# This file is NOT expected to be user-configured. +# +# These keys are current as of Feburary 2017. If any key fails to +# initialize correctly, it may have expired. In that event you should +# replace this file with a current version. The latest version of +# bind.keys can always be obtained from ISC at https://www.isc.org/bind-keys. + +managed-keys { + # ISC DLV: See https://www.isc.org/solutions/dlv for details. + # + # NOTE: The ISC DLV zone is being phased out as of February 2017; + # the key will remain in place but the zone will be otherwise empty. + # Configuring "dnssec-lookaside auto;" to activate this key is + # harmless, but is no longer useful and is not recommended. + dlv.isc.org. initial-key 257 3 5 "BEAAAAPHMu/5onzrEE7z1egmhg/WPO0+juoZrW3euWEn4MxDCE1+lLy2 + brhQv5rN32RKtMzX6Mj70jdzeND4XknW58dnJNPCxn8+jAGl2FZLK8t+ + 1uq4W+nnA3qO2+DL+k6BD4mewMLbIYFwe0PG73Te9fZ2kJb56dhgMde5 + ymX4BI/oQ+cAK50/xvJv00Frf8kw6ucMTwFlgPe+jnGxPPEmHAte/URk + Y62ZfkLoBAADLHQ9IrS2tryAe7mbBZVcOwIeU/Rw/mRx/vwwMCTgNboM + QKtUdvNXDrYJDSHZws3xiRXF1Rf+al9UmZfSav/4NWLKjHzpT59k/VSt + TDN0YUuWrBNh"; + + # ROOT KEYS: See https://data.iana.org/root-anchors/root-anchors.xml + # for current trust anchor information. + # + # These keys are activated by setting "dnssec-validation auto;" + # in named.conf. + # + # This key (19036) is to be phased out starting in 2017. It will + # remain in the root zone for some time after its successor key + # has been added. It will remain this file until it is removed from + # the root zone. + . initial-key 257 3 8 "AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjF + FVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoX + bfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL496M/QZxkjf5/Efucp2gaD + X6RS6CXpoY68LsvPVjR0ZSwzz1apAzvN9dlzEheX7ICJBBtuA6G3LQpz + W5hOA2hzCTMjJPJ8LbqF6dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relS + Qageu+ipAdTTJ25AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulq + QxA+Uk1ihz0="; + + # This key (20326) is to be published in the root zone in 2017. + # Servers which were already using the old key (19036) should + # roll seamlessly to this new one via RFC 5011 rollover. Servers + # being set up for the first time can use the contents of this + # file as initializing keys; thereafter, the keys in the + # managed key database will be trusted and maintained + # automatically. + . initial-key 257 3 8 "AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3 + +/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kv + ArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF + 0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+e + oZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfd + RUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwN + R1AkUTV74bU="; +}; diff --git a/net/bind/patches/001-no-tests.patch b/net/bind/patches/001-no-tests.patch index 2d0c152f..b21b563b 100644 --- a/net/bind/patches/001-no-tests.patch +++ b/net/bind/patches/001-no-tests.patch @@ -1,26 +1,11 @@ -Index: bind-9.10.4-P3/bin/Makefile.in -=================================================================== ---- bind-9.10.4-P3.orig/bin/Makefile.in -+++ bind-9.10.4-P3/bin/Makefile.in -@@ -10,7 +10,7 @@ srcdir = @srcdir@ - VPATH = @srcdir@ +--- a/bin/Makefile.in ++++ b/bin/Makefile.in +@@ -12,7 +12,7 @@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ --SUBDIRS = named rndc dig delv dnssec tools tests nsupdate \ -+SUBDIRS = named rndc dig delv dnssec tools nsupdate \ - check confgen @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ - TARGETS = - -Index: bind-9.10.4-P3/lib/Makefile.in -=================================================================== ---- bind-9.10.4-P3.orig/lib/Makefile.in -+++ bind-9.10.4-P3/lib/Makefile.in -@@ -14,7 +14,7 @@ top_srcdir = @top_srcdir@ - # Attempt to disable parallel processing. - .NOTPARALLEL: - .NO_PARALLEL: --SUBDIRS = isc isccc dns isccfg bind9 lwres irs tests samples -+SUBDIRS = isc isccc dns isccfg bind9 lwres irs samples + SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \ +- @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests ++ @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins TARGETS = @BIND9_MAKE_RULES@ diff --git a/net/bind/patches/002-autoconf-ar-fix.patch b/net/bind/patches/002-autoconf-ar-fix.patch deleted file mode 100644 index 878554fa..00000000 --- a/net/bind/patches/002-autoconf-ar-fix.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: bind-9.10.4-P3/configure.in -=================================================================== ---- bind-9.10.4-P3.orig/configure.in -+++ bind-9.10.4-P3/configure.in -@@ -157,26 +157,11 @@ esac - # - AC_CONFIG_FILES([make/rules make/includes]) - --AC_PATH_PROG(AR, ar) --ARFLAGS="cruv" --AC_SUBST(AR) --AC_SUBST(ARFLAGS) -- - # The POSIX ln(1) program. Non-POSIX systems may substitute - # "copy" or something. - LN=ln - AC_SUBST(LN) - --case "$AR" in -- "") -- AC_MSG_ERROR([ --ar program not found. Please fix your PATH to include the directory in --which ar resides, or set AR in the environment with the full path to ar. --]) -- -- ;; --esac -- - # - # Etags. - # diff --git a/net/bitlbee/Makefile b/net/bitlbee/Makefile index 91d5fcf1..2742766b 100644 --- a/net/bitlbee/Makefile +++ b/net/bitlbee/Makefile @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bitlbee -PKG_VERSION:=3.5.1 +PKG_VERSION:=3.6 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://get.bitlbee.org/src/ \ - http://distcache.FreeBSD.org/local-distfiles/brix/ -PKG_HASH:=9636d7fd89ebb3756c13a9a3387736ca6d56ccf66ec0580d512f07b21db0fa69 +PKG_SOURCE_URL:=https://get.bitlbee.org/src +PKG_HASH:=9f15de46f29b46bf1e39fc50bdf4515e71b17f551f3955094c5da792d962107e PKG_MAINTAINER:=Nikil Mehta -PKG_LICENSE:=GPL-2.0 +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:bitlbee:bitlbee PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -30,7 +31,7 @@ define Package/bitlbee CATEGORY:=Network SUBMENU:=Instant Messaging TITLE:=An IRC to other chat networks gateway - URL:=http://www.bitlbee.org/ + URL:=https://www.bitlbee.org/ DEPENDS:=+glib2 +libopenssl $(ICONV_DEPENDS) $(INTL_DEPENDS) endef @@ -58,7 +59,7 @@ define Build/Install $(call Build/Install/Default,install install-etc) endef -define Package/bitlbee/install +define Package/bitlbee/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bitlbee $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/bitlbee diff --git a/net/boinc/Makefile b/net/boinc/Makefile new file mode 100644 index 00000000..fb80e9aa --- /dev/null +++ b/net/boinc/Makefile @@ -0,0 +1,83 @@ +# Copyright 2020 by Christian Dreihsig and Steffen Möller +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=boinc +PKG_VERSION:=7.16.6 +PKG_VERSION_SHORT:=$(shell echo $(PKG_VERSION)| cut -f1,2 -d.) +PKG_RELEASE:=1 + +PKG_SOURCE_DATE:=2020-02-25 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/BOINC/boinc/tar.gz/client_release/$(PKG_VERSION_SHORT)/$(PKG_VERSION)? +PKG_HASH:=caa567da8d3eb50859efe2eeba1c23c7b27d3b0f15b548136e75302713b25303 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-client_release-$(PKG_VERSION_SHORT)-$(PKG_VERSION) + +PKG_MAINTAINER:=Christian Dreihsig , Steffen Moeller +PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:boinc_project:boinc + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=0 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/target.mk + +define Package/boinc + SECTION:=net + CATEGORY:=Network + TITLE:=BOINC client + DEPENDS:=+curl +bzip2 +libstdcpp +libopenssl +zlib + USERID:=boinc:boinc + URL:=https://github.com/BOINC/boinc/ +endef + +define Package/boinc/description + The Berkeley Open Infrastructure for Network Computing (BOINC) is a + software platform for distributed computing: several initiatives of + various scientific disciplines all compete for the idle time of + desktop computers. The developers' web site at the University of + Berkeley serves as a common portal to the otherwise independently run + projects. + + This package provides the BOINC core client program that is + required to participate in any project that uses BOINC to control what + projects to join and to determine constraints for the computation + like the percentage of CPU time. OpenWrt does not + provide the graphical BOINC Manager, but you can connect to this + machine from the BOINC Manager of your desktop computer. +endef + +CONFIGURE_ARGS += \ + --disable-server --disable-manager --enable-client --enable-libraries \ + --disable-boinczip --enable-install-headers --enable-dynamic-client-linkage \ + --with-boinc-platform=$(REAL_GNU_TARGET_NAME) \ + --with-boinc-alt-platform=$(ARCH)-$(BOARD)-$(DEVICE_TYPE)-openwrt-$(TARGET_SUFFIX) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/boinc + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/boinc/* $(1)/usr/include/boinc/ + $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/boinc/ # project_specific_defines.h, config.h, version.h, svn_version.h + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.a $(1)/usr/lib/ +endef + +define Package/boinc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/boinc-client.init $(1)/etc/init.d/boinc-client + $(INSTALL_DIR) $(1)/opt/boinc + $(INSTALL_DIR) $(1)/usr/share/boinc + $(CP) ./files/global_prefs_override.xml $(1)/usr/share/boinc/global_prefs_override.xml + $(CP) ./files/remote_hosts.cfg $(1)/usr/share/boinc/remote_hosts.cfg +endef + +$(eval $(call BuildPackage,boinc)) diff --git a/net/boinc/files/boinc-client.init b/net/boinc/files/boinc-client.init new file mode 100755 index 00000000..89892da3 --- /dev/null +++ b/net/boinc/files/boinc-client.init @@ -0,0 +1,53 @@ +#!/bin/sh /etc/rc.common + +START=99 +USE_PROCD=1 + +BOINCEXE_NAME=boinc_client +BOINCDIR=/opt/boinc/ +PRESETDIR=/usr/share/boinc +BOINCUSR=boinc +BOINCEXE_OPTS="--check_all_logins --redirectio --dir $BOINCDIR" +PID_FILE="/var/run/$BOINCEXE_NAME.pid" + +start_service() { + # First check that BOINCDIR exists + if ! [ -d "$BOINCDIR" ]; then + if ! mkdir -p $BOINCDIR 2>/dev/null ; then + echo "ERROR: $BOINCDIR doesn't exist and couldn't be created" + return 1 + fi + fi + + # adjust some presettings if necessary + for f in global_prefs_override.xml remote_hosts.cfg; do + if ! [ -f $BOINCDIR/$f ]; then + cp $PRESETDIR/$f $BOINCDIR + fi + done + + # and ensure it is accessible by boinc + BOINCDIR_OWNER="$(ls -ld $BOINCDIR | awk '{print $3}')" + if [ "$BOINCUSR" != "$BOINCDIR_OWNER" ] ; then + chown -R $BOINCUSR:$BOINCUSR $BOINCDIR + BOINCDIR_OWNER="$(ls -ld $BOINCDIR | awk '{print $3}')" + + if [ "$BOINCUSR" != "$BOINCDIR_OWNER" ] ; then + echo "User boinc can't access $BOINC_DIR" + return 3 + fi + fi + + # now use procd to start boinc + procd_open_instance $BOINCEXE_NAME + + procd_set_param command $BOINCEXE_NAME + procd_append_param command $BOINCEXE_OPTS + procd_set_param user $BOINCUSR + procd_set_param limits core="unlimited" + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param pidfile $PID_FILE + + procd_close_instance +} diff --git a/net/boinc/files/global_prefs_override.xml b/net/boinc/files/global_prefs_override.xml new file mode 100644 index 00000000..0554d41b --- /dev/null +++ b/net/boinc/files/global_prefs_override.xml @@ -0,0 +1,4 @@ + + 50.000000 + 21600.000000 + diff --git a/net/boinc/files/remote_hosts.cfg b/net/boinc/files/remote_hosts.cfg new file mode 100644 index 00000000..943aa76e --- /dev/null +++ b/net/boinc/files/remote_hosts.cfg @@ -0,0 +1,8 @@ +# This file contains a list of hostnames or IP addresses (one per line) +# of remote hosts, that are allowed to connect and to control the local +# BOINC core client via GUI RPCs. +# Lines beginning with a # or a ; are treated like comments and will be +# ignored. +# +#host.example.com +#192.168.0.180 diff --git a/net/boinc/patches/001-avoidExtraDependencies b/net/boinc/patches/001-avoidExtraDependencies new file mode 100644 index 00000000..ee914978 --- /dev/null +++ b/net/boinc/patches/001-avoidExtraDependencies @@ -0,0 +1,15 @@ +Index: boinc-client_release-7.16-7.16.5/configure.ac +=================================================================== +--- boinc-client_release-7.16-7.16.5.orig/configure.ac ++++ boinc-client_release-7.16-7.16.5/configure.ac +@@ -506,8 +506,10 @@ SAH_CHECK_LIB([dl], [dlopen], + [BOINC_EXTRA_LIBS="${BOINC_EXTRA_LIBS} ${sah_lib_last}"]) + SAH_CHECK_LIB([nsl], [gethostbyname], + [BOINC_EXTRA_LIBS="${BOINC_EXTRA_LIBS} ${sah_lib_last}"]) ++if test "${enable_manager}" = yes ; then + SAH_CHECK_LIB([freetype], [fopen], + [BOINC_EXTRA_LIBS="${BOINC_EXTRA_LIBS} ${sah_lib_last}"]) ++fi + SAH_CHECK_LIB([socket], [bind], + [BOINC_EXTRA_LIBS="${BOINC_EXTRA_LIBS} ${sah_lib_last}"]) + SAH_CHECK_LIB([z], [gzopen], diff --git a/net/boinc/patches/002-hosttypeRespected b/net/boinc/patches/002-hosttypeRespected new file mode 100644 index 00000000..6702b572 --- /dev/null +++ b/net/boinc/patches/002-hosttypeRespected @@ -0,0 +1,51 @@ +Index: boinc-client_release-7.16-7.16.6/client/cs_platforms.cpp +=================================================================== +--- boinc-client_release-7.16-7.16.6.orig/client/cs_platforms.cpp ++++ boinc-client_release-7.16-7.16.6/client/cs_platforms.cpp +@@ -76,6 +76,21 @@ void CLIENT_STATE::add_platform(const ch + // + void CLIENT_STATE::detect_platforms() { + ++// if specified - use it ++#ifdef HOSTTYPE ++ add_platform(HOSTTYPE); ++#endif ++ ++// if specified - use it ++#ifdef HOSTTYPEALT ++ add_platform(HOSTTYPEALT); ++#endif ++ ++// if both the hosttype and its alternative are specified, ++// there is no need to look further and one should go directly ++// to the inspection of the cc_config.xml data ++#if !defined(HOSTTYPE) || !defined(HOSTTYPEALT) ++ + #if defined(_WIN32) && !defined(__CYGWIN32__) + #if defined(_WIN64) && defined(_M_X64) + add_platform("windows_x86_64"); +@@ -206,15 +221,6 @@ void CLIENT_STATE::detect_platforms() { + add_platform("i686-pc-linux-gnu"); + } + +- if (!(support64 || support32)) { +- // Something went wrong. Assume HOSTTYPE and HOSTTYPEALT +- // are correct +- add_platform(HOSTTYPE); +-#ifdef HOSTTYPEALT +- add_platform(HOSTTYPEALT); +-#endif +- } +- + #elif defined(sun) + // Check if we can run 64-bit binaries... + // this assumes there isn't a 64-bit only solaris. (Every 64-bit solaris can run 32 bit binaries) +@@ -290,6 +296,8 @@ void CLIENT_STATE::detect_platforms() { + #endif + + #endif ++ ++#endif + + if (cc_config.no_alt_platform) { + PLATFORM p = platforms[0]; diff --git a/net/bonding/Makefile b/net/bonding/Makefile new file mode 100644 index 00000000..5c74d6b5 --- /dev/null +++ b/net/bonding/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2018 TDT AG +# +# This is free software, licensed under the GNU General Public License v2. +# See https://www.gnu.org/licenses/gpl-2.0.txt for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=proto-bonding +PKG_VERSION:=2020-03-30 +PKG_RELEASE:=1 + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:= + +PKG_MAINTAINER:=Helge Mader + +include $(INCLUDE_DIR)/package.mk + +define Package/proto-bonding + SECTION:=net + CATEGORY:=Network + TITLE:=Link Aggregation (Channel Bonding) proto handler + DEPENDS:=+kmod-bonding + PKGARCH:=all +endef + +define Package/proto-bonding/description + This package contains the channel bonding proto handler for netifd +endef + +define Build/Compile +endef + +define Package/proto-bonding/install + $(INSTALL_DIR) $(1)/lib/netifd/proto/ + $(INSTALL_BIN) ./files/lib/netifd/proto/bonding.sh \ + $(1)/lib/netifd/proto/ +endef + +$(eval $(call BuildPackage,proto-bonding)) diff --git a/net/bonding/files/lib/netifd/proto/bonding.sh b/net/bonding/files/lib/netifd/proto/bonding.sh new file mode 100755 index 00000000..556d7c82 --- /dev/null +++ b/net/bonding/files/lib/netifd/proto/bonding.sh @@ -0,0 +1,220 @@ +#!/bin/sh +# +# Copyright (C) 2018 TDT AG +# +# This is free software, licensed under the GNU General Public License v2. +# See https://www.gnu.org/licenses/gpl-2.0.txt for more information. +# + +. /lib/functions.sh +. ../netifd-proto.sh + +init_proto "$@" + +INCLUDE_ONLY=1 + +BONDING_MASTERS="/sys/class/net/bonding_masters" + +set_driver_values() { + local varname + + for varname in "$@"; do + local value + json_get_var value "$varname" + + [ -n "$value" ] && echo "$value" > /sys/class/net/"$link"/bonding/"$varname" + done +} + +proto_bonding_init_config() { + no_device=1 + available=1 + + proto_config_add_string "ifname" + + proto_config_add_string "ipaddr" + proto_config_add_string "netmask" + + proto_config_add_string "bonding_policy" + proto_config_add_string "link_monitoring" + proto_config_add_string "slaves" + proto_config_add_string "all_slaves_active" + + proto_config_add_string "min_links" + proto_config_add_string "ad_actor_sys_prio" + proto_config_add_string "ad_actor_system" + proto_config_add_string "ad_select" + proto_config_add_string "lacp_rate" + proto_config_add_string "packets_per_slave" + proto_config_add_string "xmit_hash_policy" + proto_config_add_string "primary" + proto_config_add_string "primary_reselect" + proto_config_add_string "lp_interval" + proto_config_add_string "tlb_dynamic_lb" + proto_config_add_string "resend_igmp" + proto_config_add_string "fail_over_mac" + proto_config_add_string "num_grat_arp__num_unsol_na" + + proto_config_add_string "arp_interval" + proto_config_add_string "arp_ip_target" + proto_config_add_string "arp_all_targets" + proto_config_add_string "arp_validate" + + proto_config_add_string "miimon" + proto_config_add_string "downdelay" + proto_config_add_string "updelay" + proto_config_add_string "use_carrier" +} + +proto_bonding_setup() { + local cfg="$1" + local link="bonding-$cfg" + + # Check for loaded kernel bonding driver (/sys/class/net/bonding_masters exists) + [ -f "$BONDING_MASTERS" ] || { + echo "$cfg" "setup: bonding_masters does not exist in sysfs (kernel module not loaded?)" + proto_notify_error "$cfg" BONDING_MASTER_DOES_NOT_EXIST + proto_block_restart "$cfg" + return + } + + # Add bonding interface to system + echo "+$link" > "$BONDING_MASTERS" + + # Set bonding policy (with corresponding parameters) + local bonding_policy + json_get_vars bonding_policy + + case "$bonding_policy" in + + 802.3ad) + echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode + set_driver_values min_links ad_actor_sys_prio ad_actor_system ad_select lacp_rate + ;; + + balance-rr) + echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode + set_driver_values packets_per_slave xmit_hash_policy + ;; + + balance-tlb) + echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode + set_driver_values primary primary_reselect lp_interval tlb_dynamic_lb resend_igmp xmit_hash_policy + ;; + + balance-alb) + echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode + set_driver_values primary primary_reselect lp_interval tlb_dynamic_lb resend_igmp xmit_hash_policy + ;; + + balance-xor) + echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode + set_driver_values xmit_hash_policy + ;; + + broadcast) + echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode + ;; + + active-backup) + echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode + set_driver_values primary primary_reselect fail_over_mac num_grat_arp__num_unsol_na xmit_hash_policy + ;; + esac + + # Set link monitoring (with corresponding parameters) + local link_monitoring + json_get_vars link_monitoring + + case "$link_monitoring" in + + arp) + local arp_interval arp_ip_target arp_all_targets arp_validate + json_get_vars arp_interval arp_ip_target arp_all_targets arp_validate + + [ -n "$arp_interval" -a "$arp_interval" != 0 ] && echo "$arp_interval" > /sys/class/net/"$link"/bonding/arp_interval + + IFS=' ' + for target in $arp_ip_target; do + echo "+$target" > /sys/class/net/"$link"/bonding/arp_ip_target + done + + [ -n "$arp_all_targets" ] && echo "$arp_all_targets" > /sys/class/net/"$link"/bonding/arp_all_targets + [ -n "$arp_validate" ] && echo "$arp_validate" > /sys/class/net/"$link"/bonding/arp_validate + ;; + + mii) + local miimon downdelay updelay use_carrier + json_get_vars miimon downdelay updelay use_carrier + + [ -n "$miimon" -a "$miimon" != 0 ] && echo "$miimon" > /sys/class/net/"$link"/bonding/miimon + [ -n "$downdelay" ] && echo "$downdelay" > /sys/class/net/"$link"/bonding/downdelay + [ -n "$updelay" ] && echo "$updelay" > /sys/class/net/"$link"/bonding/updelay + [ -n "$use_carrier" ] && echo "$use_carrier" > /sys/class/net/"$link"/bonding/use_carrier + ;; + esac + + # Add slaves to bonding interface + local slaves + json_get_vars slaves + + for slave in $slaves; do + + if [ "$(cat /proc/net/dev |grep "$slave")" == "" ]; then + echo "$cfg" "No slave device $slave found" + proto_notify_error "$cfg" NO_DEVICE + proto_block_restart "$cfg" + return + fi + + ifconfig "$slave" down + + sleep 1 + + echo "+$slave" > /sys/class/net/"$link"/bonding/slaves + + ifconfig "$slave" up + done + + [ -n "$all_slaves_active" ] && echo "$all_slaves_active" > /sys/class/net/"$link"/bonding/all_slaves_active + + local ipaddr netmask + json_get_vars ipaddr netmask + + # ATTENTION + #All json vars have to be read before the line below, as the + # json object will be overwritten by proto_init_update + # ATTENTION + + proto_init_update "$link" 1 + + # For static configuration we _MUST_ have an IP address + [ -z "$ipaddr" ] && { + echo "$cfg" "No local IP address defined" + proto_notify_error "$cfg" INVALID_LOCAL_ADDRESS + proto_block_restart "$cfg" + return + } + + proto_add_ipv4_address "$ipaddr" "$netmask" + + proto_send_update "$cfg" +} + +proto_bonding_teardown() { + local cfg="$1" + local link="bonding-$cfg" + + # Check for loaded kernel bonding driver (/sys/class/net/bonding_masters exists) + [ -f "$BONDING_MASTERS" ] || { + echo "$cfg" "teardown: bonding_masters does not exist in sysfs (kernel module not loaded?)" + proto_notify_error "$cfg" BONDING_MASTER_DOES_NOT_EXIST + proto_block_restart "$cfg" + return + } + + echo "-$link" > /sys/class/net/bonding_masters + logger "bonding_teardown($1): $2" +} + +add_protocol bonding diff --git a/net/bridge-utils/Makefile b/net/bridge-utils/Makefile index 00c63ea4..e9e3472d 100644 --- a/net/bridge-utils/Makefile +++ b/net/bridge-utils/Makefile @@ -9,17 +9,15 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=bridge-utils -PKG_VERSION:=1.5 -PKG_RELEASE:=5 +PKG_VERSION:=1.6 +PKG_RELEASE:=3 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git -PKG_SOURCE_VERSION:=v${PKG_VERSION} -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=ce568c41f60987ed972c53fb8dab92bf45052849c4992e8ae931c1eb505630b7 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@KERNEL/linux/utils/net/$(PKG_NAME) +PKG_HASH:=cc67efb5d5fb8928a6569b3fade2b4042ec17da04678dab127d96b46489e26c8 +PKG_MAINTAINER:=Nikolay Martynov -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf @@ -29,8 +27,8 @@ define Package/bridge SECTION:=net CATEGORY:=Base system TITLE:=Ethernet bridging configuration utility - URL:=http://bridge.sourceforge.net/ - PKG_MAINTAINER:=Nikolay Martynov + URL:=http://www.linuxfromscratch.org/blfs/view/svn/basicnet/bridge-utils.html + ALTERNATIVES:=300:/usr/sbin/brctl:/usr/libexec/bridge-utils-brctl endef define Package/bridge/description @@ -44,15 +42,8 @@ CONFIGURE_ARGS += \ --with-linux-headers="$(LINUX_DIR)" \ define Package/bridge/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin -endef - -define Package/bridge/prerm -#!/bin/sh -$${IPKG_INSTROOT}/bin/busybox brctl -h 2>&1 | grep -q BusyBox && \ -ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/sbin/brctl -exit 0 + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/libexec/bridge-utils-brctl endef $(eval $(call BuildPackage,bridge)) diff --git a/net/bridge-utils/patches/010-fix_struct_in6_addr_usage.patch b/net/bridge-utils/patches/010-fix_struct_in6_addr_usage.patch deleted file mode 100644 index c2087e59..00000000 --- a/net/bridge-utils/patches/010-fix_struct_in6_addr_usage.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/libbridge/libbridge.h -+++ b/libbridge/libbridge.h -@@ -20,6 +20,7 @@ - #define _LIBBRIDGE_H - - #include -+#include - #include - #include - diff --git a/net/bridge-utils/patches/100-musl-compat.patch b/net/bridge-utils/patches/100-musl-compat.patch deleted file mode 100644 index 5655643d..00000000 --- a/net/bridge-utils/patches/100-musl-compat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libbridge/libbridge.h -+++ b/libbridge/libbridge.h -@@ -19,6 +19,8 @@ - #ifndef _LIBBRIDGE_H - #define _LIBBRIDGE_H - -+#include -+#include - #include - #include - #include diff --git a/net/bwping/Makefile b/net/bwping/Makefile new file mode 100644 index 00000000..d11d3fd2 --- /dev/null +++ b/net/bwping/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2020 Oleg Derevenetz +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bwping +PKG_VERSION:=1.17 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/bwping +PKG_HASH:=4bbbadcfa5a06ef57c673136731dd92c1b79389c8287f75108c5f1000420daf8 + +PKG_MAINTAINER:=Oleg Derevenetz +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/bwping + SECTION:=net + CATEGORY:=Network + TITLE:=Tool to measure bandwidth and RTT between two hosts using ICMP + URL:=https://bwping.sourceforge.io/ +endef + +define Package/bwping/description + BWPing is a tool to measure bandwidth and response times between two + hosts using Internet Control Message Protocol (ICMP) echo request/echo + reply mechanism. It does not require any special software on the remote + host. The only requirement is the ability to respond on ICMP echo request + messages. BWPing supports both IPv4 and IPv6 networks. +endef + +define Package/bwping/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME)6 $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,bwping)) diff --git a/net/cgi-io/Makefile b/net/cgi-io/Makefile index cda04946..814a1b2f 100644 --- a/net/cgi-io/Makefile +++ b/net/cgi-io/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cgi-io -PKG_RELEASE:=5 +PKG_RELEASE:=19 -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later PKG_MAINTAINER:=John Crispin @@ -37,8 +37,10 @@ endef define Package/cgi-io/install $(INSTALL_DIR) $(1)/usr/libexec $(1)/www/cgi-bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi-io $(1)/usr/libexec - $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-upload - $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-download + $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-upload + $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-download + $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-backup + $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-exec endef $(eval $(call BuildPackage,cgi-io)) diff --git a/net/cgi-io/src/CMakeLists.txt b/net/cgi-io/src/CMakeLists.txt index 6d8b1585..c7c9d40c 100644 --- a/net/cgi-io/src/CMakeLists.txt +++ b/net/cgi-io/src/CMakeLists.txt @@ -5,9 +5,12 @@ PROJECT(cgi-io C) INCLUDE(CheckFunctionExists) FIND_PATH(ubus_include_dir libubus.h) +FIND_LIBRARY(ubox NAMES ubox) +FIND_LIBRARY(ubus NAMES ubus) INCLUDE_DIRECTORIES(${ubus_include_dir}) -ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations) +ADD_DEFINITIONS(-Os -Wall -Werror -Wextra --std=gnu99 -g3) +ADD_DEFINITIONS(-Wno-unused-parameter -Wmissing-declarations) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") @@ -17,6 +20,6 @@ IF(APPLE) ENDIF() ADD_EXECUTABLE(cgi-io main.c multipart_parser.c) -TARGET_LINK_LIBRARIES(cgi-io ubox ubus) +TARGET_LINK_LIBRARIES(cgi-io ${ubox} ${ubus}) INSTALL(TARGETS cgi-io RUNTIME DESTINATION sbin) diff --git a/net/cgi-io/src/main.c b/net/cgi-io/src/main.c index 2bfec623..549121f9 100644 --- a/net/cgi-io/src/main.c +++ b/net/cgi-io/src/main.c @@ -16,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#define _GNU_SOURCE /* splice(), SPLICE_F_MORE */ + #include #include #include @@ -26,12 +28,21 @@ #include #include #include +#include +#include +#include #include #include #include "multipart_parser.h" +#ifndef O_TMPFILE +#define O_TMPFILE (020000000 | O_DIRECTORY) +#endif + +#define READ_BLOCK 4096 +#define POST_LIMIT 131072 enum part { PART_UNKNOWN, @@ -89,7 +100,7 @@ session_access_cb(struct ubus_request *req, int type, struct blob_attr *msg) } static bool -session_access(const char *sid, const char *obj, const char *func) +session_access(const char *sid, const char *scope, const char *obj, const char *func) { uint32_t id; bool allow = false; @@ -103,7 +114,7 @@ session_access(const char *sid, const char *obj, const char *func) blob_buf_init(&req, 0); blobmsg_add_string(&req, "ubus_rpc_session", sid); - blobmsg_add_string(&req, "scope", "cgi-io"); + blobmsg_add_string(&req, "scope", scope); blobmsg_add_string(&req, "object", obj); blobmsg_add_string(&req, "function", func); @@ -120,6 +131,7 @@ static char * checksum(const char *applet, size_t sumlen, const char *file) { pid_t pid; + int r; int fds[2]; static char chksum[65]; @@ -148,10 +160,14 @@ checksum(const char *applet, size_t sumlen, const char *file) default: memset(chksum, 0, sizeof(chksum)); - read(fds[0], chksum, sumlen); + r = read(fds[0], chksum, sumlen); + waitpid(pid, NULL, 0); close(fds[0]); close(fds[1]); + + if (r < 0) + return NULL; } return chksum; @@ -212,55 +228,144 @@ urldecode(char *buf) return true; } -static bool +static char * postdecode(char **fields, int n_fields) { - char *p; const char *var; - static char buf[1024]; - int i, len, field, found = 0; + char *p, *postbuf; + int i, field, found = 0; + ssize_t len = 0, rlen = 0, content_length = 0; var = getenv("CONTENT_TYPE"); if (!var || strncmp(var, "application/x-www-form-urlencoded", 33)) - return false; + return NULL; - memset(buf, 0, sizeof(buf)); + var = getenv("CONTENT_LENGTH"); - if ((len = read(0, buf, sizeof(buf) - 1)) > 0) + if (!var) + return NULL; + + content_length = strtol(var, &p, 10); + + if (p == var || content_length <= 0 || content_length >= POST_LIMIT) + return NULL; + + postbuf = calloc(1, content_length + 1); + + if (postbuf == NULL) + return NULL; + + for (len = 0; len < content_length; ) { - for (p = buf, i = 0; i <= len; i++) - { - if (buf[i] == '=') - { - buf[i] = 0; + rlen = read(0, postbuf + len, content_length - len); - for (field = 0; field < (n_fields * 2); field += 2) + if (rlen <= 0) + break; + + len += rlen; + } + + if (len < content_length) + { + free(postbuf); + return NULL; + } + + for (p = postbuf, i = 0; i <= len; i++) + { + if (postbuf[i] == '=') + { + postbuf[i] = 0; + + for (field = 0; field < (n_fields * 2); field += 2) + { + if (!strcmp(p, fields[field])) { - if (!strcmp(p, fields[field])) - { - fields[field + 1] = buf + i + 1; - found++; - } + fields[field + 1] = postbuf + i + 1; + found++; } } - else if (buf[i] == '&' || buf[i] == '\0') - { - buf[i] = 0; + } + else if (postbuf[i] == '&' || postbuf[i] == '\0') + { + postbuf[i] = 0; - if (found >= n_fields) - break; + if (found >= n_fields) + break; - p = buf + i + 1; - } + p = postbuf + i + 1; } } for (field = 0; field < (n_fields * 2); field += 2) + { if (!urldecode(fields[field + 1])) - return false; + { + free(postbuf); + return NULL; + } + } - return (found >= n_fields); + return postbuf; +} + +static char * +canonicalize_path(const char *path, size_t len) +{ + char *canonpath, *cp; + const char *p, *e; + + if (path == NULL || *path == '\0') + return NULL; + + canonpath = datadup(path, len); + + if (canonpath == NULL) + return NULL; + + /* normalize */ + for (cp = canonpath, p = path, e = path + len; p < e; ) { + if (*p != '/') + goto next; + + /* skip repeating / */ + if ((p + 1 < e) && (p[1] == '/')) { + p++; + continue; + } + + /* /./ or /../ */ + if ((p + 1 < e) && (p[1] == '.')) { + /* skip /./ */ + if ((p + 2 >= e) || (p[2] == '/')) { + p += 2; + continue; + } + + /* collapse /x/../ */ + if ((p + 2 < e) && (p[2] == '.') && ((p + 3 >= e) || (p[3] == '/'))) { + while ((cp > canonpath) && (*--cp != '/')) + ; + + p += 3; + continue; + } + } + +next: + *cp++ = *p++; + } + + /* remove trailing slash if not root / */ + if ((cp > canonpath + 1) && (cp[-1] == '/')) + cp--; + else if (cp == canonpath) + *cp++ = '/'; + + *cp = '\0'; + + return canonpath; } static int @@ -308,15 +413,17 @@ response(bool success, const char *message) } static int -failure(int e, const char *message) +failure(int code, int e, const char *message) { - printf("Status: 500 Internal Server failure\r\n"); + printf("Status: %d %s\r\n", code, message); printf("Content-Type: text/plain\r\n\r\n"); printf("%s", message); if (e) printf(": %s", strerror(e)); + printf("\n"); + return -1; } @@ -324,7 +431,7 @@ static int filecopy(void) { int len; - char buf[4096]; + char buf[READ_BLOCK]; if (!st.filedata) { @@ -333,32 +440,44 @@ filecopy(void) return response(false, "No file data received"); } - if (lseek(st.tempfd, 0, SEEK_SET) < 0) + snprintf(buf, sizeof(buf), "/proc/self/fd/%d", st.tempfd); + + if (unlink(st.filename) < 0 && errno != ENOENT) { close(st.tempfd); - return response(false, "Failed to rewind temp file"); + return response(false, "Failed to unlink existing file"); } - st.filefd = open(st.filename, O_CREAT | O_TRUNC | O_WRONLY, 0600); - - if (st.filefd < 0) + if (linkat(AT_FDCWD, buf, AT_FDCWD, st.filename, AT_SYMLINK_FOLLOW) < 0) { - close(st.tempfd); - return response(false, "Failed to open target file"); - } - - while ((len = read(st.tempfd, buf, sizeof(buf))) > 0) - { - if (write(st.filefd, buf, len) != len) + if (lseek(st.tempfd, 0, SEEK_SET) < 0) { close(st.tempfd); - close(st.filefd); - return response(false, "I/O failure while writing target file"); + return response(false, "Failed to rewind temp file"); } + + st.filefd = open(st.filename, O_CREAT | O_TRUNC | O_WRONLY, 0600); + + if (st.filefd < 0) + { + close(st.tempfd); + return response(false, "Failed to open target file"); + } + + while ((len = read(st.tempfd, buf, sizeof(buf))) > 0) + { + if (write(st.filefd, buf, len) != len) + { + close(st.tempfd); + close(st.filefd); + return response(false, "I/O failure while writing target file"); + } + } + + close(st.filefd); } close(st.tempfd); - close(st.filefd); if (chmod(st.filename, st.filemode)) return response(false, "Failed to chmod target file"); @@ -376,7 +495,7 @@ header_field(multipart_parser *p, const char *data, size_t len) static int header_value(multipart_parser *p, const char *data, size_t len) { - int i, j; + size_t i, j; if (!st.is_content_disposition) return 0; @@ -407,8 +526,6 @@ header_value(multipart_parser *p, const char *data, size_t len) static int data_begin_cb(multipart_parser *p) { - char tmpname[24] = "/tmp/luci-upload.XXXXXX"; - if (st.parttype == PART_FILEDATA) { if (!st.sessionid) @@ -417,12 +534,13 @@ data_begin_cb(multipart_parser *p) if (!st.filename) return response(false, "File data without name"); - st.tempfd = mkstemp(tmpname); + if (!session_access(st.sessionid, "file", st.filename, "write")) + return response(false, "Access to path denied by ACL"); + + st.tempfd = open("/tmp", O_TMPFILE | O_RDWR, S_IRUSR | S_IWUSR); if (st.tempfd < 0) return response(false, "Failed to create temporary file"); - - unlink(tmpname); } return 0; @@ -431,6 +549,8 @@ data_begin_cb(multipart_parser *p) static int data_cb(multipart_parser *p, const char *data, size_t len) { + int wlen = len; + switch (st.parttype) { case PART_SESSIONID: @@ -438,7 +558,7 @@ data_cb(multipart_parser *p, const char *data, size_t len) break; case PART_FILENAME: - st.filename = datadup(data, len); + st.filename = canonicalize_path(data, len); break; case PART_FILEMODE: @@ -446,14 +566,14 @@ data_cb(multipart_parser *p, const char *data, size_t len) break; case PART_FILEDATA: - if (write(st.tempfd, data, len) != len) + if (write(st.tempfd, data, len) != wlen) { close(st.tempfd); return response(false, "I/O failure while writing temporary file"); } if (!st.filedata) - st.filedata = !!len; + st.filedata = !!wlen; break; @@ -469,7 +589,7 @@ data_end_cb(multipart_parser *p) { if (st.parttype == PART_SESSIONID) { - if (!session_access(st.sessionid, "upload", "write")) + if (!session_access(st.sessionid, "cgi-io", "upload", "write")) { errno = EPERM; return response(false, "Upload permission denied"); @@ -557,7 +677,8 @@ static int main_upload(int argc, char *argv[]) { int rem, len; - char buf[4096]; + bool done = false; + char buf[READ_BLOCK]; multipart_parser *p; p = init_parser(); @@ -570,16 +691,109 @@ main_upload(int argc, char *argv[]) while ((len = read(0, buf, sizeof(buf))) > 0) { - rem = multipart_parser_execute(p, buf, len); - - if (rem < len) - break; + if (!done) { + rem = multipart_parser_execute(p, buf, len); + done = (rem < len); + } } multipart_parser_free(p); - /* read remaining post data */ - while ((len = read(0, buf, sizeof(buf))) > 0); + return 0; +} + +static void +free_charp(char **ptr) +{ + free(*ptr); +} + +#define autochar __attribute__((__cleanup__(free_charp))) char + +static int +main_download(int argc, char **argv) +{ + char *fields[] = { "sessionid", NULL, "path", NULL, "filename", NULL, "mimetype", NULL }; + unsigned long long size = 0; + char *p, buf[READ_BLOCK]; + ssize_t len = 0; + struct stat s; + int rfd; + + autochar *post = postdecode(fields, 4); + + if (!fields[1] || !session_access(fields[1], "cgi-io", "download", "read")) + return failure(403, 0, "Download permission denied"); + + if (!fields[3] || !session_access(fields[1], "file", fields[3], "read")) + return failure(403, 0, "Access to path denied by ACL"); + + if (stat(fields[3], &s)) + return failure(404, errno, "Failed to stat requested path"); + + if (!S_ISREG(s.st_mode) && !S_ISBLK(s.st_mode)) + return failure(403, 0, "Requested path is not a regular file or block device"); + + for (p = fields[5]; p && *p; p++) + if (!isalnum(*p) && !strchr(" ()<>@,;:[]?.=%-", *p)) + return failure(400, 0, "Invalid characters in filename"); + + for (p = fields[7]; p && *p; p++) + if (!isalnum(*p) && !strchr(" .;=/-", *p)) + return failure(400, 0, "Invalid characters in mimetype"); + + rfd = open(fields[3], O_RDONLY); + + if (rfd < 0) + return failure(500, errno, "Failed to open requested path"); + + if (S_ISBLK(s.st_mode)) + ioctl(rfd, BLKGETSIZE64, &size); + else + size = (unsigned long long)s.st_size; + + printf("Status: 200 OK\r\n"); + printf("Content-Type: %s\r\n", fields[7] ? fields[7] : "application/octet-stream"); + + if (fields[5]) + printf("Content-Disposition: attachment; filename=\"%s\"\r\n", fields[5]); + + if (size > 0) { + printf("Content-Length: %llu\r\n\r\n", size); + fflush(stdout); + + while (size > 0) { + len = sendfile(1, rfd, NULL, size); + + if (len == -1) { + if (errno == ENOSYS || errno == EINVAL) { + while ((len = read(rfd, buf, sizeof(buf))) > 0) + fwrite(buf, len, 1, stdout); + + fflush(stdout); + break; + } + + if (errno == EINTR || errno == EAGAIN) + continue; + } + + if (len <= 0) + break; + + size -= len; + } + } + else { + printf("\r\n"); + + while ((len = read(rfd, buf, sizeof(buf))) > 0) + fwrite(buf, len, 1, stdout); + + fflush(stdout); + } + + close(rfd); return 0; } @@ -589,24 +803,26 @@ main_backup(int argc, char **argv) { pid_t pid; time_t now; + int r; int len; int status; int fds[2]; - char buf[4096]; char datestr[16] = { 0 }; char hostname[64] = { 0 }; char *fields[] = { "sessionid", NULL }; - if (!postdecode(fields, 1) || !session_access(fields[1], "backup", "read")) - return failure(0, "Backup permission denied"); + autochar *post = postdecode(fields, 1); + + if (!fields[1] || !session_access(fields[1], "cgi-io", "backup", "read")) + return failure(403, 0, "Backup permission denied"); if (pipe(fds)) - return failure(errno, "Failed to spawn pipe"); + return failure(500, errno, "Failed to spawn pipe"); switch ((pid = fork())) { case -1: - return failure(errno, "Failed to fork process"); + return failure(500, errno, "Failed to fork process"); case 0: dup2(fds[1], 1); @@ -616,7 +832,9 @@ main_backup(int argc, char **argv) close(fds[0]); close(fds[1]); - chdir("/"); + r = chdir("/"); + if (r < 0) + return failure(500, errno, "Failed chdir('/')"); execl("/sbin/sysupgrade", "/sbin/sysupgrade", "--create-backup", "-", NULL); @@ -624,7 +842,8 @@ main_backup(int argc, char **argv) return -1; default: - fcntl(fds[0], F_SETFL, fcntl(fds[0], F_GETFL) | O_NONBLOCK); + close(fds[1]); + now = time(NULL); strftime(datestr, sizeof(datestr) - 1, "%Y-%m-%d", localtime(&now)); @@ -636,18 +855,247 @@ main_backup(int argc, char **argv) printf("Content-Disposition: attachment; " "filename=\"backup-%s-%s.tar.gz\"\r\n\r\n", hostname, datestr); + fflush(stdout); + do { - waitpid(pid, &status, 0); + len = splice(fds[0], NULL, 1, NULL, READ_BLOCK, SPLICE_F_MORE); + } while (len > 0); - while ((len = read(fds[0], buf, sizeof(buf))) > 0) { - fwrite(buf, len, 1, stdout); - fflush(stdout); - } - - } while (!WIFEXITED(status)); + waitpid(pid, &status, 0); + close(fds[0]); + + return 0; + } +} + + +static const char * +lookup_executable(const char *cmd) +{ + size_t plen = 0, clen = strlen(cmd) + 1; + static char path[PATH_MAX]; + char *search, *p; + struct stat s; + + if (!stat(cmd, &s) && S_ISREG(s.st_mode)) + return cmd; + + search = getenv("PATH"); + + if (!search) + search = "/bin:/usr/bin:/sbin:/usr/sbin"; + + p = search; + + do { + if (*p != ':' && *p != '\0') + continue; + + plen = p - search; + + if ((plen + clen) >= sizeof(path)) + continue; + + strncpy(path, search, plen); + sprintf(path + plen, "/%s", cmd); + + if (!stat(path, &s) && S_ISREG(s.st_mode)) + return path; + + search = p + 1; + } while (*p++); + + return NULL; +} + +static char ** +parse_command(const char *cmdline) +{ + const char *p = cmdline, *s; + char **argv = NULL, *out; + size_t arglen = 0; + int argnum = 0; + bool esc; + + while (isspace(*cmdline)) + cmdline++; + + for (p = cmdline, s = p, esc = false; p; p++) { + if (esc) { + esc = false; + } + else if (*p == '\\' && p[1] != 0) { + esc = true; + } + else if (isspace(*p) || *p == 0) { + if (p > s) { + argnum += 1; + arglen += sizeof(char *) + (p - s) + 1; + } + + s = p + 1; + } + + if (*p == 0) + break; + } + + if (arglen == 0) + return NULL; + + argv = calloc(1, arglen + sizeof(char *)); + + if (!argv) + return NULL; + + out = (char *)argv + sizeof(char *) * (argnum + 1); + argv[0] = out; + + for (p = cmdline, s = p, esc = false, argnum = 0; p; p++) { + if (esc) { + esc = false; + *out++ = *p; + } + else if (*p == '\\' && p[1] != 0) { + esc = true; + } + else if (isspace(*p) || *p == 0) { + if (p > s) { + *out++ = ' '; + argv[++argnum] = out; + } + + s = p + 1; + } + else { + *out++ = *p; + } + + if (*p == 0) + break; + } + + argv[argnum] = NULL; + out[-1] = 0; + + return argv; +} + +static int +main_exec(int argc, char **argv) +{ + char *fields[] = { "sessionid", NULL, "command", NULL, "filename", NULL, "mimetype", NULL }; + int i, devnull, status, fds[2]; + bool allowed = false; + ssize_t len = 0; + const char *exe; + char *p, **args; + pid_t pid; + + autochar *post = postdecode(fields, 4); + + if (!fields[1] || !session_access(fields[1], "cgi-io", "exec", "read")) + return failure(403, 0, "Exec permission denied"); + + for (p = fields[5]; p && *p; p++) + if (!isalnum(*p) && !strchr(" ()<>@,;:[]?.=%-", *p)) + return failure(400, 0, "Invalid characters in filename"); + + for (p = fields[7]; p && *p; p++) + if (!isalnum(*p) && !strchr(" .;=/-", *p)) + return failure(400, 0, "Invalid characters in mimetype"); + + args = fields[3] ? parse_command(fields[3]) : NULL; + + if (!args) + return failure(400, 0, "Invalid command parameter"); + + /* First check if we find an ACL match for the whole cmdline ... */ + allowed = session_access(fields[1], "file", args[0], "exec"); + + /* Now split the command vector... */ + for (i = 1; args[i]; i++) + args[i][-1] = 0; + + /* Find executable... */ + exe = lookup_executable(args[0]); + + if (!exe) { + free(args); + return failure(404, 0, "Executable not found"); + } + + /* If there was no ACL match, check for a match on the executable */ + if (!allowed && !session_access(fields[1], "file", exe, "exec")) { + free(args); + return failure(403, 0, "Access to command denied by ACL"); + } + + if (pipe(fds)) { + free(args); + return failure(500, errno, "Failed to spawn pipe"); + } + + switch ((pid = fork())) + { + case -1: + free(args); close(fds[0]); close(fds[1]); + return failure(500, errno, "Failed to fork process"); + + case 0: + devnull = open("/dev/null", O_RDWR); + + if (devnull > -1) { + dup2(devnull, 0); + dup2(devnull, 2); + close(devnull); + } + else { + close(0); + close(2); + } + + dup2(fds[1], 1); + close(fds[0]); + close(fds[1]); + + if (chdir("/") < 0) { + free(args); + return failure(500, errno, "Failed chdir('/')"); + } + + if (execv(exe, args) < 0) { + free(args); + return failure(500, errno, "Failed execv(...)"); + } + + return -1; + + default: + close(fds[1]); + + printf("Status: 200 OK\r\n"); + printf("Content-Type: %s\r\n", + fields[7] ? fields[7] : "application/octet-stream"); + + if (fields[5]) + printf("Content-Disposition: attachment; filename=\"%s\"\r\n", + fields[5]); + + printf("\r\n"); + fflush(stdout); + + do { + len = splice(fds[0], NULL, 1, NULL, READ_BLOCK, SPLICE_F_MORE); + } while (len > 0); + + waitpid(pid, &status, 0); + + close(fds[0]); + free(args); return 0; } @@ -657,8 +1105,12 @@ int main(int argc, char **argv) { if (strstr(argv[0], "cgi-upload")) return main_upload(argc, argv); + else if (strstr(argv[0], "cgi-download")) + return main_download(argc, argv); else if (strstr(argv[0], "cgi-backup")) return main_backup(argc, argv); + else if (strstr(argv[0], "cgi-exec")) + return main_exec(argc, argv); return -1; } diff --git a/net/chrony/Makefile b/net/chrony/Makefile index d6730610..9d400568 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=chrony -PKG_VERSION:=3.3 -PKG_RELEASE:=3 +PKG_VERSION:=3.5 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/ -PKG_HASH:=0d1fb2d5875032f2d5a86f3770374c87ee4c941916f64171e81f7684f2a73128 +PKG_HASH:=4e02795b1260a4ec51e6ace84149036305cc9fc340e65edb9f8452aa611339b5 PKG_MAINTAINER:=Miroslav Lichvar PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:tuxfamily:chrony PKG_BUILD_DEPENDS:=pps-tools diff --git a/net/chrony/patches/001-freebind_uclibc.patch b/net/chrony/patches/001-freebind_uclibc.patch deleted file mode 100644 index 7a3dd826..00000000 --- a/net/chrony/patches/001-freebind_uclibc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/sysincl.h b/sysincl.h -index a9e4da0..e2a6e78 100644 ---- a/sysincl.h -+++ b/sysincl.h -@@ -80,4 +80,8 @@ - #include - #endif - -+#if defined(LINUX) && !defined(IP_FREEBIND) -+#define IP_FREEBIND 15 -+#endif -+ - #endif /* GOT_SYSINCL_H */ diff --git a/net/cifs-utils/Makefile b/net/cifs-utils/Makefile index c63b80b5..ae6a4d8e 100644 --- a/net/cifs-utils/Makefile +++ b/net/cifs-utils/Makefile @@ -8,18 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cifs-utils -PKG_VERSION:=6.8 -PKG_RELEASE:=1 +PKG_VERSION:=6.10 +PKG_RELEASE:=2 -PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_HASH:=e7d1f6050c43f21f82cd77e288eb756755effd22f0c310fc2c525df9d41dff79 +PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/ +PKG_HASH:=92fc29c8e9039637f3344267500f1fa381e2cccd7d10142f0c1676fa575904a7 -PKG_MAINTAINER:=Florian Fainelli -PKG_LICENSE:=GPL-3.0 +PKG_MAINTAINER:= +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:debian:cifs-utils -PKG_FIXUP:=libtool +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -27,27 +30,51 @@ define Package/cifsmount SECTION:=net CATEGORY:=Network DEPENDS:=+kmod-fs-cifs - TITLE:=CIFS mount utilities - URL:=http://wiki.samba.org/index.php/LinuxCIFS_utils + TITLE:=CIFS mount + URL:=https://wiki.samba.org/index.php/LinuxCIFS_utils endef -TARGET_CFLAGS += -Wno-error +define Package/smbinfo + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-fs-cifs + TITLE:=SMB info + URL:=https://wiki.samba.org/index.php/LinuxCIFS_utils +endef CONFIGURE_ARGS += \ - --exec-prefix=/usr \ - --prefix=/ \ - --with-libcap=no \ --disable-cifsupcall \ --disable-cifscreds \ --disable-cifsidmap \ --disable-cifsacl \ --disable-pam \ + --disable-pie \ + --disable-relro \ --disable-systemd \ - --disable-man + --disable-man \ + --without-libcap + +CONFIGURE_ARGS += \ + ac_cv_lib_cap_ng_capng_clear=no + +TARGET_CFLAGS += $(FPIC) -ffunction-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/cifsidmap.h $(1)/usr/include/ +endef define Package/cifsmount/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount.cifs $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.cifs $(1)/usr/sbin/ + $(LN) /usr/sbin/mount.cifs $(1)/usr/sbin/mount.smb3 +endef + +define Package/smbinfo/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/smbinfo $(1)/usr/bin/ endef $(eval $(call BuildPackage,cifsmount)) +$(eval $(call BuildPackage,smbinfo)) diff --git a/net/cifs-utils/patches/010-no-libtalloc.patch b/net/cifs-utils/patches/010-no-libtalloc.patch index 859a5c53..29de8f13 100644 --- a/net/cifs-utils/patches/010-no-libtalloc.patch +++ b/net/cifs-utils/patches/010-no-libtalloc.patch @@ -1,5 +1,3 @@ -diff --git a/data_blob.h b/data_blob.h -index 3d96147..c20749d 100644 --- a/data_blob.h +++ b/data_blob.h @@ -23,7 +23,7 @@ diff --git a/net/cifs-utils/patches/020-no-smb3.patch b/net/cifs-utils/patches/020-no-smb3.patch new file mode 100644 index 00000000..bb20af42 --- /dev/null +++ b/net/cifs-utils/patches/020-no-smb3.patch @@ -0,0 +1,13 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -119,10 +119,8 @@ endif + SUBDIRS = contrib + + install-exec-hook: +- (cd $(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3) + + install-data-hook: +- (cd $(man8dir) && ln -sf mount.cifs.8 mount.smb3.8) + + uninstall-hook: + (cd $(ROOTSBINDIR) && rm -f $(ROOTSBINDIR)/mount.smb3) diff --git a/net/clamav/Makefile b/net/clamav/Makefile index 4cef270c..567ffe11 100644 --- a/net/clamav/Makefile +++ b/net/clamav/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=clamav -PKG_VERSION:=0.101.4 +PKG_VERSION:=0.102.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/ -PKG_HASH:=0bf094f0919d158a578421d66bc2569c8c8181233ba162bb51722f98c802bccd +PKG_HASH:=ed3050c4569989ee7ab54c7b87246b41ed808259632849be0706467442dc0693 PKG_MAINTAINER:=Marko Ratkaj \ Lucian Cristian @@ -56,9 +56,6 @@ define Package/freshclam/description Database updater for ClamAV endef -define Package/clamav/conffiles -endef - CONFIGURE_ARGS += \ --sysconfdir=/etc/clamav/ \ --enable-milter \ @@ -89,6 +86,10 @@ CONFIGURE_VARS += $(if $(CONFIG_IPV6),have_cv_ipv6=yes) TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -fno-rtti -flto TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed $(if $(CONFIG_USE_MUSL),-lfts) +define Package/clamav/conffiles +/etc/config/clamav +endef + define Package/clamav/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamd $(1)/usr/sbin/ @@ -97,6 +98,7 @@ define Package/clamav/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamconf $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamdscan $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamscan $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamonacc $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigtool $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/usr/lib @@ -112,6 +114,10 @@ define Package/clamav/install $(CP) ./files/bytecode.cvd $(1)/usr/share/clamav/ endef +define Package/freshclam/conffiles +/etc/config/freshclam +endef + define Package/freshclam/install $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/bin/freshclam $(1)/usr/sbin/ diff --git a/net/clamav/files/clamav.init b/net/clamav/files/clamav.init index 2802eb1f..e06dfa60 100644 --- a/net/clamav/files/clamav.init +++ b/net/clamav/files/clamav.init @@ -52,47 +52,49 @@ start_clamav_instance() { return 1 } - mkdir -p $DatabaseDirectory + mkdir -p "$DatabaseDirectory" mkdir -p /etc/clamav/ mkdir -p /var/run/clamav/ chmod a+rw /var/run/clamav - mkdir -p $(dirname $CLAMD_CONFIGFILE) - ln -sf $clamd_config_file $CLAMD_CONFIGFILE + mkdir -p "$(dirname $CLAMD_CONFIGFILE)" + ln -sf "$clamd_config_file" "$CLAMD_CONFIGFILE" - echo "LogFile " $LogFile > $CLAMD_CONFIGFILE - echo "LogFileMaxSize " $LogFileMaxSize >> $CLAMD_CONFIGFILE - echo "LogVerbose " $LogVerbose >> $CLAMD_CONFIGFILE - echo "ExtendedDetectionInfo " $ExtendedDetectionInfo >> $CLAMD_CONFIGFILE - echo "LogTime " $LogTime >> $CLAMD_CONFIGFILE - echo "OfficialDatabaseOnly " $OfficialDatabaseOnly >> $CLAMD_CONFIGFILE - echo "StreamMinPort " $StreamMinPort >> $CLAMD_CONFIGFILE - echo "StreamMaxPort " $StreamMaxPort >> $CLAMD_CONFIGFILE - echo "MaxThreads " $MaxThreads >> $CLAMD_CONFIGFILE - echo "ReadTimeout " $ReadTimeout >> $CLAMD_CONFIGFILE - echo "CommandReadTimeout " $CommandReadTimeout >> $CLAMD_CONFIGFILE - echo "MaxDirectoryRecursion " $MaxDirectoryRecursion >> $CLAMD_CONFIGFILE - echo "FollowDirectorySymlinks " $FollowDirectorySymlinks >> $CLAMD_CONFIGFILE - echo "FollowFileSymlinks " $FollowFileSymlinks >> $CLAMD_CONFIGFILE - echo "SelfCheck " $SelfCheck >> $CLAMD_CONFIGFILE - echo "DetectPUA " $DetectPUA >> $CLAMD_CONFIGFILE - echo "ScanPE " $ScanPE >> $CLAMD_CONFIGFILE - echo "DisableCertCheck " $DisableCertCheck >> $CLAMD_CONFIGFILE - echo "ScanELF " $ScanELF >> $CLAMD_CONFIGFILE - echo "AlertBrokenExecutables " $AlertBrokenExecutables >> $CLAMD_CONFIGFILE - echo "ScanOLE2 " $ScanOLE2 >> $CLAMD_CONFIGFILE - echo "ScanPDF " $ScanPDF >> $CLAMD_CONFIGFILE - echo "ScanSWF " $ScanSWF >> $CLAMD_CONFIGFILE - echo "ScanMail " $ScanMail >> $CLAMD_CONFIGFILE - echo "ScanPartialMessages " $ScanPartialMessages >> $CLAMD_CONFIGFILE - echo "ScanArchive " $ScanArchive >> $CLAMD_CONFIGFILE - echo "TemporaryDirectory " $TemporaryDirectory >> $CLAMD_CONFIGFILE - echo "AlertEncrypted " $AlertEncrypted >> $CLAMD_CONFIGFILE - echo "MaxFileSize " $MaxFileSize >> $CLAMD_CONFIGFILE - echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE - echo "User " $User >> $CLAMD_CONFIGFILE - echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE - echo "DatabaseDirectory " $DatabaseDirectory >> $CLAMD_CONFIGFILE + { + echo "LogFile " "$LogFile" + echo "LogFileMaxSize " "$LogFileMaxSize" + echo "LogVerbose " "$LogVerbose" + echo "ExtendedDetectionInfo " "$ExtendedDetectionInfo" + echo "LogTime " "$LogTime" + echo "OfficialDatabaseOnly " "$OfficialDatabaseOnly" + echo "StreamMinPort " "$StreamMinPort" + echo "StreamMaxPort " "$StreamMaxPort" + echo "MaxThreads " "$MaxThreads" + echo "ReadTimeout " "$ReadTimeout" + echo "CommandReadTimeout " "$CommandReadTimeout" + echo "MaxDirectoryRecursion " "$MaxDirectoryRecursion" + echo "FollowDirectorySymlinks " "$FollowDirectorySymlinks" + echo "FollowFileSymlinks " "$FollowFileSymlinks" + echo "SelfCheck " "$SelfCheck" + echo "DetectPUA " "$DetectPUA" + echo "ScanPE " "$ScanPE" + echo "DisableCertCheck " "$DisableCertCheck" + echo "ScanELF " "$ScanELF" + echo "AlertBrokenExecutables " "$AlertBrokenExecutables" + echo "ScanOLE2 " "$ScanOLE2" + echo "ScanPDF " "$ScanPDF" + echo "ScanSWF " "$ScanSWF" + echo "ScanMail " "$ScanMail" + echo "ScanPartialMessages " "$ScanPartialMessages" + echo "ScanArchive " "$ScanArchive" + echo "TemporaryDirectory " "$TemporaryDirectory" + echo "AlertEncrypted " "$AlertEncrypted" + echo "MaxFileSize " "$MaxFileSize" + echo "LocalSocket " "$LocalSocket" + echo "User " "$User" + echo "ExitOnOOM " "$ExitOnOOM" + echo "DatabaseDirectory " "$DatabaseDirectory" + } > "$CLAMD_CONFIGFILE" procd_open_instance procd_set_param command $PROG -c $CLAMD_CONFIGFILE diff --git a/net/clamav/files/freshclam.init b/net/clamav/files/freshclam.init index 120dc803..38842a95 100644 --- a/net/clamav/files/freshclam.init +++ b/net/clamav/files/freshclam.init @@ -27,20 +27,22 @@ start_freshclam_instance() { [ -f /tmp/freshclam.pid ] && echo "already running" && return 0 - mkdir -p $DatabaseDirectory + mkdir -p "$DatabaseDirectory" mkdir -p /etc/clamav touch /tmp/freshclam.log touch /tmp/freshclam.pid - mkdir -p $(dirname $FRESHCLAM_CONFIGFILE) - ln -sf $freshclam_config_file $FRESHCLAM_CONFIGFILE + mkdir -p "$(dirname $FRESHCLAM_CONFIGFILE)" + ln -sf "$freshclam_config_file" "$FRESHCLAM_CONFIGFILE" - echo "UpdateLogFile " $UpdateLogFile > $FRESHCLAM_CONFIGFILE - echo "DatabaseMirror " $DatabaseMirror >> $FRESHCLAM_CONFIGFILE - echo "NotifyClamd " $NotifyClamd >> $FRESHCLAM_CONFIGFILE - echo "DatabaseOwner " $DatabaseOwner >> $FRESHCLAM_CONFIGFILE - echo "CompressLocalDatabase " $CompressLocalDatabase >> $FRESHCLAM_CONFIGFILE - echo "DatabaseDirectory " $DatabaseDirectory >> $FRESHCLAM_CONFIGFILE + { + echo "UpdateLogFile " "$UpdateLogFile" + echo "DatabaseMirror " "$DatabaseMirror" + echo "NotifyClamd " "$NotifyClamd" + echo "DatabaseOwner " "$DatabaseOwner" + echo "CompressLocalDatabase " "$CompressLocalDatabase" + echo "DatabaseDirectory " "$DatabaseDirectory" + } > "$FRESHCLAM_CONFIGFILE" procd_open_instance procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings @@ -56,8 +58,8 @@ start_service() stop_service() { [ ! -f /tmp/freshclam.pid ] && echo "not running" && return 0 - PID=`cat /tmp/freshclam.pid` - kill $PID + PID=$(cat /tmp/freshclam.pid) + kill "$PID" rm -f /tmp/freshclam.pid } diff --git a/net/clamav/patches/001-compile.patch b/net/clamav/patches/001-compile.patch deleted file mode 100644 index 096d9cb9..00000000 --- a/net/clamav/patches/001-compile.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/clamdscan/proto.c -+++ b/clamdscan/proto.c -@@ -59,6 +59,7 @@ - #include "shared/misc.h" - #include "shared/clamdcom.h" - -+#include - #include "proto.h" - #include "client.h" - diff --git a/net/clamav/patches/002-Avoid-libxml-checks-if-disable-xml-is-used.patch b/net/clamav/patches/002-Avoid-libxml-checks-if-disable-xml-is-used.patch deleted file mode 100644 index 3564c31f..00000000 --- a/net/clamav/patches/002-Avoid-libxml-checks-if-disable-xml-is-used.patch +++ /dev/null @@ -1,167 +0,0 @@ -From de943f313fa5c17bf9cbd560a7578796991b24b5 Mon Sep 17 00:00:00 2001 -From: Eneas U de Queiroz -Date: Sat, 10 Aug 2019 19:43:20 -0300 -Subject: [PATCH] Avoid libxml checks if --disable-xml is used - -Signed-off-by: Eneas U de Queiroz ---- - m4/reorganization/libs/xml.m4 | 126 +++++++++++++++++----------------- - 1 file changed, 62 insertions(+), 64 deletions(-) - -diff --git a/m4/reorganization/libs/xml.m4 b/m4/reorganization/libs/xml.m4 -index 77b2c13a8..0709d2914 100644 ---- a/m4/reorganization/libs/xml.m4 -+++ b/m4/reorganization/libs/xml.m4 -@@ -12,87 +12,85 @@ if test "X$want_xml" != "Xno"; then - @<:@default=/usr/local or /usr if not found in /usr/local@:>@]), - [with_xml_val=$withval] - ) --fi -- --AS_IF([test "x$with_xml_val" = "xno"], [XML_HOME=""], -- [test "x$with_xml_val" = "xyes"], [XML_HOME="/usr/local"], -- [XML_HOME="$with_xml_val"]) - --AS_IF([test "x$XML_HOME" != "x"], [ -- AS_IF([test ! -x "$XML_HOME/bin/xml2-config"], [XML_HOME=""]) -- ]) -+ AS_IF([test "x$with_xml_val" = "xno"], [XML_HOME=""], -+ [test "x$with_xml_val" = "xyes"], [XML_HOME="/usr/local"], -+ [XML_HOME="$with_xml_val"]) - --AS_IF([test "x$XML_HOME" = "x" -a "x$with_xml_val" = "xyes"], [ -- AS_IF([test -x "/usr/bin/xml2-config"], [XML_HOME="/usr"]) -- ]) -+ AS_IF([test "x$XML_HOME" != "x"], [ -+ AS_IF([test ! -x "$XML_HOME/bin/xml2-config"], [XML_HOME=""]) -+ ]) - --if test "x$XML_HOME" != "x"; then -- AC_MSG_RESULT([$XML_HOME]) --else -- AC_MSG_RESULT([not found]) --fi -+ AS_IF([test "x$XML_HOME" = "x" -a "x$with_xml_val" = "xyes"], [ -+ AS_IF([test -x "/usr/bin/xml2-config"], [XML_HOME="/usr"]) -+ ]) - --found_xml="no" --XMLCONF_VERSION="" --XML_CPPFLAGS="" --XML_LIBS="" --if test "x$XML_HOME" != "x"; then -- AC_MSG_CHECKING([xml2-config version]) -- XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`" -- if test "x%XMLCONF_VERSION" != "x"; then -- AC_MSG_RESULT([$XMLCONF_VERSION]) -- found_xml="yes" -- XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`" -- XML_LIBS="`$XML_HOME/bin/xml2-config --libs`" -- AS_ECHO("$XML_CPPFLAGS") -- AS_ECHO("$XML_LIBS") -+ if test "x$XML_HOME" != "x"; then -+ AC_MSG_RESULT([$XML_HOME]) - else -- AC_MSG_ERROR([xml2-config failed]) -+ AC_MSG_RESULT([not found]) -+ fi -+ -+ found_xml="no" -+ XMLCONF_VERSION="" -+ XML_CPPFLAGS="" -+ XML_LIBS="" -+ if test "x$XML_HOME" != "x"; then -+ AC_MSG_CHECKING([xml2-config version]) -+ XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`" -+ if test "x%XMLCONF_VERSION" != "x"; then -+ AC_MSG_RESULT([$XMLCONF_VERSION]) -+ found_xml="yes" -+ XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`" -+ XML_LIBS="`$XML_HOME/bin/xml2-config --libs`" -+ AS_ECHO("$XML_CPPFLAGS") -+ AS_ECHO("$XML_LIBS") -+ else -+ AC_MSG_ERROR([xml2-config failed]) -+ fi - fi --fi - --working_xml="no" --if test "X$found_xml" != "Xno"; then -- AC_MSG_CHECKING([for xmlreader.h in $XML_HOME]) -+ working_xml="no" -+ if test "X$found_xml" != "Xno"; then -+ AC_MSG_CHECKING([for xmlreader.h in $XML_HOME]) - -- if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then -- AC_MSG_RESULT([not found]) -- else -- AC_MSG_RESULT([found]) -- save_LIBS="$LIBS" -- save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS $XML_LIBS" -+ if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then -+ AC_MSG_RESULT([not found]) -+ else -+ AC_MSG_RESULT([found]) -+ save_LIBS="$LIBS" -+ save_CPPFLAGS="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" -+ save_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $XML_LIBS" - -- AS_ECHO("CPPFLAGS: $CPPFLAGS") -- AS_ECHO("LD_FLAGS: $LDFLAGS") -+ AS_ECHO("CPPFLAGS: $CPPFLAGS") -+ AS_ECHO("LD_FLAGS: $LDFLAGS") - -- AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"], [$XML_LIBS]) -+ AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"], [$XML_LIBS]) - -- CPPFLAGS="$save_CPPFLAGS" -- LDFLAGS="$save_LDFLAGS" -- LIBS="$save_LIBS" -+ CPPFLAGS="$save_CPPFLAGS" -+ LDFLAGS="$save_LDFLAGS" -+ LIBS="$save_LIBS" -+ fi - fi --fi - --if test "$working_xml" = "yes"; then -- AC_DEFINE([HAVE_LIBXML2],1,[Define to 1 if you have the 'libxml2' library (-lxml2).]) -- AC_SUBST(XML_CPPFLAGS) -- AC_SUBST(XML_LIBS) -- AC_MSG_NOTICE([Compiling and linking with libxml2 from $XML_HOME]) --else -- if test "$want_xml" = "yes"; then -- AC_MSG_ERROR([****** Please install libxml2 packages!]) -+ if test "$working_xml" = "yes"; then -+ AC_DEFINE([HAVE_LIBXML2],1,[Define to 1 if you have the 'libxml2' library (-lxml2).]) -+ AC_SUBST(XML_CPPFLAGS) -+ AC_SUBST(XML_LIBS) -+ AC_MSG_NOTICE([Compiling and linking with libxml2 from $XML_HOME]) - else -- if test "$want_xml" != "no"; then -+ if test "$want_xml" = "yes"; then -+ AC_MSG_ERROR([****** Please install libxml2 packages!]) -+ else - AC_MSG_NOTICE([****** libxml2 support unavailable]) - fi -+ XML_CPPFLAGS="" -+ XML_LIBS="" -+ AC_SUBST(XML_CPPFLAGS) -+ AC_SUBST(XML_LIBS) - fi -- XML_CPPFLAGS="" -- XML_LIBS="" -- AC_SUBST(XML_CPPFLAGS) -- AC_SUBST(XML_LIBS) - fi - - AM_CONDITIONAL([HAVE_LIBXML2], test "x$HAVE_LIBXML2" = "xyes") --- -2.21.0 - diff --git a/net/clamav/patches/010-openssl-deprecated.patch b/net/clamav/patches/010-openssl-deprecated.patch deleted file mode 100644 index fdc305cb..00000000 --- a/net/clamav/patches/010-openssl-deprecated.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/libclamav/crypto.c -+++ b/libclamav/crypto.c -@@ -53,6 +53,10 @@ - - #include - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#define X509_CRL_get0_nextUpdate X509_CRL_get_nextUpdate -+#endif -+ - #if !defined(_WIN32) - #include - #endif -@@ -132,12 +136,14 @@ time_t timegm(struct tm *t) - */ - int cl_initialize_crypto(void) - { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_load_error_strings(); - SSL_library_init(); - OpenSSL_add_all_digests(); - OpenSSL_add_all_algorithms(); - OpenSSL_add_all_ciphers(); - ERR_load_crypto_strings(); -+#endif - - return 0; - } -@@ -1140,7 +1146,7 @@ X509_CRL *cl_load_crl(const char *file) - if ((x)) { - ASN1_TIME *tme; - -- tme = X509_CRL_get_nextUpdate(x); -+ tme = X509_CRL_get0_nextUpdate(x); - if (!tme || X509_cmp_current_time(tme) < 0) { - X509_CRL_free(x); - return NULL; diff --git a/net/conntrack-tools/Makefile b/net/conntrack-tools/Makefile new file mode 100644 index 00000000..0945263a --- /dev/null +++ b/net/conntrack-tools/Makefile @@ -0,0 +1,82 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=conntrack-tools +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://git.netfilter.org/conntrack-tools +PKG_SOURCE_DATE:=2018-05-01 +PKG_SOURCE_VERSION:=88610abee7e58f4da7ec6f198e00ff70a92c870f +PKG_MIRROR_HASH:=cccc5e25e3cb159385b170f63f9b7fd2186f68d32239718080f605c060ea1cb8 + +PKG_MAINTAINER:=Jo-Philipp Wich +PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:conntrack-tools_project:conntrack-tools + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:=libtirpc + +include $(INCLUDE_DIR)/package.mk + +define Package/conntrack-tools/default + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libnetfilter-conntrack +libnetfilter-cttimeout +libnetfilter-cthelper +libnetfilter-queue + SUBMENU:=Firewall + URL:=http://conntrack-tools.netfilter.org/ +endef + +define Package/conntrack +$(call Package/conntrack-tools/default) + TITLE:=Connection tracking tool +endef + +define Package/conntrack/description + Conntrack is a userspace command line program targeted at system + administrators. It enables them to view and manage the in-kernel + connection tracking state table. +endef + +CONFIGURE_ARGS += \ + --with-libtirpc + +define Package/conntrack/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/conntrack $(1)/usr/sbin/ +endef + +define Package/conntrackd +$(call Package/conntrack-tools/default) + TITLE:=Connection tracking daemon +endef + +define Package/conntrackd/conffiles +/etc/conntrackd/ +endef + +define Package/conntrackd/description + Conntrackd can replicate the status of the connections that are + currently being processed by your stateful firewall based on Linux. + Conntrackd can also run as statistics daemon. +endef + +define Package/conntrackd/install + $(INSTALL_DIR) \ + $(1)/etc/conntrackd \ + $(1)/etc/init.d \ + $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/conntrackd $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/conntrackd.init $(1)/etc/init.d/conntrackd +endef + +$(eval $(call BuildPackage,conntrack)) +$(eval $(call BuildPackage,conntrackd)) diff --git a/net/conntrack-tools/files/conntrackd.init b/net/conntrack-tools/files/conntrackd.init new file mode 100644 index 00000000..0e2945c9 --- /dev/null +++ b/net/conntrack-tools/files/conntrackd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2015 OpenWrt.org + +START=21 +STOP=89 + +USE_PROCD=1 +PROG="/usr/sbin/conntrackd" + +start_service() { + [ -e /etc/conntrackd/conntrackd.conf ] || return + procd_open_instance + + procd_set_param command $PROG -C /etc/conntrackd/conntrackd.conf + procd_set_param respawn + + procd_close_instance +} diff --git a/net/conntrack-tools/patches/conntrack-tools-1.4.5-rpc.patch b/net/conntrack-tools/patches/conntrack-tools-1.4.5-rpc.patch new file mode 100644 index 00000000..1f7fc44f --- /dev/null +++ b/net/conntrack-tools/patches/conntrack-tools-1.4.5-rpc.patch @@ -0,0 +1,41 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -50,6 +50,25 @@ + AS_HELP_STRING([--enable-systemd], [Build systemd support]), + [enable_systemd="$enableval"], [enable_systemd="no"]) + ++AC_ARG_WITH([libtirpc], ++ AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]), ++ [], [ with_libtirpc=no ]) ++ ++AS_IF([test "x$with_libtirpc" != xno], ++ [PKG_CHECK_MODULES([TIRPC], ++ [libtirpc], ++ [RPC_CFLAGS=$TIRPC_CFLAGS; RPC_LIBS=$TIRPC_LIBS;], ++ [AC_MSG_ERROR([libtirpc requested, but library not found.])] ++ )], ++ [AC_CHECK_HEADER(rpc/rpc.h, ++ [RPC_CFLAGS=""; RPC_LIBS="";], ++ [AC_MSG_ERROR([sunrpc requested, but headers are not present.])] ++ )] ++) ++ ++AC_SUBST(RPC_CFLAGS) ++AC_SUBST(RPC_LIBS) ++ + PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.1]) + PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3]) + PKG_CHECK_MODULES([LIBNETFILTER_CONNTRACK], [libnetfilter_conntrack >= 1.0.7]) +--- a/src/helpers/Makefile.am ++++ b/src/helpers/Makefile.am +@@ -30,8 +30,8 @@ + ct_helper_mdns_la_CFLAGS = $(HELPER_CFLAGS) + + ct_helper_rpc_la_SOURCES = rpc.c +-ct_helper_rpc_la_LDFLAGS = $(HELPER_LDFLAGS) +-ct_helper_rpc_la_CFLAGS = $(HELPER_CFLAGS) ++ct_helper_rpc_la_LDFLAGS = $(HELPER_LDFLAGS) $(RPC_LIBS) ++ct_helper_rpc_la_CFLAGS = $(HELPER_CFLAGS) $(RPC_CFLAGS) + + ct_helper_tftp_la_SOURCES = tftp.c + ct_helper_tftp_la_LDFLAGS = $(HELPER_LDFLAGS) diff --git a/net/conserver/Makefile b/net/conserver/Makefile index fbdad4dd..b2c1dd46 100644 --- a/net/conserver/Makefile +++ b/net/conserver/Makefile @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=conserver -PKG_VERSION:=8.2.1 +PKG_VERSION:=8.2.5 PKG_RELEASE:=1 -PKG_MAINTAINER:=Bjørn Mork PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.conserver.com/ -PKG_HASH:=251ae01997e8f3ee75106a5b84ec6f2a8eb5ff2f8092438eba34384a615153d0 +PKG_SOURCE_URL:=https://codeload.github.com/conserver/conserver/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=43be704932bca365d7bf34be929851cf0bb7a229cc28391b3302ae19d6e6565b +PKG_MAINTAINER:=Bjørn Mork PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -55,10 +56,17 @@ endef CONFIGURE_ARGS += \ --with-openssl \ + $(if $(CONFIG_IPV6),--with-ipv6) \ --sysconfdir=/etc/conserver \ --with-port=3109 \ --with-logfile=/var/log/conserver/server.log +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) ./files/config.sub $(PKG_BUILD_DIR)/ + $(CP) ./files/config.guess $(PKG_BUILD_DIR)/ +endef + define Package/conserver/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/conserver $(1)/usr/sbin/ diff --git a/net/conserver/files/config.guess b/net/conserver/files/config.guess new file mode 100644 index 00000000..79d1317f --- /dev/null +++ b/net/conserver/files/config.guess @@ -0,0 +1,1645 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2019 Free Software Foundation, Inc. + +timestamp='2019-03-04' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2019 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi-}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-pc-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + # shellcheck disable=SC2154 + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; +esac + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) /* >= ULTRIX4 */ + printf ("mips-dec-ultrix4\n"); exit (0); +#else +#if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST) + printf ("mips-dec-ultrix3\n"); exit (0); +#endif +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/net/conserver/files/config.sub b/net/conserver/files/config.sub new file mode 100644 index 00000000..3b4c7624 --- /dev/null +++ b/net/conserver/files/config.sub @@ -0,0 +1,1795 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2019 Free Software Foundation, Inc. + +timestamp='2019-01-05' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2019 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $os in + irix*) + ;; + *) + os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $os in + nextstep* ) + ;; + ns2*) + os=nextstep2 + ;; + *) + os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x$os != x ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux + ;; + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + solaris) + os=solaris2 + ;; + unixware*) + os=sysv4.2uw + ;; + gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + qnx*) + case $cpu in + x86 | i*86) + ;; + *) + os=nto-$os + ;; + esac + ;; + hiux*) + os=hiuxwe2 + ;; + nto-qnx*) + ;; + nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + ;; + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + opened*) + os=openedition + ;; + os400*) + os=os400 + ;; + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + wince*) + os=wince + ;; + utek*) + os=bsd + ;; + dynix*) + os=bsd + ;; + acis*) + os=aos + ;; + atheos*) + os=atheos + ;; + syllable*) + os=syllable + ;; + 386bsd) + os=bsd + ;; + ctix* | uts*) + os=sysv + ;; + nova*) + os=rtmk-nova + ;; + ns2) + os=nextstep2 + ;; + nsk*) + os=nsk + ;; + # Preserve the version number of sinix5. + sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + sinix*) + os=sysv4 + ;; + tpf*) + os=tpf + ;; + triton*) + os=sysv3 + ;; + oss*) + os=sysv3 + ;; + svr4*) + os=sysv4 + ;; + svr3) + os=sysv3 + ;; + sysvr4) + os=sysv4 + ;; + # This must come after sysvr4. + sysv*) + ;; + ose*) + os=ose + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint + ;; + zvmoe) + os=zvmoe + ;; + dicos*) + os=dicos + ;; + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + os=elf + ;; + esac + ;; + nacl*) + ;; + ios) + ;; + none) + ;; + *-eabi) + ;; + *) + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $cpu-$vendor in + score-*) + os=elf + ;; + spu-*) + os=elf + ;; + *-acorn) + os=riscix1.2 + ;; + arm*-rebel) + os=linux + ;; + arm*-semi) + os=aout + ;; + c4x-* | tic4x-*) + os=coff + ;; + c8051-*) + os=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) + os=elf + ;; + tic54x-*) + os=coff + ;; + tic55x-*) + os=coff + ;; + tic6x-*) + os=coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=tops20 + ;; + pdp11-*) + os=none + ;; + *-dec | vax-*) + os=ultrix4.2 + ;; + m68*-apollo) + os=domain + ;; + i386-sun) + os=sunos4.0.2 + ;; + m68000-sun) + os=sunos3 + ;; + m68*-cisco) + os=aout + ;; + mep-*) + os=elf + ;; + mips*-cisco) + os=elf + ;; + mips*-*) + os=elf + ;; + or32-*) + os=coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=sysv3 + ;; + sparc-* | *-sun) + os=sunos4.1.1 + ;; + pru-*) + os=elf + ;; + *-be) + os=beos + ;; + *-ibm) + os=aix + ;; + *-knuth) + os=mmixware + ;; + *-wec) + os=proelf + ;; + *-winbond) + os=proelf + ;; + *-oki) + os=proelf + ;; + *-hp) + os=hpux + ;; + *-hitachi) + os=hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=sysv + ;; + *-cbm) + os=amigaos + ;; + *-dg) + os=dgux + ;; + *-dolphin) + os=sysv3 + ;; + m68k-ccur) + os=rtu + ;; + m88k-omron*) + os=luna + ;; + *-next) + os=nextstep + ;; + *-sequent) + os=ptx + ;; + *-crds) + os=unos + ;; + *-ns) + os=genix + ;; + i370-*) + os=mvs + ;; + *-gould) + os=sysv + ;; + *-highlevel) + os=bsd + ;; + *-encore) + os=bsd + ;; + *-sgi) + os=irix + ;; + *-siemens) + os=sysv4 + ;; + *-masscomp) + os=rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=uxpv + ;; + *-rom68k) + os=coff + ;; + *-*bug) + os=coff + ;; + *-apple) + os=macos + ;; + *-atari*) + os=mint + ;; + *-wrs) + os=vxworks + ;; + *) + os=none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $os in + riscix*) + vendor=acorn + ;; + sunos*) + vendor=sun + ;; + cnk*|-aix*) + vendor=ibm + ;; + beos*) + vendor=be + ;; + hpux*) + vendor=hp + ;; + mpeix*) + vendor=hp + ;; + hiux*) + vendor=hitachi + ;; + unos*) + vendor=crds + ;; + dgux*) + vendor=dg + ;; + luna*) + vendor=omron + ;; + genix*) + vendor=ns + ;; + clix*) + vendor=intergraph + ;; + mvs* | opened*) + vendor=ibm + ;; + os400*) + vendor=ibm + ;; + ptx*) + vendor=sequent + ;; + tpf*) + vendor=ibm + ;; + vxsim* | vxworks* | windiss*) + vendor=wrs + ;; + aux*) + vendor=apple + ;; + hms*) + vendor=hitachi + ;; + mpw* | macos*) + vendor=apple + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + vendor=atari + ;; + vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/net/coova-chilli/Config.in b/net/coova-chilli/Config.in index 8c93f459..b20788ee 100644 --- a/net/coova-chilli/Config.in +++ b/net/coova-chilli/Config.in @@ -1,11 +1,10 @@ # CoovaChilli advanced configuration -menu "Configuration" - depends on PACKAGE_coova-chilli +if PACKAGE_coova-chilli config COOVACHILLI_PROXY - bool "Enable support for chilli proxy. Required for AAA Proxy through http" - default n + bool "Enable support for chilli proxy. Required for AAA Proxy through http" + default n config COOVACHILLI_REDIR bool "Enable support for redir server. Required for uamregex" @@ -19,10 +18,6 @@ config COOVACHILLI_USERAGENT bool "Enable recording user-agent" default n -config COOVACHILLI_DNSLOG - bool "Enable support to log DNS name queries" - default n - config COOVACHILLI_UAMDOMAINFILE bool "Enable loading of mass uamdomains from file" default n @@ -31,6 +26,10 @@ config COOVACHILLI_LARGELIMITS bool "Enable larger limits for use with non-embedded systems" default n +config COOVACHILLI_JSONINTERFACE + bool "Enable the JSON interface for the CoovaChilli Controller" + default n + choice prompt "SSL library" default COOVACHILLI_NOSSL @@ -38,12 +37,12 @@ choice config COOVACHILLI_NOSSL bool "No SSL support" -config COOVACHILLI_CYASSL - bool "CyaSSL" +config COOVACHILLI_WOLFSSL + bool "wolfSSL" config COOVACHILLI_OPENSSL bool "OpenSSL" endchoice -endmenu +endif diff --git a/net/coova-chilli/Makefile b/net/coova-chilli/Makefile index 2ec3c015..517a0221 100644 --- a/net/coova-chilli/Makefile +++ b/net/coova-chilli/Makefile @@ -8,31 +8,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=coova-chilli -PKG_VERSION:=1.3.0+20141128 -PKG_MAINTAINER:=Jaehoon You -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING -PKG_RELEASE:=6 +PKG_VERSION:=1.5 +PKG_RELEASE:=3 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/coova/coova-chilli -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=b93de20a288c01c2ba28e96e31ad6da01627f45f PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=89c9b313881c658a0f6b91329a78bb1a0151878b19bc99b315976081c6355557 +PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)? +PKG_HASH:=75e15fd00a870b8a95df1440977c688a05a109f90b57bf679b931101d427d0fb +PKG_MAINTAINER:=Jaehoon You +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=0 -PKG_CONFIG_DEPENDS := \ - COOVACHILLI_MINIPORTAL \ - COOVACHILLI_REDIR \ - COOVACHILLI_USERAGENT \ - COOVACHILLI_DNSLOG \ - COOVACHILLI_UAMDOMAINFILE \ +PKG_CONFIG_DEPENDS:= \ + COOVACHILLI_JSONINTERFACE \ COOVACHILLI_LARGELIMITS \ + COOVACHILLI_MINIPORTAL \ COOVACHILLI_NOSSL \ - COOVACHILLI_CYASSL \ - COOVACHILLI_OPENSSL + COOVACHILLI_OPENSSL \ + COOVACHILLI_PROXY \ + COOVACHILLI_REDIR \ + COOVACHILLI_UAMDOMAINFILE \ + COOVACHILLI_USERAGENT \ + COOVACHILLI_WOLFSSL \ + IPV6 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/kernel.mk @@ -41,9 +43,11 @@ define Package/coova-chilli SUBMENU:=Captive Portals SECTION:=net CATEGORY:=Network - DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl + DEPENDS:=+kmod-tun +librt +COOVACHILLI_MINIPORTAL:haserl \ + +COOVACHILLI_WOLFSSL:libwolfssl +COOVACHILLI_OPENSSL:libopenssl \ + +COOVACHILLI_JSONINTERFACE:libjson-c TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version) - URL:=http://www.coova.org/CoovaChilli + URL:=https://coova.github.io/ MENU:=1 endef @@ -78,7 +82,7 @@ endef DISABLE_NLS= -TARGET_CFLAGS += $(FPIC) +TARGET_CFLAGS += $(FPIC) -Wno-address-of-packed-member CONFIGURE_VARS += \ ARCH="$(LINUX_KARCH)" \ @@ -106,12 +110,14 @@ define Build/Configure $(call Build/Configure/Default, \ $(if $(CONFIG_COOVACHILLI_PROXY),--enable,--disable)-chilliproxy \ $(if $(CONFIG_COOVACHILLI_REDIR),--enable,--disable)-chilliredir \ - $(if $(CONFIG_COOVACHILLI_DNSLOG),--enable,--disable)-dnslog \ $(if $(CONFIG_COOVACHILLI_MINIPORTAL),--enable,--disable)-miniportal \ $(if $(CONFIG_COOVACHILLI_USERAGENT),--enable,--disable)-useragent \ $(if $(CONFIG_COOVACHILLI_LARGELIMITS),--enable,--disable)-largelimits \ + $(if $(CONFIG_COOVACHILLI_JSONINTERFACE),--enable,--disable)-libjson \ + $(if $(CONFIG_COOVACHILLI_JSONINTERFACE),--enable,--disable)-json \ $(if $(CONFIG_COOVACHILLI_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \ - $(if $(CONFIG_COOVACHILLI_CYASSL),--with,--without)-cyassl \ + $(if $(CONFIG_IPV6),--with,--without)-ipv6 \ + $(if $(CONFIG_COOVACHILLI_WOLFSSL),--with,--without)-cyassl \ $(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \ $(if $(CONFIG_PACKAGE_kmod-ipt-coova),--with-nfcoova) \ ) @@ -140,8 +146,6 @@ define Package/coova-chilli/install $(INSTALL_BIN) files/chilli.init $(1)/etc/init.d/chilli $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) files/chilli.config $(1)/etc/config/chilli - $(INSTALL_DIR) $(1)/lib/firewall - $(CP) files/chilli.firewall $(1)/lib/firewall/chilli.sh endef $(eval $(call BuildPackage,coova-chilli)) diff --git a/net/coova-chilli/files/chilli.config b/net/coova-chilli/files/chilli.config index 4c037c62..11286c7b 100644 --- a/net/coova-chilli/files/chilli.config +++ b/net/coova-chilli/files/chilli.config @@ -12,20 +12,13 @@ config chilli # name of network interface option network '' - # Include this flag if process is to run in the foreground - #option fg - # Include this flag to include debug information. - #option debug 9 + #option debug 1 # Re-read configuration file at this interval. Will also cause new domain # name lookups to be performed. Value is given in seconds. #option interval 3600 - # File to store information about the process id of the program. - # The program must have write access to this file/directory. - #option pidfile /var/run/chilli.pid - # Directory to use for nonvolatile storage. # The program must have write access to this directory. # this option is currently ignored @@ -71,14 +64,14 @@ config chilli # Script executed after network interface has been brought up. # Executed with the following parameters: # - # Normally you do not need to uncomment this option. - #option ipup /etc/chilli.ipup + # Normally you do not need to modify this option. + option ipup /etc/chilli/up.sh # Script executed after network interface has been taken down. # Executed with the following parameters: # - # Normally you do not need to uncomment this option. - #option ipdown /etc/chilli.ipdown + # Normally you do not need to modify this option. + option ipdown /etc/chilli/down.sh # Radius parameters diff --git a/net/coova-chilli/files/chilli.firewall b/net/coova-chilli/files/chilli.firewall deleted file mode 100644 index a5b1d001..00000000 --- a/net/coova-chilli/files/chilli.firewall +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -chilli_firewall() { - local cfg="$1" - - local network ifname tun - - config_get network "$cfg" network - - . /lib/functions/network.sh - network_get_device ifname ${network:-lan} - - if [ "$ifname" = "" ] - then - config_get ifname "$cfg" dhcpif - fi - - config_get tun "$cfg" tundev - - for n in ACCEPT DROP REJECT - do - iptables -F zone_${network}_${n} - iptables -I zone_${network}_${n} -i $tun -j $n - iptables -I zone_${network}_${n} -o $tun -j $n - done - - iptables -D forward -i ${ifname} -j zone_${network}_forward - iptables -A forward -i ${ifname} -j DROP - iptables -A forward -i $tun -j zone_${network}_forward - - iptables -D input -i ${ifname} -j zone_${network} - iptables -A input -i $tun -j zone_${network} - - iptables -I zone_${network} -p tcp --dport 3990 -j ACCEPT - iptables -I zone_${network} -p tcp --dport 3991 -j ACCEPT -} - -chilli_post_core_cb() { - config_load chilli - config_foreach chilli_firewall chilli -} diff --git a/net/coova-chilli/files/chilli.init b/net/coova-chilli/files/chilli.init index e0f0a0b6..ab6ce713 100644 --- a/net/coova-chilli/files/chilli.init +++ b/net/coova-chilli/files/chilli.init @@ -9,18 +9,15 @@ service_triggers() { } config_cb() { - local chilli_inst="$2" - if [ "$chilli_inst" != "" ]; then - chilli_conf="/var/run/chilli_${chilli_inst}.conf" - if [ -e "$chilli_conf" ]; then - rm -f "$chilli_conf" - fi - eval "start_chilli_$chilli_inst=1" - fi + chilli_conf="/var/run/chilli_${2}.conf" + [ -e "$chilli_conf" ] && rm -f "$chilli_conf" } option_cb() { case "$1" in + # ignored/internal settings + disabled) + ;; # UCI settings network) . /lib/functions/network.sh @@ -28,11 +25,18 @@ option_cb() { network_get_device ifname "$2" echo "dhcpif=\"$ifname\"" >> "$chilli_conf" ;; - disabled) - [ "$(config_get_bool "$1")" = "1" ] && eval "start_chilli_$chilli_inst=0" - ;; # boolean settings - debug|dhcpbroadcast|nodynip|vlanlocation|locationstopstart|locationcopycalled|locationimmediateupdate|locationopt82|coanoipcheck|noradallow|proxymacaccept|proxyonacct|dhcpmacset|dhcpradius|noc2c|eapolenable|uamanydns|uamanyip|uamnatanyip|nouamsuccess|nowispr1|nowispr2|domaindnslocal|radsec|macauth|macreauth|macauthdeny|macallowlocal|strictmacauth|strictdhcp|ieee8021q|only8021q|radiusoriginalurl|swapoctets|statusfilesave|wpaguests|openidauth|papalwaysok|mschapv2|chillixml|acctupdate|dnsparanoia|seskeepalive|usetap|noarpentries|framedservice|scalewin|redir|injectwispr|redirurl|routeonetone|nousergardendata|uamgardendata|uamotherdata|withunixipc|uamallowpost|redirssl|uamuissl|layer3|patricia|redirdnsreq|dhcpnotidle|ipv6|ipv6only) + acctupdate|chillixml|coanoipcheck|debug|dhcpbroadcast|dhcpmacset|dhcpnotidle|\ + dhcpradius|dnsparanoia|domaindnslocal|eapolenable|fg|forgiving|framedservice|\ + ieee8021q|injectwispr|ipv6|ipv6only|layer3|locationcopycalled|\ + locationimmediateupdate|locationopt82|locationstopstart|macallowlocal|\ + macauth|macauthdeny|macreauth|mmapring|mschapv2|noarpentries|noc2c|nochallenge|\ + nodynip|noradallow|nosystemdns|nouamsuccess|nousergardendata|nowispr1|nowispr2|\ + only8021q|openidauth|papalwaysok|patricia|postauthproxyssl|proxymacaccept|\ + proxyonacct|radiusoriginalurl|radsec|redir|redirdnsreq|redirssl|redirurl|reload|\ + routeonetone|scalewin|seskeepalive|statusfilesave|strictdhcp|strictmacauth|\ + swapoctets|uamallowpost|uamanydns|uamanyip|uamauthedallowed|uamgardendata|\ + uamnatanyip|uamotherdata|uamuissl|usetap|vlanlocation|wpaguests) [ "$2" = "true" -o "$2" = "1" ] && echo "$1" >> "$chilli_conf" ;; *) @@ -43,14 +47,20 @@ option_cb() { start_chilli() { local cfg="$1" - local start_chilli=$(eval "echo \$start_chilli_$cfg") - [ "$start_chilli" = "0" ] && return local base="/var/run/chilli_${cfg}" + config_get_bool disabled "$1" 'disabled' 0 + [ $disabled = 1 ] && return + procd_open_instance "$cfg" procd_set_param command /usr/sbin/chilli - procd_set_param file "${base}.conf" - procd_append_param command --fg --conf "${base}.conf" --pidfile "${base}.pid" --cmdsocket "${base}.sock" --unixipc "${base}.ipc" + procd_set_param file "$chilli_conf" + procd_append_param command \ + --fg \ + --conf "${base}.conf" \ + --pidfile "${base}.pid" \ + --cmdsocket "${base}.sock" \ + --unixipc "${base}.ipc" procd_set_param respawn procd_set_param stdout 1 procd_set_param stderr 1 diff --git a/net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch b/net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch deleted file mode 100644 index 2efecbe2..00000000 --- a/net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/src/system.h -+++ b/src/system.h -@@ -83,10 +83,6 @@ - #include - #endif - --#ifdef HAVE_SYS_SYSINFO_H --#include --#endif -- - #ifdef HAVE_TIME_H - #include - #endif -@@ -139,6 +135,10 @@ - #include - #endif - -+#ifdef HAVE_SYS_SYSINFO_H -+#include -+#endif -+ - #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) - #include - #include diff --git a/net/coova-chilli/patches/100-fix_compile_kmod.patch b/net/coova-chilli/patches/100-fix_compile_kmod.patch new file mode 100644 index 00000000..f2047b25 --- /dev/null +++ b/net/coova-chilli/patches/100-fix_compile_kmod.patch @@ -0,0 +1,13 @@ +--- a/src/linux/Makefile ++++ b/src/linux/Makefile +@@ -25,8 +25,8 @@ lib%.o: lib%.c + $(CC) $(CFLAGS) -fPIC -O2 -Wall -D_INIT=lib$*_init -c -o $@ $<; + + install: modules_install libxt_coova.so +- mkdir -p $(DESTDIR)/lib/xtables/ +- cp libxt_coova.so $(DESTDIR)/lib/xtables/ ++ mkdir -p $(DESTDIR)/usr/lib/iptables/ ++ cp libxt_coova.so $(DESTDIR)/usr/lib/iptables/ + + distdir: + diff --git a/net/coova-chilli/patches/200-fix_compile_kmod.patch b/net/coova-chilli/patches/200-fix_compile_kmod.patch deleted file mode 100644 index 27225786..00000000 --- a/net/coova-chilli/patches/200-fix_compile_kmod.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/src/linux/Makefile -+++ b/src/linux/Makefile -@@ -21,11 +21,11 @@ lib%.so: lib%.o - $(CC) $(CFLAGS) -shared -o $@ $^; - - lib%.o: lib%.c -- $(CC) $(CFLAGS) -fPIC -O2 -Wall -I${KERNEL_DIR}/include -D_INIT=lib$*_init -c -o $@ $<; -+ $(CC) $(CFLAGS) -D_INIT=lib$*_init -c -o $@ $<; - - install: modules_install libxt_coova.so -- mkdir -p $(DESTDIR)/lib/xtables/ -- cp libxt_coova.so $(DESTDIR)/lib/xtables/ -+ mkdir -p $(DESTDIR)/usr/lib/iptables/ -+ cp libxt_coova.so $(DESTDIR)/usr/lib/iptables/ - - distdir: - diff --git a/net/coova-chilli/patches/200-wolfssl.patch b/net/coova-chilli/patches/200-wolfssl.patch new file mode 100644 index 00000000..9cc61da9 --- /dev/null +++ b/net/coova-chilli/patches/200-wolfssl.patch @@ -0,0 +1,53 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -397,7 +397,7 @@ AC_ARG_WITH([cyassl], + [AS_HELP_STRING([--with-cyassl], [enable support for cyassl])],[],[with_cyassl=no]) + + AS_IF([test x"$with_cyassl" != xno], +- [AC_CHECK_LIB([cyassl], [CyaSSL_Init], ++ [AC_CHECK_LIB([cyassl], [wolfSSL_Init], + [AC_SUBST([LIBSSL], ["-lcyassl"]) + AC_DEFINE([HAVE_CYASSL], [1], + [Define if you have cyassl]) +--- a/src/ippool.c ++++ b/src/ippool.c +@@ -35,6 +35,7 @@ int ippool_print(int fd, struct ippool_t *this) { + char * sep = "-- %-15s ------------------------------------------------------------\n"; + + #define ERR 0 ++#undef USED /* defined in */ + #define USED 1 + #define FREE 2 + #define LIST 3 +--- a/src/md5.h ++++ b/src/md5.h +@@ -35,7 +35,6 @@ + #define MD5Update MD5_Update + #define MD5Final MD5_Final + +-typedef struct CYASSL_MD5_CTX MD5_CTX; + #else + + struct MD5Context { +--- a/src/ssl.c ++++ b/src/ssl.c +@@ -131,7 +131,7 @@ _openssl_env_init(openssl_env *env, char *engine, int server) { + */ + const long options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION; + env->meth = SSLv23_method(); +- env->ctx = SSL_CTX_new(env->meth); ++ env->ctx = SSL_CTX_new((void *)env->meth); + SSL_CTX_set_options(env->ctx, options); + if (_options.sslciphers) { + SSL_CTX_set_cipher_list(env->ctx, _options.sslciphers); +--- a/src/ssl.h ++++ b/src/ssl.h +@@ -48,6 +48,8 @@ typedef struct { + #include + #include + ++#define OPENSSL_NO_ENGINE ++#include + #include + #include + #include diff --git a/net/coova-chilli/patches/201-fix_dereferencing_pointers.patch b/net/coova-chilli/patches/201-fix_dereferencing_pointers.patch deleted file mode 100644 index d608835a..00000000 --- a/net/coova-chilli/patches/201-fix_dereferencing_pointers.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/src/linux/xt_coova.c -+++ b/src/linux/xt_coova.c -@@ -292,6 +292,8 @@ static int coova_mt_check(const struct x - struct coova_table *t; - #ifdef CONFIG_PROC_FS - struct proc_dir_entry *pde; -+ kuid_t uid; -+ kgid_t gid; - #endif - unsigned i; - int ret = 0; -@@ -330,8 +332,9 @@ static int coova_mt_check(const struct x - ret = -ENOMEM; - goto out; - } -- pde->uid = ip_list_uid; -- pde->gid = ip_list_gid; -+ uid = make_kuid(&init_user_ns, ip_list_uid); -+ gid = make_kgid(&init_user_ns, ip_list_gid); -+ proc_set_user(pde, uid, gid); - #endif - spin_lock_bh(&coova_lock); - list_add_tail(&t->list, &tables); -@@ -445,14 +448,13 @@ static const struct seq_operations coova - - static int coova_seq_open(struct inode *inode, struct file *file) - { -- struct proc_dir_entry *pde = PDE(inode); - struct coova_iter_state *st; - - st = __seq_open_private(file, &coova_seq_ops, sizeof(*st)); - if (st == NULL) - return -ENOMEM; - -- st->table = pde->data; -+ st->table = PDE_DATA(inode); - return 0; - } - -@@ -460,8 +462,7 @@ static ssize_t - coova_mt_proc_write(struct file *file, const char __user *input, - size_t size, loff_t *loff) - { -- const struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); -- struct coova_table *t = pde->data; -+ struct coova_table *t = PDE_DATA(file->f_path.dentry->d_inode); - struct coova_entry *e; - char buf[sizeof("+b335:1d35:1e55:dead:c0de:1715:5afe:c0de")]; - const char *c = buf; diff --git a/net/coova-chilli/patches/300-fix-compile-with-cyassl.patch b/net/coova-chilli/patches/300-fix-compile-with-cyassl.patch deleted file mode 100644 index 3b61d49c..00000000 --- a/net/coova-chilli/patches/300-fix-compile-with-cyassl.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/md5.h -+++ b/src/md5.h -@@ -28,6 +28,14 @@ - #define MD5Update MD5_Update - #define MD5Final MD5_Final - -+#elif HAVE_CYASSL -+#include -+ -+#define MD5Init MD5_Init -+#define MD5Update MD5_Update -+#define MD5Final MD5_Final -+ -+typedef struct CYASSL_MD5_CTX MD5_CTX; - #else - - struct MD5Context { ---- a/src/md5.c -+++ b/src/md5.c -@@ -18,7 +18,7 @@ - #include /* for memcpy() */ - #include "md5.h" - --#ifndef HAVE_OPENSSL -+#if !defined(HAVE_OPENSSL) && !defined(HAVE_CYASSL) - - void byteReverse(unsigned char *buf, size_t longs); - diff --git a/net/coova-chilli/patches/300-sysinfo.patch b/net/coova-chilli/patches/300-sysinfo.patch new file mode 100644 index 00000000..033b5ef9 --- /dev/null +++ b/net/coova-chilli/patches/300-sysinfo.patch @@ -0,0 +1,25 @@ +From 196b783b5ea7f8d6cf57ddbd41dc1881ef47a1c4 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Wed, 11 Dec 2019 19:33:58 -0800 +Subject: [PATCH] system.h: Fix compilation with kernel 4.19 + musl + + includes , which redefines struct sysinfo, leading to an error. +Define the linux header as included to solve compilation. + +Signed-off-by: Rosen Penev +--- + src/system.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/system.h b/src/system.h +index 257b65b..5c1aa4a 100644 +--- a/src/system.h ++++ b/src/system.h +@@ -114,6 +114,7 @@ + + #ifdef HAVE_SYS_SYSINFO_H + #include ++#define _LINUX_SYSINFO_H + #else + #ifdef HAVE_LINUX_SYSINFO_H + #define _LINUX_KERNEL_H diff --git a/net/coova-chilli/patches/400-fix-compile-with-musl.patch b/net/coova-chilli/patches/400-fix-compile-with-musl.patch deleted file mode 100644 index a810a734..00000000 --- a/net/coova-chilli/patches/400-fix-compile-with-musl.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- a/src/system.h -+++ b/src/system.h -@@ -78,11 +78,6 @@ - #include - #endif - --#ifdef HAVE_LINUX_SYSINFO_H --#define _LINUX_KERNEL_H --#include --#endif -- - #ifdef HAVE_TIME_H - #include - #endif -@@ -123,6 +118,11 @@ - #include - #endif - -+#ifdef HAVE_SYS_SYSINFO_H -+#define _LINUX_SYSINFO_H -+#include -+#endif -+ - #if defined(__linux__) - #include - #include -@@ -135,10 +135,6 @@ - #include - #endif - --#ifdef HAVE_SYS_SYSINFO_H --#include --#endif -- - #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) - #include - #include -@@ -170,10 +166,6 @@ - #include - #endif - --#ifdef HAVE_NET_ETHERNET_H --#include --#endif -- - #ifdef HAVE_ASM_TYPES_H - #include - #endif ---- a/src/chilli_limits.h -+++ b/src/chilli_limits.h -@@ -18,8 +18,8 @@ - * - */ - --#ifndef _LIMITS_H --#define _LIMITS_H -+#ifndef _CHILLI_LIMITS_H -+#define _CHILLI_LIMITS_H - - /* - * extracted from various .h files, needs some cleanup. diff --git a/net/coova-chilli/patches/400-fix-version.patch b/net/coova-chilli/patches/400-fix-version.patch new file mode 100644 index 00000000..1f1ef712 --- /dev/null +++ b/net/coova-chilli/patches/400-fix-version.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2,7 +2,7 @@ + # Process this file with autoconf to produce a configure script. + + AC_PREREQ([2.59]) +-AC_INIT([coova-chilli],[1.4],[https://github.com/coova/coova-chilli/issues]) ++AC_INIT([coova-chilli],[1.5],[https://github.com/coova/coova-chilli/issues]) + AC_CONFIG_SRCDIR([src/chilli.c]) + + AM_INIT_AUTOMAKE diff --git a/net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch b/net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch deleted file mode 100644 index 9aaf5463..00000000 --- a/net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/chilli.c -+++ b/src/chilli.c -@@ -4297,8 +4297,10 @@ static int chilliauth_cb(struct radius_t - while (!differ && r1 > 0 && r2 > 0); - } - -- if (newfd) safe_close(newfd); newfd=0; -- if (oldfd) safe_close(oldfd); oldfd=0; -+ if (newfd) safe_close(newfd); -+ newfd=0; -+ if (oldfd) safe_close(oldfd); -+ oldfd=0; - - if (differ) { - log_dbg("Writing out new hs.conf file with administraive-user settings"); ---- a/src/redir.c -+++ b/src/redir.c -@@ -3176,9 +3176,11 @@ pid_t redir_fork(int in, int out) { - } - - #if defined(F_DUPFD) -- if (fcntl(in,F_GETFL,0) == -1) return -1; safe_close(0); -+ if (fcntl(in,F_GETFL,0) == -1) return -1; -+ safe_close(0); - if (fcntl(in,F_DUPFD,0) == -1) return -1; -- if (fcntl(out,F_GETFL,1) == -1) return -1; safe_close(1); -+ if (fcntl(out,F_GETFL,1) == -1) return -1; -+ safe_close(1); - if (fcntl(out,F_DUPFD,1) == -1) return -1; - #else - if (dup2(in,0) == -1) return -1; diff --git a/net/cshark/Makefile b/net/cshark/Makefile index a4b67d9b..e5fa9622 100644 --- a/net/cshark/Makefile +++ b/net/cshark/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cshark -PKG_VERSION=2018-08-20-$(PKG_SOURCE_VERSION) -PKG_RELEASE=1 +PKG_SOURCE_DATE:=2018-08-20 +PKG_SOURCE_VERSION:=7a7cf7f35074b85c6fb0c52067e640d2433ef73b +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git -PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=7a7cf7f35074b85c6fb0c52067e640d2433ef73b -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_HASH:=bc448bb4e910e771a5a8a39af7cfa09a79b59c595f15cdcae9d0103ce09be019 +PKG_MIRROR_HASH:=b09822e93d7de7f4aa9fa018c304ebc52dd3419de3dd2eff463986d3a3b8ca71 + +PKG_MAINTAINER:=Luka Perkov +PKG_LICENSE:=BSD-2-Clause PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -28,14 +28,12 @@ define Package/cshark SECTION:=net CATEGORY:=Network TITLE:=CloudShark capture tool - URL:=http://www.cloudshark.org/ + URL:=https://cloudshark.io/ DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-mbedtls - MAINTAINER:=Luka Perkov endef CMAKE_OPTIONS = \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DWITH_DEBUG=OFF \ + -DWITH_DEBUG=OFF define Package/cshark/conffiles /etc/config/cshark diff --git a/net/daemonlogger/Makefile b/net/daemonlogger/Makefile index 82eb4fc3..ba81a7bc 100644 --- a/net/daemonlogger/Makefile +++ b/net/daemonlogger/Makefile @@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Mirko Vogt -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/net/danish/Makefile b/net/danish/Makefile deleted file mode 100644 index 7b595941..00000000 --- a/net/danish/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2017 Andrew McConachie -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=danish -PKG_VERSION:=0.1 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Andrew McConachie -PKG_LICENSE:=GPL-3.0 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/smutt/danish.git -PKG_SOURCE_VERSION:=f726656a4e37c46c037f61334ac48b35b7de25be -PKG_MIRROR_HASH:=cb0b4bb7a210091d807ee8e4a2876865f32a9bf195836eb2e1edf6c5975d1130 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../../lang/python/python-package.mk - -define Package/danish - SECTION:=net - CATEGORY:=Network - SUBMENU:=IP Addresses and Names - TITLE:=A middle box implementation of RFC 6698 for HTTPS. - URL:=https://github.com/smutt/danish - DEPENDS:=+python +python-dns +python-pcapy +python-dpkt +kmod-ipt-filter +iptables-mod-filter +dnsmasq-full -endef - -define Package/danish/description - Danish is an experiment in middle-box DANE (RFC 6698) for HTTPS. - https://www.middlebox-dane.org/ -endef - -define Build/Compile - $(call Build/Compile/PyMod,,\ - install --prefix=/usr --root="$(PKG_INSTALL_DIR)", \ - ) -endef - -define Package/danish/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/danish.py $(1)/usr/sbin/danish - $(INSTALL_DIR) $(1)/etc/config - $(CP) $(PKG_BUILD_DIR)/danish.conf $(1)/etc/config/danish - $(INSTALL_DIR) $(1)/etc/init.d - $(CP) $(PKG_BUILD_DIR)/danish.init $(1)/etc/init.d/danish -endef - -$(eval $(call BuildPackage,danish)) diff --git a/net/darkstat/Makefile b/net/darkstat/Makefile index 379c2600..c5700512 100644 --- a/net/darkstat/Makefile +++ b/net/darkstat/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2007-2016 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -9,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=darkstat PKG_VERSION:=3.0.719 -PKG_RELEASE:=1 +PKG_RELEASE:=5 PKG_MAINTAINER:=Jean-Michel Lacroix @@ -27,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk define Package/darkstat SECTION:=net CATEGORY:=Network - DEPENDS:=+libpcap +zlib +USE_GLIBC:libbsd + DEPENDS:=+libpcap +zlib TITLE:=Network bandwidth monitor URL:=http://unix4lyfe.org/darkstat/ endef @@ -46,7 +44,10 @@ CONFIGURE_ARGS += \ --disable-debug \ --with-chroot-dir=/var/empty -TARGET_CFLAGS += -std=gnu99 +CONFIGURE_VARS += \ + ac_cv_search_setproctitle=no \ + ac_cv_search_strlcpy=no \ + ac_cv_search_strlcat=no define Build/Compile $(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \ diff --git a/net/darkstat/files/darkstat.config b/net/darkstat/files/darkstat.config index ba7c1c2f..ebe5718d 100644 --- a/net/darkstat/files/darkstat.config +++ b/net/darkstat/files/darkstat.config @@ -1,13 +1,12 @@ config darkstat option interface 'lan' option syslog false - option verbose true - option no_daemon false + option verbose false option no_promisc false option no_dns false option no_macs false option no_lastseen false -# option httpaddr '0.0.0.0' + option httpaddr '0.0.0.0' # option httpport '667' # option network_filter 'not (src net 192.168.1 and dst net 192.168.1)' # option network_netmask '192.168.1.0/255.255.255.0' @@ -17,4 +16,6 @@ config darkstat # option ports_max '60' # option ports_keep '30' # option highest_port '65534' - +# option export_file 'darkstat_export.log' +# option import_file 'darkstat_export.log' +# option daylog_file 'darkstat_daylog.log' diff --git a/net/darkstat/files/darkstat.init b/net/darkstat/files/darkstat.init index 27d063ea..52332201 100755 --- a/net/darkstat/files/darkstat.init +++ b/net/darkstat/files/darkstat.init @@ -1,97 +1,99 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007-2016 OpenWrt.org +#!/bin/sh /etc/rc.common +# Copyright (C) 2018 Jean-Michel Lacroix + +USE_PROCD=1 START=60 -APP=darkstat -RUN_D=/var/empty -PID_F=$RUN_D/darkstat.pid -SYSLOG="" -VERBOSE="" -NODAEMON="" -NOPROMISC="" -NODNS="" -NOMACS="" -NOLASTSEEN="" -LOCAL="" -paramstr="" +APP=darkstat +RUN_D=/var/darkstat +PID_F=$RUN_D/$APP.pid +CONFIGNAME=darkstat +USER=nobody +GROUP=nogroup + +CONFIGSTR="" +FILTERSTR="" export_bool () { local option="$1" local section="$2" local _keystr="$3" local _loctmp - paramstr="" config_get_bool _loctmp "$section" "$option" if [ -n "$_loctmp" ]; then if [ 1 -eq "$_loctmp" ]; then - paramstr="${_keystr} " + CONFIGSTR="$CONFIGSTR${_keystr} " fi fi } -start() { +set_config_string(){ mkdir -p $RUN_D . /lib/functions/network.sh - config_load darkstat - config_foreach start_darkstat darkstat + config_load $CONFIGNAME + config_foreach build_config_string darkstat } -start_darkstat() { - local cfg="$1" +build_config_string() { + local cfg="$1" config_get interface $cfg interface + network_get_device ifname "$interface" + CONFIGSTR=" -i $ifname " export_bool syslog $cfg "--syslog" - SYSLOG=$paramstr export_bool verbose $cfg "--verbose" - VERBOSE=$paramstr - export_bool no_daemon $cfg "--no-daemon" - NODAEMON=$paramstr + # We need the --no-daemon parameter as with PROCD the process has to run in the background + CONFIGSTR="$CONFIGSTR--no-daemon " export_bool no_promisc $cfg "--no-promisc" - NOPROMISC=$paramstr export_bool no_dns $cfg "--no-dns" - NODNS=$paramstr export_bool no_macs $cfg "--no-macs" - NOMACS=$paramstr export_bool no_lastseen $cfg "--no-lastseen" - NOLASTSEEN=$paramstr config_get httpaddr $cfg httpaddr + CONFIGSTR="$CONFIGSTR${httpaddr:+-b "$httpaddr"} " config_get httpport $cfg httpport - config_get network_filter $cfg network_filter + CONFIGSTR="$CONFIGSTR${httpport:+-p "$httpport"} " config_get network_netmask $cfg network_netmask + CONFIGSTR="$CONFIGSTR${network_netmask:+-l "$network_netmask"} " export_bool local_only $cfg "--local-only" - LOCAL=$paramstr config_get hosts_max $cfg hosts_max + CONFIGSTR="$CONFIGSTR${hosts_max:+--hosts-max "$hosts_max"} " config_get hosts_keep $cfg hosts_keep - config_get ports_max $cfg ports_max - config_get ports_keep $cfg ports_keep - config_get highest_port $cfg highest_port - - - network_get_device ifname "$interface" && { - /usr/sbin/$APP -i "$ifname" \ - ${SYSLOG} \ - ${VERBOSE} \ - ${NODAEMON} \ - ${NOPROMISC} \ - ${NODNS} \ - ${NOMACS} \ - ${NOLASTSEEN} \ - ${httpaddr:+-b "$httpaddr"} \ - ${httpport:+-p "$httpport"} \ - ${network_filter:+-f "$network_filter"} \ - ${network_netmask:+-l "$network_netmask"} \ - ${LOCAL} \ - ${hosts_max:+--hosts-max "$hosts_max"} \ - ${hosts_keep:+--hosts-keep "$hosts_keep"} \ - ${ports_max:+--ports-max "$ports_max"} \ - ${ports_keep:+--ports-keep "$ports_keep"} \ - ${highest_port:+--highest-port "$highest_port"} \ - --chroot $RUN_D \ - --pidfile $PID_F - } + CONFIGSTR="$CONFIGSTR${ports_keep:+--ports-keep "$ports_keep"} " + config_get highest_port $cfg highest_port + CONFIGSTR="$CONFIGSTR${highest_port:+--highest-port "$highest_port"} " + config_get export_file $cfg export_file + CONFIGSTR="$CONFIGSTR${export_file:+--export "$export_file"} " + config_get import_file $cfg import_file + CONFIGSTR="$CONFIGSTR${import_file:+--import "$import_file"} " + config_get daylog_file $cfg daylog_file + CONFIGSTR="$CONFIGSTR${daylog_file:+--daylog "$daylog_file"} " + CONFIGSTR="$CONFIGSTR--chroot $RUN_D --pidfile $PID_F" + # Now that we have the configuration string (CONFIGSTR), let us get the filter (FILTERSTR) + config_get network_filter $cfg network_filter + FILTERSTR="${network_filter:+$network_filter}" } -stop() { - start-stop-daemon -K -n $APP -p $PID_F -s TERM +service_triggers() { + procd_add_reload_trigger $CONFIGNAME +} + +start_service() { + set_config_string + procd_open_instance + procd_set_param command /usr/sbin/$APP + procd_append_param command $CONFIGSTR + # Let us check if we have a filter string and apply it if we do + if [ "$FILTERSTR" != "" ]; then + procd_append_param command "-f" "$FILTERSTR" + fi + procd_close_instance +} + +stop_service() { rm -f $PID_F } + +reload_service() { + stop + start +} diff --git a/net/davfs2/Makefile b/net/davfs2/Makefile index 1b2e0003..32deede9 100644 --- a/net/davfs2/Makefile +++ b/net/davfs2/Makefile @@ -8,14 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=davfs2 -PKG_VERSION:=1.5.4 +PKG_VERSION:=1.5.5 PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/davfs2/ -PKG_HASH:=c9c4e0f0912a782386216b2147eb9c36c47f193b8fcf3d637719e0b9fe7c96e0 +PKG_SOURCE_URL:=@SAVANNAH/davfs2 +PKG_HASH:=587c6a25ad78109995a7ccb8e60aa1c491b149f2c99d47033f3d5e648430ad2f + +PKG_MAINTAINER:=Federico Di Marco +PKG_LICENSE:=GPL-3 +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:davfs2:davfs2 PKG_FIXUP:=gettext-version autoreconf +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -26,8 +32,7 @@ define Package/davfs2 SUBMENU:=Filesystem DEPENDS=+libneon +kmod-fuse +libfuse $(ICONV_DEPENDS) $(INTL_DEPENDS) TITLE:=Mount a WebDAV resource as a regular file system. - URL:=http://savannah.nongnu.org/projects/davfs2/ - MAINTAINER:=Federico Di Marco + URL:=https://savannah.nongnu.org/projects/davfs2/ endef define Package/davfs2/description diff --git a/net/davfs2/patches/010-main_code_fix.patch b/net/davfs2/patches/010-main_code_fix.patch index d91336d2..99b588f8 100644 --- a/net/davfs2/patches/010-main_code_fix.patch +++ b/net/davfs2/patches/010-main_code_fix.patch @@ -1,17 +1,6 @@ ---- a/src/cache.c -+++ b/src/cache.c -@@ -58,7 +58,7 @@ - #ifdef HAVE_SYS_TYPES_H - #include - #endif --#include -+#include - - #include - #include --- a/src/webdav.c +++ b/src/webdav.c -@@ -2033,7 +2033,7 @@ ssl_verify(void *userdata, int failures, +@@ -2037,7 +2037,7 @@ ssl_verify(void *userdata, int failures, const ne_ssl_certificate *cert) len = getline(&s, &n, stdin); if (len < 0) abort(); diff --git a/net/davfs2/patches/020-neon.patch b/net/davfs2/patches/020-neon.patch new file mode 100644 index 00000000..e46be6a9 --- /dev/null +++ b/net/davfs2/patches/020-neon.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -36,7 +36,7 @@ AC_PROG_LN_S + # Checks for libraries. + AM_GNU_GETTEXT_VERSION(0.18.1) + AM_GNU_GETTEXT([external]) +-NE_REQUIRE_VERSIONS([0], [27 28 29 30]) ++NE_REQUIRE_VERSIONS([0], [27 28 29 30 31]) + DAV_CHECK_NEON + + # Checks for header files. diff --git a/net/davfs2/patches/100-musl-compat.patch b/net/davfs2/patches/100-musl-compat.patch index e819cbc8..67a926c2 100644 --- a/net/davfs2/patches/100-musl-compat.patch +++ b/net/davfs2/patches/100-musl-compat.patch @@ -34,6 +34,73 @@ #ifdef HAVE_FCNTL_H #include #endif +--- /dev/null ++++ b/src/compat.h +@@ -0,0 +1,64 @@ ++#ifndef _COMPAT_H ++#define _COMPAT_H ++ ++#ifndef _PATH_MOUNTED ++# define _PATH_MOUNTED "/proc/mounts" ++#endif ++ ++#ifndef _PATH_MNTTAB ++# define _PATH_MNTTAB "/etc/fstab" ++#endif ++ ++#ifdef HAVE_ERROR_H ++# include ++#else ++# include ++# include ++# include ++# include ++static void error_at_line(int status, int errnum, const char *filename, ++ unsigned int linenum, const char *format, ...) ++{ ++ va_list ap; ++ ++ fflush(stdout); ++ ++ if (filename != NULL) ++ fprintf(stderr, "%s:%u: ", filename, linenum); ++ ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ ++ if (errnum != 0) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ ++ fprintf(stderr, "\n"); ++ ++ if (status != 0) ++ exit(status); ++} ++ ++#define error(status, errnum, format...) \ ++ error_at_line(status, errnum, NULL, 0, format) ++ ++#endif /* HAVE_ERROR_H */ ++ ++#ifndef HAVE_CANONICALIZE_FILE_NAME ++#include ++#include ++#include ++static char * canonicalize_file_name(const char *path) ++{ ++ char buf[PATH_MAX] = { }; ++ ++ snprintf(buf, sizeof(buf) - 1, "%s", path); ++ ++ if (!realpath(path, buf)) ++ return NULL; ++ ++ return strdup(buf); ++} ++#endif ++ ++#endif /* _COMPAT_H */ --- a/src/dav_fuse.c +++ b/src/dav_fuse.c @@ -47,6 +47,9 @@ @@ -125,70 +192,3 @@ } session = ne_session_create(args->scheme, args->host, args->port); ---- /dev/null -+++ b/src/compat.h -@@ -0,0 +1,64 @@ -+#ifndef _COMPAT_H -+#define _COMPAT_H -+ -+#ifndef _PATH_MOUNTED -+# define _PATH_MOUNTED "/proc/mounts" -+#endif -+ -+#ifndef _PATH_MNTTAB -+# define _PATH_MNTTAB "/etc/fstab" -+#endif -+ -+#ifdef HAVE_ERROR_H -+# include -+#else -+# include -+# include -+# include -+# include -+static void error_at_line(int status, int errnum, const char *filename, -+ unsigned int linenum, const char *format, ...) -+{ -+ va_list ap; -+ -+ fflush(stdout); -+ -+ if (filename != NULL) -+ fprintf(stderr, "%s:%u: ", filename, linenum); -+ -+ va_start(ap, format); -+ vfprintf(stderr, format, ap); -+ va_end(ap); -+ -+ if (errnum != 0) -+ fprintf(stderr, ": %s", strerror(errnum)); -+ -+ fprintf(stderr, "\n"); -+ -+ if (status != 0) -+ exit(status); -+} -+ -+#define error(status, errnum, format...) \ -+ error_at_line(status, errnum, NULL, 0, format) -+ -+#endif /* HAVE_ERROR_H */ -+ -+#ifndef HAVE_CANONICALIZE_FILE_NAME -+#include -+#include -+#include -+static char * canonicalize_file_name(const char *path) -+{ -+ char buf[PATH_MAX] = { }; -+ -+ snprintf(buf, sizeof(buf) - 1, "%s", path); -+ -+ if (!realpath(path, buf)) -+ return NULL; -+ -+ return strdup(buf); -+} -+#endif -+ -+#endif /* _COMPAT_H */ diff --git a/net/davfs2/patches/200-davfs2-1.5.4-no-forced-stack-protector.patch b/net/davfs2/patches/200-davfs2-1.5.4-no-forced-stack-protector.patch index f581e053..86f17753 100644 --- a/net/davfs2/patches/200-davfs2-1.5.4-no-forced-stack-protector.patch +++ b/net/davfs2/patches/200-davfs2-1.5.4-no-forced-stack-protector.patch @@ -1,6 +1,6 @@ --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -32,8 +32,7 @@ mount_davfs_SOURCES = cache.c dav_coda.c +@@ -32,8 +32,7 @@ mount_davfs_SOURCES = cache.c dav_coda.c \ kernel_interface.h mount_davfs.h webdav.h umount_davfs_SOURCES = umount_davfs.c defaults.h diff --git a/net/davfs2/patches/300-have_iconv_h.patch b/net/davfs2/patches/300-have_iconv_h.patch index c126b5aa..6bf95a24 100644 --- a/net/davfs2/patches/300-have_iconv_h.patch +++ b/net/davfs2/patches/300-have_iconv_h.patch @@ -1,5 +1,3 @@ -diff --git a/src/webdav.c b/src/webdav.c -index 1ff7c7f..74cd957 100644 --- a/src/webdav.c +++ b/src/webdav.c @@ -25,7 +25,7 @@ diff --git a/net/davfs2/patches/400-gcc10.patch b/net/davfs2/patches/400-gcc10.patch new file mode 100644 index 00000000..046c67e5 --- /dev/null +++ b/net/davfs2/patches/400-gcc10.patch @@ -0,0 +1,11 @@ +--- a/src/dav_coda.c ++++ b/src/dav_coda.c +@@ -97,7 +97,7 @@ static unsigned int blocksize; + static size_t alignment; + + /* Send debug messages to syslog if != 0. */ +-int debug; ++extern int debug; + + + /* Private function prototypes */ diff --git a/net/dawn/Makefile b/net/dawn/Makefile new file mode 100644 index 00000000..f5149d27 --- /dev/null +++ b/net/dawn/Makefile @@ -0,0 +1,50 @@ +# +# This software is licensed under the Public Domain. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dawn +PKG_SOURCE_DATE:=2020-06-12 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/berlin-open-wireless-lab/DAWN.git +PKG_SOURCE_VERSION:=ada3bf3ff2b1faa24bcbc3754f8f52b9e66b02cd +PKG_MIRROR_HASH:=7139fc3ff71ab05a0d651e6a05cfcaa07d1084f47e4cf76d894217487eeb7ce3 + +PKG_MAINTAINER:=Nick Hainke +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/dawn + SECTION:=net + CATEGORY:=Network + TITLE:=Decentralized wifi controller + URL:=https://github.com/berlin-open-wireless-lab/DAWN.git + DEPENDS:=$(DRV_DEPENDS) +libubus +libubox +libblobmsg-json +libuci +libgcrypt +libiwinfo +umdns +endef + +define Package/dawn/description + This package implements a decentralized wireless daemon. +endef + +define Package/dawn/conffiles +/etc/config/dawn +endef + +define Package/dawn/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dawn $(1)/usr/sbin/dawn + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/dawn.init $(1)/etc/init.d/dawn + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/dawn.config $(1)/etc/config/dawn +endef + +$(eval $(call BuildPackage,dawn)) diff --git a/net/dawn/files/dawn.config b/net/dawn/files/dawn.config new file mode 100644 index 00000000..ee927434 --- /dev/null +++ b/net/dawn/files/dawn.config @@ -0,0 +1,61 @@ +config network + option broadcast_ip '10.0.0.255' + option broadcast_port '1025' + option tcp_port '1026' + option network_option '2' # 0 udp broadcast, 1 multicast, 2 tcp + option shared_key 'Niiiiiiiiiiiiiik' + option iv 'Niiiiiiiiiiiiiik' + option use_symm_enc '1' + option collision_domain '-1' # enter here aps which are in the same collision domain + option bandwidth '-1' # enter network bandwidth + +config ordering + option sort_order 'cbfs' + +config hostapd + option hostapd_dir '/var/run/hostapd' + +config times + option update_client '10' + option denied_req_threshold '30' + option remove_client '15' + option remove_probe '30' + option remove_ap '460' + option update_hostapd '10' + option update_tcp_con '10' + option update_chan_util '5' + option update_beacon_reports '20' + +config metric + option ap_weight '0' + option ht_support '0' + option vht_support '0' + option no_ht_support '0' + option no_vht_support '0' + option rssi '10' + option low_rssi '-500' + option freq '100' # some kind of band-steering + option chan_util '0' + option max_chan_util '-500' + option rssi_val '-60' + option low_rssi_val '-80' + option chan_util_val '140' + option max_chan_util_val '170' + option min_probe_count '0' + option bandwidth_threshold '6' + option use_station_count '1' + option max_station_diff '1' + option eval_probe_req '0' + option eval_auth_req '0' # no real reasoncode... + option eval_assoc_req '0' # just deny assocs... + option kicking '0' + option deny_auth_reason '1' # unspecified + option deny_assoc_reason '17' # assoc rejected can't handle new station + option use_driver_recog '1' + option min_number_to_kick '3' + option chan_util_avg_period '3' + option set_hostapd_nr '1' + option op_class '0' #802.11k stuff... + option duration '0' + option mode '0' + option scan_channel '0' diff --git a/net/dawn/files/dawn.init b/net/dawn/files/dawn.init new file mode 100755 index 00000000..626b12fe --- /dev/null +++ b/net/dawn/files/dawn.init @@ -0,0 +1,59 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 + +START=81 +STOP=81 + +PROG=/usr/sbin/dawn +NAME=dawn + +wait_for_network() +{ + ubus -t 15 wait_for network.interface.$1 2>/dev/null +} + +boot() +{ + ubus -t 5 wait_for umdns 2>/dev/null + config_load network + config_foreach wait_for_network interface + rc_procd start_service +} + +reload_service() +{ + if service_running; then + ubus call dawn reload_config + else + start + fi +} + +service_triggers() +{ + procd_add_reload_trigger "dawn" +} + +start_service() +{ + local _tcp_buffer + config_load dawn + load_tcp_port() { + config_get _tcp_buffer "$1" tcp_port + } + config_foreach load_tcp_port network + + touch /tmp/dawn_mac_list + + echo "Starting Service..." + procd_open_instance + procd_set_param command $PROG + procd_set_param stdout 0 # here it is possible to remove the debug output... + procd_set_param stderr 1 + procd_add_mdns "dawn" "tcp" "${_tcp_buffer}" + procd_close_instance + echo "Dawn instance started!" + echo "UMDNS with port ${_tcp_buffer}" +} + diff --git a/net/dcstad/Makefile b/net/dcstad/Makefile new file mode 100644 index 00000000..3112b0c1 --- /dev/null +++ b/net/dcstad/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2019 EWSI +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dcstad +PKG_VERSION:=1.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=3bed8a5051c92cd41ba3477d2db211df8f10fd6e49946f0b74cf643464c1c201 + +PKG_MAINTAINER:=Carey Sonsino +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/dcstad + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=Dual-Channel WiFi client daemon + URL:=https://www.edgewaterwireless.com + DEPENDS:=+libdcwsocket +libdcwproto +endef + +define Package/dcstad/description +Implementation of the Dual-Channel WiFi client daemon +endef + +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections + +define Package/dcstad/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dcstad $(1)/bin/ +endef + +$(eval $(call BuildPackage,dcstad)) diff --git a/net/dcwapd/Makefile b/net/dcwapd/Makefile index 3566f50f..6608af6c 100644 --- a/net/dcwapd/Makefile +++ b/net/dcwapd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dcwapd PKG_VERSION:=1.1.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)? @@ -51,6 +51,10 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ endef +define Package/dcwapd/conffiles +/etc/config/dcwapd +endef + define Package/dcwapd/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/bin/ diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 2cd899e9..5e288b47 100755 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts PKG_VERSION:=2.7.8 # Release == build # increase on changes of services files or tld_names.dat -PKG_RELEASE:=3 +PKG_RELEASE:=21 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:= @@ -36,7 +36,7 @@ define Package/ddns-scripts endef # shown in LuCI package description define Package/ddns-scripts/description - Dynamic DNS Client scripts (with IPv6 support) - Info: http://wiki.openwrt.org/doc/howto/ddns.client + Dynamic DNS Client scripts (with IPv6 support) - Info: https://openwrt.org/docs/guide-user/services/ddns/client endef # shown in menuconfig define Package/ddns-scripts/config @@ -50,7 +50,7 @@ define Package/ddns-scripts/config - log file support - support to run once Version: $(PKG_VERSION)-$(PKG_RELEASE) - Info : http://wiki.openwrt.org/doc/howto/ddns.client + Info : https://openwrt.org/docs/guide-user/services/ddns/client endef ###### ************************************************************************* @@ -83,6 +83,26 @@ define Package/ddns-scripts_godaddy.com-v1/description Dynamic DNS Client scripts extension for GoDaddy.com (require/install cURL) endef +###### ************************************************************************* +define Package/ddns-scripts_digitalocean.com-v2 + $(call Package/ddns-scripts/Default) + TITLE:=digitalocean.com (require cURL) + DEPENDS:=ddns-scripts +curl +endef +define Package/ddns-scripts_digitalocean.com-v2/description + Dynamic DNS Client scripts extension for digitalocean.com (require/install cURL) +endef +define Package/ddns-scripts_digitalocean.com-v2/config + help + The script directly updates a DNS record using the DO API. It requires + "option dns_server" to be set to the server to be used by nsupdate. + "option domain" the dns domain to update the record for (eg. A-record: home.) + "option username" the dns record name to update (eg. A-record: .example.com) + "option param_opt" the id of the dns record to update (check using chrome inspector in the DO dns tab) + "option password" the api token generated in the DO panel + +endef + ###### ************************************************************************* define Package/ddns-scripts_no-ip_com $(call Package/ddns-scripts/Default) @@ -127,6 +147,21 @@ define Package/ddns-scripts_route53-v1/description "option domain" to contain the hosted zone ID endef +###### ************************************************************************* +define Package/ddns-scripts_cnkuai_cn + $(call Package/ddns-scripts/Default) + TITLE:=CnKuai API + DEPENDS:=ddns-scripts +curl +giflib-utils +endef +define Package/ddns-scripts_cnkuai_cn/description + Dynamic DNS Client scripts extension for CnKuai.Note: You + must also install giflib-utils. + It requires: + "option username" to be a valid CnKuai control panel id + "option password" to be the matching CnKuai control panel password + "option domain" to contain the domain +endef + ###### ************************************************************************* define Build/Configure endef @@ -208,6 +243,7 @@ define Package/ddns-scripts_cloudflare.com-v4/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare.com-v4 $(INSTALL_DIR) $(1)/usr/lib/ddns $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v4.sh $(1)/usr/lib/ddns + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v4_token.sh $(1)/usr/lib/ddns endef define Package/ddns-scripts_cloudflare.com-v4/postinst #!/bin/sh @@ -217,6 +253,8 @@ define Package/ddns-scripts_cloudflare.com-v4/postinst # and create new printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 + printf "%s\\t%s\\n" '"cloudflare.com-v4-token"' '"update_cloudflare_com_v4_token.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"cloudflare.com-v4-token"' '"update_cloudflare_com_v4_token.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 # on real system restart service if enabled [ -z "$${IPKG_INSTROOT}" ] && { [ -x /etc/uci-defaults/ddns_cloudflare.com-v4 ] && \ @@ -316,6 +354,47 @@ define Package/ddns-scripts_godaddy.com-v1/prerm exit 0 # suppress errors endef +###### ************************************************************************* +define Package/ddns-scripts_digitalocean.com-v2/preinst + #!/bin/sh + # if NOT run buildroot then stop service + [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + exit 0 # suppress errors +endef +define Package/ddns-scripts_digitalocean.com-v2/install + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_digtalocean.com-v2 + $(INSTALL_DIR) $(1)/usr/lib/ddns + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_digitalocean_com_v2.sh $(1)/usr/lib/ddns +endef +define Package/ddns-scripts_digitalocean.com-v2/postinst + #!/bin/sh + # remove old services file entries + /bin/sed -i '/digitalocean\.com-v2/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/digitalocean\.com-v2/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"digitalocean.com-v2"' '"update_digitalocean_com_v2.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"digitalocean.com-v2"' '"update_digitalocean_com_v2.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 + # on real system restart service if enabled + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_digitalocean.com-v2 ] && \ + /etc/uci-defaults/ddns_digitalocean.com-v2 && \ + rm -f /etc/uci-defaults/ddns_digitalocean.com-v2 >/dev/null 2>&1 + /etc/init.d/ddns enabled \ + && /etc/init.d/ddns start >/dev/null 2>&1 + } + exit 0 # suppress errors +endef +define Package/ddns-scripts_digitalocean.com-v2/prerm + #!/bin/sh + # if NOT run buildroot then stop service + [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # remove services file entries + /bin/sed -i '/digitalocean\.com-v2/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/digitalocean\.com-v2/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + exit 0 # suppress errors +endef + ###### ************************************************************************* define Package/ddns-scripts_no-ip_com/preinst #!/bin/sh @@ -436,11 +515,54 @@ define Package/ddns-scripts_route53-v1/prerm exit 0 # suppress errors endef +###### ************************************************************************* +define Package/ddns-scripts_cnkuai_cn/preinst + #!/bin/sh + # if NOT run buildroot then stop service + [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + exit 0 # suppress errors +endef +define Package/ddns-scripts_cnkuai_cn/install + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cnkuai_cn + $(INSTALL_DIR) $(1)/usr/lib/ddns + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cnkuai_cn.sh $(1)/usr/lib/ddns +endef +define Package/ddns-scripts_cnkuai_cn/postinst + #!/bin/sh + # remove old services file entries + /bin/sed -i '/cnkuai.cn/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/cnkuai.cn/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"cnkuai.cn"' '"update_cnkuai_cn.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"cnkuai.cn"' '"update_cnkuai_cn.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 + # on real system restart service if enabled + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_cnkuai_cn ] && \ + /etc/uci-defaults/ddns_cnkuai_cn && \ + rm -f /etc/uci-defaults/cnkuai.cn >/dev/null 2>&1 + /etc/init.d/ddns enabled \ + && /etc/init.d/ddns start >/dev/null 2>&1 + } + exit 0 # suppress errors +endef +define Package/ddns-scripts_cnkuai_cn/prerm + #!/bin/sh + # if NOT run buildroot then stop service + [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # remove services file entries + /bin/sed -i 'cnkuai.cn/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i 'cnkuai.cn/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + exit 0 # suppress errors +endef + ###### ************************************************************************* $(eval $(call BuildPackage,ddns-scripts)) $(eval $(call BuildPackage,ddns-scripts_cloudflare.com-v4)) $(eval $(call BuildPackage,ddns-scripts_freedns_42_pl)) $(eval $(call BuildPackage,ddns-scripts_godaddy.com-v1)) +$(eval $(call BuildPackage,ddns-scripts_digitalocean.com-v2)) $(eval $(call BuildPackage,ddns-scripts_no-ip_com)) $(eval $(call BuildPackage,ddns-scripts_nsupdate)) $(eval $(call BuildPackage,ddns-scripts_route53-v1)) +$(eval $(call BuildPackage,ddns-scripts_cnkuai_cn)) diff --git a/net/ddns-scripts/files/ddns.config b/net/ddns-scripts/files/ddns.config index 6d6b8109..b45855f0 100644 --- a/net/ddns-scripts/files/ddns.config +++ b/net/ddns-scripts/files/ddns.config @@ -1,5 +1,5 @@ # -# Please read http://wiki.openwrt.org/doc/uci/ddns +# Please read https://openwrt.org/docs/guide-user/base-system/ddns # config ddns "global" option ddns_dateformat "%F %R" diff --git a/net/ddns-scripts/files/dynamic_dns_functions.sh b/net/ddns-scripts/files/dynamic_dns_functions.sh index 5a76166e..cbeb09bc 100755 --- a/net/ddns-scripts/files/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/dynamic_dns_functions.sh @@ -21,7 +21,7 @@ . /lib/functions/network.sh # GLOBAL VARIABLES # -VERSION="2.7.8-1" +VERSION="2.7.8-14" SECTION_ID="" # hold config's section name VERBOSE=0 # default mode is log to console, but easily changed with parameter MYPROG=$(basename $0) # my program call name @@ -63,6 +63,12 @@ IPV4_REGEX="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" # IPv6 ( ( 0-9a-f 1-4char ":") min 1x) ( ( 0-9a-f 1-4char )optional) ( (":" 0-9a-f 1-4char ) min 1x) IPV6_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)" +# characters that are dangerous to pass to a shell command line +SHELL_ESCAPE="[\"\'\`\$\!();><{}?|\[\]\*\\\\]" + +# dns character set +DNS_CHARSET="[@a-zA-Z0-9._-]" + # detect if called by ddns-lucihelper.sh script, disable retrys (empty variable == false) LUCI_HELPER=$(printf %s "$MYPROG" | grep -i "luci") @@ -78,14 +84,10 @@ WGET=$(which wget) WGET_SSL=$(which wget-ssl) CURL=$(which curl) - +# CURL_SSL not empty then SSL support available +CURL_SSL=$($CURL -V 2>/dev/null | grep -F "https") # CURL_PROXY not empty then Proxy support available -if [ -f /tmp/vCURL_PROXY ]; then - CURL_PROXY=$(cat /tmp/vCURL_PROXY); -else - CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy") - echo -n $CURL_PROXY >/tmp/vCURL_PROXY -fi +CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy") UCLIENT_FETCH=$(which uclient-fetch) @@ -280,11 +282,11 @@ write_log() { [ $__LEVEL -eq 7 ] && return # no syslog for debug messages __CMD=$(echo -e "$__CMD" | tr -d '\n' | tr '\t' ' ') # remove \n \t chars [ $__EXIT -eq 1 ] && { - $__CMD # force syslog before exit + eval '$__CMD' # force syslog before exit exit 1 } [ $use_syslog -eq 0 ] && return - [ $((use_syslog + __LEVEL)) -le 7 ] && $__CMD + [ $((use_syslog + __LEVEL)) -le 7 ] && eval '$__CMD' return } @@ -299,32 +301,12 @@ write_log() { urlencode() { # $1 Name of Variable to store encoded string to # $2 string to encode - local __STR __LEN __CHAR __OUT - local __ENC="" - local __POS=1 + local __ENC [ $# -ne 2 ] && write_log 12 "Error calling 'urlencode()' - wrong number of parameters" - __STR="$2" # read string to encode - __LEN=${#__STR} # get string length - - while [ $__POS -le $__LEN ]; do - # read one chat of the string - __CHAR=$(expr substr "$__STR" $__POS 1) - - case "$__CHAR" in - [-_.~a-zA-Z0-9] ) - # standard char - __OUT="${__CHAR}" - ;; - * ) - # special char get %hex code - __OUT=$(printf '%%%02x' "'$__CHAR" ) - ;; - esac - __ENC="${__ENC}${__OUT}" # append to encoded string - __POS=$(( $__POS + 1 )) # increment position - done + __ENC="$(awk -v str="$2" 'BEGIN{ORS="";for(i=32;i<=127;i++)lookup[sprintf("%c",i)]=i + for(k=1;k<=length(str);++k){enc=substr(str,k,1);if(enc!~"[-_.~a-zA-Z0-9]")enc=sprintf("%%%02x", lookup[enc]);print enc}}')" eval "$1=\"$__ENC\"" # transfer back to variable return 0 @@ -337,16 +319,19 @@ urlencode() { # $2 Name of Variable to store script to # $3 Name of Variable to store service answer to get_service_data() { + local __FILE __SERVICE __DATA __ANSWER __URL __SCRIPT __PIPE + [ $# -ne 3 ] && write_log 12 "Error calling 'get_service_data()' - wrong number of parameters" __FILE="/etc/ddns/services" # IPv4 [ $use_ipv6 -ne 0 ] && __FILE="/etc/ddns/services_ipv6" # IPv6 # workaround with variables; pipe create subshell with no give back of variable content - mkfifo pipe_$$ + __PIPE="$ddns_rundir/pipe_$$" + mkfifo "$__PIPE" + # only grep without # or whitespace at linestart | remove " -# grep -v -E "(^#|^[[:space:]]*$)" $__FILE | sed -e s/\"//g > pipe_$$ & - sed '/^#/d; /^[ \t]*$/d; s/\"//g' $__FILE > pipe_$$ & + sed '/^#/d; /^[ \t]*$/d; s/\"//g' "$__FILE" > "$__PIPE" & while read __SERVICE __DATA __ANSWER; do if [ "$__SERVICE" = "$service_name" ]; then @@ -357,11 +342,11 @@ get_service_data() { eval "$1=\"$__URL\"" eval "$2=\"$__SCRIPT\"" eval "$3=\"$__ANSWER\"" - rm pipe_$$ + rm "$__PIPE" return 0 fi - done < pipe_$$ - rm pipe_$$ + done < "$__PIPE" + rm "$__PIPE" eval "$1=\"\"" # no service match clear variables eval "$2=\"\"" @@ -479,6 +464,27 @@ timeout() { return $status } +# sanitize a variable +# $1 variable name +# $2 allowed shell pattern +# $3 disallowed shell pattern +sanitize_variable() { + local __VAR=$1 + eval __VALUE=\$$__VAR + local __ALLOWED=$2 + local __REJECT=$3 + + # removing all allowed should give empty string + if [ -n "$__ALLOWED" ]; then + [ -z "${__VALUE//$__ALLOWED}" ] || write_log 12 "sanitize on $__VAR found characters outside allowed subset" + fi + + # removing rejected pattern should give the same string as the input + if [ -n "$__REJECT" ]; then + [ "$__VALUE" = "${__VALUE//$__REJECT}" ] || write_log 12 "sanitize on $__VAR found rejected characters" + fi +} + # verify given host and port is connectable # $1 Host/IP to verify # $2 Port to verify @@ -530,17 +536,17 @@ verify_host_port() { } # extract IP address if [ -n "$BIND_HOST" -o -n "$KNOT_HOST" ]; then # use BIND host or Knot host if installed - __IPV4=$(cat $DATFILE | awk -F "address " '/has address/ {print $2; exit}' ) - __IPV6=$(cat $DATFILE | awk -F "address " '/has IPv6/ {print $2; exit}' ) + __IPV4="$(awk -F "address " '/has address/ {print $2; exit}' "$DATFILE")" + __IPV6="$(awk -F "address " '/has IPv6/ {print $2; exit}' "$DATFILE")" elif [ -n "$DRILL" ]; then # use drill if installed - __IPV4=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5}' | grep -m 1 -o "$IPV4_REGEX") - __IPV6=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5}' | grep -m 1 -o "$IPV6_REGEX") + __IPV4="$(awk '/^'"$__HOST"'/ {print $5}' "$DATFILE" | grep -m 1 -o "$IPV4_REGEX")" + __IPV6="$(awk '/^'"$__HOST"'/ {print $5}' "$DATFILE" | grep -m 1 -o "$IPV6_REGEX")" elif [ -n "$HOSTIP" ]; then # use hostip if installed - __IPV4=$(cat $DATFILE | grep -m 1 -o "$IPV4_REGEX") - __IPV6=$(cat $DATFILE | grep -m 1 -o "$IPV6_REGEX") + __IPV4="$(grep -m 1 -o "$IPV4_REGEX" "$DATFILE")" + __IPV6="$(grep -m 1 -o "$IPV6_REGEX" "$DATFILE")" else # use BusyBox nslookup - __IPV4=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV4_REGEX\).*$/\\1/p }") - __IPV6=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV6_REGEX\).*$/\\1/p }") + __IPV4="$(sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV4_REGEX\).*$/\\1/p }" "$DATFILE")" + __IPV6="$(sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV6_REGEX\).*$/\\1/p }" "$DATFILE")" fi } @@ -695,7 +701,7 @@ do_transfer() { # lets prefer GNU Wget because it does all for us - IPv4/IPv6/HTTPS/PROXY/force IP version if [ -n "$WGET_SSL" -a $USE_CURL -eq 0 ]; then # except global option use_curl is set to "1" - __PROG="$WGET_SSL -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile + __PROG="$WGET_SSL --hsts-file=/tmp/.wget-hsts -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile # force network/ip to use for communication if [ -n "$bind_network" ]; then local __BINDIP @@ -731,8 +737,6 @@ do_transfer() { # 2nd choice is cURL IPv4/IPv6/HTTPS # libcurl might be compiled without Proxy or HTTPS Support elif [ -n "$CURL" ]; then - # CURL_SSL not empty then SSL support available - CURL_SSL=$($(which curl) -V 2>/dev/null | grep "Protocols:" | grep -F "https") __PROG="$CURL -RsS -o $DATFILE --stderr $ERRFILE" # check HTTPS support [ -z "$CURL_SSL" -a $use_https -eq 1 ] && \ @@ -776,13 +780,7 @@ do_transfer() { # uclient-fetch possibly with ssl support if /lib/libustream-ssl.so installed elif [ -n "$UCLIENT_FETCH" ]; then # UCLIENT_FETCH_SSL not empty then SSL support available - if [ -f /tmp/vUCLIENT_FETCH_SSL ]; then - UCLIENT_FETCH_SSL=$(cat /tmp/vCURL_PROXY); - else - UCLIENT_FETCH_SSL=$(find /lib /usr/lib -name libustream-ssl.so* 2>/dev/null) - echo -n $UCLIENT_FETCH_SSL >/tmp/vUCLIENT_FETCH_SSL - fi - + UCLIENT_FETCH_SSL=$(find /lib /usr/lib -name libustream-ssl.so* 2>/dev/null) __PROG="$UCLIENT_FETCH -q -O $DATFILE" # force network/ip not supported [ -n "$__BINDIP" ] && \ @@ -913,7 +911,7 @@ get_local_ip () { write_log 7 "Detect local IP on '$ip_source'" while : ; do - if [ -n "$ip_network" ]; then + if [ -n "$ip_network" -a "$ip_source" = "network" ]; then # set correct program network_flush_cache # force re-read data from ubus [ $use_ipv6 -eq 0 ] && __RUNPROG="network_get_ipaddr" \ @@ -921,7 +919,7 @@ get_local_ip () { eval "$__RUNPROG __DATA $ip_network" || \ write_log 13 "Can not detect local IP using $__RUNPROG '$ip_network' - Error: '$?'" [ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on network '$ip_network'" - elif [ -n "$ip_interface" ]; then + elif [ -n "$ip_interface" -a "$ip_source" = "interface" ]; then local __DATA4=""; local __DATA6="" if [ -n "$(which ip)" ]; then # ip program installed write_log 7 "#> ip -o addr show dev $ip_interface scope global >$DATFILE 2>$ERRFILE" @@ -1000,7 +998,7 @@ get_local_ip () { fi [ $use_ipv6 -eq 0 ] && __DATA="$__DATA4" || __DATA="$__DATA6" [ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on interface '$ip_interface'" - elif [ -n "$ip_script" ]; then + elif [ -n "$ip_script" -a "$ip_source" = "script" ]; then write_log 7 "#> $ip_script >$DATFILE 2>$ERRFILE" eval $ip_script >$DATFILE 2>$ERRFILE __ERR=$? @@ -1011,7 +1009,7 @@ get_local_ip () { write_log 3 "$ip_script Error: '$__ERR'" write_log 7 "$(cat $ERRFILE)" # report error fi - elif [ -n "$ip_url" ]; then + elif [ -n "$ip_url" -a "$ip_source" = "web" ]; then do_transfer "$ip_url" # use correct regular expression [ $use_ipv6 -eq 0 ] \ diff --git a/net/ddns-scripts/files/dynamic_dns_updater.sh b/net/ddns-scripts/files/dynamic_dns_updater.sh index b84e8292..2076c0d9 100755 --- a/net/ddns-scripts/files/dynamic_dns_updater.sh +++ b/net/ddns-scripts/files/dynamic_dns_updater.sh @@ -247,6 +247,15 @@ esac # without lookup host and possibly other required options we can do nothing for you [ -z "$lookup_host" ] && write_log 14 "Service section not configured correctly! Missing 'lookup_host'" +# verify validity of variables +[ -n "$lookup_host" ] && sanitize_variable lookup_host "$DNS_CHARSET" "" +[ -n "$dns_server" ] && sanitize_variable dns_server "$DNS_CHARSET" "" +[ -n "$domain" ] && sanitize_variable domain "$DNS_CHARSET" "" + +# Filter shell escape characters, if these are required in the URL, they +# can still be passed url encoded +[ -n "$param_opt" ] && sanitize_variable param_opt "" "$SHELL_ESCAPE" + [ -n "$update_url" ] && { # only check if update_url is given, update_scripts have to check themselves [ -z "$domain" ] && $(echo "$update_url" | grep "\[DOMAIN\]" >/dev/null 2>&1) && \ diff --git a/net/ddns-scripts/files/services b/net/ddns-scripts/files/services index 472bb7c2..8f2610c3 100644 --- a/net/ddns-scripts/files/services +++ b/net/ddns-scripts/files/services @@ -43,10 +43,10 @@ "able.or.kr" "http://able.or.kr/ddns/src/update.php?hostname=[DOMAIN]&myip=[IP]&ddnsuser=[USERNAME]&pwd=[PASSWORD]" -"afraid.org-basicauth" "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]" -"afraid.org-keyauth" "http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]" -"afraid.org-v2-basic" "http://[USERNAME]:[PASSWORD]@sync.afraid.org/u/?h=[DOMAIN]&ip=[IP]" -"afraid.org-v2-token" "http://sync.afraid.org/u/[PASSWORD]/?address=[IP]" +"afraid.org-basicauth" "https://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]" +"afraid.org-keyauth" "https://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]" +"afraid.org-v2-basic" "https://[USERNAME]:[PASSWORD]@sync.afraid.org/u/?h=[DOMAIN]&ip=[IP]" +"afraid.org-v2-token" "https://sync.afraid.org/u/[PASSWORD]/?address=[IP]" "all-inkl.com" "http://[USERNAME]:[PASSWORD]@dyndns.kasserver.com/?myip=[IP]" @@ -57,11 +57,11 @@ "ddns.com.br" "http://[DOMAIN]:[PASSWORD]@members.ddns.com.br/nic/update?hostname=[DOMAIN]&myip=[IP]" # "ddnss.de" "http://[USERNAME]:[PASSWORD]@ip4.ddnss.de/upd.php?host=[DOMAIN]&ip=[IP]" "good|nochg" -"ddnss.de" "http://ip4.ddnss.de/upd.php?user=[USERNAME]&pwd=[PASSWORD]&host=[DOMAIN]&ip=[IP]" "good|nochg" +"ddnss.de" "http://ip4.ddnss.de/upd.php?user=[USERNAME]&pwd=[PASSWORD]&host=[DOMAIN]&ip=[IP]" "Updated|No change" "ddo.jp" "http://free.ddo.jp/dnsupdate.php?dn=[DOMAIN]&pw=[PASSWORD]&ip=[IP]" -"desec.io" "http://update.dedyn.io/?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv4=[IP]" "good|nochg" +"desec.io" "http://update.dedyn.io/update?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv4=[IP]" "good|nochg" "dhis.org" "http://[USERNAME]:[PASSWORD]@is.dhis.org/" @@ -95,8 +95,8 @@ "dyndns.it" "http://[USERNAME]:[PASSWORD]@update.dyndns.it/nic/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]" "good|nochg" -"dyn.com" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" -"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"dyn.com" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/v3/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/v3/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" "dyndnss.net" "http://www.dyndnss.net/?user=[USERNAME]&pass=[PASSWORD]&domain=[DOMAIN]&updater=other" @@ -114,10 +114,12 @@ "goip.de" "http://www.goip.de/setip?username=[USERNAME]&password=[PASSWORD]&subdomain=[DOMAIN]&ip=[IP]" -"google.com" "http://[USERNAME]:[PASSWORD]@domains.google.com/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"google.com" "https://[USERNAME]:[PASSWORD]@domains.google.com/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" "he.net" "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"inwx.de" "http://[USERNAME]:[PASSWORD]@dyndns.inwx.com/nic/update?myip=[IP]" "good|nochg" + "joker.com" "http://svc.joker.com/nic/update?username=[USERNAME]&password=[PASSWORD]&myip=[IP]&hostname=[DOMAIN]" "good|nochg" "loopia.se" "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]" "good|nochg" diff --git a/net/ddns-scripts/files/services_ipv6 b/net/ddns-scripts/files/services_ipv6 index 8a2028ba..6a23aa90 100644 --- a/net/ddns-scripts/files/services_ipv6 +++ b/net/ddns-scripts/files/services_ipv6 @@ -38,10 +38,10 @@ #.no-ip.com / noip.com !!! Please install additional package "ddns-scripts_no-ip_com" #.route53-v1 !!! Please install additional package "ddns-scripts_route53-v1" -"afraid.org-basicauth" "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]" -"afraid.org-keyauth" "http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]" -"afraid.org-v2-basic" "http://[USERNAME]:[PASSWORD]@v6.sync.afraid.org/u/?h=[DOMAIN]&ip=[IP]" -"afraid.org-v2-token" "http://v6.sync.afraid.org/u/[PASSWORD]/?address=[IP]" +"afraid.org-basicauth" "https://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]" +"afraid.org-keyauth" "https://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]" +"afraid.org-v2-basic" "https://[USERNAME]:[PASSWORD]@v6.sync.afraid.org/u/?h=[DOMAIN]&ip=[IP]" +"afraid.org-v2-token" "https://v6.sync.afraid.org/u/[PASSWORD]/?address=[IP]" "all-inkl.com" "http://[USERNAME]:[PASSWORD]@dyndns.kasserver.com/?myip=[IP]" @@ -50,7 +50,7 @@ # "ddnss.de" "http://[USERNAME]:[PASSWORD]@ip6.ddnss.de/upd.php?host=[DOMAIN]&ip6=[IP]" "good|nochg" "ddnss.de" "http://ip6.ddnss.de/upd.php?user=[USERNAME]&pwd=[PASSWORD]&host=[DOMAIN]&ip6=[IP]" "good|nochg" -"desec.io" "http://update.dedyn.io/?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv6=[IP]" "good|nochg" +"desec.io" "http://update.dedyn.io/update?username=[USERNAME]&password=[PASSWORD]&hostname=[DOMAIN]&myipv6=[IP]" "good|nochg" "dhis.org" "http://[USERNAME]:[PASSWORD]@is.dhis.org/" @@ -62,8 +62,8 @@ "duiadns.net" "http://ip.duiadns.net/dynamic.duia?host=[DOMAIN]&password=[PASSWORD]&ip6=[IP]" -"dyn.com" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" -"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"dyn.com" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/v3/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/v3/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" "dynu.com" "http://api.dynu.com/nic/update?hostname=[DOMAIN]&myipv6=[IP]&username=[USERNAME]&password=[PASSWORD]" @@ -75,6 +75,8 @@ "he.net" "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"inwx.de" "http://[USERNAME]:[PASSWORD]@dyndns.inwx.com/nic/update?myipv6=[IP]" "good|nochg" + "loopia.se" "http://[USERNAME]:[PASSWORD]@dns.loopia.se/XDynDNSServer/XDynDNS.php?system=custom&hostname=[DOMAIN]&myip=[IP]" "good|nochg" "mydns.jp" "http://www.mydns.jp/directip.html?MID=[USERNAME]&PWD=[PASSWORD]&IPV6ADDR=[IP]" diff --git a/net/ddns-scripts/files/update_cloudflare_com_v4.sh b/net/ddns-scripts/files/update_cloudflare_com_v4.sh index baab937e..7394187f 100755 --- a/net/ddns-scripts/files/update_cloudflare_com_v4.sh +++ b/net/ddns-scripts/files/update_cloudflare_com_v4.sh @@ -190,3 +190,4 @@ __RUNPROG="$__PRGBASE --request PUT --data @$DATFILE '$__URLBASE/zones/$__ZONEID cloudflare_transfer || return 1 return 0 + diff --git a/net/ddns-scripts/files/update_cloudflare_com_v4_token.sh b/net/ddns-scripts/files/update_cloudflare_com_v4_token.sh new file mode 100644 index 00000000..f9074008 --- /dev/null +++ b/net/ddns-scripts/files/update_cloudflare_com_v4_token.sh @@ -0,0 +1,194 @@ +#!/bin/sh +# +#.Distributed under the terms of the GNU General Public License (GPL) version 2.0 +# +# script for sending updates to cloudflare.com +#.based on Ben Kulbertis cloudflare-update-record.sh found at http://gist.github.com/benkulbertis +#.and on George Johnson's cf-ddns.sh found at https://github.com/gstuartj/cf-ddns.sh +#.2016-2018 Christian Schoenebeck + +# CloudFlare API documentation at https://api.cloudflare.com/ +# +# This script is parsed by dynamic_dns_functions.sh inside send_update() function +# +# using following options from /etc/config/ddns +# option username - your cloudflare e-mail +# option password - cloudflare api token, you can get it from cloudflare.com/my-account/ +# option domain - "hostname@yourdomain.TLD" # syntax changed to remove split_FQDN() function and tld_names.dat.gz +# +# The proxy status would not be changed by this script. Please change it in Cloudflare dashboard manually. +# +# variable __IP already defined with the ip-address to use for update +# + +# check parameters +[ -z "$CURL" ] && [ -z "$CURL_SSL" ] && write_log 14 "Cloudflare communication require cURL with SSL support. Please install" +#[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'" +[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'" +[ $use_https -eq 0 ] && use_https=1 # force HTTPS + +# used variables +local __HOST __DOMAIN __TYPE __URLBASE __PRGBASE __RUNPROG __DATA __IPV6 __ZONEID __RECID __PROXIED +local __URLBASE="https://api.cloudflare.com/client/v4" +local __TTL=120 + +# split __HOST __DOMAIN from $domain +# given data: +# @example.com for "domain record" +# host.sub@example.com for a "host record" +__HOST=$(printf %s "$domain" | cut -d@ -f1) +__DOMAIN=$(printf %s "$domain" | cut -d@ -f2) + +# Cloudflare v4 needs: +# __DOMAIN = the base domain i.e. example.com +# __HOST = the FQDN of record to modify +# i.e. example.com for the "domain record" or host.sub.example.com for "host record" + +# handling domain record then set __HOST = __DOMAIN +[ -z "$__HOST" ] && __HOST=$__DOMAIN +# handling host record then rebuild fqdn host@domain.tld => host.domain.tld +[ "$__HOST" != "$__DOMAIN" ] && __HOST="${__HOST}.${__DOMAIN}" + +# set record type +[ $use_ipv6 -eq 0 ] && __TYPE="A" || __TYPE="AAAA" + +# transfer function to use for godaddy +# all needed variables are set global here +# so we can use them directly +cloudflare_transfer() { + local __CNT=0 + local __ERR + while : ; do + write_log 7 "#> $__RUNPROG" + eval "$__RUNPROG" + __ERR=$? # save communication error + [ $__ERR -eq 0 ] && break # no error break while + + write_log 3 "cURL Error: '$__ERR'" + write_log 7 "$(cat $ERRFILE)" # report error + + [ $VERBOSE_MODE -gt 1 ] && { + # VERBOSE_MODE > 1 then NO retry + write_log 4 "Transfer failed - Verbose Mode: $VERBOSE_MODE - NO retry on error" + break + } + + __CNT=$(( $__CNT + 1 )) # increment error counter + # if error count > retry_count leave here + [ $retry_count -gt 0 -a $__CNT -gt $retry_count ] && \ + write_log 14 "Transfer failed after $retry_count retries" + + write_log 4 "Transfer failed - retry $__CNT/$retry_count in $RETRY_SECONDS seconds" + sleep $RETRY_SECONDS & + PID_SLEEP=$! + wait $PID_SLEEP # enable trap-handler + PID_SLEEP=0 + done + + # check for error + grep -q '"success":\s*true' $DATFILE || { + write_log 4 "CloudFlare reported an error:" + write_log 7 "$(cat $DATFILE)" # report error + return 1 # HTTP-Fehler + } +} + +# Build base command to use +__PRGBASE="$CURL -RsS -o $DATFILE --stderr $ERRFILE" +# force network/interface-device to use for communication +if [ -n "$bind_network" ]; then + local __DEVICE + network_get_physdev __DEVICE $bind_network || \ + write_log 13 "Can not detect local device using 'network_get_physdev $bind_network' - Error: '$?'" + write_log 7 "Force communication via device '$__DEVICE'" + __PRGBASE="$__PRGBASE --interface $__DEVICE" +fi +# force ip version to use +if [ $force_ipversion -eq 1 ]; then + [ $use_ipv6 -eq 0 ] && __PRGBASE="$__PRGBASE -4" || __PRGBASE="$__PRGBASE -6" # force IPv4/IPv6 +fi +# set certificate parameters +if [ "$cacert" = "IGNORE" ]; then # idea from Ticket #15327 to ignore server cert + __PRGBASE="$__PRGBASE --insecure" # but not empty better to use "IGNORE" +elif [ -f "$cacert" ]; then + __PRGBASE="$__PRGBASE --cacert $cacert" +elif [ -d "$cacert" ]; then + __PRGBASE="$__PRGBASE --capath $cacert" +elif [ -n "$cacert" ]; then # it's not a file and not a directory but given + write_log 14 "No valid certificate(s) found at '$cacert' for HTTPS communication" +fi +# disable proxy if not set (there might be .wgetrc or .curlrc or wrong environment set) +# or check if libcurl compiled with proxy support +if [ -z "$proxy" ]; then + __PRGBASE="$__PRGBASE --noproxy '*'" +elif [ -z "$CURL_PROXY" ]; then + # if libcurl has no proxy support and proxy should be used then force ERROR + write_log 13 "cURL: libcurl compiled without Proxy support" +fi +# set headers +#__PRGBASE="$__PRGBASE --header 'X-Auth-Email: $username' " +__PRGBASE="$__PRGBASE --header 'Authorization: Bearer $password' " +__PRGBASE="$__PRGBASE --header 'Content-Type: application/json' " + +# read zone id for registered domain.TLD +__RUNPROG="$__PRGBASE --request GET '$__URLBASE/zones?name=$__DOMAIN'" +cloudflare_transfer || return 1 +# extract zone id +__ZONEID=$(grep -o '"id":\s*"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) +[ -z "$__ZONEID" ] && { + write_log 4 "Could not detect 'zone id' for domain.tld: '$__DOMAIN'" + return 127 +} + +# read record id for A or AAAA record of host.domain.TLD +__RUNPROG="$__PRGBASE --request GET '$__URLBASE/zones/$__ZONEID/dns_records?name=$__HOST&type=$__TYPE'" +cloudflare_transfer || return 1 +# extract record id +__RECID=$(grep -o '"id":\s*"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) +[ -z "$__RECID" ] && { + write_log 4 "Could not detect 'record id' for host.domain.tld: '$__HOST'" + return 127 +} + +# extract current stored IP +__DATA=$(grep -o '"content":\s*"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) + +# check data +[ $use_ipv6 -eq 0 ] \ + && __DATA=$(printf "%s" "$__DATA" | grep -m 1 -o "$IPV4_REGEX") \ + || __DATA=$(printf "%s" "$__DATA" | grep -m 1 -o "$IPV6_REGEX") + +# we got data so verify +[ -n "$__DATA" ] && { + # expand IPv6 for compare + if [ $use_ipv6 -eq 1 ]; then + expand_ipv6 $__IP __IPV6 + expand_ipv6 $__DATA __DATA + [ "$__DATA" = "$__IPV6" ] && { # IPv6 no update needed + write_log 7 "IPv6 at CloudFlare.com already up to date" + return 0 + } + else + [ "$__DATA" = "$__IP" ] && { # IPv4 no update needed + write_log 7 "IPv4 at CloudFlare.com already up to date" + return 0 + } + fi +} + +# update is needed +# let's build data to send +# set proxied parameter +__PROXIED=$(grep -o '"proxied":\s*[^",]*' $DATFILE | grep -o '[^:]*$') + +# use file to work around " needed for json +cat > $DATFILE << EOF +{"id":"$__ZONEID","type":"$__TYPE","name":"$__HOST","content":"$__IP","ttl":$__TTL,"proxied":$__PROXIED} +EOF + +# let's complete transfer command +__RUNPROG="$__PRGBASE --request PUT --data @$DATFILE '$__URLBASE/zones/$__ZONEID/dns_records/$__RECID'" +cloudflare_transfer || return 1 + +return 0 + diff --git a/net/ddns-scripts/files/update_cnkuai_cn.sh b/net/ddns-scripts/files/update_cnkuai_cn.sh new file mode 100755 index 00000000..a2b78630 --- /dev/null +++ b/net/ddns-scripts/files/update_cnkuai_cn.sh @@ -0,0 +1,86 @@ +# inside url we need domain, username and password +[ -z "$domain" ] && write_log 14 "Service section not configured correctly! Missing 'domain'" +[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'" +[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'" + +local urlCp='http://cp.cnkuai.cn/' +local urlLogin='http://cp.cnkuai.cn/userlogin.asp' +local urlCaptcha='http://cp.cnkuai.cn/inc/image.asp' +local urlDnsA='http://cp.cnkuai.cn/dns_a.asp' +local urlDnsAAAA='http://cp.cnkuai.cn/dns_ipv6.asp' +local urlDnsSave='http://cp.cnkuai.cn/dns_save.asp' + +getPixel(){ + local filename=$1 + local x=$(($2*3)) + local y=$(($3*3)) + local width=48 + + hexdump -s "$((x+width*y))" -n 3 -e '3/1 "%02X"' "$filename" +} + +captchaChar(){ + local filename=$1 + local xoffset=$2 + + if [ "$(getPixel "$filename" $((xoffset+2)) 5)" = '000000' ]; then + echo '1' + elif [ "$(getPixel "$filename" $((xoffset+5)) 7)" = '000000' ]; then + echo '2' + elif [ "$(getPixel "$filename" $((xoffset+4)) 3)" = '000000' ]; then + echo '4' + elif [ "$(getPixel "$filename" $((xoffset+6)) 4)" = '000000' ]; then + echo '7' + elif [ "$(getPixel "$filename" $((xoffset+5)) 8)" = '000000' ]; then + echo '8' + elif [ "$(getPixel "$filename" $((xoffset+6)) 8)" = '000000' ]; then + echo '9' + elif [ "$(getPixel "$filename" $((xoffset+5)) 6)" = '000000' ]; then + echo '3' + elif [ "$(getPixel "$filename" $((xoffset+0)) 4)" = '000000' ]; then + echo '5' + elif [ "$(getPixel "$filename" $((xoffset+1)) 5)" = '000000' ]; then + echo '6' + else + echo '0' + fi +} + +captcha(){ + local str + str=$(captchaChar "$1" 9) + str=$str$(captchaChar "$1" 18) + str=$str$(captchaChar "$1" 26) + str=$str$(captchaChar "$1" 35) + echo "$str" +} + +#clean +rm /tmp/cnkuai.* +#login to cnkuai dns cp +curl -c '/tmp/cnkuai.cookiejar' "$urlCaptcha" | gif2rgb > /tmp/cnkuai.rgb || return 1 +yzm=$(captcha "/tmp/cnkuai.rgb") +curl -b '/tmp/cnkuai.cookiejar' -c '/tmp/cnkuai.cookiejar' -H "Content-Type: application/x-www-form-urlencoded" -H "Referer: $urlCp" -d "userid=$URL_USER&password=$URL_PASS&yzm=$yzm&B1=%C8%B7%C8%CF%B5%C7%C2%BD&lx=0&userlx=3" -X POST "$urlLogin" > /dev/null || return 1 + +if [ "$use_ipv6" -eq 0 ]; then + curl -b '/tmp/cnkuai.cookiejar' -c '/tmp/cnkuai.cookiejar' "$urlDnsA" > /tmp/cnkuai.html || return 1 +else + curl -b '/tmp/cnkuai.cookiejar' -c '/tmp/cnkuai.cookiejar' "$urlDnsAAAA" > /tmp/cnkuai.html || return 1 +fi +local domainline +domainline=$(awk "/$domain<\/td>/{ print NR; exit }" /tmp/cnkuai.html) +local domainid +domainid=$(awk "NR==$((domainline+3))" /tmp/cnkuai.html | sed 's/^.*name=\x27domainid\x27 value="//g' | sed 's/".*$//g') +local dnslistid +dnslistid=$(awk "NR==$((domainline+3))" /tmp/cnkuai.html | sed 's/^.*name=\x27dnslistid\x27 value="//g' | sed 's/".*$//g') + +local data + +if [ "$use_ipv6" -eq 0 ]; then + data="T2=$__IP&T3=120&act=dns_a_edit&domainid=$domainid&dnslistid=$dnslistid&B1=%D0%DE%B8%C4" +else + data="T2=$__IP&T3=120&act=dns_ipv6_edit&domainid=$domainid&dnslistid=$dnslistid&B1=%D0%DE%B8%C4" +fi +curl -b '/tmp/cnkuai.cookiejar' -c '/tmp/cnkuai.cookiejar' -H "Content-Type: application/x-www-form-urlencoded" -H "Referer: $urlDnsA" -d "$data" -X POST "$urlDnsSave" > /dev/null || return 1 + +return 0 diff --git a/net/ddns-scripts/files/update_digitalocean_com_v2.sh b/net/ddns-scripts/files/update_digitalocean_com_v2.sh new file mode 100755 index 00000000..0770ab27 --- /dev/null +++ b/net/ddns-scripts/files/update_digitalocean_com_v2.sh @@ -0,0 +1,51 @@ +# Script for sending user defined updates using DO API +# 2015 Artem Yakimenko +# +# activated inside /etc/config/ddns by setting +# +# option update_script '/usr/lib/ddns/update_do.sh' +# +# the script is parsed (not executed) inside send_update() function +# of /usr/lib/ddns/dynamic_dns_functions.sh +# so you can use all available functions and global variables inside this script +# already defined in dynamic_dns_updater.sh and dynamic_dns_functions.sh +# +# It make sence to define the update url ONLY inside this script +# because it's anyway unique to the update script +# otherwise it should work with the default scripts +# +# Options are passed from /etc/config/ddns: + +# Username - the record name DO Zone +# Password - API Token +# Domain - the domain managed by DO +# Parm_opt - The Record ID in the DO API structure + +local __URL="https://api.digitalocean.com/v2/domains/[DOMAIN]/records/[RECORD_ID]" +local __HEADER="Authorization: Bearer [PASSWORD]" +local __HEADER_CONTENT="Content-Type: application/json" +local __BODY='{"name":"[NAME]","data": "[IP]"}' +# inside url we need username and password + +[ -z "$domain" ] && write_log 14 "Service section not configured correctly! Missing 'domain'" +[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'Zone name in Username'" +[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'" +[ -z "$param_opt" ] && write_log 14 "Service section not configured correctly! Missing 'Zone ID in Optional Parameter'" + +# do replaces in URL, header and body: +__URL=$(echo $__URL | sed -e "s#\[RECORD_ID\]#$param_opt#g" \ + -e "s#\[DOMAIN\]#$domain#g") +__HEADER=$(echo $__HEADER| sed -e "s#\[PASSWORD\]#$password#g") +__HEADER_CONTENT=$(echo $__HEADER_CONTENT) +__BODY=$(echo $__BODY | sed -e "s#\[NAME\]#$username#g" -e "s#\[IP\]#$__IP#g") + +#Send PUT request + +curl -X PUT -H "$__HEADER_CONTENT" -H "$__HEADER" -d "$__BODY" "$__URL" + +write_log 7 "DDNS Provider answered:\n$(cat $DATFILE)" + +# analyse provider answers +# If IP is contained in the returned datastructure - API call was sucessful +grep -E "$__IP" $DATFILE >/dev/null 2>&1 +return $? # "0" if IP has been changed or no change is needed diff --git a/net/ddns-scripts/files/update_route53_v1.sh b/net/ddns-scripts/files/update_route53_v1.sh index 6b9b029e..6d752ba9 100644 --- a/net/ddns-scripts/files/update_route53_v1.sh +++ b/net/ddns-scripts/files/update_route53_v1.sh @@ -1,46 +1,44 @@ #!/bin/sh -#.Distributed under the terms of the GNU General Public License (GPL) version 2.0 -#.based on Yuval Adam's route53.sh found at https://github.com/yuvadm/route53-ddns/blob/master/route53.sh -#.2017 Max Berger -[ -z "$CURL_SSL" ] && write_log 14 "Amazon AWS Route53 communication require cURL with SSL support. Please install" -[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'" -[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'" -[ -z "$domain" ] && write_log 14 "Service section not configured correctly! Missing zone id as 'domain'" +# Distributed under the terms of the GNU General Public License (GPL) version 2.0 +# based on Yuval Adam's route53.sh found at https://github.com/yuvadm/route53-ddns/blob/master/route53.sh +# 2017 Max Berger -set -euo pipefail -IFS=$'\n\t' +[ -z "${CURL_SSL}" ] && write_log 14 "Amazon AWS Route53 communication require cURL with SSL support. Please install" +[ -z "{$username}" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'" +[ -z "${password}" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'" +[ -z "${domain}" ] && write_log 14 "Service section not configured correctly! Missing zone id as 'domain'" ENDPOINT="route53.amazonaws.com" RECORD_TTL=300 -RECORD_NAME="$lookup_host". -[ $use_ipv6 -eq 0 ] && RECORD_TYPE="A" -[ $use_ipv6 -eq 1 ] && RECORD_TYPE="AAAA" -RECORD_VALUE="$LOCAL_IP" -HOSTED_ZONE_ID="$domain" +RECORD_NAME="${lookup_host}." +[ ${use_ipv6} -eq 0 ] && RECORD_TYPE="A" +[ ${use_ipv6} -eq 1 ] && RECORD_TYPE="AAAA" +RECORD_VALUE="${LOCAL_IP}" +HOSTED_ZONE_ID="${domain}" API_PATH="/2013-04-01/hostedzone/${HOSTED_ZONE_ID}/rrset/" -AWS_ACCESS_KEY_ID="$username" -AWS_SECRET_ACCESS_KEY="$password" +AWS_ACCESS_KEY_ID="${username}" +AWS_SECRET_ACCESS_KEY="${password}" AWS_REGION='us-east-1' AWS_SERVICE='route53' hash() { - msg=$1 - echo -en "$msg" | openssl dgst -sha256 | sed 's/^.* //' + msg="$1" + echo -en "${msg}" | openssl dgst -sha256 | sed 's/^.* //' } sign_plain() { # Sign message using a plaintext key - key=$1 - msg=$2 - echo -en "$msg" | openssl dgst -hex -sha256 -hmac "$key" | sed 's/^.* //' + key="$1" + msg="$2" + echo -en "${msg}" | openssl dgst -hex -sha256 -hmac "${key}" | sed 's/^.* //' } sign() { # Sign message using a hex formatted key - key=$1 - msg=$2 - echo -en "$msg" | openssl dgst -hex -sha256 -mac HMAC -macopt "hexkey:${key}" | sed 's/^.* //' + key="$1" + msg="$2" + echo -en "${msg}" | openssl dgst -hex -sha256 -mac HMAC -macopt "hexkey:${key}" | sed 's/^.* //' } request_body=" \ @@ -64,34 +62,34 @@ request_body=" \ \ " -fulldate=$(date --utc +%Y%m%dT%H%M%SZ) -shortdate=$(date --utc +%Y%m%d) +fulldate="$(date --utc +%Y%m%dT%H%M%SZ)" +shortdate="$(date --utc +%Y%m%d)" signed_headers="host;x-amz-date" -request_hash=$(hash "$request_body") +request_hash="$(hash "${request_body}")" canonical_request="POST\n${API_PATH}\n\nhost:route53.amazonaws.com\nx-amz-date:${fulldate}\n\n${signed_headers}\n${request_hash}" -date_key=$(sign_plain "AWS4${AWS_SECRET_ACCESS_KEY}" "${shortdate}") -region_key=$(sign "$date_key" $AWS_REGION) -service_key=$(sign "$region_key" $AWS_SERVICE) -signing_key=$(sign "$service_key" aws4_request) +date_key="$(sign_plain "AWS4${AWS_SECRET_ACCESS_KEY}" "${shortdate}")" +region_key="$(sign "${date_key}" ${AWS_REGION})" +service_key="$(sign "${region_key}" ${AWS_SERVICE})" +signing_key="$(sign "${service_key}" aws4_request)" credential="${shortdate}/${AWS_REGION}/${AWS_SERVICE}/aws4_request" -sigmsg="AWS4-HMAC-SHA256\n${fulldate}\n${credential}\n$(hash "$canonical_request")" +sigmsg="AWS4-HMAC-SHA256\n${fulldate}\n${credential}\n$(hash "${canonical_request}")" -signature=$(sign "$signing_key" "$sigmsg") +signature="$(sign "${signing_key}" "${sigmsg}")" authorization="AWS4-HMAC-SHA256 Credential=${AWS_ACCESS_KEY_ID}/${credential}, SignedHeaders=${signed_headers}, Signature=${signature}" -ANSWER=$(curl \ +ANSWER="$(flock /tmp/$(basename -s .sh "$0").lock curl \ -X "POST" \ -H "Host: route53.amazonaws.com" \ -H "X-Amz-Date: ${fulldate}" \ -H "Authorization: ${authorization}" \ -H "Content-Type: text/xml" \ -d "$request_body" \ - "https://${ENDPOINT}${API_PATH}") + "https://${ENDPOINT}${API_PATH}")" write_log 7 "${ANSWER}" -echo ${ANSWER} | grep Error >/dev/null && return 1 -echo ${ANSWER} | grep ChangeInfo >/dev/null && return 0 +echo "${ANSWER}" | grep -F "Error" >/dev/null && return 1 +echo "${ANSWER}" | grep -F "ChangeInfo" >/dev/null && return 0 return 2 diff --git a/net/ddns-scripts/samples/slaac_sample.sh b/net/ddns-scripts/samples/slaac_sample.sh new file mode 100755 index 00000000..ea8f24d8 --- /dev/null +++ b/net/ddns-scripts/samples/slaac_sample.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# +# script to determine and return SLAAC ipv6 address using prefix from a locally configured interface and the MAC address of the device +# (c) 2018 Keve Mueller +# +# activated inside /etc/config/ddns by setting +# +# option ip_source 'script' +# option ip_script '/usr/lib/ddns/slaac_sample.sh br-lan AA:BB:CC:DD:EE:FF' +# +# the script is executed (not parsed) inside get_local_ip() function +# of /usr/lib/ddns/dynamic_dns_functions.sh +# +# useful when this box is the only DDNS client in the network and other clients use SLAAC +# so no need to install ddns client on every "internal" box +# +# NB: this will not catch the actual IPV6 used by the host when it is configured to use temporary addresses + +#NB: we need a valid MAC address that is fully expanded with leading zeroes on all positions +format_eui_64() { + local macaddr="$1" + echo ${macaddr:0:1}$(echo ${macaddr:1:1}|tr 0123456789abcdefABCDEF 23016745ab89efcd89efcd)${macaddr:3:2}:${macaddr:6:2}ff:fe${macaddr:9:2}:${macaddr:12:2}${macaddr:15:2} +} + +# expand :: in an ipv6 address specification to the appropriate series of 0: +# result will have 8 ipv6 fragments separated by single colon +# NB: input must be a valid IPv6 address, e.g. ::1 +# NB: numbers are not prepended with leading zeroes +expand_ipv6_colons() { + local ipv6=$1 +# we need :: to be in the middle, so prepend a 0 if the input starts with : and append 0 if it ends with it + if [ "${ipv6:0:1}" = ":" ]; then ipv6=0${ipv6}; fi + if [ "${ipv6: -1:1}" = ":" ]; then ipv6=${ipv6}0; fi +# retain only the real colons + local colons=${ipv6//::|[0123456789abcdefABCDEF]/} +# count them + local num_colons=${#colons} + local filler=":0:0:0:0:0:0:" +# replace the :: with the appropriate substring from filler + local ipv6_x=${ipv6/::/${filler:0:(7-$num_colons)*2-1}} + echo $ipv6_x +} + +# obtain the first ipv6 address of the device passed in $1 +addr_net=$(ip -6 -o addr show dev $1 scope global up | cut -d" " -f 7 | head -1) +#addr_net=$1 +addr=${addr_net%/*} +# TODO: we assume /64 subnet +# get the first 64 bits of the address +prefix=$(expand_ipv6_colons $addr | cut -d: -f -4) +# compute the SLAAC 64 bits from the MAC +suffix=$(format_eui_64 "$2") + +echo -n $prefix:$suffix +exit 0 + +#echo "Should never come here" >&2 +#exit 2 + diff --git a/net/dhcpcd/Makefile b/net/dhcpcd/Makefile index a5119c6d..71c3afb7 100644 --- a/net/dhcpcd/Makefile +++ b/net/dhcpcd/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dhcpcd -PKG_VERSION:=6.11.5 +PKG_VERSION:=7.2.2 PKG_RELEASE:=1 PKG_SOURCE_URL:=ftp://roy.marples.name/pub/dhcpcd \ http://roy.marples.name/downloads/dhcpcd PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=6f9674dc7e27e936cc787175404a6171618675ecfb6903ab9887b1b66a87d69e +PKG_HASH:=3db7ff18cba9274da1d2176fb3c7cbe23926a8e58d5c8e244ad55c62d38ba09e PKG_LICENSE:=BSD-2c PKG_LICENSE_FILES:= +PKG_CPE_ID:=cpe:/a:roy_marples:dhcpcd PKG_MAINTAINER:=Marko Ratkaj diff --git a/net/dmapd/Makefile b/net/dmapd/Makefile index 91aefe49..67170107 100644 --- a/net/dmapd/Makefile +++ b/net/dmapd/Makefile @@ -8,20 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dmapd -PKG_VERSION:=0.0.73 +PKG_VERSION:=0.0.84 PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo -PKG_LICENSE:=GPLv2 +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.flyn.org/projects/dmapd -PKG_HASH:=5447e8d28cd93739efe479e8ca3e140043b11aca4427676e8990b300618011a1 +PKG_SOURCE_URL:=https://www.flyn.org/projects/dmapd +PKG_HASH:=96d134e7c6d8e0394ee654903a184bfc200a3139692d124e7b11a3400138c8b2 -PKG_FIXUP:=autoreconf -PKG_INSTALL:=2 +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -29,23 +29,23 @@ include $(INCLUDE_DIR)/nls.mk define Package/dmapd SECTION:=net CATEGORY:=Network - DEPENDS:=+libdmapsharing +libdb47 +vips + DEPENDS:=+libdmapsharing +libdb47 +vips +libgst1pbutils TITLE:= dmapd URL:=http://www.flyn.org/projects/dmapd/ USERID:=dmapd=56:dmapd=56 endef -define Package/dmapd/decription +define Package/dmapd/description Dmapd is a DMAP server endef +CONFIGURE_ARGS += \ + --disable-check + define Package/dmapd/conffiles /etc/dmapd.conf endef -TARGET_LDFLAGS+=\ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ - define Package/dmapd/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/etc/init.d diff --git a/net/dmapd/files/dmapd.init b/net/dmapd/files/dmapd.init index 76ecd501..537f5499 100644 --- a/net/dmapd/files/dmapd.init +++ b/net/dmapd/files/dmapd.init @@ -2,27 +2,27 @@ # Copyright (C) 2009-2012 OpenWrt.org START=60 +USE_PROCD=1 +PROG=/usr/sbin/dmapd -start() { +start_service() { [ -d /var/run/dmapd ] || { mkdir -m 0755 -p /var/run/dmapd chown dmapd:dmapd /var/run/dmapd } - [ -d /var/db/dmapd/DAAP ] || { - mkdir -m 0755 -p /var/db/dmapd/DAAP - chown dmapd:dmapd /var/db/dmapd/DAAP - } - [ -d /var/db/dmapd/DPAP ] || { - mkdir -m 0755 -p /var/db/dmapd/DPAP - chown dmapd:dmapd /var/db/dmapd/DPAP + [ -d /var/db/dmapd ] || { + mkdir -m 0755 -p /var/db/dmapd + chown dmapd:dmapd /var/db/dmapd } mkdir -m 0755 -p /var/lock/subsys mkdir -m 0755 -p /var/media/music mkdir -m 0755 -p /var/media/pictures - service_start /usr/sbin/dmapd -u dmapd -g dmapd -m /var/media/music -p /var/media/pictures --vips-disc-threshold 64k -} - -stop() { - service_stop /usr/sbin/dmapd + procd_open_instance + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param pidfile /var/run/dmapd.pid + procd_set_param user dmapd + procd_set_param command $PROG -f + procd_close_instance } diff --git a/net/dmapd/patches/001-dmapd_conf.patch b/net/dmapd/patches/001-dmapd_conf.patch deleted file mode 100644 index 9c1e60a3..00000000 --- a/net/dmapd/patches/001-dmapd_conf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/distro/dmapd.conf -+++ b/distro/dmapd.conf -@@ -3,7 +3,7 @@ - Database-Dir=/var/db/dmapd - - # Name that will be used to identify share: --Share-Name=dmapd -+Share-Name=OpenWrt - - # User that dmapd will run as, current user if undefined: - User=dmapd diff --git a/net/dmapd/patches/002-make_unit_test_optionnal.patch b/net/dmapd/patches/002-make_unit_test_optionnal.patch deleted file mode 100644 index 3f42f6b2..00000000 --- a/net/dmapd/patches/002-make_unit_test_optionnal.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -233,7 +233,13 @@ else - AM_CONDITIONAL(USE_LIBDB, false) - fi - --PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no) -+dnl Test if --enable-unit-test given -+AC_ARG_ENABLE(unit-test, [AC_HELP_STRING([--enable-unit-test],[enable unit test])]) -+if test "x$enable_unit_test" = "xyes" ; then -+ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no) -+else -+ have_check=no -+fi - AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes") - - AM_CONDITIONAL(FLYN, test "$FLYN") diff --git a/net/dnscrypt-proxy/Makefile b/net/dnscrypt-proxy/Makefile index ddaca895..88908644 100644 --- a/net/dnscrypt-proxy/Makefile +++ b/net/dnscrypt-proxy/Makefile @@ -8,21 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnscrypt-proxy -PKG_VERSION:=1.9.5 -PKG_RELEASE:=8 +PKG_SOURCE_DATE:=2019-08-20 +PKG_SOURCE_VERSION:=07ac3825b5069adc28e2547c16b1d983a8ed8d80 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_VERSION:=f71ca699aa3399f0c103c1f13ce1a86f9ce9638c PKG_SOURCE_URL:=https://github.com/dyne/dnscrypt-proxy -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_MIRROR_HASH:=a3a52f7f85b390184695db688c9837bf51cf25c4cb2c1093bb315640dbd2a54f - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 +PKG_MIRROR_HASH:=c5c074f52732f14f026002bc48bdffcf0b212092de5798120209b2e6b65fc3e6 PKG_MAINTAINER:=Damiano Renfer PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:= \ CONFIG_DNSCRYPT_ENABLE_PLUGINS @@ -33,7 +33,6 @@ define Package/dnscrypt-proxy/Default CATEGORY:=Network SUBMENU:=IP Addresses and Names URL:=https://github.com/dyne/dnscrypt-proxy - MAINTAINER:=Damiano Renfer endef define Package/dnscrypt-proxy @@ -55,7 +54,6 @@ endef define Package/dnscrypt-proxy-resolvers $(call Package/dnscrypt-proxy/Default) TITLE:=Package with current list of dnscrypt-proxy resolvers - VERSION:=$(PKG_VERSION)+git-20171001-2d43be3-$(PKG_RELEASE) endef define Package/dnscrypt-proxy-resolvers/description diff --git a/net/dnscrypt-proxy/files/dnscrypt-proxy.init b/net/dnscrypt-proxy/files/dnscrypt-proxy.init index 0958c928..7df6b220 100644 --- a/net/dnscrypt-proxy/files/dnscrypt-proxy.init +++ b/net/dnscrypt-proxy/files/dnscrypt-proxy.init @@ -1,6 +1,7 @@ #!/bin/sh /etc/rc.common -START=30 +# Startup before dnsmasq +START=18 USE_PROCD=1 PROG=/usr/sbin/dnscrypt-proxy CONFIG_DIR=/var/etc diff --git a/net/dnscrypt-proxy/files/dnscrypt-resolvers.csv b/net/dnscrypt-proxy/files/dnscrypt-resolvers.csv index e2cf7b13..500e7ff8 100644 --- a/net/dnscrypt-proxy/files/dnscrypt-resolvers.csv +++ b/net/dnscrypt-proxy/files/dnscrypt-resolvers.csv @@ -84,8 +84,8 @@ d0wn-us-ns1,"D0wn Resolver United States of America 01","Server provided by Mart d0wn-us-ns2,"D0wn Resolver United States of America 02","Server provided by Martin 'd0wn' Albus","United States of America","",https://dns.d0wn.biz,1,yes,yes,no,192.252.222.24,2.dnscrypt-cert.us2.d0wn.biz,729B:FABE:2295:D469:E911:F97E:3EE4:F6DB:0190:EA6F:7CF3:F7EE:BB6B:99B1:698A:237D,pubkey.us2.dnscrypt.d0wn.biz d0wn-us-ns4,"D0wn Resolver United States of America 04","Server provided by Martin 'd0wn' Albus","United States of America","",https://dns.d0wn.biz,1,yes,yes,no,107.181.168.52,2.dnscrypt-cert.us4.d0wn.biz,F392:5D53:A315:66C2:ACF2:B2D2:8A69:6739:B066:1B8C:EF1B:3AFD:E828:0D83:D4EA:6D7D,pubkey.us4.dnscrypt.d0wn.biz d0wn-za-ns1,"D0wn Resolver South Africa 01","Server provided by Martin 'd0wn' Albus","South Africa","",https://dns.d0wn.biz,1,yes,yes,no,169.239.181.3,2.dnscrypt-cert.za.d0wn.biz,FBBD:0F3A:AF2B:B1BB:CD8F:9324:D5F6:A68C:E722:3890:8B90:92CF:F6D2:BF7C:9EC1:1368,pubkey.za.dnscrypt.d0wn.biz -dnscrypt.ca-1,"dnscrypt.ca Server 1","Uncensored DNSSEC validating and log-free","Montreal, Canada","","https://dnscrypt.ca/",1,yes,yes,no,"199.167.130.118:5353","2.dnscrypt-cert.dnscrypt.ca-1",74F7:4555:17BC:26F7:1177:E56D:7293:2788:6C72:915B:3F46:2830:3F91:0C47:C38E:8279, -dnscrypt.ca-2,"dnscrypt.ca Server 2","Uncensored DNSSEC validating and log-free","Montreal, Canada","","https://dnscrypt.ca/",1,yes,yes,no,"199.167.128.112:5353","2.dnscrypt-cert.dnscrypt.ca-2",43D5:2C82:5922:96C2:DB6F:8D48:CE22:4FDC:C726:26E1:06F6:E388:6193:FA00:9029:631B, +dnscrypt.ca-1,"dnscrypt.ca Server 1","Uncensored DNSSEC validating and log-free","Montreal, Canada","","https://dnscrypt.ca/",1,yes,yes,no,"192.99.183.132:443","2.dnscrypt-cert.dnscrypt.ca-1",1A53:A3C9:5078:9CBD:D10B:1933:A468:9B6C:846A:40F1:B73D:1752:AECA:C982:9ECB:7CE2, +dnscrypt.ca-2,"dnscrypt.ca Server 2","Uncensored DNSSEC validating and log-free","Montreal, Canada","","https://dnscrypt.ca/",1,yes,yes,no,"149.56.228.45:443","2.dnscrypt-cert.dnscrypt.ca-2",0108:54AB:3B56:A7EE:F9D3:9158:FEF6:820B:FF93:A235:7C89:1608:DB9E:15D3:BBE0:1185, dnscrypt.eu-dk,"DNSCrypt.eu Denmark","Free, non-logged, uncensored. Hosted by Netgroup.","Denmark","",https://dnscrypt.eu,1,yes,yes,no,77.66.84.233,2.dnscrypt-cert.resolver2.dnscrypt.eu,3748:5585:E3B9:D088:FD25:AD36:B037:01F5:520C:D648:9E9A:DD52:1457:4955:9F0A:9955,pubkey.resolver2.dnscrypt.eu dnscrypt.eu-dk-ipv6,"DNSCrypt.eu Denmark over IPv6","Free, non-logged, uncensored. Hosted by Netgroup.","Denmark","",https://dnscrypt.eu,1,yes,yes,no,[2001:1448:243::dc2]:443,2.dnscrypt-cert.resolver2.dnscrypt.eu,3748:5585:E3B9:D088:FD25:AD36:B037:01F5:520C:D648:9E9A:DD52:1457:4955:9F0A:9955,pubkey.resolver2.dnscrypt.eu dnscrypt.eu-nl,"DNSCrypt.eu Holland","Free, non-logged, uncensored. Hosted by RamNode.","Netherlands","",https://dnscrypt.eu,1,yes,yes,no,176.56.237.171,2.dnscrypt-cert.resolver1.dnscrypt.eu,67C0:0F2C:21C5:5481:45DD:7CB4:6A27:1AF2:EB96:9931:40A3:09B6:2B8D:1653:1185:9C66,pubkey.resolver1.dnscrypt.eu @@ -99,8 +99,8 @@ ns0.dnscrypt.is,"ns0.dnscrypt.is in Reykjavík, Iceland","DNSSEC enabled, non-lo okturtles,"okTurtles","For a surveillance-free world. HTTPS is broken. DNSChain fixes it.","Georgia, US","33.032501, -83.895699",http://okturtles.com/,1,no,yes,no,23.226.227.93,2.dnscrypt-cert.okturtles.com,1D85:3953:E34F:AFD0:05F9:4C6F:D1CC:E635:D411:9904:0D48:D19A:5D35:0B6A:7C81:73CB, opennic-tumabox,"TumaBox","Public DNS server operated by TumaBox.org","Germany","",http://wiki.tumabox.org/doku.php?id=dns,1,no,yes,no,130.255.73.90:5353,2.tumabox.org,D591:7B11:6A35:3114:C238:AA99:A6EB:0C28:7CF7:6805:41AC:5DBF:A8A0:239E:228C:5B06, opennic-tumabox-ipv6,"TumaBox over IPv6","Public DNS server operated by TumaBox.org","Germany","",http://wiki.tumabox.org/doku.php?id=dns,1,no,yes,no,[2a02:e00:fffd:139::9]:5353,2.tumabox.org,D591:7B11:6A35:3114:C238:AA99:A6EB:0C28:7CF7:6805:41AC:5DBF:A8A0:239E:228C:5B06, -securedns,SecureDNS,Uncensored and no logging,"Amsterdam, Netherlands",,https://securedns.eu,1,yes,yes,no,146.185.167.43:5353,2.dnscrypt-cert.securedns.eu,B3A5:9769:1457:5B04:89E1:9FAE:9C43:E679:FAF2:8C57:1897:0031:7F7B:B496:291F:B095,2.dnscrypt-cert.securedns.eu -securedns-ipv6,SecureDNS over IPv6,Uncensored and no logging,"Amsterdam, Netherlands",,https://securedns.eu,1,yes,yes,no,[2a03:b0c0:0:1010::e9a:3001]:5353,2.dnscrypt-cert.securedns.eu,B3A5:9769:1457:5B04:89E1:9FAE:9C43:E679:FAF2:8C57:1897:0031:7F7B:B496:291F:B095,2.dnscrypt-cert.securedns.eu +securedns,SecureDNS,Uncensored and no logging,"Amsterdam, Netherlands",,https://securedns.eu,1,yes,yes,no,146.185.167.43:5353,2.dnscrypt-cert.securedns.eu,F49F:2C73:4D62:B686:319E:D07E:6919:433B:2F13:85F4:1EFB:CA2F:176D:590B:2E45:3E86,2.dnscrypt-cert.securedns.eu +securedns-ipv6,SecureDNS over IPv6,Uncensored and no logging,"Amsterdam, Netherlands",,https://securedns.eu,1,yes,yes,no,[2a03:b0c0:0:1010::e9a:3001]:5353,2.dnscrypt-cert.securedns.eu,F49F:2C73:4D62:B686:319E:D07E:6919:433B:2F13:85F4:1EFB:CA2F:176D:590B:2E45:3E86,2.dnscrypt-cert.securedns.eu soltysiak,"Soltysiak","Public DNSCrypt server in Poland","Poland","52.4014619, 16.9278078",http://dc1.soltysiak.com/,1,yes,yes,yes,178.216.201.222:2053,2.dnscrypt-cert.soltysiak.com,25C4:E188:2915:4697:8F9C:2BBD:B6A7:AFA4:01ED:A051:0508:5D53:03E7:1928:C066:8F21,pubkey.dc1.soltysiak.com soltysiak-ipv6,"Soltysiak over IPv6","Public DNSCrypt server in Poland","Poland","52.4014619, 16.9278078",http://dc1.soltysiak.com/,1,yes,yes,yes,[2001:470:70:4ff::2]:2053,2.dnscrypt-cert.soltysiak.com,25C4:E188:2915:4697:8F9C:2BBD:B6A7:AFA4:01ED:A051:0508:5D53:03E7:1928:C066:8F21,pubkey.dc1.soltysiak.com ventricle.us,"Anatomical DNS","Public DNSCrypt resolver provided by Jacob Henner","New York, NY","",https://jacobhenner.com,1,yes,yes,no,107.170.57.34,2.dnscrypt-cert.dnscrypt.ventricle.us,E985:F118:AD4E:3CC6:5FF2:2520:1890:C6F5:58B7:5B5A:52F5:6B17:CFEA:C100:5C8B:9BAA,pubkey.dnscrypt.ventricle.us diff --git a/net/dnscrypt-proxy/patches/010-internal.patch b/net/dnscrypt-proxy/patches/010-internal.patch new file mode 100644 index 00000000..f10a85f1 --- /dev/null +++ b/net/dnscrypt-proxy/patches/010-internal.patch @@ -0,0 +1,11 @@ +--- a/src/proxy/app.c ++++ b/src/proxy/app.c +@@ -391,7 +391,7 @@ dnscrypt_proxy_main(int argc, char *argv[]) + } + logger_noformat(&proxy_context, LOG_NOTICE, "Starting " PACKAGE_STRING); + sodium_mlock(&proxy_context, sizeof proxy_context); +- randombytes_set_implementation(&randombytes_salsa20_implementation); ++ randombytes_set_implementation(&randombytes_internal_implementation); + + #ifdef PLUGINS + if (plugin_support_context_load(app_context.dcps_context) != 0) { diff --git a/net/dnscrypt-proxy2/Makefile b/net/dnscrypt-proxy2/Makefile new file mode 100644 index 00000000..6f064e74 --- /dev/null +++ b/net/dnscrypt-proxy2/Makefile @@ -0,0 +1,83 @@ +# +# Copyright (C) 2019-2020 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dnscrypt-proxy2 +PKG_VERSION:=2.0.42 +PKG_RELEASE:=1 + +PKG_SOURCE:=dnscrypt-proxy-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/DNSCrypt/dnscrypt-proxy/tar.gz/$(PKG_VERSION)? +PKG_HASH:=c000ca4e159c6606cb3476ea9e34ed64b5c46c710d70cc5651f14f1125c8d352 +PKG_BUILD_DIR:=$(BUILD_DIR)/dnscrypt-proxy-$(PKG_VERSION) + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/DNSCrypt/dnscrypt-proxy + +include $(INCLUDE_DIR)/package.mk +include ../../lang/golang/golang-package.mk + +define Package/dnscrypt-proxy2 + SECTION:=net + CATEGORY:=Network + TITLE:=Flexible DNS proxy with encrypted DNS protocols + URL:=https://github.com/DNSCrypt/dnscrypt-proxy + DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle + CONFLICTS:=dnscrypt-proxy +endef + +define Package/dnscrypt-proxy2/install + $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) + + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/ + + $(INSTALL_DIR) $(1)/etc/dnscrypt-proxy2 + $(INSTALL_CONF) $(PKG_BUILD_DIR)/dnscrypt-proxy/example-dnscrypt-proxy.toml $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml + $(INSTALL_CONF) ./files/blacklist.txt $(1)/etc/dnscrypt-proxy2/blacklist.txt + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy + + sed -i "s/^listen_addresses = .*/listen_addresses = ['127.0.0.53:53']/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml + sed -i "s/^ # blacklist_file = 'blacklist.txt'/blacklist_file = 'blacklist.txt'/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml +endef + +define Package/dnscrypt-proxy2/description + A flexible DNS proxy, with support for modern encrypted DNS protocols + such as DNSCrypt v2 and DNS-over-HTTPS. +endef + +define Package/dnscrypt-proxy2/conffiles +/etc/dnscrypt-proxy2/dnscrypt-proxy.toml +endef + +define Package/golang-github-jedisct1-dnscrypt-proxy2-dev +$(call Package/dnscrypt-proxy2) +$(call GoPackage/GoSubMenu) + TITLE+= (source files) + PKGARCH:=all +endef + +define Package/golang-github-jedisct1-dnscrypt-proxy2-dev/description +$(call Package/dnscrypt-proxy2/description) + + This package provides the source files for the client/bridge program. +endef + +$(eval $(call GoBinPackage,dnscrypt-proxy2)) +$(eval $(call BuildPackage,dnscrypt-proxy2)) +$(eval $(call GoSrcPackage,golang-github-jedisct1-dnscrypt-proxy2-dev)) +$(eval $(call BuildPackage,golang-github-jedisct1-dnscrypt-proxy2-dev)) diff --git a/net/dnscrypt-proxy2/files/blacklist.txt b/net/dnscrypt-proxy2/files/blacklist.txt new file mode 100644 index 00000000..c975af3c --- /dev/null +++ b/net/dnscrypt-proxy2/files/blacklist.txt @@ -0,0 +1,54 @@ + +########################### +# Blacklist # +########################### + +## Rules for name-based query blocking, one per line +## +## Example of valid patterns: +## +## ads.* | matches anything with an "ads." prefix +## *.example.com | matches example.com and all names within that zone such as www.example.com +## example.com | identical to the above +## =example.com | block example.com but not *.example.com +## *sex* | matches any name containing that substring +## ads[0-9]* | matches "ads" followed by one or more digits +## ads*.example* | *, ? and [] can be used anywhere, but prefixes/suffixes are faster + +ad.* +ads.* +banner.* +banners.* +creatives.* +oas.* +oascentral.* +stats.* +tag.* +telemetry.* +tracker.* +*.local +eth0.me +*.workgroup + +*.test +*.onion +*.localhost +*.local +*.invalid +*.bind +*.lan +*.internal +*.intranet +*.private +*.workgroup + +*.10.in-addr.arpa +*.16.172.in-addr.arpa +*.168.192.in-addr.arpa +*.254.169.in-addr.arpa +*.d.f.ip6.arpa + +## Time-based rules + +# *.youtube.* @time-to-sleep +# facebook.com @work diff --git a/net/dnscrypt-proxy2/files/dnscrypt-proxy.init b/net/dnscrypt-proxy2/files/dnscrypt-proxy.init new file mode 100644 index 00000000..db07d5e8 --- /dev/null +++ b/net/dnscrypt-proxy2/files/dnscrypt-proxy.init @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 + +# starts before dnsmasq starts +START=18 +# stops before networking stops +STOP=89 + +PROG=/usr/sbin/dnscrypt-proxy +CONFIGFILE=/etc/dnscrypt-proxy2/dnscrypt-proxy.toml + +start_service() { + procd_open_instance + procd_set_param command "$PROG" -config "$CONFIGFILE" + procd_set_param file "$CONFIGFILE" + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5} + procd_close_instance +} diff --git a/net/dnsdist/Makefile b/net/dnsdist/Makefile new file mode 100644 index 00000000..7310c622 --- /dev/null +++ b/net/dnsdist/Makefile @@ -0,0 +1,129 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=dnsdist +PKG_VERSION:=1.4.0 +PKG_RELEASE:=5 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/ +PKG_HASH:=a336fa2c3eb381c2464d9d9790014fd6d4505029ed2c1b73ee1dc9115a2f1dc0 + +PKG_MAINTAINER:=James Taylor +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:powerdns:dnsdist + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_ASLR_PIE:=0 +PKG_BUILD_DEPENDS:=protobuf/host + +PKG_CONFIG_DEPENDS:= \ + CONFIG_DNSDIST_GNUTLS \ + CONFIG_DNSDIST_OPENSSL + +include $(INCLUDE_DIR)/package.mk + +define Package/dnsdist/config +menu "Configuration" + depends on PACKAGE_dnsdist + + comment "SSL Support" + choice + prompt "Selected SSL library" + default DNSDIST_OPENSSL + + config DNSDIST_OPENSSL + bool "OpenSSL" + + config DNSDIST_GNUTLS + bool "GnuTLS" + + config DNSDIST_NOSSL + bool "No SSL support" + + endchoice + + comment "DNS over HTTPS/TLS Support" + depends on !DNSDIST_NOSSL + + config DNSDIST_DNS_OVER_HTTPS + depends on DNSDIST_OPENSSL + depends on !DNSDIST_NOSSL + bool "DNS over HTTPS Support" + help + "Enables DNS over HTTPS Support for dnsdist" + default y + + config DNSDIST_DNS_OVER_TLS + depends on !DNSDIST_NOSSL + bool "DNS over TLS Support" + help + "Enabled DNS over TLS Support for dnsdist" + default y +endmenu +endef + +define Package/dnsdist + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer + DEPENDS:= \ + +DNSDIST_DNS_OVER_HTTPS:libh2o-evloop \ + +DNSDIST_GNUTLS:libgnutls \ + +DNSDIST_OPENSSL:libopenssl \ + +boost \ + +libatomic \ + +libcap \ + +libedit \ + +libfstrm \ + +libnetsnmp \ + +libsodium \ + +lmdb \ + +lua \ + +protobuf \ + +re2 \ + +tinycdb + URL:=https://dnsdist.org/ +endef + +define Package/dnsdist/description + dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life + is to route traffic to the best server, delivering top performance to legitimate + users while shunting or blocking abusive traffic. +endef + +define Package/dnsdist/conffiles +/etc/dnsdist.conf +/etc/config/dnsdist +/etc/init.d/dnsdist +endef + +CONFIGURE_ARGS+= \ + --enable-dnscrypt \ + --enable-dnstap \ + --with-libsodium \ + --with-pic \ + --with-protobuf \ + --with-re2 \ + --with-lua=lua \ + --with-net-snmp \ + $(if $(CONFIG_DNSDIST_GNUTLS),--with,--without)-gnutls \ + $(if $(CONFIG_DNSDIST_OPENSSL),--with,--without)-libssl \ + $(if $(CONFIG_DNSDIST_DNS_OVER_TLS),--enable-dns-over-tls,) \ + $(if $(CONFIG_DNSDIST_DNS_OVER_HTTPS),--enable-dns-over-https,) + +define Package/dnsdist/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/dnsdist.conf $(1)/etc/dnsdist.conf + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/dnsdist.config $(1)/etc/config/dnsdist + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/dnsdist.init $(1)/etc/init.d/dnsdist + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnsdist $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,dnsdist)) diff --git a/net/dnsdist/files/dnsdist.conf b/net/dnsdist/files/dnsdist.conf new file mode 100644 index 00000000..e69de29b diff --git a/net/dnsdist/files/dnsdist.config b/net/dnsdist/files/dnsdist.config new file mode 100644 index 00000000..bc9c1d3a --- /dev/null +++ b/net/dnsdist/files/dnsdist.config @@ -0,0 +1,2 @@ +config 'dnsdist' 'general' + option enabled '0' diff --git a/net/dnsdist/files/dnsdist.init b/net/dnsdist/files/dnsdist.init new file mode 100644 index 00000000..c17d48f8 --- /dev/null +++ b/net/dnsdist/files/dnsdist.init @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common +START=99 + +USE_PROCD=1 + +start_service() { + config_load dnsdist + local cfg=general + local enabled + + config_get_bool enabled "$cfg" 'enabled' 1 + + [ $enabled -gt 0 ] || return 1 + + procd_open_instance + procd_set_param command dnsdist --supervised -C /etc/dnsdist.conf + procd_set_param file /etc/dnsdist.conf + procd_set_param respawn + procd_close_instance +} diff --git a/net/dnsdist/patches/010-libcxx.patch b/net/dnsdist/patches/010-libcxx.patch new file mode 100644 index 00000000..c283b34a --- /dev/null +++ b/net/dnsdist/patches/010-libcxx.patch @@ -0,0 +1,41 @@ +From 405bdec807a7b530173ebf018843c4552dfa20c9 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Sat, 6 Jun 2020 11:33:55 -0700 +Subject: [PATCH] use std::string_view when available + +There's a standard C++ macro to check for its existence. + +libstdc++ from GCC makes it available under C++17 and up. libcxx from +LLVM makes it available everywhere. + +Signed-off-by: Rosen Penev +--- + ext/lmdb-safe/lmdb-safe.hh | 7 +++---- + pdns/dnsdistdist/views.hh | 7 +++---- + 2 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/ext/lmdb-safe/lmdb-safe.hh b/ext/lmdb-safe/lmdb-safe.hh +index 056a6cd823..16d150fa7d 100644 +--- a/ext/lmdb-safe/lmdb-safe.hh ++++ b/ext/lmdb-safe/lmdb-safe.hh +@@ -10,8 +10,9 @@ + #include + #include + +-// apple compiler somehow has string_view even in c++11! +-#if __cplusplus < 201703L && !defined(__APPLE__) ++#ifdef __cpp_lib_string_view ++using std::string_view; ++#else + #include + #if BOOST_VERSION >= 106100 + #include +@@ -20,8 +21,6 @@ using boost::string_view; + #include + using string_view = boost::string_ref; + #endif +-#else // C++17 +-using std::string_view; + #endif + + diff --git a/net/dnsdist/patches/020-std.patch b/net/dnsdist/patches/020-std.patch new file mode 100644 index 00000000..a39d73d1 --- /dev/null +++ b/net/dnsdist/patches/020-std.patch @@ -0,0 +1,25 @@ +From 6910a23b67f64bd71ffb26c1888fb9d8b99acfa6 Mon Sep 17 00:00:00 2001 +From: Peter van Dijk +Date: Mon, 9 Mar 2020 19:10:00 +0100 +Subject: [PATCH] auth lmdb: avoid blanket std import; fixes #8872 + +--- + ext/lmdb-safe/lmdb-safe.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ext/lmdb-safe/lmdb-safe.cc b/ext/lmdb-safe/lmdb-safe.cc +index f4874261f6..c29d291473 100644 +--- a/ext/lmdb-safe/lmdb-safe.cc ++++ b/ext/lmdb-safe/lmdb-safe.cc +@@ -6,7 +6,10 @@ + #include + #include + +-using namespace std; ++using std::string; ++using std::runtime_error; ++using std::tuple; ++using std::weak_ptr; + + static string MDBError(int rc) + { diff --git a/net/dnstop/Makefile b/net/dnstop/Makefile new file mode 100644 index 00000000..6681552d --- /dev/null +++ b/net/dnstop/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=dnstop +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/measurement-factory/dnstop.git +PKG_SOURCE_DATE:=2018-05-22 +PKG_SOURCE_VERSION:=a5a5d2e2ca9a433bb8f017682ac6f2085741bdf8 +PKG_MIRROR_HASH:=1fe443c6faf1726aeb86a53a3a44efce23cad604304036371e76ff020eb0dac2 + +PKG_MAINTAINER:=Ken Xu +PKG_LICENSE:=NLPL +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/dnstop + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libncurses + TITLE:=stay on top of your dns traffic + URL:=http://dns.measurement-factory.com/tools/dnstop/ +endef + +define Package/dnstop/description + dnstop is a libpcap application (like tcpdump) that displays various tables of DNS traffic on your network +endef + +define Package/dnstop/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dnstop $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,dnstop)) diff --git a/net/dnstop/patches/100-fix_udphdr_error.patch b/net/dnstop/patches/100-fix_udphdr_error.patch new file mode 100644 index 00000000..2b729ea6 --- /dev/null +++ b/net/dnstop/patches/100-fix_udphdr_error.patch @@ -0,0 +1,14 @@ +--- a/dnstop.c ++++ b/dnstop.c +@@ -71,11 +71,6 @@ static const char *Version = "@VERSION@" + #define ETHERTYPE_IPV6 0x86DD + #endif + +-#if defined(__linux__) || defined(__GLIBC__) || defined(__GNU__) +-#define uh_dport dest +-#define uh_sport source +-#endif +- + typedef struct { + inX_addr src; + int count; diff --git a/net/dynapoint/Makefile b/net/dynapoint/Makefile index f27ad745..cb91f511 100644 --- a/net/dynapoint/Makefile +++ b/net/dynapoint/Makefile @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dynapoint -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=Tobias Ilte -PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE:=GPL-3.0-or-later include $(INCLUDE_DIR)/package.mk define Package/dynapoint SECTION:=net CATEGORY:=Network - SUBMENU:=wireless + SUBMENU:=Wireless DEPENDS:=+lua +libubus-lua +libuci-lua +libubox-lua +luci-lib-nixio TITLE:=Dynamic access point manager + PKGARCH:=all endef define Package/dynapoint/description diff --git a/net/e2guardian/Makefile b/net/e2guardian/Makefile deleted file mode 100644 index 14462a46..00000000 --- a/net/e2guardian/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=e2guardian -PKG_VERSION:=3.2.0 -PKG_RELEASE:=1 - -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Luka Perkov - -PKG_SOURCE:=v$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/archive/ -PKG_HASH:=cae011aacf6b250fc021c861fe46e15310349c474bca4553c0f829620e53e3bf - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk - -define Package/e2guardian - SECTION:=net - DEPENDS:=+libpthread $(CXX_DEPENDS) +zlib +libpcre - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=E2Guardian - URL:=http://e2guardian.org/cms/ -endef - -define Package/e2guardian/conffiles -/etc/e2guardian/e2guardianf1.conf -/etc/config/e2guardian -endef - -CONFIGURE_VARS += \ - INCLUDES="" \ - CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \ - LIBS="-lpthread" - -CONFIGURE_ARGS += \ - --with-sysconfsubdir=e2guardian \ - --with-proxyuser=nobody \ - --with-proxygroup=nogroup \ - --enable-pcre=yes \ - --with-piddir=/tmp/e2guardian/ \ - --enable-sslextralists=no \ - --enable-sslmitm=no - -define Build/Configure - ( cd $(PKG_BUILD_DIR); ./autogen.sh ) - $(call Build/Configure/Default,$CONFIGURE_ARGS) -endef - -define Package/e2guardian/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2guardian $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/e2guardian $(1)/etc/ - $(INSTALL_CONF) ./files/e2guardianf1.conf $(1)/etc/e2guardian/e2guardianf1.conf - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/e2guardian.config $(1)/etc/config/e2guardian - - $(INSTALL_DIR) $(1)/usr/share/e2guardian - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/e2guardian/transparent1x1.gif $(1)/usr/share/e2guardian/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/e2guardian/blockedflash.swf $(1)/usr/share/e2guardian/ - - $(INSTALL_DIR) $(1)/usr/share/e2guardian/languages/ukenglish - $(CP) $(PKG_INSTALL_DIR)/usr/share/e2guardian/languages/ukenglish/* $(1)/usr/share/e2guardian/languages/ukenglish/ - - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/e2guardian.init $(1)/etc/init.d/e2guardian -endef - -$(eval $(call BuildPackage,e2guardian)) diff --git a/net/e2guardian/files/e2guardian.config b/net/e2guardian/files/e2guardian.config deleted file mode 100644 index a8761513..00000000 --- a/net/e2guardian/files/e2guardian.config +++ /dev/null @@ -1,69 +0,0 @@ -config e2guardian 'e2guardian' - option languagedir '/usr/share/e2guardian/languages' - option language 'ukenglish' - option loglevel '2' - option logexceptionhits '2' - option logfileformat '1' - option loglocation '/var/log/e2guardian/access.log' - option maxuploadsize '-1' - option filterports '8080' - option proxyip '127.0.0.1' - option proxyport '3128' - option proxytimeout '20' - option proxyexchange '20' - option pcontimeout '55' - option accessdeniedaddress 'http://YOURSERVER.YOURDOMAIN/cgi-bin/e2guardian.pl' - option usecustombannedimage 'on' - option custombannedimagefile '/usr/share/e2guardian/transparent1x1.gif' - option usecustombannedflash 'on' - option custombannedflashfile '/usr/share/e2guardian/blockedflash.swf' - option filtergroups '1' - option filtergroupslist '/etc/e2guardian/lists/filtergroupslist' - option bannediplist '/etc/e2guardian/lists/bannediplist' - option exceptioniplist '/etc/e2guardian/lists/exceptioniplist' - option perroomdirectory '/etc/e2guardian/lists/bannedrooms/' - option showweightedfound 'on' - option weightedphrasemode '2' - option urlcachenumber '1000' - option urlcacheage '900' - option scancleancache 'on' - option phrasefiltermode '2' - option preservecase '0' - option hexdecodecontent 'off' - option forcequicksearch 'off' - option reverseaddresslookups 'off' - option reverseclientiplookups 'off' - option logclienthostnames 'off' - option createlistcachefiles 'on' - option prefercachedlists 'off' - option maxcontentfiltersize '256' - option maxcontentramcachescansize '2000' - option maxcontentfilecachescansize '20000' - option filecachedir '/tmp' - option deletedownloadedtempfiles 'on' - option initialtrickledelay '20' - option trickledelay '10' - option downloadmanager '/etc/e2guardian/downloadmanagers/fancy.conf' - option downloadmanager '/etc/e2guardian/downloadmanagers/default.conf' - option contentscannertimeout '60' - option contentscanexceptions 'off' - option recheckreplacedurls 'off' - option forwardedfor 'off' - option usexforwardedfor 'off' - option logconnectionhandlingerrors 'on' - option logchildprocesshandling 'off' - option maxchildren '180' - option minchildren '20' - option minsparechildren '16' - option preforkchildren '10' - option maxsparechildren '32' - option maxagechildren '500' - option maxips '0' - option ipcfilename '/tmp/.dguardianipc' - option urlipcfilename '/tmp/.dguardianurlipc' - option ipipcfilename '/tmp/.dguardianipipc' - option nodaemon 'off' - option nologger 'off' - option logadblocks 'off' - option loguseragent 'off' - option softrestart 'off' diff --git a/net/e2guardian/files/e2guardian.init b/net/e2guardian/files/e2guardian.init deleted file mode 100644 index 4a5981e8..00000000 --- a/net/e2guardian/files/e2guardian.init +++ /dev/null @@ -1,212 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/usr/sbin/e2guardian -CONFIGFILE="/tmp/e2guardian/e2guardian.conf" -LOGFILE="/tmp/e2guardian/access.log" -GROUPCONFIG="/tmp/e2guardian/e2guardianf1.conf" - -validate_e2guardian_section() { - uci_validate_section e2guardian e2guardian "${1}" \ - 'accessdeniedaddress:string' \ - 'bannediplist:string' \ - 'contentscanexceptions:string' \ - 'contentscanner:string' \ - 'contentscannertimeout:uinteger' \ - 'createlistcachefiles:string' \ - 'custombannedflashfile:string' \ - 'custombannedimagefile:string' \ - 'deletedownloadedtempfiles:string' \ - 'downloadmanager:string' \ - 'exceptioniplist:string' \ - 'filecachedir:string' \ - 'filtergroups:uinteger' \ - 'filtergroupslist:string' \ - 'filterip:ipaddr' \ - 'filterports:port:8080' \ - 'forcequicksearch:string' \ - 'forwardedfor:string' \ - 'hexdecodecontent:string' \ - 'initialtrickledelay:uinteger' \ - 'ipcfilename:string' \ - 'ipipcfilename:string' \ - 'languagedir:string' \ - 'language:string' \ - 'logadblocks:string' \ - 'logchildprocesshandling:string' \ - 'logclienthostnames:string' \ - 'logconnectionhandlingerrors:string' \ - 'logexceptionhits:range(0,2)' \ - 'logfileformat:range(1,6)' \ - 'loglevel:range(0,3)' \ - 'loglocation:string' \ - 'loguseragent:string' \ - 'maxagechildren:uinteger' \ - 'maxchildren:uinteger' \ - 'maxcontentfilecachescansize:uinteger' \ - 'maxcontentfiltersize:uinteger' \ - 'maxcontentramcachescansize:uinteger' \ - 'maxips:uinteger' \ - 'maxsparechildren:uinteger' \ - 'maxuploadsize:integer' \ - 'minchildren:uinteger' \ - 'minsparechildren:uinteger' \ - 'nodaemon:string' \ - 'nologger:string' \ - 'pcontimeout:range(5,300)' \ - 'perroomdirectory:string' \ - 'phrasefiltermode:range(0,3)' \ - 'prefercachedlists:string' \ - 'preforkchildren:uinteger' \ - 'preservecase:range(0,2)' \ - 'proxyexchange:range(20,300)' \ - 'proxyip:ipaddr' \ - 'proxyport:port:3128' \ - 'proxytimeout:range(5,100)' \ - 'recheckreplacedurls:string' \ - 'reverseaddresslookups:string' \ - 'reverseclientiplookups:string' \ - 'scancleancache:string' \ - 'showweightedfound:string' \ - 'softrestart:string' \ - 'trickledelay:uinteger' \ - 'urlcacheage:uinteger' \ - 'urlcachenumber:uinteger' \ - 'urlipcfilename:string' \ - 'usecustombannedflash:string' \ - 'usecustombannedimage:string' \ - 'usexforwardedfor:string' \ - 'weightedphrasemode:range(0,2)' -} - -start_service() { - - local accessdeniedaddress bannediplist contentscanexceptions contentscanner contentscannertimeout \ - createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \ - downloadmanager exceptioniplist filecachedir loglocation \ - filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \ - initialtrickledelay ipcfilename ipipcfilename language languagedir logadblocks logchildprocesshandling \ - logclienthostnames logconnectionhandlingerrors logexceptionhits logfileformat loglevel loguseragent \ - maxagechildren maxchildren maxcontentfilecachescansize maxcontentfiltersize maxcontentramcachescansize \ - maxips maxsparechildren maxuploadsize minchildren minsparechildren nodaemon nologger \ - pcontimeout perroomdirectory phrasefiltermode prefercachedlists preforkchildren preservecase proxyexchange \ - proxyip proxyport proxytimeout recheckreplacedurls reverseaddresslookups reverseclientiplookups scancleancache \ - showweightedfound softrestart trickledelay urlcacheage urlcachenumber urlipcfilename usecustombannedflash \ - usecustombannedimage usexforwardedfor weightedphrasemode - - validate_e2guardian_section e2guardian || { - echo "validation failed" - return 1 - } - - mkdir -p $(dirname $CONFIGFILE) - chown -R nobody:nogroup $(dirname $CONFIGFILE) - - mkdir -p $(dirname $loglocation) - chown -R nobody:nogroup $(dirname $loglocation) - - touch $loglocation - chown nobody:nogroup $loglocation - - ln -sf $loglocation $(dirname $LOGFILE) - ln -sf /etc/e2guardian/e2guardian.conf $CONFIGFILE - ln -sf /etc/e2guardian/e2guardianf1.conf $GROUPCONFIG - - echo "accessdeniedaddress = " $accessdeniedaddress > $CONFIGFILE - echo "bannediplist = " $bannediplist >> $CONFIGFILE - - if [ "$contentscanner" != "" ] - then - echo "contentscanner = " $contentscanner >> $CONFIGFILE - fi - - echo "contentscanexceptions = " $contentscanexceptions >> $CONFIGFILE - echo "contentscannertimeout = " $contentscannertimeout >> $CONFIGFILE - echo "createlistcachefiles = " $createlistcachefiles >> $CONFIGFILE - echo "custombannedflashfile = " $custombannedflashfile >> $CONFIGFILE - echo "custombannedimagefile = " $custombannedimagefile >> $CONFIGFILE - echo "deletedownloadedtempfiles = " $deletedownloadedtempfiles >> $CONFIGFILE - echo "downloadmanager = " $downloadmanager >> $CONFIGFILE - echo "exceptioniplist = " $exceptioniplist >> $CONFIGFILE - echo "filecachedir = " $filecachedir >> $CONFIGFILE - echo "filtergroups = " $filtergroups >> $CONFIGFILE - echo "filtergroupslist = " $filtergroupslist >> $CONFIGFILE - echo "filterip = " $filterip >> $CONFIGFILE - echo "filterports = " $filterports >> $CONFIGFILE - echo "forcequicksearch = " $forcequicksearch >> $CONFIGFILE - echo "forwardedfor = " $forwardedfor >> $CONFIGFILE - echo "hexdecodecontent = " $hexdecodecontent >> $CONFIGFILE - echo "initialtrickledelay = " $initialtrickledelay >> $CONFIGFILE - echo "ipcfilename = " $ipcfilename >> $CONFIGFILE - echo "ipipcfilename = " $ipipcfilename >> $CONFIGFILE - echo "language = " $language >> $CONFIGFILE - echo "languagedir = " $languagedir >> $CONFIGFILE - echo "logadblocks = " $logadblocks >> $CONFIGFILE - echo "logchildprocesshandling = " $logchildprocesshandling >> $CONFIGFILE - echo "logclienthostnames = " $logclienthostnames >> $CONFIGFILE - echo "logconnectionhandlingerrors = " $logconnectionhandlingerrors >> $CONFIGFILE - echo "logexceptionhits = " $logexceptionhits >> $CONFIGFILE - echo "logfileformat = " $logfileformat >> $CONFIGFILE - echo "loglevel = " $loglevel >> $CONFIGFILE - echo "loglocation = " $loglocation >> $CONFIGFILE - echo "loguseragent = " $loguseragent >> $CONFIGFILE - echo "maxagechildren = " $maxagechildren >> $CONFIGFILE - echo "maxchildren = " $maxchildren >> $CONFIGFILE - echo "maxcontentfilecachescansize = " $maxcontentfilecachescansize >> $CONFIGFILE - echo "maxcontentfiltersize = " $maxcontentfiltersize >> $CONFIGFILE - echo "maxcontentramcachescansize = " $maxcontentramcachescansize >> $CONFIGFILE - echo "maxips = " $maxips >> $CONFIGFILE - echo "maxsparechildren = " $maxsparechildren >> $CONFIGFILE - echo "maxuploadsize = " $maxuploadsize >> $CONFIGFILE - echo "minchildren = " $minchildren >> $CONFIGFILE - echo "minsparechildren = " $minsparechildren >> $CONFIGFILE - echo "nodaemon = " $nodaemon >> $CONFIGFILE - echo "nologger = " $nologger >> $CONFIGFILE - echo "pcontimeout = " $pcontimeout >> $CONFIGFILE - echo "perroomdirectory = " $perroomdirectory >> $CONFIGFILE - echo "phrasefiltermode = " $phrasefiltermode >> $CONFIGFILE - echo "prefercachedlists = " $prefercachedlists >> $CONFIGFILE - echo "preforkchildren = " $preforkchildren >> $CONFIGFILE - echo "preservecase = " $preservecase >> $CONFIGFILE - echo "proxyexchange = " $proxyexchange >> $CONFIGFILE - echo "proxyip = " $proxyip >> $CONFIGFILE - echo "proxyport = " $proxyport >> $CONFIGFILE - echo "proxytimeout = " $proxytimeout >> $CONFIGFILE - echo "recheckreplacedurls = " $recheckreplacedurls >> $CONFIGFILE - echo "reverseaddresslookups = " $reverseaddresslookups >> $CONFIGFILE - echo "reverseclientiplookups = " $reverseclientiplookups >> $CONFIGFILE - echo "scancleancache = " $scancleancache >> $CONFIGFILE - echo "showweightedfound = " $showweightedfound >> $CONFIGFILE - echo "softrestart = " $softrestart >> $CONFIGFILE - echo "trickledelay = " $trickledelay >> $CONFIGFILE - echo "urlcacheage = " $urlcacheage >> $CONFIGFILE - echo "urlcachenumber = " $urlcachenumber >> $CONFIGFILE - echo "urlipcfilename = " $urlipcfilename >> $CONFIGFILE - echo "usecustombannedflash = " $usecustombannedflash >> $CONFIGFILE - echo "usecustombannedimage = " $usecustombannedimage >> $CONFIGFILE - echo "usexforwardedfor = " $usexforwardedfor >> $CONFIGFILE - echo "weightedphrasemode = " $weightedphrasemode >> $CONFIGFILE - - procd_open_instance - procd_set_param command $PROG -c $CONFIGFILE - procd_set_param file $CONFIGFILE - procd_close_instance - -} - -stop_service() -{ - PID=`cat /tmp/e2guardian/e2guardian.pid` - kill $PID - rm -f /tmp/e2guardian/e2guardian.pid -} - -service_triggers() -{ - procd_add_reload_trigger "e2guardian" - procd_add_validation validate_e2guardian_section -} diff --git a/net/e2guardian/files/e2guardianf1.conf b/net/e2guardian/files/e2guardianf1.conf deleted file mode 100644 index c4b821fc..00000000 --- a/net/e2guardian/files/e2guardianf1.conf +++ /dev/null @@ -1,430 +0,0 @@ -# e2guardian filter group config file for version 3.1.2 - - -# Filter group mode -# This option determines whether members of this group have their web access -# unfiltered, filtered, or banned. -# -# 0 = banned -# 1 = filtered -# 2 = unfiltered (exception) -# -# Only filter groups with a mode of 1 need to define phrase, URL, site, extension, -# mimetype and PICS lists; in other modes, these options are ignored to conserve -# memory. -# -# Defaults to 0 if unspecified. -# Unauthenticated users are treated as being in the first filter group. -groupmode = 1 - -# Filter group name -# Used to fill in the -FILTERGROUP- placeholder in the HTML template file, and to -# name the group in the access logs -# Defaults to empty string -#groupname = '' -groupname = '' - -# Content filtering files location -bannedphraselist = '/etc/e2guardian/lists/bannedphraselist' -weightedphraselist = '/etc/e2guardian/lists/weightedphraselist' -exceptionphraselist = '/etc/e2guardian/lists/exceptionphraselist' -bannedsitelist = '/etc/e2guardian/lists/bannedsitelist' -greysitelist = '/etc/e2guardian/lists/greysitelist' -bannedsslsitelist = '/etc/e2guardian/lists/bannedsslsitelist' -greysslsitelist = '/etc/e2guardian/lists/greysslsitelist' -exceptionsitelist = '/etc/e2guardian/lists/exceptionsitelist' -bannedurllist = '/etc/e2guardian/lists/bannedurllist' -greyurllist = '/etc/e2guardian/lists/greyurllist' -exceptionurllist = '/etc/e2guardian/lists/exceptionurllist' -exceptionregexpurllist = '/etc/e2guardian/lists/exceptionregexpurllist' -bannedregexpurllist = '/etc/e2guardian/lists/bannedregexpurllist' -picsfile = '/etc/e2guardian/lists/pics' -contentregexplist = '/etc/e2guardian/lists/contentregexplist' -urlregexplist = '/etc/e2guardian/lists/urlregexplist' -refererexceptionsitelist = '/etc/e2guardian/lists/refererexceptionsitelist' -refererexceptionurllist = '/etc/e2guardian/lists/refererexceptionurllist' -embededreferersitelist = '/etc/e2guardian/lists/embededreferersitelist' -embededrefererurllist = '/etc/e2guardian/lists/embededrefererurllist' -urlredirectregexplist = '/etc/e2guardian/lists/urlredirectregexplist' - -# local versions of lists (where LOCAL_LISTS enabled) -#localbannedsitelist = '/etc/e2guardian/lists/localbannedsitelist' -#localgreysitelist = '/etc/e2guardian/lists/localgreysitelist' -#localexceptionsitelist = '/etc/e2guardian/lists/localexceptionsitelist' -#localbannedurllist = '/etc/e2guardian/lists/localbannedurllist' -#localgreyurllist = '/etc/e2guardian/lists/localgreyurllist' -#localexceptionurllist = '/etc/e2guardian/lists/localexceptionurllist' -#localbannedsslsitelist = '/etc/e2guardian/lists/localbannedsslsitelist' -#localgreysslsitelist = '/etc/e2guardian/lists/localgreysslsitelist' -#localbannedsearchlist = '/etc/e2guardian/lists/localbannedsearchlist' - -!! Not compiled !! authexceptionsitelist = '/etc/e2guardian/lists/authexceptionsitelist' -!! Not compiled !! authexceptionurllist = '/etc/e2guardian/lists/authexceptionurllist' - -# Filetype filtering -# -# Allow bannedregexpurllist with grey list mode -# bannedregexpheaderlist and bannedregexpurllist -# -# bannedregexwithblanketblock = off -# -# Blanket download blocking -# If enabled, all files will be blocked, unless they match the -# exceptionextensionlist or exceptionmimetypelist. -# These lists do not override virus scanning. -# Exception lists defined above override all types of filtering, including -# the blanket download block. -# Defaults to disabled. -# (on | off) -# -blockdownloads = off -exceptionextensionlist = '/etc/e2guardian/lists/exceptionextensionlist' -exceptionmimetypelist = '/etc/e2guardian/lists/exceptionmimetypelist' -# -# Use the following lists to block specific kinds of file downloads. -# The two exception lists above can be used to override these. -# -bannedextensionlist = '/etc/e2guardian/lists/bannedextensionlist' -bannedmimetypelist = '/etc/e2guardian/lists/bannedmimetypelist' -# -# In either file filtering mode, the following list can be used to override -# MIME type & extension blocks for particular domains & URLs (trusted download sites). -# -exceptionfilesitelist = '/etc/e2guardian/lists/exceptionfilesitelist' -exceptionfileurllist = '/etc/e2guardian/lists/exceptionfileurllist' - -# POST protection (web upload and forms) -# does not block forms without any file upload, i.e. this is just for -# blocking or limiting uploads -# measured in kibibytes after MIME encoding and header bumph -# use 0 for a complete block -# use higher (e.g. 512 = 512Kbytes) for limiting -# use -1 for no blocking -#maxuploadsize = 512 -#maxuploadsize = 0 -maxuploadsize = -1 - -# Categorise without blocking: -# Supply categorised lists here and the category string shall be logged against -# matching requests, but matching these lists does not perform any filtering -# action. -#logsitelist = '/etc/e2guardian/lists/logsitelist' -#logurllist = '/etc/e2guardian/lists/logurllist' -#logregexpurllist = '/etc/e2guardian/lists/logregexpurllist' - -# Outgoing HTTP header rules: -# Optional lists for blocking based on, and modification of, outgoing HTTP -# request headers. Format for headerregexplist is one modification rule per -# line, similar to content/URL modifications. Format for -# bannedregexpheaderlist is one regular expression per line, with matching -# headers causing a request to be blocked. -# Headers are matched/replaced on a line-by-line basis, not as a contiguous -# block. -# Use for example, to remove cookies or prevent certain user-agents. -headerregexplist = '/etc/e2guardian/lists/headerregexplist' -bannedregexpheaderlist = '/etc/e2guardian/lists/bannedregexpheaderlist' -addheaderregexplist = '/etc/e2guardian/lists/addheaderregexplist' - -# Weighted phrase mode -# Optional; overrides the weightedphrasemode option in e2guardian.conf -# for this particular group. See documentation for supported values in -# that file. -#weightedphrasemode = 0 - -# Naughtiness limit -# This the limit over which the page will be blocked. Each weighted phrase is given -# a value either positive or negative and the values added up. Phrases to do with -# good subjects will have negative values, and bad subjects will have positive -# values. See the weightedphraselist file for examples. -# As a guide: -# 50 is for young children, 100 for old children, 160 for young adults. -naughtynesslimit = 50 - -# Search term blocking -# Search terms can be extracted from search URLs and filtered using one or -# both of two different methods. - -# Method 1 is that developed by Protex where specific -# search terms are contained in a bannedsearchlist. -# (localbannedsearchlist and bannedsearchoveridelist can be used to suppliment -# and overide this list as required.) -# These lists contain banned search words combinations on each line. -# Words are separated by '+' and must be in sorted order within a line. -# so to block 'sexy girl' then the list must contain the line -# girl+sexy -# and this will block both 'sexy girl' and 'girl sexy' -# To use this method, the searchregexplist must be enabled and the bannedsearchlist(s) defined - -# Method 2 is uses the -# bannedphraselist, weightedphraselist and exceptionphraselist, with a separate -# threshold for blocking than that used for normal page content. -# To do this, the searchregexplist must be enabled and searchtermlimit -# must be grater than 0. - -# -# Search engine regular expression list (need for both options) -# List of regular expressions for matching search engine URLs. It is assumed -# that the search terms themselves will be contained in the -# of output of each expression. -#searchregexplist = '/etc/e2guardian/lists/searchregexplist' -# -# Banned Search Term list(s) for option 1 -#bannedsearchlist = '/etc/e2guardian/lists/bannedsearchlist' -#bannedsearchoveridelist = '/etc/e2guardian/lists/bannedsearchoveridelist' - - -# Search term limit (for Option 2) -# The limit over which requests will be blocked for containing search terms -# which match the weightedphraselist. This should usually be lower than the -# 'naughtynesslimit' value above, because the amount of text being filtered -# is only a few words, rather than a whole page. -# This option must be uncommented if searchregexplist is uncommented. -# A value of 0 here indicates that search terms should be extracted, -# but no phrase filtering should be performed on the resulting text. -#searchtermlimit = 0 -# -# Search term phrase lists (for Option 2) -# If the three lines below are uncommented, search term blocking will use -# the banned, weighted & exception phrases from these lists, instead of using -# the same phrase lists as for page content. This is optional but recommended, -# as weights for individual phrases in the "normal" lists may not be -# appropriate for blocking when those phrases appear in a much smaller block -# of text. -# Please note that all or none of the below should be uncommented, not a -# mixture. -#bannedsearchtermlist = '/etc/e2guardian/lists/bannedsearchtermlist' -#weightedsearchtermlist = '/etc/e2guardian/lists/weightedsearchtermlist' -#exceptionsearchtermlist = '/etc/e2guardian/lists/exceptionsearchtermlist' - -# Category display threshold -# This option only applies to pages blocked by weighted phrase filtering. -# Defines the minimum score that must be accumulated within a particular -# category in order for it to show up on the block pages' category list. -# All categories under which the page scores positively will be logged; those -# that were not displayed to the user appear in brackets. -# -# -1 = display only the highest scoring category -# 0 = display all categories (default) -# > 0 = minimum score for a category to be displayed -categorydisplaythreshold = 0 - -# Embedded URL weighting -# When set to something greater than zero, this option causes URLs embedded within a -# page's HTML (from links, image tags, etc.) to be extracted and checked against the -# bannedsitelist and bannedurllist. Each link to a banned page causes the amount set -# here to be added to the page's weighting. -# The behaviour of this option with regards to multiple occurrences of a site/URL is -# affected by the weightedphrasemode setting. -# -# NB: Currently, this feature uses regular expressions that require the PCRE library. -# As such, it is only available if you compiled DansGuardian with '--enable-pcre=yes'. -# You can check compile-time options by running 'e2guardian -v'. -# -# Set to 0 to disable. -# Defaults to 0. -# WARNING: This option is highly CPU intensive! -embeddedurlweight = 0 - -# Enable PICS rating support -# -# Defaults to disabled -# (on | off) -enablepics = off - -# Temporary Denied Page Bypass -# This provides a link on the denied page to bypass the ban for a few minutes. To be -# secure it uses a random hashed secret generated at daemon startup. You define the -# number of seconds the bypass will function for before the deny will appear again. -# To allow the link on the denied page to appear you will need to edit the template.html -# or e2guardian.pl file for your language. -# 300 = enable for 5 minutes -# 0 = disable ( defaults to 0 ) -# -1 = enable but you require a separate program/CGI to generate a valid link -bypass = 0 - -# Temporary Denied Page Bypass Secret Key -# Rather than generating a random key you can specify one. It must be more than 8 chars. -# '' = generate a random one (recommended and default) -# 'Mary had a little lamb.' = an example -# '76b42abc1cd0fdcaf6e943dcbc93b826' = an example -bypasskey = '' - -# Infection/Scan Error Bypass -# Similar to the 'bypass' setting, but specifically for bypassing files scanned and found -# to be infected, or files that trigger scanner errors - for example, archive types with -# recognised but unsupported compression schemes, or corrupt archives. -# The option specifies the number of seconds for which the bypass link will be valid. -# 300 = enable for 5 minutes -# 0 = disable (default) -# -1 = enable, but require a separate program/CGI to generate a valid link -infectionbypass = 0 - -# Infection/Scan Error Bypass Secret Key -# Same as the 'bypasskey' option, but used for infection bypass mode. -infectionbypasskey = '' - -# Infection/Scan Error Bypass on Scan Errors Only -# Enable this option to allow infectionbypass links only when virus scanning fails, -# not when a file is found to contain a virus. -# on = enable (default and highly recommended) -# off = disable -infectionbypasserrorsonly = on - -# Disable content scanning -# If you enable this option you will disable content scanning for this group. -# Content scanning primarily is AV scanning (if enabled) but could include -# other types. -# (on|off) default = off. -disablecontentscan = off - -# Enable Deep URL Analysis -# When enabled, DG looks for URLs within URLs, checking against the bannedsitelist and -# bannedurllist. This can be used, for example, to block images originating from banned -# sites from appearing in Google Images search results, as the original URLs are -# embedded in the thumbnail GET requests. -# (on|off) default = off -deepurlanalysis = off - -# reportinglevel -# -# -1 = log, but do not block - Stealth mode -# 0 = just say 'Access Denied' -# 1 = report why but not what denied phrase -# 2 = report fully -# 3 = use HTML template file (accessdeniedaddress ignored) - recommended -# -# If defined, this overrides the global setting in e2guardian.conf for -# members of this filter group. -# -reportinglevel = 3 - -# accessdeniedaddress is the address of your web server to which the cgi -# e2guardian reporting script was copied. Only used in reporting levels -# 1 and 2. -# -# This webserver must be either: -# 1. Non-proxied. Either a machine on the local network, or listed as an -# exception in your browser's proxy configuration. -# 2. Added to the exceptionsitelist. Option 1 is preferable; this option is -# only for users using both transparent proxying and a non-local server -# to host this script. -# -# If defined, this overrides the global setting in e2guardian.conf for -# members of this filter group. -# -#accessdeniedaddress = 'http://YOURSERVER.YOURDOMAIN/cgi-bin/e2guardian.pl' - -# sslaccessdeniedaddress is the address of your web server to which the static page -# e2guardian reporting was copied. Only used in reporting levels 3 (avoid blank page) -# Work only in firefox with ssldeniedrewrite off - -# sslaccessdeniedaddress = 'http://YOURSERVER.YOURDOMAIN/denyssl.htm' - -# Break SSL protocol and redirect to another HTTPS website for denied page (sslaccessdeniedaddress url) - -#ssldeniedrewrite = 'on' - -# HTML Template override -# If defined, this specifies a custom HTML template file for members of this -# filter group, overriding the global setting in e2guardian.conf. This is -# only used in reporting level 3. -# -# The default template file path is //template.h -# e.g. /share/e2guardian/languages/ukenglish/template.html when using 'ukenglish' -# language. -# -# This option generates a file path of the form: -# // -# e.g. /share/e2guardian/languages/ukenglish/custom.html -# -#htmltemplate = 'custom.html' - -# Non standard delimiter (only used with accessdeniedaddress) -# To help preserve the full banned URL, including parameters, the variables -# passed into the access denied CGI are separated using non-standard -# delimiters. This can be useful to ensure correct operation of the filter -# bypass modes. Parameters are split using "::" in place of "&", and "==" in -# place of "=". -# Default is enabled, but to go back to the standard mode, disable it. - -#nonstandarddelimiter = off - -# Email reporting - original patch by J. Gauthier - -# Use SMTP -# If on, will enable system wide events to be reported by email. -# need to configure mail program (see 'mailer' in global config) -# and email recipients -# default usesmtp = off -#!! Not compiled !!usesmtp = off - -# mailfrom -# who the email would come from -# example: mailfrom = 'e2guardian@mycompany.com' -#!! Not compiled !!mailfrom = '' - -# avadmin -# who the virus emails go to (if notify av is on) -# example: avadmin = 'admin@mycompany.com' -#!! Not compiled !!avadmin = '' - -# contentdmin -# who the content emails go to (when thresholds are exceeded) -# and contentnotify is on -# example: contentadmin = 'admin@mycompany.com' -#!! Not compiled !!contentadmin = '' - -# avsubject -# Subject of the email sent when a virus is caught. -# only applicable if notifyav is on -# default avsubject = 'e2guardian virus block' -#!! Not compiled !!avsubject = 'e2guardian virus block' - -# content -# Subject of the email sent when violation thresholds are exceeded -# default contentsubject = 'e2guardian violation' -#!! Not compiled !!contentsubject = 'e2guardian violation' - -# notifyAV -# This will send a notification, if usesmtp/notifyav is on, any time an -# infection is found. -# Important: If this option is off, viruses will still be recorded like a -# content infraction. -#!! Not compiled !!notifyav = off - -# notifycontent -# This will send a notification, if usesmtp is on, based on thresholds -# below -#!! Not compiled !!notifycontent = off - -# thresholdbyuser -# results are only predictable with user authenticated configs -# if enabled the violation/threshold count is kept track of by the user -#!! Not compiled !!thresholdbyuser = off - -#violations -# number of violations before notification -# setting to 0 will never trigger a notification -#!! Not compiled !!violations = 0 - -#threshold -# this is in seconds. If 'violations' occur in 'threshold' seconds, then -# a notification is made. -# if this is set to 0, then whenever the set number of violations are made a -# notifaction will be sent. -#!! Not compiled !!threshold = 0 - -#SSL certificate checking -# Check that ssl certificates for servers on https connections are valid -# and signed by a ca in the configured path -sslcertcheck = off - -#SSL man in the middle -# Forge ssl certificates for all non-exception sites, decrypt the data then re encrypt it -# using a different private key. Used to filter ssl sites -sslmitm = off - -#Limit SSL MITM to sites in greysslsitelist(s) -# ignored if sslmitm is off -# SSL sites not matching greysslsitelist will be treat as if sslmitm is off. -onlymitmsslgrey = off diff --git a/net/esniper/Makefile b/net/esniper/Makefile index 87d1f068..d159ffd2 100644 --- a/net/esniper/Makefile +++ b/net/esniper/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 Thomas Weißschuh +# Copyright (C) 2015-2018 Thomas Weißschuh # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=esniper -PKG_VERSION:=2.32.0 +PKG_VERSION:=2.35.0 PKG_RELEASE:=1 PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=COPYING @@ -19,7 +19,7 @@ VERSION_TRANSFORMED:=$(subst .,-,$(PKG_VERSION)) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(VERSION_TRANSFORMED) PKG_SOURCE:=$(PKG_NAME)-$(VERSION_TRANSFORMED).tgz PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=5ee3e5237c6a12059ae9d38380505d38448c2c12787f9fcc603cdb0a1a519312 +PKG_HASH:=a93d4533e31640554f2e430ac76b43e73a50ed6d721511066020712ac8923c12 PKG_BUILD_PARALLEL:=1 diff --git a/net/etesync-server/Makefile b/net/etesync-server/Makefile new file mode 100644 index 00000000..0e05d375 --- /dev/null +++ b/net/etesync-server/Makefile @@ -0,0 +1,108 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=etesync-server +PKG_VERSION:=0.3.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=etesync-server-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/etesync/server/archive/v$(PKG_VERSION) +PKG_HASH:=d0728effa898a8b7afb4ce7439e0d0fd46bc819008925f21788d7e113435b579 + +PKG_LICENSE:=AGPL-3.0-only +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Peter Stadler + +PKG_BUILD_PARALLEL:=1 +PYTHON3_PKG_BUILD:=0 + +PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +include $(INCLUDE_DIR)/package.mk +include ../../lang/python/python3-package.mk + + +define Package/etesync-server + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=End-to-End Encrypted Secure Data Sync + URL:=https://www.etesync.com/ + DEPENDS:=+nginx-ssl +python3-light +python3-django \ + +python3-django-restframework +python3-drf-nested-routers \ + +python3-django-cors-headers +python3-django-etesync-journal \ + +uwsgi +uwsgi-python3-plugin +uwsgi-syslog-plugin + USERID:=etesync=44312 +endef + + +define Package/etesync-server/description + End-to-End Encrypted Secure Data Sync +endef + + +Build/Compile:=: + + +define Py3Package/etesync-server/install + $(INSTALL_DIR) $(1)/www/etesync/static/ + + $(INSTALL_DIR) $(1)/etc/uci-defaults/ + $(CP) ./files/81_setup-etesync-server $(1)/etc/uci-defaults/ + + $(INSTALL_DIR) $(1)/etc/nginx/conf.d/ + $(INSTALL_CONF) ./files/etesync.locations $(1)/etc/nginx/conf.d/ + + $(INSTALL_DIR) $(1)/etc/config/ + $(INSTALL_CONF) ./files/uci.cfg $(1)/etc/config/etesync_server + + $(INSTALL_DIR) $(1)/usr/share/etesync-server/templates/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/templates/* \ + $(1)/usr/share/etesync-server/templates/ + + $(INSTALL_DIR) $(1)/usr/share/etesync-server/etesync_server/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/manage.py \ + $(1)/usr/share/etesync-server/ + + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etesync_server/* \ + $(1)/usr/share/etesync-server/etesync_server/ + + $(LN) /var/etc/etesync-server/etesync-server.ini \ + $(1)/usr/share/etesync-server/ + #init creates /var/etc/etesync-server/etesync-server.ini from uci.cfg + + $(INSTALL_DIR) $(1)/etc/uwsgi/vassals/ + $(INSTALL_CONF) ./files/uwsgi.ini \ + $(1)/etc/uwsgi/vassals/etesync-server.available + + $(LN) /var/etc/etesync-server/uwsgi.ini \ + $(1)/etc/uwsgi/vassals/etesync-server.ini + #init links etesync-server.available /var/etc/etesync-server/uwsgi.ini + + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/uwsgi.init $(1)/etc/init.d/etesync-server +endef + +Py3Package/etesync-server/filespec:= + + +define Package/etesync-server/postrm +#!/bin/sh +[ -n "$${IPKG_INSTROOT}" ] && exit 0 +rmdir /usr/share/etesync-server/etesync_server +[ "$${PKG_UPGRADE}" = "1" ] && exit 0 +rm -r /www/etesync/static +rmdir /www/etesync +exit 0 +endef + + +define Package/etesync-server/conffiles +/etc/config/etesync_server +/etc/nginx/conf.d/etesync.locations +/etc/uwsgi/vassals/etesync-server.available +endef + + +$(eval $(call Py3Package,etesync-server)) +$(eval $(call BuildPackage,etesync-server)) +$(eval $(call BuildPackage,etesync-server-src)) diff --git a/net/etesync-server/files/81_setup-etesync-server b/net/etesync-server/files/81_setup-etesync-server new file mode 100644 index 00000000..b2f6911a --- /dev/null +++ b/net/etesync-server/files/81_setup-etesync-server @@ -0,0 +1,56 @@ +#!/bin/sh + +[ "${PKG_UPGRADE}" = "1" ] && /etc/init.d/etesync-server stop + +cd /usr/share/etesync-server || exit 1 + +python3 manage.pyc migrate --noinput || exit 1 + +# setup minimal ini for collectstatic: +mkdir -p /var/etc/etesync-server/ || exit 1 +printf "[global]\nSTATIC_ROOT=/www/etesync/static" >etesync-server.ini || exit 1 +python3 manage.pyc collectstatic --noinput || exit 1 + +ETESYNC_HAS_USER_PY3CMD="import sqlite3 +c = sqlite3.connect('db.sqlite3').cursor() +c.execute('select * from auth_user') +if c.fetchone()==None: print('0') +else: print('1')" + +echo + +if [ "$(python3 -c "$ETESYNC_HAS_USER_PY3CMD" || exit 1)" = "0" ] +then + echo "===== First, create a superuser of the Webinterface by =====" + [ -t 0 ] && python3 manage.pyc createsuperuser || + echo "===== python3 $(pwd)/manage.pyc createsuperuser =====" +fi + +chown -Rh etesync:nogroup . /www/etesync/ || exit 1 + +[ -x /etc/init.d/nginx ] || exit 1 + +/etc/init.d/nginx running && /etc/init.d/nginx reload || /etc/init.d/nginx start + +router_ip() { + local ifstat="$(ifstatus "lan")" + + for ip in $(echo "${ifstat}" | jsonfilter -e '@["ipv4-address"].*.address') + do echo "${ip}" && return + done + + for ip in $(echo "${ifstat}" | jsonfilter -e '@["ipv6-address"].*.address') + do echo "[${ip}]" && return + done + + for ip in $(echo "${ifstat}" | \ + jsonfilter -e '@["ipv6-prefix-assignment"].*["local-address"].address') + do echo "[${ip}]" && return + done + + echo '$ROUTER' +} + +echo "===== You can add users by https://$(router_ip)/etesync/admin/login =====" + +exit 0 diff --git a/net/etesync-server/files/etesync.locations b/net/etesync-server/files/etesync.locations new file mode 100644 index 00000000..23d9c9f1 --- /dev/null +++ b/net/etesync-server/files/etesync.locations @@ -0,0 +1,13 @@ +location /etesync/static { + access_log off; + error_log /dev/null; + expires 1y; + try_files $uri $uri/ =404; +} + +location /etesync { + access_log off; + error_log /dev/null; + include uwsgi_params; + uwsgi_pass unix:///var/run/etesync-server.socket; +} diff --git a/net/etesync-server/files/uci.cfg b/net/etesync-server/files/uci.cfg new file mode 100644 index 00000000..12fd0f61 --- /dev/null +++ b/net/etesync-server/files/uci.cfg @@ -0,0 +1,13 @@ + +config django 'global' + option static_url '/etesync/static/' # TODO for django 3.1: "static/" + option debug 'false' + +config django 'allowed_hosts' + list uci_allow_all_ips_of 'loopback' + list uci_allow_all_ips_of 'lan' +# list allowed_host "example.com" + +config django 'database' + option engine 'django.db.backends.sqlite3' + option name 'db.sqlite3' diff --git a/net/etesync-server/files/uwsgi.ini b/net/etesync-server/files/uwsgi.ini new file mode 100644 index 00000000..f2754297 --- /dev/null +++ b/net/etesync-server/files/uwsgi.ini @@ -0,0 +1,48 @@ +; The script /etc/init.d/etesync-server creates the second symlink in the +; following chain when starting (and deletes it when stopping the service): +; /etc/uwsgi/vassals/etesync-server.ini (letting the emperor load it on-demand) +; -> /var/etc/etesync-server/uwsgi.ini (in RAM) +; -> /etc/uwsgi/vassals/etesync-server.available (this file) + +[uwsgi] +strict = true + +plugin = python +manage-script-name = true +chdir = /usr/share/etesync-server +mount = /etesync=etesync_server.wsgi:application +pidfile = /var/etc/etesync-server/master.pid + +enable-threads = true +thunder-lock = true +post-buffering = 8192 +harakiri = 60 +lazy-apps = true +master = true +idle = 600 + +plugin = syslog +; disable-logging only affects req-logger: +disable-logging = true +log-format=%(method) %(uri) => return %(status) (%(rsize) bytes in %(msecs) ms) +req-logger = syslog:etesync-server_req + +logger = etesync syslog:etesync-server_main +ignore-sigpipe = true +ignore-write-errors = true + +if-env = UWSGI_EMPEROR_FD +; the regular expression leaves for successful de/activation only one line each: +log-route = etesync ^(?!... Starting uWSGI |compiled with version: |os: Linux|nodename: |machine: |clock source: |pcre jit |detected number of CPU cores: |current working directory: |writing pidfile to |detected binary path: |chdir.. to |your processes number limit is |your memory page size is |detected max file descriptor number: |lock engine: |thunder lock: |uwsgi socket |setgid.. to |setuid.. to |Python version: |Python main interpreter initialized at |python threads support |your server socket listen backlog is limited to |your mercy for graceful operations on workers is |mapped |... Operational MODE: |... uWSGI is running in multiple interpreter mode ...|spawned uWSGI worker |mounting |WSGI app |announcing my loyalty to the Emperor...|workers have been inactive for more than |SIGINT/SIGQUIT received...killing workers...|worker |goodbye to uWSGI.) +end-if = + +if-not-env = UWSGI_EMPEROR_FD +log-route = etesync .* +vacuum = true +socket = /var/run/etesync-server.socket +end-if = + +chmod-socket = 660 +chown-socket = etesync:nogroup +uid = etesync +gid = nogroup diff --git a/net/etesync-server/files/uwsgi.init b/net/etesync-server/files/uwsgi.init new file mode 100644 index 00000000..a7130883 --- /dev/null +++ b/net/etesync-server/files/uwsgi.init @@ -0,0 +1,136 @@ +#!/bin/sh /etc/rc.common + +START=82 + +USE_PROCD=1 + +ETESYNC_INI="/var/etc/etesync-server/etesync-server.ini" + + +etesync_print_uci_allow_all_ips_of() { + local ifstat="$(ifstatus "$1")" + + for ip in $(echo "${ifstat}" | jsonfilter -e '@["ipv4-address"].*.address') + do echo "allowed_host_${ip//[^0-9]/_} = ${ip}" + done + + for ip in $(echo "${ifstat}" | jsonfilter -e '@["ipv6-address"].*.address') + do echo "allowed_host_${ip//[^0-9A-Fa-f]/_} = [${ip}]" + done + + for ip in $(echo "${ifstat}" | \ + jsonfilter -e '@["ipv6-prefix-assignment"].*["local-address"].address') + do echo "allowed_host_${ip//[^0-9A-Fa-f]/_} = [${ip}]" + done +} + + +etesync_validate_global() { + cd /usr/share/etesync-server/ >/dev/null || return + + uci_load_validate etesync_server django "global" "$1" \ + 'secret_file:file:secret.txt' \ + 'static_url:string:/etesync/static' \ + 'language_code:string:en-us' \ + 'time_zone:string:UTC' \ + 'debug:bool:false' \ + ; +} + + +etesync_print_global() { + printf "\n[global]\n" + + echo "secret_file = ${secret_file}" + echo "static_root = /www/etesync/static" #sic! + echo "static_url = ${static_url}" + echo "language_code = ${language_code}" + echo "time_zone = ${time_zone}" + echo "debug = ${debug}" +} + + +etesync_validate_allowed_hosts() { + uci_load_validate etesync_server django "allowed_hosts" "$1" \ + 'uci_allow_all_ips_of:network' \ + 'allowed_host:host' \ + ; +} + + +etesync_print_allowed_hosts() { + printf "\n[allowed_hosts]\n" + + local iface + for iface in ${uci_allow_all_ips_of} + do etesync_print_uci_allow_all_ips_of "${iface}" + done + + local host + for host in ${allowed_host} + do echo "allowed_host_${host//[^0-9A-Za-z]/_} = ${host}" + done +} + + +etesync_validate_database() { + cd /usr/share/etesync-server/ >/dev/null || return + + uci_load_validate etesync_server django "database" "$1" \ + 'engine:hostname:django.db.backends.sqlite3' \ + 'name:file:db.sqlite3' \ + ; +} + + +etesync_print_database() { + printf "\n[database]\n" + + echo "engine = ${engine}" + echo "name = ${name}" +} + + +etesync_init() { # This must print ONLY configuration lines: + echo "; This file is re-created from /etc/config/etesync_server " + etesync_validate_global etesync_print_global + etesync_validate_allowed_hosts etesync_print_allowed_hosts + etesync_validate_database etesync_print_database +} >"${ETESYNC_INI}" + + +start_service() { + mkdir -p /var/etc/etesync-server/ + etesync_init + logger -p 'daemon.info' -t 'etesync-server_init' 'starting ...' + ln -sf /etc/uwsgi/vassals/etesync-server.available \ + /var/etc/etesync-server/uwsgi.ini +} + + +stop_service() { + rm -f /var/etc/etesync-server/uwsgi.ini "${ETESYNC_INI}" +} + + +reload_service() { + etesync_init + logger -p 'daemon.info' -t 'etesync-server_init' 'reloading ...' + kill -SIGHUP "$(cat "/var/etc/etesync-server/master.pid")" 2>/dev/null + #if the server is in on-demand mode, the ini files are reloaded then, too. +} + + +service_triggers() { + procd_open_validate + etesync_validate_global "$@" + etesync_validate_allowed_hosts "$@" + etesync_validate_database "$@" + procd_close_validate + + config_load etesync_server + config_list_foreach "allowed_hosts" "uci_allow_all_ips_of" \ + procd_add_reload_interface_trigger + + procd_add_reload_trigger etesync_server +} diff --git a/net/etherwake-nfqueue/Makefile b/net/etherwake-nfqueue/Makefile new file mode 100644 index 00000000..19897f7a --- /dev/null +++ b/net/etherwake-nfqueue/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2019 Mister Benjamin <144dbspl@gmail.com> +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=etherwake-nfqueue +PKG_RELEASE:=2 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/mister-benjamin/etherwake-nfqueue.git +PKG_SOURCE_DATE:=2019-09-28 +PKG_SOURCE_VERSION:=f71c269b58585e93575fa3e9fcc1793806fb3080 +PKG_MIRROR_HASH:=4960dc592abc4ca06504c92ca09fc736c678353df0dcc32d4081e17b137a9164 + +PKG_MAINTAINER:=Mister Benjamin <144dbspl@gmail.com> +PKG_LICENSE:=GPL-2.0-or-later + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/etherwake-nfqueue + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libnetfilter-queue +iptables-mod-nfqueue + TITLE:=Wake up computers on netfilter match + URL:=https://github.com/mister-benjamin/etherwake-nfqueue +endef + +define Package/etherwake-nfqueue/description + Fork of etherwake with additional support for sending WOL packets + when a router added a filtered packet to an NFQUEUE. +endef + +define Package/etherwake-nfqueue/conffiles +/etc/config/etherwake-nfqueue +endef + +define Package/etherwake-nfqueue/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/etherwake-nfqueue $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,etherwake-nfqueue)) diff --git a/net/etherwake-nfqueue/README.md b/net/etherwake-nfqueue/README.md new file mode 100644 index 00000000..b44ac9ef --- /dev/null +++ b/net/etherwake-nfqueue/README.md @@ -0,0 +1,378 @@ +# OpenWrt package feed for etherwake-nfqueue + + +## Wake up computers on netfilter match + +This repository contains the OpenWrt package feed for +[etherwake-nfqueue](https://github.com/mister-benjamin/etherwake-nfqueue), +a fork of the **etherwake** Wake-on-LAN client, with support to send magic +packets only after a queued packet is received from the Linux *nfnetlink_queue* +subsystem. + +When running **etherwake-nfqueue** on a residential gateway or other type of +router, it can wake up hosts on its network based on packet filtering rules. + +For instance, when your set-top box wants to record a TV programme and +tries to access a network share on your NAS, which is in sleep or standby mode, +**etherwake-nfqueue** can wake up your NAS. Or when you set up port forwarding +to a host on your home network, **etherwake-nfqueue** can wake up your host +when you try to access it over the Internet. + +The documentation below is mostly OpenWrt specific. For more information on +etherwake-nfqueue itself and use case examples, please consult its +[Readme](https://github.com/mister-benjamin/etherwake-nfqueue/blob/master/README.md). + + +## Building the package + +Currently, no pre-built packages are provided. The following assumes that you +already have a working OpenWrt build system for your target device. + +If you haven't, you can follow one of these guides: + +* If you only want to compile packages, and no firmware image: + [Build system – Installation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) and + [Using the SDK](https://openwrt.org/docs/guide-developer/using_the_sdk) + +* To quickly build a firmware image off a development snapshot: + [Quick Image Building Guide](https://openwrt.org/docs/guide-developer/quickstart-build-images) + +* Or when you are completely new to using build systems: + [Beginners guide to building your own firmware](https://openwrt.org/docs/guide-user/additional-software/beginners-build-guide) + +### Dependencies + +**etherwake-nfqueue** depends on these OpenWrt packages: + +* libnetfilter-queue +* iptables-mod-nfqueue + +They will be automatically selected and compiled for you. If they are not +installed on your target device, *opkg* will try to resolve dependencies with +packages in the repositories. + +### Adding the package feed + +First, you need to add the **etherwake-nfqueue** package feed to your build +system. In the root directory of your OpenWrt build system, find the file +*feeds.conf* (or *feeds.conf.default* if the former shouldn't exist) and add +the following line to it: + +``` +src-git ethernfq https://github.com/mister-benjamin/etherwake-nfqueue-openwrt.git +``` + +Then update and install the package feed: +``` +user@host:~/openwrt$ scripts/feeds update ethernfq +user@host:~/openwrt$ scripts/feeds install -a -p ethernfq +``` + +After that, enter OpenWrt's configuration menu +``` +user@host:~/openwrt$ make menuconfig +``` +and enable **etherwake-nfqueue** in the **Network** sub-menu. It can either be selected +as built-in (\*) or module (M), depending on your decision to include it into a +firmware image or just build the *opkg* package for installation. + +Then you should be able to compile the package: +``` +user@host:~/openwrt$ make package/etherwake-nfqueue/compile +``` + +The path of the resulting package depends on your selected *Target System*. +In case of the Linksys WRT1200AC, it can be found here: +``` +bin/packages/arm_cortex-a9_vfpv3/ethernfq/etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk +``` + + +## Installation + +One way to install the package is by simply copying it over to the device with *scp*: +``` +user@host:~$ scp etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk root@gateway:~ +``` +And then, install it on the device: +``` +root@gateway:~# opkg install etherwake-nfqueue_2019-09-10-67e9d4ca-1_arm_cortex-a9_vfpv3.ipk +``` + + +## Configuration + +### WoL Targets + +After a fresh installation, no target is configured. Targets are referred +to as the hosts to wake up. Multiple targets can coexist. + +Targets can be configured with OpenWrt's UCI. + +For example, to add a target called **nas**, with MAC address + **00:25:90:00:d5:fd**, which is reachable over the VLAN configured +on **eth0.3**, issue this command sequence on your router: + +``` +uci add etherwake-nfqueue target +uci set etherwake-nfqueue.@target[-1].name=nas +uci set etherwake-nfqueue.@target[-1].mac=00:25:90:00:d5:fd +uci set etherwake-nfqueue.@target[-1].interface=eth0.3 +uci commit +``` + +For each target, one instance of **etherwake-nfqueue** will be started. + +Each instance should bind to a different *nfnetlink_queue*. A queue can +be referenced by its queue number. Counting starts from 0, which is the default. +To use a different queue, provide the **nfqueue_num** option. The +following could have been added to the sequence above to use queue 1 instead +of 0: + +``` +uci set etherwake-nfqueue.@target[-1].nfqueue_num=1 +``` + +The necessity of a queue number will probably become clear, when the iptables +rules are configured in section [Setup firewall rules](#setup-firewall-rules). + +The full list of options for a target is: + +| Option | Required | Description | +| ----------- | -------- | ------------------------------------------------ | +| name | no | Name of the target, e.g. name=example | +| mac | yes | MAC address of the host to wake up, e.g. mac=00:22:44:66:88:aa | +| nfqueue_num | no | The queue number used for receiving filtered packets, default is nfqueue_num=0 | +| interface | no | The interface used for sending the magic packet, default is interface=eth0 | +| broadcast | no | Send magic packet to broadcast address, default is broadcast=off | +| password | no | Set a password (required by some adapters), e.g. password=00:22:44:66:88:aa or 192.168.1.1 | +| enabled | no | Optionally disable the target, default is enabled=true | + +After committing your changes, the settings are persisted to +*/etc/config/etherwake-nfqueue*. This is an illustrative example: +``` +config etherwake-nfqueue 'setup' + option sudo 'off' + option debug 'off' + +config target + option name 'nas' + option mac '00:25:90:00:d5:fd' + option interface 'eth0.3' + +config target + option name 'xyz-board' + option mac '00:25:90:00:d5:fc' + option nfqueue_num '1' + option enabled 'false' + +config target + option name 'ip-camera' + option mac '00:25:90:00:d5:fb' + option nfqueue_num '2' + option interface 'eth0.3' + option broadcast 'on' + option password '00:25:90:00:d5:fb' +``` + +When all target(s) are configured, restart the *etherwake-nfqueue* service: +``` +/etc/init.d/etherwake-nfqueue restart +``` + +### Setting up filters + +Without any firewall rules which tell the kernel to match and add packets +to a *nfnetlink_queue*, **etherwake-nfqueue** will never send out a magic +packet to wake its target. + +#### Prerequisites + +In order to let the *netfilter* framework of the kernel see the packets, +they need to pass through the router. This is usually not the case when +hosts are on the same subnet and don't require network layer routing. +The data will only pass through the router's switch on the link layer. + +As a consequence, we can only use packets as a trigger which need to be +routed or bridged by the router. Packets being forwarded between WAN +and LAN are of that type. For other SOHO use cases, partitioning your +network by means of subnets or VLANs might be necessary. The latter +is often used to set up a DMZ. + +For VLANs: + +* There's a mini howto referring to the **LuCI Web Interface** + *(Network -> Switch)* way of configuring VLANs: + [How-To: Creating an additional virtual switch on a typical home router](https://openwrt.org/docs/guide-user/network/vlan/creating_virtual_switches) + +* The manual approach is documented here: + [VLAN](https://openwrt.org/docs/guide-user/network/vlan/switch_configuration) + +Guides to setup a DMZ can be found here: + +* [Guide to set up DMZ via LUCI](https://forum.openwrt.org/t/guide-to-set-up-dmz-via-luci/21616) + +* [fw3 DMZ Configuration Using VLANs](https://openwrt.org/docs/guide-user/firewall/fw3_configurations/fw3_dmz) + +The physical switch layout is device specific. E.g. the layout for the Linksys +WRT AC Series is documented +[here](https://oldwiki.archive.openwrt.org/toh/linksys/wrt_ac_series#switch_layout). + + +Using two LANs or VLANs with the same network address and bridging them again +is a trick to setup a transparent (or bridging) firewall on the same subnet. +This way, packets can be seen by *netfilter* on the router even if the +packets are not routed. Unfortunately this doesn't help when the host +which we want to wake up is offline, as the ARP requests for the destination +IP address are not answered and thus the client trying to reach out to its +destination will not send any *network layer* packets. We could use *arptables* +instead to wake the host when someone requests its MAC address, but this +would probably happen too often and no fine-grained control would be possible. + +As a workaround, it might be possible to configure a static ARP entry on your +router (untested), e.g. with: +``` +ip neigh add 192.168.0.10 lladdr 00:25:90:00:d5:fd nud permanent dev eth0.3 +``` +Note that this requires the *ip-full* OpenWrt package to be installed. + +To make your firewall rules work with bridging, you need to install the +*kmod-br-netfilter* package and add `net.bridge.bridge-nf-call-iptables=1` +to */etc/sysctl.conf*. + + +#### Setup firewall rules + +One way to setup custom firewall rules in OpenWrt is through its +*/etc/firewall.user* script. This file can also be edited by means of +the **LuCI Web Interface** *(Network -> Firewall -> Custom Rules)*. + +The file is interpreted as a shell script, so we can simply use **iptables** +to add our custom firewall rules. + +Notice the comment +``` +# Internal uci firewall chains are flushed and recreated on reload, so +# put custom rules into the root chains e.g. INPUT or FORWARD or into the +# special user chains, e.g. input_wan_rule or postrouting_lan_rule. +``` + +Refer to [Packet flow](https://oldwiki.archive.openwrt.org/doc/uci/firewall#packet_flow) +for usable chains. In the example below, the chains *forwarding_lan_rule* and +*forwarding_wan_rule* are used. To inspect the rule sets of the different tables, one can +use + +``` +iptables --list # default is --table filter +iptables --table nat --list +iptables --table mangle --list +iptables --table raw --list # requires kmod-ipt-raw +``` + +The following is an example of what could be added to */etc/firewall.user*: + +``` +iptables --insert forwarding_lan_rule\ + --protocol tcp --in-interface=br-lan --out-interface=eth0.3\ + --destination 192.168.0.10 --destination-port 445\ + --match conntrack --ctstate NEW\ + --match limit --limit 3/hour --limit-burst 1\ + --jump NFQUEUE --queue-num 0 --queue-bypass\ + --match comment --comment "Wake up NAS on LAN SMB" +iptables --insert forwarding_lan_rule\ + --protocol tcp --in-interface=br-lan --out-interface=eth0.3\ + --destination 192.168.0.11 --match multiport --destination-ports 515,54921,631\ + --match conntrack --ctstate NEW\ + --match limit --limit 3/hour --limit-burst 1\ + --jump NFQUEUE --queue-num 0 --queue-bypass\ + --match comment --comment "Wake up NAS on print request" +iptables --insert forwarding_lan_rule\ + --protocol udp --in-interface=br-lan --out-interface=eth0.3\ + --destination 192.168.0.11 --destination-port 161\ + --match conntrack --ctstate NEW\ + --match limit --limit 3/hour --limit-burst 1\ + --jump NFQUEUE --queue-num 0 --queue-bypass\ + --match comment --comment "Wake up NAS on print request" +iptables --insert forwarding_wan_rule\ + --protocol tcp --in-interface=eth1.2 --out-interface=eth0.3\ + --destination 192.168.0.10 --destination-port 22\ + --match conntrack --ctstate NEW\ + --match limit --limit 3/hour --limit-burst 1\ + --jump NFQUEUE --queue-num 0 --queue-bypass\ + --match comment --comment "Wake up NAS on WAN SSH" +``` + +In this example, packets are filtered based on the protocol, their input +and output interfaces, their destination (IP address) and their destination +port(s). + +The option `--match conntrack --ctstate NEW` only matches packets of a new +connection and `--match limit --limit 3/hour --limit-burst 1` limits the +amount of packets that are matched. The latter option roughly matches +only one packet per 20 minutes. The intention here is to not be too intrusive +and avoid sending a lot of magic packets. + +The `--jump NFQUEUE --queue-num 0` options tell the *netfilter* +framework to enqueue a matching packet to the NFQUEUE number 0. In this +example, all four rules send the matching packets into queue 0. The +additional option `--queue-bypass` helps in the situation, when +**etherwake-nfqueue** isn't running. Packets will then be handled +as if the rule wasn't present. + + +## Disabling targets + +To disable targets, first find their index: +``` +uci show etherwake-nfqueue +``` + +Then set its *enabled* option to false and restart the service. +For index 0, it can be done like this: +``` +uci set etherwake-nfqueue.@target[0].enabled=false +/etc/init.d/etherwake-nfqueue restart +``` + + +## Troubleshooting + +### Debug mode + +In order to see what's going on in syslog and get some debug output when +starting the service, enable etherwake-nfqueue's debug mode: +``` +uci set etherwake-nfqueue.setup.debug=on +``` +In another user session tail the log: +``` +logread -f +``` +And then restart the service: +``` +/etc/init.d/etherwake-nfqueue restart +``` + +### Inspect netfilter + +To inspect the working of your firewall rules, you can print statistics +of the chains you used, e.g.: +``` +iptables --verbose --list forwarding_lan_rule +``` + +If you happen to have the *procps-ng-watch* package installed, you can watch +them: +``` +watch iptables --verbose --list forwarding_lan_rule +``` + +To see, if your queues are in place, use: +``` +cat /proc/net/netfilter/nfnetlink_queue +``` + +## Potential improvements + +* Add **LuCI Web Interface** configuration frontend for *targets* and *filter rules* +* Add an option to set *nice* values for instances diff --git a/net/etherwake-nfqueue/files/etherwake-nfqueue.config b/net/etherwake-nfqueue/files/etherwake-nfqueue.config new file mode 100644 index 00000000..541bbe2c --- /dev/null +++ b/net/etherwake-nfqueue/files/etherwake-nfqueue.config @@ -0,0 +1,21 @@ +config etherwake-nfqueue 'setup' + option sudo 'off' + option debug 'off' + +# You can add targets with uci: +# # uci add etherwake-nfqueue target +# Set a name for the target +# # uci set etherwake-nfqueue.@target[-1].name=example +# Set MAC address of the host to wake up +# # uci set etherwake-nfqueue.@target[-1].mac=00:22:44:66:88:aa +# Set the nfqueue num used for receiving filtered packets, defaults to 0 +# # uci set etherwake-nfqueue.@target[-1].nfqueue_num=0 +# Set the interface used for sending the magic packet, defaults to 'eth0' +# # uci set etherwake-nfqueue.@target[-1].interface=eth0 +# Configure if it should be sent to broadcast address, defaults to off +# # uci set etherwake-nfqueue.@target[-1].broadcast=off +# Optionally provide a password (required by some adapters) +# e.g. 00:22:44:66:88:aa or 192.168.1.1 +# # uci set etherwake-nfqueue.@target[-1].password=00:22:44:66:88:aa +# Optionally disable the target, by default it is enabled +# # uci set etherwake-nfqueue.@target[-1].enabled=false diff --git a/net/etherwake-nfqueue/files/etherwake-nfqueue.init b/net/etherwake-nfqueue/files/etherwake-nfqueue.init new file mode 100644 index 00000000..0be740db --- /dev/null +++ b/net/etherwake-nfqueue/files/etherwake-nfqueue.init @@ -0,0 +1,69 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2019 Mister Benjamin <144dbspl@gmail.com> + +NAME='etherwake-nfqueue' + +START=60 +USE_PROCD=1 + +PROGRAM=${NAME} + +start_service() +{ + local value + + config_load ${NAME} + + config_get_bool value setup sudo 0 + [ "${value}" -ne 0 ] && PROGRAM="sudo ${PROGRAM}" + + config_get_bool value setup debug 0 + if [ "${value}" -ne 0 ]; then + PROCD_DEBUG=1 + append PROGRAM '-D' + fi + + config_foreach start_instance target +} + +start_instance() +{ + local section="$1" + local value name mac + + config_get_bool value "${section}" enabled 1 + [ "${value}" -ne 1 ] && return 0 + + config_get value "${section}" name + [ -z "${value}" ] && value="{section}" + name=${value} + + config_get mac "${section}" mac + [ -z "${mac}" ] && { + echo "${initscript}: Target ${name} has no MAC address" + return 1 + } + + procd_open_instance ${name} + procd_set_param command ${PROGRAM} + procd_set_param respawn + procd_set_param stdout 1 + procd_set_param stderr 1 + + config_get_bool value "${section}" broadcast 0 + [ "${value}" -ne 0 ] && procd_append_param command -b + + config_get value "${section}" interface + [ -n "${value}" ] && procd_append_param command -i "${value}" + + config_get value "${section}" password + [ -n "${value}" ] && procd_append_param command -p "${value}" + + config_get value "${section}" nfqueue_num 0 + procd_append_param command -q "${value}" + + procd_append_param command "${mac}" + + procd_close_instance +} diff --git a/net/etherwake/Makefile b/net/etherwake/Makefile index 9a0b9ba8..98063c03 100644 --- a/net/etherwake/Makefile +++ b/net/etherwake/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=etherwake PKG_VERSION:=1.09 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/e/etherwake diff --git a/net/etherwake/patches/100-no_ether_hostton.patch b/net/etherwake/patches/100-no_ether_hostton.patch deleted file mode 100644 index e33c06b1..00000000 --- a/net/etherwake/patches/100-no_ether_hostton.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- etherwake-1.09.orig/ether-wake.c 2005-07-10 20:44:25.000000000 +0200 -+++ etherwake-1.09.orig.no_ether_hostton/ether-wake.c 2007-04-29 19:03:41.000000000 +0200 -@@ -15,7 +15,11 @@ - " an optional password appended.\n" - "\n" - " The single required parameter is the Ethernet MAC (station) address\n" -+#if !defined(__UCLIBC__) - " of the machine to wake or a host ID with known NSS 'ethers' entry.\n" -+#else -+" of the machine to wake.\n" -+#endif - " The MAC address may be found with the 'arp' program while the target\n" - " machine is awake.\n" - "\n" -@@ -289,16 +293,22 @@ - if (debug) - fprintf(stderr, "The target station address is %s.\n", - ether_ntoa(eaddr)); -+#if !defined(__UCLIBC__) - } else if (ether_hostton(hostid, eaddr) == 0) { - if (debug) - fprintf(stderr, "Station address for hostname %s is %s.\n", - hostid, ether_ntoa(eaddr)); -+#endif - } else { - (void)fprintf(stderr, - "ether-wake: The Magic Packet host address must be " - "specified as\n" -+#if !defined(__UCLIBC__) - " - a station address, 00:11:22:33:44:55, or\n" - " - a hostname with a known 'ethers' entry.\n"); -+#else -+ " - a station address, 00:11:22:33:44:55\n"); -+#endif - return -1; - } - return 0; diff --git a/net/fakeidentd/Makefile b/net/fakeidentd/Makefile index e52c1528..ec799d16 100644 --- a/net/fakeidentd/Makefile +++ b/net/fakeidentd/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fakeidentd PKG_VERSION:=2.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).c PKG_SOURCE_URL:=http://distfiles.gentoo.org/distfiles/ PKG_HASH:=75b321e5d9dddcea2b38035b62ac30f2175ed43f3f187be6da19aaa67c4fe165 PKG_MAINTAINER:=Daniel Gimpelevich -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later UNPACK_CMD=$(CP) $(DL_DIR)/$(PKG_SOURCE) $(1)/ include $(INCLUDE_DIR)/package.mk diff --git a/net/family-dns/Makefile b/net/family-dns/Makefile new file mode 100644 index 00000000..e7cd4d1c --- /dev/null +++ b/net/family-dns/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (c) 2020 Gregory L. Dietsche +# This is free software, licensed under the MIT License +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=family-dns +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT +PKG_MAINTAINER:=Gregory L. Dietsche + +include $(INCLUDE_DIR)/package.mk + +define Package/family-dns + SECTION:=net + CATEGORY:=Network + TITLE:=Family DNS + PKGARCH:=all +endef + +define Package/family-dns/description +This package configures your router to block adult websites. +The default settings are designed to be appropriate for most businesses, +schools and families. +endef + +define Package/family-dns/conffiles +/etc/config/family-dns +endef + +define Build/Compile +endef + +define Package/family-dns/install + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_DATA) ./files/family-dns.uci-defaults $(1)/etc/uci-defaults/family-dns + + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/family-dns.conf $(1)/etc/config/family-dns + + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) ./files/family-dns-update $(1)/usr/sbin/family-dns-update + $(INSTALL_BIN) ./files/test-family-dns $(1)/usr/sbin/test-family-dns +endef + +define Package/family-dns/prerm +#!/bin/sh +if [ -z "$${IPGK_INSTROOT}" ]; then + /usr/sbin/family-dns-update uninstall +fi +exit 0 +endef + +$(eval $(call BuildPackage,family-dns)) diff --git a/net/family-dns/Readme.md b/net/family-dns/Readme.md new file mode 100644 index 00000000..b4e270d5 --- /dev/null +++ b/net/family-dns/Readme.md @@ -0,0 +1,21 @@ +# Package: net/family-dns + +This package configures your router to block access to adult websites. + +The default settings are designed to be appropriate for most businesses, schools, and families. + +Enabled and disable Family DNS by editing /etc/config/family-dns. To make +your changes active, run family-dns-update. + +- Default DNS Filter + - CleanBrowsing.org Adult Filter + - https://cleanbrowsing.org/filters#adult + - Blocks access to all adult, pornographic and explicit sites. It does not block proxy or VPNs, nor mixed-content sites. Sites like Reddit are allowed. Google and Bing are set to the Safe Mode. Malicious and Phishing domains are blocked. +- Alternate DNS Filters: + - CleanBrowsing.org Family Filter + - https://cleanbrowsing.org/filters#family + - Blocks access to all adult, pornographic and explicit sites. It also blocks proxy and VPN domains that are used to bypass the filters. Mixed content sites (like Reddit) are also blocked. Google, Bing and Youtube are set to the Safe Mode. Malicious and Phishing domains are blocked. + - Cisco Family Shield + - https://www.opendns.com/home-internet-security/ + - https://www.opendns.com/setupguide/#familyshield + - FamilyShield will block domains that are categorized as: Tasteless, Proxy/Anonymizer, Sexuality and Pornography. diff --git a/net/family-dns/files/family-dns-update b/net/family-dns/files/family-dns-update new file mode 100644 index 00000000..6771a0a7 --- /dev/null +++ b/net/family-dns/files/family-dns-update @@ -0,0 +1,95 @@ +#!/bin/sh +# +# Copyright (c) 2020 Gregory L. Dietsche +# This is free software, licensed under the MIT License +# +. /lib/functions.sh + +config_load 'family-dns' +config_get_bool enabled default enabled 0 +config_get_bool redirect_dns default redirect_dns 0 +config_get dns default dns default + +#uninstall and disable are designed to be equivalent. +if [ "$1" = "uninstall" ] ; then + enabled=0 +fi + +# Set OpenWrt Defaults +uci -q batch <<-EOT + set network.wan.peerdns='1' + set network.wan6.peerdns='1' + delete network.wan.dns + delete network.wan6.dns + delete firewall.family_dns_lan +EOT + +if [ "$enabled" -ne 1 ] ; then + echo 'Activating Default ISP DNS server(s)' +else + # We don't want to use ISP DNS servers because they don't filter queries + uci set network.wan.peerdns='0' + uci set network.wan6.peerdns='0' + + # Configure the DNS server(s) that will handle filtering. + echo "Activating $dns" + case $dns in + cleanbrowsing-adult-filter) + uci add_list network.wan.dns=185.228.168.10 + uci add_list network.wan.dns=185.228.169.11 + uci add_list network.wan6.dns=2a0d:2a00:1::1 + uci add_list network.wan6.dns=2a0d:2a00:2::1 + ;; + cleanbrowsing-family-filter) + uci add_list network.wan.dns=185.228.168.168 + uci add_list network.wan.dns=185.228.169.168 + uci add_list network.wan6.dns=2a0d:2a00:1:: + uci add_list network.wan6.dns=2a0d:2a00:2:: + ;; + cloudflare-malware-and-adult-content) + uci add_list network.wan.dns=1.1.1.3 + uci add_list network.wan.dns=1.0.0.3 + uci add_list network.wan6.dns=2606:4700:4700::1113 + uci add_list network.wan6.dns=2606:4700:4700::1003 + ;; + cisco-family-shield) + uci add_list network.wan.dns=208.67.222.123 + uci add_list network.wan.dns=208.67.220.123 + uci add_list network.wan6.dns=::ffff:d043:de7b + uci add_list network.wan6.dns=::ffff:d043:dc7b + ;; + *) + echo "$dns" is not supported. + uci revert network + redirect_dns=0 + ;; + esac + + if [ "$redirect_dns" -eq 1 ] ; then + echo Activating DNS redirect + zone=lan + ip=$(uci get network.$zone.ipaddr) + + uci -q batch <<-EOT + set firewall.family_dns_lan=redirect + add_list firewall.family_dns_lan.proto='tcp' + add_list firewall.family_dns_lan.proto='udp' + set firewall.family_dns_lan.src_dport='53' + set firewall.family_dns_lan.dest_ip='$ip' + set firewall.family_dns_lan.target='DNAT' + set firewall.family_dns_lan.src='$zone' + set firewall.family_dns_lan.dest='$zone' + set firewall.family_dns_lan.name='family-dns redirect for $zone zone' +EOT + fi +fi + +uci -q batch <<-EOT + commit network + commit firewall +EOT + +/etc/init.d/network reload +/etc/init.d/dnsmasq reload +/etc/init.d/firewall reload 2>/dev/null + diff --git a/net/family-dns/files/family-dns.conf b/net/family-dns/files/family-dns.conf new file mode 100644 index 00000000..bfe950f5 --- /dev/null +++ b/net/family-dns/files/family-dns.conf @@ -0,0 +1,14 @@ +# Copyright (c) 2020 Gregory L. Dietsche +# This is free software, licensed under the MIT License +# +# run family-dns-update after making configuration changes. +# + +config family-dns default + option enabled 1 + option redirect_dns 1 + option dns 'cleanbrowsing-adult-filter' + #option dns 'cleanbrowsing-family-filter' + #option dns 'cloudflare-malware-and-adult-content' + #option dns 'cisco-family-shield' + diff --git a/net/family-dns/files/family-dns.uci-defaults b/net/family-dns/files/family-dns.uci-defaults new file mode 100644 index 00000000..9eaaa0b6 --- /dev/null +++ b/net/family-dns/files/family-dns.uci-defaults @@ -0,0 +1,9 @@ +#!/bin/sh +# +# Copyright (c) 2020 Gregory L. Dietsche +# This is free software, licensed under the MIT License +# + +/usr/sbin/family-dns-update + +exit 0 diff --git a/net/family-dns/files/test-family-dns b/net/family-dns/files/test-family-dns new file mode 100755 index 00000000..ff017fb6 --- /dev/null +++ b/net/family-dns/files/test-family-dns @@ -0,0 +1,124 @@ +#!/bin/sh +# +# Copyright (c) 2020 Gregory L. Dietsche +# This is free software, licensed under the MIT License +# + +######################## +#Yucky global variables# +######################## +global_result=0 + +# A list of adult websites that support both IPv4 and IPv6 +IPv4andIPv6EnabledSiteList="https://xhamster.com https://www.watchmyexgf.net https://gaymaletube.com" + +expect_not_safe(){ + title=$1 + size=$2 + web=$3 + + actual=$(wget -4 -O - "$web" | wc -l) 2> /dev/null + if [ "$actual" -gt "$size" ] ; then + echo "$title: IPv4: $size/$actual. NOT SAFE" + else + echo "$title: IPv4: SAFE. $actual (expected not safe!) ***************" + global_result=1 + fi + + actual=$(wget -6 -O - "$web" | wc -l) 2> /dev/null + if [ "$actual" -gt "$size" ] ; then + echo "$title: IPv6: $size/$actual. NOT SAFE" + else + echo "$title: IPv6: SAFE. $actual (expected not safe!) ***************" + global_result=1 + fi + return $global_result +} + +expect_safe(){ + title=$1 + size=$2 + web=$3 + + actual=$(wget -4 -O - "$web" | wc -l) 2> /dev/null + if [ "$actual" -gt "$size" ] ; then + echo "$title: IPv4: $size/$actual. NOT SAFE ******************" + global_result=1 + else + echo "$title: IPv4: SAFE. $actual" + fi + + actual=$(wget -6 -O - "$web" | wc -l) 2> /dev/null + if [ "$actual" -gt "$size" ] ; then + echo "$title: IPv6: $size/$actual. NOT SAFE ******************" + global_result=1 + else + echo "$title: IPv6: SAFE. $actual" + fi +} + + +test_not_safe(){ + uci set family-dns.default.enabled=0 + uci commit family-dns + family-dns-update + + echo "******************************" + echo "Testing Without Protection ***" + echo "******************************" + c=0 + for site in ${IPv4andIPv6EnabledSiteList}; do + expect_not_safe "Site $c" 500 "$site" + c=$((c+1)) + done + + uci set family-dns.default.enabled=1 + uci commit family-dns + family-dns-update + + echo +} + +test_filter(){ + echo "******************************" + echo "Testing With Protection ***" + echo "******************************" + echo testing "$1" + + uci set family-dns.default.dns="$1" + uci commit family-dns + family-dns-update + + c=0 + for site in ${IPv4andIPv6EnabledSiteList}; do + expect_safe "Testing Site $c" 500 "$site" + c=$((c+1)) + done + + echo +} + +############################################# +## Main Tests ## +############################################# +test_not_safe +test_filter cisco-family-shield +test_filter cloudflare-malware-and-adult-content +test_filter cleanbrowsing-family-filter +test_filter cleanbrowsing-adult-filter + +# with cleanbrowsing-adult-filter on, run this test on a different device (not the router) +# the result should be 0 when redirect_dns=1 and the result should be 1 when redirect_dns=0 +#count=$(nslookup -query=A www.sex.com 8.8.8.8 | grep NXDOMAIN | wc -l) +#if [ $count -eq 1 ]; then +# echo Clean Browsing returned NXDOMAIN. This is expected. +#else +# echo Clean Browsing did not return NXDOMAIN. This is NOT expected. +#fi + + + +if [ $global_result -ne 0 ]; then + echo '************ Test(s) failed! ********************************************************' +fi +exit $global_result diff --git a/net/fastd/Config.in b/net/fastd/Config.in index 3350eb30..e6440075 100644 --- a/net/fastd/Config.in +++ b/net/fastd/Config.in @@ -36,16 +36,6 @@ config FASTD_ENABLE_METHOD_NULL depends on PACKAGE_fastd default y -config FASTD_ENABLE_METHOD_XSALSA20_POLY1305 - bool "Enable xsalsa20-poly1305 method" - depends on PACKAGE_fastd - default n - - -config FASTD_ENABLE_CIPHER_AES128_CTR - bool "Enable the AES128-CTR cipher" - depends on PACKAGE_fastd - default n config FASTD_ENABLE_CIPHER_NULL bool "Enable the null cipher" diff --git a/net/fastd/Makefile b/net/fastd/Makefile index 4e2bcd5f..8eabc34d 100644 --- a/net/fastd/Makefile +++ b/net/fastd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fastd -PKG_VERSION:=18 -PKG_RELEASE:=2 +PKG_VERSION:=19 +PKG_RELEASE:=1 PKG_MAINTAINER:=Matthias Schiffer PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/86 -PKG_HASH:=714ff09d7bd75f79783f744f6f8c5af2fe456c8cf876feaa704c205a73e043c9 +PKG_SOURCE_URL:=https://github.com/NeoRaider/fastd/releases/download/v$(PKG_VERSION) +PKG_HASH:=6054608e2103b634c9d19ecd1ae058d4ec694747047130719db180578729783a PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=COPYRIGHT @@ -27,8 +27,6 @@ PKG_CONFIG_DEPENDS:=\ CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305 \ CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC \ CONFIG_FASTD_ENABLE_METHOD_NULL \ - CONFIG_FASTD_ENABLE_METHOD_XSALSA20_POLY1305 \ - CONFIG_FASTD_ENABLE_CIPHER_AES128_CTR \ CONFIG_FASTD_ENABLE_CIPHER_NULL \ CONFIG_FASTD_ENABLE_CIPHER_SALSA20 \ CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 \ @@ -44,6 +42,7 @@ PKG_CONFIG_DEPENDS:=\ PKG_BUILD_DEPENDS:=nacl +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -53,7 +52,7 @@ define Package/fastd CATEGORY:=Network DEPENDS:=+kmod-tun +librt +libpthread +libuecc +FASTD_WITH_STATUS_SOCKET:libjson-c +FASTD_WITH_CAPABILITIES:libcap TITLE:=Fast and Secure Tunneling Daemon - URL:=https://projects.universe-factory.net/projects/fastd + URL:=https://github.com/NeoRaider/fastd/ SUBMENU:=VPN endef @@ -73,7 +72,6 @@ CMAKE_OPTIONS += \ -DWITH_METHOD_GENERIC_POLY1305:BOOL=FALSE \ -DWITH_METHOD_GENERIC_UMAC:BOOL=FALSE \ -DWITH_METHOD_NULL:BOOL=FALSE \ - -DWITH_METHOD_XSALSA20_POLY1305:BOOL=FALSE \ -DWITH_CIPHER_AES128_CTR:BOOL=FALSE \ -DWITH_CIPHER_NULL:BOOL=FALSE \ -DWITH_CIPHER_SALSA20:BOOL=FALSE \ @@ -120,14 +118,6 @@ ifeq ($(CONFIG_FASTD_ENABLE_METHOD_NULL),y) CMAKE_OPTIONS += -DWITH_METHOD_NULL:BOOL=TRUE endif -ifeq ($(CONFIG_FASTD_ENABLE_METHOD_XSALSA20_POLY1305),y) -CMAKE_OPTIONS += -DWITH_METHOD_XSALSA20_POLY1305:BOOL=TRUE -endif - - -ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_AES128_CTR),y) -CMAKE_OPTIONS += -DWITH_CIPHER_AES128_CTR:BOOL=TRUE -endif ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_NULL),y) CMAKE_OPTIONS += -DWITH_CIPHER_NULL:BOOL=TRUE diff --git a/net/foolsm/Makefile b/net/foolsm/Makefile index 43c1d1d0..15476250 100644 --- a/net/foolsm/Makefile +++ b/net/foolsm/Makefile @@ -8,14 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=foolsm -PKG_VERSION:=1.0.10 +PKG_VERSION:=1.0.13 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://lsm.foobar.fi/download -PKG_HASH:=33210209ca38b3bfef1a9180f765266a134fc811dea8bc06450a3bd48d1d083e +PKG_HASH:=4eeda0e666e8ee93aab9b9c6709e9695e042dc391fb0999280874c8a73bce476 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_MAINTAINER:= +PKG_LICENSE:=GPL-2.0-only + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -28,17 +32,23 @@ define Package/foolsm endef define Package/foolsm/description - foolsm is a link state monitor for carrying out actions when a link - transistions from the up to down state or vice versa. + foolsm is a link state monitor for carrying out actions when a link + transistions from the up to down state or vice versa. endef define Package/foolsm/conffiles /etc/foolsm/foolsm.conf endef +MAKE_FLAGS += \ + PREFIX="$(CONFIGURE_PREFIX)" + +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + define Package/foolsm/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/foolsm $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/foolsm $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/foolsm/script.d $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DATA) ./files/connections.conf $(1)/etc/foolsm/connections.conf diff --git a/net/fossil/Makefile b/net/fossil/Makefile deleted file mode 100644 index fcece207..00000000 --- a/net/fossil/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fossil -PKG_VERSION:=1.34 -PKG_RELEASE:=2 - -PKG_LICENSE:=BSD-2-Clause -PKG_MAINTAINER:=Luka Perkov - -PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.fossil-scm.org/index.html/uv/download -PKG_HASH:=53a6b83e878feced9ac7705f87e5b6ea82727314e3e19202ae1c46c7e4dba49f - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-src-$(PKG_VERSION) - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/fossil - SECTION:=net - CATEGORY:=Network - SUBMENU:=Version Control Systems - TITLE:=Simple distributed software configuration management - URL:=http://www.fossil-scm.org - DEPENDS:=+zlib -endef - -define Package/fossil/description - Fossil is a distributed version control system, bug tracking system - and wiki software server for use in software development. -endef - -MAKE_FLAGS := \ - TCC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -DFOSSIL_ENABLE_JSON" \ - LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath=$(TOOLCHAIN_DIR)/lib -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -lm" \ - -define Build/Configure -endef - -define Build/Compile - $(call Build/Compile/Default, \ - -f Makefile.classic $(MAKE_FLAGS) all \ - ) -endef - -define Build/Install -endef - -define Package/fossil/conffiles -/etc/config/fossil -endef - -define Package/fossil/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/fossil.init $(1)/etc/init.d/fossil - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/fossil.config $(1)/etc/config/fossil -endef - -$(eval $(call BuildPackage,fossil)) diff --git a/net/fossil/files/fossil.config b/net/fossil/files/fossil.config deleted file mode 100644 index f35876c6..00000000 --- a/net/fossil/files/fossil.config +++ /dev/null @@ -1,5 +0,0 @@ -config server 'dummy' - option repository '/tmp/fossil/dummy' - option port 8008 - option localhost 0 - option create 1 diff --git a/net/fossil/files/fossil.init b/net/fossil/files/fossil.init deleted file mode 100644 index f5a17b98..00000000 --- a/net/fossil/files/fossil.init +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -USE_PROCD=1 - -start_instance() { - local cfg="$1" - - config_get repository "$cfg" repository - if [ -z "$repository" ]; then - echo "repository is not defined in $1, skipping" - return - fi - - config_get_bool create "$cfg" create 0 - - if [ "$create" -eq 0 -a ! -f "$repository" ]; then - echo "in $1 create option is '$create' and repository '$repository' is not a regular file, skipping" - return - fi - - if [ "$create" -eq 1 -a ! -d `dirname $repository` ]; then - mkdir -p `dirname $repository` - if [ "$?" -ne 0 ]; then - echo "could not create directory, skipping" - return - fi - fi - - config_get port "$cfg" port "" - if [ -z "$port" ]; then - echo "port is not defined in $1, skipping" - return - fi - - config_get_bool debug "$cfg" debug 0 - config_get_bool localhost "$cfg" localhost 1 - config_get_bool scgi "$cfg" scgi 0 - - procd_open_instance - procd_set_param command /usr/bin/fossil server "$repository" --port $port - [ "$debug" -eq 1 ] && procd_append_param command --th-trace - [ "$create" -eq 1 ] && procd_append_param command --user root --create - [ "$localhost" -eq 1 ] && procd_append_param command --localhost - [ "$scgi" -eq 1 ] && procd_append_param command --scgi - procd_set_param respawn - procd_close_instance -} - -start_service() { - config_load 'fossil' - config_foreach start_instance 'server' -} diff --git a/net/fossil/patches/001-no_https.patch b/net/fossil/patches/001-no_https.patch deleted file mode 100644 index cd83ffa7..00000000 --- a/net/fossil/patches/001-no_https.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/Makefile.classic -+++ b/Makefile.classic -@@ -41,9 +41,6 @@ - # FOSSIL_ENABLE_MINIZ = 1 - # TCC += -DFOSSIL_ENABLE_MINIZ - --# To add support for HTTPS --TCC += -DFOSSIL_ENABLE_SSL -- - #### We sometimes add the -static option here so that we can build a - # static executable that will run in a chroot jail. - #LIB = -static -@@ -60,9 +57,6 @@ - # If using zlib: - LIB += $(ZLIB_LIB.$(FOSSIL_ENABLE_MINIZ)) $(LDFLAGS) - --# If using HTTPS: --LIB += -lcrypto -lssl -- - #### Tcl shell for use in running the fossil testsuite. If you do not - # care about testing the end result, this can be blank. - # diff --git a/net/fping/Makefile b/net/fping/Makefile index b0f3ae72..1f777126 100644 --- a/net/fping/Makefile +++ b/net/fping/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fping -PKG_VERSION:=4.0 +PKG_VERSION:=4.2 PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://fping.org/dist/ -PKG_HASH:=67eb4152b98ad34f99d2eec4e1098a0bb52caf13c0c89cd147349d08190fe8ce +PKG_SOURCE_URL:=https://fping.org/dist/ +PKG_HASH:=7d339674b6a95aae1d8ad487ff5056fd95b474c3650938268f6a905c3771b64a PKG_MAINTAINER:=Nikil Mehta PKG_LICENSE:=BSD-4-Clause @@ -27,7 +27,7 @@ define Package/fping SECTION:=net CATEGORY:=Network TITLE:=sends ICMP ECHO_REQUEST packets to network hosts - URL:=http://fping.org/ + URL:=https://fping.org/ endef @@ -44,11 +44,9 @@ CONFIGURE_ARGS+= \ --enable-ipv4 \ --enable-ipv6 -TARGET_CFLAGS += -std=gnu99 - define Package/fping/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fping $(1)/usr/bin/ + $(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/sbin/fping $(1)/usr/bin/ endef $(eval $(call BuildPackage,fping)) diff --git a/net/freeradius3/Makefile b/net/freeradius3/Makefile index 62dbe21f..e8b2f8e7 100644 --- a/net/freeradius3/Makefile +++ b/net/freeradius3/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=freeradius3 -PKG_VERSION:=release_3_0_20 +PKG_VERSION:=release_3_0_21 PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive -PKG_HASH:=8177fe550af6685a040884dbe3df28431bdc5a8d3a48a9f4f88bdb49f2d0e90c +PKG_HASH:=b2014372948a92f86cfe2cf43c58ef47921c03af05666eb9d6416bdc6eeaedc2 PKG_MAINTAINER:= PKG_LICENSE:=GPL-2.0 @@ -22,6 +22,7 @@ PKG_CPE_ID:=cpe:/a:freeradius:freeradius PKG_BUILD_DIR:=$(BUILD_DIR)/freeradius-server-$(PKG_VERSION) PKG_FIXUP:=autoreconf +PYTHON3_PKG_BUILD:=0 PKG_CONFIG_DEPENDS := \ FREERADIUS3_OPENSSL \ @@ -30,8 +31,7 @@ PKG_CONFIG_DEPENDS := \ CFLAGS += $(FPIC) include $(INCLUDE_DIR)/package.mk -include $(TOPDIR)/feeds/packages/lang/python/python-package.mk -include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk +include ../../lang/python/python3-package.mk define Package/freeradius3/config source "$(SOURCE)/Config.in" @@ -77,9 +77,9 @@ define Package/freeradius3-default +freeradius3-mod-eap-md5 \ +freeradius3-mod-eap-mschapv2 \ +freeradius3-mod-eap-peap \ ++freeradius3-mod-eap-pwd \ +freeradius3-mod-eap-tls \ +freeradius3-mod-eap-ttls \ -+freeradius3-mod-eap-pwd \ +freeradius3-mod-exec \ +freeradius3-mod-expiration \ +freeradius3-mod-expr \ @@ -100,6 +100,39 @@ define Package/freeradius3-democerts TITLE:=Demo certificates to test the server endef +define Package/freeradius3-mod-always + $(call Package/freeradius3/Default) + DEPENDS:=freeradius3 + TITLE:=Always module +endef + +define Package/freeradius3-mod-always/conffiles +/etc/freeradius3/mods-available/always +/etc/freeradius3/mods-enabled/always +endef + +define Package/freeradius3-mod-attr-filter + $(call Package/freeradius3/Default) + DEPENDS:=freeradius3 + TITLE:=ATTR filter module +endef + +define Package/freeradius3-mod-attr-filter/conffiles +/etc/freeradius3/mods-available/attr_filter +/etc/freeradius3/mods-enabled/attr_filter +/etc/freeradius3/mods-config/attr_filter/access_challenge +/etc/freeradius3/mods-config/attr_filter/access_reject +/etc/freeradius3/mods-config/attr_filter/accounting_response +/etc/freeradius3/mods-config/attr_filter/post-proxy +/etc/freeradius3/mods-config/attr_filter/pre-proxy +endef + +define Package/freeradius3-mod-attr-rewrite + $(call Package/freeradius3/Default) + DEPENDS:=freeradius3 + TITLE:=ATTR rewrite module +endef + define Package/freeradius3-mod-chap $(call Package/freeradius3/Default) DEPENDS:=freeradius3 @@ -177,6 +210,12 @@ define Package/freeradius3-mod-eap-peap TITLE:=EAP/PEAP module endef +define Package/freeradius3-mod-eap-pwd + $(call Package/freeradius3/Default) + DEPENDS:=freeradius3-mod-eap @FREERADIUS3_OPENSSL + TITLE:=EAP/PWD module +endef + define Package/freeradius3-mod-eap-tls $(call Package/freeradius3/Default) DEPENDS:=freeradius3-mod-eap @FREERADIUS3_OPENSSL @@ -189,12 +228,6 @@ define Package/freeradius3-mod-eap-ttls TITLE:=EAP/TTLS module endef -define Package/freeradius3-mod-eap-pwd - $(call Package/freeradius3/Default) - DEPENDS:=freeradius3-mod-eap @FREERADIUS3_OPENSSL - TITLE:=EAP/PWD module -endef - define Package/freeradius3-mod-exec $(call Package/freeradius3/Default) DEPENDS:=freeradius3 @@ -217,17 +250,6 @@ define Package/freeradius3-mod-expiration/conffiles /etc/freeradius3/mods-enabled/expiration endef -define Package/freeradius3-mod-always - $(call Package/freeradius3/Default) - DEPENDS:=freeradius3 - TITLE:=Always module -endef - -define Package/freeradius3-mod-always/conffiles -/etc/freeradius3/mods-available/always -/etc/freeradius3/mods-enabled/always -endef - define Package/freeradius3-mod-expr $(call Package/freeradius3/Default) DEPENDS:=freeradius3 @@ -239,28 +261,6 @@ define Package/freeradius3-mod-expr/conffiles /etc/freeradius3/mods-enabled/expr endef -define Package/freeradius3-mod-attr-filter - $(call Package/freeradius3/Default) - DEPENDS:=freeradius3 - TITLE:=ATTR filter module -endef - -define Package/freeradius3-mod-attr-filter/conffiles -/etc/freeradius3/mods-available/attr_filter -/etc/freeradius3/mods-enabled/attr_filter -/etc/freeradius3/mods-config/attr_filter/access_challenge -/etc/freeradius3/mods-config/attr_filter/access_reject -/etc/freeradius3/mods-config/attr_filter/accounting_response -/etc/freeradius3/mods-config/attr_filter/post-proxy -/etc/freeradius3/mods-config/attr_filter/pre-proxy -endef - -define Package/freeradius3-mod-attr-rewrite - $(call Package/freeradius3/Default) - DEPENDS:=freeradius3 - TITLE:=ATTR rewrite module -endef - define Package/freeradius3-mod-files $(call Package/freeradius3/Default) DEPENDS:=freeradius3 @@ -275,17 +275,6 @@ define Package/freeradius3-mod-files/conffiles /etc/freeradius3/mods-config/files/pre-proxy endef -define Package/freeradius3-mod-passwd - $(call Package/freeradius3/Default) - DEPENDS:=freeradius3 - TITLE:=Rlm passwd module -endef - -define Package/freeradius3-mod-passwd/conffiles -/etc/freeradius3/mods-available/passwd -/etc/freeradius3/mods-enabled/passwd -endef - define Package/freeradius3-mod-ldap $(call Package/freeradius3/Default) DEPENDS:=freeradius3 +libopenldap @FREERADIUS3_OPENSSL @@ -329,6 +318,17 @@ define Package/freeradius3-mod-pap/conffiles /etc/freeradius3/mods-enabled/pap endef +define Package/freeradius3-mod-passwd + $(call Package/freeradius3/Default) + DEPENDS:=freeradius3 + TITLE:=Rlm passwd module +endef + +define Package/freeradius3-mod-passwd/conffiles +/etc/freeradius3/mods-available/passwd +/etc/freeradius3/mods-enabled/passwd +endef + define Package/freeradius3-mod-preprocess $(call Package/freeradius3/Default) DEPENDS:=freeradius3 @@ -342,16 +342,6 @@ define Package/freeradius3-mod-preprocess/conffiles /etc/freeradius3/mods-enabled/preprocess endef -define Package/freeradius3-mod-python - $(call Package/freeradius3/Default) - DEPENDS:=freeradius3 +python - TITLE:=Python module -endef - -define Package/freeradius3-mod-python/conffiles -/etc/freeradius3/mods-available/python -endef - define Package/freeradius3-mod-python3 $(call Package/freeradius3/Default) DEPENDS:=freeradius3 +python3 @@ -362,6 +352,19 @@ define Package/freeradius3-mod-python3/conffiles /etc/freeradius3/mods-available/python3 endef +define Package/freeradius3-mod-radutmp + $(call Package/freeradius3/Default) + DEPENDS:=freeradius3 + TITLE:=Radius UTMP module +endef + +define Package/freeradius3-mod-radutmp/conffiles +/etc/freeradius3/mods-available/radutmp +/etc/freeradius3/mods-enabled/radutmp +/etc/freeradius3/mods-available/sradutmp +/etc/freeradius3/mods-enabled/sradutmp +endef + define Package/freeradius3-mod-realm $(call Package/freeradius3/Default) DEPENDS:=freeradius3 @@ -373,6 +376,16 @@ define Package/freeradius3-mod-realm/conffiles /etc/freeradius3/mods-enabled/realm endef +define Package/freeradius3-mod-rest + $(call Package/freeradius3/Default) + DEPENDS:=freeradius3 +libcurl +libjson-c + TITLE:=Radius REST module +endef + +define Package/freeradius3-mod-rest/conffiles +/etc/freeradius3/mods-available/rest +endef + define Package/freeradius3-mod-sql $(call Package/freeradius3/Default) DEPENDS:=freeradius3 @@ -443,19 +456,6 @@ define Package/freeradius3-mod-sqlippool/conffiles /etc/freeradius3/mods-available/sqlippool endef -define Package/freeradius3-mod-radutmp - $(call Package/freeradius3/Default) - DEPENDS:=freeradius3 - TITLE:=Radius UTMP module -endef - -define Package/freeradius3-mod-radutmp/conffiles -/etc/freeradius3/mods-available/radutmp -/etc/freeradius3/mods-enabled/radutmp -/etc/freeradius3/mods-available/sradutmp -/etc/freeradius3/mods-enabled/sradutmp -endef - define Package/freeradius3-mod-unix $(call Package/freeradius3/Default) DEPENDS:=freeradius3 @@ -512,9 +512,9 @@ CONFIGURE_ARGS+= \ --without-rlm_opendirectory \ --without-rlm_pam \ --without-rlm_perl \ + --without-rlm_python \ --without-rlm_redis \ --without-rlm_rediswho \ - --without-rlm_rest \ --without-rlm_ruby \ --without-rlm_securid \ --without-rlm_smsotp \ @@ -547,6 +547,16 @@ else CONFIGURE_ARGS+= --without-rlm_eap_peap endif +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-eap-pwd),) + CONFIGURE_ARGS+= \ + --with-rlm_eap_pwd \ + --with-rlm_eap_pwd-include-dir="$(STAGING_DIR)/usr/include" \ + --with-rlm_eap_pwd-lib-dir="$(STAGING_DIR)/usr/lib" + CONFIGURE_LIBS+= -lcrypto -lssl +else + CONFIGURE_ARGS+= --without-rlm_eap_pwd +endif + ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-eap-tls),) CONFIGURE_ARGS+= \ --with-rlm_eap_tls \ @@ -567,42 +577,35 @@ else CONFIGURE_ARGS+= --without-rlm_eap_ttls endif -ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-eap-pwd),) - CONFIGURE_ARGS+= \ - --with-rlm_eap_pwd \ - --with-rlm_eap_pwd-include-dir="$(STAGING_DIR)/usr/include" \ - --with-rlm_eap_pwd-lib-dir="$(STAGING_DIR)/usr/lib" - CONFIGURE_LIBS+= -lcrypto -lssl +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-ldap),) + CONFIGURE_ARGS+= --with-rlm_ldap \ + --with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \ + --with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib" else - CONFIGURE_ARGS+= --without-rlm_eap_pwd -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-python),) - CFLAGS+= -fPIC - CONFIGURE_ARGS+= \ - --with-rlm_python \ - --with-rlm-python-include-dir="$(PYTHON_INC_DIR)" \ - --with-rlm-python-lib-dir="$(PYTHON_LIB_DIR)" - CONFIGURE_VARS+= \ - OPENWRTTARGET_PY_PREFIX="$(PYTHON_DIR)" \ - OPENWRTTARGET_PY_SYS_VERSION="$(PYTHON_VERSION)" -else - CONFIGURE_ARGS+= --without-rlm_python + CONFIGURE_ARGS+= --without-rlm_ldap endif ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-python3),) CFLAGS+= -fPIC CONFIGURE_ARGS+= \ --with-modules="rlm_python3" \ - --with-rlm-python3-include-dir="$(PYTHON3_INC_DIR)" \ - --with-rlm-python3-lib-dir="$(PYTHON3_LIB_DIR)" - CONFIGURE_VARS+= \ - OPENWRTTARGET_PY3_PREFIX="$(PYTHON3_DIR)" \ - OPENWRTTARGET_PY3_SYS_VERSION="$(PYTHON3_VERSION)" + --with-rlm-python3-config-bin="$(STAGING_DIR)/host/bin/python$(PYTHON3_VERSION)-config" else CONFIGURE_ARGS+= --without-rlm_python3 endif +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-radutmp),) + CONFIGURE_ARGS+= --with-rlm_radutmp +else + CONFIGURE_ARGS+= --without-rlm_radutmp +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-rest),) + CONFIGURE_ARGS+= --with-rlm_rest +else + CONFIGURE_ARGS+= --without-rlm_rest +endif + ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql),) CONFIGURE_ARGS+= --with-rlm_sql else @@ -641,26 +644,12 @@ else CONFIGURE_ARGS+= --without-rlm_sqlippool endif -ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-radutmp),) - CONFIGURE_ARGS+= --with-rlm_radutmp -else - CONFIGURE_ARGS+= --without-rlm_radutmp -endif - ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-unix),) CONFIGURE_ARGS+= --with-rlm_unix else CONFIGURE_ARGS+= --without-rlm_unix endif -ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-ldap),) - CONFIGURE_ARGS+= --with-rlm_ldap \ - --with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \ - --with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib" -else - CONFIGURE_ARGS+= --without-rlm_ldap -endif - ifeq ($(CONFIG_USE_GLIBC),y) TARGET_CFLAGS+= -DLIBBSD_OVERLAY -I$(STAGING_DIR)/usr/include/bsd \ -D_RPC_NETDB_H @@ -770,15 +759,15 @@ $(eval $(call BuildPlugin,freeradius3-mod-attr-filter,rlm_attr_filter,)) $(eval $(call BuildPlugin,freeradius3-mod-chap,rlm_chap,)) $(eval $(call BuildPlugin,freeradius3-mod-detail,rlm_detail,)) $(eval $(call BuildPlugin,freeradius3-mod-digest,rlm_digest,)) +$(eval $(call BuildPlugin,freeradius3-mod-eap,rlm_eap,)) $(eval $(call BuildPlugin,freeradius3-mod-eap-gtc,rlm_eap_gtc,)) $(eval $(call BuildPlugin,freeradius3-mod-eap-leap,rlm_eap_leap,)) $(eval $(call BuildPlugin,freeradius3-mod-eap-md5,rlm_eap_md5,)) $(eval $(call BuildPlugin,freeradius3-mod-eap-mschapv2,rlm_eap_mschapv2,)) $(eval $(call BuildPlugin,freeradius3-mod-eap-peap,rlm_eap_peap,)) -$(eval $(call BuildPlugin,freeradius3-mod-eap,rlm_eap,)) +$(eval $(call BuildPlugin,freeradius3-mod-eap-pwd,rlm_eap_pwd,)) $(eval $(call BuildPlugin,freeradius3-mod-eap-tls,rlm_eap_tls,)) $(eval $(call BuildPlugin,freeradius3-mod-eap-ttls,rlm_eap_ttls,)) -$(eval $(call BuildPlugin,freeradius3-mod-eap-pwd,rlm_eap_pwd,)) $(eval $(call BuildPlugin,freeradius3-mod-exec,rlm_exec,)) $(eval $(call BuildPlugin,freeradius3-mod-expiration,rlm_expiration,)) $(eval $(call BuildPlugin,freeradius3-mod-expr,rlm_expr,)) @@ -789,12 +778,10 @@ $(eval $(call BuildPlugin,freeradius3-mod-mschap,rlm_mschap,)) $(eval $(call BuildPlugin,freeradius3-mod-pap,rlm_pap,)) $(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,)) $(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,)) -$(eval $(call PyPackage,freeradius3-mod-python)) -$(eval $(call BuildPlugin,freeradius3-mod-python,rlm_python,)) -$(eval $(call Py3Package,freeradius3-mod-python3)) $(eval $(call BuildPlugin,freeradius3-mod-python3,rlm_python3,)) $(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,)) $(eval $(call BuildPlugin,freeradius3-mod-realm,rlm_realm,)) +$(eval $(call BuildPlugin,freeradius3-mod-rest,rlm_rest,)) $(eval $(call BuildPlugin,freeradius3-mod-sql,rlm_sql,)) $(eval $(call BuildPlugin,freeradius3-mod-sql-mysql,rlm_sql_mysql,)) $(eval $(call BuildPlugin,freeradius3-mod-sql-null,rlm_sql_null,)) diff --git a/net/freeradius3/files/radiusd.init b/net/freeradius3/files/radiusd.init index effb2aee..10ed5ba5 100644 --- a/net/freeradius3/files/radiusd.init +++ b/net/freeradius3/files/radiusd.init @@ -17,6 +17,7 @@ start_service() mkdir -p /var/log mkdir -p /var/run mkdir -p /var/db/radacct + mkdir -p /tmp/radiusd procd_open_instance procd_set_param command $PROG -s diff --git a/net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch b/net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch index a96964fe..559119dd 100644 --- a/net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch +++ b/net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch @@ -3,7 +3,7 @@ Description: disable session caching in the server (as opposed to in the https://security-tracker.debian.org/tracker/CVE-2017-9148 Author: Michael Stapelberg Forwarded: not-needed -Last-Update: 2020-01-24 +Last-Update: 2020-04-28 --- @@ -18,7 +18,7 @@ Last-Update: 2020-01-24 return state; } -@@ -3292,7 +3292,7 @@ post_ca: +@@ -3332,7 +3332,7 @@ post_ca: /* * Callbacks, etc. for session resumption. */ @@ -27,7 +27,7 @@ Last-Update: 2020-01-24 /* * Cache sessions on disk if requested. */ -@@ -3362,7 +3362,7 @@ post_ca: +@@ -3402,7 +3402,7 @@ post_ca: /* * Setup session caching */ @@ -36,7 +36,7 @@ Last-Update: 2020-01-24 /* * Create a unique context Id per EAP-TLS configuration. */ -@@ -3531,7 +3531,7 @@ fr_tls_server_conf_t *tls_server_conf_parse(CONF_SECTION *cs) +@@ -3571,7 +3571,7 @@ fr_tls_server_conf_t *tls_server_conf_parse(CONF_SECTION *cs) goto error; } diff --git a/net/freeradius3/patches/004-fix-target-python-header-detection.patch b/net/freeradius3/patches/004-fix-target-python-header-detection.patch deleted file mode 100644 index 20aa5c50..00000000 --- a/net/freeradius3/patches/004-fix-target-python-header-detection.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- a/src/modules/rlm_python/configure -+++ b/src/modules/rlm_python/configure -@@ -2928,15 +2928,15 @@ fi - - - if test x$fail = x; then -- PY_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.prefix)'` -+ PY_PREFIX="$OPENWRTTARGET_PY_PREFIX" - { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.prefix \"${PY_PREFIX}\"" >&5 - $as_echo "$as_me: Python sys.prefix \"${PY_PREFIX}\"" >&6;} - -- PY_EXEC_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.exec_prefix)'` -+ PY_EXEC_PREFIX="$OPENWRTTARGET_PY_PREFIX" - { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&5 - $as_echo "$as_me: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&6;} - -- PY_SYS_VERSION=`${PYTHON_BIN} -c 'import sys ; print(sys.version[0:3])'` -+ PY_SYS_VERSION="$OPENWRTTARGET_PY_SYS_VERSION" - { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.version \"${PY_SYS_VERSION}\"" >&5 - $as_echo "$as_me: Python sys.version \"${PY_SYS_VERSION}\"" >&6;} - ---- a/src/modules/rlm_python/configure.ac -+++ b/src/modules/rlm_python/configure.ac -@@ -65,13 +65,13 @@ if test x$with_[]modname != xno; then - ) - - if test x$fail = x; then -- PY_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.prefix)'` -+ PY_PREFIX="$OPENWRTTARGET_PY_PREFIX" - AC_MSG_NOTICE([Python sys.prefix \"${PY_PREFIX}\"]) - -- PY_EXEC_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.exec_prefix)'` -+ PY_EXEC_PREFIX="$OPENWRTTARGET_PY_PREFIX" - AC_MSG_NOTICE([Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"]) - -- PY_SYS_VERSION=`${PYTHON_BIN} -c 'import sys ; print(sys.version[[0:3]])'` -+ PY_SYS_VERSION="$OPENWRTTARGET_PY_SYS_VERSION" - AC_MSG_NOTICE([Python sys.version \"${PY_SYS_VERSION}\"]) - - if test "x$PY_LIB_DIR" = "x"; then ---- a/src/modules/rlm_python3/configure -+++ b/src/modules/rlm_python3/configure -@@ -2928,15 +2928,15 @@ fi - - - if test x$fail = x; then -- PY_PREFIX=`${PYTHON3_BIN} -c 'import sys ; print(sys.prefix)'` -+ PY_PREFIX="$OPENWRTTARGET_PY3_PREFIX" - { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.prefix \"${PY_PREFIX}\"" >&5 - $as_echo "$as_me: Python sys.prefix \"${PY_PREFIX}\"" >&6;} - -- PY_EXEC_PREFIX=`${PYTHON3_BIN} -c 'import sys ; print(sys.exec_prefix)'` -+ PY_EXEC_PREFIX="$OPENWRTTARGET_PY3_PREFIX" - { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&5 - $as_echo "$as_me: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&6;} - -- PY_SYS_VERSION=`${PYTHON3_BIN} -c 'import sys ; print(sys.version[0:3])'` -+ PY_SYS_VERSION="$OPENWRTTARGET_PY3_SYS_VERSION" - { $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.version \"${PY_SYS_VERSION}\"" >&5 - $as_echo "$as_me: Python sys.version \"${PY_SYS_VERSION}\"" >&6;} - ---- a/src/modules/rlm_python3/configure.ac -+++ b/src/modules/rlm_python3/configure.ac -@@ -65,13 +65,13 @@ if test x$with_[]modname != xno; then - ) - - if test x$fail = x; then -- PY_PREFIX=`${PYTHON3_BIN} -c 'import sys ; print(sys.prefix)'` -+ PY_PREFIX="$OPENWRTTARGET_PY3_PREFIX" - AC_MSG_NOTICE([Python sys.prefix \"${PY_PREFIX}\"]) - -- PY_EXEC_PREFIX=`${PYTHON3_BIN} -c 'import sys ; print(sys.exec_prefix)'` -+ PY_EXEC_PREFIX="$OPENWRTTARGET_PY3_PREFIX" - AC_MSG_NOTICE([Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"]) - -- PY_SYS_VERSION=`${PYTHON3_BIN} -c 'import sys ; print(sys.version[[0:3]])'` -+ PY_SYS_VERSION="$OPENWRTTARGET_PY3_SYS_VERSION" - AC_MSG_NOTICE([Python sys.version \"${PY_SYS_VERSION}\"]) - - if test "x$PY_LIB_DIR" = "x"; then diff --git a/net/frp/Makefile b/net/frp/Makefile new file mode 100644 index 00000000..b35baa20 --- /dev/null +++ b/net/frp/Makefile @@ -0,0 +1,83 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=frp +PKG_VERSION:=0.33.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v${PKG_VERSION}? +PKG_HASH:=9c773ab4bbd208705c795599c5e69302a379734921c90489ed8ae331c24836cb + +PKG_MAINTAINER:=Richard Yu +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/fatedier/frp +GO_PKG_BUILD_PKG:=github.com/fatedier/frp/cmd/... + +include $(INCLUDE_DIR)/package.mk +include ../../lang/golang/golang-package.mk + +define Package/frp/template + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=frp - fast reverse proxy + URL:=https://github.com/fatedier/frp + DEPENDS:=$(GO_ARCH_DEPENDS) +endef + +define Package/frpc + $(call Package/frp/template) + TITLE+= (client) +endef + +define Package/frps + $(call Package/frp/template) + TITLE+= (server) +endef + +define Package/frp/description + frp is a fast reverse proxy to help you expose a local server behind + a NAT or firewall to the internet. +endef +Package/frpc/description = $(Package/frp/description) +Package/frps/description = $(Package/frp/description) + +define Package/frp/install + $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) + + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/frp/$(2).d/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/$(2)_full.ini $(1)/etc/frp/$(2).d/ + $(INSTALL_DIR) $(1)/etc/config/ + $(INSTALL_CONF) ./files/$(2).config $(1)/etc/config/$(2) + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/$(2).init $(1)/etc/init.d/$(2) +endef + +define Package/frpc/conffiles +/etc/config/frpc +endef + +define Package/frps/conffiles +/etc/config/frps +endef + +define Package/frpc/install + $(call Package/frp/install,$(1),frpc) +endef + +define Package/frps/install + $(call Package/frp/install,$(1),frps) +endef + +$(eval $(call GoBinPackage,frpc)) +$(eval $(call BuildPackage,frpc)) +$(eval $(call GoBinPackage,frps)) +$(eval $(call BuildPackage,frps)) diff --git a/net/frp/files/frpc.config b/net/frp/files/frpc.config new file mode 100644 index 00000000..492e224f --- /dev/null +++ b/net/frp/files/frpc.config @@ -0,0 +1,23 @@ +config init + option stdout 1 + option stderr 1 + option user frpc + option group frpc + option respawn 1 +# OS environments pass to frp for config file template, see +# https://github.com/fatedier/frp#configuration-file-template +# list env 'ENV_NAME=value' +# Config files include in temporary config file. +# list conf_inc '/etc/frp/frpc.d/frpc_full.ini' + +config conf 'common' + option server_addr 127.0.0.1 + option server_port 7000 +# List options with name="_" will be directly appended to config file +# list _ '# Key-A=Value-A' + +config conf 'ssh' + option type tcp + option local_ip 127.0.0.1 + option local_port 22 + option remote_port 6000 diff --git a/net/frp/files/frpc.init b/net/frp/files/frpc.init new file mode 100644 index 00000000..96208d8f --- /dev/null +++ b/net/frp/files/frpc.init @@ -0,0 +1,72 @@ +#!/bin/sh /etc/rc.common + +START=99 +USE_PROCD=1 + +NAME=frpc +PROG=/usr/bin/$NAME + +_err() { + echo "$*" >&2 + logger -p daemon.err -t "$NAME" "$*" +} + +config_cb() { + [ $# -eq 0 ] && return + + local type="$1" + local name="$2" + if [ "$type" = "conf" ]; then + echo "[$name]" >> "$conf_file" + option_cb() { + local option="$1" + local value="$2" + echo "$option = $value" >> "$conf_file" + } + list_cb() { + local name="$1" + local value="$2" + [ "$name" = "_" ] && echo "$value" >> "$conf_file" + } + else + [ "$type" = "init" ] && init_cfg="$name" + option_cb() { return 0; } + list_cb() { return 0; } + fi +} + +start_service() { + local init_cfg=" " + local conf_file="/var/etc/$NAME.ini" + + > "$conf_file" + config_load "$NAME" + + local stdout stderr user group respawn env conf_inc + uci_validate_section "$NAME" init "$init_cfg" \ + 'stdout:bool:1' \ + 'stderr:bool:1' \ + 'user:string' \ + 'group:string' \ + 'respawn:bool:1' \ + 'env:list(string)' \ + 'conf_inc:list(string)' + + local err=$? + [ $err -ne 0 ] && { + _err "uci_validate_section returned $err" + return 1 + } + + [ -n "$conf_inc" ] && config_list_foreach "$init_cfg" conf_inc cat >> "$conf_file" + + procd_open_instance + procd_set_param command "$PROG" -c "$conf_file" + procd_set_param stdout $stdout + procd_set_param stderr $stderr + [ -n "$user" ] && procd_set_param user "$user" + [ -n "$group" ] && procd_set_param group "$group" + [ $respawn -eq 1 ] && procd_set_param respawn + [ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env" + procd_close_instance +} diff --git a/net/frp/files/frps.config b/net/frp/files/frps.config new file mode 100644 index 00000000..ae0bffc2 --- /dev/null +++ b/net/frp/files/frps.config @@ -0,0 +1,16 @@ +config init + option stdout 1 + option stderr 1 + option user frps + option group frps + option respawn 1 +# OS environments pass to frp for config file template, see +# https://github.com/fatedier/frp#configuration-file-template +# list env 'ENV_NAME=value' +# Config files include in temporary config file. +# list conf_inc '/etc/frp/frps.d/frps_full.ini' + +config conf 'common' + option bind_port 7000 +# List options with name="_" will be directly appended to config file +# list _ '# Key-A=Value-A' diff --git a/net/frp/files/frps.init b/net/frp/files/frps.init new file mode 100644 index 00000000..be4e1b8f --- /dev/null +++ b/net/frp/files/frps.init @@ -0,0 +1,72 @@ +#!/bin/sh /etc/rc.common + +START=99 +USE_PROCD=1 + +NAME=frps +PROG=/usr/bin/$NAME + +_err() { + echo "$*" >&2 + logger -p daemon.err -t "$NAME" "$*" +} + +config_cb() { + [ $# -eq 0 ] && return + + local type="$1" + local name="$2" + if [ "$type" = "conf" ]; then + echo "[$name]" >> "$conf_file" + option_cb() { + local option="$1" + local value="$2" + echo "$option = $value" >> "$conf_file" + } + list_cb() { + local name="$1" + local value="$2" + [ "$name" = "_" ] && echo "$value" >> "$conf_file" + } + else + [ "$type" = "init" ] && init_cfg="$name" + option_cb() { return 0; } + list_cb() { return 0; } + fi +} + +start_service() { + local init_cfg=" " + local conf_file="/var/etc/$NAME.ini" + + > "$conf_file" + config_load "$NAME" + + local stdout stderr user group respawn env conf_inc + uci_validate_section "$NAME" init "$init_cfg" \ + 'stdout:bool:1' \ + 'stderr:bool:1' \ + 'user:string' \ + 'group:string' \ + 'respawn:bool:1' \ + 'env:list(string)' \ + 'conf_inc:list(string)' + + local err=$? + [ $err -ne 0 ] && { + _err "uci_validate_section returned $err" + return 1 + } + + [ -n "$conf_inc" ] && config_list_foreach "$init_cfg" conf_inc cat >> "$conf_file" + + procd_open_instance + procd_set_param command "$PROG" -c "$conf_file" + procd_set_param stdout $stdout + procd_set_param stderr $stderr + [ -n "$user" ] && procd_set_param user "$user" + [ -n "$group" ] && procd_set_param group "$group" + [ $respawn -eq 1 ] && procd_set_param respawn + [ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env" + procd_close_instance +} diff --git a/net/frr/Config.in b/net/frr/Config.in new file mode 100644 index 00000000..7a7ea3fe --- /dev/null +++ b/net/frr/Config.in @@ -0,0 +1,32 @@ + +if PACKAGE_frr +comment "SSL support" + +choice + prompt "Selected SSL MD5 library" + default FRR_INTERNAL + + config FRR_OPENSSL + bool "OpenSSL" + + config FRR_INTERNAL + bool "internal SSL support" +endchoice + +comment "SNMP support" + +choice + prompt "Enable SNMP support" + default FRR_NO_SNMP + + config FRR_SNMP + bool "SNMP enable" + + config FRR_NO_SNMP + bool "SNMP disable" +endchoice + + +comment "Packages" + +endif diff --git a/net/frr/Makefile b/net/frr/Makefile new file mode 100644 index 00000000..eff07ee3 --- /dev/null +++ b/net/frr/Makefile @@ -0,0 +1,240 @@ +# +# Copyright (C) 2019 Lucian Cristian +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +PKG_NAME:=frr +PKG_VERSION:=7.3.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://github.com/FRRouting/frr/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=85571b63d2774329b7e97871e4761f852066a17e99a8daae9972c6bd7a533e05 +PKG_MAINTAINER:=Lucian Cristian + +PKG_LICENSE:=GPL-2.0-only LGPL-2.1-only + +PKG_DAEMON_AVAILABLE:= \ + babeld \ + bfdd \ + bgpd \ + eigrpd \ + fabricd \ + isisd \ + ldpd \ + nhrpd \ + ospfd \ + ospf6d \ + pbrd \ + pimd \ + ripd \ + ripngd \ + staticd \ + vrrpd + + +PKG_CONFIG_DEPENDS:= \ + CONFIG_IPV6 \ + CONFIG_FRR_OPENSSL \ + CONFIG_FRR_INTERNAL \ + CONFIG_FRR_SNMP \ + CONFIG_FRR_NO_SNMP \ + CONFIG_PACKAGE_frr-libfrr \ + CONFIG_PACKAGE_frr-vtysh \ + CONFIG_PACKAGE_frr-watchfrr \ + CONFIG_PACKAGE_frr-zebra \ + $(patsubst %,CONFIG_PACKAGE_frr-%,$(PKG_DAEMON_AVAILABLE)) \ + +PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:=frr/host +HOST_BUILD_DEPENDS:=python3/host + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/frr-libfrr/config + source "$(SOURCE)/Config.in" +endef + +define Package/frr/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + URL:=https://www.frrouting.org/ + DEPENDS:=frr +endef + +define Package/frr + $(call Package/frr/Default) + DEPENDS:=+librt + TITLE:=The FRRouting (FRR) Software Routing Suite + MENU:=1 +endef + +define Package/frr/description + FRRouting is free software that implements and manages various IPv4 and IPv6 + routing protocols. + + Currently FRRouting supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, RIPng, + IS-IS, PIM-SM/MSDP, LDP, VRRP and Babel as well as very early support for EIGRP and + NHRP. +endef + +define Package/frr-libfrr + $(call Package/frr/Default) + TITLE:=zebra library + DEPENDS+=+librt +libatomic +libcap +libjson-c +libyang +FRR_OPENSSL:libopenssl +FRR_SNMP:libnetsnmp + CONFLICTS:=quagga-libzebra +endef + +define Package/frr-vtysh + $(call Package/frr/Default) + DEPENDS+=+frr-libfrr +libreadline +libncurses +more + TITLE:=integrated shell for frr routing software + CONFLICTS:=quagga-vtysh +endef + +define Package/frr-watchfrr + $(call Package/frr/Default) + TITLE:=frr watchdog + DEPENDS+=+frr-libfrr + DEFAULT:=y if PACKAGE_frr +endef + +define Package/frr-zebra + $(call Package/frr/Default) + TITLE:=Zebra daemon + DEPENDS+=+frr-libfrr + DEFAULT:=y if PACKAGE_frr + CONFLICTS:=quagga-zebra +endef + +##Migrate from quagga +##should test file exists and link in frr folder +#define Package/frr/postinst +##!/bin/sh +#if [ -f /etc/quagga/ospfd.conf ]; then +# ls to /etc/frr +# sed enable ospfd daemon +#fi +#exit 0 +#endef + +define BuildDaemon + define Package/frr-$(1) + $$(call Package/frr/Default) + TITLE:= $(1) routing engine + DEPENDS+=frr-libfrr $(2) + endef + + define Package/frr-$(1)/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \ + if [ "$(1)" == "nhrpd" ]; then \ + $(INSTALL_DIR) $$(1)/usr/lib; \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfrrcares.so* $$(1)/usr/lib/; fi + endef + + $$(eval $$(call BuildPackage,frr-$(1))) +endef + +define Package/frr-libfrr/conffiles +/etc/frr/daemons +/etc/frr/frr.conf +/etc/frr/vtysh.conf +endef + +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -latomic +TARGET_CFLAGS += -flto + +define Host/Configure + $(Host/Configure/Default) + $(SED) 's/$$$$(MAKE) $$$$(AM_MAKEFLAGS) install-am/# $$$$(MAKE) $$$$(AM_MAKEFLAGS) install-am/' $(HOST_BUILD_DIR)/Makefile.in +endef + +HOST_CONFIGURE_ARGS+= \ + --enable-clippy-only + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin + $(INSTALL_BIN) $(HOST_BUILD_DIR)/lib/clippy $(STAGING_DIR_HOSTPKG)/bin/ +endef + +CONFIGURE_ARGS+= \ + --with-clippy=$(STAGING_DIR_HOSTPKG)/bin/clippy \ + --prefix=/usr \ + --enable-shared \ + --disable-static \ + --enable-user=network \ + --enable-group=network \ + --disable-ospfclient \ + --disable-doc \ + --disable-backtrace \ + --localstatedir=/var/run/frr \ + --sysconfdir=/etc/frr/ \ + $(if $(CONFIG_FRR_OPENSSL),--with-crypto=openssl,) \ + $(if $(CONFIG_FRR_SNMP),--enable-snmp,) \ + $(foreach m,$(PKG_DAEMON_AVAILABLE), \ + $(call autoconf_bool,CONFIG_PACKAGE_frr-$(m),$(m)) ) \ + $(call autoconf_bool,CONFIG_PACKAGE_frr-vtysh,vtysh) \ + $(call autoconf_bool,CONFIG_PACKAGE_frr-libfrr,zebra) + + +define Package/frr/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d + $(INSTALL_BIN) ./files/frrcommon.sh $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/frr $(1)/etc/init.d/ +endef + +define Package/frr-watchfrr/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) ./files/watchfrr.sh $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchfrr $(1)/usr/sbin/ +endef + +define Package/frr-zebra/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/ +endef + +define Package/frr-libfrr/install + $(INSTALL_DIR) $(1)/usr/lib $(1)/etc/frr + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfrr.so* $(1)/usr/lib/ + $(if $(CONFIG_FRR_SNMP),$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfrrsnmp.so* $(1)/usr/lib/,) + $(INSTALL_CONF) ./files/{frr.conf,daemons} $(1)/etc/frr/ +endef + +define Package/frr-vtysh/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/frr + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/ + $(INSTALL_CONF) ./files/vtysh.conf $(1)/etc/frr/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,frr)) +$(eval $(call BuildPackage,frr-libfrr)) +$(eval $(call BuildPackage,frr-watchfrr)) +$(eval $(call BuildPackage,frr-zebra)) +$(eval $(call BuildPackage,frr-vtysh)) +$(eval $(call BuildDaemon,babeld,)) +$(eval $(call BuildDaemon,bfdd,)) +$(eval $(call BuildDaemon,bgpd,)) +$(eval $(call BuildDaemon,eigrpd,)) +$(eval $(call BuildDaemon,fabricd,)) +$(eval $(call BuildDaemon,isisd,)) +$(eval $(call BuildDaemon,ldpd,)) +$(eval $(call BuildDaemon,nhrpd,+libcares)) +$(eval $(call BuildDaemon,ospfd,)) +$(eval $(call BuildDaemon,ospf6d,@IPV6)) +$(eval $(call BuildDaemon,pbrd,)) +$(eval $(call BuildDaemon,pimd,)) +$(eval $(call BuildDaemon,ripd,)) +$(eval $(call BuildDaemon,ripngd,@IPV6)) +$(eval $(call BuildDaemon,staticd,)) +$(eval $(call BuildDaemon,vrrpd,)) diff --git a/net/frr/files/daemons b/net/frr/files/daemons new file mode 100644 index 00000000..c3a2064f --- /dev/null +++ b/net/frr/files/daemons @@ -0,0 +1,54 @@ +# The watchfrr and zebra daemons are always started. +# +bgpd=no +ospfd=no +#ospfd_instances=1,20 +ospf6d=no +ripd=no +ripngd=no +isisd=no +pimd=no +ldpd=no +nhrpd=no +eigrpd=no +babeld=no +sharpd=no +pbrd=no +bfdd=no +fabricd=no +vrrpd=no + +# +# If this option is set the /etc/init.d/frr script automatically loads +# the config via "vtysh -b" when the servers are started. +# Check /etc/pam.d/frr if you intend to use "vtysh"! +# +vtysh_enable=yes +zebra_options=" -A 127.0.0.1 -s 90000000" +bgpd_options=" -A 127.0.0.1" +ospfd_options=" -A 127.0.0.1" +ospf6d_options=" -A ::1" +ripd_options=" -A 127.0.0.1" +ripngd_options=" -A ::1" +isisd_options=" -A 127.0.0.1" +pimd_options=" -A 127.0.0.1" +ldpd_options=" -A 127.0.0.1" +nhrpd_options=" -A 127.0.0.1" +eigrpd_options=" -A 127.0.0.1" +babeld_options=" -A 127.0.0.1" +sharpd_options=" -A 127.0.0.1" +pbrd_options=" -A 127.0.0.1" +staticd_options="-A 127.0.0.1" +bfdd_options=" -A 127.0.0.1" +fabricd_options="-A 127.0.0.1" +vrrpd_options=" -A 127.0.0.1" + +# The list of daemons to watch is automatically generated by the init script. +#watchfrr_options="" + +# for debugging purposes, you can specify a "wrap" command to start instead +# of starting the daemon directly, e.g. to use valgrind on ospfd: +# ospfd_wrap="/usr/bin/valgrind" +# or you can use "all_wrap" for all daemons, e.g. to use perf record: +# all_wrap="/usr/bin/perf record --call-graph -" +# the normal daemon command is added to this at the end. diff --git a/net/frr/files/frr b/net/frr/files/frr new file mode 100644 index 00000000..caeea21c --- /dev/null +++ b/net/frr/files/frr @@ -0,0 +1,68 @@ +#!/bin/sh /etc/rc.common + +START=95 + +log_success_msg() { + echo "$@" +} +log_warning_msg() { + echo "$@" >&2 +} +log_failure_msg() { + echo "$@" >&2 +} + +self="`dirname $0`" +if [ -r "$self/frrcommon.sh" ]; then + . "$self/frrcommon.sh" +else + . "/usr/sbin/frrcommon.sh" +fi + + +start() { + daemon_list daemons + watchfrr_options="$watchfrr_options $daemons" + daemon_start watchfrr +} +stop() { + daemon_stop watchfrr + all_stop --reallyall + exit ${still_running:-0} +} + +restart() { + daemon_stop watchfrr + all_stop --reallyall + + daemon_list daemons + watchfrr_options="$watchfrr_options $daemons" + daemon_start watchfrr +} + +status() { + fail=0 + print_status watchfrr || fail=1 + all_status || fail=1 + exit $fail +} + +reload() { + if [ ! -x "$RELOAD_SCRIPT" ]; then + log_failure_msg "The frr-pythontools package is required for reload functionality." + exit 1 + fi + + # restart watchfrr to pick up added daemons. + # NB: This will NOT cause the other daemons to be restarted. + daemon_list daemons + watchfrr_options="$watchfrr_options $daemons" + daemon_stop watchfrr && \ + daemon_start watchfrr + + NEW_CONFIG_FILE="${2:-$C_PATH/frr.conf}" + [ ! -r $NEW_CONFIG_FILE ] && log_failure_msg "Unable to read new configuration file $NEW_CONFIG_FILE" && exit 1 + "$RELOAD_SCRIPT" --reload "$NEW_CONFIG_FILE" + exit $? +} + diff --git a/net/frr/files/frr.conf b/net/frr/files/frr.conf new file mode 100644 index 00000000..ee7b4425 --- /dev/null +++ b/net/frr/files/frr.conf @@ -0,0 +1,22 @@ +password zebra +! +!router eigrp 1 +! network 10.0.0.0/8 +! network 192.168.1.0/24 +! +!router ospf +!ospf router-id 172.16.0.2 +!network 192.168.1.0/24 area 0 +!neighbor 172.16.0.1 +! +!router rip +! network 10.0.0.0/8 +! network 192.168.1.0/24 +! +log syslog +! +access-list vty permit 127.0.0.0/8 +access-list vty deny any +! +line vty + access-class vty diff --git a/net/frr/files/frrcommon.sh b/net/frr/files/frrcommon.sh new file mode 100644 index 00000000..d89cd891 --- /dev/null +++ b/net/frr/files/frrcommon.sh @@ -0,0 +1,335 @@ +#!/bin/sh +# +# +# This is a "library" of sorts for use by the other FRR shell scripts. It +# has most of the daemon start/stop logic, but expects the following shell +# functions/commands to be provided by the "calling" script: +# +# log_success_msg +# log_warning_msg +# log_failure_msg +# +# (coincidentally, these are LSB standard functions.) +# +# Sourcing this file in a shell script will load FRR config variables but +# not perform any action. Note there is an "exit 1" if the main config +# file does not exist. +# +# This script should be installed in /usr/sbin/frrcommon.sh + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +D_PATH="/usr/sbin" # /usr/lib/frr +C_PATH="/etc/frr" # /etc/frr +V_PATH="/var/run/frr" # /var/run/frr +VTYSH="/usr/bin/vtysh" # /usr/bin/vtysh +FRR_USER="network" # frr +FRR_GROUP="network" # frr +FRR_VTY_GROUP="" # frrvty + +# ORDER MATTERS FOR $DAEMONS! +# - keep zebra first +# - watchfrr does NOT belong in this list + +DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd bfdd fabricd vrrpd" +RELOAD_SCRIPT="$D_PATH/frr-reload.py" + +# +# general helpers +# + +debug() { + [ -n "$watchfrr_debug" ] || return 0 + + printf '%s %s(%s):' "`date +%Y-%m-%dT%H:%M:%S.%N`" "$0" $$ >&2 + # this is to show how arguments are split regarding whitespace & co. + # (e.g. for use with `debug "message" "$@"`) + while [ $# -gt 0 ]; do + printf ' "%s"' "$1" >&2 + shift + done + printf '\n' >&2 +} + +chownfrr() { + [ -n "$FRR_USER" ] && chown "$FRR_USER" "$1" + [ -n "$FRR_GROUP" ] && chgrp "$FRR_GROUP" "$1" +} + +vtysh_b () { + [ "$1" = "watchfrr" ] && return 0 + [ -r "$C_PATH/frr.conf" ] || return 0 + if [ -n "$1" ]; then + "$VTYSH" -b -n -d "$1" + else + "$VTYSH" -b -n + fi +} + +daemon_inst() { + # note this sets global variables ($dmninst, $daemon, $inst) + dmninst="$1" + daemon="${dmninst%-*}" + inst="" + [ "$daemon" != "$dmninst" ] && inst="${dmninst#*-}" +} + +daemon_list() { + # note $1 and $2 specify names for global variables to be set + local enabled disabled evar dvar + enabled="" + disabled="" + evar="$1" + dvar="$2" + + for daemon in $DAEMONS; do + eval cfg=\$$daemon + eval inst=\$${daemon}_instances + [ "$daemon" = zebra -o "$daemon" = staticd ] && cfg=yes + if [ -n "$cfg" -a "$cfg" != "no" -a "$cfg" != "0" ]; then + if ! daemon_prep "$daemon" "$inst"; then + continue + fi + debug "$daemon enabled" + enabled="$enabled $daemon" + if [ -n "$inst" ]; then + debug "$daemon multi-instance $inst" + oldifs="${IFS}" + IFS="${IFS}," + for i in $inst; do + enabled="$enabled $daemon-$i" + done + IFS="${oldifs}" + fi + else + debug "$daemon disabled" + disabled="$disabled $daemon" + fi + done + + enabled="${enabled# }" + disabled="${disabled# }" + [ -z "$evar" ] && echo "$enabled" + [ -n "$evar" ] && eval $evar="\"$enabled\"" + [ -n "$dvar" ] && eval $dvar="\"$disabled\"" +} + +# +# individual daemon management +# + +daemon_prep() { + local daemon inst cfg + daemon="$1" + inst="$2" + [ "$daemon" = "watchfrr" ] && return 0 + [ -x "$D_PATH/$daemon" ] || { + log_failure_msg "cannot start $daemon${inst:+ (instance $inst)}: daemon binary not installed" + return 1 + } + [ -r "$C_PATH/frr.conf" ] && return 0 + + cfg="$C_PATH/$daemon${inst:+-$inst}.conf" + if [ ! -r "$cfg" ]; then + touch "$cfg" + chownfrr "$cfg" + fi + return 0 +} + +daemon_start() { + local dmninst daemon inst args instopt wrap bin + daemon_inst "$1" + + ulimit -n $MAX_FDS > /dev/null 2> /dev/null + daemon_prep "$daemon" "$inst" || return 1 + if test ! -d "$V_PATH"; then + mkdir -p "$V_PATH" + chown $FRR_USER "$V_PATH" + fi + + eval wrap="\$${daemon}_wrap" + bin="$D_PATH/$daemon" + instopt="${inst:+-n $inst}" + eval args="\$${daemon}_options" + + if eval "$all_wrap $wrap $bin -d $instopt $args"; then + log_success_msg "Started $dmninst" + vtysh_b "$daemon" + else + log_failure_msg "Failed to start $dmninst!" + fi +} + +daemon_stop() { + local dmninst daemon inst pidfile vtyfile pid cnt fail + daemon_inst "$1" + + pidfile="$V_PATH/$daemon${inst:+-$inst}.pid" + vtyfile="$V_PATH/$daemon${inst:+-$inst}.vty" + + [ -r "$pidfile" ] || fail="pid file not found" + [ -z "$fail" ] && pid="`cat \"$pidfile\"`" + [ -z "$fail" -a -z "$pid" ] && fail="pid file is empty" + [ -n "$fail" ] || kill -0 "$pid" 2>/dev/null || fail="pid $pid not running" + + if [ -n "$fail" ]; then + log_failure_msg "Cannot stop $dmninst: $fail" + return 1 + fi + + debug "kill -2 $pid" + kill -2 "$pid" + cnt=1200 + while kill -0 "$pid" 2>/dev/null; do + sleep 1 + [ $(( cnt -= 1 )) -gt 0 ] || break + done + if kill -0 "$pid" 2>/dev/null; then + log_failure_msg "Failed to stop $dmninst, pid $pid still running" + still_running=1 + return 1 + else + log_success_msg "Stopped $dmninst" + rm -f "$pidfile" + return 0 + fi +} + +daemon_status() { + local dmninst daemon inst pidfile pid fail + daemon_inst "$1" + + pidfile="$V_PATH/$daemon${inst:+-$inst}.pid" + + [ -r "$pidfile" ] || return 3 + pid="`cat \"$pidfile\"`" + [ -z "$pid" ] && return 1 + kill -0 "$pid" 2>/dev/null || return 1 + return 0 +} + +print_status() { + daemon_status "$1" + rv=$? + if [ "$rv" -eq 0 ]; then + log_success_msg "Status of $1: running" + else + log_failure_msg "Status of $1: FAILED" + fi + return $rv +} + +# +# all-daemon commands +# + +all_start() { + daemon_list daemons + for dmninst in $daemons; do + daemon_start "$dmninst" + done +} + +all_stop() { + local pids reversed + + daemon_list daemons disabled + [ "$1" = "--reallyall" ] && daemons="$daemons $disabled" + + reversed="" + for dmninst in $daemons; do + reversed="$dmninst $reversed" + done + + for dmninst in $reversed; do + daemon_stop "$dmninst" & + pids="$pids $!" + done + for pid in $pids; do + wait $pid + done +} + +all_status() { + local fail + + daemon_list daemons + fail=0 + for dmninst in $daemons; do + print_status "$dmninst" || fail=1 + done + return $fail +} + +# +# config sourcing +# + +load_old_config() { + oldcfg="$1" + [ -r "$oldcfg" ] || return 0 + [ -s "$oldcfg" ] || return 0 + grep -v '^[[:blank:]]*\(#\|$\)' "$oldcfg" > /dev/null || return 0 + + log_warning_msg "Reading deprecated $oldcfg. Please move its settings to $C_PATH/daemons and remove it." + + # save off settings from daemons for the OR below + for dmn in $DAEMONS; do eval "_new_$dmn=\${$dmn:-no}"; done + + . "$oldcfg" + + # OR together the daemon enabling options between config files + for dmn in $DAEMONS; do eval "test \$_new_$dmn != no && $dmn=\$_new_$dmn; unset _new_$dmn"; done +} + +[ -r "$C_PATH/daemons" ] || { + log_failure_msg "cannot run $@: $C_PATH/daemons does not exist" + exit 1 +} +. "$C_PATH/daemons" + +load_old_config "$C_PATH/daemons.conf" +load_old_config "/etc/default/frr" +load_old_config "/etc/sysconfig/frr" + +if { declare -p watchfrr_options 2>/dev/null || true; } | grep -q '^declare \-a'; then + log_warning_msg "watchfrr_options contains a bash array value." \ + "The configured value is intentionally ignored since it is likely wrong." \ + "Please remove or fix the setting." + unset watchfrr_options +fi + +# +# other defaults and dispatch +# + +frrcommon_main() { + local cmd + + debug "frrcommon_main" "$@" + + cmd="$1" + shift + + if [ "$1" = "all" -o -z "$1" ]; then + case "$cmd" in + start) all_start;; + stop) all_stop;; + restart) + all_stop + all_start + ;; + *) $cmd "$@";; + esac + else + case "$cmd" in + start) daemon_start "$@";; + stop) daemon_stop "$@";; + restart) + daemon_stop "$@" + daemon_start "$@" + ;; + *) $cmd "$@";; + esac + fi +} diff --git a/net/frr/files/vtysh.conf b/net/frr/files/vtysh.conf new file mode 100644 index 00000000..4e0a2beb --- /dev/null +++ b/net/frr/files/vtysh.conf @@ -0,0 +1,7 @@ +! +! Sample configuration file for vtysh. +! +!service integrated-vtysh-config +!hostname quagga-router +!username root nopassword +! diff --git a/net/frr/files/watchfrr.sh b/net/frr/files/watchfrr.sh new file mode 100644 index 00000000..aae461c1 --- /dev/null +++ b/net/frr/files/watchfrr.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# +# This is NOT the init script! This is the watchfrr start/stop/restart +# command handler, passed to watchfrr with the -s/-r/-k commands. It is used +# internally by watchfrr to start the protocol daemons with the appropriate +# options. +# +# This script should be installed in /usr/sbin/watchfrr.sh + +log_success_msg() { + : +} + +log_warning_msg() { + echo "$@" >&2 + [ -x /usr/bin/logger ] && echo "$@" \ + | /usr/bin/logger -t watchfrr.sh -p daemon.warn +} + +log_failure_msg() { + echo "$@" >&2 + [ -x /usr/bin/logger ] && echo "$@" \ + | /usr/bin/logger -t watchfrr.sh -p daemon.err +} + +self="`dirname $0`" +if [ -r "$self/frrcommon.sh" ]; then + . "$self/frrcommon.sh" +else + . "/usr/sbin/frrcommon.sh" +fi + +chownfrr $V_PATH + +frrcommon_main "$@" diff --git a/net/frr/patches/001-vti_interface_fix.patch b/net/frr/patches/001-vti_interface_fix.patch new file mode 100644 index 00000000..5f9573e3 --- /dev/null +++ b/net/frr/patches/001-vti_interface_fix.patch @@ -0,0 +1,26 @@ +--- a/zebra/zebra_nhg.c 2019-10-18 01:59:17.582282539 +0300 ++++ b/zebra/zebra_nhg.c 2019-10-18 02:00:17.501997253 +0300 +@@ -1456,20 +1456,9 @@ + while (rn) { + route_unlock_node(rn); + +- /* Lookup should halt if we've matched against ourselves ('top', +- * if specified) - i.e., we cannot have a nexthop NH1 is +- * resolved by a route NH1. The exception is if the route is a +- * host route. +- */ +- if (top && rn == top) +- if (((afi == AFI_IP) && (rn->p.prefixlen != 32)) +- || ((afi == AFI_IP6) && (rn->p.prefixlen != 128))) { +- if (IS_ZEBRA_DEBUG_RIB_DETAILED) +- zlog_debug( +- "\t%s: Matched against ourself and prefix length is not max bit length", +- __PRETTY_FUNCTION__); +- return 0; +- } ++ /* If lookup self prefix return immediately. */ ++ if (rn == top) ++ return 0; + + /* Pick up selected route. */ + /* However, do not resolve over default route unless explicitly diff --git a/net/frr/patches/010-add_yahng_filter.patch b/net/frr/patches/010-add_yahng_filter.patch new file mode 100644 index 00000000..2409dd84 --- /dev/null +++ b/net/frr/patches/010-add_yahng_filter.patch @@ -0,0 +1,385 @@ +From 2332428d3c80ac3d3b4e1c0bdba830b098ef440f Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Fri, 5 Jul 2019 11:07:30 -0300 +Subject: [PATCH] yang: initial filter YANG model import + +This model contains the description of access-list, prefix-list and +other lists used by route map and other filtering interfaces. + +Signed-off-by: Rafael Zalamena +--- + yang/frr-filter.yang | 365 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 365 insertions(+) + create mode 100644 yang/frr-filter.yang + +diff --git a/yang/frr-filter.yang b/yang/frr-filter.yang +new file mode 100644 +index 0000000000..92af6aebfd +--- /dev/null ++++ b/yang/frr-filter.yang +@@ -0,0 +1,365 @@ ++module frr-filter { ++ yang-version 1.1; ++ namespace "http://frrouting.org/yang/filter"; ++ prefix frr-filter; ++ ++ import ietf-inet-types { ++ prefix inet; ++ } ++ import ietf-yang-types { ++ prefix yang; ++ } ++ ++ organization "Free Range Routing"; ++ contact ++ "FRR Users List: ++ FRR Development List: "; ++ description "This module defines filter settings"; ++ ++ revision 2019-07-04 { ++ description "Initial revision"; ++ } ++ ++ /* ++ * Types. ++ */ ++ typedef access-list-standard { ++ description "Standard IPv4 access list (any, host or a prefix)"; ++ type uint16 { ++ range "1..99 | 1300..1999"; ++ } ++ } ++ ++ typedef access-list-extended { ++ description ++ "Extended IPv4 access list (source / destination any, hosts or prefixes)"; ++ type uint16 { ++ range "100..199 | 2000..2699"; ++ } ++ } ++ ++ typedef access-list-legacy { ++ description "Standard/Extended IPv4 access list"; ++ type uint16 { ++ range "1..199 | 1300..2699"; ++ } ++ } ++ ++ typedef access-list-name { ++ description "Access list name formatting"; ++ type string; ++ } ++ ++ typedef access-list-sequence { ++ description "Access list sequence number"; ++ type uint32 { ++ range "1..4294967295"; ++ } ++ } ++ ++ typedef access-list-action { ++ description "Access list return action on match"; ++ type enumeration { ++ enum deny { ++ description "Deny an entry"; ++ value 0; ++ } ++ enum permit { ++ description "Accept an entry"; ++ value 1; ++ } ++ } ++ } ++ ++ /* ++ * Configuration data. ++ */ ++ container filter-list { ++ list access-list-legacy { ++ description "Access list legacy instance"; ++ ++ key "number sequence"; ++ ++ leaf number { ++ description "Access list sequence value"; ++ type access-list-legacy; ++ } ++ ++ leaf sequence { ++ description "Access list sequence value"; ++ type access-list-sequence; ++ } ++ ++ leaf action { ++ description "Access list action on match"; ++ type access-list-action; ++ mandatory true; ++ } ++ ++ leaf remark { ++ description "Access list remark"; ++ type string; ++ } ++ ++ choice value { ++ description ++ "Standard access list: value to match. ++ Extended access list: source value to match."; ++ mandatory true; ++ ++ case host { ++ leaf host { ++ description "Host to match"; ++ type inet:ipv4-address; ++ } ++ } ++ case network { ++ leaf network { ++ description "Network to match"; ++ type inet:ipv4-prefix; ++ } ++ } ++ case any { ++ leaf any { ++ description "Match any"; ++ type empty; ++ } ++ } ++ } ++ ++ choice extended-value { ++ when "./sequence >= 100 and ./sequence <= 199 or ++ ./sequence >= 2000 and ./sequence <= 2699"; ++ description "Destination value to match"; ++ ++ case destination-host { ++ leaf destination-host { ++ description "Host to match"; ++ type inet:ipv4-address; ++ } ++ } ++ case destination-network { ++ leaf destination-network { ++ description "Network to match"; ++ type inet:ipv4-prefix; ++ } ++ } ++ case destination-any { ++ leaf destination-any { ++ description "Match any"; ++ type empty; ++ } ++ } ++ } ++ } ++ ++ list access-list { ++ description "Access list instance"; ++ ++ key "type identifier sequence"; ++ ++ leaf type { ++ description "Access list content type"; ++ type enumeration { ++ enum ipv4 { ++ description "Internet Protocol address version 4"; ++ value 0; ++ } ++ enum ipv6 { ++ description "Internet Protocol address version 6"; ++ value 1; ++ } ++ enum mac { ++ description "Media Access Control address"; ++ value 2; ++ } ++ ++ /* ++ * Protocol YANG models should augment the parent node to ++ * contain the routing protocol specific value. The protocol ++ * must also augment `value` leaf to include its specific ++ * values or expand the `when` statement on the existing cases. ++ */ ++ enum custom { ++ description "Custom data type"; ++ value 100; ++ } ++ } ++ } ++ ++ leaf identifier { ++ description "Access list identifier"; ++ type access-list-name; ++ } ++ ++ leaf sequence { ++ description "Access list sequence value"; ++ type access-list-sequence; ++ } ++ ++ leaf action { ++ description "Access list action on match"; ++ type access-list-action; ++ mandatory true; ++ } ++ ++ leaf remark { ++ description "Access list remark"; ++ type string; ++ } ++ ++ choice value { ++ description "Access list value to match"; ++ mandatory true; ++ ++ case ipv4-prefix { ++ when "./type = 'ipv4'"; ++ ++ leaf ipv4-prefix { ++ description "Configure IPv4 prefix to match"; ++ type inet:ipv4-prefix; ++ } ++ ++ leaf ipv4-exact-match { ++ description "Exact match of prefix"; ++ type boolean; ++ default false; ++ } ++ } ++ case ipv6-prefix { ++ when "./type = 'ipv6'"; ++ ++ leaf ipv6-prefix { ++ description "Configure IPv6 prefix to match"; ++ type inet:ipv6-prefix; ++ } ++ ++ leaf ipv6-exact-match { ++ description "Exact match of prefix"; ++ type boolean; ++ default false; ++ } ++ } ++ case mac { ++ when "./type = 'mac'"; ++ ++ leaf mac { ++ description "Configure MAC address to match"; ++ type yang:mac-address; ++ } ++ } ++ case any { ++ leaf any { ++ description "Match anything"; ++ type empty; ++ } ++ } ++ } ++ } ++ ++ list prefix-list { ++ description "Prefix list instance"; ++ ++ key "type name sequence"; ++ ++ leaf type { ++ description "Prefix list type"; ++ type enumeration { ++ enum ipv4 { ++ description "Internet Protocol address version 4"; ++ value 0; ++ } ++ enum ipv6 { ++ description "Internet Protocol address version 6"; ++ value 1; ++ } ++ } ++ } ++ ++ leaf name { ++ description "Prefix list name"; ++ type access-list-name; ++ } ++ ++ leaf sequence { ++ description "Access list sequence value"; ++ type access-list-sequence; ++ } ++ ++ leaf action { ++ description "Prefix list action on match"; ++ type access-list-action; ++ mandatory true; ++ } ++ ++ leaf description { ++ description "Prefix list user description"; ++ type string; ++ } ++ ++ choice value { ++ description "Prefix list value to match"; ++ mandatory true; ++ ++ case ipv4-prefix { ++ when "./type = 'ipv4'"; ++ ++ leaf ipv4-prefix { ++ description "Configure IPv4 prefix to match"; ++ type inet:ipv4-prefix; ++ } ++ ++ leaf ipv4-prefix-length-greater-or-equal { ++ description ++ "Specifies if matching prefixes with length greater than ++ or equal to value"; ++ type uint8 { ++ range "0..32"; ++ } ++ } ++ ++ leaf ipv4-prefix-length-lesser-or-equal { ++ description ++ "Specifies if matching prefixes with length lesser than ++ or equal to value"; ++ type uint8 { ++ range "0..32"; ++ } ++ } ++ } ++ case ipv6-prefix { ++ when "./type = 'ipv6'"; ++ ++ leaf ipv6-prefix { ++ description "Configure IPv6 prefix to match"; ++ type inet:ipv6-prefix; ++ } ++ ++ leaf ipv6-prefix-length-greater-or-equal { ++ description ++ "Specifies if matching prefixes with length greater than ++ or equal to value"; ++ type uint8 { ++ range "0..128"; ++ } ++ } ++ ++ leaf ipv6-prefix-length-lesser-or-equal { ++ description ++ "Specifies if matching prefixes with length lesser than ++ or equal to value"; ++ type uint8 { ++ range "0..128"; ++ } ++ } ++ } ++ case any { ++ leaf any { ++ description "Match anything"; ++ type empty; ++ } ++ } ++ } ++ } ++ } ++} diff --git a/net/frr/patches/010-add_yang_routemap.patch b/net/frr/patches/010-add_yang_routemap.patch new file mode 100644 index 00000000..7026acb6 --- /dev/null +++ b/net/frr/patches/010-add_yang_routemap.patch @@ -0,0 +1,390 @@ +--- a/dev/null 2020-04-10 18:48:03.582667900 +0300 ++++ b/yang/frr-route-map.yang 2020-05-02 11:43:04.182956847 +0300 +@@ -0,0 +1,387 @@ ++module frr-route-map { ++ yang-version 1.1; ++ namespace "http://frrouting.org/yang/route-map"; ++ prefix frr-route-map; ++ ++ import ietf-inet-types { ++ prefix inet; ++ } ++ import frr-filter { ++ prefix filter; ++ } ++ import frr-interface { ++ prefix frr-interface; ++ } ++ ++ organization "FRRouting"; ++ contact ++ "FRR Users List: ++ FRR Development List: "; ++ description "This module defines route map settings"; ++ ++ revision 2019-07-01 { ++ description "Initial revision"; ++ } ++ ++ /* ++ * Types. ++ */ ++ typedef route-map-sequence { ++ description "Route map valid sequence numbers"; ++ type uint16 { ++ range "1..65535"; ++ } ++ } ++ ++ typedef route-map-name { ++ description "Route map name format"; ++ type string; ++ } ++ ++ /* ++ * Operational data. ++ */ ++ container lib { ++ list route-map { ++ description "Route map instance"; ++ ++ key "name"; ++ ++ leaf name { ++ description "Route map instance name"; ++ type route-map-name; ++ } ++ ++ list entry { ++ description "Route map entry"; ++ ++ key "sequence"; ++ ++ leaf sequence { ++ description ++ "Route map instance priority (low number means higher priority)"; ++ type route-map-sequence; ++ } ++ ++ leaf description { ++ description "Route map description"; ++ type string; ++ } ++ ++ leaf action { ++ description ++ "Route map actions: permit (executes action), deny (quits evaluation)"; ++ mandatory true; ++ type enumeration { ++ enum permit { ++ description ++ "Executes configured action and permits the prefix/route ++ if the conditions matched. An alternative exit action can ++ be configured to continue processing the route map list ++ or jump to process another route map."; ++ value 0; ++ } ++ enum deny { ++ description ++ "If all conditions are met the prefix/route is denied and ++ route map processing stops."; ++ value 1; ++ } ++ } ++ } ++ ++ leaf call { ++ description ++ "Call another route map before calling `exit-policy`. If the ++ called route map returns deny then this route map will also ++ return deny"; ++ type route-map-name; ++ } ++ ++ leaf exit-policy { ++ description "What do to after route map successful match, set and call"; ++ type enumeration { ++ enum permit-or-deny { ++ description "End route map evaluation and return"; ++ value 0; ++ } ++ enum next { ++ description ++ "Proceed evaluating next route map entry per sequence"; ++ value 1; ++ } ++ enum goto { ++ description ++ "Go to route map entry with the provided sequence number"; ++ value 2; ++ } ++ } ++ default "permit-or-deny"; ++ } ++ ++ leaf goto-value { ++ when "../exit-policy = 'goto'"; ++ description ++ "Sequence number to jump (when using `goto` exit policy)"; ++ mandatory true; ++ type route-map-sequence; ++ } ++ ++ list match-condition { ++ description "Route map match conditions"; ++ ++ key "condition"; ++ ++ leaf condition { ++ description "Match condition"; ++ type enumeration { ++ enum interface { ++ description "Match interface"; ++ value 0; ++ } ++ enum ipv4-address-list { ++ description "Match an IPv4 access-list"; ++ value 1; ++ } ++ enum ipv4-prefix-list { ++ description "Match an IPv4 prefix-list"; ++ value 2; ++ } ++ enum ipv4-next-hop-list { ++ description "Match an IPv4 next-hop"; ++ value 3; ++ } ++ enum ipv4-next-hop-prefix-list { ++ description "Match an IPv4 next-hop prefix list"; ++ value 4; ++ } ++ enum ipv4-next-hop-type { ++ description "Match an IPv4 next-hop type"; ++ value 5; ++ } ++ enum ipv6-address-list { ++ description "Match an IPv6 access-list"; ++ value 6; ++ } ++ enum ipv6-prefix-list { ++ description "Match an IPv6 prefix-list"; ++ value 7; ++ } ++ enum ipv6-next-hop-type { ++ description "Match an IPv6 next-hop type"; ++ value 8; ++ } ++ enum metric { ++ description "Match a route metric"; ++ value 9; ++ } ++ enum tag { ++ description "Match a route tag"; ++ value 10; ++ } ++ /* zebra specific conditions. */ ++ enum ipv4-prefix-length { ++ description "Match IPv4 prefix length"; ++ value 100; ++ } ++ enum ipv6-prefix-length { ++ description "Match IPv6 prefix length"; ++ value 101; ++ } ++ enum ipv4-next-hop-prefix-length { ++ description "Match next-hop prefix length"; ++ value 102; ++ } ++ enum source-protocol { ++ description "Match source protocol"; ++ value 103; ++ } ++ enum source-instance { ++ description "Match source protocol instance"; ++ value 104; ++ } ++ } ++ } ++ ++ choice condition-value { ++ description ++ "Value to match (interpretation depends on condition type)"; ++ mandatory true; ++ case interface { ++ when "./condition = 'interface'"; ++ leaf interface { ++ type string; ++ } ++ } ++ case access-list-num { ++ when "./condition = 'ipv4-address-list' or ++ ./condition = 'ipv4-next-hop-list'"; ++ leaf access-list-num { ++ type filter:access-list-standard; ++ } ++ } ++ case access-list-num-extended { ++ when "./condition = 'ipv4-address-list' or ++ ./condition = 'ipv4-next-hop-list'"; ++ leaf access-list-num-extended { ++ type filter:access-list-extended; ++ } ++ } ++ case list-name { ++ when "./condition = 'ipv4-address-list' or ++ ./condition = 'ipv4-prefix-list' or ++ ./condition = 'ipv4-next-hop-list' or ++ ./condition = 'ipv4-next-hop-prefix-list' or ++ ./condition = 'ipv6-address-list' or ++ ./condition = 'ipv6-prefix-list'"; ++ leaf list-name { ++ type filter:access-list-name; ++ } ++ } ++ case ipv4-next-hop-type { ++ when "./condition = 'ipv4-next-hop-type'"; ++ leaf ipv4-next-hop-type { ++ type enumeration { ++ enum blackhole { ++ value 0; ++ } ++ } ++ } ++ } ++ case ipv6-next-hop-type { ++ when "./condition = 'ipv6-next-hop-type'"; ++ leaf ipv6-next-hop-type { ++ type enumeration { ++ enum blackhole { ++ value 0; ++ } ++ } ++ } ++ } ++ case metric { ++ when "./condition = 'metric'"; ++ leaf metric { ++ type uint32 { ++ range "1..4294967295"; ++ } ++ } ++ } ++ case tag { ++ when "./condition = 'tag'"; ++ leaf tag { ++ type uint32 { ++ range "1..4294967295"; ++ } ++ } ++ } ++ } ++ } ++ ++ list set-action { ++ description "Route map set actions"; ++ ++ key "action"; ++ ++ leaf action { ++ description "Action to do when the route map matches"; ++ type enumeration { ++ enum ipv4-next-hop { ++ description "Set IPv4 address of the next hop"; ++ value 0; ++ } ++ enum ipv6-next-hop { ++ description "Set IPv6 address of the next hop"; ++ value 1; ++ } ++ enum metric { ++ description "Set prefix/route metric"; ++ value 2; ++ } ++ enum tag { ++ description "Set tag"; ++ value 3; ++ } ++ /* zebra specific conditions. */ ++ enum source { ++ description "Set source address for route"; ++ value 100; ++ } ++ } ++ } ++ ++ choice action-value { ++ description ++ "Value to set (interpretation depends on action-type)"; ++ case ipv4-address { ++ when "./action = 'ipv4-next-hop'"; ++ leaf ipv4-address { ++ description "IPv4 address"; ++ type inet:ipv4-address; ++ } ++ } ++ case ipv6-address { ++ when "./action = 'ipv6-next-hop'"; ++ leaf ipv6-address { ++ description "IPv6 address"; ++ type inet:ipv6-address; ++ } ++ } ++ case metric { ++ when "./action = 'metric'"; ++ choice metric-value { ++ description "Metric to set or use"; ++ case value { ++ leaf value { ++ description "Use the following metric value"; ++ type uint32 { ++ range "0..4294967295"; ++ } ++ } ++ } ++ case add-metric { ++ leaf add-metric { ++ description "Add unit to metric"; ++ type boolean; ++ } ++ } ++ case subtract-metric { ++ leaf subtract-metric { ++ description "Subtract unit from metric"; ++ type boolean; ++ } ++ } ++ case use-round-trip-time { ++ leaf use-round-trip-time { ++ description "Use the round trip time as metric"; ++ type boolean; ++ } ++ } ++ case add-round-trip-time { ++ leaf add-round-trip-time { ++ description "Add round trip time to metric"; ++ type boolean; ++ } ++ } ++ case subtract-round-trip-time { ++ leaf subtract-round-trip-time { ++ description "Subtract round trip time to metric"; ++ type boolean; ++ } ++ } ++ } ++ } ++ case tag { ++ when "./action = 'tag'"; ++ leaf tag { ++ description "Tag value"; ++ type uint32 { ++ range "0..4294967295"; ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++} diff --git a/net/frr/patches/011-mod_yang_routemap_model.patch b/net/frr/patches/011-mod_yang_routemap_model.patch new file mode 100644 index 00000000..ac561370 --- /dev/null +++ b/net/frr/patches/011-mod_yang_routemap_model.patch @@ -0,0 +1,5045 @@ +From 0c0e73045b1898610eef9309b9f5927254356710 Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Fri, 27 Sep 2019 19:32:10 -0300 +Subject: [PATCH 01/10] yang: update route map model + +Important changes: + + * Rename top container `route-map` to `lib`; + * Rename list `instance` to `route-map`; + * Move route map repeated data to list `entry`; + * Use interface reference instead of typedef'ed string; + * Remove some zebra specific route map conditions; + * Protect `tag` set value with `when "./action = 'tag'"`; + +Signed-off-by: Rafael Zalamena +--- +From a7282663eff6f036a427165b7fa73c75dccd47ff Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Mon, 30 Sep 2019 10:17:33 -0300 +Subject: [PATCH 02/10] lib: export route map structures and functions + +These exported items are going to be used by the new northbound CLI. + +Signed-off-by: Rafael Zalamena +--- + lib/routemap.c | 213 ++----------------------------------------------- + lib/routemap.h | 209 ++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 216 insertions(+), 206 deletions(-) + +diff --git a/lib/routemap.c b/lib/routemap.c +index 14fec0283c..a8feebd313 100644 +--- a/lib/routemap.c ++++ b/lib/routemap.c +@@ -50,178 +50,7 @@ static vector route_match_vec; + /* Vector for route set rules. */ + static vector route_set_vec; + +-struct route_map_match_set_hooks { +- /* match interface */ +- int (*match_interface)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* no match interface */ +- int (*no_match_interface)(struct vty *vty, +- struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* match ip address */ +- int (*match_ip_address)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* no match ip address */ +- int (*no_match_ip_address)(struct vty *vty, +- struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* match ip address prefix list */ +- int (*match_ip_address_prefix_list)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* no match ip address prefix list */ +- int (*no_match_ip_address_prefix_list)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* match ip next hop */ +- int (*match_ip_next_hop)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* no match ip next hop */ +- int (*no_match_ip_next_hop)(struct vty *vty, +- struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* match ip next hop prefix list */ +- int (*match_ip_next_hop_prefix_list)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* no match ip next hop prefix list */ +- int (*no_match_ip_next_hop_prefix_list)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* match ip next-hop type */ +- int (*match_ip_next_hop_type)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* no match ip next-hop type */ +- int (*no_match_ip_next_hop_type)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* match ipv6 address */ +- int (*match_ipv6_address)(struct vty *vty, +- struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* no match ipv6 address */ +- int (*no_match_ipv6_address)(struct vty *vty, +- struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- +- /* match ipv6 address prefix list */ +- int (*match_ipv6_address_prefix_list)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* no match ipv6 address prefix list */ +- int (*no_match_ipv6_address_prefix_list)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* match ipv6 next-hop type */ +- int (*match_ipv6_next_hop_type)(struct vty *vty, +- struct route_map_index *index, +- const char *command, +- const char *arg, +- route_map_event_t type); +- +- /* no match ipv6 next-hop type */ +- int (*no_match_ipv6_next_hop_type)(struct vty *vty, +- struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* match metric */ +- int (*match_metric)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* no match metric */ +- int (*no_match_metric)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* match tag */ +- int (*match_tag)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* no match tag */ +- int (*no_match_tag)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg, +- route_map_event_t type); +- +- /* set ip nexthop */ +- int (*set_ip_nexthop)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg); +- +- /* no set ip nexthop */ +- int (*no_set_ip_nexthop)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg); +- +- /* set ipv6 nexthop local */ +- int (*set_ipv6_nexthop_local)(struct vty *vty, +- struct route_map_index *index, +- const char *command, const char *arg); +- +- /* no set ipv6 nexthop local */ +- int (*no_set_ipv6_nexthop_local)(struct vty *vty, +- struct route_map_index *index, +- const char *command, const char *arg); +- +- /* set metric */ +- int (*set_metric)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg); +- +- /* no set metric */ +- int (*no_set_metric)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg); +- +- /* set tag */ +- int (*set_tag)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg); +- +- /* no set tag */ +- int (*no_set_tag)(struct vty *vty, struct route_map_index *index, +- const char *command, const char *arg); +-}; +- +-static struct route_map_match_set_hooks rmap_match_set_hook; ++struct route_map_match_set_hooks rmap_match_set_hook; + + /* match interface */ + void route_map_match_interface_hook(int (*func)( +@@ -595,35 +424,9 @@ int generic_set_delete(struct vty *vty, struct route_map_index *index, + } + + +-/* Route map rule. This rule has both `match' rule and `set' rule. */ +-struct route_map_rule { +- /* Rule type. */ +- const struct route_map_rule_cmd *cmd; +- +- /* For pretty printing. */ +- char *rule_str; +- +- /* Pre-compiled match rule. */ +- void *value; +- +- /* Linked list. */ +- struct route_map_rule *next; +- struct route_map_rule *prev; +-}; +- +-/* Making route map list. */ +-struct route_map_list { +- struct route_map *head; +- struct route_map *tail; +- +- void (*add_hook)(const char *); +- void (*delete_hook)(const char *); +- void (*event_hook)(const char *); +-}; +- + /* Master list of route map. */ +-static struct route_map_list route_map_master = {NULL, NULL, NULL, NULL, NULL}; +-static struct hash *route_map_master_hash = NULL; ++struct route_map_list route_map_master = {NULL, NULL, NULL, NULL, NULL}; ++struct hash *route_map_master_hash = NULL; + + static unsigned int route_map_hash_key_make(const void *p) + { +@@ -691,8 +494,6 @@ static void route_map_rule_delete(struct route_map_rule_list *, + struct route_map_rule *); + static bool rmap_debug; + +-static void route_map_index_delete(struct route_map_index *, int); +- + /* New route map allocation. Please note route map's name must be + specified. */ + static struct route_map *route_map_new(const char *name) +@@ -784,7 +585,7 @@ static void route_map_free_map(struct route_map *map) + } + + /* Route map delete from list. */ +-static void route_map_delete(struct route_map *map) ++void route_map_delete(struct route_map *map) + { + struct route_map_index *index; + char *name; +@@ -883,7 +684,7 @@ static int route_map_clear_updated(struct route_map *map) + + /* Lookup route map. If there isn't route map create one and return + it. */ +-static struct route_map *route_map_get(const char *name) ++struct route_map *route_map_get(const char *name) + { + struct route_map *map; + +@@ -1097,7 +898,7 @@ static struct route_map_index *route_map_index_new(void) + } + + /* Free route map index. */ +-static void route_map_index_delete(struct route_map_index *index, int notify) ++void route_map_index_delete(struct route_map_index *index, int notify) + { + struct route_map_rule *rule; + +@@ -1202,7 +1003,7 @@ route_map_index_add(struct route_map *map, enum route_map_type type, int pref) + } + + /* Get route map index. */ +-static struct route_map_index * ++struct route_map_index * + route_map_index_get(struct route_map *map, enum route_map_type type, int pref) + { + struct route_map_index *index; +diff --git a/lib/routemap.h b/lib/routemap.h +index 1ffd0525ae..41959c24e5 100644 +--- a/lib/routemap.h ++++ b/lib/routemap.h +@@ -140,6 +140,22 @@ enum rmap_compile_rets { + + }; + ++/* Route map rule. This rule has both `match' rule and `set' rule. */ ++struct route_map_rule { ++ /* Rule type. */ ++ const struct route_map_rule_cmd *cmd; ++ ++ /* For pretty printing. */ ++ char *rule_str; ++ ++ /* Pre-compiled match rule. */ ++ void *value; ++ ++ /* Linked list. */ ++ struct route_map_rule *next; ++ struct route_map_rule *prev; ++}; ++ + /* Route map rule list. */ + struct route_map_rule_list { + struct route_map_rule *head; +@@ -435,6 +451,199 @@ extern void route_map_counter_increment(struct route_map *map); + /* Decrement the route-map used counter */ + extern void route_map_counter_decrement(struct route_map *map); + ++/* Route map hooks data structure. */ ++struct route_map_match_set_hooks { ++ /* match interface */ ++ int (*match_interface)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* no match interface */ ++ int (*no_match_interface)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* match ip address */ ++ int (*match_ip_address)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* no match ip address */ ++ int (*no_match_ip_address)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* match ip address prefix list */ ++ int (*match_ip_address_prefix_list)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* no match ip address prefix list */ ++ int (*no_match_ip_address_prefix_list)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* match ip next hop */ ++ int (*match_ip_next_hop)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* no match ip next hop */ ++ int (*no_match_ip_next_hop)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* match ip next hop prefix list */ ++ int (*match_ip_next_hop_prefix_list)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* no match ip next hop prefix list */ ++ int (*no_match_ip_next_hop_prefix_list)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* match ip next-hop type */ ++ int (*match_ip_next_hop_type)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* no match ip next-hop type */ ++ int (*no_match_ip_next_hop_type)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* match ipv6 address */ ++ int (*match_ipv6_address)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* no match ipv6 address */ ++ int (*no_match_ipv6_address)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ ++ /* match ipv6 address prefix list */ ++ int (*match_ipv6_address_prefix_list)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* no match ipv6 address prefix list */ ++ int (*no_match_ipv6_address_prefix_list)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* match ipv6 next-hop type */ ++ int (*match_ipv6_next_hop_type)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, ++ const char *arg, ++ route_map_event_t type); ++ ++ /* no match ipv6 next-hop type */ ++ int (*no_match_ipv6_next_hop_type)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* match metric */ ++ int (*match_metric)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* no match metric */ ++ int (*no_match_metric)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* match tag */ ++ int (*match_tag)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* no match tag */ ++ int (*no_match_tag)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg, ++ route_map_event_t type); ++ ++ /* set ip nexthop */ ++ int (*set_ip_nexthop)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg); ++ ++ /* no set ip nexthop */ ++ int (*no_set_ip_nexthop)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg); ++ ++ /* set ipv6 nexthop local */ ++ int (*set_ipv6_nexthop_local)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, const char *arg); ++ ++ /* no set ipv6 nexthop local */ ++ int (*no_set_ipv6_nexthop_local)(struct vty *vty, ++ struct route_map_index *index, ++ const char *command, const char *arg); ++ ++ /* set metric */ ++ int (*set_metric)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg); ++ ++ /* no set metric */ ++ int (*no_set_metric)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg); ++ ++ /* set tag */ ++ int (*set_tag)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg); ++ ++ /* no set tag */ ++ int (*no_set_tag)(struct vty *vty, struct route_map_index *index, ++ const char *command, const char *arg); ++}; ++ ++extern struct route_map_match_set_hooks rmap_match_set_hook; ++ ++/* Making route map list. */ ++struct route_map_list { ++ struct route_map *head; ++ struct route_map *tail; ++ ++ void (*add_hook)(const char *); ++ void (*delete_hook)(const char *); ++ void (*event_hook)(const char *); ++}; ++ ++extern struct route_map_list route_map_master; ++ ++extern struct route_map *route_map_get(const char *name); ++extern void route_map_delete(struct route_map *map); ++extern struct route_map_index *route_map_index_get(struct route_map *map, ++ enum route_map_type type, ++ int pref); ++extern void route_map_index_delete(struct route_map_index *index, int notify); ++ + #ifdef __cplusplus + } + #endif + +From 686d244f00d87fa0b76c8e4644550d413fc3400b Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Mon, 30 Sep 2019 10:34:49 -0300 +Subject: [PATCH 03/10] lib: implement route map northbound + +Based on the route map old CLI, implement the route map handling using +the exported functions. + +Use a curry-like programming pattern avoid code repetition when +destroying match/set entries. This is needed by other daemons that +implement custom route map functions and need to pass to lib their +specific destroy functions. + +Signed-off-by: Rafael Zalamena +--- + lib/routemap.h | 24 + + lib/routemap_northbound.c | 1393 +++++++++++++++++++++++++++++++++++++ + lib/subdir.am | 2 + + yang/subdir.am | 1 + + 4 files changed, 1420 insertions(+) + create mode 100644 lib/routemap_northbound.c + +diff --git a/lib/routemap.h b/lib/routemap.h +index 41959c24e5..d9e7f73f81 100644 +--- a/lib/routemap.h ++++ b/lib/routemap.h +@@ -644,6 +644,30 @@ extern struct route_map_index *route_map_index_get(struct route_map *map, + int pref); + extern void route_map_index_delete(struct route_map_index *index, int notify); + ++/* routemap_northbound.c */ ++typedef int (*routemap_match_hook_fun)(struct vty *vty, ++ struct route_map_index *rmi, ++ const char *command, const char *arg, ++ route_map_event_t event); ++ ++typedef int (*routemap_set_hook_fun)(struct vty *vty, ++ struct route_map_index *rmi, ++ const char *command, const char *arg); ++ ++struct routemap_hook_context { ++ struct route_map_index *rhc_rmi; ++ const char *rhc_rule; ++ route_map_event_t rhc_event; ++ routemap_set_hook_fun rhc_shook; ++ routemap_match_hook_fun rhc_mhook; ++}; ++ ++int lib_route_map_entry_match_destroy(enum nb_event event, ++ const struct lyd_node *dnode); ++int lib_route_map_entry_set_destroy(enum nb_event event, ++ const struct lyd_node *dnode); ++extern const struct frr_yang_module_info frr_route_map_info; ++ + #ifdef __cplusplus + } + #endif +diff --git a/lib/routemap_northbound.c b/lib/routemap_northbound.c +new file mode 100644 +index 0000000000..02eb756334 +--- /dev/null ++++ b/lib/routemap_northbound.c +@@ -0,0 +1,1393 @@ ++/* ++ * Route map northbound implementation. ++ * ++ * Copyright (C) 2019 Network Device Education Foundation, Inc. ("NetDEF") ++ * Rafael Zalamena ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++ * 02110-1301 USA. ++ */ ++ ++#include ++ ++#include "lib/command.h" ++#include "lib/log.h" ++#include "lib/northbound.h" ++#include "lib/routemap.h" ++ ++/* ++ * Auxiliary functions to avoid code duplication: ++ * ++ * lib_route_map_entry_set_destroy: unset `set` commands. ++ * lib_route_map_entry_match_destroy: unset `match` commands. ++ */ ++int lib_route_map_entry_match_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct routemap_hook_context *rhc; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ if (rhc->rhc_mhook == NULL) ++ return NB_OK; ++ ++ rv = rhc->rhc_mhook(NULL, rhc->rhc_rmi, rhc->rhc_rule, NULL, ++ rhc->rhc_event); ++ if (rv != CMD_SUCCESS) ++ return NB_ERR_INCONSISTENCY; ++ ++ return NB_OK; ++} ++ ++int lib_route_map_entry_set_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct routemap_hook_context *rhc; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ if (rhc->rhc_shook == NULL) ++ return NB_OK; ++ ++ rv = rhc->rhc_shook(NULL, rhc->rhc_rmi, rhc->rhc_rule, NULL); ++ if (rv != CMD_SUCCESS) ++ return NB_ERR_INCONSISTENCY; ++ ++ return NB_OK; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map ++ */ ++static int lib_route_map_create(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct route_map *rm; ++ const char *rm_name; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ rm_name = yang_dnode_get_string(dnode, "./name"); ++ rm = route_map_get(rm_name); ++ nb_running_set_entry(dnode, rm); ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct route_map *rm; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ rm = nb_running_unset_entry(dnode); ++ route_map_delete(rm); ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry ++ */ ++static int lib_route_map_entry_create(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct route_map_index *rmi; ++ struct route_map *rm; ++ uint16_t sequence; ++ int action; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ sequence = yang_dnode_get_uint16(dnode, "./sequence"); ++ action = yang_dnode_get_enum(dnode, "./action") == 0 ++ ? RMAP_PERMIT ++ : RMAP_DENY; ++ rm = nb_running_get_entry(dnode, NULL, true); ++ rmi = route_map_index_get(rm, action, sequence); ++ nb_running_set_entry(dnode, rmi); ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct route_map_index *rmi; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_unset_entry(dnode); ++ route_map_index_delete(rmi, 1); ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/description ++ */ ++static int lib_route_map_entry_description_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct route_map_index *rmi; ++ const char *description; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ /* NOTHING */ ++ break; ++ case NB_EV_PREPARE: ++ description = yang_dnode_get_string(dnode, NULL); ++ resource->ptr = XSTRDUP(MTYPE_TMP, description); ++ if (resource->ptr == NULL) ++ return NB_ERR_RESOURCE; ++ break; ++ case NB_EV_ABORT: ++ XFREE(MTYPE_TMP, resource->ptr); ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ if (rmi->description != NULL) ++ XFREE(MTYPE_TMP, rmi->description); ++ rmi->description = resource->ptr; ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_description_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct route_map_index *rmi; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ if (rmi->description != NULL) ++ XFREE(MTYPE_TMP, rmi->description); ++ rmi->description = NULL; ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/action ++ */ ++static int lib_route_map_entry_action_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct route_map_index *rmi; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ rmi->type = yang_dnode_get_enum(dnode, NULL); ++ /* TODO: notify? */ ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/call ++ */ ++static int lib_route_map_entry_call_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct route_map_index *rmi; ++ const char *rm_name, *rmn_name; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ rm_name = yang_dnode_get_string(dnode, "../../name"); ++ rmn_name = yang_dnode_get_string(dnode, NULL); ++ /* Don't allow to jump to the same route map instance. */ ++ if (strcmp(rm_name, rmn_name) == 0) ++ return NB_ERR_VALIDATION; ++ ++ /* TODO: detect circular route map sequences. */ ++ break; ++ case NB_EV_PREPARE: ++ rmn_name = yang_dnode_get_string(dnode, NULL); ++ resource->ptr = XSTRDUP(MTYPE_ROUTE_MAP_NAME, rmn_name); ++ break; ++ case NB_EV_ABORT: ++ XFREE(MTYPE_ROUTE_MAP_NAME, resource->ptr); ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ if (rmi->nextrm) { ++ route_map_upd8_dependency(RMAP_EVENT_CALL_DELETED, ++ rmi->nextrm, rmi->map->name); ++ XFREE(MTYPE_ROUTE_MAP_NAME, rmi->nextrm); ++ } ++ rmi->nextrm = resource->ptr; ++ route_map_upd8_dependency(RMAP_EVENT_CALL_ADDED, rmi->nextrm, ++ rmi->map->name); ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_call_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct route_map_index *rmi; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ route_map_upd8_dependency(RMAP_EVENT_CALL_DELETED, rmi->nextrm, ++ rmi->map->name); ++ XFREE(MTYPE_ROUTE_MAP_NAME, rmi->nextrm); ++ rmi->nextrm = NULL; ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/exit-policy ++ */ ++static int lib_route_map_entry_exit_policy_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct route_map_index *rmi; ++ int rm_action; ++ int policy; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ policy = yang_dnode_get_enum(dnode, NULL); ++ switch (policy) { ++ case 0: /* permit-or-deny */ ++ break; ++ case 1: /* next */ ++ /* FALLTHROUGH */ ++ case 2: /* goto */ ++ rm_action = yang_dnode_get_enum(dnode, "../action"); ++ if (rm_action == 1 /* deny */) { ++ /* ++ * On deny it is not possible to 'goto' ++ * anywhere. ++ */ ++ return NB_ERR_VALIDATION; ++ } ++ break; ++ } ++ break; ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ policy = yang_dnode_get_enum(dnode, NULL); ++ ++ switch (policy) { ++ case 0: /* permit-or-deny */ ++ rmi->exitpolicy = RMAP_EXIT; ++ break; ++ case 1: /* next */ ++ rmi->exitpolicy = RMAP_NEXT; ++ break; ++ case 2: /* goto */ ++ rmi->exitpolicy = RMAP_GOTO; ++ break; ++ } ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/goto-value ++ */ ++static int lib_route_map_entry_goto_value_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct route_map_index *rmi; ++ uint16_t rmi_index; ++ uint16_t rmi_next; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ rmi_index = yang_dnode_get_uint16(dnode, "../sequence"); ++ rmi_next = yang_dnode_get_uint16(dnode, NULL); ++ if (rmi_next <= rmi_index) { ++ /* Can't jump backwards on a route map. */ ++ return NB_ERR_VALIDATION; ++ } ++ break; ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ rmi->nextpref = yang_dnode_get_uint16(dnode, NULL); ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_goto_value_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct route_map_index *rmi; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ /* NOTHING */ ++ break; ++ case NB_EV_APPLY: ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ rmi->nextpref = 0; ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/match-condition ++ */ ++static int ++lib_route_map_entry_match_condition_create(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ /* NOTHING */ ++ break; ++ case NB_EV_PREPARE: ++ resource->ptr = XCALLOC(MTYPE_TMP, sizeof(*rhc)); ++ break; ++ case NB_EV_ABORT: ++ XFREE(MTYPE_TMP, resource->ptr); ++ break; ++ case NB_EV_APPLY: ++ rhc = resource->ptr; ++ rhc->rhc_rmi = nb_running_get_entry(dnode, NULL, true); ++ nb_running_set_entry(dnode, rhc); ++ break; ++ } ++ ++ return NB_OK; ++} ++ ++static int ++lib_route_map_entry_match_condition_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct routemap_hook_context *rhc; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ rv = lib_route_map_entry_match_destroy(event, dnode); ++ rhc = nb_running_unset_entry(dnode); ++ XFREE(MTYPE_TMP, rhc); ++ ++ return rv; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/match-condition/interface ++ */ ++static int lib_route_map_entry_match_condition_interface_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *ifname; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.match_interface == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ ifname = yang_dnode_get_string(dnode, NULL); ++ ++ /* Set destroy information. */ ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_interface; ++ rhc->rhc_rule = "interface"; ++ rhc->rhc_event = RMAP_EVENT_MATCH_DELETED; ++ ++ rv = rmap_match_set_hook.match_interface(NULL, rhc->rhc_rmi, ++ "interface", ifname, ++ RMAP_EVENT_MATCH_ADDED); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_mhook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_match_condition_interface_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_match_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/match-condition/access-list-num ++ */ ++static int lib_route_map_entry_match_condition_access_list_num_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *acl; ++ int condition, rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook function. */ ++ rv = CMD_SUCCESS; ++ acl = yang_dnode_get_string(dnode, NULL); ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ condition = yang_dnode_get_enum(dnode, "../condition"); ++ switch (condition) { ++ case 1: /* ipv4-address-list */ ++ if (rmap_match_set_hook.match_ip_address == NULL) ++ break; ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_ip_address; ++ rhc->rhc_rule = "ip address"; ++ rhc->rhc_event = RMAP_EVENT_FILTER_DELETED; ++ rv = rmap_match_set_hook.match_ip_address( ++ NULL, rhc->rhc_rmi, "ip address", acl, ++ RMAP_EVENT_FILTER_ADDED); ++ break; ++ case 3: /* ipv4-next-hop-list */ ++ if (rmap_match_set_hook.match_ip_next_hop == NULL) ++ break; ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_ip_next_hop; ++ rhc->rhc_rule = "ip next-hop"; ++ rhc->rhc_event = RMAP_EVENT_FILTER_DELETED; ++ rv = rmap_match_set_hook.match_ip_next_hop( ++ NULL, rhc->rhc_rmi, "ip next-hop", acl, ++ RMAP_EVENT_FILTER_ADDED); ++ break; ++ } ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_mhook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_match_condition_access_list_num_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_match_destroy(event, dnode); ++} ++ ++/* ++ * XPath: ++ * /frr-route-map:lib/route-map/entry/match-condition/access-list-num-extended ++ */ ++static int lib_route_map_entry_match_condition_access_list_num_extended_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ return lib_route_map_entry_match_condition_access_list_num_modify( ++ event, dnode, resource); ++} ++ ++static int lib_route_map_entry_match_condition_access_list_num_extended_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_match_condition_access_list_num_destroy( ++ event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/match-condition/list-name ++ */ ++static int lib_route_map_entry_match_condition_list_name_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *acl; ++ int condition; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook installation, otherwise we can just stop. */ ++ acl = yang_dnode_get_string(dnode, NULL); ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ condition = yang_dnode_get_enum(dnode, "../condition"); ++ switch (condition) { ++ case 1: /* ipv4-address-list */ ++ if (rmap_match_set_hook.match_ip_address == NULL) ++ return NB_OK; ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_ip_address; ++ rhc->rhc_rule = "ip address"; ++ rhc->rhc_event = RMAP_EVENT_FILTER_DELETED; ++ rv = rmap_match_set_hook.match_ip_address( ++ NULL, rhc->rhc_rmi, "ip address", acl, ++ RMAP_EVENT_FILTER_ADDED); ++ break; ++ case 2: /* ipv4-prefix-list */ ++ if (rmap_match_set_hook.match_ip_address_prefix_list == NULL) ++ return NB_OK; ++ rhc->rhc_mhook = ++ rmap_match_set_hook.no_match_ip_address_prefix_list; ++ rhc->rhc_rule = "ip address prefix-list"; ++ rhc->rhc_event = RMAP_EVENT_PLIST_DELETED; ++ rv = rmap_match_set_hook.match_ip_address_prefix_list( ++ NULL, rhc->rhc_rmi, "ip address prefix-list", acl, ++ RMAP_EVENT_PLIST_ADDED); ++ break; ++ case 3: /* ipv4-next-hop-list */ ++ if (rmap_match_set_hook.match_ip_next_hop == NULL) ++ return NB_OK; ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_ip_next_hop; ++ rhc->rhc_rule = "ip next-hop"; ++ rhc->rhc_event = RMAP_EVENT_FILTER_DELETED; ++ rv = rmap_match_set_hook.match_ip_next_hop( ++ NULL, rhc->rhc_rmi, "ip next-hop", acl, ++ RMAP_EVENT_FILTER_ADDED); ++ break; ++ case 4: /* ipv4-next-hop-prefix-list */ ++ if (rmap_match_set_hook.match_ip_next_hop_prefix_list == NULL) ++ return NB_OK; ++ rhc->rhc_mhook = ++ rmap_match_set_hook.no_match_ip_next_hop_prefix_list; ++ rhc->rhc_rule = "ip next-hop prefix-list"; ++ rhc->rhc_event = RMAP_EVENT_PLIST_DELETED; ++ rv = rmap_match_set_hook.match_ip_next_hop_prefix_list( ++ NULL, rhc->rhc_rmi, "ip next-hop prefix-list", acl, ++ RMAP_EVENT_PLIST_ADDED); ++ break; ++ case 6: /* ipv6-address-list */ ++ if (rmap_match_set_hook.match_ipv6_address == NULL) ++ return NB_OK; ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_ipv6_address; ++ rhc->rhc_rule = "ipv6 address"; ++ rhc->rhc_event = RMAP_EVENT_FILTER_DELETED; ++ rv = rmap_match_set_hook.match_ipv6_address( ++ NULL, rhc->rhc_rmi, "ipv6 address", acl, ++ RMAP_EVENT_FILTER_ADDED); ++ break; ++ case 7: /* ipv6-prefix-list */ ++ if (rmap_match_set_hook.match_ipv6_address_prefix_list == NULL) ++ return NB_OK; ++ rhc->rhc_mhook = ++ rmap_match_set_hook.no_match_ipv6_address_prefix_list; ++ rhc->rhc_rule = "ipv6 address prefix-list"; ++ rhc->rhc_event = RMAP_EVENT_PLIST_DELETED; ++ rv = rmap_match_set_hook.match_ipv6_address_prefix_list( ++ NULL, rhc->rhc_rmi, "ipv6 address prefix-list", acl, ++ RMAP_EVENT_PLIST_ADDED); ++ break; ++ default: ++ rv = CMD_ERR_NO_MATCH; ++ break; ++ } ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_mhook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_match_condition_list_name_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_match_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/match-condition/ipv4-next-hop-type ++ */ ++static int lib_route_map_entry_match_condition_ipv4_next_hop_type_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *type; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.match_ip_next_hop_type == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ type = yang_dnode_get_string(dnode, NULL); ++ ++ /* Set destroy information. */ ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_ip_next_hop_type; ++ rhc->rhc_rule = "ip next-hop type"; ++ rhc->rhc_event = RMAP_EVENT_MATCH_DELETED; ++ ++ rv = rmap_match_set_hook.match_ip_next_hop_type( ++ NULL, rhc->rhc_rmi, "ip next-hop type", type, ++ RMAP_EVENT_MATCH_ADDED); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_mhook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_match_condition_ipv4_next_hop_type_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_match_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/match-condition/ipv6-next-hop-type ++ */ ++static int lib_route_map_entry_match_condition_ipv6_next_hop_type_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *type; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.match_ipv6_next_hop_type == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ type = yang_dnode_get_string(dnode, NULL); ++ ++ /* Set destroy information. */ ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_ipv6_next_hop_type; ++ rhc->rhc_rule = "ipv6 next-hop type"; ++ rhc->rhc_event = RMAP_EVENT_MATCH_DELETED; ++ ++ rv = rmap_match_set_hook.match_ipv6_next_hop_type( ++ NULL, rhc->rhc_rmi, "ipv6 next-hop type", type, ++ RMAP_EVENT_MATCH_ADDED); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_mhook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_match_condition_ipv6_next_hop_type_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_match_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/match-condition/metric ++ */ ++static int ++lib_route_map_entry_match_condition_metric_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *type; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.match_metric == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ type = yang_dnode_get_string(dnode, NULL); ++ ++ /* Set destroy information. */ ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_metric; ++ rhc->rhc_rule = "metric"; ++ rhc->rhc_event = RMAP_EVENT_MATCH_DELETED; ++ ++ rv = rmap_match_set_hook.match_metric(NULL, rhc->rhc_rmi, "metric", ++ type, RMAP_EVENT_MATCH_ADDED); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_mhook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int ++lib_route_map_entry_match_condition_metric_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_match_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/match-condition/tag ++ */ ++static int ++lib_route_map_entry_match_condition_tag_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *tag; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.match_tag == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ tag = yang_dnode_get_string(dnode, NULL); ++ ++ /* Set destroy information. */ ++ rhc->rhc_mhook = rmap_match_set_hook.no_match_tag; ++ rhc->rhc_rule = "tag"; ++ rhc->rhc_event = RMAP_EVENT_MATCH_DELETED; ++ ++ rv = rmap_match_set_hook.match_tag(NULL, rhc->rhc_rmi, "tag", tag, ++ RMAP_EVENT_MATCH_ADDED); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_mhook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int ++lib_route_map_entry_match_condition_tag_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_match_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action ++ */ ++static int lib_route_map_entry_set_action_create(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ return lib_route_map_entry_match_condition_create(event, dnode, ++ resource); ++} ++ ++static int lib_route_map_entry_set_action_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ struct routemap_hook_context *rhc; ++ int rv; ++ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ rv = lib_route_map_entry_set_destroy(event, dnode); ++ rhc = nb_running_unset_entry(dnode); ++ XFREE(MTYPE_TMP, rhc); ++ ++ return rv; ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/ipv4-address ++ */ ++static int ++lib_route_map_entry_set_action_ipv4_address_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *address; ++ struct in_addr ia; ++ int rv; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ /* ++ * NOTE: validate if 'action' is 'ipv4-next-hop', ++ * currently it is not necessary because this is the ++ * only implemented action. ++ */ ++ yang_dnode_get_ipv4(&ia, dnode, NULL); ++ if (ia.s_addr == 0 || IPV4_CLASS_DE(ntohl(ia.s_addr))) ++ return NB_ERR_VALIDATION; ++ /* FALLTHROUGH */ ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ return NB_OK; ++ case NB_EV_APPLY: ++ break; ++ } ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.set_ip_nexthop == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ address = yang_dnode_get_string(dnode, NULL); ++ ++ /* Set destroy information. */ ++ rhc->rhc_shook = rmap_match_set_hook.no_set_ip_nexthop; ++ rhc->rhc_rule = "ip next-hop"; ++ ++ rv = rmap_match_set_hook.set_ip_nexthop(NULL, rhc->rhc_rmi, ++ "ip next-hop", address); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_shook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_set_action_ipv4_address_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/ipv6-address ++ */ ++static int ++lib_route_map_entry_set_action_ipv6_address_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *address; ++ struct in6_addr i6a; ++ int rv; ++ ++ switch (event) { ++ case NB_EV_VALIDATE: ++ /* ++ * NOTE: validate if 'action' is 'ipv6-next-hop', ++ * currently it is not necessary because this is the ++ * only implemented action. Other actions might have ++ * different validations. ++ */ ++ yang_dnode_get_ipv6(&i6a, dnode, NULL); ++ if (!IN6_IS_ADDR_LINKLOCAL(&i6a)) ++ return NB_ERR_VALIDATION; ++ /* FALLTHROUGH */ ++ case NB_EV_PREPARE: ++ case NB_EV_ABORT: ++ return NB_OK; ++ case NB_EV_APPLY: ++ break; ++ } ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.set_ipv6_nexthop_local == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ address = yang_dnode_get_string(dnode, NULL); ++ ++ /* Set destroy information. */ ++ rhc->rhc_shook = rmap_match_set_hook.no_set_ipv6_nexthop_local; ++ rhc->rhc_rule = "ipv6 next-hop local"; ++ ++ rv = rmap_match_set_hook.set_ipv6_nexthop_local( ++ NULL, rhc->rhc_rmi, "ipv6 next-hop local", address); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_shook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int lib_route_map_entry_set_action_ipv6_address_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/value ++ */ ++static int set_action_modify(enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource, const char *value) ++{ ++ struct routemap_hook_context *rhc; ++ int rv; ++ ++ /* ++ * NOTE: validate if 'action' is 'metric', currently it is not ++ * necessary because this is the only implemented action. Other ++ * actions might have different validations. ++ */ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.set_metric == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ ++ /* Set destroy information. */ ++ rhc->rhc_shook = rmap_match_set_hook.no_set_metric; ++ rhc->rhc_rule = "metric"; ++ ++ rv = rmap_match_set_hook.set_metric(NULL, rhc->rhc_rmi, "metric", ++ value); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_shook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int ++lib_route_map_entry_set_action_value_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ const char *metric = yang_dnode_get_string(dnode, NULL); ++ ++ return set_action_modify(event, dnode, resource, metric); ++} ++ ++static int ++lib_route_map_entry_set_action_value_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/add-metric ++ */ ++static int ++lib_route_map_entry_set_action_add_metric_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ return set_action_modify(event, dnode, resource, "+metric"); ++} ++ ++static int ++lib_route_map_entry_set_action_add_metric_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_action_value_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/subtract-metric ++ */ ++static int lib_route_map_entry_set_action_subtract_metric_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ return set_action_modify(event, dnode, resource, "-metric"); ++} ++ ++static int lib_route_map_entry_set_action_subtract_metric_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_action_value_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/use-round-trip-time ++ */ ++static int lib_route_map_entry_set_action_use_round_trip_time_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ return set_action_modify(event, dnode, resource, "rtt"); ++} ++ ++static int lib_route_map_entry_set_action_use_round_trip_time_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_action_value_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/add-round-trip-time ++ */ ++static int lib_route_map_entry_set_action_add_round_trip_time_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ return set_action_modify(event, dnode, resource, "+rtt"); ++} ++ ++static int lib_route_map_entry_set_action_add_round_trip_time_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_action_value_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/subtract-round-trip-time ++ */ ++static int lib_route_map_entry_set_action_subtract_round_trip_time_modify( ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ return set_action_modify(event, dnode, resource, "-rtt"); ++} ++ ++static int lib_route_map_entry_set_action_subtract_round_trip_time_destroy( ++ enum nb_event event, const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_action_value_destroy(event, dnode); ++} ++ ++/* ++ * XPath: /frr-route-map:lib/route-map/entry/set-action/tag ++ */ ++static int ++lib_route_map_entry_set_action_tag_modify(enum nb_event event, ++ const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ struct routemap_hook_context *rhc; ++ const char *tag; ++ int rv; ++ ++ /* ++ * NOTE: validate if 'action' is 'tag', currently it is not ++ * necessary because this is the only implemented action. Other ++ * actions might have different validations. ++ */ ++ if (event != NB_EV_APPLY) ++ return NB_OK; ++ ++ /* Check for hook function. */ ++ if (rmap_match_set_hook.set_tag == NULL) ++ return NB_OK; ++ ++ /* Add configuration. */ ++ rhc = nb_running_get_entry(dnode, NULL, true); ++ tag = yang_dnode_get_string(dnode, NULL); ++ ++ /* Set destroy information. */ ++ rhc->rhc_shook = rmap_match_set_hook.no_set_tag; ++ rhc->rhc_rule = "tag"; ++ ++ rv = rmap_match_set_hook.set_tag(NULL, rhc->rhc_rmi, "tag", tag); ++ if (rv != CMD_SUCCESS) { ++ rhc->rhc_shook = NULL; ++ return NB_ERR_INCONSISTENCY; ++ } ++ ++ return NB_OK; ++} ++ ++static int ++lib_route_map_entry_set_action_tag_destroy(enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ return lib_route_map_entry_set_destroy(event, dnode); ++} ++ ++/* clang-format off */ ++const struct frr_yang_module_info frr_route_map_info = { ++ .name = "frr-route-map", ++ .nodes = { ++ { ++ .xpath = "/frr-route-map:lib/route-map", ++ .cbs = { ++ .create = lib_route_map_create, ++ .destroy = lib_route_map_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry", ++ .cbs = { ++ .create = lib_route_map_entry_create, ++ .destroy = lib_route_map_entry_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/description", ++ .cbs = { ++ .modify = lib_route_map_entry_description_modify, ++ .destroy = lib_route_map_entry_description_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/action", ++ .cbs = { ++ .modify = lib_route_map_entry_action_modify, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/call", ++ .cbs = { ++ .modify = lib_route_map_entry_call_modify, ++ .destroy = lib_route_map_entry_call_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/exit-policy", ++ .cbs = { ++ .modify = lib_route_map_entry_exit_policy_modify, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/goto-value", ++ .cbs = { ++ .modify = lib_route_map_entry_goto_value_modify, ++ .destroy = lib_route_map_entry_goto_value_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition", ++ .cbs = { ++ .create = lib_route_map_entry_match_condition_create, ++ .destroy = lib_route_map_entry_match_condition_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition/interface", ++ .cbs = { ++ .modify = lib_route_map_entry_match_condition_interface_modify, ++ .destroy = lib_route_map_entry_match_condition_interface_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition/access-list-num", ++ .cbs = { ++ .modify = lib_route_map_entry_match_condition_access_list_num_modify, ++ .destroy = lib_route_map_entry_match_condition_access_list_num_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition/access-list-num-extended", ++ .cbs = { ++ .modify = lib_route_map_entry_match_condition_access_list_num_extended_modify, ++ .destroy = lib_route_map_entry_match_condition_access_list_num_extended_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition/list-name", ++ .cbs = { ++ .modify = lib_route_map_entry_match_condition_list_name_modify, ++ .destroy = lib_route_map_entry_match_condition_list_name_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition/ipv4-next-hop-type", ++ .cbs = { ++ .modify = lib_route_map_entry_match_condition_ipv4_next_hop_type_modify, ++ .destroy = lib_route_map_entry_match_condition_ipv4_next_hop_type_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition/ipv6-next-hop-type", ++ .cbs = { ++ .modify = lib_route_map_entry_match_condition_ipv6_next_hop_type_modify, ++ .destroy = lib_route_map_entry_match_condition_ipv6_next_hop_type_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition/metric", ++ .cbs = { ++ .modify = lib_route_map_entry_match_condition_metric_modify, ++ .destroy = lib_route_map_entry_match_condition_metric_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/match-condition/tag", ++ .cbs = { ++ .modify = lib_route_map_entry_match_condition_tag_modify, ++ .destroy = lib_route_map_entry_match_condition_tag_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action", ++ .cbs = { ++ .create = lib_route_map_entry_set_action_create, ++ .destroy = lib_route_map_entry_set_action_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/ipv4-address", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_ipv4_address_modify, ++ .destroy = lib_route_map_entry_set_action_ipv4_address_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/ipv6-address", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_ipv6_address_modify, ++ .destroy = lib_route_map_entry_set_action_ipv6_address_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/value", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_value_modify, ++ .destroy = lib_route_map_entry_set_action_value_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/add-metric", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_add_metric_modify, ++ .destroy = lib_route_map_entry_set_action_add_metric_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/subtract-metric", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_subtract_metric_modify, ++ .destroy = lib_route_map_entry_set_action_subtract_metric_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/use-round-trip-time", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_use_round_trip_time_modify, ++ .destroy = lib_route_map_entry_set_action_use_round_trip_time_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/add-round-trip-time", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_add_round_trip_time_modify, ++ .destroy = lib_route_map_entry_set_action_add_round_trip_time_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/subtract-round-trip-time", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_subtract_round_trip_time_modify, ++ .destroy = lib_route_map_entry_set_action_subtract_round_trip_time_destroy, ++ } ++ }, ++ { ++ .xpath = "/frr-route-map:lib/route-map/entry/set-action/tag", ++ .cbs = { ++ .modify = lib_route_map_entry_set_action_tag_modify, ++ .destroy = lib_route_map_entry_set_action_tag_destroy, ++ } ++ }, ++ { ++ .xpath = NULL, ++ }, ++ } ++}; +diff --git a/lib/subdir.am b/lib/subdir.am +index d804d839db..94b3d933ac 100644 +--- a/lib/subdir.am ++++ b/lib/subdir.am +@@ -71,6 +71,7 @@ lib_libfrr_la_SOURCES = \ + lib/qobj.c \ + lib/ringbuf.c \ + lib/routemap.c \ ++ lib/routemap_northbound.c \ + lib/sbuf.c \ + lib/seqlock.c \ + lib/sha256.c \ +@@ -105,6 +106,7 @@ lib_libfrr_la_SOURCES = \ + + nodist_lib_libfrr_la_SOURCES = \ + yang/frr-interface.yang.c \ ++ yang/frr-route-map.yang.c \ + yang/frr-route-types.yang.c \ + yang/ietf/ietf-routing-types.yang.c \ + yang/frr-module-translator.yang.c \ +diff --git a/yang/subdir.am b/yang/subdir.am +index cfaf1a6401..7a15a6a309 100644 +--- a/yang/subdir.am ++++ b/yang/subdir.am +@@ -22,6 +22,7 @@ EXTRA_DIST += yang/embedmodel.py + dist_yangmodels_DATA += yang/frr-module-translator.yang + dist_yangmodels_DATA += yang/frr-test-module.yang + dist_yangmodels_DATA += yang/frr-interface.yang ++dist_yangmodels_DATA += yang/frr-route-map.yang + dist_yangmodels_DATA += yang/frr-route-types.yang + dist_yangmodels_DATA += yang/ietf/ietf-routing-types.yang + + +From 2b3e4807ecf4d2586fe4d651b904967ea8d759c0 Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Mon, 30 Sep 2019 15:01:46 -0300 +Subject: [PATCH 04/10] lib: implement new route map CLI + +Use the northbound back-end instead of the old route map CLI. + +Signed-off-by: Rafael Zalamena +--- + lib/routemap.c | 1103 +------------------------------------ + lib/routemap.h | 19 + + lib/routemap_cli.c | 1075 ++++++++++++++++++++++++++++++++++++ + lib/routemap_northbound.c | 7 + + lib/subdir.am | 4 + + vtysh/extract.pl.in | 2 +- + 6 files changed, 1108 insertions(+), 1102 deletions(-) + create mode 100644 lib/routemap_cli.c + +diff --git a/lib/routemap.c b/lib/routemap.c +index a8feebd313..e07ad08123 100644 +--- a/lib/routemap.c ++++ b/lib/routemap.c +@@ -759,14 +759,6 @@ static const char *route_map_result_str(route_map_result_t res) + return "invalid"; + } + +-static int route_map_empty(struct route_map *map) +-{ +- if (map->head == NULL && map->tail == NULL) +- return 1; +- else +- return 0; +-} +- + /* show route-map */ + static void vty_show_route_map_entry(struct vty *vty, struct route_map *map) + { +@@ -2010,871 +2002,6 @@ void route_map_notify_dependencies(const char *affected_name, + + + /* VTY related functions. */ +-DEFUN (match_interface, +- match_interface_cmd, +- "match interface WORD", +- MATCH_STR +- "match first hop interface of route\n" +- "Interface name\n") +-{ +- int idx_word = 2; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_interface) +- return rmap_match_set_hook.match_interface( +- vty, index, "interface", argv[idx_word]->arg, +- RMAP_EVENT_MATCH_ADDED); +- return CMD_SUCCESS; +-} +- +-DEFUN (no_match_interface, +- no_match_interface_cmd, +- "no match interface [WORD]", +- NO_STR +- MATCH_STR +- "Match first hop interface of route\n" +- "Interface name\n") +-{ +- char *iface = (argc == 4) ? argv[3]->arg : NULL; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_interface) +- return rmap_match_set_hook.no_match_interface( +- vty, index, "interface", iface, +- RMAP_EVENT_MATCH_DELETED); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (match_ip_address, +- match_ip_address_cmd, +- "match ip address <(1-199)|(1300-2699)|WORD>", +- MATCH_STR +- IP_STR +- "Match address of route\n" +- "IP access-list number\n" +- "IP access-list number (expanded range)\n" +- "IP Access-list name\n") +-{ +- int idx_acl = 3; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_ip_address) +- return rmap_match_set_hook.match_ip_address( +- vty, index, "ip address", argv[idx_acl]->arg, +- RMAP_EVENT_FILTER_ADDED); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_match_ip_address, +- no_match_ip_address_cmd, +- "no match ip address [<(1-199)|(1300-2699)|WORD>]", +- NO_STR +- MATCH_STR +- IP_STR +- "Match address of route\n" +- "IP access-list number\n" +- "IP access-list number (expanded range)\n" +- "IP Access-list name\n") +-{ +- int idx_word = 4; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_ip_address) { +- if (argc <= idx_word) +- return rmap_match_set_hook.no_match_ip_address( +- vty, index, "ip address", NULL, +- RMAP_EVENT_FILTER_DELETED); +- return rmap_match_set_hook.no_match_ip_address( +- vty, index, "ip address", argv[idx_word]->arg, +- RMAP_EVENT_FILTER_DELETED); +- } +- return CMD_SUCCESS; +-} +- +- +-DEFUN (match_ip_address_prefix_list, +- match_ip_address_prefix_list_cmd, +- "match ip address prefix-list WORD", +- MATCH_STR +- IP_STR +- "Match address of route\n" +- "Match entries of prefix-lists\n" +- "IP prefix-list name\n") +-{ +- int idx_word = 4; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_ip_address_prefix_list) +- return rmap_match_set_hook.match_ip_address_prefix_list( +- vty, index, "ip address prefix-list", +- argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_match_ip_address_prefix_list, +- no_match_ip_address_prefix_list_cmd, +- "no match ip address prefix-list [WORD]", +- NO_STR +- MATCH_STR +- IP_STR +- "Match address of route\n" +- "Match entries of prefix-lists\n" +- "IP prefix-list name\n") +-{ +- int idx_word = 5; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_ip_address_prefix_list) { +- if (argc <= idx_word) +- return rmap_match_set_hook +- .no_match_ip_address_prefix_list( +- vty, index, "ip address prefix-list", +- NULL, RMAP_EVENT_PLIST_DELETED); +- return rmap_match_set_hook.no_match_ip_address_prefix_list( +- vty, index, "ip address prefix-list", +- argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); +- } +- return CMD_SUCCESS; +-} +- +- +-DEFUN (match_ip_next_hop, +- match_ip_next_hop_cmd, +- "match ip next-hop <(1-199)|(1300-2699)|WORD>", +- MATCH_STR +- IP_STR +- "Match next-hop address of route\n" +- "IP access-list number\n" +- "IP access-list number (expanded range)\n" +- "IP Access-list name\n") +-{ +- int idx_acl = 3; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_ip_next_hop) +- return rmap_match_set_hook.match_ip_next_hop( +- vty, index, "ip next-hop", argv[idx_acl]->arg, +- RMAP_EVENT_FILTER_ADDED); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_match_ip_next_hop, +- no_match_ip_next_hop_cmd, +- "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", +- NO_STR +- MATCH_STR +- IP_STR +- "Match next-hop address of route\n" +- "IP access-list number\n" +- "IP access-list number (expanded range)\n" +- "IP Access-list name\n") +-{ +- int idx_word = 4; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_ip_next_hop) { +- if (argc <= idx_word) +- return rmap_match_set_hook.no_match_ip_next_hop( +- vty, index, "ip next-hop", NULL, +- RMAP_EVENT_FILTER_DELETED); +- return rmap_match_set_hook.no_match_ip_next_hop( +- vty, index, "ip next-hop", argv[idx_word]->arg, +- RMAP_EVENT_FILTER_DELETED); +- } +- return CMD_SUCCESS; +-} +- +- +-DEFUN (match_ip_next_hop_prefix_list, +- match_ip_next_hop_prefix_list_cmd, +- "match ip next-hop prefix-list WORD", +- MATCH_STR +- IP_STR +- "Match next-hop address of route\n" +- "Match entries of prefix-lists\n" +- "IP prefix-list name\n") +-{ +- int idx_word = 4; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_ip_next_hop_prefix_list) +- return rmap_match_set_hook.match_ip_next_hop_prefix_list( +- vty, index, "ip next-hop prefix-list", +- argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); +- return CMD_SUCCESS; +-} +- +-DEFUN (no_match_ip_next_hop_prefix_list, +- no_match_ip_next_hop_prefix_list_cmd, +- "no match ip next-hop prefix-list [WORD]", +- NO_STR +- MATCH_STR +- IP_STR +- "Match next-hop address of route\n" +- "Match entries of prefix-lists\n" +- "IP prefix-list name\n") +-{ +- int idx_word = 5; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_ip_next_hop) { +- if (argc <= idx_word) +- return rmap_match_set_hook.no_match_ip_next_hop( +- vty, index, "ip next-hop prefix-list", NULL, +- RMAP_EVENT_PLIST_DELETED); +- return rmap_match_set_hook.no_match_ip_next_hop( +- vty, index, "ip next-hop prefix-list", +- argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); +- } +- return CMD_SUCCESS; +-} +- +-DEFUN(match_ip_next_hop_type, match_ip_next_hop_type_cmd, +- "match ip next-hop type ", +- MATCH_STR IP_STR +- "Match next-hop address of route\n" +- "Match entries by type\n" +- "Blackhole\n") +-{ +- int idx_word = 4; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_ip_next_hop_type) +- return rmap_match_set_hook.match_ip_next_hop_type( +- vty, index, "ip next-hop type", argv[idx_word]->arg, +- RMAP_EVENT_MATCH_ADDED); +- return CMD_SUCCESS; +-} +- +-DEFUN(no_match_ip_next_hop_type, no_match_ip_next_hop_type_cmd, +- "no match ip next-hop type []", +- NO_STR MATCH_STR IP_STR +- "Match next-hop address of route\n" +- "Match entries by type\n" +- "Blackhole\n") +-{ +- int idx_word = 5; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_ip_next_hop) { +- if (argc <= idx_word) +- return rmap_match_set_hook.no_match_ip_next_hop( +- vty, index, "ip next-hop type", NULL, +- RMAP_EVENT_MATCH_DELETED); +- return rmap_match_set_hook.no_match_ip_next_hop( +- vty, index, "ip next-hop type", argv[idx_word]->arg, +- RMAP_EVENT_MATCH_DELETED); +- } +- return CMD_SUCCESS; +-} +- +- +-DEFUN (match_ipv6_address, +- match_ipv6_address_cmd, +- "match ipv6 address WORD", +- MATCH_STR +- IPV6_STR +- "Match IPv6 address of route\n" +- "IPv6 access-list name\n") +-{ +- int idx_word = 3; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_ipv6_address) +- return rmap_match_set_hook.match_ipv6_address( +- vty, index, "ipv6 address", argv[idx_word]->arg, +- RMAP_EVENT_FILTER_ADDED); +- return CMD_SUCCESS; +-} +- +-DEFUN (no_match_ipv6_address, +- no_match_ipv6_address_cmd, +- "no match ipv6 address WORD", +- NO_STR +- MATCH_STR +- IPV6_STR +- "Match IPv6 address of route\n" +- "IPv6 access-list name\n") +-{ +- int idx_word = 4; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_ipv6_address) +- return rmap_match_set_hook.no_match_ipv6_address( +- vty, index, "ipv6 address", argv[idx_word]->arg, +- RMAP_EVENT_FILTER_DELETED); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (match_ipv6_address_prefix_list, +- match_ipv6_address_prefix_list_cmd, +- "match ipv6 address prefix-list WORD", +- MATCH_STR +- IPV6_STR +- "Match address of route\n" +- "Match entries of prefix-lists\n" +- "IP prefix-list name\n") +-{ +- int idx_word = 4; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_ipv6_address_prefix_list) +- return rmap_match_set_hook.match_ipv6_address_prefix_list( +- vty, index, "ipv6 address prefix-list", +- argv[idx_word]->arg, RMAP_EVENT_PLIST_ADDED); +- return CMD_SUCCESS; +-} +- +-DEFUN (no_match_ipv6_address_prefix_list, +- no_match_ipv6_address_prefix_list_cmd, +- "no match ipv6 address prefix-list WORD", +- NO_STR +- MATCH_STR +- IPV6_STR +- "Match address of route\n" +- "Match entries of prefix-lists\n" +- "IP prefix-list name\n") +-{ +- int idx_word = 5; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_ipv6_address_prefix_list) +- return rmap_match_set_hook.no_match_ipv6_address_prefix_list( +- vty, index, "ipv6 address prefix-list", +- argv[idx_word]->arg, RMAP_EVENT_PLIST_DELETED); +- return CMD_SUCCESS; +-} +- +-DEFUN(match_ipv6_next_hop_type, match_ipv6_next_hop_type_cmd, +- "match ipv6 next-hop type ", +- MATCH_STR IPV6_STR +- "Match next-hop address of route\n" +- "Match entries by type\n" +- "Blackhole\n") +-{ +- int idx_word = 4; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_ipv6_next_hop_type) +- return rmap_match_set_hook.match_ipv6_next_hop_type( +- vty, index, "ipv6 next-hop type", argv[idx_word]->arg, +- RMAP_EVENT_MATCH_ADDED); +- return CMD_SUCCESS; +-} +- +-DEFUN(no_match_ipv6_next_hop_type, no_match_ipv6_next_hop_type_cmd, +- "no match ipv6 next-hop type []", +- NO_STR MATCH_STR IPV6_STR +- "Match address of route\n" +- "Match entries by type\n" +- "Blackhole\n") +-{ +- int idx_word = 5; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_ipv6_next_hop_type) +- return rmap_match_set_hook.no_match_ipv6_next_hop_type( +- vty, index, "ipv6 next-hop type", +- (argc <= idx_word) ? NULL : argv[idx_word]->arg, +- RMAP_EVENT_MATCH_DELETED); +- return CMD_SUCCESS; +-} +- +-DEFUN (match_metric, +- match_metric_cmd, +- "match metric (0-4294967295)", +- MATCH_STR +- "Match metric of route\n" +- "Metric value\n") +-{ +- int idx_number = 2; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_metric) +- return rmap_match_set_hook.match_metric(vty, index, "metric", +- argv[idx_number]->arg, +- RMAP_EVENT_MATCH_ADDED); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_match_metric, +- no_match_metric_cmd, +- "no match metric [(0-4294967295)]", +- NO_STR +- MATCH_STR +- "Match metric of route\n" +- "Metric value\n") +-{ +- int idx_number = 3; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_match_metric) { +- if (argc <= idx_number) +- return rmap_match_set_hook.no_match_metric( +- vty, index, "metric", NULL, +- RMAP_EVENT_MATCH_DELETED); +- return rmap_match_set_hook.no_match_metric( +- vty, index, "metric", argv[idx_number]->arg, +- RMAP_EVENT_MATCH_DELETED); +- } +- return CMD_SUCCESS; +-} +- +- +-DEFUN (match_tag, +- match_tag_cmd, +- "match tag (1-4294967295)", +- MATCH_STR +- "Match tag of route\n" +- "Tag value\n") +-{ +- int idx_number = 2; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.match_tag) +- return rmap_match_set_hook.match_tag(vty, index, "tag", +- argv[idx_number]->arg, +- RMAP_EVENT_MATCH_ADDED); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_match_tag, +- no_match_tag_cmd, +- "no match tag [(1-4294967295)]", +- NO_STR +- MATCH_STR +- "Match tag of route\n" +- "Tag value\n") +-{ +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- int idx = 0; +- char *arg = argv_find(argv, argc, "(1-4294967295)", &idx) +- ? argv[idx]->arg +- : NULL; +- +- if (rmap_match_set_hook.no_match_tag) +- return rmap_match_set_hook.no_match_tag( +- vty, index, "tag", arg, RMAP_EVENT_MATCH_DELETED); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (set_ip_nexthop, +- set_ip_nexthop_cmd, +- "set ip next-hop A.B.C.D", +- SET_STR +- IP_STR +- "Next hop address\n" +- "IP address of next hop\n") +-{ +- int idx_ipv4 = 3; +- union sockunion su; +- int ret; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- ret = str2sockunion(argv[idx_ipv4]->arg, &su); +- if (ret < 0) { +- vty_out(vty, "%% Malformed nexthop address\n"); +- return CMD_WARNING_CONFIG_FAILED; +- } +- if (su.sin.sin_addr.s_addr == 0 +- || IPV4_CLASS_DE(ntohl(su.sin.sin_addr.s_addr))) { +- vty_out(vty, +- "%% nexthop address cannot be 0.0.0.0, multicast or reserved\n"); +- return CMD_WARNING_CONFIG_FAILED; +- } +- +- if (rmap_match_set_hook.set_ip_nexthop) +- return rmap_match_set_hook.set_ip_nexthop( +- vty, index, "ip next-hop", argv[idx_ipv4]->arg); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_set_ip_nexthop, +- no_set_ip_nexthop_cmd, +- "no set ip next-hop [A.B.C.D]", +- NO_STR +- SET_STR +- IP_STR +- "Next hop address\n" +- "IP address of next hop\n") +-{ +- int idx = 0; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- const char *arg = NULL; +- +- if (argv_find(argv, argc, "A.B.C.D", &idx)) +- arg = argv[idx]->arg; +- +- if (rmap_match_set_hook.no_set_ip_nexthop) +- return rmap_match_set_hook.no_set_ip_nexthop( +- vty, index, "ip next-hop", arg); +- +- return CMD_SUCCESS; +-} +- +- +-DEFUN (set_ipv6_nexthop_local, +- set_ipv6_nexthop_local_cmd, +- "set ipv6 next-hop local X:X::X:X", +- SET_STR +- IPV6_STR +- "IPv6 next-hop address\n" +- "IPv6 local address\n" +- "IPv6 address of next hop\n") +-{ +- int idx_ipv6 = 4; +- struct in6_addr addr; +- int ret; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- ret = inet_pton(AF_INET6, argv[idx_ipv6]->arg, &addr); +- if (!ret) { +- vty_out(vty, "%% Malformed nexthop address\n"); +- return CMD_WARNING_CONFIG_FAILED; +- } +- if (!IN6_IS_ADDR_LINKLOCAL(&addr)) { +- vty_out(vty, "%% Invalid link-local nexthop address\n"); +- return CMD_WARNING_CONFIG_FAILED; +- } +- +- if (rmap_match_set_hook.set_ipv6_nexthop_local) +- return rmap_match_set_hook.set_ipv6_nexthop_local( +- vty, index, "ipv6 next-hop local", argv[idx_ipv6]->arg); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_set_ipv6_nexthop_local, +- no_set_ipv6_nexthop_local_cmd, +- "no set ipv6 next-hop local [X:X::X:X]", +- NO_STR +- SET_STR +- IPV6_STR +- "IPv6 next-hop address\n" +- "IPv6 local address\n" +- "IPv6 address of next hop\n") +-{ +- int idx_ipv6 = 5; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_set_ipv6_nexthop_local) { +- if (argc <= idx_ipv6) +- return rmap_match_set_hook.no_set_ipv6_nexthop_local( +- vty, index, "ipv6 next-hop local", NULL); +- return rmap_match_set_hook.no_set_ipv6_nexthop_local( +- vty, index, "ipv6 next-hop local", argv[5]->arg); +- } +- return CMD_SUCCESS; +-} +- +-DEFUN (set_metric, +- set_metric_cmd, +- "set metric <(0-4294967295)|rtt|+rtt|-rtt|+metric|-metric>", +- SET_STR +- "Metric value for destination routing protocol\n" +- "Metric value\n" +- "Assign round trip time\n" +- "Add round trip time\n" +- "Subtract round trip time\n" +- "Add metric\n" +- "Subtract metric\n") +-{ +- int idx_number = 2; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- const char *pass = (argv[idx_number]->type == RANGE_TKN) +- ? argv[idx_number]->arg +- : argv[idx_number]->text; +- +- if (rmap_match_set_hook.set_metric) +- return rmap_match_set_hook.set_metric(vty, index, "metric", +- pass); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_set_metric, +- no_set_metric_cmd, +- "no set metric [(0-4294967295)]", +- NO_STR +- SET_STR +- "Metric value for destination routing protocol\n" +- "Metric value\n") +-{ +- int idx_number = 3; +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- if (rmap_match_set_hook.no_set_metric) { +- if (argc <= idx_number) +- return rmap_match_set_hook.no_set_metric( +- vty, index, "metric", NULL); +- return rmap_match_set_hook.no_set_metric(vty, index, "metric", +- argv[idx_number]->arg); +- } +- return CMD_SUCCESS; +-} +- +- +-DEFUN (set_tag, +- set_tag_cmd, +- "set tag (1-4294967295)", +- SET_STR +- "Tag value for routing protocol\n" +- "Tag value\n") +-{ +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- int idx_number = 2; +- if (rmap_match_set_hook.set_tag) +- return rmap_match_set_hook.set_tag(vty, index, "tag", +- argv[idx_number]->arg); +- return CMD_SUCCESS; +-} +- +- +-DEFUN (no_set_tag, +- no_set_tag_cmd, +- "no set tag [(1-4294967295)]", +- NO_STR +- SET_STR +- "Tag value for routing protocol\n" +- "Tag value\n") +-{ +- VTY_DECLVAR_CONTEXT(route_map_index, index); +- +- int idx_number = 3; +- if (rmap_match_set_hook.no_set_tag) { +- if (argc <= idx_number) +- return rmap_match_set_hook.no_set_tag(vty, index, "tag", +- NULL); +- return rmap_match_set_hook.no_set_tag(vty, index, "tag", +- argv[idx_number]->arg); +- } +- return CMD_SUCCESS; +-} +- +- +-DEFUN_NOSH (route_map, +- route_map_cmd, +- "route-map WORD (1-65535)", +- "Create route-map or enter route-map command mode\n" +- "Route map tag\n" +- "Route map denies set operations\n" +- "Route map permits set operations\n" +- "Sequence to insert to/delete from existing route-map entry\n") +-{ +- int idx_word = 1; +- int idx_permit_deny = 2; +- int idx_number = 3; +- struct route_map *map; +- struct route_map_index *index; +- char *endptr = NULL; +- int permit = +- argv[idx_permit_deny]->arg[0] == 'p' ? RMAP_PERMIT : RMAP_DENY; +- unsigned long pref = strtoul(argv[idx_number]->arg, &endptr, 10); +- const char *mapname = argv[idx_word]->arg; +- +- /* Get route map. */ +- map = route_map_get(mapname); +- index = route_map_index_get(map, permit, pref); +- +- VTY_PUSH_CONTEXT(RMAP_NODE, index); +- return CMD_SUCCESS; +-} +- +-DEFUN (no_route_map_all, +- no_route_map_all_cmd, +- "no route-map WORD", +- NO_STR +- "Create route-map or enter route-map command mode\n" +- "Route map tag\n") +-{ +- int idx_word = 2; +- const char *mapname = argv[idx_word]->arg; +- struct route_map *map; +- +- map = route_map_lookup_by_name(mapname); +- if (map == NULL) { +- vty_out(vty, "%% Could not find route-map %s\n", mapname); +- return CMD_WARNING_CONFIG_FAILED; +- } +- +- route_map_delete(map); +- +- return CMD_SUCCESS; +-} +- +-DEFUN (no_route_map, +- no_route_map_cmd, +- "no route-map WORD (1-65535)", +- NO_STR +- "Create route-map or enter route-map command mode\n" +- "Route map tag\n" +- "Route map denies set operations\n" +- "Route map permits set operations\n" +- "Sequence to insert to/delete from existing route-map entry\n") +-{ +- int idx_word = 2; +- int idx_permit_deny = 3; +- int idx_number = 4; +- struct route_map *map; +- struct route_map_index *index; +- char *endptr = NULL; +- int permit = strmatch(argv[idx_permit_deny]->text, "permit") +- ? RMAP_PERMIT +- : RMAP_DENY; +- const char *prefstr = argv[idx_number]->arg; +- const char *mapname = argv[idx_word]->arg; +- unsigned long pref = strtoul(prefstr, &endptr, 10); +- +- /* Existence check. */ +- map = route_map_lookup_by_name(mapname); +- if (map == NULL) { +- vty_out(vty, "%% Could not find route-map %s\n", mapname); +- return CMD_WARNING_CONFIG_FAILED; +- } +- +- /* Lookup route map index. */ +- index = route_map_index_lookup(map, permit, pref); +- if (index == NULL) { +- vty_out(vty, "%% Could not find route-map entry %s %s\n", +- mapname, prefstr); +- return CMD_WARNING_CONFIG_FAILED; +- } +- +- /* Delete index from route map. */ +- route_map_index_delete(index, 1); +- +- /* If this route rule is the last one, delete route map itself. */ +- if (route_map_empty(map)) +- route_map_delete(map); +- +- return CMD_SUCCESS; +-} +- +-DEFUN (rmap_onmatch_next, +- rmap_onmatch_next_cmd, +- "on-match next", +- "Exit policy on matches\n" +- "Next clause\n") +-{ +- struct route_map_index *index = VTY_GET_CONTEXT(route_map_index); +- +- if (index) { +- if (index->type == RMAP_DENY) { +- /* Under a deny clause, match means it's finished. No +- * need to set next */ +- vty_out(vty, +- "on-match next not supported under route-map deny\n"); +- return CMD_WARNING_CONFIG_FAILED; +- } +- index->exitpolicy = RMAP_NEXT; +- } +- return CMD_SUCCESS; +-} +- +-DEFUN (no_rmap_onmatch_next, +- no_rmap_onmatch_next_cmd, +- "no on-match next", +- NO_STR +- "Exit policy on matches\n" +- "Next clause\n") +-{ +- struct route_map_index *index = VTY_GET_CONTEXT(route_map_index); +- +- if (index) +- index->exitpolicy = RMAP_EXIT; +- +- return CMD_SUCCESS; +-} +- +-DEFUN (rmap_onmatch_goto, +- rmap_onmatch_goto_cmd, +- "on-match goto (1-65535)", +- "Exit policy on matches\n" +- "Goto Clause number\n" +- "Number\n") +-{ +- int idx = 0; +- char *num = argv_find(argv, argc, "(1-65535)", &idx) ? argv[idx]->arg +- : NULL; +- +- struct route_map_index *index = VTY_GET_CONTEXT(route_map_index); +- int d = 0; +- +- if (index) { +- if (index->type == RMAP_DENY) { +- /* Under a deny clause, match means it's finished. No +- * need to go anywhere */ +- vty_out(vty, +- "on-match goto not supported under route-map deny\n"); +- return CMD_WARNING_CONFIG_FAILED; +- } +- +- if (num) +- d = strtoul(num, NULL, 10); +- else +- d = index->pref + 1; +- +- if (d <= index->pref) { +- /* Can't allow you to do that, Dave */ +- vty_out(vty, "can't jump backwards in route-maps\n"); +- return CMD_WARNING_CONFIG_FAILED; +- } else { +- index->exitpolicy = RMAP_GOTO; +- index->nextpref = d; +- } +- } +- return CMD_SUCCESS; +-} +- +-DEFUN (no_rmap_onmatch_goto, +- no_rmap_onmatch_goto_cmd, +- "no on-match goto", +- NO_STR +- "Exit policy on matches\n" +- "Goto Clause number\n") +-{ +- struct route_map_index *index = VTY_GET_CONTEXT(route_map_index); +- +- if (index) +- index->exitpolicy = RMAP_EXIT; +- +- return CMD_SUCCESS; +-} +- +-/* Cisco/GNU Zebra compatibility aliases */ +-/* ALIAS_FIXME */ +-DEFUN (rmap_continue, +- rmap_continue_cmd, +- "continue (1-65535)", +- "Continue on a different entry within the route-map\n" +- "Route-map entry sequence number\n") +-{ +- return rmap_onmatch_goto(self, vty, argc, argv); +-} +- +-/* ALIAS_FIXME */ +-DEFUN (no_rmap_continue, +- no_rmap_continue_cmd, +- "no continue [(1-65535)]", +- NO_STR +- "Continue on a different entry within the route-map\n" +- "Route-map entry sequence number\n") +-{ +- return no_rmap_onmatch_goto(self, vty, argc, argv); +-} +- + static void clear_route_map_helper(struct route_map *map) + { + struct route_map_index *index; +@@ -2937,89 +2064,6 @@ DEFUN (rmap_show_unused, + return vty_show_unused_route_map(vty); + } + +-DEFUN (rmap_call, +- rmap_call_cmd, +- "call WORD", +- "Jump to another Route-Map after match+set\n" +- "Target route-map name\n") +-{ +- int idx_word = 1; +- struct route_map_index *index = VTY_GET_CONTEXT(route_map_index); +- const char *rmap = argv[idx_word]->arg; +- +- assert(index); +- +- /* If "call" is invoked with the same route-map name as +- * the one previously configured then, ignore the duplicate +- * configuration. +- */ +- if (index->nextrm && (strcmp(index->nextrm, rmap) == 0)) +- return CMD_SUCCESS; +- +- if (index->nextrm) { +- route_map_upd8_dependency(RMAP_EVENT_CALL_DELETED, +- index->nextrm, index->map->name); +- XFREE(MTYPE_ROUTE_MAP_NAME, index->nextrm); +- } +- index->nextrm = XSTRDUP(MTYPE_ROUTE_MAP_NAME, rmap); +- +- /* Execute event hook. */ +- route_map_upd8_dependency(RMAP_EVENT_CALL_ADDED, index->nextrm, +- index->map->name); +- return CMD_SUCCESS; +-} +- +-DEFUN (no_rmap_call, +- no_rmap_call_cmd, +- "no call", +- NO_STR +- "Jump to another Route-Map after match+set\n") +-{ +- struct route_map_index *index = VTY_GET_CONTEXT(route_map_index); +- +- if (index->nextrm) { +- route_map_upd8_dependency(RMAP_EVENT_CALL_DELETED, +- index->nextrm, index->map->name); +- XFREE(MTYPE_ROUTE_MAP_NAME, index->nextrm); +- index->nextrm = NULL; +- } +- +- return CMD_SUCCESS; +-} +- +-DEFUN (rmap_description, +- rmap_description_cmd, +- "description LINE...", +- "Route-map comment\n" +- "Comment describing this route-map rule\n") +-{ +- int idx_line = 1; +- struct route_map_index *index = VTY_GET_CONTEXT(route_map_index); +- +- if (index) { +- if (index->description) +- XFREE(MTYPE_TMP, index->description); +- index->description = argv_concat(argv, argc, idx_line); +- } +- return CMD_SUCCESS; +-} +- +-DEFUN (no_rmap_description, +- no_rmap_description_cmd, +- "no description", +- NO_STR +- "Route-map comment\n") +-{ +- struct route_map_index *index = VTY_GET_CONTEXT(route_map_index); +- +- if (index) { +- if (index->description) +- XFREE(MTYPE_TMP, index->description); +- index->description = NULL; +- } +- return CMD_SUCCESS; +-} +- + DEFUN (debug_rmap, + debug_rmap_cmd, + "debug route-map", +@@ -3045,59 +2089,6 @@ DEFUN (no_debug_rmap, + static struct cmd_node rmap_debug_node = {RMAP_DEBUG_NODE, "", 1}; + + /* Configuration write function. */ +-static int route_map_config_write(struct vty *vty) +-{ +- struct route_map *map; +- struct route_map_index *index; +- struct route_map_rule *rule; +- int first = 1; +- int write = 0; +- struct listnode *ln; +- struct list *maplist = list_new(); +- +- for (map = route_map_master.head; map; map = map->next) +- listnode_add(maplist, map); +- +- list_sort(maplist, sort_route_map); +- +- for (ALL_LIST_ELEMENTS_RO(maplist, ln, map)) +- for (index = map->head; index; index = index->next) { +- if (!first) +- vty_out(vty, "!\n"); +- else +- first = 0; +- +- vty_out(vty, "route-map %s %s %d\n", map->name, +- route_map_type_str(index->type), index->pref); +- +- if (index->description) +- vty_out(vty, " description %s\n", +- index->description); +- +- for (rule = index->match_list.head; rule; +- rule = rule->next) +- vty_out(vty, " match %s %s\n", rule->cmd->str, +- rule->rule_str ? rule->rule_str : ""); +- +- for (rule = index->set_list.head; rule; +- rule = rule->next) +- vty_out(vty, " set %s %s\n", rule->cmd->str, +- rule->rule_str ? rule->rule_str : ""); +- if (index->nextrm) +- vty_out(vty, " call %s\n", index->nextrm); +- if (index->exitpolicy == RMAP_GOTO) +- vty_out(vty, " on-match goto %d\n", +- index->nextpref); +- if (index->exitpolicy == RMAP_NEXT) +- vty_out(vty, " on-match next\n"); +- +- write++; +- } +- +- list_delete(&maplist); +- return write; +-} +- + static int rmap_config_write_debug(struct vty *vty) + { + int write = 0; +@@ -3110,9 +2101,6 @@ static int rmap_config_write_debug(struct vty *vty) + return write; + } + +-/* Route map node structure. */ +-static struct cmd_node rmap_node = {RMAP_NODE, "%s(config-route-map)# ", 1}; +- + /* Common route map rules */ + + void *route_map_rule_tag_compile(const char *arg) +@@ -3171,14 +2159,6 @@ void route_map_finish(void) + route_map_master_hash = NULL; + } + +-static void rmap_autocomplete(vector comps, struct cmd_token *token) +-{ +- struct route_map *map; +- +- for (map = route_map_master.head; map; map = map->next) +- vector_set(comps, XSTRDUP(MTYPE_COMPLETION, map->name)); +-} +- + /* Increment the use_count counter while attaching the route map */ + void route_map_counter_increment(struct route_map *map) + { +@@ -3196,14 +2176,6 @@ void route_map_counter_decrement(struct route_map *map) + } + } + +-static const struct cmd_variable_handler rmap_var_handlers[] = { +- {/* "route-map WORD" */ +- .varname = "route_map", +- .completions = rmap_autocomplete}, +- {.tokenname = "ROUTEMAP_NAME", .completions = rmap_autocomplete}, +- {.tokenname = "RMAP_NAME", .completions = rmap_autocomplete}, +- {.completions = NULL}}; +- + /* Initialization of route map vector. */ + void route_map_init(void) + { +@@ -3221,43 +2193,17 @@ void route_map_init(void) + 8, route_map_dep_hash_make_key, route_map_dep_hash_cmp, + "Route Map Dep Hash"); + +- cmd_variable_handler_register(rmap_var_handlers); +- + rmap_debug = false; + +- /* Install route map top node. */ +- install_node(&rmap_node, route_map_config_write); ++ route_map_cli_init(); + ++ /* Install route map top node. */ + install_node(&rmap_debug_node, rmap_config_write_debug); + + /* Install route map commands. */ +- install_default(RMAP_NODE); +- install_element(CONFIG_NODE, &route_map_cmd); +- install_element(CONFIG_NODE, &no_route_map_cmd); +- install_element(CONFIG_NODE, &no_route_map_all_cmd); +- + install_element(CONFIG_NODE, &debug_rmap_cmd); + install_element(CONFIG_NODE, &no_debug_rmap_cmd); + +- /* Install the on-match stuff */ +- install_element(RMAP_NODE, &route_map_cmd); +- install_element(RMAP_NODE, &rmap_onmatch_next_cmd); +- install_element(RMAP_NODE, &no_rmap_onmatch_next_cmd); +- install_element(RMAP_NODE, &rmap_onmatch_goto_cmd); +- install_element(RMAP_NODE, &no_rmap_onmatch_goto_cmd); +- install_element(RMAP_NODE, &rmap_continue_cmd); +- install_element(RMAP_NODE, &no_rmap_continue_cmd); +- +- /* Install the continue stuff (ALIAS of on-match). */ +- +- /* Install the call stuff. */ +- install_element(RMAP_NODE, &rmap_call_cmd); +- install_element(RMAP_NODE, &no_rmap_call_cmd); +- +- /* Install description commands. */ +- install_element(RMAP_NODE, &rmap_description_cmd); +- install_element(RMAP_NODE, &no_rmap_description_cmd); +- + /* Install show command */ + install_element(ENABLE_NODE, &rmap_clear_counters_cmd); + +@@ -3266,49 +2212,4 @@ void route_map_init(void) + + install_element(ENABLE_NODE, &debug_rmap_cmd); + install_element(ENABLE_NODE, &no_debug_rmap_cmd); +- +- install_element(RMAP_NODE, &match_interface_cmd); +- install_element(RMAP_NODE, &no_match_interface_cmd); +- +- install_element(RMAP_NODE, &match_ip_address_cmd); +- install_element(RMAP_NODE, &no_match_ip_address_cmd); +- +- install_element(RMAP_NODE, &match_ip_address_prefix_list_cmd); +- install_element(RMAP_NODE, &no_match_ip_address_prefix_list_cmd); +- +- install_element(RMAP_NODE, &match_ip_next_hop_cmd); +- install_element(RMAP_NODE, &no_match_ip_next_hop_cmd); +- +- install_element(RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); +- install_element(RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); +- +- install_element(RMAP_NODE, &match_ip_next_hop_type_cmd); +- install_element(RMAP_NODE, &no_match_ip_next_hop_type_cmd); +- +- install_element(RMAP_NODE, &match_ipv6_address_cmd); +- install_element(RMAP_NODE, &no_match_ipv6_address_cmd); +- +- install_element(RMAP_NODE, &match_ipv6_address_prefix_list_cmd); +- install_element(RMAP_NODE, &no_match_ipv6_address_prefix_list_cmd); +- +- install_element(RMAP_NODE, &match_ipv6_next_hop_type_cmd); +- install_element(RMAP_NODE, &no_match_ipv6_next_hop_type_cmd); +- +- install_element(RMAP_NODE, &match_metric_cmd); +- install_element(RMAP_NODE, &no_match_metric_cmd); +- +- install_element(RMAP_NODE, &match_tag_cmd); +- install_element(RMAP_NODE, &no_match_tag_cmd); +- +- install_element(RMAP_NODE, &set_ip_nexthop_cmd); +- install_element(RMAP_NODE, &no_set_ip_nexthop_cmd); +- +- install_element(RMAP_NODE, &set_ipv6_nexthop_local_cmd); +- install_element(RMAP_NODE, &no_set_ipv6_nexthop_local_cmd); +- +- install_element(RMAP_NODE, &set_metric_cmd); +- install_element(RMAP_NODE, &no_set_metric_cmd); +- +- install_element(RMAP_NODE, &set_tag_cmd); +- install_element(RMAP_NODE, &no_set_tag_cmd); + } +diff --git a/lib/routemap.h b/lib/routemap.h +index d9e7f73f81..70e150c981 100644 +--- a/lib/routemap.h ++++ b/lib/routemap.h +@@ -666,8 +666,27 @@ int lib_route_map_entry_match_destroy(enum nb_event event, + const struct lyd_node *dnode); + int lib_route_map_entry_set_destroy(enum nb_event event, + const struct lyd_node *dnode); ++ + extern const struct frr_yang_module_info frr_route_map_info; + ++/* routemap_cli.c */ ++extern void route_map_instance_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults); ++extern void route_map_instance_show_end(struct vty *vty, ++ struct lyd_node *dnode); ++extern void route_map_condition_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults); ++extern void route_map_action_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults); ++extern void route_map_exit_policy_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults); ++extern void route_map_call_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults); ++extern void route_map_description_show(struct vty *vty, ++ struct lyd_node *dnode, ++ bool show_defaults); ++extern void route_map_cli_init(void); ++ + #ifdef __cplusplus + } + #endif +diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c +new file mode 100644 +index 0000000000..987693c961 +--- /dev/null ++++ b/lib/routemap_cli.c +@@ -0,0 +1,1075 @@ ++/* ++ * Route map northbound CLI implementation. ++ * ++ * Copyright (C) 2019 Network Device Education Foundation, Inc. ("NetDEF") ++ * Rafael Zalamena ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++ * 02110-1301 USA. ++ */ ++ ++#include ++ ++#include "lib/command.h" ++#include "lib/northbound_cli.h" ++#include "lib/routemap.h" ++ ++#ifndef VTYSH_EXTRACT_PL ++#include "lib/routemap_cli_clippy.c" ++#endif /* VTYSH_EXTRACT_PL */ ++ ++#define ROUTE_MAP_CMD_STR \ ++ "Create route-map or enter route-map command mode\n" \ ++ "Route map tag\n" ++#define ROUTE_MAP_OP_CMD_STR \ ++ "Route map denies set operations\n" \ ++ "Route map permits set operations\n" ++#define ROUTE_MAP_SEQUENCE_CMD_STR \ ++ "Sequence to insert to/delete from existing route-map entry\n" ++ ++DEFPY_NOSH( ++ route_map, route_map_cmd, ++ "route-map WORD$name $action (1-65535)$sequence", ++ ROUTE_MAP_CMD_STR ++ ROUTE_MAP_OP_CMD_STR ++ ROUTE_MAP_SEQUENCE_CMD_STR) ++{ ++ char xpath_action[XPATH_MAXLEN + 64]; ++ char xpath_index[XPATH_MAXLEN + 32]; ++ char xpath[XPATH_MAXLEN]; ++ int rv; ++ ++ snprintf(xpath, sizeof(xpath), ++ "/frr-route-map:lib/route-map[name='%s']", name); ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ ++ snprintf(xpath_index, sizeof(xpath_index), "%s/entry[sequence='%lu']", ++ xpath, sequence); ++ nb_cli_enqueue_change(vty, xpath_index, NB_OP_CREATE, NULL); ++ ++ snprintf(xpath_action, sizeof(xpath_action), "%s/action", xpath_index); ++ nb_cli_enqueue_change(vty, xpath_action, NB_OP_MODIFY, action); ++ ++ rv = nb_cli_apply_changes(vty, NULL); ++ if (rv == CMD_SUCCESS) ++ VTY_PUSH_XPATH(RMAP_NODE, xpath_index); ++ ++ return rv; ++} ++ ++DEFPY( ++ no_route_map_all, no_route_map_all_cmd, ++ "no route-map WORD$name", ++ NO_STR ++ ROUTE_MAP_CMD_STR) ++{ ++ char xpath[XPATH_MAXLEN]; ++ ++ snprintf(xpath, sizeof(xpath), ++ "/frr-route-map:lib/route-map[name='%s']", name); ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_route_map, no_route_map_cmd, ++ "no route-map WORD$name $action (1-65535)$sequence", ++ NO_STR ++ ROUTE_MAP_CMD_STR ++ ROUTE_MAP_OP_CMD_STR ++ ROUTE_MAP_SEQUENCE_CMD_STR) ++{ ++ char xpath[XPATH_MAXLEN]; ++ ++ snprintf(xpath, sizeof(xpath), ++ "/frr-route-map:lib/route-map[name='%s']/entry[sequence='%lu']", ++ name, sequence); ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++void route_map_instance_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults) ++{ ++ const char *name = yang_dnode_get_string(dnode, "../name"); ++ const char *action = yang_dnode_get_string(dnode, "./action"); ++ const char *sequence = yang_dnode_get_string(dnode, "./sequence"); ++ ++ vty_out(vty, "route-map %s %s %s\n", name, action, sequence); ++} ++ ++void route_map_instance_show_end(struct vty *vty, struct lyd_node *dnode) ++{ ++ vty_out(vty, "!\n"); ++} ++ ++DEFPY( ++ match_interface, match_interface_cmd, ++ "match interface IFNAME", ++ MATCH_STR ++ "Match first hop interface of route\n" ++ INTERFACE_STR) ++{ ++ const char *xpath = "./match-condition[condition='interface']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/interface", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, ifname); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_interface, no_match_interface_cmd, ++ "no match interface [IFNAME]", ++ NO_STR ++ MATCH_STR ++ "Match first hop interface of route\n" ++ INTERFACE_STR) ++{ ++ const char *xpath = "./match-condition[condition='interface']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_ip_address, match_ip_address_cmd, ++ "match ip address <(1-199)$acll|(1300-2699)$aclh|WORD$name>", ++ MATCH_STR ++ IP_STR ++ "Match address of route\n" ++ "IP access-list number\n" ++ "IP access-list number (expanded range)\n" ++ "IP Access-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv4-address-list']"; ++ char xpath_value[XPATH_MAXLEN + 32]; ++ int acln = acll ? acll : aclh; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ if (name) { ++ snprintf(xpath_value, sizeof(xpath_value), "%s/list-name", ++ xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, name); ++ } else /* if (acll || aclh) */ { ++ if ((acln >= 1 && acln <= 99) ++ || (acln >= 1300 && acln <= 1999)) { ++ snprintf(xpath_value, sizeof(xpath_value), ++ "%s/access-list-num", xpath); ++ } else { ++ /* ++ * if ((acln >= 100 && acln <= 199) ++ * || (acln >= 2000 && acln <= 2699)) ++ */ ++ snprintf(xpath_value, sizeof(xpath_value), ++ "%s/access-list-num-extended", xpath); ++ } ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, ++ acll_str ? acll_str : aclh_str); ++ } ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_ip_address, no_match_ip_address_cmd, ++ "no match ip address [<(1-199)|(1300-2699)|WORD>]", ++ NO_STR ++ MATCH_STR ++ IP_STR ++ "Match address of route\n" ++ "IP access-list number\n" ++ "IP access-list number (expanded range)\n" ++ "IP Access-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv4-address-list']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_ip_address_prefix_list, ++ match_ip_address_prefix_list_cmd, ++ "match ip address prefix-list WORD$name", ++ MATCH_STR ++ IP_STR ++ "Match address of route\n" ++ "Match entries of prefix-lists\n" ++ "IP prefix-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv4-prefix-list']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/list-name", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, name); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd, ++ "no match ip address prefix-list [WORD]", ++ NO_STR ++ MATCH_STR ++ IP_STR ++ "Match address of route\n" ++ "Match entries of prefix-lists\n" ++ "IP prefix-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv4-prefix-list']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_ip_next_hop, match_ip_next_hop_cmd, ++ "match ip next-hop <(1-199)$acll|(1300-2699)$aclh|WORD$name>", ++ MATCH_STR ++ IP_STR ++ "Match next-hop address of route\n" ++ "IP access-list number\n" ++ "IP access-list number (expanded range)\n" ++ "IP Access-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv4-next-hop-list']"; ++ char xpath_value[XPATH_MAXLEN + 32]; ++ int acln = acll ? acll : aclh; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ if (name) { ++ snprintf(xpath_value, sizeof(xpath_value), "%s/list-name", ++ xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, name); ++ } else /* if (acll || aclh) */ { ++ if ((acln >= 1 && acln <= 99) ++ || (acln >= 1300 && acln <= 1999)) { ++ snprintf(xpath_value, sizeof(xpath_value), ++ "%s/access-list-num", xpath); ++ } else { ++ /* ++ * if ((acln >= 100 && acln <= 199) ++ * || (acln >= 2000 && acln <= 2699)) ++ */ ++ snprintf(xpath_value, sizeof(xpath_value), ++ "%s/access-list-num-extended", xpath); ++ } ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, ++ acll_str ? acll_str : aclh_str); ++ } ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_ip_next_hop, no_match_ip_next_hop_cmd, ++ "no match ip next-hop [<(1-199)|(1300-2699)|WORD>]", ++ NO_STR ++ MATCH_STR ++ IP_STR ++ "Match address of route\n" ++ "IP access-list number\n" ++ "IP access-list number (expanded range)\n" ++ "IP Access-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv4-next-hop-list']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_ip_next_hop_prefix_list, ++ match_ip_next_hop_prefix_list_cmd, ++ "match ip next-hop prefix-list WORD$name", ++ MATCH_STR ++ IP_STR ++ "Match next-hop address of route\n" ++ "Match entries of prefix-lists\n" ++ "IP prefix-list name\n") ++{ ++ const char *xpath = ++ "./match-condition[condition='ipv4-next-hop-prefix-list']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/list-name", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, name); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_ip_next_hop_prefix_list, ++ no_match_ip_next_hop_prefix_list_cmd, ++ "no match ip next-hop prefix-list [WORD]", ++ NO_STR ++ MATCH_STR ++ IP_STR ++ "Match next-hop address of route\n" ++ "Match entries of prefix-lists\n" ++ "IP prefix-list name\n") ++{ ++ const char *xpath = ++ "./match-condition[condition='ipv4-next-hop-prefix-list']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_ip_next_hop_type, match_ip_next_hop_type_cmd, ++ "match ip next-hop type $type", ++ MATCH_STR ++ IP_STR ++ "Match next-hop address of route\n" ++ "Match entries by type\n" ++ "Blackhole\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv4-next-hop-type']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/ipv4-next-hop-type", ++ xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, type); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_ip_next_hop_type, no_match_ip_next_hop_type_cmd, ++ "no match ip next-hop type []", ++ NO_STR MATCH_STR IP_STR ++ "Match next-hop address of route\n" ++ "Match entries by type\n" ++ "Blackhole\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv4-next-hop-type']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_ipv6_address, match_ipv6_address_cmd, ++ "match ipv6 address WORD$name", ++ MATCH_STR ++ IPV6_STR ++ "Match IPv6 address of route\n" ++ "IPv6 access-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv6-address-list']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/list-name", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, name); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_ipv6_address, no_match_ipv6_address_cmd, ++ "no match ipv6 address [WORD]", ++ NO_STR ++ MATCH_STR ++ IPV6_STR ++ "Match IPv6 address of route\n" ++ "IPv6 access-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv6-address-list']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_ipv6_address_prefix_list, match_ipv6_address_prefix_list_cmd, ++ "match ipv6 address prefix-list WORD$name", ++ MATCH_STR ++ IPV6_STR ++ "Match address of route\n" ++ "Match entries of prefix-lists\n" ++ "IP prefix-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv6-prefix-list']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/list-name", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, name); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_ipv6_address_prefix_list, ++ no_match_ipv6_address_prefix_list_cmd, ++ "no match ipv6 address prefix-list [WORD]", ++ NO_STR ++ MATCH_STR ++ IPV6_STR ++ "Match address of route\n" ++ "Match entries of prefix-lists\n" ++ "IP prefix-list name\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv6-prefix-list']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_ipv6_next_hop_type, match_ipv6_next_hop_type_cmd, ++ "match ipv6 next-hop type $type", ++ MATCH_STR IPV6_STR ++ "Match next-hop address of route\n" ++ "Match entries by type\n" ++ "Blackhole\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv6-next-hop-type']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/ipv6-next-hop-type", ++ xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, type); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_ipv6_next_hop_type, no_match_ipv6_next_hop_type_cmd, ++ "no match ipv6 next-hop type []", ++ NO_STR MATCH_STR IPV6_STR ++ "Match address of route\n" ++ "Match entries by type\n" ++ "Blackhole\n") ++{ ++ const char *xpath = "./match-condition[condition='ipv6-next-hop-type']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_metric, match_metric_cmd, ++ "match metric (0-4294967295)$metric", ++ MATCH_STR ++ "Match metric of route\n" ++ "Metric value\n") ++{ ++ const char *xpath = "./match-condition[condition='metric']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/metric", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, metric_str); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_metric, no_match_metric_cmd, ++ "no match metric [(0-4294967295)]", ++ NO_STR ++ MATCH_STR ++ "Match metric of route\n" ++ "Metric value\n") ++{ ++ const char *xpath = "./match-condition[condition='metric']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ match_tag, match_tag_cmd, ++ "match tag (1-4294967295)$tag", ++ MATCH_STR ++ "Match tag of route\n" ++ "Tag value\n") ++{ ++ const char *xpath = "./match-condition[condition='tag']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/tag", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, tag_str); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_match_tag, no_match_tag_cmd, ++ "no match tag [(1-4294967295)]", ++ NO_STR ++ MATCH_STR ++ "Match tag of route\n" ++ "Tag value\n") ++{ ++ const char *xpath = "./match-condition[condition='tag']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++void route_map_condition_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults) ++{ ++ int condition = yang_dnode_get_enum(dnode, "./condition"); ++ struct lyd_node *ln; ++ const char *acl; ++ ++ switch (condition) { ++ case 0: /* interface */ ++ vty_out(vty, " match interface %s\n", ++ yang_dnode_get_string(dnode, "./interface")); ++ break; ++ case 1: /* ipv4-address-list */ ++ case 3: /* ipv4-next-hop-list */ ++ acl = NULL; ++ if ((ln = yang_dnode_get(dnode, "./list-name")) != NULL) ++ acl = yang_dnode_get_string(ln, NULL); ++ else if ((ln = yang_dnode_get(dnode, "./access-list-num")) ++ != NULL) ++ acl = yang_dnode_get_string(ln, NULL); ++ else if ((ln = yang_dnode_get(dnode, ++ "./access-list-num-extended")) ++ != NULL) ++ acl = yang_dnode_get_string(ln, NULL); ++ ++ assert(acl); ++ ++ switch (condition) { ++ case 1: ++ vty_out(vty, " match ip address %s\n", acl); ++ break; ++ case 3: ++ vty_out(vty, " match ip next-hop %s\n", acl); ++ break; ++ } ++ break; ++ case 2: /* ipv4-prefix-list */ ++ vty_out(vty, " match ip address prefix-list %s\n", ++ yang_dnode_get_string(dnode, "./list-name")); ++ break; ++ case 4: /* ipv4-next-hop-prefix-list */ ++ vty_out(vty, " match ip next-hop prefix-list %s\n", ++ yang_dnode_get_string(dnode, "./list-name")); ++ break; ++ case 5: /* ipv4-next-hop-type */ ++ vty_out(vty, " match ip next-hop type %s\n", ++ yang_dnode_get_string(dnode, "./ipv4-next-hop-type")); ++ break; ++ case 6: /* ipv6-address-list */ ++ vty_out(vty, " match ipv6 address %s\n", ++ yang_dnode_get_string(dnode, "./list-name")); ++ break; ++ case 7: /* ipv6-prefix-list */ ++ vty_out(vty, " match ipv6 address prefix-list %s\n", ++ yang_dnode_get_string(dnode, "./list-name")); ++ break; ++ case 8: /* ipv6-next-hop-type */ ++ vty_out(vty, " match ipv6 next-hop type %s\n", ++ yang_dnode_get_string(dnode, "./ipv6-next-hop-type")); ++ break; ++ case 9: /* metric */ ++ vty_out(vty, " match metric %s\n", ++ yang_dnode_get_string(dnode, "./metric")); ++ break; ++ case 10: /* tag */ ++ vty_out(vty, " match tag %s\n", ++ yang_dnode_get_string(dnode, "./tag")); ++ break; ++ case 100: ++ /* NOTHING: custom field, should be handled by daemon. */ ++ break; ++ } ++} ++ ++DEFPY( ++ set_ip_nexthop, set_ip_nexthop_cmd, ++ "set ip next-hop A.B.C.D$addr", ++ SET_STR ++ IP_STR ++ "Next hop address\n" ++ "IP address of next hop\n") ++{ ++ const char *xpath = "./set-action[action='ipv4-next-hop']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/ipv4-address", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, addr_str); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_set_ip_nexthop, no_set_ip_nexthop_cmd, ++ "no set ip next-hop [A.B.C.D]", ++ NO_STR ++ SET_STR ++ IP_STR ++ "Next hop address\n" ++ "IP address of next hop\n") ++{ ++ const char *xpath = "./set-action[action='ipv4-next-hop']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ set_ipv6_nexthop_local, set_ipv6_nexthop_local_cmd, ++ "set ipv6 next-hop local X:X::X:X$addr", ++ SET_STR ++ IPV6_STR ++ "IPv6 next-hop address\n" ++ "IPv6 local address\n" ++ "IPv6 address of next hop\n") ++{ ++ const char *xpath = "./set-action[action='ipv6-next-hop']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/ipv6-address", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, addr_str); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_set_ipv6_nexthop_local, no_set_ipv6_nexthop_local_cmd, ++ "no set ipv6 next-hop local [X:X::X:X]", ++ NO_STR ++ SET_STR ++ IPV6_STR ++ "IPv6 next-hop address\n" ++ "IPv6 local address\n" ++ "IPv6 address of next hop\n") ++{ ++ const char *xpath = "./set-action[action='ipv6-next-hop']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ set_metric, set_metric_cmd, ++ "set metric <(0-4294967295)$metric|rtt$rtt|+rtt$artt|-rtt$srtt|+metric$ametric|-metric$smetric>", ++ SET_STR ++ "Metric value for destination routing protocol\n" ++ "Metric value\n" ++ "Assign round trip time\n" ++ "Add round trip time\n" ++ "Subtract round trip time\n" ++ "Add metric\n" ++ "Subtract metric\n") ++{ ++ const char *xpath = "./set-action[action='metric']"; ++ char xpath_value[XPATH_MAXLEN]; ++ char value[64]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ if (rtt) { ++ snprintf(xpath_value, sizeof(xpath_value), ++ "%s/use-round-trip-time", xpath); ++ snprintf(value, sizeof(value), "true"); ++ } else if (artt) { ++ snprintf(xpath_value, sizeof(xpath_value), ++ "%s/add-round-trip-time", xpath); ++ snprintf(value, sizeof(value), "true"); ++ } else if (srtt) { ++ snprintf(xpath_value, sizeof(xpath_value), ++ "%s/subtract-round-trip-time", xpath); ++ snprintf(value, sizeof(value), "true"); ++ } else if (ametric) { ++ snprintf(xpath_value, sizeof(xpath_value), "%s/add-metric", ++ xpath); ++ snprintf(value, sizeof(value), "true"); ++ } else if (smetric) { ++ snprintf(xpath_value, sizeof(xpath_value), "%s/subtract-metric", ++ xpath); ++ snprintf(value, sizeof(value), "true"); ++ } else { ++ snprintf(xpath_value, sizeof(xpath_value), "%s/value", xpath); ++ snprintf(value, sizeof(value), "%lu", metric); ++ } ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, value); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_set_metric, no_set_metric_cmd, ++ "no set metric [(0-4294967295)]", ++ NO_STR ++ SET_STR ++ "Metric value for destination routing protocol\n" ++ "Metric value\n") ++{ ++ const char *xpath = "./set-action[action='metric']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ set_tag, set_tag_cmd, ++ "set tag (1-4294967295)$tag", ++ SET_STR ++ "Tag value for routing protocol\n" ++ "Tag value\n") ++{ ++ const char *xpath = "./set-action[action='tag']"; ++ char xpath_value[XPATH_MAXLEN]; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL); ++ snprintf(xpath_value, sizeof(xpath_value), "%s/tag", xpath); ++ nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, tag_str); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_set_tag, no_set_tag_cmd, ++ "no set tag [(1-4294967295)]", ++ NO_STR ++ SET_STR ++ "Tag value for routing protocol\n" ++ "Tag value\n") ++{ ++ const char *xpath = "./set-action[action='tag']"; ++ ++ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++void route_map_action_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults) ++{ ++ int action = yang_dnode_get_enum(dnode, "./action"); ++ ++ switch (action) { ++ case 0: /* ipv4-next-hop */ ++ vty_out(vty, " set ip next-hop %s\n", ++ yang_dnode_get_string(dnode, "./ipv4-address")); ++ break; ++ case 1: /* ipv6-next-hop */ ++ vty_out(vty, " set ipv6 next-hop local %s\n", ++ yang_dnode_get_string(dnode, "./ipv6-address")); ++ break; ++ case 2: /* metric */ ++ if (yang_dnode_get(dnode, "./use-round-trip-time")) { ++ vty_out(vty, " set metric rtt\n"); ++ } else if (yang_dnode_get(dnode, "./add-round-trip-time")) { ++ vty_out(vty, " set metric +rtt\n"); ++ } else if (yang_dnode_get(dnode, "./subtract-round-trip-time")) { ++ vty_out(vty, " set metric -rtt\n"); ++ } else if (yang_dnode_get(dnode, "./add-metric")) { ++ vty_out(vty, " set metric +metric\n"); ++ } else if (yang_dnode_get(dnode, "./subtract-metric")) { ++ vty_out(vty, " set metric -metric\n"); ++ } else { ++ vty_out(vty, " set metric %s\n", ++ yang_dnode_get_string(dnode, "./value")); ++ } ++ break; ++ case 3: /* tag */ ++ vty_out(vty, " set tag %s\n", ++ yang_dnode_get_string(dnode, "./tag")); ++ break; ++ case 100: ++ /* NOTHING: custom field, should be handled by daemon. */ ++ break; ++ } ++} ++ ++DEFPY( ++ rmap_onmatch_next, rmap_onmatch_next_cmd, ++ "on-match next", ++ "Exit policy on matches\n" ++ "Next clause\n") ++{ ++ nb_cli_enqueue_change(vty, "./exit-policy", NB_OP_MODIFY, "next"); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_rmap_onmatch_next, ++ no_rmap_onmatch_next_cmd, ++ "no on-match next", ++ NO_STR ++ "Exit policy on matches\n" ++ "Next clause\n") ++{ ++ nb_cli_enqueue_change(vty, "./exit-policy", NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ rmap_onmatch_goto, rmap_onmatch_goto_cmd, ++ "on-match goto (1-65535)$rm_num", ++ "Exit policy on matches\n" ++ "Goto Clause number\n" ++ "Number\n") ++{ ++ nb_cli_enqueue_change(vty, "./exit-policy", NB_OP_MODIFY, "goto"); ++ nb_cli_enqueue_change(vty, "./goto-value", NB_OP_MODIFY, rm_num_str); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_rmap_onmatch_goto, no_rmap_onmatch_goto_cmd, ++ "no on-match goto", ++ NO_STR ++ "Exit policy on matches\n" ++ "Goto Clause number\n") ++{ ++ nb_cli_enqueue_change(vty, "./exit-policy", NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++/* Cisco/GNU Zebra compatibility aliases */ ++ALIAS( ++ rmap_onmatch_goto, rmap_continue_cmd, ++ "continue (1-65535)$rm_num", ++ "Continue on a different entry within the route-map\n" ++ "Route-map entry sequence number\n") ++ ++ALIAS( ++ no_rmap_onmatch_goto, no_rmap_continue_cmd, ++ "no continue [(1-65535)]", ++ NO_STR ++ "Continue on a different entry within the route-map\n" ++ "Route-map entry sequence number\n") ++ ++void route_map_exit_policy_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults) ++{ ++ int exit_policy = yang_dnode_get_enum(dnode, NULL); ++ ++ switch (exit_policy) { ++ case 0: /* permit-or-deny */ ++ /* NOTHING: default option. */ ++ break; ++ case 1: /* next */ ++ vty_out(vty, " on-match next\n"); ++ break; ++ case 2: /* goto */ ++ vty_out(vty, " on-match goto %s\n", ++ yang_dnode_get_string(dnode, "../goto-value")); ++ break; ++ } ++} ++ ++DEFPY( ++ rmap_call, rmap_call_cmd, ++ "call WORD$name", ++ "Jump to another Route-Map after match+set\n" ++ "Target route-map name\n") ++{ ++ nb_cli_enqueue_change(vty, "./call", NB_OP_MODIFY, name); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++DEFPY( ++ no_rmap_call, no_rmap_call_cmd, ++ "no call", ++ NO_STR ++ "Jump to another Route-Map after match+set\n") ++{ ++ nb_cli_enqueue_change(vty, "./call", NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++void route_map_call_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults) ++{ ++ vty_out(vty, " call %s\n", yang_dnode_get_string(dnode, NULL)); ++} ++ ++DEFPY( ++ rmap_description, rmap_description_cmd, ++ "description LINE...", ++ "Route-map comment\n" ++ "Comment describing this route-map rule\n") ++{ ++ char *desc; ++ int rv; ++ ++ desc = argv_concat(argv, argc, 1); ++ nb_cli_enqueue_change(vty, "./description", NB_OP_MODIFY, desc); ++ rv = nb_cli_apply_changes(vty, NULL); ++ XFREE(MTYPE_TMP, desc); ++ ++ return rv; ++} ++ ++DEFUN (no_rmap_description, ++ no_rmap_description_cmd, ++ "no description", ++ NO_STR ++ "Route-map comment\n") ++{ ++ nb_cli_enqueue_change(vty, "./description", NB_OP_DESTROY, NULL); ++ ++ return nb_cli_apply_changes(vty, NULL); ++} ++ ++void route_map_description_show(struct vty *vty, struct lyd_node *dnode, ++ bool show_defaults) ++{ ++ vty_out(vty, " description %s\n", yang_dnode_get_string(dnode, NULL)); ++} ++ ++static int route_map_config_write(struct vty *vty) ++{ ++ struct lyd_node *dnode; ++ int written = 0; ++ ++ dnode = yang_dnode_get(running_config->dnode, ++ "/frr-route-map:lib"); ++ if (dnode) { ++ nb_cli_show_dnode_cmds(vty, dnode, false); ++ written = 1; ++ } ++ ++ return written; ++} ++ ++/* Route map node structure. */ ++static struct cmd_node rmap_node = {RMAP_NODE, "%s(config-route-map)# ", 1}; ++ ++static void rmap_autocomplete(vector comps, struct cmd_token *token) ++{ ++ struct route_map *map; ++ ++ for (map = route_map_master.head; map; map = map->next) ++ vector_set(comps, XSTRDUP(MTYPE_COMPLETION, map->name)); ++} ++ ++static const struct cmd_variable_handler rmap_var_handlers[] = { ++ {.varname = "route_map", .completions = rmap_autocomplete}, ++ {.tokenname = "ROUTEMAP_NAME", .completions = rmap_autocomplete}, ++ {.tokenname = "RMAP_NAME", .completions = rmap_autocomplete}, ++ {.completions = NULL} ++}; ++ ++void route_map_cli_init(void) ++{ ++ /* Auto complete handler. */ ++ cmd_variable_handler_register(rmap_var_handlers); ++ ++ /* CLI commands. */ ++ install_node(&rmap_node, route_map_config_write); ++ install_default(RMAP_NODE); ++ install_element(CONFIG_NODE, &route_map_cmd); ++ install_element(CONFIG_NODE, &no_route_map_cmd); ++ install_element(CONFIG_NODE, &no_route_map_all_cmd); ++ ++ /* Install the on-match stuff */ ++ install_element(RMAP_NODE, &route_map_cmd); ++ install_element(RMAP_NODE, &rmap_onmatch_next_cmd); ++ install_element(RMAP_NODE, &no_rmap_onmatch_next_cmd); ++ install_element(RMAP_NODE, &rmap_onmatch_goto_cmd); ++ install_element(RMAP_NODE, &no_rmap_onmatch_goto_cmd); ++ install_element(RMAP_NODE, &rmap_continue_cmd); ++ install_element(RMAP_NODE, &no_rmap_continue_cmd); ++ ++ /* Install the call stuff. */ ++ install_element(RMAP_NODE, &rmap_call_cmd); ++ install_element(RMAP_NODE, &no_rmap_call_cmd); ++ ++ /* Install description commands. */ ++ install_element(RMAP_NODE, &rmap_description_cmd); ++ install_element(RMAP_NODE, &no_rmap_description_cmd); ++ ++ /* Install 'match' commands. */ ++ install_element(RMAP_NODE, &match_interface_cmd); ++ install_element(RMAP_NODE, &no_match_interface_cmd); ++ ++ install_element(RMAP_NODE, &match_ip_address_cmd); ++ install_element(RMAP_NODE, &no_match_ip_address_cmd); ++ ++ install_element(RMAP_NODE, &match_ip_address_prefix_list_cmd); ++ install_element(RMAP_NODE, &no_match_ip_address_prefix_list_cmd); ++ ++ install_element(RMAP_NODE, &match_ip_next_hop_cmd); ++ install_element(RMAP_NODE, &no_match_ip_next_hop_cmd); ++ ++ install_element(RMAP_NODE, &match_ip_next_hop_prefix_list_cmd); ++ install_element(RMAP_NODE, &no_match_ip_next_hop_prefix_list_cmd); ++ ++ install_element(RMAP_NODE, &match_ip_next_hop_type_cmd); ++ install_element(RMAP_NODE, &no_match_ip_next_hop_type_cmd); ++ ++ install_element(RMAP_NODE, &match_ipv6_address_cmd); ++ install_element(RMAP_NODE, &no_match_ipv6_address_cmd); ++ ++ install_element(RMAP_NODE, &match_ipv6_address_prefix_list_cmd); ++ install_element(RMAP_NODE, &no_match_ipv6_address_prefix_list_cmd); ++ ++ install_element(RMAP_NODE, &match_ipv6_next_hop_type_cmd); ++ install_element(RMAP_NODE, &no_match_ipv6_next_hop_type_cmd); ++ ++ install_element(RMAP_NODE, &match_metric_cmd); ++ install_element(RMAP_NODE, &no_match_metric_cmd); ++ ++ install_element(RMAP_NODE, &match_tag_cmd); ++ install_element(RMAP_NODE, &no_match_tag_cmd); ++ ++ /* Install 'set' commands. */ ++ install_element(RMAP_NODE, &set_ip_nexthop_cmd); ++ install_element(RMAP_NODE, &no_set_ip_nexthop_cmd); ++ ++ install_element(RMAP_NODE, &set_ipv6_nexthop_local_cmd); ++ install_element(RMAP_NODE, &no_set_ipv6_nexthop_local_cmd); ++ ++ install_element(RMAP_NODE, &set_metric_cmd); ++ install_element(RMAP_NODE, &no_set_metric_cmd); ++ ++ install_element(RMAP_NODE, &set_tag_cmd); ++ install_element(RMAP_NODE, &no_set_tag_cmd); ++} +diff --git a/lib/routemap_northbound.c b/lib/routemap_northbound.c +index 02eb756334..b9ac01e865 100644 +--- a/lib/routemap_northbound.c ++++ b/lib/routemap_northbound.c +@@ -1218,6 +1218,8 @@ const struct frr_yang_module_info frr_route_map_info = { + .cbs = { + .create = lib_route_map_entry_create, + .destroy = lib_route_map_entry_destroy, ++ .cli_show = route_map_instance_show, ++ .cli_show_end = route_map_instance_show_end, + } + }, + { +@@ -1225,6 +1227,7 @@ const struct frr_yang_module_info frr_route_map_info = { + .cbs = { + .modify = lib_route_map_entry_description_modify, + .destroy = lib_route_map_entry_description_destroy, ++ .cli_show = route_map_description_show, + } + }, + { +@@ -1238,12 +1241,14 @@ const struct frr_yang_module_info frr_route_map_info = { + .cbs = { + .modify = lib_route_map_entry_call_modify, + .destroy = lib_route_map_entry_call_destroy, ++ .cli_show = route_map_call_show, + } + }, + { + .xpath = "/frr-route-map:lib/route-map/entry/exit-policy", + .cbs = { + .modify = lib_route_map_entry_exit_policy_modify, ++ .cli_show = route_map_exit_policy_show, + } + }, + { +@@ -1258,6 +1263,7 @@ const struct frr_yang_module_info frr_route_map_info = { + .cbs = { + .create = lib_route_map_entry_match_condition_create, + .destroy = lib_route_map_entry_match_condition_destroy, ++ .cli_show = route_map_condition_show, + } + }, + { +@@ -1321,6 +1327,7 @@ const struct frr_yang_module_info frr_route_map_info = { + .cbs = { + .create = lib_route_map_entry_set_action_create, + .destroy = lib_route_map_entry_set_action_destroy, ++ .cli_show = route_map_action_show, + } + }, + { +diff --git a/lib/subdir.am b/lib/subdir.am +index 94b3d933ac..ffac721256 100644 +--- a/lib/subdir.am ++++ b/lib/subdir.am +@@ -71,6 +71,7 @@ lib_libfrr_la_SOURCES = \ + lib/qobj.c \ + lib/ringbuf.c \ + lib/routemap.c \ ++ lib/routemap_cli.c \ + lib/routemap_northbound.c \ + lib/sbuf.c \ + lib/seqlock.c \ +@@ -122,6 +123,7 @@ vtysh_scan += \ + $(top_srcdir)/lib/nexthop_group.c \ + $(top_srcdir)/lib/plist.c \ + $(top_srcdir)/lib/routemap.c \ ++ $(top_srcdir)/lib/routemap_cli.c \ + $(top_srcdir)/lib/vrf.c \ + $(top_srcdir)/lib/vty.c \ + # end +@@ -141,6 +143,8 @@ lib/nexthop_group_clippy.c: $(CLIPPY_DEPS) + lib/nexthop_group.lo: lib/nexthop_group_clippy.c + lib/northbound_cli_clippy.c: $(CLIPPY_DEPS) + lib/northbound_cli.lo: lib/northbound_cli_clippy.c ++lib/routemap_cli_clippy.c: $(CLIPPY_DEPS) ++lib/routemap_cli.lo: lib/routemap_cli_clippy.c + lib/vty_clippy.c: $(CLIPPY_DEPS) + lib/vty.lo: lib/vty_clippy.c + lib/log_vty_clippy.c: $(CLIPPY_DEPS) +diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in +index 13413888bf..b7ac0abe02 100755 +--- a/vtysh/extract.pl.in ++++ b/vtysh/extract.pl.in +@@ -87,7 +87,7 @@ sub scan_file { + if ($file =~ /lib\/keychain\.c$/) { + $protocol = "VTYSH_RIPD|VTYSH_EIGRPD"; + } +- elsif ($file =~ /lib\/routemap\.c$/) { ++ elsif ($file =~ /lib\/routemap\.c$/ || $file =~ /lib\/routemap_cli\.c$/) { + $protocol = "VTYSH_RMAP"; + } + elsif ($file =~ /lib\/vrf\.c$/) { + +From a513824c343971e51603471948c958430b602371 Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Tue, 1 Oct 2019 17:56:16 -0300 +Subject: [PATCH 05/10] yang/lib: add filter model to code + +This fixes a warning on daemons that use route map about filter yang +model not being included in the binary. + +Signed-off-by: Rafael Zalamena +--- + lib/subdir.am | 1 + + yang/subdir.am | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/lib/subdir.am b/lib/subdir.am +index ffac721256..4f62eb2264 100644 +--- a/lib/subdir.am ++++ b/lib/subdir.am +@@ -106,6 +106,7 @@ lib_libfrr_la_SOURCES = \ + # end + + nodist_lib_libfrr_la_SOURCES = \ ++ yang/frr-filter.yang.c \ + yang/frr-interface.yang.c \ + yang/frr-route-map.yang.c \ + yang/frr-route-types.yang.c \ +diff --git a/yang/subdir.am b/yang/subdir.am +index 7a15a6a309..c1297dafd5 100644 +--- a/yang/subdir.am ++++ b/yang/subdir.am +@@ -19,6 +19,7 @@ EXTRA_DIST += yang/embedmodel.py + # global symbols :(. Just put it in the daemon. Dynamic libraries.so work + # without problems, as seen in libfrr. + ++dist_yangmodels_DATA += yang/frr-filter.yang + dist_yangmodels_DATA += yang/frr-module-translator.yang + dist_yangmodels_DATA += yang/frr-test-module.yang + dist_yangmodels_DATA += yang/frr-interface.yang + +From a162869ef0798ef98d756238c6b89108a69f5a5d Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Mon, 30 Sep 2019 15:02:15 -0300 +Subject: [PATCH 06/10] lib: fix route map generic error output + +Two fixes here: + +* Don't attempt to use `vty` pointer in vty; +* When `vty` is unavailable output to log; + +Signed-off-by: Rafael Zalamena +--- + lib/routemap.c | 68 ++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 46 insertions(+), 22 deletions(-) + +diff --git a/lib/routemap.c b/lib/routemap.c +index e07ad08123..5369fa771f 100644 +--- a/lib/routemap.c ++++ b/lib/routemap.c +@@ -308,15 +308,21 @@ int generic_match_add(struct vty *vty, struct route_map_index *index, + ret = route_map_add_match(index, command, arg, type); + switch (ret) { + case RMAP_RULE_MISSING: +- vty_out(vty, "%% [%s] Can't find rule.\n", frr_protonameinst); ++ if (vty) ++ vty_out(vty, "%% [%s] Can't find rule.\n", ++ frr_protonameinst); ++ else ++ zlog_warn("Can't find rule: %s", command); + return CMD_WARNING_CONFIG_FAILED; +- break; + case RMAP_COMPILE_ERROR: +- vty_out(vty, +- "%% [%s] Argument form is unsupported or malformed.\n", +- frr_protonameinst); ++ if (vty) ++ vty_out(vty, ++ "%% [%s] Argument form is unsupported or malformed.\n", ++ frr_protonameinst); ++ else ++ zlog_warn("Argument form is unsupported or malformed: " ++ "%s %s", command, arg); + return CMD_WARNING_CONFIG_FAILED; +- break; + case RMAP_COMPILE_SUCCESS: + /* + * Nothing to do here move along +@@ -353,13 +359,21 @@ int generic_match_delete(struct vty *vty, struct route_map_index *index, + ret = route_map_delete_match(index, command, dep_name, type); + switch (ret) { + case RMAP_RULE_MISSING: +- vty_out(vty, "%% [%s] Can't find rule.\n", frr_protonameinst); ++ if (vty) ++ vty_out(vty, "%% [%s] Can't find rule.\n", ++ frr_protonameinst); ++ else ++ zlog_warn("Can't find rule: %s", command); + retval = CMD_WARNING_CONFIG_FAILED; + break; + case RMAP_COMPILE_ERROR: +- vty_out(vty, +- "%% [%s] Argument form is unsupported or malformed.\n", +- frr_protonameinst); ++ if (vty) ++ vty_out(vty, ++ "%% [%s] Argument form is unsupported or malformed.\n", ++ frr_protonameinst); ++ else ++ zlog_warn("Argument form is unsupported or malformed: " ++ "%s %s", command, arg); + retval = CMD_WARNING_CONFIG_FAILED; + break; + case RMAP_COMPILE_SUCCESS: +@@ -383,15 +397,20 @@ int generic_set_add(struct vty *vty, struct route_map_index *index, + ret = route_map_add_set(index, command, arg); + switch (ret) { + case RMAP_RULE_MISSING: +- vty_out(vty, "%% [%s] Can't find rule.\n", frr_protonameinst); ++ if (vty) ++ vty_out(vty, "%% [%s] Can't find rule.\n", frr_protonameinst); ++ else ++ zlog_warn("Can't find rule: %s", command); + return CMD_WARNING_CONFIG_FAILED; +- break; + case RMAP_COMPILE_ERROR: +- vty_out(vty, +- "%% [%s] Argument form is unsupported or malformed.\n", +- frr_protonameinst); ++ if (vty) ++ vty_out(vty, ++ "%% [%s] Argument form is unsupported or malformed.\n", ++ frr_protonameinst); ++ else ++ zlog_warn("Argument form is unsupported or malformed: " ++ "%s %s", command, arg); + return CMD_WARNING_CONFIG_FAILED; +- break; + case RMAP_COMPILE_SUCCESS: + break; + } +@@ -407,15 +426,20 @@ int generic_set_delete(struct vty *vty, struct route_map_index *index, + ret = route_map_delete_set(index, command, arg); + switch (ret) { + case RMAP_RULE_MISSING: +- vty_out(vty, "%% [%s] Can't find rule.\n", frr_protonameinst); ++ if (vty) ++ vty_out(vty, "%% [%s] Can't find rule.\n", frr_protonameinst); ++ else ++ zlog_warn("Can't find rule: %s", command); + return CMD_WARNING_CONFIG_FAILED; +- break; + case RMAP_COMPILE_ERROR: +- vty_out(vty, +- "%% [%s] Argument form is unsupported or malformed.\n", +- frr_protonameinst); ++ if (vty) ++ vty_out(vty, ++ "%% [%s] Argument form is unsupported or malformed.\n", ++ frr_protonameinst); ++ else ++ zlog_warn("Argument form is unsupported or malformed: " ++ "%s %s", command, arg); + return CMD_WARNING_CONFIG_FAILED; +- break; + case RMAP_COMPILE_SUCCESS: + break; + } + +From e324ef433ca611ddf8274015c0b36c8de1fb3075 Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Tue, 1 Oct 2019 15:52:51 -0300 +Subject: [PATCH 07/10] lib: add backward compatibility for route map + +Allow old CLI users to still print their configuration without migrating +to northbound. + +Signed-off-by: Rafael Zalamena +--- + lib/routemap_cli.c | 56 +++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 55 insertions(+), 1 deletion(-) + +diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c +index 987693c961..7023710564 100644 +--- a/lib/routemap_cli.c ++++ b/lib/routemap_cli.c +@@ -46,6 +46,9 @@ DEFPY_NOSH( + ROUTE_MAP_OP_CMD_STR + ROUTE_MAP_SEQUENCE_CMD_STR) + { ++ struct route_map_index *rmi; ++ struct route_map *rm; ++ int action_type; + char xpath_action[XPATH_MAXLEN + 64]; + char xpath_index[XPATH_MAXLEN + 32]; + char xpath[XPATH_MAXLEN]; +@@ -63,9 +66,16 @@ DEFPY_NOSH( + nb_cli_enqueue_change(vty, xpath_action, NB_OP_MODIFY, action); + + rv = nb_cli_apply_changes(vty, NULL); +- if (rv == CMD_SUCCESS) ++ if (rv == CMD_SUCCESS) { + VTY_PUSH_XPATH(RMAP_NODE, xpath_index); + ++ /* Add support for non-migrated route map users. */ ++ rm = route_map_get(name); ++ action_type = (action[0] == 'p') ? RMAP_PERMIT : RMAP_DENY; ++ rmi = route_map_index_get(rm, action_type, sequence); ++ VTY_PUSH_CONTEXT(RMAP_NODE, rmi); ++ } ++ + return rv; + } + +@@ -105,11 +115,55 @@ DEFPY( + void route_map_instance_show(struct vty *vty, struct lyd_node *dnode, + bool show_defaults) + { ++ const struct route_map_rule *rmr; ++ const struct route_map_index *rmi; + const char *name = yang_dnode_get_string(dnode, "../name"); + const char *action = yang_dnode_get_string(dnode, "./action"); + const char *sequence = yang_dnode_get_string(dnode, "./sequence"); + + vty_out(vty, "route-map %s %s %s\n", name, action, sequence); ++ ++ rmi = nb_running_get_entry(dnode, NULL, false); ++ if (rmi == NULL) { ++ /* ++ * We can't have outdated rules if route map hasn't ++ * been created yet. ++ */ ++ return; ++ } ++ ++#define SKIP_RULE(name) if (strcmp((name), rmr->cmd->str) == 0) continue ++ ++ /* Print route map `match` for old CLI users. */ ++ for (rmr = rmi->match_list.head; rmr; rmr = rmr->next) { ++ /* Skip all matches implemented by northbound. */ ++ SKIP_RULE("interface"); ++ SKIP_RULE("ip address"); ++ SKIP_RULE("ip address prefix-list"); ++ SKIP_RULE("ip next-hop"); ++ SKIP_RULE("ip next-hop prefix-list"); ++ SKIP_RULE("ip next-hop type"); ++ SKIP_RULE("ipv6 address"); ++ SKIP_RULE("ipv6 address prefix-list"); ++ SKIP_RULE("ipv6 next-hop type"); ++ SKIP_RULE("metric"); ++ SKIP_RULE("tag"); ++ ++ vty_out(vty, " match %s %s\n", rmr->cmd->str, ++ rmr->rule_str ? rmr->rule_str : ""); ++ } ++ ++ /* Print route map `set` for old CLI users. */ ++ for (rmr = rmi->set_list.head; rmr; rmr = rmr->next) { ++ /* Skip all sets implemented by northbound. */ ++ SKIP_RULE("metric"); ++ SKIP_RULE("tag"); ++ ++ vty_out(vty, " set %s %s\n", rmr->cmd->str, ++ rmr->rule_str ? rmr->rule_str : ""); ++ } ++ ++#undef SKIP_RULE + } + + void route_map_instance_show_end(struct vty *vty, struct lyd_node *dnode) + +From 91835f1fd2a8dd05a5ba03c8961b699aaabed7e7 Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Tue, 1 Oct 2019 17:56:41 -0300 +Subject: [PATCH 08/10] *: fix route map integration + +Add the appropriated code to bootstrap route map northbound for all +daemons. + +Signed-off-by: Rafael Zalamena +--- + bgpd/bgp_main.c | 2 ++ + eigrpd/eigrp_main.c | 1 + + isisd/isis_main.c | 2 ++ + ospf6d/ospf6_main.c | 1 + + ospfd/ospf_main.c | 2 ++ + ripd/rip_main.c | 2 ++ + ripngd/ripng_main.c | 2 ++ + zebra/main.c | 1 + + 8 files changed, 13 insertions(+) + +diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c +index fab2a584c0..0b33f7e9d9 100644 +--- a/bgpd/bgp_main.c ++++ b/bgpd/bgp_main.c +@@ -360,6 +360,8 @@ static void bgp_vrf_terminate(void) + } + + static const struct frr_yang_module_info *const bgpd_yang_modules[] = { ++ &frr_interface_info, ++ &frr_route_map_info, + }; + + FRR_DAEMON_INFO(bgpd, BGP, .vty_port = BGP_VTY_PORT, +diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c +index 0746b04edb..922c0fe3e7 100644 +--- a/eigrpd/eigrp_main.c ++++ b/eigrpd/eigrp_main.c +@@ -140,6 +140,7 @@ struct quagga_signal_t eigrp_signals[] = { + static const struct frr_yang_module_info *const eigrpd_yang_modules[] = { + &frr_eigrpd_info, + &frr_interface_info, ++ &frr_route_map_info, + }; + + FRR_DAEMON_INFO(eigrpd, EIGRP, .vty_port = EIGRP_VTY_PORT, +diff --git a/isisd/isis_main.c b/isisd/isis_main.c +index 364441f79d..f7fe089b99 100644 +--- a/isisd/isis_main.c ++++ b/isisd/isis_main.c +@@ -39,6 +39,7 @@ + #include "vrf.h" + #include "qobj.h" + #include "libfrr.h" ++#include "routemap.h" + + #include "isisd/isis_constants.h" + #include "isisd/isis_common.h" +@@ -166,6 +167,7 @@ static const struct frr_yang_module_info *const isisd_yang_modules[] = { + #ifndef FABRICD + &frr_isisd_info, + #endif /* ifndef FABRICD */ ++ &frr_route_map_info, + }; + + #ifdef FABRICD +diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c +index 0aaefeb3c2..e4bed7a79d 100644 +--- a/ospf6d/ospf6_main.c ++++ b/ospf6d/ospf6_main.c +@@ -167,6 +167,7 @@ struct quagga_signal_t ospf6_signals[] = { + + static const struct frr_yang_module_info *const ospf6d_yang_modules[] = { + &frr_interface_info, ++ &frr_route_map_info, + }; + + FRR_DAEMON_INFO(ospf6d, OSPF6, .vty_port = OSPF6_VTY_PORT, +diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c +index d02ffe0448..7caa79d207 100644 +--- a/ospfd/ospf_main.c ++++ b/ospfd/ospf_main.c +@@ -40,6 +40,7 @@ + #include "zclient.h" + #include "vrf.h" + #include "libfrr.h" ++#include "routemap.h" + + #include "ospfd/ospfd.h" + #include "ospfd/ospf_interface.h" +@@ -126,6 +127,7 @@ struct quagga_signal_t ospf_signals[] = { + + static const struct frr_yang_module_info *const ospfd_yang_modules[] = { + &frr_interface_info, ++ &frr_route_map_info, + }; + + FRR_DAEMON_INFO(ospfd, OSPF, .vty_port = OSPF_VTY_PORT, +diff --git a/ripd/rip_main.c b/ripd/rip_main.c +index 060bb76585..ca41afaea6 100644 +--- a/ripd/rip_main.c ++++ b/ripd/rip_main.c +@@ -35,6 +35,7 @@ + #include "vrf.h" + #include "if_rmap.h" + #include "libfrr.h" ++#include "routemap.h" + + #include "ripd/ripd.h" + #include "ripd/rip_nb.h" +@@ -115,6 +116,7 @@ static struct quagga_signal_t ripd_signals[] = { + static const struct frr_yang_module_info *const ripd_yang_modules[] = { + &frr_interface_info, + &frr_ripd_info, ++ &frr_route_map_info, + }; + + FRR_DAEMON_INFO(ripd, RIP, .vty_port = RIP_VTY_PORT, +diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c +index 9daeeb9580..99adb2cba7 100644 +--- a/ripngd/ripng_main.c ++++ b/ripngd/ripng_main.c +@@ -36,6 +36,7 @@ + #include "vrf.h" + #include "if_rmap.h" + #include "libfrr.h" ++#include "routemap.h" + + #include "ripngd/ripngd.h" + #include "ripngd/ripng_nb.h" +@@ -115,6 +116,7 @@ struct quagga_signal_t ripng_signals[] = { + static const struct frr_yang_module_info *const ripngd_yang_modules[] = { + &frr_interface_info, + &frr_ripngd_info, ++ &frr_route_map_info, + }; + + FRR_DAEMON_INFO(ripngd, RIPNG, .vty_port = RIPNG_VTY_PORT, +diff --git a/zebra/main.c b/zebra/main.c +index f23702d878..5951c7e280 100644 +--- a/zebra/main.c ++++ b/zebra/main.c +@@ -237,6 +237,7 @@ struct quagga_signal_t zebra_signals[] = { + + static const struct frr_yang_module_info *const zebra_yang_modules[] = { + &frr_interface_info, ++ &frr_route_map_info, + }; + + FRR_DAEMON_INFO( + +From 54a35ff48b600cd59b715b6e5aea4e69de1b995f Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Mon, 14 Oct 2019 23:29:19 -0300 +Subject: [PATCH 09/10] lib: fix route map northbound memory leak + +Keep a list of hook contexts used by northbound so we don't lose the +pointer when free()ing the route map index entry data. + +Signed-off-by: Rafael Zalamena +--- + lib/routemap.c | 5 +++++ + lib/routemap.h | 11 +++++++++++ + lib/routemap_northbound.c | 39 ++++++++++++++++++++++++++++++--------- + 3 files changed, 46 insertions(+), 9 deletions(-) + +diff --git a/lib/routemap.c b/lib/routemap.c +index 5369fa771f..912cf28202 100644 +--- a/lib/routemap.c ++++ b/lib/routemap.c +@@ -909,6 +909,7 @@ static struct route_map_index *route_map_index_new(void) + + new = XCALLOC(MTYPE_ROUTE_MAP_INDEX, sizeof(struct route_map_index)); + new->exitpolicy = RMAP_EXIT; /* Default to Cisco-style */ ++ TAILQ_INIT(&new->rhclist); + QOBJ_REG(new, route_map_index); + return new; + } +@@ -924,6 +925,10 @@ void route_map_index_delete(struct route_map_index *index, int notify) + zlog_debug("Deleting route-map %s sequence %d", + index->map->name, index->pref); + ++ /* Free route map northbound hook contexts. */ ++ while (!TAILQ_EMPTY(&index->rhclist)) ++ routemap_hook_context_free(TAILQ_FIRST(&index->rhclist)); ++ + /* Free route match. */ + while ((rule = index->match_list.head) != NULL) + route_map_rule_delete(&index->match_list, rule); +diff --git a/lib/routemap.h b/lib/routemap.h +index 70e150c981..05c958967c 100644 +--- a/lib/routemap.h ++++ b/lib/routemap.h +@@ -162,6 +162,9 @@ struct route_map_rule_list { + struct route_map_rule *tail; + }; + ++/* Forward struct declaration: the complete can be found later this file. */ ++struct routemap_hook_context; ++ + /* Route map index structure. */ + struct route_map_index { + struct route_map *map; +@@ -194,6 +197,9 @@ struct route_map_index { + uint64_t applied; + uint64_t applied_clear; + ++ /* List of match/sets contexts. */ ++ TAILQ_HEAD(, routemap_hook_context) rhclist; ++ + QOBJ_FIELDS + }; + DECLARE_QOBJ_TYPE(route_map_index) +@@ -660,6 +666,7 @@ struct routemap_hook_context { + route_map_event_t rhc_event; + routemap_set_hook_fun rhc_shook; + routemap_match_hook_fun rhc_mhook; ++ TAILQ_ENTRY(routemap_hook_context) rhc_entry; + }; + + int lib_route_map_entry_match_destroy(enum nb_event event, +@@ -667,6 +674,10 @@ int lib_route_map_entry_match_destroy(enum nb_event event, + int lib_route_map_entry_set_destroy(enum nb_event event, + const struct lyd_node *dnode); + ++struct routemap_hook_context * ++routemap_hook_context_insert(struct route_map_index *rmi); ++void routemap_hook_context_free(struct routemap_hook_context *rhc); ++ + extern const struct frr_yang_module_info frr_route_map_info; + + /* routemap_cli.c */ +diff --git a/lib/routemap_northbound.c b/lib/routemap_northbound.c +index b9ac01e865..3173a708e4 100644 +--- a/lib/routemap_northbound.c ++++ b/lib/routemap_northbound.c +@@ -74,6 +74,30 @@ int lib_route_map_entry_set_destroy(enum nb_event event, + return NB_OK; + } + ++/* ++ * Auxiliary hook context list manipulation functions. ++ */ ++struct routemap_hook_context * ++routemap_hook_context_insert(struct route_map_index *rmi) ++{ ++ struct routemap_hook_context *rhc; ++ ++ rhc = XCALLOC(MTYPE_TMP, sizeof(*rhc)); ++ rhc->rhc_rmi = rmi; ++ TAILQ_INSERT_TAIL(&rmi->rhclist, rhc, rhc_entry); ++ ++ return rhc; ++} ++ ++void ++routemap_hook_context_free(struct routemap_hook_context *rhc) ++{ ++ struct route_map_index *rmi = rhc->rhc_rmi; ++ ++ TAILQ_REMOVE(&rmi->rhclist, rhc, rhc_entry); ++ XFREE(MTYPE_TMP, rhc); ++} ++ + /* + * XPath: /frr-route-map:lib/route-map + */ +@@ -436,20 +460,17 @@ lib_route_map_entry_match_condition_create(enum nb_event event, + union nb_resource *resource) + { + struct routemap_hook_context *rhc; ++ struct route_map_index *rmi; + + switch (event) { + case NB_EV_VALIDATE: +- /* NOTHING */ +- break; + case NB_EV_PREPARE: +- resource->ptr = XCALLOC(MTYPE_TMP, sizeof(*rhc)); +- break; + case NB_EV_ABORT: +- XFREE(MTYPE_TMP, resource->ptr); ++ /* NOTHING */ + break; + case NB_EV_APPLY: +- rhc = resource->ptr; +- rhc->rhc_rmi = nb_running_get_entry(dnode, NULL, true); ++ rmi = nb_running_get_entry(dnode, NULL, true); ++ rhc = routemap_hook_context_insert(rmi); + nb_running_set_entry(dnode, rhc); + break; + } +@@ -469,7 +490,7 @@ lib_route_map_entry_match_condition_destroy(enum nb_event event, + + rv = lib_route_map_entry_match_destroy(event, dnode); + rhc = nb_running_unset_entry(dnode); +- XFREE(MTYPE_TMP, rhc); ++ routemap_hook_context_free(rhc); + + return rv; + } +@@ -893,7 +914,7 @@ static int lib_route_map_entry_set_action_destroy(enum nb_event event, + + rv = lib_route_map_entry_set_destroy(event, dnode); + rhc = nb_running_unset_entry(dnode); +- XFREE(MTYPE_TMP, rhc); ++ routemap_hook_context_free(rhc); + + return rv; + } + +From 79661106763d4f6d9c200a4f4d25439f1cfecf3a Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Wed, 5 Feb 2020 11:09:31 -0300 +Subject: [PATCH 10/10] lib: fix route-map YANG module on old gcc versions + +Copy the fix made in 'lib/if.c' to 'lib/routemap_northbound.c' so we can +have a working YANG model when compiled with GCC version less than 5. + +Signed-off-by: Rafael Zalamena +--- + lib/routemap_northbound.c | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/lib/routemap_northbound.c b/lib/routemap_northbound.c +index 3173a708e4..78f2a5a018 100644 +--- a/lib/routemap_northbound.c ++++ b/lib/routemap_northbound.c +@@ -1224,7 +1224,32 @@ lib_route_map_entry_set_action_tag_destroy(enum nb_event event, + } + + /* clang-format off */ ++#if defined(__GNUC__) && ((__GNUC__ - 0) < 5) && !defined(__clang__) ++/* ++ * gcc versions before 5.x miscalculate the size for structs with variable ++ * length arrays (they just count it as size 0) ++ */ ++struct frr_yang_module_info_sizen { ++ /* YANG module name. */ ++ const char *name; ++ ++ /* Northbound callbacks. */ ++ const struct { ++ /* Data path of this YANG node. */ ++ const char *xpath; ++ ++ /* Callbacks implemented for this node. */ ++ struct nb_callbacks cbs; ++ ++ /* Priority - lower priorities are processed first. */ ++ uint32_t priority; ++ } nodes[28]; ++}; ++ ++const struct frr_yang_module_info_sizen frr_route_map_info_sizen asm("frr_route_map_info") = { ++#else + const struct frr_yang_module_info frr_route_map_info = { ++#endif + .name = "frr-route-map", + .nodes = { + { diff --git a/net/frr/patches/012-add_yang_filter.patch b/net/frr/patches/012-add_yang_filter.patch new file mode 100644 index 00000000..e3c4ebaf --- /dev/null +++ b/net/frr/patches/012-add_yang_filter.patch @@ -0,0 +1,83 @@ +From bec0aa85b1f404ac9800c7524070fcf8582e82bc Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +Date: Thu, 1 Aug 2019 19:56:46 -0300 +Subject: [PATCH] yang: simplify filter choice by removing cases + +Based on @rwestphal feedback, lets remove `case`s where we don't expect +to add more items or items with more than one `leaf`. + +Signed-off-by: Rafael Zalamena +--- + yang/frr-filter.yang | 48 +++++++++++++++++--------------------------- + 1 file changed, 18 insertions(+), 30 deletions(-) + +diff --git a/yang/frr-filter.yang b/yang/frr-filter.yang +index 92af6aebfd..e79ede87b7 100644 +--- a/yang/frr-filter.yang ++++ b/yang/frr-filter.yang +@@ -107,23 +107,17 @@ module frr-filter { + Extended access list: source value to match."; + mandatory true; + +- case host { +- leaf host { +- description "Host to match"; +- type inet:ipv4-address; +- } ++ leaf host { ++ description "Host to match"; ++ type inet:ipv4-address; + } +- case network { +- leaf network { +- description "Network to match"; +- type inet:ipv4-prefix; +- } ++ leaf network { ++ description "Network to match"; ++ type inet:ipv4-prefix; + } +- case any { +- leaf any { +- description "Match any"; +- type empty; +- } ++ leaf any { ++ description "Match any"; ++ type empty; + } + } + +@@ -132,23 +126,17 @@ module frr-filter { + ./sequence >= 2000 and ./sequence <= 2699"; + description "Destination value to match"; + +- case destination-host { +- leaf destination-host { +- description "Host to match"; +- type inet:ipv4-address; +- } ++ leaf destination-host { ++ description "Host to match"; ++ type inet:ipv4-address; + } +- case destination-network { +- leaf destination-network { +- description "Network to match"; +- type inet:ipv4-prefix; +- } ++ leaf destination-network { ++ description "Network to match"; ++ type inet:ipv4-prefix; + } +- case destination-any { +- leaf destination-any { +- description "Match any"; +- type empty; +- } ++ leaf destination-any { ++ description "Match any"; ++ type empty; + } + } + } diff --git a/net/frr/patches/013-backport_northbound.patch b/net/frr/patches/013-backport_northbound.patch new file mode 100644 index 00000000..dacb4562 --- /dev/null +++ b/net/frr/patches/013-backport_northbound.patch @@ -0,0 +1,147 @@ +From dc397e4c0adc13982fc5d83a1afc42178708f4a5 Mon Sep 17 00:00:00 2001 +From: Renato Westphal +Date: Fri, 3 Apr 2020 20:10:04 -0300 +Subject: [PATCH] lib: consolidate flexible array hack in a single place + +Old gcc versions (< 5.x) have a bug that prevents C99 flexible +arrays from working properly on shared libraries. + +We already have a hack in place to work around this problem, but it +needs to be replicated in every declaration of a frr_yang_module_info +variable within libfrr. This clearly isn't a good solution if we +consider that many more libfrr YANG modules are about to come in +the future. + +This commit introduces a different workaround that operates within +the northbound layer itself, such that implementers of libfrr YANG +modules won't need to worry about this problem anymore. + +Signed-off-by: Renato Westphal +--- + lib/if.c | 24 ------------------------ + lib/northbound.c | 7 +++++++ + lib/northbound.h | 11 +++++++++++ + lib/routemap_northbound.c | 25 ------------------------- + 4 files changed, 18 insertions(+), 49 deletions(-) + +diff --git a/lib/if.c b/lib/if.c +index dabf66799d..24b103b3ff 100644 +--- a/lib/if.c ++++ b/lib/if.c +@@ -1657,31 +1657,7 @@ static int lib_interface_description_destroy(enum nb_event event, + + /* clang-format off */ + +-#if defined(__GNUC__) && ((__GNUC__ - 0) < 5) && !defined(__clang__) +-/* gcc versions before 5.x miscalculate the size for structs with variable +- * length arrays (they just count it as size 0) +- */ +-struct frr_yang_module_info_size3 { +- /* YANG module name. */ +- const char *name; +- +- /* Northbound callbacks. */ +- const struct { +- /* Data path of this YANG node. */ +- const char *xpath; +- +- /* Callbacks implemented for this node. */ +- struct nb_callbacks cbs; +- +- /* Priority - lower priorities are processed first. */ +- uint32_t priority; +- } nodes[3]; +-}; +- +-const struct frr_yang_module_info_size3 frr_interface_info_size3 asm("frr_interface_info") = { +-#else + const struct frr_yang_module_info frr_interface_info = { +-#endif + .name = "frr-interface", + .nodes = { + { +diff --git a/lib/northbound.c b/lib/northbound.c +index cebedcff09..85e723d7cf 100644 +--- a/lib/northbound.c ++++ b/lib/northbound.c +@@ -1866,6 +1866,13 @@ static void nb_load_callbacks(const struct frr_yang_module_info *module) + struct nb_node *nb_node; + uint32_t priority; + ++ if (i > YANG_MODULE_MAX_NODES) { ++ zlog_err( ++ "%s: %s.yang has more than %u nodes. Please increase YANG_MODULE_MAX_NODES to fix this problem.", ++ __func__, module->name, YANG_MODULE_MAX_NODES); ++ exit(1); ++ } ++ + nb_node = nb_node_find(module->nodes[i].xpath); + if (!nb_node) { + flog_warn(EC_LIB_YANG_UNKNOWN_DATA_PATH, +diff --git a/lib/northbound.h b/lib/northbound.h +index 76a11e518c..19a2ba0865 100644 +--- a/lib/northbound.h ++++ b/lib/northbound.h +@@ -403,6 +403,13 @@ struct nb_node { + /* The YANG list doesn't contain key leafs. */ + #define F_NB_NODE_KEYLESS_LIST 0x02 + ++/* ++ * HACK: old gcc versions (< 5.x) have a bug that prevents C99 flexible arrays ++ * from working properly on shared libraries. For those compilers, use a fixed ++ * size array to work around the problem. ++ */ ++#define YANG_MODULE_MAX_NODES 1024 ++ + struct frr_yang_module_info { + /* YANG module name. */ + const char *name; +@@ -417,7 +424,11 @@ struct frr_yang_module_info { + + /* Priority - lower priorities are processed first. */ + uint32_t priority; ++#if defined(__GNUC__) && ((__GNUC__ - 0) < 5) && !defined(__clang__) ++ } nodes[YANG_MODULE_MAX_NODES + 1]; ++#else + } nodes[]; ++#endif + }; + + /* Northbound error codes. */ +diff --git a/lib/routemap_northbound.c b/lib/routemap_northbound.c +index 69cebbd2a1..dd4cbd7d99 100644 +--- a/lib/routemap_northbound.c ++++ b/lib/routemap_northbound.c +@@ -1221,32 +1221,7 @@ lib_route_map_entry_set_action_tag_destroy(enum nb_event event, + } + + /* clang-format off */ +-#if defined(__GNUC__) && ((__GNUC__ - 0) < 5) && !defined(__clang__) +-/* +- * gcc versions before 5.x miscalculate the size for structs with variable +- * length arrays (they just count it as size 0) +- */ +-struct frr_yang_module_info_sizen { +- /* YANG module name. */ +- const char *name; +- +- /* Northbound callbacks. */ +- const struct { +- /* Data path of this YANG node. */ +- const char *xpath; +- +- /* Callbacks implemented for this node. */ +- struct nb_callbacks cbs; +- +- /* Priority - lower priorities are processed first. */ +- uint32_t priority; +- } nodes[28]; +-}; +- +-const struct frr_yang_module_info_sizen frr_route_map_info_sizen asm("frr_route_map_info") = { +-#else + const struct frr_yang_module_info frr_route_map_info = { +-#endif + .name = "frr-route-map", + .nodes = { + { diff --git a/net/frr/patches/014-backport_northbound.patch b/net/frr/patches/014-backport_northbound.patch new file mode 100644 index 00000000..879c380e --- /dev/null +++ b/net/frr/patches/014-backport_northbound.patch @@ -0,0 +1,330 @@ +From 97cd849362b45ecbcb20194b5771c5ce777de6bc Mon Sep 17 00:00:00 2001 +From: Renato Westphal +Date: Tue, 21 Apr 2020 21:27:47 -0300 +Subject: [PATCH] lib: create a wrapper function for all northbound callbacks + +The intention here is to keep the code more organized. These wrappers +should be used by the northbound clients only, and never directly +by any YANG backend code. + +Signed-off-by: Renato Westphal +--- + lib/northbound.c | 222 +++++++++++++++++++++++----------------- + lib/northbound_grpc.cpp | 3 +- + 2 files changed, 131 insertions(+), 94 deletions(-) + +diff --git a/lib/northbound.c b/lib/northbound.c +index 85e723d7cf..d10e4713f5 100644 +--- a/lib/northbound.c ++++ b/lib/northbound.c +@@ -62,11 +62,10 @@ static struct { + */ + static bool transaction_in_progress; + ++static int nb_callback_pre_validate(const struct nb_node *nb_node, ++ const struct lyd_node *dnode); + static int nb_callback_configuration(const enum nb_event event, + struct nb_config_change *change); +-static void nb_log_callback(const enum nb_event event, +- enum nb_operation operation, const char *xpath, +- const char *value); + static struct nb_transaction *nb_transaction_new(struct nb_config *config, + struct nb_config_cbs *changes, + enum nb_client client, +@@ -609,18 +608,7 @@ static int nb_candidate_validate_code(struct nb_config *candidate, + if (!nb_node->cbs.pre_validate) + goto next; + +- if (DEBUG_MODE_CHECK(&nb_dbg_cbs_config, +- DEBUG_MODE_ALL)) { +- char xpath[XPATH_MAXLEN]; +- +- yang_dnode_get_path(child, xpath, +- sizeof(xpath)); +- nb_log_callback(NB_EV_VALIDATE, +- NB_OP_PRE_VALIDATE, xpath, +- NULL); +- } +- +- ret = (*nb_node->cbs.pre_validate)(child); ++ ret = nb_callback_pre_validate(nb_node, child); + if (ret != NB_OK) + return NB_ERR_VALIDATION; + +@@ -791,14 +779,128 @@ int nb_running_lock_check(enum nb_client client, const void *user) + return ret; + } + +-static void nb_log_callback(const enum nb_event event, +- enum nb_operation operation, const char *xpath, +- const char *value) ++static void nb_log_config_callback(const enum nb_event event, ++ enum nb_operation operation, ++ const struct lyd_node *dnode) + { ++ const char *value; ++ char xpath[XPATH_MAXLEN]; ++ ++ if (!DEBUG_MODE_CHECK(&nb_dbg_cbs_config, DEBUG_MODE_ALL)) ++ return; ++ ++ yang_dnode_get_path(dnode, xpath, sizeof(xpath)); ++ if (yang_snode_is_typeless_data(dnode->schema)) ++ value = "(none)"; ++ else ++ value = yang_dnode_get_string(dnode, NULL); ++ + zlog_debug( + "northbound callback: event [%s] op [%s] xpath [%s] value [%s]", + nb_event_name(event), nb_operation_name(operation), xpath, +- value ? value : "(NULL)"); ++ value); ++} ++ ++static int nb_callback_create(const struct nb_node *nb_node, ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ nb_log_config_callback(event, NB_OP_CREATE, dnode); ++ ++ return nb_node->cbs.create(event, dnode, resource); ++} ++ ++static int nb_callback_modify(const struct nb_node *nb_node, ++ enum nb_event event, const struct lyd_node *dnode, ++ union nb_resource *resource) ++{ ++ nb_log_config_callback(event, NB_OP_MODIFY, dnode); ++ ++ return nb_node->cbs.modify(event, dnode, resource); ++} ++ ++static int nb_callback_destroy(const struct nb_node *nb_node, ++ enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ nb_log_config_callback(event, NB_OP_DESTROY, dnode); ++ ++ return nb_node->cbs.destroy(event, dnode); ++} ++ ++static int nb_callback_move(const struct nb_node *nb_node, enum nb_event event, ++ const struct lyd_node *dnode) ++{ ++ nb_log_config_callback(event, NB_OP_MOVE, dnode); ++ ++ return nb_node->cbs.move(event, dnode); ++} ++ ++static int nb_callback_pre_validate(const struct nb_node *nb_node, ++ const struct lyd_node *dnode) ++{ ++ nb_log_config_callback(NB_EV_VALIDATE, NB_OP_PRE_VALIDATE, dnode); ++ ++ return nb_node->cbs.pre_validate(dnode); ++} ++ ++static void nb_callback_apply_finish(const struct nb_node *nb_node, ++ const struct lyd_node *dnode) ++{ ++ nb_log_config_callback(NB_EV_APPLY, NB_OP_APPLY_FINISH, dnode); ++ ++ nb_node->cbs.apply_finish(dnode); ++} ++ ++struct yang_data *nb_callback_get_elem(const struct nb_node *nb_node, ++ const char *xpath, ++ const void *list_entry) ++{ ++ DEBUGD(&nb_dbg_cbs_state, ++ "northbound callback (get_elem): xpath [%s] list_entry [%p]", ++ xpath, list_entry); ++ ++ return nb_node->cbs.get_elem(xpath, list_entry); ++} ++ ++const void *nb_callback_get_next(const struct nb_node *nb_node, ++ const void *parent_list_entry, ++ const void *list_entry) ++{ ++ DEBUGD(&nb_dbg_cbs_state, ++ "northbound callback (get_next): node [%s] parent_list_entry [%p] list_entry [%p]", ++ nb_node->xpath, parent_list_entry, list_entry); ++ ++ return nb_node->cbs.get_next(parent_list_entry, list_entry); ++} ++ ++int nb_callback_get_keys(const struct nb_node *nb_node, const void *list_entry, ++ struct yang_list_keys *keys) ++{ ++ DEBUGD(&nb_dbg_cbs_state, ++ "northbound callback (get_keys): node [%s] list_entry [%p]", ++ nb_node->xpath, list_entry); ++ ++ return nb_node->cbs.get_keys(list_entry, keys); ++} ++ ++const void *nb_callback_lookup_entry(const struct nb_node *nb_node, ++ const void *parent_list_entry, ++ const struct yang_list_keys *keys) ++{ ++ DEBUGD(&nb_dbg_cbs_state, ++ "northbound callback (lookup_entry): node [%s] parent_list_entry [%p]", ++ nb_node->xpath, parent_list_entry); ++ ++ return nb_node->cbs.lookup_entry(parent_list_entry, keys); ++} ++ ++int nb_callback_rpc(const struct nb_node *nb_node, const char *xpath, ++ const struct list *input, struct list *output) ++{ ++ DEBUGD(&nb_dbg_cbs_rpc, "northbound RPC: %s", xpath); ++ ++ return nb_node->cbs.rpc(xpath, input, output); + } + + /* +@@ -815,15 +917,6 @@ static int nb_callback_configuration(const enum nb_event event, + union nb_resource *resource; + int ret = NB_ERR; + +- if (DEBUG_MODE_CHECK(&nb_dbg_cbs_config, DEBUG_MODE_ALL)) { +- const char *value = "(none)"; +- +- if (dnode && !yang_snode_is_typeless_data(dnode->schema)) +- value = yang_dnode_get_string(dnode, NULL); +- +- yang_dnode_get_path(dnode, xpath, sizeof(xpath)); +- nb_log_callback(event, operation, xpath, value); +- } + + if (event == NB_EV_VALIDATE) + resource = NULL; +@@ -832,16 +925,16 @@ static int nb_callback_configuration(const enum nb_event event, + + switch (operation) { + case NB_OP_CREATE: +- ret = (*nb_node->cbs.create)(event, dnode, resource); ++ ret = nb_callback_create(nb_node, event, dnode, resource); + break; + case NB_OP_MODIFY: +- ret = (*nb_node->cbs.modify)(event, dnode, resource); ++ ret = nb_callback_modify(nb_node, event, dnode, resource); + break; + case NB_OP_DESTROY: +- ret = (*nb_node->cbs.destroy)(event, dnode); ++ ret = nb_callback_destroy(nb_node, event, dnode); + break; + case NB_OP_MOVE: +- ret = (*nb_node->cbs.move)(event, dnode); ++ ret = nb_callback_move(nb_node, event, dnode); + break; + default: + yang_dnode_get_path(dnode, xpath, sizeof(xpath)); +@@ -890,57 +983,6 @@ static int nb_callback_configuration(const enum nb_event event, + return ret; + } + +-struct yang_data *nb_callback_get_elem(const struct nb_node *nb_node, +- const char *xpath, +- const void *list_entry) +-{ +- DEBUGD(&nb_dbg_cbs_state, +- "northbound callback (get_elem): xpath [%s] list_entry [%p]", +- xpath, list_entry); +- +- return nb_node->cbs.get_elem(xpath, list_entry); +-} +- +-const void *nb_callback_get_next(const struct nb_node *nb_node, +- const void *parent_list_entry, +- const void *list_entry) +-{ +- DEBUGD(&nb_dbg_cbs_state, +- "northbound callback (get_next): node [%s] parent_list_entry [%p] list_entry [%p]", +- nb_node->xpath, parent_list_entry, list_entry); +- +- return nb_node->cbs.get_next(parent_list_entry, list_entry); +-} +- +-int nb_callback_get_keys(const struct nb_node *nb_node, const void *list_entry, +- struct yang_list_keys *keys) +-{ +- DEBUGD(&nb_dbg_cbs_state, +- "northbound callback (get_keys): node [%s] list_entry [%p]", +- nb_node->xpath, list_entry); +- +- return nb_node->cbs.get_keys(list_entry, keys); +-} +- +-const void *nb_callback_lookup_entry(const struct nb_node *nb_node, +- const void *parent_list_entry, +- const struct yang_list_keys *keys) +-{ +- DEBUGD(&nb_dbg_cbs_state, +- "northbound callback (lookup_entry): node [%s] parent_list_entry [%p]", +- nb_node->xpath, parent_list_entry); +- +- return nb_node->cbs.lookup_entry(parent_list_entry, keys); +-} +- +-int nb_callback_rpc(const struct nb_node *nb_node, const char *xpath, +- const struct list *input, struct list *output) +-{ +- DEBUGD(&nb_dbg_cbs_rpc, "northbound RPC: %s", xpath); +- +- return nb_node->cbs.rpc(xpath, input, output); +-} +- + static struct nb_transaction * + nb_transaction_new(struct nb_config *config, struct nb_config_cbs *changes, + enum nb_client client, const void *user, const char *comment) +@@ -1058,7 +1100,6 @@ static void nb_transaction_apply_finish(struct nb_transaction *transaction) + { + struct nb_config_cbs cbs; + struct nb_config_cb *cb; +- char xpath[XPATH_MAXLEN]; + + /* Initialize tree of 'apply_finish' callbacks. */ + RB_INIT(nb_config_cbs, &cbs); +@@ -1075,6 +1116,8 @@ static void nb_transaction_apply_finish(struct nb_transaction *transaction) + * be called though). + */ + if (change->cb.operation == NB_OP_DESTROY) { ++ char xpath[XPATH_MAXLEN]; ++ + dnode = dnode->parent; + if (!dnode) + break; +@@ -1111,15 +1154,8 @@ static void nb_transaction_apply_finish(struct nb_transaction *transaction) + } + + /* Call the 'apply_finish' callbacks, sorted by their priorities. */ +- RB_FOREACH (cb, nb_config_cbs, &cbs) { +- if (DEBUG_MODE_CHECK(&nb_dbg_cbs_config, DEBUG_MODE_ALL)) { +- yang_dnode_get_path(cb->dnode, xpath, sizeof(xpath)); +- nb_log_callback(NB_EV_APPLY, NB_OP_APPLY_FINISH, xpath, +- NULL); +- } +- +- (*cb->nb_node->cbs.apply_finish)(cb->dnode); +- } ++ RB_FOREACH (cb, nb_config_cbs, &cbs) ++ nb_callback_apply_finish(cb->nb_node, cb->dnode); + + /* Release memory. */ + while (!RB_EMPTY(nb_config_cbs, &cbs)) { +diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp +index b195f1aeca..66bf05c1ab 100644 +--- a/lib/northbound_grpc.cpp ++++ b/lib/northbound_grpc.cpp +@@ -545,7 +545,8 @@ class NorthboundImpl final : public frr::Northbound::Service + } + + // Execute callback registered for this XPath. +- if (nb_node->cbs.rpc(xpath, input_list, output_list) != NB_OK) { ++ if (nb_callback_rpc(nb_node, xpath, input_list, output_list) ++ != NB_OK) { + flog_warn(EC_LIB_NB_CB_RPC, + "%s: rpc callback failed: %s", __func__, + xpath); diff --git a/net/frr/patches/098-fix_mips_libyang.patch b/net/frr/patches/098-fix_mips_libyang.patch new file mode 100644 index 00000000..3785cfef --- /dev/null +++ b/net/frr/patches/098-fix_mips_libyang.patch @@ -0,0 +1,14 @@ +--- a/lib/northbound.h ++++ b/lib/northbound.h +@@ -504,11 +504,7 @@ struct frr_yang_module_info { + + /* Priority - lower priorities are processed first. */ + uint32_t priority; +-#if defined(__GNUC__) && ((__GNUC__ - 0) < 5) && !defined(__clang__) + } nodes[YANG_MODULE_MAX_NODES + 1]; +-#else +- } nodes[]; +-#endif + }; + + /* Northbound error codes. */ diff --git a/net/frr/patches/099-redefine_ethhdr.patch b/net/frr/patches/099-redefine_ethhdr.patch new file mode 100644 index 00000000..361ab875 --- /dev/null +++ b/net/frr/patches/099-redefine_ethhdr.patch @@ -0,0 +1,17 @@ +--- a/lib/prefix.h 2017-12-03 22:02:41.642317377 +0200 ++++ b/lib/prefix.h 2017-12-03 22:03:30.011320262 +0200 +@@ -24,12 +24,12 @@ + + #ifdef SUNOS_5 + #include +-#else ++/*#else + #ifdef GNU_LINUX + #include + #else + #include +-#endif ++#endif*/ + #endif + #include "sockunion.h" + #include "ipaddr.h" diff --git a/net/fwknop/Makefile b/net/fwknop/Makefile index 65a1c941..577b586e 100644 --- a/net/fwknop/Makefile +++ b/net/fwknop/Makefile @@ -8,21 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fwknop -PKG_VERSION:=2.6.9 -PKG_RELEASE:=4 +PKG_VERSION:=2.6.10 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download -PKG_HASH:=5bf47fe1fd30e862d29464f762c0b8bf89b5e298665c37624d6707826da956d4 +PKG_SOURCE_URL:=https://www.cipherdyne.org/fwknop/download +PKG_HASH:=f6c09bec97ed8e474a98ae14f9f53e1bcdda33393f20667b6af3fb6bb894ca77 PKG_MAINTAINER:=Jonathan Bennett -PKG_LICENSE:=GPLv2 +PKG_LICENSE:=GPL-2.0-or-later +PKG_CPE_ID:=cpe:/a:cipherdyne:fwknop PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/fwknop/Default TITLE:=FireWall KNock OPerator - URL:=http://www.cipherdyne.org/fwknop/ + URL:=https://www.cipherdyne.org/fwknop/ endef define Package/fwknop/Default/description diff --git a/net/fwknop/files/fwknopd b/net/fwknop/files/fwknopd index 8a2b7599..e6db76b3 100644 --- a/net/fwknop/files/fwknopd +++ b/net/fwknop/files/fwknopd @@ -2,7 +2,9 @@ config global # option uci_enabled '1' config network -# option network 'wan' # takes precedence over config.PCAP_INTF + # Logical network dependency, fully tracked, fwknopd gets restarted when + # necessary. Specifying network takes precedence over config.PCAP_INTF +# option network 'wan' config access option SOURCE 'ANY' @@ -10,3 +12,6 @@ config access option KEY 'CHANGEME' config config + # Alternative direct physical interface definition, but untracked - you + # are on your own to correctly start/stop the service when needed +# option PCAP_INTF 'eth0' diff --git a/net/fwknop/files/fwknopd.init b/net/fwknop/files/fwknopd.init index f5969115..761016dd 100644 --- a/net/fwknop/files/fwknopd.init +++ b/net/fwknop/files/fwknopd.init @@ -8,30 +8,39 @@ USE_PROCD=1 START=95 +. /lib/functions/network.sh + FWKNOPD_BIN=/usr/sbin/fwknopd start_service() { generate_configuration - procd_open_instance - procd_set_param command "$FWKNOPD_BIN" --foreground --syslog-enable - procd_set_param respawn - - if [ $UCI_ENABLED -eq 1 ]; then - procd_append_param command -c /var/etc/fwknopd.conf - procd_append_param command -a /var/etc/access.conf + if [ -n "$DEPEND_IFNAME" ] ; then + # We know the interface, so we can start + procd_open_instance + procd_set_param command "$FWKNOPD_BIN" --foreground --syslog-enable + procd_set_param respawn + if [ $UCI_ENABLED -eq 1 ]; then + procd_append_param command -c /var/etc/fwknopd.conf + procd_append_param command -a /var/etc/access.conf + fi + procd_append_param command -i "$DEPEND_IFNAME" + procd_set_param netdev "$DEPEND_IFNAME" + procd_close_instance + else + logger -p daemon.info -t "fwknopd[----]" "Postponing start-up of fwknopd, network $NETWORK is not up" fi - - procd_append_param command -i "$DEPEND_IFNAME" - procd_set_param netdev "$DEPEND_IFNAME" - - procd_close_instance } service_triggers() { procd_add_reload_trigger "fwknopd" + + if [ -n "$NETWORK" ] ; then + logger -p daemon.info -t "fwknopd[----]" "Listening for changes on network $NETWORK" + procd_add_reload_interface_trigger "$NETWORK" + fi } get_bool() @@ -51,11 +60,13 @@ generate_configuration() UCI_ENABLED=0 DEPEND_IFNAME= - local NETWORK= + NETWORK= local PCAP_INTF= local USER_CONFIG_PATH=/etc/fwknop/fwknopd.conf local DEFAULT_UCI_NETWORK=wan - local DEFAULT_FWKNOPD_IFNAME=eth0 + local DEFAULT_FWKNOPD_IFNAME= + + network_get_device DEFAULT_FWKNOPD_IFNAME $DEFAULT_UCI_NETWORK config_cb() { local type="$1" @@ -67,9 +78,16 @@ generate_configuration() if [ "$option" = "uci_enabled" ] && [ "$(get_bool "$value" 0)" -eq 1 ] ; then > /var/etc/fwknopd.conf > /var/etc/access.conf - chmod 600 /var/etc/fwknopd.conf - chmod 600 /var/etc/access.conf + chmod 600 /var/etc/fwknopd.conf + chmod 600 /var/etc/access.conf UCI_ENABLED=1 + + # Forced defaults + + # Do not let fwknopd to shut-down when interface goes down, + # control it from the start-up script instead: + # https://bugs.openwrt.org/index.php?do=details&task_id=1481 + echo "EXIT_AT_INTF_DOWN n" >> /var/etc/fwknopd.conf fi } elif [ "$type" = "network" ]; then @@ -87,12 +105,13 @@ generate_configuration() if [ $UCI_ENABLED -eq 1 ] && [ $option = "PCAP_INTF" ]; then PCAP_INTF="$value" echo "$option $value" >> /var/etc/fwknopd.conf #writing each option to fwknopd.conf + elif [ $UCI_ENABLED -eq 1 ] && [ $option = "EXIT_AT_INTF_DOWN" ]; then + logger -p daemon.warn -t "fwknopd[----]" "Ignoring EXIT_AT_INTF_DOWN option, forced to N (no) to work reliably with procd" elif [ $UCI_ENABLED -eq 1 ]; then echo "$option $value" >> /var/etc/fwknopd.conf #writing each option to fwknopd.conf fi } - elif [ "$type" = "access" ] - then + elif [ "$type" = "access" ]; then if [ -f /tmp/access.conf.tmp ] ; then cat /tmp/access.conf.tmp >> /var/etc/access.conf rm /tmp/access.conf.tmp @@ -108,7 +127,7 @@ generate_configuration() fi } else - option_cb() { return; } + reset_cb if [ -z "$type" ]; then # Finalize reading if [ -f /tmp/access.conf.tmp ] ; then @@ -125,8 +144,8 @@ generate_configuration() if [ $UCI_ENABLED -eq 0 ]; then if [ -f $USER_CONFIG_PATH ] ; then - # Scan user configuration for PCAP_INTF settings - DEPEND_IFNAME="$( sed -ne '/^\s*PCAP_INTF\s\+/ { s/^\s*PCAP_INTF\s\+//; s/\s\+$//; p; q; }' /etc/fwknop/fwknopd.conf )" + # Scan user configuration for PCAP_INTF settings and fallback to fwknopd's default + DEPEND_IFNAME="$( sed -ne '/^\s*PCAP_INTF\s\+/ { s/^\s*PCAP_INTF\s\+//; s/\s\+$//; p; q; }' $USER_CONFIG_PATH )" if [ -n "$DEPEND_IFNAME" ]; then logger -p daemon.debug -t "fwknopd[----]" "Found fwknopd.conf configuration, using PCAP_INTF interface $DEPEND_IFNAME" else @@ -146,14 +165,13 @@ generate_configuration() NETWORK="$DEFAULT_UCI_NETWORK" fi + # Resolve network if possible if [ -n "$NETWORK" ]; then - . /lib/functions/network.sh - network_get_physdev DEPEND_IFNAME "$NETWORK" + network_get_device DEPEND_IFNAME "$NETWORK" if [ -n "$DEPEND_IFNAME" ]; then logger -p daemon.debug -t "fwknopd[----]" "Resolved network $NETWORK as interface $DEPEND_IFNAME" else - logger -p daemon.warn -t "fwknopd[----]" "Cannot find interface for network $NETWORK, fwknopd's default $DEFAULT_FWKNOPD_IFNAME will be used" - DEPEND_IFNAME="$DEFAULT_FWKNOPD_IFNAME" + logger -p daemon.warn -t "fwknopd[----]" "Cannot find interface for network $NETWORK, probably the network is not up" fi elif [ -n "$PCAP_INTF" ]; then DEPEND_IFNAME="$PCAP_INTF" diff --git a/net/geth/Makefile b/net/geth/Makefile new file mode 100644 index 00000000..f8f18def --- /dev/null +++ b/net/geth/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2018 Sartura Ltd. +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=go-ethereum +PKG_VERSION:=1.9.14 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/ethereum/go-ethereum/tar.gz/v${PKG_VERSION}? +PKG_HASH:=2bb8dda5dcfceebb31d1e1def1bdc6bf999ac8883a7235b4b242f55e930bcb3c + +PKG_MAINTAINER:=Mislav Novakovic +PKG_LICENSE:=GPL-3.0-or-later LGPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING COPYING.LESSER + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/ethereum/go-ethereum +GO_PKG_BUILD_PKG:=github.com/ethereum/go-ethereum/cmd/geth + +include $(INCLUDE_DIR)/package.mk +include ../../lang/golang/golang-package.mk + +define Package/geth + SECTION:=net + CATEGORY:=Network + TITLE:=Ethereum Go client + URL:=https://geth.ethereum.org/ + DEPENDS:=$(GO_ARCH_DEPENDS) + PKGARCH:=all +endef + +define Package/geth/description +Ethereum is a decentralized platform that runs smart contracts, applications +that run exactly as programmed without possibility of downtime, censorship, +fraud or third party interference. +endef + +define Package/geth/install + $(call GoPackage/Package/Install/Bin,$(1)) + + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/geth.init $(1)/etc/init.d/geth +endef + +$(eval $(call GoBinPackage,geth)) +$(eval $(call BuildPackage,geth)) diff --git a/net/geth/files/geth.init b/net/geth/files/geth.init new file mode 100644 index 00000000..154c11fc --- /dev/null +++ b/net/geth/files/geth.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common + +START=90 +STOP=10 + +USE_PROCD=1 +PROG=/usr/bin/geth + +start_service() { + procd_open_instance + procd_set_param command ${PROG} + procd_append_param command --syncmode "light" --cache 1024 + procd_set_param respawn + procd_close_instance +} diff --git a/net/git/Makefile b/net/git/Makefile index 2c8bc98c..470f0013 100644 --- a/net/git/Makefile +++ b/net/git/Makefile @@ -8,16 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=git -PKG_VERSION:=2.16.3 +PKG_VERSION:=2.27.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/scm/git/ -PKG_HASH:=d65d99e9e5b081c1f14ea018973806e942a2eb7d0da2ebc01bd2525adee62d48 +PKG_HASH:=73ca9774d7fa226e1d87c1909401623f96dca6a044e583b9a762e84d7d1a73f9 +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:git-scm:git + +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk @@ -26,7 +30,7 @@ define Package/git/Default CATEGORY:=Network SUBMENU:=Version Control Systems DEPENDS:=+libopenssl +libpthread +librt +zlib - URL:=http://git-scm.com + URL:=https://git-scm.com MAINTAINER:=Peter Wagner endef @@ -43,7 +47,7 @@ endef define Package/git-http $(call Package/git/Default) - DEPENDS+= +git +libcurl +ca-certificates + DEPENDS+= +git +libcurl TITLE:=Git HTTP commands endef @@ -56,7 +60,16 @@ endef define Package/git-gitweb $(call Package/git/Default) TITLE:=Git repository web interface - DEPENDS+= +git +perlbase-essential +perlbase-file +perlbase-fcntl +perlbase-encode +perlbase-digest +perlbase-time +perl-cgi + DEPENDS+= +git \ + +perl-cgi \ + +perlbase-digest \ + +perlbase-encode \ + +perlbase-essential \ + +perlbase-fcntl \ + +perlbase-file \ + +perlbase-filetest \ + +perlbase-storable \ + +perlbase-time endef define Package/git-gitweb/description @@ -87,7 +100,8 @@ MAKE_FLAGS := \ GITWEB_JS="/gitweb/gitweb.js" \ GITWEB_CSS="/gitweb/gitweb.css" \ GITWEB_LOGO="/gitweb/gitweb-logo.png" \ - GITWEB_FAVICON="/gitweb/gitweb-favicon.png" + GITWEB_FAVICON="/gitweb/gitweb-favicon.png" \ + uname_S="Linux" \ CONFIGURE_ARGS += \ --without-iconv \ @@ -105,14 +119,11 @@ define Build/Compile endef define Package/git/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver + $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-shell + $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/lib/git-core - ln $(1)/usr/bin/git $(1)/usr/lib/git-core/git - ln $(1)/usr/bin/git-shell $(1)/usr/lib/git-core/git-shell - ln $(1)/usr/bin/git-upload-pack $(1)/usr/lib/git-core/git-upload-pack $(INSTALL_DIR) $(1)/usr/share/git-core/templates ( cd $(PKG_INSTALL_DIR); $(TAR) \ --exclude=usr/lib/git-core/git-http-backend \ @@ -121,13 +132,12 @@ define Package/git/install --exclude=usr/lib/git-core/git-remote-ftps \ --exclude=usr/lib/git-core/git-remote-http \ --exclude=usr/lib/git-core/git-remote-https \ - --exclude=usr/lib/git-core/git \ - --exclude=usr/lib/git-core/git-shell \ - --exclude=usr/lib/git-core/git-upload-pack \ -cf - \ usr/lib/git-core \ usr/share/git-core/templates \ ) | ( cd $(1); $(TAR) -xf - ) + ln $(1)/usr/lib/git-core/git $(1)/usr/bin/git + ln $(1)/usr/lib/git-core/git-shell $(1)/usr/bin/git-shell endef define Package/git-http/install diff --git a/net/git/patches/100-configure_for_crosscompiling.patch b/net/git/patches/100-configure_for_crosscompiling.patch index eb8d4f73..bb7a61d1 100644 --- a/net/git/patches/100-configure_for_crosscompiling.patch +++ b/net/git/patches/100-configure_for_crosscompiling.patch @@ -1,8 +1,8 @@ --- a/configure.ac +++ b/configure.ac -@@ -925,7 +925,8 @@ AC_RUN_IFELSE( +@@ -952,7 +952,8 @@ AC_RUN_IFELSE( FILE *f = fopen(".", "r"); - return f)]])], + return f != NULL;]])], [ac_cv_fread_reads_directories=no], - [ac_cv_fread_reads_directories=yes]) + [ac_cv_fread_reads_directories=yes], @@ -10,7 +10,7 @@ ]) if test $ac_cv_fread_reads_directories = yes; then FREAD_READS_DIRECTORIES=UnfortunatelyYes -@@ -959,7 +960,8 @@ AC_RUN_IFELSE( +@@ -986,7 +987,8 @@ AC_RUN_IFELSE( if (snprintf(buf, 3, "%s", "12345") != 5 || strcmp(buf, "12")) return 1]])], [ac_cv_snprintf_returns_bogus=no], @@ -20,7 +20,7 @@ ]) if test $ac_cv_snprintf_returns_bogus = yes; then SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes -@@ -982,7 +984,8 @@ yippeeyeswehaveit +@@ -1009,7 +1011,8 @@ yippeeyeswehaveit #endif ]), [ac_cv_sane_mode_bits=yes], diff --git a/net/git/patches/200-imapsend_without_curl.patch b/net/git/patches/200-imapsend_without_curl.patch index 3d3a92e5..e3830113 100644 --- a/net/git/patches/200-imapsend_without_curl.patch +++ b/net/git/patches/200-imapsend_without_curl.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -1234,7 +1234,7 @@ else +@@ -1378,7 +1378,7 @@ endif endif curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p) ifeq "$(curl_check)" "072200" diff --git a/net/git/patches/300-openssl-deprecated.patch b/net/git/patches/300-openssl-deprecated.patch new file mode 100644 index 00000000..20a5a2a0 --- /dev/null +++ b/net/git/patches/300-openssl-deprecated.patch @@ -0,0 +1,27 @@ +From fa37195d8378ac958d1f9bd884b47bd73730040e Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Thu, 27 Dec 2018 09:58:07 -0800 +Subject: [PATCH] imap-send: Fix compilation without deprecated OpenSSL APIs + +Initialization in OpenSSL has been deprecated in version 1.1. This makes +compilation fail when deprecated APIs for OpenSSL are compile-time +disabled. + +Signed-off-by: Rosen Penev +--- + imap-send.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/imap-send.c ++++ b/imap-send.c +@@ -284,8 +284,10 @@ static int ssl_socket_connect(struct ima + int ret; + X509 *cert; + ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) + SSL_library_init(); + SSL_load_error_strings(); ++#endif + + meth = SSLv23_method(); + if (!meth) { diff --git a/net/git/patches/310-fix-uname-detection-for-crosscompiling b/net/git/patches/310-fix-uname-detection-for-crosscompiling new file mode 100644 index 00000000..3831958c --- /dev/null +++ b/net/git/patches/310-fix-uname-detection-for-crosscompiling @@ -0,0 +1,44 @@ +From 9dcf7e679c441b877b63ff8e6dfc3865af6c6720 Mon Sep 17 00:00:00 2001 +From: Mauro Condarelli +Date: Sun, 22 May 2016 20:44:26 +0200 +Subject: [PATCH 1/1] Fix config.mak.uname to allow cross-compilation + +Current implementation imperatively sets variables from "uname" output. +This breaks cross-compilation because uname is run on host while target +configuration may be different. + +Make current behavior a non-imperative default, so it's possible to +force different values setting make variables. + +To cross-compile it will be necessary to explicitly set the various +uname_X variables to values compatible with target. +No change is needed with normal host compilation. +Patch is trivial. + +Signed-off-by: Mauro Condarelli +--- + config.mak.uname | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/config.mak.uname b/config.mak.uname +index 40d6b29..d933b23 100644 +--- a/config.mak.uname ++++ b/config.mak.uname +@@ -1,11 +1,11 @@ + # Platform specific Makefile tweaks based on uname detection + +-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') +-uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') +-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') +-uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') +-uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') +-uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') ++uname_S ?= $(shell sh -c 'uname -s 2>/dev/null || echo not') ++uname_M ?= $(shell sh -c 'uname -m 2>/dev/null || echo not') ++uname_O ?= $(shell sh -c 'uname -o 2>/dev/null || echo not') ++uname_R ?= $(shell sh -c 'uname -r 2>/dev/null || echo not') ++uname_P ?= $(shell sh -c 'uname -p 2>/dev/null || echo not') ++uname_V ?= $(shell sh -c 'uname -v 2>/dev/null || echo not') + + ifdef MSVC + # avoid the MingW and Cygwin configuration sections diff --git a/net/gitolite/Makefile b/net/gitolite/Makefile index 52f0acdc..b5466847 100644 --- a/net/gitolite/Makefile +++ b/net/gitolite/Makefile @@ -8,16 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gitolite -PKG_VERSION:=3.6.6 -PKG_RELEASE:=1 +PKG_VERSION:=3.6.11 +PKG_RELEASE:=2 -PKG_SOURCE_PROTO:=git -PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=b2d96c36682391f45c63b21a91fbe77a969a7b362417c851dd0091a06fcc74d9 -PKG_SOURCE_URL:=https://github.com/sitaramc/gitolite.git -PKG_SOURCE_VERSION:=908f8c6f3b8ef5b95829be7155be2557e71f4579 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=2166a61b14de19e605b14f4a13a070fbfd5ecd247b6fd725108f111198a2c121 +PKG_SOURCE_URL:=https://codeload.github.com/sitaramc/gitolite/tar.gz/v$(PKG_VERSION)? + +PKG_CPE_ID:=cpe:/a:sitaram_chamarty:gitolite include $(INCLUDE_DIR)/package.mk @@ -25,22 +23,38 @@ define Package/gitolite SECTION:=net CATEGORY:=Network SUBMENU:=Version Control Systems - DEPENDS:=+perlbase-essential +perlbase-sys +perlbase-data +perlbase-digest +perlbase-env +perlbase-time +git +perlbase-findbin +perlbase-storable +perlbase-text +perlbase-getopt +perlbase-utf8 +openssh-keygen +openssh-server +openssh-moduli perl + DEPENDS:= \ + +git \ + +perlbase-essential \ + +perlbase-data \ + +perlbase-digest \ + +perlbase-env \ + +perlbase-findbin \ + +perlbase-getopt \ + +perlbase-mime \ + +perlbase-storable \ + +perlbase-sys \ + +perlbase-text \ + +perlbase-time \ + +perlbase-utf8 \ + TITLE:=Easy administration of git repositories - URL:=http://gitolite.com/gitlolite - MAINTAINER:=Daniel Dickinson + URL:=http://gitolite.com/gitolite USERID:=git=382:git=382 endef define Package/gitolite/description - Gitolite is a system for managing access to git repositories. Note you will need to make - sure dropbear does not interfere with OpenSSH as gitolite depends on feature not in - dropbear (to my knowledge). + Gitolite is a system for managing access to git repositories. + See https://openwrt.org/docs/guide-user/services/gitolite for a guide + to installation. + NB: You will need an SSH server to use gitolite: dropbear is now sufficient + for gitolite purposes. endef define Package/gitolite/postinst sed -i -e 's,/var/run/git,/srv/git,' $${IPKG_INSTROOT}/etc/passwd sed -i -e 's,git:\(.*\):/bin/false,git:\1:/bin/ash,' $${IPKG_INSTROOT}/etc/passwd +sed -i -e 's,git:x:0:\(.*\)$$,git:x:99999:\1,' $${IPKG_INSTROOT}/etc/shadow endef define Build/Configure diff --git a/net/gitolite/patches/0100-avoid-ssh-keygen.patch b/net/gitolite/patches/0100-avoid-ssh-keygen.patch new file mode 100644 index 00000000..f74e5178 --- /dev/null +++ b/net/gitolite/patches/0100-avoid-ssh-keygen.patch @@ -0,0 +1,132 @@ +Author: Daniel F. Dickinson +Date: Sun Jan 27 01:04:25 2019 -0500 + +gitolite: Eliminate the need for ssh-keygen dependency + + Previously gitolite used ssh-keygen to generate fingerprints + from OpenSSH keys to ensure non-duplication of keys when + processing them to create / manage user ssh access to the + git repositories. This ends up depending on openssl, + which is large and unnecessary when we are running on an + embedded distro such as OpenWrt. + +Signed-off-by: Daniel F. Dickinson +Index: gitolite-3.6.11/src/lib/Gitolite/Common.pm +=================================================================== +--- gitolite-3.6.11.orig/src/lib/Gitolite/Common.pm ++++ gitolite-3.6.11/src/lib/Gitolite/Common.pm +@@ -26,6 +26,8 @@ package Gitolite::Common; + use Exporter 'import'; + use File::Path qw(mkpath); + use File::Temp qw(tempfile); ++use MIME::Base64 qw(decode_base64); ++use Digest::SHA qw(sha256_base64); + use Carp qw(carp cluck croak confess); + + use strict; +@@ -352,43 +352,82 @@ sub logger_plus_stderr { + } + + # ---------------------------------------------------------------------- ++# Decode OpenSSH key ++# If the key cannot be parsed it will be undef ++# Returns (algorithm_name, algo_data1, algo_data2, ...) ++sub ssh_decode_key($) { ++ my $key = shift; ++ my $keydata = decode_base64($key); ++ my @keyparts = (); ++ my $partlen; ++ my $algorithm; ++ my $data; ++ my $pos = 0; ++ $partlen = unpack('N', substr $keydata, $pos, 4) or return undef; ++ $algorithm = substr $keydata, $pos + 4, $partlen or return undef; ++ $pos = $pos + 4 + $partlen; ++ while ( $pos <= length($keydata) ) { ++ $partlen = unpack('N', substr $keydata, $pos, 4) or last; ++ $data = unpack('s>*', substr $keydata, $pos + 4, 4) or last; ++ $pos = $pos + 4 + $partlen; ++ push @keyparts, $data; ++ } ++ return ( $algorithm, @keyparts ); ++} ++ ++# ---------------------------------------------------------------------- ++# Parse OpenSSH line ++# If the file cannot be parsed it will be undef ++# Returns (restrictions, algorithm, PEMkey, comment) ++sub ssh_parse_line($) { ++ my $ssh_line = shift; ++ my @ssh_parts = split / /, $ssh_line, 5; ++ if (scalar @ssh_parts < 4) { ++ @ssh_parts = ('', @ssh_parts); ++ } ++ if (scalar @ssh_parts > 4) { ++ @ssh_parts = @ssh_parts[0,3] ++ } ++ if (scalar @ssh_parts < 4) { ++ @ssh_parts = undef; ++ } ++ return ( @ssh_parts ); ++} ++ ++# ---------------------------------------------------------------------- ++# Get the SSH fingerprint of a line of text ++# If the fingerprint cannot be parsed, it will be undef ++# In a scalar context, returns the fingerprint ++# In a list context, returns (fingerprint, output) where output ++# is the parsed input line (less algorithm) ++sub ssh_fingerprint_line($) { ++ my $ssh_line = shift; ++ my @parsed_line = ssh_parse_line($ssh_line) or return undef; ++ my @ssh_parts = ssh_decode_key($parsed_line[2]) or return undef; ++ ( $parsed_line[1] eq $ssh_parts[0] ) or die "algorithm mismatch: $parsed_line[1] vs. $ssh_parts[0]"; ++ my $fp = sha256_base64(join(' ', @ssh_parts[1,-1])); ++ return wantarray ? ($fp, join(' ', @ssh_parts[1,-1])) : $fp; ++} ++ ++# ---------------------------------------------------------------------- + # Get the SSH fingerprint of a file + # If the fingerprint cannot be parsed, it will be undef + # In a scalar context, returns the fingerprint + # In a list context, returns (fingerprint, output) where output +-# is the raw output of the ssh-keygen command +-sub ssh_fingerprint_file { ++# is the raw input line ++sub ssh_fingerprint_file($) { + my $in = shift; + -f $in or die "file not found: $in\n"; + my $fh; +- open( $fh, "ssh-keygen -l -f $in |" ) or die "could not fork: $!\n"; ++ open( $fh, $in ) or die "could not open $in: $!\n"; + my $output = <$fh>; + chomp $output; +- # dbg("fp = $fp"); + close $fh; + # Return a valid fingerprint or undef +- my $fp = undef; +- if($output =~ /((?:MD5:)?(?:[0-9a-f]{2}:){15}[0-9a-f]{2})/i or +- $output =~ m{((?:RIPEMD|SHA)\d+:[A-Za-z0-9+/=]+)}i) { +- $fp = $1; +- } ++ my $fp = ssh_fingerprint_line($output); + return wantarray ? ($fp, $output) : $fp; + } + +-# Get the SSH fingerprint of a line of text +-# If the fingerprint cannot be parsed, it will be undef +-# In a scalar context, returns the fingerprint +-# In a list context, returns (fingerprint, output) where output +-# is the raw output of the ssh-keygen command +-sub ssh_fingerprint_line { +- my ( $fh, $fn ) = tempfile(); +- print $fh shift() . "\n"; +- close $fh; +- my ($fp,$output) = ssh_fingerprint_file($fn); +- unlink $fn; +- return wantarray ? ($fp,$output) : $fp; +-} +- + # ---------------------------------------------------------------------- + + # bare-minimum subset of 'Tsh' (see github.com/sitaramc/tsh) diff --git a/net/gitolite/patches/100-fix-missing-hooks-dir.patch b/net/gitolite/patches/100-fix-missing-hooks-dir.patch deleted file mode 100644 index 6f7ee53a..00000000 --- a/net/gitolite/patches/100-fix-missing-hooks-dir.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d0409ae1164030913801d37ce5425ed93529c69d Mon Sep 17 00:00:00 2001 -From: Daniel Dickinson -Date: Fri, 1 Jul 2016 00:37:23 -0400 -Subject: [PATCH] Conf::Store: Fix missing hooks dir for symlink - -At least when doing 'gitolite setup -pk user.pub', the -symlinking of hooks fails because the hooks directory -does not exist. Make sure we create it if it's missing. ---- - src/lib/Gitolite/Conf/Store.pm | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/lib/Gitolite/Conf/Store.pm b/src/lib/Gitolite/Conf/Store.pm -index 5568b3f..aac90d4 100644 ---- a/src/lib/Gitolite/Conf/Store.pm -+++ b/src/lib/Gitolite/Conf/Store.pm -@@ -363,6 +363,7 @@ sub store_common { - chmod 0755, "$rc{GL_ADMIN_BASE}/hooks/gitolite-admin/post-update"; - $hook_reset++; - } -+ _mkdir("$repo.git/hooks"); - - # propagate user-defined (custom) hooks to all repos - ln_sf( "$rc{LOCAL_CODE}/hooks/common", "*", "$repo.git/hooks" ) if $rc{LOCAL_CODE}; --- -2.7.4 - diff --git a/net/gnunet-fuse/Makefile b/net/gnunet-fuse/Makefile new file mode 100644 index 00000000..a2a4ccb8 --- /dev/null +++ b/net/gnunet-fuse/Makefile @@ -0,0 +1,40 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=gnunet-fuse + +PKG_VERSION:=0.12.0 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/gnunet +PKG_HASH:=4d42dc3112f36ada150b3904e207b93373c90d4fbd5a1c6415ee7f5c6a428e3b + +PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Daniel Golle + +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=gettext-version +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/gnunet-fuse + SECTION:=net + CATEGORY:=Network + TITLE:=GNUnet filesystem mount via FUSE + URL:=https://www.gnunet.org/ + DEPENDS:=gnunet +gnunet-fs +libfuse +endef + +CONFIGURE_ARGS+= \ + --with-libiconv-prefix="$(ICONV_PREFIX)" \ + --with-libintl-prefix="$(INTL_PREFIX)" \ + --with-gnunet="$(STAGING_DIR)/usr" + +define Package/gnunet-fuse/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-fuse $(1)/usr/bin +endef + +$(eval $(call BuildPackage,gnunet-fuse)) diff --git a/net/gnunet-fuse/patches/001-musl-compat.patch b/net/gnunet-fuse/patches/001-musl-compat.patch new file mode 100644 index 00000000..5b5b9122 --- /dev/null +++ b/net/gnunet-fuse/patches/001-musl-compat.patch @@ -0,0 +1,33 @@ +--- a/src/fuse/mutex.c ++++ b/src/fuse/mutex.c +@@ -68,8 +68,13 @@ GNUNET_mutex_create (int isRecursive) + if (isRecursive) + { + #ifdef __linux__ ++#if defined(__UCLIBC__) || defined(__GLIBC__) + GNUNET_assert (0 == pthread_mutexattr_setkind_np + (&attr, PTHREAD_MUTEX_RECURSIVE_NP)); ++#else ++ GNUNET_assert (0 == pthread_mutexattr_settype ++ (&attr, PTHREAD_MUTEX_RECURSIVE)); ++#endif + #elif BSD || SOLARIS || OSX || WINDOWS + GNUNET_assert (0 == pthread_mutexattr_settype + (&attr, PTHREAD_MUTEX_RECURSIVE)); +@@ -78,11 +83,16 @@ GNUNET_mutex_create (int isRecursive) + else + { + #ifdef __linux__ ++#if defined(__UCLIBC__) || defined(__GLIBC__) + GNUNET_assert (0 == pthread_mutexattr_setkind_np + (&attr, PTHREAD_MUTEX_ERRORCHECK_NP)); + #else + GNUNET_assert (0 == pthread_mutexattr_settype + (&attr, PTHREAD_MUTEX_ERRORCHECK)); ++#endif ++#else ++ GNUNET_assert (0 == pthread_mutexattr_settype ++ (&attr, PTHREAD_MUTEX_ERRORCHECK)); + #endif + } + mut = GNUNET_new (struct GNUNET_Mutex); diff --git a/net/gnunet-secushare/Makefile b/net/gnunet-secushare/Makefile new file mode 100644 index 00000000..7bdab0e0 --- /dev/null +++ b/net/gnunet-secushare/Makefile @@ -0,0 +1,107 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=gnunet-secushare + +PKG_SOURCE_VERSION:=a831d35535e278e0534fa4f8848f0113fc8572a2 +PKG_SOURCE_DATE:=20191029 +PKG_MIRROR_HASH:=e8c0762bd8d185cd504d73070b633e1902311cb1c13f8d55a7f0e9ec2597d957 +PKG_RELEASE:=1 +PKG_SOURCE_URL:=https://gnunet.org/git/gnunet-secushare.git +PKG_SOURCE_PROTO:=git +PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Daniel Golle + +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=gettext-version +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/gnunet-secushare + SECTION:=net + CATEGORY:=Network + TITLE:=GNUnet Secushare + URL:=https://www.secushare.org/ + DEPENDS:=gnunet +gnunet-reclaim +endef + +define Package/gnunet-secushare-mysql + SECTION:=net + CATEGORY:=Network + TITLE:=GNUnet Secushare (mySQL) + URL:=https://www.secushare.org/ + DEPENDS:=gnunet +gnunet-secushare +gnunet-mysql +endef + +define Package/gnunet-secushare-pgsql + SECTION:=net + CATEGORY:=Network + TITLE:=GNUnet Secushare (PostgreSQL) + URL:=https://www.secushare.org/ + DEPENDS:=gnunet +gnunet-secushare +gnunet-pgsql +endef + +define Package/gnunet-secushare-sqlite + SECTION:=net + CATEGORY:=Network + TITLE:=GNUnet Secushare (SQLite) + URL:=https://www.secushare.org/ + DEPENDS:=gnunet +gnunet-secushare +gnunet-sqlite +endef + + +CONFIGURE_ARGS+= \ + --with-libiconv-prefix="$(ICONV_PREFIX)" \ + --with-libintl-prefix="$(INTL_PREFIX)" \ + --with-gnunet="$(STAGING_DIR)/usr" \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mysql),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgresql="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql) \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sqlite),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \ + --enable-testing \ + --disable-testruns \ + --enable-experimental + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/gnunet $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet +endef + +define Package/gnunet-secushare/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet $(1)/usr/lib/gnunet-secushare/libexec + $(INSTALL_DIR) $(1)/usr/share/gnunet-secushare/config.d $(1)/usr/share/gnunet/config.d + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-multicast $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-social $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet-secushare/libexec/* $(1)/usr/lib/gnunet-secushare/libexec/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet-secushare/config.d/* $(1)/usr/share/gnunet-secushare/config.d +endef + +define Package/gnunet-secushare-mysql/install + $(INSTALL_DIR) $(1)/usr/lib/gnunet + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_mysql.so* $(1)/usr/lib/gnunet/ + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/gnunet-secushare-mysql.defaults $(1)/etc/uci-defaults/gnunet-secushare-mysql +endef + +define Package/gnunet-secushare-pgsql/install + $(INSTALL_DIR) $(1)/usr/lib/gnunet + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_postgres.so* $(1)/usr/lib/gnunet/ + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/gnunet-secushare-pgsql.defaults $(1)/etc/uci-defaults/gnunet-secushare-pgsql +endef + +define Package/gnunet-secushare-sqlite/install + $(INSTALL_DIR) $(1)/usr/lib/gnunet + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_sqlite.so* $(1)/usr/lib/gnunet/ + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/gnunet-secushare-sqlite.defaults $(1)/etc/uci-defaults/gnunet-secushare-sqlite +endef + +$(eval $(call BuildPackage,gnunet-secushare)) +$(eval $(call BuildPackage,gnunet-secushare-mysql)) +$(eval $(call BuildPackage,gnunet-secushare-pgsql)) +$(eval $(call BuildPackage,gnunet-secushare-sqlite)) diff --git a/net/gnunet-secushare/files/gnunet-secushare-mysql.defaults b/net/gnunet-secushare/files/gnunet-secushare-mysql.defaults new file mode 100644 index 00000000..9954a601 --- /dev/null +++ b/net/gnunet-secushare/files/gnunet-secushare-mysql.defaults @@ -0,0 +1,8 @@ +#!/bin/sh + +uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config + +uci -q batch < +PKG_CPE_ID:=cpe:/a:gnunet:gnunet PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=gettext-version @@ -32,14 +29,19 @@ CONFIGURE_ARGS+= \ $(if $(CONFIG_PACKAGE_libsqlite3),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \ --enable-testing \ --disable-testruns \ + --disable-documentation \ --enable-experimental \ --with-extractor=$(STAGING_DIR)/usr \ --with-gnutls=$(STAGING_DIR)/usr \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-transport-bluetooth),--with-libbluetooth="$(STAGING_DIR)/usr",--without-libbluetooth) \ --with-libgnurl=$(STAGING_DIR)/usr \ + --with-libogg=$(STAGING_DIR)/usr \ + --with-libopus=$(STAGING_DIR)/usr \ + --with-libpulse=$(STAGING_DIR)/usr \ --with-libunistring-prefix=$(STAGING_DIR)/usr \ --with-microhttpd=$(STAGING_DIR)/usr -# ToDo: request upstream to provide --with-pulseaudio=... +# upstream now provides --with-pulseaudio but doesn't detect rpath TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio define Package/gnunet/Default @@ -52,8 +54,8 @@ endef define Package/gnunet $(call Package/gnunet/Default) TITLE+= - a peer-to-peer framework focusing on security - DEPENDS:=+libgcrypt +libgpg-error +libidn +libltdl +libunistring +librt +zlib \ - $(ICONV_DEPENDS) $(INTL_DEPENDS) + DEPENDS:=+libatomic +libgcrypt +libgpg-error +libidn2 +libltdl +libunistring \ + +librt +zlib $(ICONV_DEPENDS) $(INTL_DEPENDS) USERID:=gnunet=958:gnunet=958 MENU:=1 endef @@ -102,7 +104,7 @@ define BuildComponent ( if [ "$(PLUGIN_$(1))" ]; then \ $(INSTALL_DIR) $$(1)/usr/lib/gnunet ; \ for plug in $(PLUGIN_$(1)); do \ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \ done \ fi ) @@ -133,37 +135,37 @@ define Package/gnunet/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet/libexec $(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos - ( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \ - peerinfo revocation scalarproduct statistics transport uri; do \ + ( for bin in arm ats ats-new cadet core config ecc identity nat nat-auto nat-server nse \ + peerinfo peerstore revocation scalarproduct scrypt statistics transport uri; do \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \ done ) - ( for lib in arm ats block blockgroup cadet core datacache dht \ - dns dnsparser fragmentation friends hello identity natauto natnew nse \ - peerinfo regexblock regex revocation scalarproduct set \ - statistics transport util; do \ + ( for lib in arm ats atsapplication atstransport block blockgroup cadet \ + core datacache dht dns dnsparser fragmentation friends hello \ + identity natauto natnew nse nt peerinfo peerstore regexblock regex revocation \ + scalarproduct set statistics transport transportaddress transportapplication \ + transportcommunicator transportcore transportmonitor util; do \ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \ done ) - ( for plug in ats_proportional block_dht block_regex block_revocation \ - transport_tcp transport_udp transport_unix; do \ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \ + ( for plug in ats_proportional ats2_simple block_dht block_regex block_revocation transport_unix; do \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \ done ) ( for lex in daemon-topology helper-nat-client \ - helper-nat-server service-arm service-ats service-cadet \ + helper-nat-server service-arm service-ats service-ats-new service-cadet \ service-core service-dht service-identity service-nat service-nat-auto \ - service-nse service-peerinfo service-regex \ + service-nse service-peerinfo service-peerstore service-regex \ service-revocation service-scalarproduct-alice \ service-scalarproduct-bob service-scalarproduct-ecc-alice \ service-scalarproduct-ecc-bob service-set service-statistics \ - service-transport; do \ + service-transport timeout; do \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \ done ) - ( for conf in arm ats cadet core datacache dht identity identity-provider \ - nat nat-auto nse peerinfo regex revocation scalarproduct \ - set statistics topology transport util; do \ + ( for conf in arm ats cadet communicator-unix core datacache dht identity \ + identity-provider nat nat-auto nse peerinfo peerstore regex revocation \ + scalarproduct set statistics topology transport util; do \ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \ done ) @@ -185,6 +187,11 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet endef +BIN_auction:=auction-create auction-info auction-join +LIBEXEC_auction:=service-auction +CONF_auction:=auction +DEPENDS_auction:=+gnunet-reclaim +jansson + DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg BIN_conversation:=conversation conversation-test LIB_conversation:=conversation microphone speaker @@ -195,29 +202,37 @@ CONF_conversation:=conversation BIN_dht-cli:=dht-get dht-put dht-monitor PLUGIN_dht-cli:=block_test -DEPENDS_hostlist:=+libmicrohttpd +libgnurl +ca-certificates +DEPENDS_curl:=+libgnurl +jansson +LIB_curl:=curl + +DEPENDS_hostlist:=+libmicrohttpd-ssl +gnunet-curl +ca-certificates LIBEXEC_hostlist:=daemon-hostlist CONF_hostlist:=hostlist -DEPENDS_transport-http_client:=+libgnurl +ca-certificates +DEPENDS_transport-bluetooth:=+bluez-libs +PLUGIN_transport-bluetooth:=transport_bluetooth +LIBEXEC_transport-bluetooth:=helper-transport-bluetooth + +DEPENDS_transport-http_client:=+gnunet-curl +ca-certificates PLUGIN_transport-http_client:=transport_http_client transport_https_client -DEPENDS_transport-http_server:=+libmicrohttpd +DEPENDS_transport-http_server:=+libmicrohttpd-ssl PLUGIN_transport-http_server:=transport_http_server transport_https_server +PLUGIN_transport-tcp:=transport_tcp + +PLUGIN_transport-udp:=transport_udp + PLUGIN_transport-wlan:=transport_wlan LIBEXEC_transport-wlan:=helper-transport-wlan -DEPENDS_experiments:=+libglpk -PLUGIN_experiments:=ats_mlp ats_ril - # BIN_dv:=dv LIB_dv:=dv PLUGIN_dv:=transport_dv LIBEXEC_dv:=service-dv CONF_dv:=dv -DEPENDS_fs:=+gnunet-datastore +gnunet-peerstore +libextractor +DEPENDS_fs:=+gnunet-datastore +libextractor BIN_fs:=auto-share directory download fs publish unindex search LIB_fs:=fs PLUGIN_fs:=block_fs @@ -226,16 +241,16 @@ CONF_fs:=fs DEPENDS_gns:=+gnunet-vpn +iptables-mod-extra USERID_gns:=gnunet=958:gnunetdns=452 -BIN_gns:=gns gns-import.sh namecache namestore resolver +BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport LIB_gns:=gns gnsrecord namecache namestore PLUGIN_gns:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster CONF_gns:=dns gns namecache namestore resolver zonemaster -DEPENDS_namestore-fcfsd:=+gnunet-gns +libmicrohttpd +DEPENDS_namestore-fcfsd:=+gnunet-gns +libmicrohttpd-ssl LIBEXEC_namestore-fcfsd:=namestore-fcfsd -DEPENDS_gns-proxy:=+gnunet-gns +libgnurl +libmicrohttpd +DEPENDS_gns-proxy:=+gnunet-gns +gnunet-curl +libmicrohttpd-ssl LIBEXEC_gns-proxy:=gns-proxy DEPENDS_datastore:=+gnunet-gns @@ -244,14 +259,17 @@ LIB_datastore:=datastore LIBEXEC_datastore:=service-datastore CONF_datastore:=datastore -BIN_peerstore:=peerstore -LIB_peerstore:=peerstore -LIBEXEC_peerstore:=service-peerstore -CONF_peerstore:=peerstore -DEPENDS_rest:=+gnunet-gns +gnunet-social +libmicrohttpd +jansson -LIB_rest:=rest json jsonapi jsonapiutils -PLUGIN_rest:=rest_gns rest_identity rest_identity_provider rest_namestore +DEPENDS_reclaim:=+gnunet-gns +gnunet-sqlite +libpbc +libgabe +BIN_reclaim:=credential reclaim +LIB_reclaim:=consensus credential abe reclaim reclaimattribute secretsharing +LIBEXEC_reclaim:=service-consensus service-credential service-reclaim service-secretsharing +CONF_reclaim:=consensus credential reclaim secretsharing +PLUGIN_reclaim:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid + +DEPENDS_rest:=+gnunet-gns +gnunet-reclaim +libmicrohttpd-ssl +jansson +LIB_rest:=rest json +PLUGIN_rest:=rest_copying rest_gns rest_identity rest_namestore rest_peerinfo rest_openid_connect rest_reclaim LIBEXEC_rest:=rest-server CONF_rest:=rest @@ -260,20 +278,12 @@ LIB_rps:=rps LIBEXEC_rps:=service-rps CONF_rps:=rps -DEPENDS_social:=+gnunet-gns +libmicrohttpd +jansson -BIN_social:=identity-token multicast social -LIB_social:=consensus identityprovider multicast psyc psycstore psycutil secretsharing social -LIBEXEC_social:=service-consensus service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-secretsharing service-social -CONF_social:=consensus multicast psyc psycstore secretsharing social -PLUGINS_social:=block_consensus - PLUGIN_dhtcache-heap:=datacache_heap CONFLICTS_dhtcache-heap:=gnunet-dhtcache-pgsql gnunet-dhtcache-sqlite DEPENDS_gns-flat:=+gnunet-gns PLUGIN_gns-flat:=namecache_flat namestore_flat -DEPENDS_peerstore-flat:=+gnunet-peerstore PLUGIN_peerstore-flat:=peerstore_flat DEPENDS_fs-heap:=+gnunet-datastore @@ -283,9 +293,6 @@ CONFLICTS_fs-heap:=gnunet-fs-mysql gnunet-fs-pgsql gnunet-fs-sqlite DEPENDS_mysql:=+libmysqlclient LIB_mysql:=mysql my -DEPENDS_social-mysql:=+gnunet-mysql +gnunet-social -PLUGIN_social-mysql:=psycstore_mysql -CONFLICTS_social-mysql:=gnunet-social-sqlite DEPENDS_fs-mysql:=+gnunet-mysql +gnunet-datastore PLUGIN_fs-mysql:=datastore_mysql @@ -306,9 +313,6 @@ DEPENDS_gns-pgsql:=+gnunet-pgsql +gnunet-gns PLUGIN_gns-pgsql:=namecache_postgres namestore_postgres CONFLICTS_gns-pgsql:=gnunet-gns-sqlite gnunet-gns-flat -DEPENDS_social-pgsql:=+gnunet-pgsql +gnunet-social -PLUGIN_social-pgsql:=psycstore_postgres -CONFLICTS_social-pgsql:=gnunet-social-sqlite gnunet-social-mysql DEPENDS_sqlite:=+libsqlite3 LIB_sqlite:=sq @@ -317,7 +321,7 @@ DEPENDS_gns-sqlite:=+gnunet-gns +gnunet-sqlite PLUGIN_gns-sqlite:=namecache_sqlite namestore_sqlite CONFLICTS_gns-sqlite:=gnunet-gns-flat -DEPENDS_peerstore-sqlite:=+gnunet-peerstore +gnunet-sqlite +DEPENDS_peerstore-sqlite:=+gnunet-sqlite PLUGIN_peerstore-sqlite:=peerstore_sqlite CONFLICTS_peerstore-sqlite:=gnunet-peerstore-flat @@ -327,12 +331,7 @@ PLUGIN_dhtcache-sqlite:=datacache_sqlite DEPENDS_fs-sqlite:=+gnunet-datastore +gnunet-sqlite PLUGIN_fs-sqlite:=datastore_sqlite -DEPENDS_social-sqlite:=+gnunet-social +gnunet-sqlite -PLUGIN_social-sqlite:=psycstore_sqlite -DEPENDS_transport-bluetooth:=+bluez-libs -PLUGIN_transport-bluetooth:=transport_bluetooth -LIBEXEC_transport-bluetooth:=helper-transport-bluetooth DEPENDS_utils:=+certtool +openssl-util BIN_utils:=gns-proxy-setup-ca transport-certificate-creation @@ -389,19 +388,19 @@ $(eval $(call PostInstFixSUIDPerms,gnunet-transport-wlan)) $(eval $(call PostInstFixSUIDPerms,gnunet-vpn)) $(eval $(call BuildPackage,gnunet)) +$(eval $(call BuildComponent,auction,auction components,)) $(eval $(call BuildComponent,conversation,conversation component,)) +$(eval $(call BuildComponent,curl,cURL wrapper component,)) $(eval $(call BuildComponent,datastore,data storage components,)) $(eval $(call BuildComponent,dht-cli,DHT command line clients,)) # $(eval $(call BuildComponent,dv,distance-vector routing component,y)) -$(eval $(call BuildComponent,experiments,experimental components,)) $(eval $(call BuildComponent,fs,file-sharing components,)) $(eval $(call BuildComponent,gns,name resolution components,y)) $(eval $(call BuildComponent,gns-proxy,gns-proxy component,)) $(eval $(call BuildComponent,hostlist,HTTP bootstrap hostlist client and server,y)) -$(eval $(call BuildComponent,peerstore,peerstore local persistency component,)) +$(eval $(call BuildComponent,reclaim,reclaim identity-provider subsystem,)) $(eval $(call BuildComponent,rest,REST interface,)) $(eval $(call BuildComponent,rps,RPS routing component,y)) -$(eval $(call BuildComponent,social,social components,)) $(eval $(call BuildComponent,namestore-fcfsd,first-come-first-serve registration server,)) $(eval $(call BuildComponent,dhtcache-heap,heap-based dhtcache plugin,y)) $(eval $(call BuildComponent,fs-heap,heap-based filesharing plugin,)) @@ -409,21 +408,20 @@ $(eval $(call BuildComponent,gns-flat,flat storage GNS plugins,y)) $(eval $(call BuildComponent,peerstore-flat,flat storage peerstore plugin,)) $(eval $(call BuildComponent,mysql,mySQL backend,)) $(eval $(call BuildComponent,fs-mysql,mySQL filesharing plugins,)) -$(eval $(call BuildComponent,social-mysql,mySQL social plugins,)) $(eval $(call BuildComponent,pgsql,PostgreSQL backend,)) $(eval $(call BuildComponent,dhtcache-pgsql,PostgreSQL dhtcache plugin,)) $(eval $(call BuildComponent,fs-pgsql,PostgreSQL filesharing plugin,)) $(eval $(call BuildComponent,gns-pgsql,PostgreSQL GNS plugins,)) -$(eval $(call BuildComponent,social-pgsql,PostgreSQL social plugin,)) $(eval $(call BuildComponent,sqlite,libsqlite3 backend,)) $(eval $(call BuildComponent,dhtcache-sqlite,libsqlite3 dhtcache plugin,)) $(eval $(call BuildComponent,fs-sqlite,libsqlite3 filesharing plugin,)) $(eval $(call BuildComponent,gns-sqlite,libsqlite3 gns plugins,)) $(eval $(call BuildComponent,peerstore-sqlite,libsqlite3 peerstore plugin,)) -$(eval $(call BuildComponent,social-sqlite,libsqlite3 social plugins,)) $(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,)) $(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y)) $(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,)) +$(eval $(call BuildComponent,transport-tcp,TCP transport,y)) +$(eval $(call BuildComponent,transport-udp,UDP transport,y)) $(eval $(call BuildComponent,transport-wlan,WLAN transport,y)) $(eval $(call BuildComponent,utils,administration utililties,)) $(eval $(call BuildComponent,vpn,vpn components,y)) diff --git a/net/gnunet/files/gnunet-gns-flat.defaults b/net/gnunet/files/gnunet-gns-flat.defaults index a861291b..e2794b7a 100644 --- a/net/gnunet/files/gnunet-gns-flat.defaults +++ b/net/gnunet/files/gnunet-gns-flat.defaults @@ -4,9 +4,9 @@ uci -q get gnunet.namestore || uci set gnunet.namestore=gnunet-config uci -q get gnunet.namecache || uci set gnunet.namecache=gnunet-config uci -q batch < ++ ]])) + ]) + ], + [AC_MSG_RESULT([--with-libpulse not specified]) +@@ -846,10 +848,12 @@ AC_ARG_WITH(libopus, + LDFLAGS="-L$with_libopus/lib $LDFLAGS" + CPPFLAGS="-I$with_libopus/include $CPPFLAGS" + AC_CHECK_HEADERS(opus/opus.h, +- AC_CHECK_LIB([opus], +- [OPUS_SET_GAIN], +- EXT_LIB_PATH="-L$with_libopus/lib $EXT_LIB_PATH" +- opus=1)) ++ AC_CHECK_DECL([OPUS_SET_GAIN], ++ [opus=1], ++ [], ++ [[ ++ #include ++ ]])) + ]) + ], + [AC_MSG_RESULT([--with-libopus not specified]) diff --git a/net/gnurl/Makefile b/net/gnurl/Makefile index 2adb037c..dbf53ffb 100644 --- a/net/gnurl/Makefile +++ b/net/gnurl/Makefile @@ -8,13 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnurl -PKG_VERSION:=7.57.0 -PKG_RELEASE:=2 +PKG_VERSION:=7.70.0 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://gnunet.org/sites/default/files +PKG_SOURCE_URL:=@GNU/gnunet -PKG_HASH:=2ccd2a641a9815df924b6a79ee47d12a27ee43bd05a3c6ba958108564580d3b7 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=0acfcf7921eab323d41be3c8dbb3c4926530bb1fdd95b4fa6f412eb291a2a95f PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING @@ -27,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk define Package/gnurl/Default SECTION:=net CATEGORY:=Network - URL:=https://gnunet.org/gnurl + URL:=https://gnunet.org/en/gnurl.html MAINTAINER:=Daniel Golle endef @@ -57,6 +58,7 @@ CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --without-axtls \ + --without-brotli \ --without-libssh2 \ --without-libmetalink \ --without-winidn \ @@ -64,13 +66,16 @@ CONFIGURE_ARGS += \ --without-nghttp2 \ --without-nss \ --without-cyassl \ + --without-libpsl \ --without-polarssl \ --without-ssl \ --without-winssl \ --without-darwinssl \ --disable-ares \ --disable-sspi \ + --disable-crypto-auth \ --disable-ntlm-wb \ + --disable-tls-srp \ --disable-ldap \ --disable-ldaps \ --disable-rtsp \ diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index e5d124b9..ca86759b 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -1,6 +1,7 @@ # # Copyright (C) 2010-2016 OpenWrt.org # Copyright (C) 2009-2016 Thomas Heil +# Copyright (C) 2018 Christian Lachner # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,16 +10,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=haproxy -PKG_VERSION:=1.8.4 -PKG_RELEASE:=01 +PKG_VERSION:=2.1.7 +PKG_RELEASE:=1 -PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.haproxy.org/download/1.8/src/ -PKG_HASH:=e305b0a4e7dec08072841eef6ac6dcd1b5586b1eff09c2d51e152a912e8884a6 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://www.haproxy.org/download/2.1/src +PKG_HASH:=392e6cf18e75fe7e166102e8c4512942890a0b5ae738f6064faab4687f60a339 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_LICENSE:=GPL-2.0 -MAINTAINER:=Thomas Heil +PKG_MAINTAINER:=Thomas Heil , \ + Christian Lachner +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:haproxy:haproxy include $(INCLUDE_DIR)/package.mk @@ -30,18 +33,8 @@ define Package/haproxy/Default URL:=https://www.haproxy.org/ endef -define Download/lua534 - FILE:=lua-5.3.4.tar.gz - URL:=https://www.lua.org/ftp/ - HASH:=f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c -endef - define Build/Prepare $(call Build/Prepare/Default) -ifeq ($(ENABLE_LUA),y) - tar -zxvf $(DL_DIR)/lua-5.3.4.tar.gz -C $(PKG_BUILD_DIR) - ln -s $(PKG_BUILD_DIR)/lua-5.3.4 $(PKG_BUILD_DIR)/lua -endif endef define Package/haproxy/Default/conffiles @@ -53,8 +46,7 @@ define Package/haproxy/Default/description endef define Package/haproxy - DEPENDS+= +libpcre +libltdl +zlib +libpthread +libopenssl +libncursesw +libreadline +libatomic +@OPENSSL_WITH_DEPRECATED +@OPENSSL_WITH_EC +@OPENSSL_WITH_EC2M +@OPENSSL_WITH_DTLS +@OPENSSL_WITH_COMPRESSION +@OPENSSL_WITH_NPN +@OPENSSL_WITH_PSK +@OPENSSL_WITH_SRP +@OPENSSL_ENGINE_DIGEST +@OPENSSL_ENGINE_CRYPTO - + DEPENDS+= +libpcre +libltdl +zlib +libpthread +liblua5.3 +libopenssl +libncurses +libreadline +libatomic TITLE+= (with SSL support) VARIANT:=ssl $(call Package/haproxy/Default) @@ -69,15 +61,10 @@ $(call Package/haproxy/Default/description) This package is built with SSL and LUA support. endef -define Package/haproxy/config - select CONFIG_OPENSSL_WITH_DEPRECATED - $(call Package/haproxy/Default/config) -endef - define Package/haproxy-nossl TITLE+= (without SSL support) VARIANT:=nossl - DEPENDS+= +libpcre +libltdl +zlib +libpthread +libatomic + DEPENDS+= +libpcre +libltdl +zlib +libpthread +liblua5.3 +libatomic TITLE+= (without SSL support) $(call Package/haproxy/Default) endef @@ -94,80 +81,53 @@ endef ENABLE_LUA:=y ENABLE_REGPARM:=n -ifeq ($(CONFIG_mips),y) - ENABLE_LUA:=n -endif -ifeq ($(CONFIG_mipsel),y) - ENABLE_LUA:=n -endif - ifeq ($(CONFIG_TARGET_x86),y) - ENABLE_REGPARM:=y + ENABLE_REGPARM:=y endif -ifeq ($(CONFIG_avr32),y) - LINUX_TARGET:=linux26 -else - LINUX_TARGET:=linux2628 +ifeq ($(CONFIG_USE_UCLIBC),y) + ADDON+=USE_LIBCRYPT= endif ifeq ($(BUILD_VARIANT),ssl) ADDON+=USE_OPENSSL=1 - ADDON+=ADDLIB="-lcrypto -lm " -endif - -ifeq ($(ENABLE_LUA),y) - ADDON+=USE_LUA=1 - ADDON+=LUA_LIB_NAME="lua534" - ADDON+=LUA_INC="$(STAGING_DIR)/lua-5.3.4/include" - ADDON+=LUA_LIB="$(STAGING_DIR)/lua-5.3.4/lib" + ADDON+=ADDLIB="-lcrypto -lm" endif ifeq ($(ENABLE_REGPARM),y) ADDON+=USE_REGPARM=1 endif -ifeq ($(ENABLE_LUA),y) -define Build/Compile/lua - $(MAKE) TARGET=$(LINUX_TARGET) -C $(PKG_BUILD_DIR)/lua \ - INSTALL_TOP="$(STAGING_DIR)/lua-5.3.4/" \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS) -lncurses -lreadline" \ - LD="$(TARGET_LD)" \ - linux install - - mv $(STAGING_DIR)/lua-5.3.4/lib/liblua.a $(STAGING_DIR)/lua-5.3.4/lib/liblua534.a -endef -endif - define Build/Compile - $(call Build/Compile/lua) - $(MAKE) TARGET=$(LINUX_TARGET) -C $(PKG_BUILD_DIR) \ + $(MAKE) TARGET=linux-glibc -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ CC="$(TARGET_CC)" \ PCREDIR="$(STAGING_DIR)/usr/" \ - SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530 " \ - USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_TFO=1 \ - USE_ZLIB=yes USE_PCRE=1 USE_PCRE_JIT=1 USE_GETADDRINFO=1 \ - VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \ - $(ADDON) \ + USE_LUA=1 LUA_LIB_NAME="lua5.3" LUA_INC="$(STAGING_DIR)/usr/include/lua5.3" LUA_LIB="$(STAGING_DIR)/usr/lib" \ + SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530" \ + USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_TFO=1 USE_NS=1 \ + USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_GETADDRINFO=1 \ + USE_THREAD=1 USE_PTHREAD_PSHARED=1 \ + VERSION="$(PKG_VERSION)" SUBVERS="-$(PKG_RELEASE)" \ + VERDATE="$(shell date -d @$(SOURCE_DATE_EPOCH) '+%Y/%m/%d')" IGNOREGIT=1 \ + $(ADDON) USE_BACKTRACE= \ + CFLAGS="$(TARGET_CFLAGS) -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-format-truncation -Wno-unused-label -Wno-sign-compare -Wno-unused-parameter -Wno-old-style-declaration -Wno-ignored-qualifiers -Wno-clobbered -Wno-missing-field-initializers -Wno-implicit-fallthrough -Wno-stringop-overflow -Wno-cast-function-type -Wtype-limits -Wshift-negative-value -Wshift-overflow=2 -Wduplicated-cond -Wnull-dereference" \ LD="$(TARGET_CC)" \ LDFLAGS="$(TARGET_LDFLAGS) -latomic" \ - IGNOREGIT=1 + EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ LD="$(TARGET_CC)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ $(MAKE_FLAGS) \ install $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/contrib/halog \ DESTDIR="$(PKG_INSTALL_DIR)" \ $(MAKE_FLAGS) \ + OPTIMIZE="$(TARGET_CFLAGS)" \ ADDLIB="-lcrypto" \ - VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \ halog endef @@ -178,8 +138,6 @@ define Package/haproxy/install $(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy - $(INSTALL_DIR) $(1)/etc/hotplug.d/net - $(INSTALL_BIN) ./files/haproxy.hotplug $(1)/etc/hotplug.d/net/90-haproxy endef Package/haproxy-nossl/install = $(Package/haproxy/install) @@ -200,7 +158,6 @@ define Package/halog/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/halog/halog $(1)/usr/bin/ endef -$(eval $(call Download,lua534)) $(eval $(call BuildPackage,haproxy)) $(eval $(call BuildPackage,halog)) $(eval $(call BuildPackage,haproxy-nossl)) diff --git a/net/haproxy/files/haproxy.cfg b/net/haproxy/files/haproxy.cfg index a54f5f5d..ffe5949c 100644 --- a/net/haproxy/files/haproxy.cfg +++ b/net/haproxy/files/haproxy.cfg @@ -1,6 +1,6 @@ -# Example configuration file for HAProxy 1.3, refer to the url below for +# Example configuration file for HAProxy 2.0, refer to the url below for # a full documentation and examples for configuration: -# http://haproxy.1wt.eu/download/1.3/doc/configuration.txt +# https://cbonte.github.io/haproxy-dconv/2.0/configuration.html # Global parameters @@ -38,6 +38,13 @@ global # limits like number of open file descriptors. Default is 1. #nbproc 2 +# Default parameters +defaults + # Default timeouts + timeout connect 5000ms + timeout client 50000ms + timeout server 50000ms + # Example HTTP proxy listener listen my_http_proxy @@ -78,9 +85,9 @@ listen my_smtp_proxy # Round robin load balancing over two servers on port 123 forcing # the address 192.168.1.1 and port 25 as source. balance roundrobin - #use next line for transparent proxy, so the servers can see the - #original ip-address and remove source keyword in server definition - #source 0.0.0.0 usesrc clientip + #use next line for transparent proxy, so the servers can see the + #original ip-address and remove source keyword in server definition + #source 0.0.0.0 usesrc clientip server server01 192.168.1.10:123 source 192.168.1.1:25 server server02 192.168.1.20:123 source 192.168.1.1:25 diff --git a/net/haproxy/files/haproxy.hotplug b/net/haproxy/files/haproxy.hotplug deleted file mode 100644 index d14b5bf3..00000000 --- a/net/haproxy/files/haproxy.hotplug +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$ACTION" = add ]; then - - /etc/init.d/haproxy enabled && \ - /etc/init.d/haproxy start -fi - diff --git a/net/haproxy/files/haproxy.init b/net/haproxy/files/haproxy.init index edda9a3a..de569520 100644 --- a/net/haproxy/files/haproxy.init +++ b/net/haproxy/files/haproxy.init @@ -1,25 +1,25 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2009-2010 OpenWrt.org +# Copyright (C) 2009-2019 OpenWrt.org START=99 STOP=80 -SERVICE_USE_PID=1 +USE_PROCD=1 + +EXTRA_COMMANDS="check" HAPROXY_BIN="/usr/sbin/haproxy" HAPROXY_CONFIG="/etc/haproxy.cfg" -HAPROXY_PID="/var/run/haproxy.pid" -start() { - service_start $HAPROXY_BIN -q -D -f "$HAPROXY_CONFIG" -p "$HAPROXY_PID" +start_service() { + procd_open_instance + procd_set_param respawn + procd_set_param file "$HAPROXY_CONFIG" + procd_set_param reload_signal USR2 + procd_set_param command $HAPROXY_BIN -q -W -db -f "$HAPROXY_CONFIG" + procd_close_instance } -stop() { - kill -9 $(cat $HAPROXY_PID | tr "\n" " ") - service_stop $HAPROXY_BIN -} - -reload() { - $HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID | tr "\n" " ") - #$HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID) +check() { + $HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG } diff --git a/net/haproxy/get-latest-patches.sh b/net/haproxy/get-latest-patches.sh new file mode 100755 index 00000000..b1139c68 --- /dev/null +++ b/net/haproxy/get-latest-patches.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +CLONEURL=https://git.haproxy.org/git/haproxy-2.1.git +BASE_TAG=v2.1.7 +TMP_REPODIR=tmprepo +PATCHESDIR=patches + +if test -d "${TMP_REPODIR}"; then rm -rf "${TMP_REPODIR}"; fi + +git clone "${CLONEURL}" "${TMP_REPODIR}" + +printf "Cleaning patches\n" +find ${PATCHESDIR} -type f -name "*.patch" -exec rm -f "{}" \; + +i=0 +for cid in $(git -C "${TMP_REPODIR}" rev-list ${BASE_TAG}..HEAD | tac); do + filename="$(printf "%03d" $i)-$(git -C "${TMP_REPODIR}" log --format=%s -n 1 $cid | sed -e"s/[()']//g" -e's/[^_a-zA-Z0-9+-]\+/-/g' -e's/-$//').patch" + printf "Creating %s\n" "${filename}" + git -C "${TMP_REPODIR}" show "$cid" > "${PATCHESDIR}/$filename" + git add "${PATCHESDIR}/$filename" + i=$((i+1)) +done + +rm -rf "${TMP_REPODIR}" + +printf "finished\n" + diff --git a/net/haproxy/patches/000-OPENWRT-BUILD-make-dladdr1-depend-on-glibc-version-and-not-__USE_GNU.patch b/net/haproxy/patches/000-OPENWRT-BUILD-make-dladdr1-depend-on-glibc-version-and-not-__USE_GNU.patch new file mode 100644 index 00000000..00caee0a --- /dev/null +++ b/net/haproxy/patches/000-OPENWRT-BUILD-make-dladdr1-depend-on-glibc-version-and-not-__USE_GNU.patch @@ -0,0 +1,23 @@ +commit 62af9c83f9ed2b25e0061798e29e3cccfce5fbdc +Author: Willy Tarreau +Date: Tue Mar 10 07:51:48 2020 +0100 + + BUILD: make dladdr1 depend on glibc version and not __USE_GNU + + Technically speaking the call was implemented in glibc 2.3 so we must + rely on this and not on __USE_GNU which is an internal define of glibc + to track use of GNU_SOURCE. + +diff --git a/src/standard.c b/src/standard.c +index e0ea8328e..d16eebfea 100644 +--- a/src/standard.c ++++ b/src/standard.c +@@ -4350,7 +4350,7 @@ void debug_hexdump(FILE *out, const char *pfx, const char *buf, + static int dladdr_and_size(const void *addr, Dl_info *dli, size_t *size) + { + int ret; +-#ifdef __USE_GNU // most detailed one ++#if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) // most detailed one + const ElfW(Sym) *sym; + + ret = dladdr1(addr, dli, (void **)&sym, RTLD_DL_SYMENT); diff --git a/net/haproxy/patches/0001-BUG-MEDIUM-ssl-Dont-always-treat-SSL_ERROR_SYSCALL-as-unrecovarable.patch b/net/haproxy/patches/0001-BUG-MEDIUM-ssl-Dont-always-treat-SSL_ERROR_SYSCALL-as-unrecovarable.patch deleted file mode 100644 index 93b51dc4..00000000 --- a/net/haproxy/patches/0001-BUG-MEDIUM-ssl-Dont-always-treat-SSL_ERROR_SYSCALL-as-unrecovarable.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 2fcd544272a5498ffa49544e9f06b51bc93e55d1 Mon Sep 17 00:00:00 2001 -From: Olivier Houchard -Date: Tue, 13 Feb 2018 15:17:23 +0100 -Subject: [PATCH] BUG/MEDIUM: ssl: Don't always treat SSL_ERROR_SYSCALL as - unrecovarable. - -Bart Geesink reported some random errors appearing under the form of -termination flags SD in the logs for connections involving SSL traffic -to reach the servers. - -Tomek Gacek and Mateusz Malek finally narrowed down the problem to commit -c2aae74 ("MEDIUM: ssl: Handle early data with OpenSSL 1.1.1"). It happens -that the special case of SSL_ERROR_SYSCALL isn't handled anymore since -this commit. - -SSL_read() might return <= 0, and SSL_get_erro() return SSL_ERROR_SYSCALL, -without meaning the connection is gone. Before flagging the connection -as in error, check the errno value. - -This should be backported to 1.8. - -(cherry picked from commit 7e2e505006feb8f3b4a7f9e0ac5e89b5a8c4895e) -Signed-off-by: Willy Tarreau ---- - src/ssl_sock.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/ssl_sock.c b/src/ssl_sock.c -index aecf3dd..f118724 100644 ---- a/src/ssl_sock.c -+++ b/src/ssl_sock.c -@@ -5437,6 +5437,12 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun - break; - } else if (ret == SSL_ERROR_ZERO_RETURN) - goto read0; -+ /* For SSL_ERROR_SYSCALL, make sure the error is -+ * unrecoverable before flagging the connection as -+ * in error. -+ */ -+ if (ret == SSL_ERROR_SYSCALL && (!errno || errno == EAGAIN)) -+ goto clear_ssl_error; - /* otherwise it's a real error */ - goto out_error; - } -@@ -5451,11 +5457,12 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun - conn_sock_read0(conn); - goto leave; - out_error: -+ conn->flags |= CO_FL_ERROR; -+clear_ssl_error: - /* Clear openssl global errors stack */ - ssl_sock_dump_errors(conn); - ERR_clear_error(); - -- conn->flags |= CO_FL_ERROR; - goto leave; - } - --- -1.7.10.4 - diff --git a/net/haproxy/patches/0002-BUG-MEDIUM-ssl-Shutdown-the-connection-for-reading-on-SSL_ERROR_SYSCALL.patch b/net/haproxy/patches/0002-BUG-MEDIUM-ssl-Shutdown-the-connection-for-reading-on-SSL_ERROR_SYSCALL.patch deleted file mode 100644 index 22274d36..00000000 --- a/net/haproxy/patches/0002-BUG-MEDIUM-ssl-Shutdown-the-connection-for-reading-on-SSL_ERROR_SYSCALL.patch +++ /dev/null @@ -1,63 +0,0 @@ -From f7fa1d461aa71bbc8a6c23fdcfc305f2e52ce5dd Mon Sep 17 00:00:00 2001 -From: Christopher Faulet -Date: Mon, 19 Feb 2018 14:25:15 +0100 -Subject: [PATCH] BUG/MEDIUM: ssl: Shutdown the connection for reading on - SSL_ERROR_SYSCALL - -When SSL_read returns SSL_ERROR_SYSCALL and errno is unset or set to EAGAIN, the -connection must be shut down for reading. Else, the connection loops infinitly, -consuming all the CPU. - -The bug was introduced in the commit 7e2e50500 ("BUG/MEDIUM: ssl: Don't always -treat SSL_ERROR_SYSCALL as unrecovarable."). This patch must be backported in -1.8 too. - -(cherry picked from commit 4ac77a98cda3d0f9b1d9de7bbbda2c91357f0767) -Signed-off-by: Willy Tarreau ---- - src/ssl_sock.c | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/src/ssl_sock.c b/src/ssl_sock.c -index f118724..a065bbb 100644 ---- a/src/ssl_sock.c -+++ b/src/ssl_sock.c -@@ -5437,10 +5437,9 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun - break; - } else if (ret == SSL_ERROR_ZERO_RETURN) - goto read0; -- /* For SSL_ERROR_SYSCALL, make sure the error is -- * unrecoverable before flagging the connection as -- * in error. -- */ -+ /* For SSL_ERROR_SYSCALL, make sure to clear the error -+ * stack before shutting down the connection for -+ * reading. */ - if (ret == SSL_ERROR_SYSCALL && (!errno || errno == EAGAIN)) - goto clear_ssl_error; - /* otherwise it's a real error */ -@@ -5453,16 +5452,19 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun - conn_cond_update_sock_polling(conn); - return done; - -+ clear_ssl_error: -+ /* Clear openssl global errors stack */ -+ ssl_sock_dump_errors(conn); -+ ERR_clear_error(); - read0: - conn_sock_read0(conn); - goto leave; -+ - out_error: - conn->flags |= CO_FL_ERROR; --clear_ssl_error: - /* Clear openssl global errors stack */ - ssl_sock_dump_errors(conn); - ERR_clear_error(); -- - goto leave; - } - --- -1.7.10.4 - diff --git a/net/haproxy/patches/0003-BUG-MEDIUM-http-Switch-the-HTTP-response-in-tunnel-mode-as-earlier-as-possible.patch b/net/haproxy/patches/0003-BUG-MEDIUM-http-Switch-the-HTTP-response-in-tunnel-mode-as-earlier-as-possible.patch deleted file mode 100644 index 446a6107..00000000 --- a/net/haproxy/patches/0003-BUG-MEDIUM-http-Switch-the-HTTP-response-in-tunnel-mode-as-earlier-as-possible.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 8a5949f2d74c3a3a6c6da25449992c312b183ef3 Mon Sep 17 00:00:00 2001 -From: Christopher Faulet -Date: Fri, 2 Feb 2018 15:54:15 +0100 -Subject: [PATCH] BUG/MEDIUM: http: Switch the HTTP response in tunnel mode as - earlier as possible - -When the body length is undefined (no Content-Length or Transfer-Encoding -headers), The reponse remains in ending mode, waiting the request is done. So, -most of time this is not a problem because the resquest is done before the -response. But when a client sends data to a server that replies without waiting -all the data, it is really not desirable to wait the end of the request to -finish the response. - -This bug was introduced when the tunneling of the request and the reponse was -refactored, in commit 4be980391 ("MINOR: http: Switch requests/responses in -TUNNEL mode only by checking txn flag"). - -This patch should be backported in 1.8 and 1.7. - -(cherry picked from commit fd04fcf5edb0a24cd29ce8f4d4dc2aa3a0e2e82c) -Signed-off-by: Willy Tarreau ---- - src/proto_http.c | 15 +++++---------- - 1 file changed, 5 insertions(+), 10 deletions(-) - -diff --git a/src/proto_http.c b/src/proto_http.c -index 64bd410..29880ea 100644 ---- a/src/proto_http.c -+++ b/src/proto_http.c -@@ -4634,16 +4634,8 @@ int http_sync_res_state(struct stream *s) - * let's enforce it now that we're not expecting any new - * data to come. The caller knows the stream is complete - * once both states are CLOSED. -- * -- * However, there is an exception if the response length -- * is undefined. In this case, we switch in TUNNEL mode. - */ -- if (!(txn->rsp.flags & HTTP_MSGF_XFER_LEN)) { -- channel_auto_read(chn); -- txn->rsp.msg_state = HTTP_MSG_TUNNEL; -- chn->flags |= CF_NEVER_WAIT; -- } -- else if (!(chn->flags & (CF_SHUTW|CF_SHUTW_NOW))) { -+ if (!(chn->flags & (CF_SHUTW|CF_SHUTW_NOW))) { - channel_shutr_now(chn); - channel_shutw_now(chn); - } -@@ -6241,6 +6233,8 @@ http_msg_forward_body(struct stream *s, struct http_msg *msg) - /* The server still sending data that should be filtered */ - if (!(chn->flags & CF_SHUTR) && HAS_DATA_FILTERS(s, chn)) - goto missing_data_or_waiting; -+ msg->msg_state = HTTP_MSG_TUNNEL; -+ goto ending; - } - - msg->msg_state = HTTP_MSG_ENDING; -@@ -6262,7 +6256,8 @@ http_msg_forward_body(struct stream *s, struct http_msg *msg) - /* default_ret */ 1, - /* on_error */ goto error, - /* on_wait */ goto waiting); -- msg->msg_state = HTTP_MSG_DONE; -+ if (msg->msg_state == HTTP_MSG_ENDING) -+ msg->msg_state = HTTP_MSG_DONE; - return 1; - - missing_data_or_waiting: --- -1.7.10.4 - diff --git a/net/haproxy/patches/0004-BUG-MEDIUM-ssl-sample-ssl_bc_-fetch-keywords-are-broken.patch b/net/haproxy/patches/0004-BUG-MEDIUM-ssl-sample-ssl_bc_-fetch-keywords-are-broken.patch deleted file mode 100644 index 11d2ef9c..00000000 --- a/net/haproxy/patches/0004-BUG-MEDIUM-ssl-sample-ssl_bc_-fetch-keywords-are-broken.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 7ccf7c9791f2b2329f3940d1347618af3a77bebc Mon Sep 17 00:00:00 2001 -From: Emeric Brun -Date: Mon, 19 Feb 2018 15:59:48 +0100 -Subject: [PATCH] BUG/MEDIUM: ssl/sample: ssl_bc_* fetch keywords are broken. - -Since the split between connections and conn-stream objects, this -keywords are broken. - -This patch must be backported in 1.8 - -(cherry picked from commit eb8def9f34c37537d56a69fcd211d4c4c8006bea) -Signed-off-by: Willy Tarreau ---- - src/ssl_sock.c | 31 ++++++++++++++----------------- - 1 file changed, 14 insertions(+), 17 deletions(-) - -diff --git a/src/ssl_sock.c b/src/ssl_sock.c -index 4d0d5db..d832d76 100644 ---- a/src/ssl_sock.c -+++ b/src/ssl_sock.c -@@ -6580,8 +6580,8 @@ smp_fetch_ssl_x_key_alg(const struct arg *args, struct sample *smp, const char * - static int - smp_fetch_ssl_fc(const struct arg *args, struct sample *smp, const char *kw, void *private) - { -- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin : -- smp->strm ? smp->strm->si[1].end : NULL); -+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) : -+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL; - - smp->data.type = SMP_T_BOOL; - smp->data.u.sint = (conn && conn->xprt == &ssl_sock); -@@ -6625,8 +6625,8 @@ smp_fetch_ssl_fc_is_resumed(const struct arg *args, struct sample *smp, const ch - static int - smp_fetch_ssl_fc_cipher(const struct arg *args, struct sample *smp, const char *kw, void *private) - { -- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin : -- smp->strm ? smp->strm->si[1].end : NULL); -+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) : -+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL; - - smp->flags = 0; - if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock) -@@ -6651,9 +6651,8 @@ smp_fetch_ssl_fc_cipher(const struct arg *args, struct sample *smp, const char * - static int - smp_fetch_ssl_fc_alg_keysize(const struct arg *args, struct sample *smp, const char *kw, void *private) - { -- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin : -- smp->strm ? smp->strm->si[1].end : NULL); -- -+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) : -+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL; - int sint; - - smp->flags = 0; -@@ -6676,8 +6675,8 @@ smp_fetch_ssl_fc_alg_keysize(const struct arg *args, struct sample *smp, const c - static int - smp_fetch_ssl_fc_use_keysize(const struct arg *args, struct sample *smp, const char *kw, void *private) - { -- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin : -- smp->strm ? smp->strm->si[1].end : NULL); -+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) : -+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL; - - smp->flags = 0; - if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock) -@@ -6747,8 +6746,8 @@ smp_fetch_ssl_fc_alpn(const struct arg *args, struct sample *smp, const char *kw - static int - smp_fetch_ssl_fc_protocol(const struct arg *args, struct sample *smp, const char *kw, void *private) - { -- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin : -- smp->strm ? smp->strm->si[1].end : NULL); -+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) : -+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL; - - smp->flags = 0; - if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock) -@@ -6773,9 +6772,8 @@ static int - smp_fetch_ssl_fc_session_id(const struct arg *args, struct sample *smp, const char *kw, void *private) - { - #if OPENSSL_VERSION_NUMBER > 0x0090800fL -- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin : -- smp->strm ? smp->strm->si[1].end : NULL); -- -+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) : -+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL; - SSL_SESSION *ssl_sess; - - smp->flags = SMP_F_CONST; -@@ -6917,9 +6915,8 @@ static int - smp_fetch_ssl_fc_unique_id(const struct arg *args, struct sample *smp, const char *kw, void *private) - { - #if OPENSSL_VERSION_NUMBER > 0x0090800fL -- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin : -- smp->strm ? smp->strm->si[1].end : NULL); -- -+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) : -+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL; - int finished_len; - struct chunk *finished_trash; - --- -1.7.10.4 - diff --git a/net/hcxdumptool/Makefile b/net/hcxdumptool/Makefile new file mode 100644 index 00000000..0f2cddf5 --- /dev/null +++ b/net/hcxdumptool/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2019 Andreas Nilsen +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hcxdumptool +PKG_VERSION:=6.0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/zerbea/hcxdumptool/tar.gz/$(PKG_VERSION)? +PKG_HASH:=32bc07b692f5682792dcfd1d5dcae749e5fed4a65a2a05d815ed59adc9b64b02 + +PKG_MAINTAINER:=Andreas Nilsen +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=license.txt + +include $(INCLUDE_DIR)/package.mk + +define Package/hcxdumptool + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libopenssl + TITLE:=hcxdumptool + URL:=https://github.com/ZerBea/hcxdumptool + SUBMENU:=Wireless +endef + +define Package/hcxdumptool/description + Small tool to capture packets from wlan devices. After capturing, upload + the "uncleaned" cap here (https://wpa-sec.stanev.org/?submit) + to see if your ap or the client is vulnerable by using common wordlists. + Convert the cap to hccapx and/or to WPA-PMKID-PBKDF2 hashline (16800) with hcxpcaptool (hcxtools) + and check if wlan-key or plainmasterkey was transmitted unencrypted. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" +endef + +define Package/hcxdumptool/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxdumptool $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,hcxdumptool)) diff --git a/net/hcxtools/Makefile b/net/hcxtools/Makefile new file mode 100644 index 00000000..143bc447 --- /dev/null +++ b/net/hcxtools/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2019 Andreas Nilsen +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hcxtools +PKG_VERSION:=5.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/zerbea/hcxtools/tar.gz/$(PKG_VERSION)? +PKG_HASH:=bc3465eb3b97c4db849af41ae3fa7c812d4683eb9e493f090ac82e922ba8a36d + +PKG_MAINTAINER:=Andreas Nilsen +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=license.txt + +include $(INCLUDE_DIR)/package.mk + +define Package/hcxtools + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread +libpcap +zlib +libcurl +libopenssl + TITLE:=hcxtools + URL:=https://github.com/ZerBea/hcxtools + SUBMENU:=Wireless +endef + +define Package/hcxtools/description + Set of tools convert packets from captures (h = hash, c = capture, convert and calculate candidates, x = different hashtypes) + for the use with latest hashcat or John the Ripper. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" +endef + +define Package/hcxtools-custom/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxpcapngtool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxhashtool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxpsktool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxwltool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlancap2wpasec $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/whoismac $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxpmkidtool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcx2john $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxpcaptool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxhashcattool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxmactool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxessidtool $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hcxhash2cap $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhc2hcx $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanwkp2hcx $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcxinfo $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcx2ssid $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanhcxcat $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanpmk2hcx $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlanjohn2hcx $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlancow2hcxpmk $(1)/sbin/ +endef + +$(eval $(call BuildPackage,hcxtools)) diff --git a/net/horst/Makefile b/net/horst/Makefile index 6805199e..a9dfc17a 100644 --- a/net/horst/Makefile +++ b/net/horst/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=horst PKG_VERSION:=5.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/br101/horst/archive/v$(PKG_VERSION)/ PKG_HASH:=74b4cb1143d93c73c3b4bbbe0c36f89a790401bde9e894e94e2a27339ca384d9 PKG_MAINTAINER:=Bruno Randolf -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=LICENSE PKG_BUILD_PARALLEL:=1 @@ -28,7 +28,7 @@ MAKE_FLAGS += DEBUG=1 LIBNL=tiny define Package/horst SECTION:=net CATEGORY:=Network - SUBMENU:=wireless + SUBMENU:=Wireless DEPENDS:=+libncurses +libnl-tiny MAINTAINER:=Bruno Randolf TITLE:=Highly Optimized 802.11 Radio Scanning Tool diff --git a/net/htpdate/Makefile b/net/htpdate/Makefile index 2650597e..fa238a5c 100644 --- a/net/htpdate/Makefile +++ b/net/htpdate/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=htpdate PKG_VERSION:=1.1.1 -PKG_RELEASE:=2 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.vervest.org/htp/archive/c/ PKG_HASH:=0d75f91cb61f8869c8298d198fa52b9a139ae505b366e9d4d331af8bc1c04880 -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:= include $(INCLUDE_DIR)/package.mk diff --git a/net/htpdate/files/htpdate.init b/net/htpdate/files/htpdate.init index 88176c84..2edd44d2 100644 --- a/net/htpdate/files/htpdate.init +++ b/net/htpdate/files/htpdate.init @@ -9,7 +9,7 @@ PROG=/usr/sbin/htpdate validate_htpdate_section() { - uci_validate_section htpdate htpdate "${1}" \ + uci_load_validate htpdate htpdate "$1" "$2" \ 'server:list(host)' \ 'proxy_host:host' \ 'proxy_port:port:8080' \ @@ -20,10 +20,10 @@ validate_htpdate_section() { } -start_service() { - local server proxy debug sanity_check option enabled +start_htpdate_instance() { + local peer - validate_htpdate_section htpdate || { + [ "$2" = 0 ] || { echo "validation failed" return 1 } @@ -34,7 +34,7 @@ start_service() { procd_open_instance procd_set_param command "$PROG" -f - [ -n "$proxy" ] && procd_append_param command -P $proxy:$proxy_port + [ -n "$proxy_host" ] && procd_append_param command -P $proxy_host:$proxy_port [ "$debug" = "1" ] && procd_append_param command -d [ "$sanity_check" = "0" ] && procd_append_param command -t [ -n "$option" ] && procd_append_param command $option @@ -48,6 +48,10 @@ start_service() { procd_close_instance } +start_service() { + validate_htpdate_section htpdate start_htpdate_instance +} + service_triggers() { procd_add_reload_trigger "htpdate" procd_add_validation validate_htpdate_section diff --git a/net/httping/Makefile b/net/httping/Makefile index 7de0b728..b4ed1daf 100644 --- a/net/httping/Makefile +++ b/net/httping/Makefile @@ -15,7 +15,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=http://www.vanheusden.com/httping PKG_HASH:=3e895a0a6d7bd79de25a255a1376d4da88eb09c34efdd0476ab5a907e75bfaf8 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/net/https-dns-proxy/Makefile b/net/https-dns-proxy/Makefile index 3a8e7540..bb820b78 100644 --- a/net/https-dns-proxy/Makefile +++ b/net/https-dns-proxy/Makefile @@ -1,33 +1,45 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=https_dns_proxy -PKG_VERSION:=2018-04-23 -PKG_RELEASE=1 +PKG_NAME:=https-dns-proxy +PKG_VERSION:=2020-04-09 +PKG_RELEASE=3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=24b7e4238c37e646f33eee3a374f6b7beb5c167b9c5008cc13b51e5f1f3a44ea -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/ PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=bea68401330e611f6e9b75cec84e2dc4e81e52de -PKG_MAINTAINER:=Aaron Drew +PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy +PKG_SOURCE_DATE:=2020-04-09 +PKG_SOURCE_VERSION:=40647ce94c62a47e9d53efae8018fb3142e277b9 +PKG_MIRROR_HASH:=4a8052b8bd482a17b769bcd4ee2620368f8c91955c5e976088be8d2ab002dde6 +PKG_MAINTAINER:=Stan Grishin PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -define Package/https_dns_proxy - SECTION:=net - CATEGORY:=Network - TITLE:=DNS over HTTPS proxy server - DEPENDS:=+libcares +libcurl +libev +ca-bundle +CMAKE_OPTIONS += -DCLANG_TIDY_EXE= + +define Package/https-dns-proxy + SECTION:=net + CATEGORY:=Network + TITLE:=DNS Over HTTPS Proxy + DEPENDS:=+libcares +libcurl +libev +ca-bundle + CONFLICTS:=https_dns_proxy endef -define Package/https_dns_proxy/install +define Package/https-dns-proxy/description +https_dns_proxy is a light-weight DNS<-->HTTPS, non-caching translation proxy for the RFC 8484 DNS-over-HTTPS standard. It receives regular (UDP) DNS requests and issues them via DoH. +Please see https://github.com/openwrt/packages/blob/master/net/https-dns-proxy/files/README.md for further information. +endef + +define Package/https-dns-proxy/conffiles +/etc/config/https-dns-proxy +endef + +define Package/https-dns-proxy/install $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d ${1}/etc/config - $(INSTALL_BIN) $(PKG_BUILD_DIR)/https_dns_proxy $(1)/usr/sbin/ - $(INSTALL_BIN) ./files/https_dns_proxy.init $(1)/etc/init.d/https_dns_proxy - $(INSTALL_CONF) ./files/https_dns_proxy.config $(1)/etc/config/https_dns_proxy + $(INSTALL_BIN) $(PKG_BUILD_DIR)/https_dns_proxy $(1)/usr/sbin/https-dns-proxy + $(INSTALL_BIN) ./files/https-dns-proxy.init $(1)/etc/init.d/https-dns-proxy + $(INSTALL_CONF) ./files/https-dns-proxy.config $(1)/etc/config/https-dns-proxy endef -$(eval $(call BuildPackage,https_dns_proxy)) +$(eval $(call BuildPackage,https-dns-proxy)) diff --git a/net/https-dns-proxy/files/README.md b/net/https-dns-proxy/files/README.md new file mode 100644 index 00000000..f2435490 --- /dev/null +++ b/net/https-dns-proxy/files/README.md @@ -0,0 +1,94 @@ +# DNS Over HTTPS Proxy (https-dns-proxy) + +A lean RFC8484-compatible (no JSON API support) DNS-over-HTTPS (DoH) proxy service which supports DoH servers ran by AdGuard, CleanBrowsing, Cloudflare, Google, ODVR (nic.cz) and Quad9. Based on [@aarond10](https://github.com/aarond10)'s [https-dns-proxy](https://github.com/aarond10/https_dns_proxy). + +## Features + +- [RFC8484](https://tools.ietf.org/html/rfc8484)-compatible DoH Proxy. +- Compact size. +- Web UI (```luci-app-https-dns-proxy```) available. +- (By default) automatically updates DNSMASQ settings to use DoH proxy when it's started and reverts to old DNSMASQ resolvers when DoH proxy is stopped. + +## Screenshots (luci-app-https-dns-proxy) + +![screenshot](https://cdn.jsdelivr.net/gh/stangri/openwrt_packages@master/screenshots/https-dns-proxy/screenshot01.png "https-dns-proxy screenshot") + +## Requirements + +This proxy requires the following packages to be installed on your router: ```libc```, ```libcares```, ```libcurl```, ```libev```, ```ca-bundle```. They will be automatically installed when you're installing ```https-dns-proxy```. + +## Unmet Dependencies + +If you are running a development (trunk/snapshot) build of OpenWrt/LEDE Project on your router and your build is outdated (meaning that packages of the same revision/commit hash are no longer available and when you try to satisfy the [requirements](#requirements) you get errors), please flash either current LEDE release image or current development/snapshot image. + +## How To Install + +Install ```https-dns-proxy``` and ```luci-app-https-dns-proxy``` packages from Web UI or run the following in the command line: + +```sh +opkg update; opkg install https-dns-proxy luci-app-https-dns-proxy; +``` + +## Default Settings + +Default configuration has service enabled and starts the service with Google and Cloudflare DoH servers. In most configurations, you will keep the default ```DNSMASQ``` service installed to handle requests from devices in your local network and point ```DNSMASQ``` to use ```https-dns-proxy``` for name resolution. + +By default, the service will intelligently override existing ```DNSMASQ``` servers settings on start to use the DoH servers and restores original ```DNSMASQ``` servers on stop. See the [Configuration Settings](#configuration-settings) section below for more information and how to disable this behavior. + +## Configuration Settings + +Configuration contains the (named) "main" config section where you can configure which ```DNSMASQ``` settings the service will automatically affect and the typed (unnamed) https-dns-proxy instance settings. The original config file is included below: + +```text +config main 'config' + option update_dnsmasq_config '*' + +config https-dns-proxy + option bootstrap_dns '8.8.8.8,8.8.4.4' + option resolver_url 'https://dns.google/dns-query' + option listen_addr '127.0.0.1' + option listen_port '5053' + option user 'nobody' + option group 'nogroup' + +config https-dns-proxy + option bootstrap_dns '1.1.1.1,1.0.0.1' + option resolver_url 'https://cloudflare-dns.com/dns-query' + option listen_addr '127.0.0.1' + option listen_port '5054' + option user 'nobody' + option group 'nogroup' +``` + +The ```update_dnsmasq_config``` option can be set to dash (set to ```'-'``` to not change ```DNSMASQ``` server settings on start/stop), can be set to ```'*'``` to affect all ```DNSMASQ``` instance server settings or have a space-separated list of ```DNSMASQ``` instances to affect (like ```'0 4 5'```). If this option is omitted, the default setting is ```'*'```. + +Starting with ```https-dns-proxy``` version ```2019-12-03-3``` and higher, when the service is set to update the DNSMASQ servers setting on start/stop, it does not override entries which contain either ```#``` or ```/```, so the entries like listed below will be kept in use: + +```test + list server '/onion/127.0.0.1#65453' + list server '/openwrt.org/8.8.8.8' + list server '/pool.ntp.org/8.8.8.8' + list server '127.0.0.1#15353' + list server '127.0.0.1#55353' + list server '127.0.0.1#65353' +``` + +The https-dns-proxy instance settings are: + +|Parameter|Type|Default|Description| +| --- | --- | --- | --- | +|bootstrap_dns|IP Address||The non-encrypted DNS servers to be used to resolve the DoH server name on start.| +|listen_addr|IP Address|127.0.0.1|The local IP address to listen to requests.| +|listen_port|port|5053 and up|If this setting is omitted, the service will start the first https-dns-proxy instance on port 5053, second on 5054 and so on.| +|logfile|Full filepath||Full filepath to the file to log the instance events to.| +|resolver_url|URL||The https URL to the RFC8484-compatible resolver.| +|proxy_server|URL||Local proxy server to use when accessing resolvers.| +|user|String|nobody|Local user to run instance under.| +|group|String|nogroup|Local group to run instance under.| +|use_http1|Boolean|0|If set to 1, use HTTP/1 on installations with broken/outdated ```curl``` package. Included for posterity reasons, you will most likely not ever need it on OpenWrt.| +|verbosity|Integer|0|logging verbosity level. fatal = 0, error = 1, warning = 2, info = 3, debug = 4| +|use_ipv6_resolvers_only|Boolean|0|If set to 1, Forces IPv6 DNS resolvers instead of IPv4| + +## Thanks + +This OpenWrt package wouldn't have been possible without [@aarond10](https://github.com/aarond10)'s [https-dns-proxy](https://github.com/aarond10/https_dns_proxy) and his active participation in the OpenWrt package itself. Special thanks to [@jow-](https://github.com/jow-) for general package/luci guidance. diff --git a/net/https-dns-proxy/files/https-dns-proxy.config b/net/https-dns-proxy/files/https-dns-proxy.config new file mode 100644 index 00000000..3c5eecf4 --- /dev/null +++ b/net/https-dns-proxy/files/https-dns-proxy.config @@ -0,0 +1,18 @@ +config main 'config' + option update_dnsmasq_config '*' + +config https-dns-proxy + option bootstrap_dns '8.8.8.8,8.8.4.4' + option resolver_url 'https://dns.google/dns-query' + option listen_addr '127.0.0.1' + option listen_port '5053' + option user 'nobody' + option group 'nogroup' + +config https-dns-proxy + option bootstrap_dns '1.1.1.1,1.0.0.1' + option resolver_url 'https://cloudflare-dns.com/dns-query' + option listen_addr '127.0.0.1' + option listen_port '5054' + option user 'nobody' + option group 'nogroup' diff --git a/net/https-dns-proxy/files/https-dns-proxy.init b/net/https-dns-proxy/files/https-dns-proxy.init new file mode 100755 index 00000000..1614d909 --- /dev/null +++ b/net/https-dns-proxy/files/https-dns-proxy.init @@ -0,0 +1,184 @@ +#!/bin/sh /etc/rc.common +# Copyright 2019 Stan Grishin (stangri@melmac.net) +# shellcheck disable=SC2039 + +export START=80 +export USE_PROCD=1 + +dnsmasqConfig='' + +PROG=/usr/sbin/https-dns-proxy + +xappend() { param="$param $1"; } + +append_bool() { + local section="$1" + local option="$2" + local value="$3" + local default="$4" + local _loctmp + [ -z "$default" ] && default="0" + config_get_bool _loctmp "$section" "$option" "$default" + [ "$_loctmp" != "0" ] && xappend "$value" +} + +append_parm() { + local section="$1" + local option="$2" + local switch="$3" + local default="$4" + local _loctmp + config_get _loctmp "$section" "$option" "$default" + [ -z "$_loctmp" ] && return 0 + xappend "$switch $_loctmp" +} + +start_instance() { + local cfg="$1" param listen_addr listen_port i + + append_parm "$cfg" 'listen_addr' '-a' '127.0.0.1' + append_parm "$cfg" 'listen_port' '-p' "$p" + append_parm "$cfg" 'bootstrap_dns' '-b' + append_parm "$cfg" 'resolver_url' '-r' + append_parm "$cfg" 'user' '-u' 'nobody' + append_parm "$cfg" 'group' '-g' 'nogroup' + append_parm "$cfg" 'proxy_server' '-t' + append_parm "$cfg" 'logfile' '-l' + append_bool "$cfg" 'use_http1' '-x' + config_get_bool ipv6_resolvers_only "$cfg" 'use_ipv6_resolvers_only' '0' + config_get verbosity "$cfg" 'verbosity' "0" + +# shellcheck disable=SC2086,SC2154 + for i in $(seq 1 $verbosity); do + xappend "-v" + done +# shellcheck disable=SC2154 + if [ "$ipv6_resolvers_only" = 0 ]; then + xappend "-4" + fi + + procd_open_instance +# shellcheck disable=SC2086 + procd_set_param command ${PROG} ${param} + procd_set_param stderr 1 + procd_set_param stdout 1 + procd_set_param respawn + procd_close_instance + + config_get listen_addr "$cfg" 'listen_addr' '127.0.0.1' + config_get listen_port "$cfg" 'listen_port' "$p" + + if [ "$dnsmasqConfig" = "*" ]; then + config_load 'dhcp' + config_foreach dnsmasq_add_doh_server 'dnsmasq' "${listen_addr}" "${listen_port}" + elif [ -n "$dnsmasqConfig" ]; then + for i in $dnsmasqConfig; do + dnsmasq_add_doh_server "@dnsmasq[${i}]" "${listen_addr}" "${listen_port}" + done + fi + p="$((p+1))" +} + +service_triggers() { + procd_add_reload_trigger 'https-dns-proxy' +} + +start_service() { + local p=5053 + config_load 'https-dns-proxy' + config_get dnsmasqConfig 'config' 'update_dnsmasq_config' '*' + dhcp_backup 'create' + config_load 'https-dns-proxy' + config_foreach start_instance 'https-dns-proxy' + if [ -n "$(uci -q changes dhcp)" ]; then + uci -q commit dhcp + [ -x /etc/init.d/dnsmasq ] && /etc/init.d/dnsmasq restart >/dev/null 2>&1 + fi +} + +stop_service() { + config_load 'https-dns-proxy' + config_get dnsmasqConfig 'config' 'update_dnsmasq_config' '*' + dhcp_backup 'restore' + if [ -n "$(uci -q changes dhcp)" ]; then + uci -q commit dhcp + [ -x /etc/init.d/dnsmasq ] && /etc/init.d/dnsmasq restart >/dev/null 2>&1 + fi +} + +service_triggers() { + procd_add_reload_trigger 'https-dns-proxy' +} + +dnsmasq_add_doh_server() { + local cfg="$1" address="$2" port="$3" + case $address in + 0.0.0.0|::ffff:0.0.0.0) address='127.0.0.1';; + ::) address='::1';; + esac + uci -q del_list "dhcp.${cfg}.server=${address}#${port}" + uci -q add_list "dhcp.${cfg}.server=${address}#${port}" +} + +dnsmasq_create_server_backup() { + local cfg="$1" + local i + uci -q get "dhcp.${cfg}" >/dev/null || return 0 + if ! uci -q get "dhcp.${cfg}.doh_backup_noresolv" >/dev/null; then + if [ -z "$(uci -q get "dhcp.${cfg}.noresolv")" ]; then + uci -q set "dhcp.${cfg}.noresolv=1" + uci -q set "dhcp.${cfg}.doh_backup_noresolv=-1" + elif [ "$(uci -q get "dhcp.${cfg}.noresolv")" != "1" ]; then + uci -q set "dhcp.${cfg}.noresolv=1" + uci -q set "dhcp.${cfg}.doh_backup_noresolv=0" + fi + fi + if ! uci -q get "dhcp.${cfg}.doh_backup_server" >/dev/null; then + for i in $(uci -q get "dhcp.${cfg}.server"); do + uci -q add_list "dhcp.${cfg}.doh_backup_server=$i" + if [ "$i" = "${i//127.0.0.1}" ] && [ "$i" = "$(echo "$i" | tr -d /)" ]; then + uci -q del_list "dhcp.${cfg}.server=$i" + fi + done + fi +} + +dnsmasq_restore_server_backup() { + local cfg="$1" + local i + uci -q get "dhcp.${cfg}" >/dev/null || return 0 + if uci -q get "dhcp.${cfg}.doh_backup_noresolv" >/dev/null; then + if [ "$(uci -q get "dhcp.${cfg}.doh_backup_noresolv")" = "0" ]; then + uci -q set "dhcp.${cfg}.noresolv=0" + else + uci -q del "dhcp.${cfg}.noresolv" + fi + uci -q del "dhcp.${cfg}.doh_backup_noresolv" + fi + if uci -q get "dhcp.${cfg}.doh_backup_server" >/dev/null; then + uci -q del "dhcp.${cfg}.server" + for i in $(uci -q get "dhcp.${cfg}.doh_backup_server"); do + uci -q add_list "dhcp.${cfg}.server=$i" + done + uci -q del "dhcp.${cfg}.doh_backup_server" + fi +} + +dhcp_backup() { + local i + config_load 'dhcp' + case "$1" in + create) + if [ "$dnsmasqConfig" = "*" ]; then + config_foreach dnsmasq_create_server_backup 'dnsmasq' + elif [ -n "$dnsmasqConfig" ]; then + for i in $dnsmasqConfig; do + dnsmasq_create_server_backup "@dnsmasq[${i}]" + done + fi + ;; + restore) + config_foreach dnsmasq_restore_server_backup 'dnsmasq' + ;; + esac +} diff --git a/net/https-dns-proxy/files/https_dns_proxy.config b/net/https-dns-proxy/files/https_dns_proxy.config deleted file mode 100644 index b124aeb9..00000000 --- a/net/https-dns-proxy/files/https_dns_proxy.config +++ /dev/null @@ -1,8 +0,0 @@ -config https_dns_proxy - option listen_addr '127.0.0.1' - option listen_port '5053' - option user 'nobody' - option group 'nogroup' - option subnet_addr '' - option proxy_server '' - option url_prefix 'https://dns.google.com/resolve?' diff --git a/net/https-dns-proxy/files/https_dns_proxy.init b/net/https-dns-proxy/files/https_dns_proxy.init deleted file mode 100644 index 9a5f7979..00000000 --- a/net/https-dns-proxy/files/https_dns_proxy.init +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=80 - -USE_PROCD=1 -PROG=/usr/sbin/https_dns_proxy - -start_instance() { - local cfg="$1" - local listen_addr listen_port user group - - config_get listen_addr "$cfg" listen_addr - config_get listen_port "$cfg" listen_port - config_get user "$cfg" user - config_get group "$cfg" group - config_get subnet_addr "$cfg" subnet_addr - config_get proxy_server "$cfg" proxy_server - config_get url_prefix "$cfg" url_prefix - - if [ -n "$subnet_addr" ]; then - subnet_param="-e $subnet_addr" - fi - - if [ -n "$proxy_server" ]; then - proxy_param="-t $proxy_server" - fi - - if [ -z "$url_prefix" ]; then - url_prefix="https://dns.google.com/resolve?" - fi - - procd_open_instance - procd_set_param command ${PROG} \ - -a "$listen_addr" -p "$listen_port" \ - -u "$user" -g "$group" $subnet_param $proxy_param \ - -r "$url_prefix" - procd_set_param respawn - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "https_dns_proxy" -} - -start_service() { - config_load 'https_dns_proxy' - config_foreach start_instance 'https_dns_proxy' -} diff --git a/net/i2pd/Makefile b/net/i2pd/Makefile index 14672c37..60164009 100644 --- a/net/i2pd/Makefile +++ b/net/i2pd/Makefile @@ -9,17 +9,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=i2pd -PKG_VERSION:=2.18.0 -PKG_RELEASE:=2 +PKG_VERSION:=2.30.0 +PKG_RELEASE:=1 PKG_BUILD_PARALLEL:=1 -PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=1a04826b54e649ebb341d3feacdd05c0415335679d1aa787a74ea5995d419378 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/PurpleI2P/i2pd.git -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_LICENSE:=BSD-3-clause +PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)? +PKG_HASH:=25915cbd33a9f53c89ddf7fbd68fccc5ffc89ab40d4445ccc813da74fae154f2 + +PKG_MAINTAINER:=David Yang +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk @@ -31,7 +31,6 @@ define Package/i2pd TITLE:=full-featured C++ implementation of I2P client URL:=https://github.com/PurpleI2P/i2pd USERID:=i2pd:i2pd - MAINTAINER:=David Yang endef define Package/i2pd/description @@ -41,9 +40,10 @@ define Package/i2pd/description endef define Package/i2pd/conffiles + /etc/config/i2pd /etc/i2pd/i2pd.conf - /etc/i2pd/subscriptions.txt /etc/i2pd/tunnels.conf + /etc/i2pd/tunnels.d/* endef TARGET_LDFLAGS+=-latomic @@ -54,16 +54,18 @@ define Package/i2pd/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/share/i2pd $(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/i2pd.config $(1)/etc/config/i2pd $(INSTALL_DIR) $(1)/etc/i2pd - $(LN) /usr/share/i2pd/certificates $(1)/etc/i2pd/certificates - $(LN) /var/lib/i2pd/peerProfiles $(1)/etc/i2pd/peerProfiles - $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd + $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd $(SED) ' \ s/127.0.0.1/192.168.1.1/g; \ s/datadir = \/var\/lib/datadir = \/etc/ \ ' $(1)/etc/i2pd/i2pd.conf - $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/subscriptions.txt $(1)/etc/i2pd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd + $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd + $(INSTALL_DIR) $(1)/etc/i2pd/tunnels.d + $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.d/*.conf $(1)/etc/i2pd/tunnels.d + # subscriptions.txt deprecated, see #8088 $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd endef diff --git a/net/i2pd/files/i2pd.config b/net/i2pd/files/i2pd.config new file mode 100644 index 00000000..426ff9d1 --- /dev/null +++ b/net/i2pd/files/i2pd.config @@ -0,0 +1,18 @@ +config i2pd + # Set where i2pd should store its data (netDB, certificates, addresses, + # etc). By default we store it in RAM so no data is written to ROM. + # If you store data permanently, you may want to enable + # 'profiles = true' and 'addressbook = true' in i2pd.conf + #### IMPORTANT! #### + # Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash + # will die. + option data_dir '/var/lib/i2pd' + + # If you don't store i2pd data permanently, you can still choose to + # store only addressbooks. If not, i2pd will be forced to do HTTP + # reseeding on every start. Storing addressbook may be useful + # if HTTP reseeding is not possible or blocked (by censorship). + # Even addressbook doesn't take up too much space, extroot is still + # strongly recommended to avoid flash wear-out. + # Enable 'addressbook = true' in i2pd.conf to make it take effect. + #option addressbook_dir '/etc/i2pd/addressbook' diff --git a/net/i2pd/files/i2pd.init b/net/i2pd/files/i2pd.init index f1c394a0..4c4790fc 100755 --- a/net/i2pd/files/i2pd.init +++ b/net/i2pd/files/i2pd.init @@ -6,34 +6,74 @@ USE_PROCD=1 START=90 STOP=10 +# default params PROG=/usr/sbin/i2pd USER="i2pd" GROUP="i2pd" PIDFILE=/var/run/i2pd.pid -DATADIR=/etc/i2pd -PEERDIR=/var/lib/i2pd/peerProfiles +DATADIR=/var/lib/i2pd +CONFFILE=/etc/i2pd/i2pd.conf + +. /lib/functions.sh -start_service() { - ## RAM - if [ ! -d $PEERDIR ]; then - mkdir -p $PEERDIR - chown $USER:$GROUP $PEERDIR - fi + +i2pd_start() { + local cfg="$1" + local data_dir + local addressbook_dir + + config_get data_dir "$cfg" data_dir "$DATADIR" + config_get addressbook_dir "$cfg" addressbook_dir + + ## Setting up data dir + [ -d "$data_dir" ] || { + mkdir -p "$data_dir" + chown "$USER:$GROUP" "$data_dir" + ln -s /usr/share/i2pd/certificates "$data_dir/certificates" + [ -n "$addressbook_dir" ] && { + [ -d "$addressbook_dir" ] || mkdir -p "$addressbook_dir" + chown "$USER:$GROUP" "$addressbook_dir" + ln -s "$addressbook_dir" "$data_dir/addressbook" + } + } ## We need permissions - chown -R $USER:$GROUP $DATADIR - touch $PIDFILE - chown $USER:adm $PIDFILE + touch "$PIDFILE" + chown "$USER:adm" "$PIDFILE" procd_open_instance - procd_set_param command $PROG --service --conf=/etc/i2pd/i2pd.conf + procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE" ## Don't know about i2pd user's HOME - procd_set_param env HOME=$DATADIR + procd_set_param env "HOME=$DATADIR" + ## For debugging, provide about 512 MB on external storage for coredump and adjust /proc/sys/kernel/core_pattern + # echo "/tmp/coredumps/core.%e.%p.%s.%t" > /proc/sys/kernel/core_pattern + # procd_set_param limits core="unlimited unlimited" procd_set_param limits nofile=4096 procd_set_param stdout 1 procd_set_param stderr 1 - procd_set_param user $USER - procd_set_param pidfile $PIDFILE + procd_set_param user "$USER" + procd_set_param pidfile "$PIDFILE" procd_close_instance } + + +start_service() { + local instance="$1" + local instance_found=0 + + config_cb() { + local type="$1" + local name="$2" + [ "$type" = "i2pd" ] && [ -n "$instance" ] && [ "$instance" = "$name" ] && instance_found=1 + } + + config_load i2pd + + if [ -n "$instance" ]; then + [ "$instance_found" -gt 0 ] || return + i2pd_start "$instance" + else + config_foreach i2pd_start i2pd + fi +} diff --git a/net/i2pd/patches/config.patch b/net/i2pd/patches/config.patch new file mode 100644 index 00000000..5dae88a6 --- /dev/null +++ b/net/i2pd/patches/config.patch @@ -0,0 +1,88 @@ +diff -u -r a/contrib/i2pd.conf b/contrib/i2pd.conf +--- a/contrib/i2pd.conf 2019-09-04 11:00:27.660713504 +0800 ++++ b/contrib/i2pd.conf 2019-09-04 11:07:53.669745273 +0800 +@@ -8,12 +8,12 @@ + + ## Tunnels config file + ## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf +-# tunconf = /var/lib/i2pd/tunnels.conf ++tunconf = /etc/i2pd/tunnels.conf + + ## Tunnels config files path + ## Use that path to store separated tunnels in different config files. + ## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d +-# tunnelsdir = /var/lib/i2pd/tunnels.conf.d ++tunnelsdir = /etc/i2pd/tunnels.conf.d + + ## Where to write pidfile (don't write by default) + # pidfile = /var/run/i2pd.pid +@@ -25,12 +25,12 @@ + ## * stdout - print log entries to stdout + ## * file - log entries to a file + ## * syslog - use syslog, see man 3 syslog +-# log = file ++log = syslog + ## Path to logfile (default - autodetect) + # logfile = /var/log/i2pd.log + ## Log messages above this level (debug, *info, warn, error, none) + ## If you set it to none, logging will be disabled +-# loglevel = info ++loglevel = error + ## Write full CLF-formatted date and time to log (default: write only time) + # logclftime = true + +@@ -61,7 +61,7 @@ + # ifname6 = + + ## Enable NTCP transport (default = true) +-# ntcp = true ++ntcp = false + ## If you run i2pd behind a proxy server, you can only use NTCP transport with ntcpproxy option + ## Should be http://address:port or socks://address:port + # ntcpproxy = http://127.0.0.1:8118 +@@ -81,7 +81,7 @@ + + ## Router will not accept transit tunnels, disabling transit traffic completely + ## (default = false) +-# notransit = true ++notransit = true + + ## Router will be floodfill + # floodfill = true +@@ -91,8 +91,10 @@ + ## Uncomment and set to 'false' to disable Web Console + # enabled = true + ## Address and port service will listen on +-address = 127.0.0.1 ++address = 192.168.1.1 ++# address = :: + port = 7070 ++# strictheaders = false + ## Path to web console, default "/" + # webroot = / + ## Uncomment following lines to enable Web Console authentication +@@ -104,7 +106,7 @@ + ## Uncomment and set to 'false' to disable HTTP Proxy + # enabled = true + ## Address and port service will listen on +-address = 127.0.0.1 ++address = 192.168.1.1 + port = 4444 + ## Optional keys file for proxy local destination + # keys = http-proxy-keys.dat +@@ -118,7 +120,7 @@ + ## Uncomment and set to 'false' to disable SOCKS Proxy + # enabled = true + ## Address and port service will listen on +-address = 127.0.0.1 ++address = 192.168.1.1 + port = 4447 + ## Optional keys file for proxy local destination + # keys = socks-proxy-keys.dat +@@ -228,4 +230,5 @@ + + [persist] + ## Save peer profiles on disk (default: true) +-# profiles = true ++profiles = false ++addressbook = false diff --git a/net/ibrdtn-tools/Makefile b/net/ibrdtn-tools/Makefile index 3ef38813..6112c993 100644 --- a/net/ibrdtn-tools/Makefile +++ b/net/ibrdtn-tools/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ibrdtn-tools PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases @@ -19,6 +19,7 @@ PKG_LICENSE:=Apache-2.0 PKG_INSTALL:=1 +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/ibrdtn-tools diff --git a/net/ibrdtnd/Makefile b/net/ibrdtnd/Makefile index daa4d71c..cfc82d77 100644 --- a/net/ibrdtnd/Makefile +++ b/net/ibrdtnd/Makefile @@ -9,16 +9,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ibrdtnd PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases PKG_HASH:=9bd79636154093ab6bf4fd10d6c62d67c6db45141460847b19def327c93771ed + PKG_MAINTAINER:=Johannes Morgenroth PKG_LICENSE:=Apache-2.0 +PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/ibrdtnd diff --git a/net/ibrdtnd/patches/0001-ibrdtnd-added-openssl-compatibility.patch b/net/ibrdtnd/patches/0001-ibrdtnd-added-openssl-compatibility.patch new file mode 100644 index 00000000..fd07db5f --- /dev/null +++ b/net/ibrdtnd/patches/0001-ibrdtnd-added-openssl-compatibility.patch @@ -0,0 +1,202 @@ +From c794bbd16d2f39c656478608eb1314055e877370 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Sat, 26 May 2018 23:44:54 -0300 +Subject: [PATCH] ibrdtnd: added openssl compatibility + +This patch adds compatibility with openssl 1.1.0 to ibrdtnd. + +Signed-off-by: Eneas U de Queiroz +--- + ibrdtn/daemon/src/security/exchange/DHProtocol.cpp | 36 ++++++++++--- + ibrdtn/daemon/src/security/exchange/Makefile.am | 2 + + .../src/security/exchange/openssl_compat.cpp | 62 ++++++++++++++++++++++ + .../daemon/src/security/exchange/openssl_compat.h | 13 +++++ + 4 files changed, 107 insertions(+), 6 deletions(-) + create mode 100644 ibrdtn/daemon/src/security/exchange/openssl_compat.cpp + create mode 100644 ibrdtn/daemon/src/security/exchange/openssl_compat.h + +diff --git a/src/security/exchange/DHProtocol.cpp b/src/security/exchange/DHProtocol.cpp +index e94c5026..3e0ad717 100644 +--- a/src/security/exchange/DHProtocol.cpp ++++ b/src/security/exchange/DHProtocol.cpp +@@ -30,6 +30,7 @@ + + #include + #include ++#include "openssl_compat.h" + + #define DH_KEY_LENGTH 1024 + +@@ -132,6 +133,7 @@ namespace dtn + + void DHProtocol::begin(KeyExchangeSession &session, KeyExchangeData &data) + { ++ const BIGNUM *pub_key, *p, *g; + // get session state + DHState &state = session.getState(); + +@@ -159,9 +161,12 @@ namespace dtn + // prepare request + KeyExchangeData request(KeyExchangeData::REQUEST, session); + +- write(request, state.dh->pub_key); +- write(request, state.dh->p); +- write(request, state.dh->g); ++ DH_get0_pqg(state.dh, &p, NULL, &g); ++ DH_get0_key(state.dh, &pub_key, NULL); ++ ++ write(request, pub_key); ++ write(request, p); ++ write(request, g); + + manager.submit(session, request); + } +@@ -177,6 +182,15 @@ namespace dtn + { + if (data.getAction() == KeyExchangeData::REQUEST) + { ++ BIGNUM *p = BN_new(); ++ BIGNUM *g = BN_new(); ++ if (p == NULL || g == NULL) ++ { ++ BN_free(p); ++ BN_free(g); ++ throw ibrcommon::Exception("Error while allocating space for DH parameters"); ++ } ++ + BIGNUM* pub_key = BN_new(); + read(data, &pub_key); + +@@ -184,8 +198,16 @@ namespace dtn + state.dh = DH_new(); + + // read p and g paramter from message +- read(data, &state.dh->p); +- read(data, &state.dh->g); ++ read(data, &p); ++ read(data, &g); ++ ++ if (DH_set0_pqg(state.dh, p, NULL, g)) ++ { ++ BN_free(p); ++ BN_free(g); ++ BN_free(pub_key); ++ throw ibrcommon::Exception("Error while setting DH parameters"); ++ } + + int codes; + if (!DH_check(state.dh, &codes)) +@@ -213,7 +235,9 @@ namespace dtn + state.secret.assign((const char*)secret, length); + + KeyExchangeData response(KeyExchangeData::RESPONSE, session); +- write(response, state.dh->pub_key); ++ const BIGNUM *state_dh_pub_key; ++ DH_get0_key(state.dh, &state_dh_pub_key, NULL); ++ write(response, state_dh_pub_key); + + manager.submit(session, response); + +diff --git a/src/security/exchange/Makefile.am b/src/security/exchange/Makefile.am +index a6b2f832..71ed8365 100644 +--- a/src/security/exchange/Makefile.am ++++ b/src/security/exchange/Makefile.am +@@ -22,6 +22,8 @@ exchange_SOURCES += \ + NFCProtocol.cpp \ + NoneProtocol.h \ + NoneProtocol.cpp \ ++ openssl_compat.h \ ++ openssl_compat.cpp \ + QRCodeProtocol.h \ + QRCodeProtocol.cpp + +diff --git a/src/security/exchange/openssl_compat.cpp b/src/security/exchange/openssl_compat.cpp +new file mode 100644 +index 00000000..e3baba0f +--- /dev/null ++++ b/src/security/exchange/openssl_compat.cpp +@@ -0,0 +1,62 @@ ++/* ++ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. ++ * ++ * Licensed under the OpenSSL license (the "License"). You may not use ++ * this file except in compliance with the License. You can obtain a copy ++ * in the file LICENSE in the source distribution or at ++ * https://www.openssl.org/source/license.html ++ */ ++ ++#include "openssl_compat.h" ++ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ ++void DH_get0_pqg(const DH *dh, ++ const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) ++{ ++ if (p != NULL) ++ *p = dh->p; ++ if (q != NULL) ++ *q = dh->q; ++ if (g != NULL) ++ *g = dh->g; ++} ++ ++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) ++{ ++ /* If the fields p and g in d are NULL, the corresponding input ++ * parameters MUST be non-NULL. q may remain NULL. ++ */ ++ if ((dh->p == NULL && p == NULL) ++ || (dh->g == NULL && g == NULL)) ++ return 0; ++ ++ if (p != NULL) { ++ BN_free(dh->p); ++ dh->p = p; ++ } ++ if (q != NULL) { ++ BN_free(dh->q); ++ dh->q = q; ++ } ++ if (g != NULL) { ++ BN_free(dh->g); ++ dh->g = g; ++ } ++ ++ if (q != NULL) { ++ dh->length = BN_num_bits(q); ++ } ++ ++ return 1; ++} ++ ++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) ++{ ++ if (pub_key != NULL) ++ *pub_key = dh->pub_key; ++ if (priv_key != NULL) ++ *priv_key = dh->priv_key; ++} ++ ++#endif /* OPENSSL_VERSION_NUMBER */ +diff --git a/src/security/exchange/openssl_compat.h b/src/security/exchange/openssl_compat.h +new file mode 100644 +index 00000000..29e7d415 +--- /dev/null ++++ b/src/security/exchange/openssl_compat.h +@@ -0,0 +1,13 @@ ++#ifndef LIBCRYPTO_COMPAT_H ++#define LIBCRYPTO_COMPAT_H ++ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ ++#include ++ ++void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); ++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); ++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); ++ ++#endif /* OPENSSL_VERSION_NUMBER */ ++#endif /* LIBCRYPTO_COMPAT_H */ +-- +2.16.1 + diff --git a/net/ibrdtnd/patches/010-no-const.patch b/net/ibrdtnd/patches/010-no-const.patch new file mode 100644 index 00000000..a6c80db5 --- /dev/null +++ b/net/ibrdtnd/patches/010-no-const.patch @@ -0,0 +1,33 @@ +--- a/src/routing/SchedulingBundleIndex.cpp ++++ b/src/routing/SchedulingBundleIndex.cpp +@@ -28,7 +28,7 @@ namespace dtn + void SchedulingBundleIndex::remove(const dtn::data::BundleID &id) + { + ibrcommon::MutexLock l(_index_mutex); +- for (priority_index::const_iterator iter = _priority_index.begin(); iter != _priority_index.end(); ++iter) ++ for (priority_index::iterator iter = _priority_index.begin(); iter != _priority_index.end(); ++iter) + { + const dtn::data::MetaBundle &b = (*iter); + if (id == (const dtn::data::BundleID&)b) { +--- a/src/storage/MemoryBundleStorage.cpp ++++ b/src/storage/MemoryBundleStorage.cpp +@@ -217,7 +217,7 @@ namespace dtn + ibrcommon::MutexLock l(_bundleslock); + + // search for the bundle in the bundle list +- const bundle_list::const_iterator iter = find(_bundles.begin(), _bundles.end(), id); ++ const bundle_list::iterator iter = find(_bundles.begin(), _bundles.end(), id); + + // if no bundle was found throw an exception + if (iter == _bundles.end()) throw NoBundleFoundException(); +--- a/src/storage/MetaStorage.cpp ++++ b/src/storage/MetaStorage.cpp +@@ -66,7 +66,7 @@ namespace dtn + { + std::set ret; + +- for (dtn::data::BundleList::const_iterator iter = begin(); iter != end(); ++iter) ++ for (const_iterator iter = begin(); iter != end(); ++iter) + { + const dtn::data::MetaBundle &bundle = (*iter); + diff --git a/net/ibrdtnd/patches/020-uClibc-ng.patch b/net/ibrdtnd/patches/020-uClibc-ng.patch new file mode 100644 index 00000000..abe2209a --- /dev/null +++ b/net/ibrdtnd/patches/020-uClibc-ng.patch @@ -0,0 +1,20 @@ +--- a/src/security/SecurityCertificateManager.cpp ++++ b/src/security/SecurityCertificateManager.cpp +@@ -23,6 +23,7 @@ + #include "Configuration.h" + + #include ++#include + + #include + #include +--- a/src/security/SecurityManager.cpp ++++ b/src/security/SecurityManager.cpp +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #ifdef __DEVELOPMENT_ASSERTIONS__ + #include diff --git a/net/ibrdtnd/patches/030-openssl-deprecated.patch b/net/ibrdtnd/patches/030-openssl-deprecated.patch new file mode 100644 index 00000000..a793da8a --- /dev/null +++ b/net/ibrdtnd/patches/030-openssl-deprecated.patch @@ -0,0 +1,20 @@ +--- a/src/security/SecurityKeyManager.cpp ++++ b/src/security/SecurityKeyManager.cpp +@@ -29,6 +29,7 @@ + #include + #include + ++#include + #include + #include + #include +--- a/src/security/exchange/DHProtocol.cpp ++++ b/src/security/exchange/DHProtocol.cpp +@@ -28,6 +28,7 @@ + #include + #include + ++#include + #include + #include + #include "openssl_compat.h" diff --git a/net/ifstat/Config.in b/net/ifstat/Config.in new file mode 100644 index 00000000..a224a810 --- /dev/null +++ b/net/ifstat/Config.in @@ -0,0 +1,4 @@ + config IFSTAT_SNMP + depends on PACKAGE_ifstat + bool "Build with support for SNMP" + default y diff --git a/net/ifstat/Makefile b/net/ifstat/Makefile index 8b4d1ec6..8ab30534 100644 --- a/net/ifstat/Makefile +++ b/net/ifstat/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ifstat PKG_VERSION:=1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://gael.roualland.free.fr/ifstat/ @@ -26,7 +26,7 @@ define Package/ifstat CATEGORY:=Network TITLE:=InterFace STATistics Monitoring URL:=http://gael.roualland.free.fr/ifstat/ - DEPENDS:=+libnetsnmp + DEPENDS:=+IFSTAT_SNMP:libnetsnmp endef define Package/ifstat/description @@ -36,6 +36,12 @@ define Package/ifstat/description interfaces using SNMP. endef +define Package/ifstat/config + source "$(SOURCE)/Config.in" +endef + +CONFIGURE_ARGS += --with$(if $(CONFIG_IFSTAT_SNMP),,out)-snmp + define Package/ifstat/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ifstat $(1)/usr/bin/ diff --git a/net/inadyn/Makefile b/net/inadyn/Makefile index 1da72132..d32a95b8 100644 --- a/net/inadyn/Makefile +++ b/net/inadyn/Makefile @@ -8,17 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=inadyn -PKG_VERSION:=2.3 +PKG_VERSION:=2.5 PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/troglobit/inadyn/releases/download/v$(PKG_VERSION) +PKG_HASH:=4a9ad208671f62912428413da0282450b2d2c4da38f3c95c4ac975d048c41fcd + PKG_MAINTAINER:= PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/troglobit/inadyn/releases/download/v$(PKG_VERSION) -PKG_HASH:=4a98b80d8565b9e4cb32b19b7a8b06a22a7d9a6f4f03a5298a8d441b6187c760 - -PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -39,12 +41,18 @@ define Package/inadyn/conffiles /etc/inadyn.conf endef -CONFIGURE_ARGS += --enable-shared --disable-static --enable-openssl +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-static \ + --enable-openssl \ + --without-pic define Package/inadyn/install $(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/inadyn $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/inadyn $(1)/usr/sbin/ endef $(eval $(call BuildPackage,inadyn)) diff --git a/net/iodine/Makefile b/net/iodine/Makefile index e6cf46c3..434876ab 100644 --- a/net/iodine/Makefile +++ b/net/iodine/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iodine PKG_VERSION:=0.7.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://code.kryo.se/iodine/ @@ -18,6 +18,7 @@ PKG_HASH:=ad2b40acf1421316ec15800dcde0f587ab31d7d6f891fa8b9967c4ded93c013e PKG_MAINTAINER:=Uwe Kleine-König PKG_LICENSE:=ISC PKG_LICENSE_FILES:=README +PKG_CPE_ID:=cpe:/a:kryo:iodine include $(INCLUDE_DIR)/package.mk diff --git a/net/iodine/patches/100-musl-compatibility.patch b/net/iodine/patches/100-musl-compatibility.patch index 17ddc048..ef55c3c5 100644 --- a/net/iodine/patches/100-musl-compatibility.patch +++ b/net/iodine/patches/100-musl-compatibility.patch @@ -20,7 +20,7 @@ index 2715979..5f0e370 100644 /* daemon(3) exists only in 4.4BSD or later, and in GNU libc */ -#if !defined(ANDROID) && !defined(WINDOWS32) && !(defined(BSD) && (BSD >= 199306)) && !defined(__GLIBC__) -+#ifdef __UCLIBC__ ++#ifdef __NO_DAEMON__ static int daemon(int nochdir, int noclose) { int fd, i; diff --git a/net/iotivity/Makefile b/net/iotivity/Makefile deleted file mode 100644 index 3b72217f..00000000 --- a/net/iotivity/Makefile +++ /dev/null @@ -1,313 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=iotivity -PKG_VERSION:=1.2.1 -PKG_RELEASE:=2 - -PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz -PKG_SOURCE_URL:=http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/ -PKG_HASH:=7dcd9f0f48263c6b27a2c3d085dd7278b5c0feed1dfec8872a04899707fa23d8 -PKG_USE_MIPS16:=0 - -PKG_BUILD_DEPENDS:=boost python/host scons/host - -PKG_MAINTAINER:=Hauke Mehrtens - -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE.md - -PKG_CONFIG_DEPENDS := \ - CONFIG_PACKAGE_iotivity \ - CONFIG_PACKAGE_iotivity-cpp \ - CONFIG_PACKAGE_iotivity-resource-directory-lib \ - CONFIG_PACKAGE_iotivity-oic-middle \ - CONFIG_PACKAGE_iotivity-resource-container-lib \ - CONFIG_PACKAGE_iotivity-resource-container-sample \ - CONFIG_PACKAGE_iotivity-resource-container-hue \ - CONFIG_PACKAGE_iotivity-example-garage \ - CONFIG_PACKAGE_iotivity-example-simple \ - CONFIG_PACKAGE_iotivity_DEBUG \ - CONFIG_PACKAGE_iotivity_SECURE - -include $(INCLUDE_DIR)/package.mk -include ../../devel/scons/scons.mk - - -define Package/iotivity - SECTION:=net - CATEGORY:=Network - DEPENDS:=@!USE_UCLIBC +libpthread +librt +libuuid +libsqlite3 +PACKAGE_iotivity_SECURE:libmbedtls - TITLE:=IoTivity C Library - URL:=https://www.iotivity.org - MENU:=1 -endef - -define Package/iotivity/description - IoTivity is a framework for the Internet of Things based on the - Open Interconnect Consortium Specification. -endef - -define Package/iotivity/config - if PACKAGE_iotivity - config PACKAGE_iotivity_DEBUG - bool "IoTivity with debug support" - help - Build IoTivity with debuging support. - - config PACKAGE_iotivity_SECURE - bool "IoTivity with security support" - help - Activate security support. - - config PACKAGE_iotivity_LOGGING - bool "IoTivity with logging support" - default y - help - Activate logging support. - This will make IoTivity write a lot of log messages to stdout. - endif -endef - - -define Package/iotivity-cpp - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +libpthread +libstdcpp - TITLE:=IoTivity C++ Library - URL:=https://www.iotivity.org -endef - -define Package/iotivity-cpp/description - IoTivity is a framework for the Internet of Things based on the - Open Interconnect Consortium Specification. -endef - -define Package/iotivity-resource-directory-lib - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp - TITLE:=IoTivity Resource Directory library - URL:=https://www.iotivity.org -endef - - -define Package/iotivity-oic-middle - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib - TITLE:=IoTivity OIC Middle - URL:=https://www.iotivity.org -endef - -define Package/iotivity-oic-middle/description - IoTivity OIC Middle -endef - -define Package/iotivity-resource-container-lib - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp +boost +boost-system +boost-thread +boost-date_time - TITLE:=IoTivity Resource Container library - URL:=https://www.iotivity.org -endef - -define Package/iotivity-resource-container-sample - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-resource-container-lib - TITLE:=IoTivity Resource Container sample Application - URL:=https://www.iotivity.org -endef - -define Package/iotivity-resource-container-hue - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-resource-container-lib +libcurl - TITLE:=IoTivity Resource Container Hue Bundle - URL:=https://www.iotivity.org -endef - -define Package/iotivity-example-garage - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib - TITLE:=IoTivity Garage example - URL:=https://www.iotivity.org -endef - -define Package/iotivity-example-garage/description - An IoTivity example application -endef - -define Package/iotivity-example-simple - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iotivity +iotivity-cpp +iotivity-resource-directory-lib - TITLE:=IoTivity simple client + server - URL:=https://www.iotivity.org -endef - -define Package/iotivity-example-simple/description - The IoTivity simple client and simple server exmaple -endef - - -PKG_TINYCBOR_NAME:=tinycbor -PKG_TINYCBOR_PROTO:=git -PKG_TINYCBOR_VERSION:=0.4 -PKG_TINYCBOR_SOURCE_VERSION:=a088996aa5f59b4f27f20fadad053d88bee357d4 -PKG_TINYCBOR_MIRROR_HASH:=77c600bd7362df8291148fa3d94ca780815ea2b74b817dca7565310ea0abff96 -PKG_TINYCBOR_SOURCE:=$(PKG_TINYCBOR_NAME)-$(PKG_TINYCBOR_VERSION).tar.bz2 -PKG_TINYCBOR_SOURCE_URL:=https://github.com/01org/tinycbor.git -PKG_TINYCBOR_SUBDIR:=$(PKG_TINYCBOR_NAME) - -define Download/iotivity-tinycbor - FILE:=$(PKG_TINYCBOR_SOURCE) - URL:=$(PKG_TINYCBOR_SOURCE_URL) - MIRROR_HASH:=$(PKG_TINYCBOR_MIRROR_HASH) - PROTO:=$(PKG_TINYCBOR_PROTO) - VERSION:=$(PKG_TINYCBOR_SOURCE_VERSION) - SUBDIR:=$(PKG_TINYCBOR_SUBDIR) -endef -$(eval $(call Download,iotivity-tinycbor)) - - -EXTRA_CXXFLAGS += -std=gnu++11 - -SCONS_OPTIONS += \ - TARGET_OS=linux \ - TARGET_TRANSPORT=IP \ - TARGET_ARCH=$(ARCH) \ - STAGING_DIR=$(STAGING_DIR) \ - WITH_ENV=true \ - octbstack oc \ - $(if $(CONFIG_PACKAGE_iotivity-oic-middle),examples) \ - $(if $(CONFIG_PACKAGE_iotivity-resource-container-lib),libResContainer) \ - $(if $(CONFIG_PACKAGE_iotivity-resource-container-sample),containersample) \ - $(if $(CONFIG_PACKAGE_iotivity-resource-container-hue),libHueBundle) \ - $(if $(CONFIG_PACKAGE_iotivity-example-garage),examples) \ - $(if $(CONFIG_PACKAGE_iotivity-example-simple),examples) \ - install - -ifeq ($(CONFIG_PACKAGE_iotivity_DEBUG),y) - SCONS_OPTIONS += RELEASE=false - APP_OPTIM:=debug -else - SCONS_OPTIONS += RELEASE=true - APP_OPTIM:=release -endif - -ifeq ($(CONFIG_PACKAGE_iotivity_SECURE),y) - SCONS_OPTIONS += SECURED=1 -else - SCONS_OPTIONS += SECURED=0 -endif - -ifeq ($(CONFIG_PACKAGE_iotivity_LOGGING),y) - SCONS_OPTIONS += LOGGING=true -endif - -ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) - SCONS_OPTIONS += VERBOSE=true -endif - -define Build/Prepare - $(call Build/Prepare/Default) - $(TAR) -C $(PKG_BUILD_DIR)/extlibs/tinycbor/ -xjf $(DL_DIR)/$(PKG_TINYCBOR_SOURCE) -endef - - -define Build/Configure - (cd $(PKG_BUILD_DIR); \ - $(SCONS_VARS) \ - python2.7 $(STAGING_DIR_HOSTPKG)/bin/scons \ - $(SCONS_OPTIONS) \ - ) -endef - - -define Package/iotivity/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libconnectivity_abstraction.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboctbstack.so $(1)/usr/lib/ -ifeq ($(CONFIG_PACKAGE_iotivity_SECURE),y) - $(INSTALL_DIR) $(1)/etc/iotivity/ - $(INSTALL_DATA) ./files/etc/iotivity/oic_svr_db.cbor $(1)/etc/iotivity/ -endif -endef - -define Package/iotivity-cpp/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc_logger.so $(1)/usr/lib/ -endef - -define Package/iotivity-resource-directory-lib/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libresource_directory.so $(1)/usr/lib/ -endef - -define Package/iotivity-oic-middle/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/examples/OICMiddle/OICMiddle $(1)/usr/bin/ -endef - -define Package/iotivity-resource-container-lib/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_common.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_client.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_server.so $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/librcs_container.so $(1)/usr/lib/ -endef - -define Package/iotivity-resource-container-sample/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/service/resource-container/ContainerSample $(1)/usr/bin/ -endef - -define Package/iotivity-resource-container-hue/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libHueBundle.so $(1)/usr/lib/ -endef - -define Package/iotivity-example-garage/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/garageclient $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/garageserver $(1)/usr/bin/ -endef - -define Package/iotivity-example-simple/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/simpleclient $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/resource/examples/simpleserver $(1)/usr/bin/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/include $(1)/usr/include/iotivity - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libconnectivity_abstraction.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboctbstack.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/liboc_logger.so $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/$(APP_OPTIM)/libresource_directory.so $(1)/usr/lib/ -endef - - -$(eval $(call BuildPackage,iotivity)) -$(eval $(call BuildPackage,iotivity-cpp)) -$(eval $(call BuildPackage,iotivity-resource-directory-lib)) -$(eval $(call BuildPackage,iotivity-oic-middle)) -$(eval $(call BuildPackage,iotivity-resource-container-lib)) -$(eval $(call BuildPackage,iotivity-resource-container-sample)) -$(eval $(call BuildPackage,iotivity-resource-container-hue)) -$(eval $(call BuildPackage,iotivity-example-garage)) -$(eval $(call BuildPackage,iotivity-example-simple)) diff --git a/net/iotivity/files/etc/iotivity/ReadMe.txt b/net/iotivity/files/etc/iotivity/ReadMe.txt deleted file mode 100644 index ae47a5fa..00000000 --- a/net/iotivity/files/etc/iotivity/ReadMe.txt +++ /dev/null @@ -1,2 +0,0 @@ -The file oic_svr_db.cbor in generated from the oic_svr_db.json with the -resource/csdk/security/tool/json2cbor.c tool. diff --git a/net/iotivity/files/etc/iotivity/oic_svr_db.cbor b/net/iotivity/files/etc/iotivity/oic_svr_db.cbor deleted file mode 100644 index c8f19f53a32aaf2e10a4fad3452729661bd0c01d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1234 zcmbtTQBuM%5Cw)AFX9(7lo3wg4gAC}O_Qxnn>L*!1^g^}4L{WWcnVJ81-t{_m`$O> zR6A5`rrB(EUv~Fpv!R5F+reEKSjn|{WrTu$dXIJPM?g)Ub4Es7ftI1nX z4KWCgkq+fmdKoJ>S@0CPQB*!-&CxQ|KP?tQ1d?%ka+TpBogq=mjW1^r)t$4@e2y{y9-$D?4U$ zI&));qA^vL+4QX1+#77~x*fBf&E{VvpwvYfpyaH7{LbxVcStWpqlJWGxU<=y^=N&dYMV1VGZmt{Oe=5Z+e(UDlHzO0Uv;Y7A diff --git a/net/iotivity/files/etc/iotivity/oic_svr_db.json b/net/iotivity/files/etc/iotivity/oic_svr_db.json deleted file mode 100644 index 2155071e..00000000 --- a/net/iotivity/files/etc/iotivity/oic_svr_db.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "acl": { - "aclist": { - "aces": [ - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/res", - "rel": "", - "rt": ["oic.wk.res"], - "if": ["oic.if.ll"] - }, - { - "href": "/oic/d", - "rel": "", - "rt": ["oic.wk.d"], - "if": ["oic.if.baseline", "oic.if.r"] - }, - { - "href": "/oic/p", - "rel": "", - "rt": ["oic.wk.p"], - "if": ["oic.if.baseline", "oic.if.r"] - }, - { - "href": "/oic/sec/acl", - "rel": "", - "rt": ["oic.r.acl"], - "if": ["oic.if.baseline"] - } - ], - "permission": 2 - }, - { - "subjectuuid": "*", - "resources": [ - { - "href": "/oic/sec/doxm", - "rel": "", - "rt": ["oic.r.doxm"], - "if": ["oic.if.baseline"] - }, - { - "href": "/oic/sec/pstat", - "rel": "", - "rt": ["oic.r.pstat"], - "if": ["oic.if.baseline"] - } - ], - "permission": 2 - }, - { - "subjectuuid": "*", - "resources": [ - { - "href": "*", - "rel": "", - "rt": ["oic.core"], - "if": ["oic.if.baseline"] - } - ], - "permission": 7 - } - ] - }, - "rowneruuid" : "31313131-3131-3131-3131-313131313131" - }, - "pstat": { - "isop": true, - "deviceuuid": "31313131-3131-3131-3131-313131313131", - "rowneruuid": "31313131-3131-3131-3131-313131313131", - "cm": 0, - "tm": 0, - "om": 4, - "sm": 4 - }, - "doxm": { - "oxms": [0], - "oxmsel": 0, - "sct": 1, - "owned": true, - "deviceuuid": "31313131-3131-3131-3131-313131313131", - "devowneruuid": "32323232-3232-3232-3232-323232323232", - "rowneruuid": "31313131-3131-3131-3131-313131313131" - }, - "cred": { - "creds": [ - { - "credid": 1, - "subjectuuid": "32323232-3232-3232-3232-323232323232", - "credtype": 1, - "privatedata": { - "data": "AAAAAAAAAAAAAAAA", - "encoding": "oic.sec.encoding.raw" - } - } - ], - "rowneruuid": "31313131-3131-3131-3131-313131313131" - } -} diff --git a/net/iotivity/patches/001-no_unit_test.patch b/net/iotivity/patches/001-no_unit_test.patch deleted file mode 100644 index 8a40e731..00000000 --- a/net/iotivity/patches/001-no_unit_test.patch +++ /dev/null @@ -1,141 +0,0 @@ ---- a/plugins/SConscript -+++ b/plugins/SConscript -@@ -35,7 +35,7 @@ if target_os not in ['android', 'arduino - - SConscript(os.path.join('src', 'SConscript')) - -- SConscript(os.path.join('unittests', 'SConscript')) -+# SConscript(os.path.join('unittests', 'SConscript')) - - if build_sample == 'ON': - if target_os in ['linux']: ---- a/resource/SConscript -+++ b/resource/SConscript -@@ -78,7 +78,7 @@ if target_os in ['linux', 'windows']: - SConscript('csdk/stack/samples/linux/secure/SConscript') - - # Build C/C++ unit tests -- SConscript('unit_tests.scons') -+ # SConscript('unit_tests.scons') - - elif target_os == 'darwin': - env.Command('../../out/darwin/iotivity-csdk.framework',None,src_dir + '/tools/darwin/mkfwk_osx.sh') ---- a/resource/csdk/resource-directory/SConscript -+++ b/resource/csdk/resource-directory/SConscript -@@ -114,8 +114,3 @@ if 'SERVER' in rd_mode: - if target_os in ['linux']: - SConscript('samples/SConscript') - --###################################################################### --# Build UnitTests of the Resource Directory --################################################ ###################### --if target_os in ['linux']: -- SConscript('unittests/SConscript') ---- a/service/coap-http-proxy/SConscript -+++ b/service/coap-http-proxy/SConscript -@@ -84,6 +84,3 @@ local_env.UserInstallTargetHeader('inclu - ###################################################################### - if target_os in ['linux', 'tizen']: - SConscript('samples/SConscript') -- --if target_os in ['linux']: -- SConscript('unittests/SConscript') ---- a/service/easy-setup/enrollee/SConscript -+++ b/service/easy-setup/enrollee/SConscript -@@ -123,7 +123,3 @@ if target_os == 'arduino': - - if target_os in ['linux']: - SConscript('../sampleapp/enrollee/linux/SConscript') -- #Build UnitTestcases for Enrollee -- if enrollee_env.get('SECURED') == '0': -- SConscript('../enrollee/unittests/SConscript') -- ---- a/service/easy-setup/mediator/richsdk/SConscript -+++ b/service/easy-setup/mediator/richsdk/SConscript -@@ -163,11 +163,3 @@ if target_os in ['linux']: - if target_os in ['android']: - SConscript('../../sampleapp/mediator/android/SConscript') - -- --###################################################################### --#Build UnitTestcases for Mediator[RichSDK] --################################################ ###################### --if env.get('SECURED') == '0': -- if target_os == 'linux': -- SConscript('unittests/SConscript') -- ---- a/service/resource-container/SConscript -+++ b/service/resource-container/SConscript -@@ -223,12 +223,6 @@ else: - lib_env = conf2.Finish() - - ###################################################################### --# build resource container unit tests --###################################################################### --if target_os in ['linux']: -- SConscript('unittests/SConscript') -- --###################################################################### - # Build Container Sample - ###################################################################### - if target_os not in ['ios']: ---- a/service/resource-encapsulation/SConscript -+++ b/service/resource-encapsulation/SConscript -@@ -121,14 +121,5 @@ resourceClient_env.UserInstallTargetHead - ###################################################################### - SConscript('examples/SConscript') - --###################################################################### --# Build UnitTests Resource Client , resourceCache and resourceBroker and --# DiscoveryManager --################################################ ###################### --if target_os in ['linux']: -- SConscript('unittests/SConscript') -- SConscript('src/resourceCache/unittests/SConscript') -- SConscript('src/resourceBroker/unittest/SConscript') -- - if target_os == 'android': - SConscript('android/SConscript') ---- a/service/resource-encapsulation/src/common/SConscript -+++ b/service/resource-encapsulation/src/common/SConscript -@@ -22,10 +22,10 @@ - # rcs_common (primitiveResource and expiryTimer) build script - ## - import os -+Import('env') - - # SConscript file for Local PKI google tests --gtest_env = SConscript('#extlibs/gtest/SConscript') --lib_env = gtest_env.Clone() -+lib_env = env.Clone() - - # Add third party libraries - SConscript('#service/third_party_libs.scons', exports = 'lib_env') ---- a/service/resource-encapsulation/src/serverBuilder/SConscript -+++ b/service/resource-encapsulation/src/serverBuilder/SConscript -@@ -21,9 +21,11 @@ - ## - # rcs_server (Server Builder) project build script - ## -+import os -+Import('env') -+ - # SConscript file for Local PKI google tests --gtest_env = SConscript('#extlibs/gtest/SConscript') --lib_env = gtest_env.Clone() -+lib_env = env.Clone() - - # Add third party libraries - SConscript('#service/third_party_libs.scons', exports = 'lib_env') ---- a/service/scene-manager/SConscript -+++ b/service/scene-manager/SConscript -@@ -100,9 +100,5 @@ scenemanager_env.UserInstallTargetHeader - scenemanager_env.UserInstallTargetHeader('include/RemoteScene.h', 'service/scene-manager', 'RemoteScene.h') - scenemanager_env.UserInstallTargetHeader('include/RemoteSceneAction.h', 'service/scene-manager', 'RemoteSceneAction.h') - --# Go to build Unit test --if target_os in ['linux']: -- SConscript('unittests/SConscript') -- - # Go to build sample apps - SConscript('sampleapp/SConscript') diff --git a/net/iotivity/patches/002-do-not-chck-for-boost.patch b/net/iotivity/patches/002-do-not-chck-for-boost.patch deleted file mode 100644 index 6be8f840..00000000 --- a/net/iotivity/patches/002-do-not-chck-for-boost.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 51e26e002aa043435f94ac0f071066090d5c2de8 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 22 Jun 2015 20:23:36 +0200 -Subject: [PATCH 5/5] do not chck for boost - -Boost is not needed for every package just for some. - -Signed-off-by: Hauke Mehrtens ---- - service/third_party_libs.scons | 8 -------- - 1 file changed, 8 deletions(-) - ---- a/service/third_party_libs.scons -+++ b/service/third_party_libs.scons -@@ -49,14 +49,6 @@ if target_os in ['linux']: - - conf = Configure(lib_env) - -- if target_os not in ['tizen'] and not conf.CheckLib('boost_thread', language='C++'): -- print 'Did not find boost_thread, exiting!' -- Exit(1) -- -- if target_os not in ['tizen'] and not conf.CheckLib('boost_system', language='C++'): -- print 'Did not find boost_system, exiting!' -- Exit(1) -- - lib_env = conf.Finish() - - ###################################################################### diff --git a/net/iotivity/patches/020-linux-Add-more-architectures.patch b/net/iotivity/patches/020-linux-Add-more-architectures.patch deleted file mode 100644 index cb013814..00000000 --- a/net/iotivity/patches/020-linux-Add-more-architectures.patch +++ /dev/null @@ -1,44 +0,0 @@ -From dabd6597013e1df72b08621b466d136b8d25d110 Mon Sep 17 00:00:00 2001 -From: Philippe Coval -Date: Thu, 29 Sep 2016 10:57:59 +0200 -Subject: [PATCH 20/23] linux: Add more architectures - -This does not scale and this check should be removed. - -Signed-off-by: Hauke Mehrtens -Author: Hauke Mehrtens -Change-Id: Ibb271701904745ee4f5dd689c197228239c37262 -Origin: https://github.com/openwrt/packages/blob/master/net/iotivity/patches/021-add-some-more-architectures.patch -Signed-off-by: Philippe Coval -Reviewed-on: https://gerrit.iotivity.org/gerrit/14575 -Tested-by: jenkins-iotivity -Reviewed-by: Nivedita Singhvi -Reviewed-by: Jaehong Jo -Reviewed-by: Hauke Mehrtens ---- - build_common/SConscript | 2 +- - resource/csdk/connectivity/build/SConscript | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/build_common/SConscript -+++ b/build_common/SConscript -@@ -18,7 +18,7 @@ host_target_map = { - - # Map of os and allowed archs (os: allowed archs) - os_arch_map = { -- 'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'], -+ 'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64', 'mips', 'mipsel', 'mips64', 'mips64el', 'i386', 'powerpc', 'sparc', 'aarch64'], - 'tizen': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'], - 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'], - 'windows': ['x86', 'amd64', 'arm'], ---- a/resource/csdk/connectivity/build/SConscript -+++ b/resource/csdk/connectivity/build/SConscript -@@ -14,7 +14,7 @@ host_target_map = { - - # Map of os and allowed archs (os: allowed archs) - os_arch_map = { -- 'linux': ['x86', 'x86_64', 'arm', 'arm64'], -+ 'linux': ['x86', 'x86_64', 'arm', 'arm64', 'mips', 'mipsel', 'mips64', 'mips64el', 'i386', 'powerpc', 'sparc', 'aarch64'], - 'tizen': ['x86', 'x86_64', 'arm', 'arm64'], - 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'], - 'windows': ['x86', 'amd64', 'arm'], diff --git a/net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch b/net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch deleted file mode 100644 index 2756fde3..00000000 --- a/net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 792f68219b3ab4ff5238e3abc7aa1c68bfa4a22b Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sat, 10 Dec 2016 18:15:32 +0100 -Subject: [PATCH 21/23] build: do not set TARGET_ARCH to default - -This check is useless, scons already checks this and returns such an -error message: -Invalid value for option TARGET_ARCH: mips. Valid values are: ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'] - -Change-Id: I3f7dd3b9fcae875ab20349203fb77537f24be763 -Signed-off-by: Hauke Mehrtens ---- - build_common/SConscript | 3 --- - resource/csdk/connectivity/build/SConscript | 2 -- - 2 files changed, 5 deletions(-) - ---- a/build_common/SConscript -+++ b/build_common/SConscript -@@ -54,9 +54,6 @@ if target_os == 'android': - else: - default_arch = platform.machine() - --if default_arch not in os_arch_map[target_os]: -- default_arch = os_arch_map[target_os][0].lower() -- - target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch) # target arch - - # True if binary needs to be installed on board. (Might need root permissions) ---- a/resource/csdk/connectivity/build/SConscript -+++ b/resource/csdk/connectivity/build/SConscript -@@ -40,8 +40,6 @@ if target_os not in host_target_map[host - Exit(1) - - default_arch = platform.machine() --if default_arch not in os_arch_map[target_os]: -- default_arch = os_arch_map[target_os][0].lower() - - target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch) # target arch - diff --git a/net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch b/net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch deleted file mode 100644 index dfb546a4..00000000 --- a/net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 39b0c436c77555849da1e68cc8733c67183c291f Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sat, 10 Dec 2016 18:35:04 +0100 -Subject: [PATCH 22/23] build: restrict compiler options to supported - architectures - -For Linux we currently only support the following architectures: -'x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64' -explicitly check for those architectures and also remove ARM hard float. - -Change-Id: I7078530bc2a89b88c7049cc53e8bb3fbe5d75ca8 -Signed-off-by: Hauke Mehrtens ---- - build_common/linux/SConscript | 11 +++-------- - resource/csdk/connectivity/build/linux/SConscript | 11 +++-------- - 2 files changed, 6 insertions(+), 16 deletions(-) - ---- a/build_common/linux/SConscript -+++ b/build_common/linux/SConscript -@@ -30,14 +30,9 @@ if target_arch in ['x86']: - elif target_arch in ['x86_64']: - env.AppendUnique(CCFLAGS = ['-m64']) - env.AppendUnique(LINKFLAGS = ['-m64']) --elif target_arch in ['arm'] or target_arch.find('v5') > 0: -+elif target_arch in ['arm']: - env.AppendUnique(CPPFLAGS = ['-march=armv5te']) --elif target_arch.find('v7a-hard') > 0: -+elif target_arch in ['arm-v7a', 'armeabi-v7a']: - env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) -- env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard']) -- env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard']) -- env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard']) --elif target_arch.find('v7a') > 0: -- env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) --elif target_arch.find('arm64') >= 0: -+elif target_arch.find('arm64') > 0: - env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) ---- a/resource/csdk/connectivity/build/linux/SConscript -+++ b/resource/csdk/connectivity/build/linux/SConscript -@@ -29,14 +29,9 @@ if target_arch in ['x86']: - elif target_arch in ['x86_64']: - env.AppendUnique(CCFLAGS = ['-m64']) - env.AppendUnique(LINKFLAGS = ['-m64']) --elif target_arch.find('v7a-hard') > 0: -- env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) -- env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard']) -- env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard']) -- env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard']) --elif target_arch.find('v7a') > 0: -+elif target_arch in ['arm']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv5te']) -+elif target_arch in ['arm-v7a', 'armeabi-v7a']: - env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) - elif target_arch.find('arm64') > 0: - env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) --else: -- env.AppendUnique(CPPFLAGS = ['-march=armv5te']) diff --git a/net/iotivity/patches/023-build-take-compiler-options-from-environment.patch b/net/iotivity/patches/023-build-take-compiler-options-from-environment.patch deleted file mode 100644 index b6a2bfde..00000000 --- a/net/iotivity/patches/023-build-take-compiler-options-from-environment.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 5f9513eb341d520d10c48f8ba2bd145063405fdd Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sat, 10 Dec 2016 18:08:05 +0100 -Subject: [PATCH 23/23] build: take compiler options from environment - -This makes it possible to compile IoTivity with custom compiler -options. This way someone can use optimized compiler settings for the -target CPU. I want to use this in OpenWrt / LEDE to build specific -IoTivity binaries for each CPU architecture, there the build system -provides the matching compiler options. - -Change-Id: I86772f73b81c41d7e96e51b434fd9e3b4992753a -Signed-off-by: Hauke Mehrtens ---- - build_common/SConscript | 25 +++++++++++++++++++++ - build_common/linux/SConscript | 27 ++++++++++++----------- - resource/csdk/connectivity/build/linux/SConscript | 27 ++++++++++++----------- - 3 files changed, 53 insertions(+), 26 deletions(-) - ---- a/build_common/SConscript -+++ b/build_common/SConscript -@@ -120,6 +120,7 @@ help_vars.Add(PathVariable('ANDROID_NDK' - help_vars.Add(PathVariable('ANDROID_HOME', 'Android SDK path', None, PathVariable.PathAccept)) - help_vars.Add(PathVariable('ANDROID_GRADLE', 'Gradle binary file', None, PathVariable.PathIsFile)) - help_vars.Add(EnumVariable('WITH_UPSTREAM_LIBCOAP', 'Use latest stable version of LibCoAP downloaded from github', default_with_upstream_libcoap, allowed_values=('0','1'))) -+help_vars.Add(BoolVariable('WITH_ENV', 'Use compiler options from environment', False)) - - AddOption('--prefix', - dest='prefix', -@@ -153,6 +154,30 @@ else: - ) - Help(help_vars.GenerateHelpText(env)) - -+if env.get('WITH_ENV'): -+ env['ENV'] = os.environ -+ if 'CC' in os.environ: -+ env['CC'] = Split(os.environ['CC']) -+ print "using CC from environment: %s" % env['CC'] -+ if 'CXX' in os.environ: -+ env['CXX'] = Split(os.environ['CXX']) -+ print "using CXX from environment: %s" % env['CXX'] -+ if 'CFLAGS' in os.environ: -+ env['CFLAGS'] = Split(os.environ['CFLAGS']) -+ print "using CFLAGS from environment: %s" % env['CFLAGS'] -+ if 'CXXFLAGS' in os.environ: -+ env['CXXFLAGS'] = Split(os.environ['CXXFLAGS']) -+ print "using CXXFLAGS from environment: %s" % env['CXXFLAGS'] -+ if 'CCFLAGS' in os.environ: -+ env['CCFLAGS'] = Split(os.environ['CCFLAGS']) -+ print "using CCFLAGS from environment: %s" % env['CCFLAGS'] -+ if 'CPPFLAGS' in os.environ: -+ env['CPPFLAGS'] = Split(os.environ['CPPFLAGS']) -+ print "using CPPFLAGS from environment: %s" % env['CPPFLAGS'] -+ if 'LDFLAGS' in os.environ: -+ env['LINKFLAGS'] = Split(os.environ['LDFLAGS']) -+ print "using LDFLAGS/LINKFLAGS from environment: %s" % env['LINKFLAGS'] -+ - tc_set_msg = ''' - ************************************ Warning ********************************** - * Enviornment variable TC_PREFIX/TC_PATH is set. It will change the default * ---- a/build_common/linux/SConscript -+++ b/build_common/linux/SConscript -@@ -23,16 +23,17 @@ env.AppendUnique(CCFLAGS = ['-Wall', '-W - env.AppendUnique(LIBS = ['dl', 'pthread', 'uuid']) - - # Set arch flags that match best TARGET_ARCH variable --target_arch = env.get('TARGET_ARCH') --if target_arch in ['x86']: -- env.AppendUnique(CCFLAGS = ['-m32']) -- env.AppendUnique(LINKFLAGS = ['-m32']) --elif target_arch in ['x86_64']: -- env.AppendUnique(CCFLAGS = ['-m64']) -- env.AppendUnique(LINKFLAGS = ['-m64']) --elif target_arch in ['arm']: -- env.AppendUnique(CPPFLAGS = ['-march=armv5te']) --elif target_arch in ['arm-v7a', 'armeabi-v7a']: -- env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) --elif target_arch.find('arm64') > 0: -- env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) -+if not env.get('WITH_ENV'): -+ target_arch = env.get('TARGET_ARCH') -+ if target_arch in ['x86']: -+ env.AppendUnique(CCFLAGS = ['-m32']) -+ env.AppendUnique(LINKFLAGS = ['-m32']) -+ elif target_arch in ['x86_64']: -+ env.AppendUnique(CCFLAGS = ['-m64']) -+ env.AppendUnique(LINKFLAGS = ['-m64']) -+ elif target_arch in ['arm']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv5te']) -+ elif target_arch in ['arm-v7a', 'armeabi-v7a']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) -+ elif target_arch.find('arm64') > 0: -+ env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) ---- a/resource/csdk/connectivity/build/linux/SConscript -+++ b/resource/csdk/connectivity/build/linux/SConscript -@@ -22,16 +22,17 @@ env.AppendUnique(CCFLAGS = ['-Wall', '-f - env.AppendUnique(LIBS = ['dl', 'pthread']) - - # Set arch flags --target_arch = env.get('TARGET_ARCH') --if target_arch in ['x86']: -- env.AppendUnique(CCFLAGS = ['-m32']) -- env.AppendUnique(LINKFLAGS = ['-m32']) --elif target_arch in ['x86_64']: -- env.AppendUnique(CCFLAGS = ['-m64']) -- env.AppendUnique(LINKFLAGS = ['-m64']) --elif target_arch in ['arm']: -- env.AppendUnique(CPPFLAGS = ['-march=armv5te']) --elif target_arch in ['arm-v7a', 'armeabi-v7a']: -- env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) --elif target_arch.find('arm64') > 0: -- env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) -+if not env.get('WITH_ENV'): -+ target_arch = env.get('TARGET_ARCH') -+ if target_arch in ['x86']: -+ env.AppendUnique(CCFLAGS = ['-m32']) -+ env.AppendUnique(LINKFLAGS = ['-m32']) -+ elif target_arch in ['x86_64']: -+ env.AppendUnique(CCFLAGS = ['-m64']) -+ env.AppendUnique(LINKFLAGS = ['-m64']) -+ elif target_arch in ['arm']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv5te']) -+ elif target_arch in ['arm-v7a', 'armeabi-v7a']: -+ env.AppendUnique(CPPFLAGS = ['-march=armv7-a']) -+ elif target_arch.find('arm64') > 0: -+ env.AppendUnique(CPPFLAGS = ['-march=armv8-a']) diff --git a/net/iotivity/patches/030-remove-check-for-curl.patch b/net/iotivity/patches/030-remove-check-for-curl.patch deleted file mode 100644 index 475976d9..00000000 --- a/net/iotivity/patches/030-remove-check-for-curl.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/service/resource-container/SConscript -+++ b/service/resource-container/SConscript -@@ -191,36 +191,22 @@ if target_os in ['linux', 'tizen', 'andr - # build hue sample bundle - ###################################################################### - --conf2 = Configure(lib_env) --if not conf2.CheckLib('curl'): -- print '''X --*********************************** Error ************************************* --* Cannot build hue sample. Please install libcurl. --* Example (Ubuntu): --* sudo apt-get install libcurl4-openssl-dev --* sudo ldconfig --* Hint: check with pkg-config --libs libcurl and clear scons cache. --* Skipping hue sample build. --******************************************************************************* -- ''' --else: -- hue_resource_bundle_env = resource_container_env.Clone() -- hue_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC']) -- -- HUE_RESOURCE_BUNDLE_DIR = 'examples/HueSampleBundle/' -- hue_resource_bundle_env.AppendUnique(CPPPATH = [ -- HUE_RESOURCE_BUNDLE_DIR + 'include', -- 'include/' -- ]) -- -- hue_resource_bundle_env.PrependUnique(LIBS = ['curl', 'rcs_container']) -- -- hue_resource_bundle_src = [ Glob(HUE_RESOURCE_BUNDLE_DIR + 'src/*.cpp')] -- -- HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src) -- hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle') -- hue_resource_bundle_env.UserInstallTargetLib(HueBundle, 'libHueBundle') --lib_env = conf2.Finish() -+hue_resource_bundle_env = resource_container_env.Clone() -+hue_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC']) -+ -+HUE_RESOURCE_BUNDLE_DIR = 'examples/HueSampleBundle/' -+hue_resource_bundle_env.AppendUnique(CPPPATH = [ -+ HUE_RESOURCE_BUNDLE_DIR + 'include', -+ 'include/' -+ ]) -+ -+hue_resource_bundle_env.PrependUnique(LIBS = ['curl', 'rcs_container']) -+ -+hue_resource_bundle_src = [ Glob(HUE_RESOURCE_BUNDLE_DIR + 'src/*.cpp')] -+ -+HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src) -+hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle') -+hue_resource_bundle_env.UserInstallTargetLib(HueBundle, 'libHueBundle') - - ###################################################################### - # Build Container Sample diff --git a/net/iotivity/patches/040-linux-Use-system-sqlite3.patch b/net/iotivity/patches/040-linux-Use-system-sqlite3.patch deleted file mode 100644 index 50d55a7f..00000000 --- a/net/iotivity/patches/040-linux-Use-system-sqlite3.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 08b403572985a70fe5d652378e1cfa2b72ac6a3d Mon Sep 17 00:00:00 2001 -From: Philippe Coval -Date: Fri, 9 Dec 2016 02:12:04 +0100 -Subject: [PATCH] linux: Use system sqlite3 - -Problem was discovered on yocto - -Change-Id: I5274bed9e4b7ddcdc1b17a265a1886cd78cb631f -Signed-off-by: Philippe Coval -Reviewed-on: https://gerrit.iotivity.org/gerrit/15305 -Tested-by: jenkins-iotivity -Reviewed-by: Ziran Sun ---- - resource/csdk/SConscript | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/resource/csdk/SConscript -+++ b/resource/csdk/SConscript -@@ -191,7 +191,7 @@ if with_tcp == True: - - if 'SERVER' in rd_mode: - liboctbstack_src.append(OCTBSTACK_SRC + 'oicresourcedirectory.c') -- if target_os not in ['tizen']: -+ if target_os not in ['linux', 'tizen']: - liboctbstack_src.append('#extlibs/sqlite3/sqlite3.c') - - if target_os in ['linux']: diff --git a/net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch b/net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch deleted file mode 100644 index 5ba18d88..00000000 --- a/net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch +++ /dev/null @@ -1,54 +0,0 @@ -From d8cf30cb0abd5fa8f6282b490618204d683b625c Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 3 Oct 2016 21:00:28 +0200 -Subject: [PATCH 1/3] csdk: move OCEntityHandlerResponse from stack to heap - -OCEntityHandlerResponse is over 50KByte and I got a stack overflow on MIPS -running on LEDE without this patch. Instead of storing -OCEntityHandlerResponse on the program stack, allocate some memory on -the heap and free it afterwards again. - -This fixes one part of this issue for me: -https://jira.iotivity.org/browse/IOT-1374 - -Change-Id: I365a5c7a34dce2dfb0897a20b57a13ba566748ec -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/stack/src/ocresource.c | 24 +++++++++++++++++------- - 1 file changed, 17 insertions(+), 7 deletions(-) - ---- a/resource/csdk/stack/src/ocresource.c -+++ b/resource/csdk/stack/src/ocresource.c -@@ -774,15 +774,25 @@ static bool includeThisResourceInRespons - OCStackResult SendNonPersistantDiscoveryResponse(OCServerRequest *request, OCResource *resource, - OCPayload *discoveryPayload, OCEntityHandlerResult ehResult) - { -- OCEntityHandlerResponse response = {0}; -+ OCEntityHandlerResponse *response = NULL; -+ OCStackResult result = OC_STACK_ERROR; - -- response.ehResult = ehResult; -- response.payload = discoveryPayload; -- response.persistentBufferFlag = 0; -- response.requestHandle = (OCRequestHandle) request->requestId; -- response.resourceHandle = (OCResourceHandle) resource; -+ response = (OCEntityHandlerResponse *)OICCalloc(1, sizeof(*response)); -+ VERIFY_PARAM_NON_NULL(TAG, response, "Failed allocating OCEntityHandlerResponse"); - -- return OCDoResponse(&response); -+ response->ehResult = ehResult; -+ response->payload = discoveryPayload; -+ response->persistentBufferFlag = 0; -+ response->requestHandle = (OCRequestHandle) request->requestId; -+ response->resourceHandle = (OCResourceHandle) resource; -+ -+ result = OCDoResponse(response); -+ -+ OICFree(response); -+ return result; -+ -+exit: -+ return OC_STACK_NO_MEMORY; - } - - static OCStackResult EHRequest(OCEntityHandlerRequest *ehRequest, OCPayloadType type, diff --git a/net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch b/net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch deleted file mode 100644 index db8ede44..00000000 --- a/net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch +++ /dev/null @@ -1,357 +0,0 @@ -From e8971dd4914c9d42938c4c885b4ac6d784d7e0ff Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Mon, 3 Oct 2016 23:22:36 +0200 -Subject: [PATCH 2/3] csdk: move OCClientResponse from stack to heap - -OCClientResponse is about 50KByte and should not be stored on the -stack. On LEDE with MIPS, musl libc this causes a segmentation fault. -Moving this structure to the heap is the simple solution for this -problem, but this structure should be shrined. - -There are probably more places were this is stored on the stack and -will cause problems. This fixes the other issue I saw in -https://jira.iotivity.org/browse/IOT-1374 - -Change-Id: I45d8aee4a8151fea51d3318acb1eea61ce579060 -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/stack/src/ocstack.c | 163 ++++++++++++++++++++++++-------------- - 1 file changed, 102 insertions(+), 61 deletions(-) - ---- a/resource/csdk/stack/src/ocstack.c -+++ b/resource/csdk/stack/src/ocstack.c -@@ -1042,7 +1042,7 @@ OCStackResult HandlePresenceResponse(con - OCStackApplicationResult cbResult = OC_STACK_DELETE_TRANSACTION; - ClientCB * cbNode = NULL; - char *resourceTypeName = NULL; -- OCClientResponse response = {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}}; -+ OCClientResponse *response = NULL; - OCStackResult result = OC_STACK_ERROR; - uint32_t maxAge = 0; - int uriLen; -@@ -1057,15 +1057,23 @@ OCStackResult HandlePresenceResponse(con - return OC_STACK_ERROR; - } - -- response.payload = NULL; -- response.result = OC_STACK_OK; -+ response = (OCClientResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) -+ { -+ OIC_LOG(ERROR, TAG, "Allocating memory for response failed"); -+ return OC_STACK_ERROR; -+ } -+ response->devAddr.adapter = OC_DEFAULT_ADAPTER; - -- CopyEndpointToDevAddr(endpoint, &response.devAddr); -- FixUpClientResponse(&response); -+ response->payload = NULL; -+ response->result = OC_STACK_OK; -+ -+ CopyEndpointToDevAddr(endpoint, &response->devAddr); -+ FixUpClientResponse(response); - - if (responseInfo->info.payload) - { -- result = OCParsePayload(&response.payload, -+ result = OCParsePayload(&response->payload, - PAYLOAD_TYPE_PRESENCE, - responseInfo->info.payload, - responseInfo->info.payloadSize); -@@ -1075,15 +1083,15 @@ OCStackResult HandlePresenceResponse(con - OIC_LOG(ERROR, TAG, "Presence parse failed"); - goto exit; - } -- if(!response.payload || response.payload->type != PAYLOAD_TYPE_PRESENCE) -+ if(!response->payload || response->payload->type != PAYLOAD_TYPE_PRESENCE) - { - OIC_LOG(ERROR, TAG, "Presence payload was wrong type"); - result = OC_STACK_ERROR; - goto exit; - } -- response.sequenceNumber = ((OCPresencePayload*)response.payload)->sequenceNumber; -- resourceTypeName = ((OCPresencePayload*)response.payload)->resourceType; -- maxAge = ((OCPresencePayload*)response.payload)->maxAge; -+ response->sequenceNumber = ((OCPresencePayload*)response->payload)->sequenceNumber; -+ resourceTypeName = ((OCPresencePayload*)response->payload)->resourceType; -+ maxAge = ((OCPresencePayload*)response->payload)->maxAge; - } - - // check for unicast presence -@@ -1091,6 +1099,7 @@ OCStackResult HandlePresenceResponse(con - responseInfo->isMulticast); - if (uriLen < 0 || (size_t)uriLen >= sizeof (presenceUri)) - { -+ OICFree(response); - return OC_STACK_INVALID_URI; - } - OIC_LOG(ERROR, TAG, "check for unicast presence"); -@@ -1118,7 +1127,7 @@ OCStackResult HandlePresenceResponse(con - - if (presenceSubscribe) - { -- if(cbNode->sequenceNumber == response.sequenceNumber) -+ if(cbNode->sequenceNumber == response->sequenceNumber) - { - OIC_LOG(INFO, TAG, "No presence change"); - ResetPresenceTTL(cbNode, maxAge); -@@ -1129,7 +1138,7 @@ OCStackResult HandlePresenceResponse(con - if(maxAge == 0) - { - OIC_LOG(INFO, TAG, "Stopping presence"); -- response.result = OC_STACK_PRESENCE_STOPPED; -+ response->result = OC_STACK_PRESENCE_STOPPED; - if(cbNode->presence) - { - OICFree(cbNode->presence->timeOut); -@@ -1165,7 +1174,7 @@ OCStackResult HandlePresenceResponse(con - - ResetPresenceTTL(cbNode, maxAge); - -- cbNode->sequenceNumber = response.sequenceNumber; -+ cbNode->sequenceNumber = response->sequenceNumber; - } - } - else -@@ -1175,7 +1184,7 @@ OCStackResult HandlePresenceResponse(con - if (0 == maxAge) - { - OIC_LOG(INFO, TAG, "Stopping presence"); -- response.result = OC_STACK_PRESENCE_STOPPED; -+ response->result = OC_STACK_PRESENCE_STOPPED; - } - } - -@@ -1191,7 +1200,7 @@ OCStackResult HandlePresenceResponse(con - - OIC_LOG(INFO, TAG, "Callback for presence"); - -- cbResult = cbNode->callBack(cbNode->context, cbNode->handle, &response); -+ cbResult = cbNode->callBack(cbNode->context, cbNode->handle, response); - - if (cbResult == OC_STACK_DELETE_TRANSACTION) - { -@@ -1199,7 +1208,8 @@ OCStackResult HandlePresenceResponse(con - } - - exit: -- OCPayloadDestroy(response.payload); -+ OCPayloadDestroy(response->payload); -+ OICFree(response); - return result; - } - -@@ -1240,36 +1250,53 @@ void OCHandleResponse(const CAEndpoint_t - OIC_LOG(INFO, TAG, "Receiving A Timeout for this token"); - OIC_LOG(INFO, TAG, "Calling into application address space"); - -- OCClientResponse response = -- {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}}; -- CopyEndpointToDevAddr(endPoint, &response.devAddr); -- FixUpClientResponse(&response); -- response.resourceUri = responseInfo->info.resourceUri; -- memcpy(response.identity.id, responseInfo->info.identity.id, -- sizeof (response.identity.id)); -- response.identity.id_length = responseInfo->info.identity.id_length; -+ OCClientResponse *response = NULL; -+ -+ response = (OCClientResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) -+ { -+ OIC_LOG(ERROR, TAG, "Allocating memory for response failed"); -+ return; -+ } -+ -+ response->devAddr.adapter = OC_DEFAULT_ADAPTER; -+ CopyEndpointToDevAddr(endPoint, &response->devAddr); -+ FixUpClientResponse(response); -+ response->resourceUri = responseInfo->info.resourceUri; -+ memcpy(response->identity.id, responseInfo->info.identity.id, -+ sizeof (response->identity.id)); -+ response->identity.id_length = responseInfo->info.identity.id_length; - -- response.result = CAResponseToOCStackResult(responseInfo->result); -+ response->result = CAResponseToOCStackResult(responseInfo->result); - cbNode->callBack(cbNode->context, -- cbNode->handle, &response); -+ cbNode->handle, response); - FindAndDeleteClientCB(cbNode); -+ OICFree(response); - } - else - { - OIC_LOG(INFO, TAG, "This is a regular response, A client call back is found"); - OIC_LOG(INFO, TAG, "Calling into application address space"); - -- OCClientResponse response = -- {.devAddr = {.adapter = OC_DEFAULT_ADAPTER}}; -- response.sequenceNumber = MAX_SEQUENCE_NUMBER + 1; -- CopyEndpointToDevAddr(endPoint, &response.devAddr); -- FixUpClientResponse(&response); -- response.resourceUri = responseInfo->info.resourceUri; -- memcpy(response.identity.id, responseInfo->info.identity.id, -- sizeof (response.identity.id)); -- response.identity.id_length = responseInfo->info.identity.id_length; -+ OCClientResponse *response = NULL; - -- response.result = CAResponseToOCStackResult(responseInfo->result); -+ response = (OCClientResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) -+ { -+ OIC_LOG(ERROR, TAG, "Allocating memory for response failed"); -+ return; -+ } -+ -+ response->devAddr.adapter = OC_DEFAULT_ADAPTER; -+ response->sequenceNumber = MAX_SEQUENCE_NUMBER + 1; -+ CopyEndpointToDevAddr(endPoint, &response->devAddr); -+ FixUpClientResponse(response); -+ response->resourceUri = responseInfo->info.resourceUri; -+ memcpy(response->identity.id, responseInfo->info.identity.id, -+ sizeof (response->identity.id)); -+ response->identity.id_length = responseInfo->info.identity.id_length; -+ -+ response->result = CAResponseToOCStackResult(responseInfo->result); - - if(responseInfo->info.payload && - responseInfo->info.payloadSize) -@@ -1359,21 +1386,23 @@ void OCHandleResponse(const CAEndpoint_t - { - OIC_LOG_V(ERROR, TAG, "Unknown Payload type: %d %s", - cbNode->method, cbNode->requestUri); -+ OICFree(response); - return; - } - -- if(OC_STACK_OK != OCParsePayload(&response.payload, -+ if(OC_STACK_OK != OCParsePayload(&response->payload, - type, - responseInfo->info.payload, - responseInfo->info.payloadSize)) - { - OIC_LOG(ERROR, TAG, "Error converting payload"); -- OCPayloadDestroy(response.payload); -+ OCPayloadDestroy(response->payload); -+ OICFree(response); - return; - } - } - -- response.numRcvdVendorSpecificHeaderOptions = 0; -+ response->numRcvdVendorSpecificHeaderOptions = 0; - if(responseInfo->info.numOptions > 0) - { - int start = 0; -@@ -1391,19 +1420,20 @@ void OCHandleResponse(const CAEndpoint_t - observationOption = - (observationOption << 8) | optionData[i]; - } -- response.sequenceNumber = observationOption; -- response.numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions - 1; -+ response->sequenceNumber = observationOption; -+ response->numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions - 1; - start = 1; - } - else - { -- response.numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions; -+ response->numRcvdVendorSpecificHeaderOptions = responseInfo->info.numOptions; - } - -- if(response.numRcvdVendorSpecificHeaderOptions > MAX_HEADER_OPTIONS) -+ if(response->numRcvdVendorSpecificHeaderOptions > MAX_HEADER_OPTIONS) - { - OIC_LOG(ERROR, TAG, "#header options are more than MAX_HEADER_OPTIONS"); -- OCPayloadDestroy(response.payload); -+ OCPayloadDestroy(response->payload); -+ OICFree(response); - return; - } - -@@ -1411,19 +1441,19 @@ void OCHandleResponse(const CAEndpoint_t - { - if(&(responseInfo->info.options[i])) - { -- memcpy (&(response.rcvdVendorSpecificHeaderOptions[i-start]), -+ memcpy (&(response->rcvdVendorSpecificHeaderOptions[i-start]), - &(responseInfo->info.options[i]), sizeof(OCHeaderOption)); - } - } - } - - if (cbNode->method == OC_REST_OBSERVE && -- response.sequenceNumber > OC_OFFSET_SEQUENCE_NUMBER && -+ response->sequenceNumber > OC_OFFSET_SEQUENCE_NUMBER && - cbNode->sequenceNumber <= MAX_SEQUENCE_NUMBER && -- response.sequenceNumber <= cbNode->sequenceNumber) -+ response->sequenceNumber <= cbNode->sequenceNumber) - { - OIC_LOG_V(INFO, TAG, "Received stale notification. Number :%d", -- response.sequenceNumber); -+ response->sequenceNumber); - } - else - { -@@ -1432,13 +1462,13 @@ void OCHandleResponse(const CAEndpoint_t - char *targetUri = strstr(cbNode->requestUri, OC_RSRVD_RD_URI); - if (targetUri) - { -- OCUpdateResourceInsWithResponse(cbNode->requestUri, &response); -+ OCUpdateResourceInsWithResponse(cbNode->requestUri, response); - } - #endif - OCStackApplicationResult appFeedback = cbNode->callBack(cbNode->context, - cbNode->handle, -- &response); -- cbNode->sequenceNumber = response.sequenceNumber; -+ response); -+ cbNode->sequenceNumber = response->sequenceNumber; - - if (appFeedback == OC_STACK_DELETE_TRANSACTION) - { -@@ -1459,7 +1489,8 @@ void OCHandleResponse(const CAEndpoint_t - CA_MSG_ACKNOWLEDGE, 0, NULL, NULL, 0, NULL, CA_RESPONSE_FOR_RES); - } - -- OCPayloadDestroy(response.payload); -+ OCPayloadDestroy(response->payload); -+ OICFree(response); - } - return; - } -@@ -1585,16 +1616,26 @@ void HandleCAErrorResponse(const CAEndpo - errorInfo->info.tokenLength, NULL, NULL); - if (cbNode) - { -- OCClientResponse response = { .devAddr = { .adapter = OC_DEFAULT_ADAPTER } }; -- CopyEndpointToDevAddr(endPoint, &response.devAddr); -- FixUpClientResponse(&response); -- response.resourceUri = errorInfo->info.resourceUri; -- memcpy(response.identity.id, errorInfo->info.identity.id, -- sizeof (response.identity.id)); -- response.identity.id_length = errorInfo->info.identity.id_length; -- response.result = CAResultToOCResult(errorInfo->result); -+ OCClientResponse *response = NULL; -+ -+ response = (OCClientResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) -+ { -+ OIC_LOG(ERROR, TAG, "Allocating memory for response failed"); -+ return; -+ } -+ -+ response->devAddr.adapter = OC_DEFAULT_ADAPTER; -+ CopyEndpointToDevAddr(endPoint, &response->devAddr); -+ FixUpClientResponse(response); -+ response->resourceUri = errorInfo->info.resourceUri; -+ memcpy(response->identity.id, errorInfo->info.identity.id, -+ sizeof (response->identity.id)); -+ response->identity.id_length = errorInfo->info.identity.id_length; -+ response->result = CAResultToOCResult(errorInfo->result); - -- cbNode->callBack(cbNode->context, cbNode->handle, &response); -+ cbNode->callBack(cbNode->context, cbNode->handle, response); -+ OICFree(response); - } - - ResourceObserver *observer = GetObserverUsingToken(errorInfo->info.token, diff --git a/net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch b/net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch deleted file mode 100644 index 523cfe1a..00000000 --- a/net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 7fb5b6a19b06dc5b0a7f32261551b206b1e6a563 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 8 Jan 2017 19:24:26 +0100 -Subject: [PATCH 3/3] src: move OCClientResponse from stack to heap - -OCClientResponse is about 50KByte and should not be stored on the -stack. On LEDE with MIPS, musl libc this causes a segmentation fault. -Moving this structure to the heap is the simple solution for this -problem, but this structure should be shrinked. - -Change-Id: I7887f93450f45b8031fcdfffb9ee2214fc3d5dd2 -Signed-off-by: Hauke Mehrtens ---- - resource/src/InProcServerWrapper.cpp | 44 +++++++++++++++++++++--------------- - 1 file changed, 26 insertions(+), 18 deletions(-) - ---- a/resource/src/InProcServerWrapper.cpp -+++ b/resource/src/InProcServerWrapper.cpp -@@ -568,51 +568,58 @@ namespace OC - } - else - { -- OCEntityHandlerResponse response; -+ OCEntityHandlerResponse *response = NULL; -+ -+ response = (OCEntityHandlerResponse *)OICCalloc(1, sizeof(*response)); -+ if (!response) { -+ result = OC_STACK_MALFORMED_RESPONSE; -+ throw OCException(OC::Exception::STR_NULL_RESPONSE, OC_STACK_MALFORMED_RESPONSE); -+ } -+ - // OCRepPayload* payLoad = pResponse->getPayload(); - HeaderOptions serverHeaderOptions = pResponse->getHeaderOptions(); - -- response.requestHandle = pResponse->getRequestHandle(); -- response.resourceHandle = pResponse->getResourceHandle(); -- response.ehResult = pResponse->getResponseResult(); -+ response->requestHandle = pResponse->getRequestHandle(); -+ response->resourceHandle = pResponse->getResourceHandle(); -+ response->ehResult = pResponse->getResponseResult(); - -- response.payload = reinterpret_cast(pResponse->getPayload()); -+ response->payload = reinterpret_cast(pResponse->getPayload()); - -- response.persistentBufferFlag = 0; -+ response->persistentBufferFlag = 0; - -- response.numSendVendorSpecificHeaderOptions = serverHeaderOptions.size(); -+ response->numSendVendorSpecificHeaderOptions = serverHeaderOptions.size(); - int i = 0; - for (auto it=serverHeaderOptions.begin(); it != serverHeaderOptions.end(); ++it) - { -- response.sendVendorSpecificHeaderOptions[i].protocolID = OC_COAP_ID; -- response.sendVendorSpecificHeaderOptions[i].optionID = -+ response->sendVendorSpecificHeaderOptions[i].protocolID = OC_COAP_ID; -+ response->sendVendorSpecificHeaderOptions[i].optionID = - static_cast(it->getOptionID()); -- response.sendVendorSpecificHeaderOptions[i].optionLength = -+ response->sendVendorSpecificHeaderOptions[i].optionLength = - (it->getOptionData()).length() + 1; - std::string optionData = it->getOptionData(); - std::copy(optionData.begin(), - optionData.end(), -- response.sendVendorSpecificHeaderOptions[i].optionData); -- response.sendVendorSpecificHeaderOptions[i].optionData[it->getOptionData().length()] -+ response->sendVendorSpecificHeaderOptions[i].optionData); -+ response->sendVendorSpecificHeaderOptions[i].optionData[it->getOptionData().length()] - = '\0'; - i++; - } - -- if(OC_EH_RESOURCE_CREATED == response.ehResult) -+ if(OC_EH_RESOURCE_CREATED == response->ehResult) - { -- pResponse->getNewResourceUri().copy(response.resourceUri, -- sizeof (response.resourceUri) - 1); -- response.resourceUri[pResponse->getNewResourceUri().length()] = '\0'; -+ pResponse->getNewResourceUri().copy(response->resourceUri, -+ sizeof (response->resourceUri) - 1); -+ response->resourceUri[pResponse->getNewResourceUri().length()] = '\0'; - } - - if(cLock) - { - std::lock_guard lock(*cLock); -- result = OCDoResponse(&response); -+ result = OCDoResponse(response); - } - else - { -- OICFree(response.payload); -+ OICFree(response->payload); - result = OC_STACK_ERROR; - } - -@@ -620,6 +627,7 @@ namespace OC - { - oclog() << "Error sending response\n"; - } -+ OICFree(response); - return result; - } - } diff --git a/net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch b/net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch deleted file mode 100644 index 903cb72b..00000000 --- a/net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 261cf19bfa3dea10ed0f2ebbb2d945c19c9a2804 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 4 Dec 2016 00:18:37 +0100 -Subject: [PATCH 5/7] ssl: fix compilation against non debug mbedtls - -The function mbedtls_debug_set_threshold() is only available when -MBEDTLS_DEBUG_C is set. make the call depend on this condition. - -Change-Id: I8158bc4c55b428167e36084e7a46359c269c5fc7 -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -@@ -1278,8 +1278,10 @@ static int InitConfig(mbedtls_ssl_config - - #if !defined(NDEBUG) || defined(TB_LOG) - mbedtls_ssl_conf_dbg(conf, DebugSsl, NULL); -+#if defined(MBEDTLS_DEBUG_C) - mbedtls_debug_set_threshold(MBED_TLS_DEBUG_LEVEL); - #endif -+#endif - OIC_LOG_V(DEBUG, NET_SSL_TAG, "Out %s", __func__); - return 0; - } diff --git a/net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch b/net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch deleted file mode 100644 index 83aec074..00000000 --- a/net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cee085e0e62214603b9ae035d63fabca23c491bd Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 8 Jan 2017 01:39:35 +0100 -Subject: [PATCH 6/7] ssl: call mbedtls_version_get_string() only if available - -The function mbedtls_version_get_string() is only available if -MBEDTLS_VERSION_C is set in the mbedtls configuration. Check this -before calling this function and print the mbedtls version this was -compiled against instead if mbedtls_version_get_string() is not -available. - -This fixes a compile problem when MBEDTLS_VERSION_C is not set. - -Change-Id: I54c2c2a3fc1f9d35afa475500e3db68420a1b54a -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -@@ -1376,9 +1376,13 @@ CAResult_t CAinitSslAdapter() - /* Initialize TLS library - */ - #if !defined(NDEBUG) || defined(TB_LOG) -+#ifdef MBEDTLS_VERSION_C - char version[MBED_TLS_VERSION_LEN]; - mbedtls_version_get_string(version); - OIC_LOG_V(INFO, NET_SSL_TAG, "mbed TLS version: %s", version); -+#else -+ OIC_LOG_V(INFO, NET_SSL_TAG, "mbed TLS version: %s", MBEDTLS_VERSION_STRING); -+#endif - #endif - - /* Entropy settings diff --git a/net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch b/net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch deleted file mode 100644 index 2e2ccb04..00000000 --- a/net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3684ac3720f91dc131c1c61689395a69ae1865f9 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 8 Jan 2017 20:31:18 +0100 -Subject: [PATCH 7/7] ssl: call mbedtls_ssl_conf_renegotiation() only if - available - -The function mbedtls_ssl_conf_renegotiation() is only available if -MBEDTLS_SSL_RENEGOTIATION is set in the mbedtls configuration. Check this -before calling this function. - -This fixes a compile problem when MBEDTLS_SSL_RENEGOTIATION is not set. - -Change-Id: I69f15359d2dcaed1e4fe56fc7799737e38d6c2e7 -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -@@ -1273,7 +1273,9 @@ static int InitConfig(mbedtls_ssl_config - mbedtls_ssl_conf_rng(conf, mbedtls_ctr_drbg_random, &g_caSslContext->rnd); - mbedtls_ssl_conf_curves(conf, curve[ADAPTER_CURVE_SECP256R1]); - mbedtls_ssl_conf_min_version(conf, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3); -+#ifdef MBEDTLS_SSL_RENEGOTIATION - mbedtls_ssl_conf_renegotiation(conf, MBEDTLS_SSL_RENEGOTIATION_DISABLED); -+#endif - mbedtls_ssl_conf_authmode(conf, MBEDTLS_SSL_VERIFY_REQUIRED); - - #if !defined(NDEBUG) || defined(TB_LOG) diff --git a/net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch b/net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch deleted file mode 100644 index 0cbd1ed1..00000000 --- a/net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 01796db0b166e720860eff200acabff410ba6979 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 4 Dec 2016 00:15:21 +0100 -Subject: [PATCH 4/7] ssl: enable usage of patched mbed functions conditionally - -Only activate support for the MBEDTLS_KEY_EXCHANGE_ECDH_ANON_ENABLED -cipher suite when this is actually available in mbedtls. -This makes it possible to compile IoTivity against a unpatched mbedtls -version. - -Change-Id: Ic56d7faf7597cc5dc08f9d55be29dde898949609 -Signed-off-by: Hauke Mehrtens ---- - resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -+++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c -@@ -237,7 +237,9 @@ int tlsCipher[ADAPTER_CIPHER_MAX][2] = - { - {MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, 0}, - {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, 0}, -+#ifdef MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256 - {MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256, 0}, -+#endif - {MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, 0}, - {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, 0}, - {MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, 0} -@@ -1943,6 +1945,7 @@ CAResult_t CAsetTlsCipherSuite(const uin - g_caSslContext->cipher = ADAPTER_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8; - break; - } -+#ifdef MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256 - case MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256: - { - #ifdef __WITH_TLS__ -@@ -1960,6 +1963,7 @@ CAResult_t CAsetTlsCipherSuite(const uin - g_caSslContext->cipher = ADAPTER_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA_256; - break; - } -+#endif - case MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256: - { - #if 0 // PIN OTM diff --git a/net/iotivity/patches/078-use-system-mbedtls.patch b/net/iotivity/patches/078-use-system-mbedtls.patch deleted file mode 100644 index d19c688b..00000000 --- a/net/iotivity/patches/078-use-system-mbedtls.patch +++ /dev/null @@ -1,22 +0,0 @@ -Make it possible to use system mbedtls version - ---- a/resource/csdk/connectivity/src/SConscript -+++ b/resource/csdk/connectivity/src/SConscript -@@ -73,16 +73,7 @@ if env.get('SECURED') == '1': - env.AppendUnique(CPPPATH = [src_dir + '/resource/csdk/security/include']) - env.AppendUnique(CPPDEFINES = ['__WITH_DTLS__']) - env.AppendUnique(CPPPATH = [os.path.join(root_dir, 'external/inc')]) -- tls_path = 'extlibs/mbedtls'; -- tls_headers_path = 'mbedtls/include'; -- if ca_os == 'tizen' and os.path.exists(root_dir + '/' + tls_path): -- env.SConscript(os.path.join(root_dir, tls_path + '/SConscript')) -- env.AppendUnique(CPPPATH = [os.path.join(root_dir, tls_path + '/' + tls_headers_path)]) -- else: -- if ca_os != 'android': -- env.SConscript('#' + tls_path + '/SConscript') -- env.AppendUnique(CPPPATH = ['#' + tls_path + '/' + tls_headers_path]) -- env.AppendUnique(CA_SRC = [os.path.join(ca_path, 'adapter_util/ca_adapter_net_ssl.c')]) -+ env.AppendUnique(CA_SRC = [os.path.join(ca_path, 'adapter_util/ca_adapter_net_ssl.c')]) - - if ((secured == '1') and (with_tcp == True)): - env.AppendUnique(CPPDEFINES = ['__WITH_TLS__']) diff --git a/net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch b/net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch deleted file mode 100644 index e5a95f04..00000000 --- a/net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch +++ /dev/null @@ -1,31 +0,0 @@ -From df8360447163762c63994dcb07f9e69a5a365a1c Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 8 Jan 2017 22:01:57 +0100 -Subject: [PATCH 8/8] zigbee_wrapper: do not check for floating point - -This makes the compile fail for soft float builds. In such builds the -double is still 64 bit long. - -Change-Id: I45d3f19b49f5d23d2b65307738a362765c5ea1c2 -Signed-off-by: Hauke Mehrtens ---- - plugins/zigbee_wrapper/src/zigbee_wrapper.c | 8 -------- - 1 file changed, 8 deletions(-) - ---- a/plugins/zigbee_wrapper/src/zigbee_wrapper.c -+++ b/plugins/zigbee_wrapper/src/zigbee_wrapper.c -@@ -37,14 +37,6 @@ - #include - #include - --// The following #define must be here under "math.h". --// This ifdef ensures that "__STDC_IEC_559__" is defined. If it is defined, --// then we are guaranteed that the 'double' type is 64-bit. Otherwise, the --// compilation of this file should fail because we are no longer guaranteed. --#ifndef __STDC_IEC_559__ --#error "Requires IEEE 754 floating point!" --#endif -- - #include "zigbee_wrapper.h" - #include "telegesis_wrapper.h" - #include "pluginlist.h" diff --git a/net/iotivity/patches/140-remove-glib2.patch b/net/iotivity/patches/140-remove-glib2.patch deleted file mode 100644 index 1b009db9..00000000 --- a/net/iotivity/patches/140-remove-glib2.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript -+++ b/resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript -@@ -73,7 +73,6 @@ env.AppendUnique( - - # The Linux BLE adapter implementation uses GDBus to make D-Bus based - # method calls to BlueZ. Pull in the necessary dependencies. --env.ParseConfig("pkg-config gio-unix-2.0 --cflags --libs") - - # Set up commands to generate GDBus code from the D-Bus introspection - # XML. ---- a/resource/csdk/security/provisioning/sample/SConscript -+++ b/resource/csdk/security/provisioning/sample/SConscript -@@ -70,7 +70,6 @@ if target_os not in ['windows']: - - if target_os not in ['msys_nt', 'windows']: - provisioning_env.AppendUnique(LIBS = ['dl', 'm']) -- provisioning_env.ParseConfig('pkg-config --libs glib-2.0'); - provisioning_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) - else: - provisioning_env.AppendUnique(LIBPATH = [os.path.join(env.get('BUILD_DIR'), 'resource', 'csdk')]) ---- a/resource/csdk/security/provisioning/SConscript -+++ b/resource/csdk/security/provisioning/SConscript -@@ -73,9 +73,6 @@ provisioning_env.PrependUnique(LIBS = [' - provisioning_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto']) - - --if target_os not in ['msys_nt', 'windows', 'android', 'ios']: -- provisioning_env.ParseConfig('pkg-config --libs glib-2.0') -- - if target_os in ['windows', 'msys_nt']: - provisioning_env.AppendUnique(LIBS = ['ws2_32', 'advapi32', 'iphlpapi']) - diff --git a/net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch b/net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch deleted file mode 100644 index 4bcd322a..00000000 --- a/net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ce27d50b9c11386242487852f14b025ed6c67701 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Wed, 19 Aug 2015 16:47:21 +0200 -Subject: [PATCH 14/14] examples: OICMiddle: try to load security - configuration by default - -Load the security configuration from the default location by default. -When it is not found security will just not work. - -Signed-off-by: Hauke Mehrtens ---- - examples/OICMiddle/OICMiddle.cpp | 9 ++++++++- - examples/OICMiddle/OICMiddle.h | 1 + - 2 files changed, 9 insertions(+), 1 deletion(-) - ---- a/examples/OICMiddle/OICMiddle.cpp -+++ b/examples/OICMiddle/OICMiddle.cpp -@@ -99,8 +99,15 @@ void Middle::startPlatform() - //std::string ipaddr = INADDR_ANY; - std::string ipaddr = "0.0.0.0"; - -+ // Initialize Persistent Storage for SVR database -+ middle.ps.open = fopen; -+ middle.ps.read = fread; -+ middle.ps.write = fwrite; -+ middle.ps.close = fclose; -+ middle.ps.unlink = unlink; -+ - PlatformConfig cfg { ServiceType::InProc, ModeType::Both, -- ipaddr, port, QualityOfService::LowQos}; -+ ipaddr, port, QualityOfService::LowQos, &middle.ps}; - - OC::OCPlatform::Configure(cfg); - } ---- a/examples/OICMiddle/OICMiddle.h -+++ b/examples/OICMiddle/OICMiddle.h -@@ -83,6 +83,7 @@ protected: - MiddleServer *m_server; - LineInput *m_lineInput; - RestInput *m_restInput; -+ OCPersistentStorage ps; - - protected: - void startPlatform(); diff --git a/net/iotivity/patches/300-resource-Include-functional-header-for-g-7.1.0.patch b/net/iotivity/patches/300-resource-Include-functional-header-for-g-7.1.0.patch deleted file mode 100644 index 13102ce6..00000000 --- a/net/iotivity/patches/300-resource-Include-functional-header-for-g-7.1.0.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 26c2798188497da22e0a70efebc47991dd755db2 Mon Sep 17 00:00:00 2001 -From: Philippe Coval -Date: Wed, 28 Jun 2017 04:54:05 +0200 -Subject: [PATCH] resource: Include functional header for g++-7.1.0 - -It was tested on yocto poky master on iotivity-1.2.1 (and later): - - resource/include/OCUtilities.h: \ - In function 'OCStackResult OC::nil_guard(PtrT&&, FnT&&, ParamTs&& ...)': - resource/include/OCUtilities.h:85:21: \ - error: 'bind' is not a member of 'std' - return std::bind(fn, p, std::ref(params)...)(); - - resource/include/OCApi.h: At global scope: - resource/include/OCApi.h:362:18: \ - error: 'function' in namespace 'std' does not name a template type - typedef std::function)> FindCallback; - -Change-Id: Ie1cab497c33fde394f77490a1d636eb36a563396 -Origin: https://gerrit.iotivity.org/gerrit/#/c/21069/ -Signed-off-by: Philippe Coval -Reviewed-on: https://gerrit.iotivity.org/gerrit/21067 -Reviewed-by: Thiago Macieira -Tested-by: jenkins-iotivity ---- - resource/include/OCApi.h | 2 -- - resource/include/OCUtilities.h | 1 + - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/resource/include/OCApi.h b/resource/include/OCApi.h -index 4e14f29cc..af9721554 100644 ---- a/resource/include/OCApi.h -+++ b/resource/include/OCApi.h -@@ -27,9 +27,7 @@ - #include - #include - #include --#if defined(_MSC_VER) - #include --#endif - - #include "octypes.h" - #include "OCHeaderOption.h" -diff --git a/resource/include/OCUtilities.h b/resource/include/OCUtilities.h -index 85039d0c1..f1c93045f 100644 ---- a/resource/include/OCUtilities.h -+++ b/resource/include/OCUtilities.h -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - - #include - #include --- -2.17.1 - diff --git a/net/ipsec-tools/Makefile b/net/ipsec-tools/Makefile deleted file mode 100644 index a987fceb..00000000 --- a/net/ipsec-tools/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# 2014 Noah Meyerhans -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=ipsec-tools -PKG_VERSION:=0.8.2 -PKG_RELEASE:=7 -PKG_MAINTAINER:=Noah Meyerhans , \ - Vitaly Protsko -PKG_LICENSE := BSD-3-Clause - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/ipsec-tools -PKG_HASH:=8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/ipsec-tools - SECTION:=net - CATEGORY:=Network - SUBMENU:=VPN - DEPENDS:=+libopenssl +kmod-ipsec - TITLE:=IPsec management tools - URL:=http://ipsec-tools.sourceforge.net/ - MAINTAINER:=Noah Meyerhans -endef - -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --with-kernel-headers="$(LINUX_DIR)/include" \ - --without-readline \ - --with-openssl="$(STAGING_DIR)/usr" \ - --without-libradius \ - --without-libpam \ - --enable-dpd \ - --enable-hybrid \ - --enable-security-context=no \ - --enable-natt \ - --enable-adminport \ - --enable-frag \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) - -# override CFLAGS holding "-Werror" that break builds on compile warnings -MAKE_FLAGS+=\ - CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" - -define Build/Prepare - $(call Build/Prepare/Default) - chmod -R u+w $(PKG_BUILD_DIR) -endef - -define Build/Configure - (cd $(PKG_BUILD_DIR); touch \ - configure.ac \ - aclocal.m4 \ - Makefile.in \ - config.h.in \ - configure \ - ); - $(call Build/Configure/Default) -ifndef CONFIG_SHADOW_PASSWORDS - echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h -endif -endef - -define Package/ipsec-tools/install - $(INSTALL_DIR) $(1)/etc/racoon - $(INSTALL_CONF) ./files/functions.sh $(1)/etc/racoon/ - $(INSTALL_BIN) ./files/p1client-up $(1)/etc/racoon/ - $(INSTALL_BIN) ./files/p1client-down $(1)/etc/racoon/ - $(INSTALL_BIN) ./files/vpnctl $(1)/etc/racoon/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/racoon.init $(1)/etc/init.d/racoon - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/racoon $(1)/etc/config/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/ -endef - -define Package/ipsec-tools/conffiles -/etc/config/racoon -endef - -$(eval $(call BuildPackage,ipsec-tools)) diff --git a/net/ipsec-tools/files/functions.sh b/net/ipsec-tools/files/functions.sh deleted file mode 100644 index 45715b5a..00000000 --- a/net/ipsec-tools/files/functions.sh +++ /dev/null @@ -1,172 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2015 Vitaly Protsko - -errno=0 - -get_fieldval() { - local __data="$3" - local __rest - - test -z "$1" && return - - while true ; do - __rest=${__data#* } - test "$__rest" = "$__data" && break - - if [ "${__data/ *}" = "$2" ]; then - eval "$1=${__rest/ *}" - break - fi - - __data="$__rest" - done -} - -manage_fw() { - local cmd=/usr/sbin/iptables - local mode - local item - - if [ -z "$4" ]; then - $log "Bad usage of manage_fw" - errno=3; return 3 - fi - - case "$1" in - add|up|1) mode=A ;; - del|down|0) mode=D ;; - *) return 3 ;; - esac - - for item in $4 ; do - $cmd -$mode forwarding_$2_rule -s $item -j ACCEPT - $cmd -$mode output_$3_rule -d $item -j ACCEPT - $cmd -$mode forwarding_$3_rule -d $item -j ACCEPT - $cmd -t nat -$mode postrouting_$3_rule -d $item -j ACCEPT - done -} - -manage_sa() { - local spdcmd - local rtcmd - local gate - local litem - local ritem - - if [ -z "$4" ]; then - $log "Bad usage of manage_sa" - errno=3; return 3 - fi - - case "$1" in - add|up|1) spdcmd=add; rtcmd=add ;; - del|down|0) spdcmd=delete; rtcmd=del ;; - *) errno=3; return 3 ;; - esac - - get_fieldval gate src "$(/usr/sbin/ip route get $4)" - if [ -z "$gate" ]; then - $log "Can not find outbound IP for $4" - errno=3; return 3 - fi - - - for litem in $2 ; do - for ritem in $3 ; do - echo " -spd$spdcmd $litem $ritem any -P out ipsec esp/tunnel/$gate-$4/require; -spd$spdcmd $ritem $litem any -P in ipsec esp/tunnel/$4-$gate/require; -" | /usr/sbin/setkey -c 1>&2 - done - done - - test -n "$5" && gate=$5 - - for ritem in $3 ; do - (sleep 3; /usr/sbin/ip route $rtcmd $ritem via $gate) & - done -} - -manage_nonesa() { - local spdcmd - local item - local cout cin - - if [ -z "$4" ]; then - $log "Bad usage of manage_nonesa" - errno=3; return 3 - fi - - case "$1" in - add|up|1) spdcmd=add ;; - del|down|0) spdcmd=delete ;; - *) errno=3; return 3 ;; - esac - - case "$2" in - local|remote) ;; - *) errno=3; return 3 ;; - esac - - for item in $3 ; do - if [ "$2" = "local" ]; then - cout="$4 $item" - cin="$item $4" - else - cout="$item $4" - cin="$4 $item" - fi - echo " -spd$spdcmd $cout any -P out none; -spd$spdcmd $cin any -P in none; -" | /usr/sbin/setkey -c 1>&2 - done -} - -. /lib/functions/network.sh - -get_zoneiflist() { - local item - local data - local addr - - item=0 - data=$(uci get firewall.@zone[0].name) - while [ -n "$data" ]; do - test "$data" = "$1" && break - let "item=$item+1" - data=$(uci get firewall.@zone[$item].name) - done - - if [ -z "$data" ]; then - errno=1 - return $errno - fi - data=$(uci get firewall.@zone[$item].network) - - echo "$data" -} - -get_zoneiplist() { - local item - local addr - local data - local result - - data=$(get_zoneiflist $1) - test $? -gt 0 -o $errno -gt 0 -o -z "$data" && return $errno - - for item in $data ; do - if network_is_up $item ; then - network_get_ipaddrs addr $item - test $? -eq 0 && result="$result $addr" - fi - done - - result=$(echo $result) - echo "$result" -} - - -# EOF /etc/racoon/functions.sh diff --git a/net/ipsec-tools/files/p1client-down b/net/ipsec-tools/files/p1client-down deleted file mode 100644 index 8c5a1951..00000000 --- a/net/ipsec-tools/files/p1client-down +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# - -log="logger -t p1client-down[$$]" - -. /lib/functions.sh -. /etc/racoon/functions.sh - -if [ -z "$SPLIT_INCLUDE_CIDR" ]; then - $log "Connection without server-pushed routing is not supported" - exit 1 -fi - -$log "Shutting down tunnel to server $REMOTE_ADDR" -$log "Closing tunnel(-s) to $SPLIT_INCLUDE_CIDR through $INTERNAL_ADDR4" - -config_load racoon -config_get confIntZone racoon int_zone lan -config_get confExtZone racoon ext_zone wan - -manage_fw del $confIntZone $confExtZone "$INTERNAL_ADDR4 $SPLIT_INCLUDE_CIDR" - -data=$(get_zoneiflist $confIntZone) -if [ -n "$data" ]; then - for item in $data ; do - network_get_subnet locnet $item - if [ -n "$locnet" ]; then - manage_sa del "$locnet" "$SPLIT_INCLUDE_CIDR" $REMOTE_ADDR $INTERNAL_ADDR4 - else - $log "Can not find subnet on interface $item" - fi - done -else - $log "Can not find subnets in zone $confIntZone" -fi - -get_fieldval data dev "$(/usr/sbin/ip route get $REMOTE_ADDR)" -ip address del $INTERNAL_ADDR4/32 dev $data - - -# EOF /etc/racoon/p1client-down diff --git a/net/ipsec-tools/files/p1client-up b/net/ipsec-tools/files/p1client-up deleted file mode 100644 index 8a9678a4..00000000 --- a/net/ipsec-tools/files/p1client-up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# - -log="logger -t p1client-up[$$]" - -. /lib/functions.sh -. /etc/racoon/functions.sh - -if [ -z "$SPLIT_INCLUDE_CIDR" ]; then - $log "Connection without server-pushed routing is not supported" - exit 1 -fi - -$log "Setting up tunnel to server $REMOTE_ADDR" -$log "Making tunnel(-s) to $SPLIT_INCLUDE_CIDR through $INTERNAL_ADDR4" - -get_fieldval data dev "$(/usr/sbin/ip route get $REMOTE_ADDR)" -ip address add $INTERNAL_ADDR4/32 dev $data - -config_load racoon -config_get confIntZone racoon int_zone lan -config_get confExtZone racoon ext_zone wan - -data=$(get_zoneiflist $confIntZone) -if [ -n "$data" ]; then - for item in $data ; do - network_get_subnet locnet $item - if [ -n "$locnet" ]; then - manage_sa add "$locnet" "$SPLIT_INCLUDE_CIDR" $REMOTE_ADDR $INTERNAL_ADDR4 - else - $log "Can not find subnet on interface $item" - fi - done -else - $log "Can not find interfaces in zone $confIntZone" -fi - -manage_fw add $confIntZone $confExtZone "$INTERNAL_ADDR4 $SPLIT_INCLUDE_CIDR" - - -# EOF /etc/racoon/p1client-up diff --git a/net/ipsec-tools/files/racoon b/net/ipsec-tools/files/racoon deleted file mode 100644 index e2c8400b..00000000 --- a/net/ipsec-tools/files/racoon +++ /dev/null @@ -1,113 +0,0 @@ -#/etc/config/racoon -# -# Copyright 2015 Vitaly Protsko - -# * WARNING: this is "not working" example -# * Defaults are commented out -# * Resuting config will appear in /var/racoon/ - -config racoon -# option debug 0 -# option ext_zone 'wan' -# option int_zone 'lan' -# option port 500 -# option natt_port 4500 -# following 4 or 6, no default -# option ipversion 4 - -config p1_proposal 'example_prop1' -# option lifetime 28800 - option enc_alg 'aes' - option hash_alg 'sha1' - option auth_method 'rsasig' - option dh_group 2 - -config p1_proposal 'example_anon' -# option lifetime 28800 - option enc_alg 'aes' - option hash_alg 'sha1' - option auth_method 'xauth_rsa_server' - option dh_group 2 - -config p1_proposal 'example_xauth' -# option lifetime 28800 - option enc_alg 'aes' - option hash_alg 'sha1' - option auth_method 'xauth_rsa_client' - option dh_group 2 - -config p2_proposal 'example_prop2' - option pfs_group 2 - option enc_alg 'aes' - option auth_alg 'hmac_sha1' - -config p2_proposal 'example_in2' - option pfs_group 2 -# option lifetime 14400 - option enc_alg 'aes' - option auth_alg 'hmac_sha1' - -config sainfo 'office' - option p2_proposal 'example_prop2' - option local_net '192.168.8.0/24' - option remote_net '192.168.1.0/24' -# you can exclude some local or remote -# addresses from SA rules - list local_exclude '192.168.8.0/30' - list remote_exclude '192.168.1.128/29' - -config sainfo 'welcome' - option p2_proposal 'example_in2' - option local_net '192.168.8.0/24' - option remote_net '192.168.10.0/24' - option dns4 '192.168.8.1' - option defdomain 'myhome.local' - -config sainfo 'client' - option p2_proposal 'std_p2' - -config tunnel 'Office' - option enabled 1 -# initial_contact -# option init 1 - option remote 'vpn.example.tld' - option exchange_mode 'main' - option certificate 'example_cert' -# option peer_id_type 'asn1dn' -# option prop_check 'obey' -# option verify_id 1 -# option weak_p1check 1 -# option dpd_delay '' - list p1_proposal 'example_prop1' - list sainfo 'office' - -# WARNING: Only ONE tunnel with remote anonymous -# can be configured and it can have only -# ONE sainfo. Otherwise resulting racoon -# configuration will be unusable -config tunnel 'Incoming' - option enabled 1 - option remote 'anonymous' - option pre_shared_key 'testitnow' - option exchange_mode 'aggressive,main' - option my_id_type 'fqdn' - option my_id 'myserver.homeip.net' - list p1_proposal 'example_anon' - list sainfo 'welcome' - -config tunnel 'Client' - option enabled 1 - option remote 'vpn.example.tld' - option username 'testuser' - option password 'testW0rD' -# option mode_cfg 1 - list p1_proposal 'example_xauth' - list sainfo 'client' - -# Insert corresponding data in PEM format as one line -config 'certificate' 'example_cert' - option 'key' '-----BEGIN PRIVATE KEY----- ~ -----END PRIVATE KEY-----' - option 'crt' '-----BEGIN CERTIFICATE----- ~ -----END CERTIFICATE-----' - -config 'certificate' 'example_ca_cert' - option 'crt' '-----BEGIN CERTIFICATE----- ~ -----END CERTIFICATE-----' diff --git a/net/ipsec-tools/files/racoon.init b/net/ipsec-tools/files/racoon.init deleted file mode 100644 index 247bdfc6..00000000 --- a/net/ipsec-tools/files/racoon.init +++ /dev/null @@ -1,479 +0,0 @@ -#!/bin/sh /etc/rc.common -# -# Copyright (C) 2015 Vitaly Protsko - -#set -vx - -USE_PROCD=1 - -START=60 -STOP=40 - -let connWait=2/2 -confDir=/var/racoon -confExtZone= -confIntZone= -confPort= -confNATPort= -confIPMode= - -confPh1ID=0 - -log="logger -t init.d/racoon[$$] " - -. /etc/racoon/functions.sh - -setup_load() { - config_get confExtZone "$1" ext_zone wan - config_get confIntZone "$1" int_zone lan - config_get confPort "$1" port 500 - config_get confNATPort "$1" natt_port 4500 - config_get confIPMode "$1" ipversion "" - - case X$confIPMode in - X4|X6) ;; - *) unset confIPMode ;; - esac -} - -write_header() { - echo " -# autogenerated, don't edit, look at /etc/config/racoon -# -path certificate \"$confDir/cert\"; -path script \"/etc/racoon\"; -path pre_shared_key \"$confDir/psk.txt\"; -path pidfile \"$confDir/racoon.pid\"; -padding { maximum_length 20; randomize off; strict_check off; exclusive_tail off; } -timer { counter 5; interval 20 sec; persend 1; phase1 30 sec; phase2 15 sec; } -" -} - -setup_conf() { - local conf=$confDir/racoon.conf - local peerconf=$confDir/peers.txt - local pskconf=$confDir/psk.txt - local item - local data - - data="$(get_zoneiplist $confExtZone)" - if [ "X$data" = X ]; then - $log "No IP addresses found for zone $confExtZone, exitng" - errno=2; return 2 - fi - - write_header > $conf - echo -n > $peerconf - echo -n > $pskconf - chmod 0600 $conf $peerconf $pskconf - - echo "listen {" >> $conf - for item in $data ; do - echo " isakmp $item [$confPort]; isakmp_natt $item [$confNATPort];" >> $conf - done - echo "}" >> $conf - - config_get_bool item "$1" debug 0 - data=warning - test $item -ne 0 && data=debug - echo "log $data;" >> $conf - - setup_fw add -} - -setup_p1() { - local conf=$confDir/racoon.conf - local data - - echo " proposal {" >> $conf - config_get data "$1" lifetime 28800 - echo " lifetime time $data sec;" >> $conf - - config_get data "$1" enc_alg - test -n "$data" && echo " encryption_algorithm $data;" >> $conf - - config_get data "$1" hash_alg - test -n "$data" && echo " hash_algorithm $data;" >> $conf - - config_get data "$1" auth_method - test -n "$data" && echo " authentication_method $data;" >> $conf - - config_get data "$1" dh_group 2 - echo -e " dh_group $data;\n }" >> $conf -} - -setup_fw() { - local cmd=/usr/sbin/iptables - local mode - - case "$1" in - add|up|1) mode=A ;; - del|down|0) mode=D ;; - *) return 3 ;; - esac - - $cmd -$mode input_${confExtZone}_rule -p AH -j ACCEPT - $cmd -$mode input_${confExtZone}_rule -p ESP -j ACCEPT - $cmd -$mode input_${confExtZone}_rule -p UDP --dport $confPort -j ACCEPT - $cmd -$mode input_${confExtZone}_rule -p UDP --dport $confNATPort -j ACCEPT -} - -setup_sa() { - local conf=$confDir/racoon.conf - local remote="${2/ *}" - local client="${2#* }" - local locnet - local remnet - local p2 - local data - - test "$2" = "$client" && unset client - - if [ -z "$client" ]; then - config_get locnet "$1" local_net - config_get remnet "$1" remote_net - if [ -z "$locnet" ] || [ -z "$remnet" ]; then - $log "Remote and local networks for $1 must be configured ($2)" - errno=4; return 4 - fi - - if [ "$remote" = "anonymous" ]; then - echo "sainfo anonymous {" >> $conf - else - echo "sainfo address $locnet any address $remnet any {" >> $conf - fi - else - echo "sainfo anonymous {" >> $conf - fi - - config_get p2 "$1" p2_proposal - if [ -z "$p2" ]; then - $log "Phase2 proposal must be configured in $1 sainfo" - errno=5; return 5 - fi - - echo " remoteid $confPh1ID;" >> $conf - - config_get data "$p2" pfs_group - test -n "$data" && echo " pfs_group $data;" >> $conf - config_get data "$p2" lifetime 14400 - test -n "$data" && echo " lifetime time $data sec;" >> $conf - config_get data "$p2" enc_alg - test -n "$data" && echo " encryption_algorithm $data;" >> $conf - config_get data "$p2" auth_alg - test -n "$data" && echo " authentication_algorithm $data;" >> $conf - - echo -e " compression_algorithm deflate;\n}" >> $conf - - if [ "$remote" = "anonymous" ]; then - echo -e "mode_cfg {\n auth_source system;\n conf_source local;" >> $conf - - config_get data "$1" dns4 - test -n "$data" && echo " dns4 $data;" >> $conf - config_get data "$1" defdomain - test -n "$data" && echo " default_domain \"$data\";" >> $conf - - data=${remnet%/*} - let "data=${data##*.}+1" - echo " network4 ${remnet%.*}.$data;" >> $conf - - let "data=255<<(24-${remnet#*/}+8)&255" - echo " netmask4 255.255.255.$data;" >> $conf - - echo -e " split_network include $locnet;\n}" >> $conf - - elif [ -z "$client" ]; then - config_list_foreach "$1" remote_exclude manage_nonesa add remote "$locnet" - config_list_foreach "$1" local_exclude manage_nonesa add local "$remnet" - manage_sa add "$locnet" "$remnet" $remote - test $? -gt 0 -o $errno -gt 0 && return $errno - - manage_fw add $confIntZone $confExtZone "$remnet" - fi -} - -setup_tunnel() { - local conf=$confDir/racoon.conf - local peerconf=$confDir/peers.txt - local data - local remote - local xauth - - config_get_bool data "$1" enabled 0 - test "$data" = "0" && return 0 - - config_get remote "$1" remote - if [ "$remote" = "anonymous" ]; then - echo -e "remote anonymous {\n generate_policy on;" >> $conf - else - data=$(nslookup "$remote" | awk 'NR == 5 {print $3}') - test -n "$data" && remote="$data" - echo -e "remote \"$1\" {\n remote_address $remote;" >> $conf - echo "$data" >> $peerconf - fi - - config_get data "$1" pre_shared_key "" - if [ -n "$data" ]; then - if [ "$remote" != "anonymous" ]; then - echo "$remote $data" >> $confDir/psk.txt - else - echo "* $data" >> $confDir/psk.txt - fi - fi - - let confPh1ID=$confPh1ID+1 - echo " ph1id $confPh1ID;" >> $conf - - config_get xauth "$1" username "" - - config_get data "$1" certificate "" - if [ -n "$data" ]; then - echo -en " verify_cert on;\n my_identifier asn1dn;\n certificate_type x509 " >> $conf - echo -en "\"$data.crt\" \"$data.key\";\n send_cr off;\n peers_identifier " >> $conf - else - config_get data "$1" my_id_type "" - if [ -n "$data" ]; then - echo -n " my_identifier $data" >> $conf - config_get data "$1" my_id "" - if [ -n "$data" ]; then - echo " \"$data\";" >> $conf - elif [ -n "$xauth" ]; then - echo " \"$xauth\";" >> $conf - else - echo ";" >> $conf - fi - elif [ -n "$xauth" ]; then - echo " my_identifier user_fqdn \"$xauth\";" >> $conf - fi - echo -n " peers_identifier " >> $conf - fi - - if [ "$remote" = "anonymous" ]; then - echo "user_fqdn;" >> $conf - else - config_get data "$1" peer_id_type "asn1dn" - echo -n "$data" >> $conf - - config_get data "$1" peer_id "" - test -n "$data" && echo -n " \"$data\"" >> $conf - - echo ";" >> $conf - fi - - if [ -n "$xauth" ]; then - config_get data "$1" password - if [ -z "$data" ]; then - $log "Password must be given in $1 tunnel" - errno=7; return 7 - fi - echo "$xauth $data" >> $confDir/psk.txt - - echo " xauth_login \"$xauth\";" >> $conf - echo -e " script \"p1client-up\" phase1_up;\n script \"p1client-down\" phase1_down;" >> $conf - fi - - config_get data "$1" exchange_mode - if [ -z "$data" ]; then - data=main - test -n "$xauth" && data="${data},aggressive" - fi - echo -e " exchange_mode $data;\n nat_traversal on;\n support_proxy on;" >> $conf - - config_get data "$1" prop_check "obey" - test -n "$data" && echo " proposal_check $data;" >> $conf - - config_get_bool data "$1" weak_p1check 1 - if [ $data -eq 0 ]; then data=off; else data=on; fi - echo " weak_phase1_check $data;" >> $conf - - config_get_bool data "$1" verify_id 1 - if [ $data -eq 0 ]; then data=off; else data=on; fi - echo " verify_identifier $data;" >> $conf - - config_get data "$1" dpd_delay "" - test -n "$data" && echo " dpd_delay $data;" >> $conf - - unset data - test -n "$xauth" && data="on" - config_get data "$1" mode_cfg "$data" - test -n "$data" && echo " mode_cfg $data;" >> $conf - - config_get_bool data "$1" init 0 - if [ $data -eq 0 ]; then data=off; else data=on; fi - echo " initial_contact $data;" >> $conf - - - config_list_foreach "$1" p1_proposal setup_p1 - echo "}" >> $conf - - config_list_foreach "$1" sainfo setup_sa "$remote $xauth" -} - -setup_cert() { - local item - local data - - for item in key crt ; do - config_get data "$1" $item "" - test -z "$data" && continue - - echo "$data" |\ - sed 's/-\+[A-Z ]\+-\+/\n&\n/g' | sed 's/.\{50,50\}/&\n/g' | sed '/^$/d'\ - > $confDir/cert/$1.$item - - chmod 600 $confDir/cert/$1.$item - done - - if [ -s $confDir/cert/$1.crt ]; then - data=$(openssl x509 -noout -hash -in $confDir/cert/$1.crt) - ln -sf $confDir/cert/$1.crt $confDir/cert/$data.0 - fi -} - -destroy_sa() { - local locnet - local remnet - - config_get locnet "$1" local_net - config_get remnet "$1" remote_net - if [ -z "$locnet" ] || [ -z "$remnet" ]; then - $log "Remote and local networks for $1 must be configured" - errno=4; return 4 - fi - - config_list_foreach "$1" remote_exclude manage_nonesa del remote "$locnet" - config_list_foreach "$1" local_exclude manage_nonesa del local "$remnet" - manage_sa del "$locnet" "$remnet" $2 - manage_fw del $confIntZone $confExtZone "$remnet" -} - -destroy_tunnel() { - local data - - config_get_bool data "$1" enabled 0 - test "$data" = "0" && return 0 - - config_get remote "$1" remote - data=$(nslookup "$remote" | awk 'NR == 5 {print $3}') - test -n "$data" && remote="$data" - - config_get data "$1" username "" - if [ -z "$data" ]; then - config_list_foreach "$1" sainfo destroy_sa $remote - fi -} - -destroy_conf() { - setup_fw del -} - -check_software() { - local item - - for item in /usr/sbin/setkey /usr/bin/openssl /usr/sbin/ip ; do - if [ ! -x $item ]; then - $log "Needed program $item not found, exiting" - errno=9; return 9 - fi - done -} - -cleanup_conf() { - config_load racoon - config_foreach setup_load racoon - config_foreach destroy_conf racoon - config_foreach destroy_tunnel tunnel - - /usr/sbin/setkey -P -F - /usr/sbin/setkey -F -} - -check_dir() { - local item - - for item in $confDir $confDir/cert ; do - if [ ! -d $item ]; then - mkdir -m 0700 -p $item - fi - done -} - -wait4wanzone() { - local item=$connWait - local data - - data="$(get_zoneiplist $confExtZone)" - while [ $item -gt 0 ]; do - test -n "$data" && break - sleep 2 - let "item=$item-1" - data="$(get_zoneiplist $confExtZone)" - done - - test -z "$data" && return 10 -} - -start_service() { - check_software - test $? -gt 0 -o $errno -gt 0 && exit $errno - - check_dir - - config_load racoon - config_foreach setup_load racoon - - config_foreach wait4wanzone racoon - if [ $? -gt 0 ] || [ $errno -gt 0 ]; then - $log "No active interfaces in $confExtZone zone found, exiting" - exit $errno - fi - - config_foreach setup_conf racoon - test $? -gt 0 -o $errno -gt 0 && exit $errno - - config_foreach setup_tunnel tunnel - test $? -gt 0 -o $errno -gt 0 && exit $errno - - config_foreach setup_cert certificate - - procd_open_instance - procd_set_param command /usr/sbin/racoon - test -n "$confIPMode" && procd_append_param command -$confIPMode - procd_append_param command -F -f $confDir/racoon.conf - procd_set_param file $confDir/racoon.conf - procd_close_instance - - if [ -x /etc/racoon/vpnctl ]; then - let connWait=$connWait*2+2 - ( sleep $connWait; /etc/racoon/vpnctl up ) & - fi -} - -service_triggers() { - local item - local data - - procd_add_reload_trigger "racoon" "network" - - config_load racoon - config_foreach setup_load racoon - - data=$(get_zoneiflist $confExtZone) - if [ $? -gt 0 ] || [ $errno -gt 0 ] || [ -z "$data" ]; then - $log "Can not find interfaces for $confExtZone zone" - else - for item in $data ; do - procd_add_reload_interface_trigger $item - done - fi -} - -stop_service() { - cleanup_conf - procd_kill racoon -} - -trap "cleanup_conf" 1 2 3 4 5 6 7 8 9 10 - - -# EOF /etc/init.d/racoon diff --git a/net/ipsec-tools/files/vpnctl b/net/ipsec-tools/files/vpnctl deleted file mode 100644 index 5fb66679..00000000 --- a/net/ipsec-tools/files/vpnctl +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# - -case X$1 in - Xup|X1|Xstart) connMode=vpn-connect ;; - Xdown|X0|Xstop) connMode=vpn-disconnect ;; - *) - echo "Usage: $0: up|1|start || down|0|stop" - exit 1 ;; -esac - -if [ -s /var/racoon/peers.txt ]; then - (while read ipa ; do - racoonctl $connMode $ipa - done) < /var/racoon/peers.txt -fi - - -# EOF /usr/bin/vpnctl diff --git a/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch b/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch deleted file mode 100644 index db5b3064..00000000 --- a/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/src/racoon/oakley.c -+++ b/src/racoon/oakley.c -@@ -2424,8 +2424,21 @@ oakley_skeyid(iph1) - plog(LLV_ERROR, LOCATION, iph1->remote, - "couldn't find the pskey for %s.\n", - saddrwop2str(iph1->remote)); -+ } -+ } -+ if (iph1->authstr == NULL) { -+ /* -+ * If we could not locate a psk above try and locate -+ * the default psk, ie, "*". -+ */ -+ iph1->authstr = privsep_getpsk("*", 1); -+ if (iph1->authstr == NULL) { -+ plog(LLV_ERROR, LOCATION, iph1->remote, -+ "couldn't find the the default pskey either.\n"); - goto end; - } -+ plog(LLV_NOTIFY, LOCATION, iph1->remote, -+ "Using default PSK.\n"); - } - plog(LLV_DEBUG, LOCATION, NULL, "the psk found.\n"); - /* should be secret PSK */ diff --git a/net/ipsec-tools/patches/001-no_libfl.patch b/net/ipsec-tools/patches/001-no_libfl.patch deleted file mode 100644 index b56b596b..00000000 --- a/net/ipsec-tools/patches/001-no_libfl.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/racoon/cftoken.l -+++ b/src/racoon/cftoken.l -@@ -104,6 +104,8 @@ static struct include_stack { - static int incstackp = 0; - - static int yy_first_time = 1; -+ -+int yywrap(void) { return 1; } - %} - - /* common seciton */ ---- a/src/setkey/token.l -+++ b/src/setkey/token.l -@@ -86,6 +86,8 @@ - #if defined(SADB_X_EALG_AES) && ! defined(SADB_X_EALG_AESCBC) - #define SADB_X_EALG_AESCBC SADB_X_EALG_AES - #endif -+ -+int yywrap(void) { return 1; } - %} - - /* common section */ diff --git a/net/ipsec-tools/patches/002-patch8-utmp.patch b/net/ipsec-tools/patches/002-patch8-utmp.patch deleted file mode 100644 index 54753904..00000000 --- a/net/ipsec-tools/patches/002-patch8-utmp.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- a/src/racoon/isakmp_cfg.c -+++ b/src/racoon/isakmp_cfg.c -@@ -38,7 +38,7 @@ - #include - #include - --#include -+#include - #if defined(__APPLE__) && defined(__MACH__) - #include - #endif -@@ -1664,7 +1664,8 @@ isakmp_cfg_accounting_system(port, raddr - int inout; - { - int error = 0; -- struct utmpx ut; -+ struct utmp ut; -+ char term[UT_LINESIZE]; - char addr[NI_MAXHOST]; - - if (usr == NULL || usr[0]=='\0') { -@@ -1673,34 +1674,37 @@ isakmp_cfg_accounting_system(port, raddr - return -1; - } - -- memset(&ut, 0, sizeof ut); -- gettimeofday((struct timeval *)&ut.ut_tv, NULL); -- snprintf(ut.ut_id, sizeof ut.ut_id, TERMSPEC, port); -+ sprintf(term, TERMSPEC, port); - - switch (inout) { - case ISAKMP_CFG_LOGIN: -- ut.ut_type = USER_PROCESS; -- strncpy(ut.ut_user, usr, sizeof ut.ut_user); -+ strncpy(ut.ut_name, usr, UT_NAMESIZE); -+ ut.ut_name[UT_NAMESIZE - 1] = '\0'; -+ -+ strncpy(ut.ut_line, term, UT_LINESIZE); -+ ut.ut_line[UT_LINESIZE - 1] = '\0'; - - GETNAMEINFO_NULL(raddr, addr); -- strncpy(ut.ut_host, addr, sizeof ut.ut_host); -+ strncpy(ut.ut_host, addr, UT_HOSTSIZE); -+ ut.ut_host[UT_HOSTSIZE - 1] = '\0'; -+ -+ ut.ut_time = time(NULL); - - plog(LLV_INFO, LOCATION, NULL, - "Accounting : '%s' logging on '%s' from %s.\n", -- ut.ut_user, ut.ut_id, addr); -- -- pututxline(&ut); -+ ut.ut_name, ut.ut_line, ut.ut_host); - -+ login(&ut); -+ - break; - case ISAKMP_CFG_LOGOUT: -- ut.ut_type = DEAD_PROCESS; - - plog(LLV_INFO, LOCATION, NULL, - "Accounting : '%s' unlogging from '%s'.\n", -- usr, ut.ut_id); -- -- pututxline(&ut); -+ usr, term); - -+ logout(term); -+ - break; - default: - plog(LLV_ERROR, LOCATION, NULL, "Unepected inout\n"); diff --git a/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch b/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch deleted file mode 100644 index 7174300d..00000000 --- a/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/racoon/ipsec_doi.c -+++ b/src/racoon/ipsec_doi.c -@@ -3581,8 +3581,8 @@ ipsecdoi_checkid1(iph1) - iph1->approval->authmethod == OAKLEY_ATTR_AUTH_METHOD_PSKEY) { - if (id_b->type != IPSECDOI_ID_IPV4_ADDR - && id_b->type != IPSECDOI_ID_IPV6_ADDR) { -- plog(LLV_ERROR, LOCATION, NULL, -- "Expecting IP address type in main mode, " -+ plog(LLV_WARNING, LOCATION, NULL, -+ "Expecting IP address type in main mode (RFC2409) , " - "but %s.\n", s_ipsecdoi_ident(id_b->type)); - return ISAKMP_NTYPE_INVALID_ID_INFORMATION; - } diff --git a/net/ipsec-tools/patches/005-isakmp-fix.patch b/net/ipsec-tools/patches/005-isakmp-fix.patch deleted file mode 100644 index f7aa3c26..00000000 --- a/net/ipsec-tools/patches/005-isakmp-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/racoon/isakmp.c -+++ b/src/racoon/isakmp.c -@@ -31,6 +31,8 @@ - * SUCH DAMAGE. - */ - -+#define __packed __attribute__((__packed__)) -+ - #include "config.h" - - #include diff --git a/net/ipsec-tools/patches/006-linux-3.7-compat.patch b/net/ipsec-tools/patches/006-linux-3.7-compat.patch deleted file mode 100644 index 46b11ee5..00000000 --- a/net/ipsec-tools/patches/006-linux-3.7-compat.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -74,9 +74,10 @@ case "$host_os" in - [ KERNEL_INCLUDE="/lib/modules/`uname -r`/build/include" ]) - - AC_CHECK_HEADER($KERNEL_INCLUDE/linux/pfkeyv2.h, , -- [ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h, -- KERNEL_INCLUDE=/usr/src/linux/include , -- [ AC_MSG_ERROR([Unable to find linux-2.6 kernel headers. Aborting.]) ] ) ] ) -+ [ AC_CHECK_HEADER($KERNEL_INCLUDE/uapi/linux/pfkeyv2.h, , -+ [ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h, -+ KERNEL_INCLUDE=/usr/src/linux/include , -+ [ AC_MSG_ERROR([Unable to find linux-2.6 kernel headers. Aborting.]) ] ) ] ) ] ) - AC_SUBST(KERNEL_INCLUDE) - # We need the configure script to run with correct kernel headers. - # However we don't want to point to kernel source tree in compile time, -@@ -643,7 +644,14 @@ AC_EGREP_CPP(yes, - #ifdef SADB_X_EXT_NAT_T_TYPE - yes - #endif --], [kernel_natt="yes"]) -+], [kernel_natt="yes"], [ -+ AC_EGREP_CPP(yes, -+ [#include -+ #ifdef SADB_X_EXT_NAT_T_TYPE -+ yes -+ #endif -+ ], [kernel_natt="yes"]) -+]) - ;; - freebsd*|netbsd*) - # NetBSD case ---- a/src/include-glibc/Makefile.am -+++ b/src/include-glibc/Makefile.am -@@ -1,14 +1,7 @@ -- --.includes: ${top_builddir}/config.status -- ln -snf $(KERNEL_INCLUDE)/linux -- touch .includes -- --all: .includes -- - EXTRA_DIST = \ - glibc-bugs.h \ - net/pfkeyv2.h \ - netinet/ipsec.h \ - sys/queue.h - --DISTCLEANFILES = .includes linux -+DISTCLEANFILES = linux diff --git a/net/ipsec-tools/patches/007-force_have_policy_fwd.patch b/net/ipsec-tools/patches/007-force_have_policy_fwd.patch deleted file mode 100644 index 69cd1c03..00000000 --- a/net/ipsec-tools/patches/007-force_have_policy_fwd.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -732,7 +732,8 @@ case $host in - ], - [AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])], -- [AC_MSG_RESULT(no)]) -+ [AC_MSG_RESULT(forced) -+ AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])]) - ;; - *) - AC_MSG_RESULT(no) diff --git a/net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch b/net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch deleted file mode 100644 index 5e3a2d4d..00000000 --- a/net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch +++ /dev/null @@ -1,16 +0,0 @@ -Fix null dereference in racoon/gssapi.c (CVE-2015-4047) - ---- a/src/racoon/gssapi.c -+++ b/src/racoon/gssapi.c -@@ -192,6 +192,11 @@ gssapi_init(struct ph1handle *iph1) - gss_name_t princ, canon_princ; - OM_uint32 maj_stat, min_stat; - -+ if (iph1->rmconf == NULL) { -+ plog(LLV_ERROR, LOCATION, NULL, "no remote config\n"); -+ return -1; -+ } -+ - gps = racoon_calloc(1, sizeof (struct gssapi_ph1_state)); - if (gps == NULL) { - plog(LLV_ERROR, LOCATION, NULL, "racoon_calloc failed\n"); diff --git a/net/ipsec-tools/patches/009-musl-compat.patch b/net/ipsec-tools/patches/009-musl-compat.patch deleted file mode 100644 index 85d03f9a..00000000 --- a/net/ipsec-tools/patches/009-musl-compat.patch +++ /dev/null @@ -1,187 +0,0 @@ ---- a/src/racoon/grabmyaddr.c -+++ b/src/racoon/grabmyaddr.c -@@ -47,7 +47,6 @@ - #include - #include - #include --#include - #define USE_ROUTE - #endif - ---- a/src/racoon/pfkey.c -+++ b/src/racoon/pfkey.c -@@ -59,7 +59,6 @@ - #include - #include - #include --#include - - #include - #include ---- a/src/setkey/setkey.c -+++ b/src/setkey/setkey.c -@@ -40,7 +40,6 @@ - #include - #include - #include --#include - #include - #include - #include ---- a/src/libipsec/ipsec_strerror.h -+++ b/src/libipsec/ipsec_strerror.h -@@ -34,6 +34,8 @@ - #ifndef _IPSEC_STRERROR_H - #define _IPSEC_STRERROR_H - -+#include -+ - extern int __ipsec_errcode; - extern void __ipsec_set_strerror __P((const char *)); - ---- a/src/libipsec/libpfkey.h -+++ b/src/libipsec/libpfkey.h -@@ -34,6 +34,8 @@ - #ifndef _LIBPFKEY_H - #define _LIBPFKEY_H - -+#include -+ - #ifndef KAME_LIBPFKEY_H - #define KAME_LIBPFKEY_H - ---- a/src/racoon/backupsa.c -+++ b/src/racoon/backupsa.c -@@ -276,9 +276,9 @@ do { \ - GETNEXTNUM(sa_args.a_keylen, strtoul); - GETNEXTNUM(sa_args.flags, strtoul); - GETNEXTNUM(sa_args.l_alloc, strtoul); -- GETNEXTNUM(sa_args.l_bytes, strtouq); -- GETNEXTNUM(sa_args.l_addtime, strtouq); -- GETNEXTNUM(sa_args.l_usetime, strtouq); -+ GETNEXTNUM(sa_args.l_bytes, strtoull); -+ GETNEXTNUM(sa_args.l_addtime, strtoull); -+ GETNEXTNUM(sa_args.l_usetime, strtoull); - GETNEXTNUM(sa_args.seq, strtoul); - - #undef GETNEXTNUM ---- a/src/racoon/cftoken.l -+++ b/src/racoon/cftoken.l -@@ -77,6 +77,10 @@ - - #include "cfparse.h" - -+#ifndef GLOB_TILDE -+#define GLOB_TILDE 0 -+#endif -+ - int yyerrorcount = 0; - - #if defined(YIPS_DEBUG) ---- a/src/racoon/logger.h -+++ b/src/racoon/logger.h -@@ -34,6 +34,8 @@ - #ifndef _LOGGER_H - #define _LOGGER_H - -+#include -+ - struct log { - int head; - int siz; ---- a/src/racoon/misc.h -+++ b/src/racoon/misc.h -@@ -34,6 +34,8 @@ - #ifndef _MISC_H - #define _MISC_H - -+#include -+ - #define BIT2STR(b) bit2str(b, sizeof(b)<<3) - - #ifdef HAVE_FUNC_MACRO ---- a/src/racoon/missing/crypto/sha2/sha2.h -+++ b/src/racoon/missing/crypto/sha2/sha2.h -@@ -40,6 +40,8 @@ - #ifndef __SHA2_H__ - #define __SHA2_H__ - -+#include -+ - #ifdef __cplusplus - extern "C" { - #endif ---- a/src/racoon/netdb_dnssec.h -+++ b/src/racoon/netdb_dnssec.h -@@ -34,6 +34,8 @@ - #ifndef _NETDB_DNSSEC_H - #define _NETDB_DNSSEC_H - -+#include -+ - #ifndef T_CERT - #define T_CERT 37 /* defined by RFC2538 section 2 */ - #endif ---- a/src/racoon/plog.h -+++ b/src/racoon/plog.h -@@ -34,6 +34,8 @@ - #ifndef _PLOG_H - #define _PLOG_H - -+#include -+ - #ifdef HAVE_STDARG_H - #include - #else ---- a/src/racoon/str2val.h -+++ b/src/racoon/str2val.h -@@ -34,6 +34,8 @@ - #ifndef _STR2VAL_H - #define _STR2VAL_H - -+#include -+ - extern caddr_t val2str __P((const char *, size_t)); - extern char *str2val __P((const char *, int, size_t *)); - ---- a/src/racoon/vmbuf.h -+++ b/src/racoon/vmbuf.h -@@ -34,6 +34,8 @@ - #ifndef _VMBUF_H - #define _VMBUF_H - -+#include -+ - /* - * bp v - * v v ---- a/src/setkey/extern.h -+++ b/src/setkey/extern.h -@@ -1,6 +1,6 @@ - /* $NetBSD: extern.h,v 1.5 2009/03/06 11:45:03 tteras Exp $ */ - -- -+#include - - void parse_init __P((void)); - int parse __P((FILE **)); ---- a/src/racoon/isakmp_cfg.c -+++ b/src/racoon/isakmp_cfg.c -@@ -1694,8 +1694,6 @@ isakmp_cfg_accounting_system(port, raddr - "Accounting : '%s' logging on '%s' from %s.\n", - ut.ut_name, ut.ut_line, ut.ut_host); - -- login(&ut); -- - break; - case ISAKMP_CFG_LOGOUT: - -@@ -1703,8 +1701,6 @@ isakmp_cfg_accounting_system(port, raddr - "Accounting : '%s' unlogging from '%s'.\n", - usr, term); - -- logout(term); -- - break; - default: - plog(LLV_ERROR, LOCATION, NULL, "Unepected inout\n"); diff --git a/net/ipsec-tools/patches/010-CVE-2016-10396.patch b/net/ipsec-tools/patches/010-CVE-2016-10396.patch deleted file mode 100644 index 110b86c4..00000000 --- a/net/ipsec-tools/patches/010-CVE-2016-10396.patch +++ /dev/null @@ -1,201 +0,0 @@ -Description: Fix remotely exploitable DoS. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10396 -Source: vendor; https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51682 -Bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867986 - -Index: ipsec-tools-0.8.2/src/racoon/isakmp_frag.c -=================================================================== ---- ipsec-tools-0.8.2.orig/src/racoon/isakmp_frag.c -+++ ipsec-tools-0.8.2/src/racoon/isakmp_frag.c -@@ -1,4 +1,4 @@ --/* $NetBSD: isakmp_frag.c,v 1.5 2009/04/22 11:24:20 tteras Exp $ */ -+/* $NetBSD: isakmp_frag.c,v 1.5.36.1 2017/04/21 16:50:42 bouyer Exp $ */ - - /* Id: isakmp_frag.c,v 1.4 2004/11/13 17:31:36 manubsd Exp */ - -@@ -173,6 +173,43 @@ vendorid_frag_cap(gen) - return ntohl(hp[MD5_DIGEST_LENGTH / sizeof(*hp)]); - } - -+static int -+isakmp_frag_insert(struct ph1handle *iph1, struct isakmp_frag_item *item) -+{ -+ struct isakmp_frag_item *pitem = NULL; -+ struct isakmp_frag_item *citem = iph1->frag_chain; -+ -+ /* no frag yet, just insert at beginning of list */ -+ if (iph1->frag_chain == NULL) { -+ iph1->frag_chain = item; -+ return 0; -+ } -+ -+ do { -+ /* duplicate fragment number, abort (CVE-2016-10396) */ -+ if (citem->frag_num == item->frag_num) -+ return -1; -+ -+ /* need to insert before current item */ -+ if (citem->frag_num > item->frag_num) { -+ if (pitem != NULL) -+ pitem->frag_next = item; -+ else -+ /* insert at the beginning of the list */ -+ iph1->frag_chain = item; -+ item->frag_next = citem; -+ return 0; -+ } -+ -+ pitem = citem; -+ citem = citem->frag_next; -+ } while (citem != NULL); -+ -+ /* we reached the end of the list, insert */ -+ pitem->frag_next = item; -+ return 0; -+} -+ - int - isakmp_frag_extract(iph1, msg) - struct ph1handle *iph1; -@@ -224,39 +261,43 @@ isakmp_frag_extract(iph1, msg) - item->frag_next = NULL; - item->frag_packet = buf; - -- /* Look for the last frag while inserting the new item in the chain */ -- if (item->frag_last) -- last_frag = item->frag_num; -+ /* Check for the last frag before inserting the new item in the chain */ -+ if (item->frag_last) { -+ /* if we have the last fragment, indices must match */ -+ if (iph1->frag_last_index != 0 && -+ item->frag_last != iph1->frag_last_index) { -+ plog(LLV_ERROR, LOCATION, NULL, -+ "Repeated last fragment index mismatch\n"); -+ racoon_free(item); -+ vfree(buf); -+ return -1; -+ } - -- if (iph1->frag_chain == NULL) { -- iph1->frag_chain = item; -- } else { -- struct isakmp_frag_item *current; -+ last_frag = iph1->frag_last_index = item->frag_num; -+ } - -- current = iph1->frag_chain; -- while (current->frag_next) { -- if (current->frag_last) -- last_frag = item->frag_num; -- current = current->frag_next; -- } -- current->frag_next = item; -+ /* insert fragment into chain */ -+ if (isakmp_frag_insert(iph1, item) == -1) { -+ plog(LLV_ERROR, LOCATION, NULL, -+ "Repeated fragment index mismatch\n"); -+ racoon_free(item); -+ vfree(buf); -+ return -1; - } - -- /* If we saw the last frag, check if the chain is complete */ -+ /* If we saw the last frag, check if the chain is complete -+ * we have a sorted list now, so just walk through */ - if (last_frag != 0) { -+ item = iph1->frag_chain; - for (i = 1; i <= last_frag; i++) { -- item = iph1->frag_chain; -- do { -- if (item->frag_num == i) -- break; -- item = item->frag_next; -- } while (item != NULL); -- -+ if (item->frag_num != i) -+ break; -+ item = item->frag_next; - if (item == NULL) /* Not found */ - break; - } - -- if (item != NULL) /* It is complete */ -+ if (i > last_frag) /* It is complete */ - return 1; - } - -@@ -291,15 +332,9 @@ isakmp_frag_reassembly(iph1) - } - data = buf->v; - -+ item = iph1->frag_chain; - for (i = 1; i <= frag_count; i++) { -- item = iph1->frag_chain; -- do { -- if (item->frag_num == i) -- break; -- item = item->frag_next; -- } while (item != NULL); -- -- if (item == NULL) { -+ if (item->frag_num != i) { - plog(LLV_ERROR, LOCATION, NULL, - "Missing fragment #%d\n", i); - vfree(buf); -@@ -308,6 +343,7 @@ isakmp_frag_reassembly(iph1) - } - memcpy(data, item->frag_packet->v, item->frag_packet->l); - data += item->frag_packet->l; -+ item = item->frag_next; - } - - out: -Index: ipsec-tools-0.8.2/src/racoon/isakmp_inf.c -=================================================================== ---- ipsec-tools-0.8.2.orig/src/racoon/isakmp_inf.c -+++ ipsec-tools-0.8.2/src/racoon/isakmp_inf.c -@@ -720,6 +720,7 @@ isakmp_info_send_nx(isakmp, remote, loca - #endif - #ifdef ENABLE_FRAG - iph1->frag = 0; -+ iph1->frag_last_index = 0; - iph1->frag_chain = NULL; - #endif - -Index: ipsec-tools-0.8.2/src/racoon/isakmp.c -=================================================================== ---- ipsec-tools-0.8.2.orig/src/racoon/isakmp.c -+++ ipsec-tools-0.8.2/src/racoon/isakmp.c -@@ -1071,6 +1071,7 @@ isakmp_ph1begin_i(rmconf, remote, local) - iph1->frag = 1; - else - iph1->frag = 0; -+ iph1->frag_last_index = 0; - iph1->frag_chain = NULL; - #endif - iph1->approval = NULL; -@@ -1175,6 +1176,7 @@ isakmp_ph1begin_r(msg, remote, local, et - #endif - #ifdef ENABLE_FRAG - iph1->frag = 0; -+ iph1->frag_last_index = 0; - iph1->frag_chain = NULL; - #endif - iph1->approval = NULL; -Index: ipsec-tools-0.8.2/src/racoon/handler.h -=================================================================== ---- ipsec-tools-0.8.2.orig/src/racoon/handler.h -+++ ipsec-tools-0.8.2/src/racoon/handler.h -@@ -1,4 +1,4 @@ --/* $NetBSD: handler.h,v 1.25 2010/11/17 10:40:41 tteras Exp $ */ -+/* $NetBSD: handler.h,v 1.26 2017/01/24 19:23:56 christos Exp $ */ - - /* Id: handler.h,v 1.19 2006/02/25 08:25:12 manubsd Exp */ - -@@ -141,6 +141,7 @@ struct ph1handle { - #endif - #ifdef ENABLE_FRAG - int frag; /* IKE phase 1 fragmentation */ -+ int frag_last_index; - struct isakmp_frag_item *frag_chain; /* Received fragments */ - #endif - diff --git a/net/iptraf-ng/Makefile b/net/iptraf-ng/Makefile index 90738b5d..a0ab9728 100644 --- a/net/iptraf-ng/Makefile +++ b/net/iptraf-ng/Makefile @@ -18,7 +18,7 @@ PKG_HASH:=79140cf07c0cceb1b5723242847a73aa86f5e4f9dccfe8970fda6801d347eb09 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Florian Fainelli +PKG_MAINTAINER:= PKG_CHECK_FORMAT_SECURITY:=0 diff --git a/net/iputils/Config_ping.in b/net/iputils/Config_ping.in new file mode 100644 index 00000000..8b360914 --- /dev/null +++ b/net/iputils/Config_ping.in @@ -0,0 +1,17 @@ +if PACKAGE_iputils-ping + +config PING_LEGACY_SYMLINKS + bool + default n + prompt "Install legacy ping4 and ping6 symlinks" + help + Iputils previously generated separate "ping" and "ping6" + binaries for supporting IPv4 and IPv6 communication, + respectively. Recent versions of iputils have merged + support for both address families into a single program. + Select this option to install "ping6" and "ping4" symlinks + to the unified binary to support compatibility with + existing tools that may still expect to find the old + names. + +endif diff --git a/net/iputils/Config_tracepath.in b/net/iputils/Config_tracepath.in new file mode 100644 index 00000000..51a78dd4 --- /dev/null +++ b/net/iputils/Config_tracepath.in @@ -0,0 +1,16 @@ +if PACKAGE_iputils-tracepath + +config TRACEPATH_LEGACY_SYMLINKS + bool + default n + prompt "Install legacy tracepath4 and tracepath6 symlinks" + help + Iputils previously generated separate "tracepath" and + "tracepath6" binaries for supporting IPv4 and IPv6 + communication, respectively. Recent versions of iputils + have merged support for both address families into a + single tracepath program. Select this option to install + "tracepath6" and "tracepath4" symlinks to the unified + binary to support compatibility with existing tools that + may still expect to find the old names. +endif diff --git a/net/iputils/Makefile b/net/iputils/Makefile new file mode 100644 index 00000000..4ca98b39 --- /dev/null +++ b/net/iputils/Makefile @@ -0,0 +1,150 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2019 Noah Meyerhans +# +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iputils +PKG_VERSION:=20190709 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/iputils/iputils/tar.gz/s$(PKG_VERSION)? +PKG_HASH:=a15720dd741d7538dd2645f9f516d193636ae4300ff7dbc8bfca757bf166490a + +PKG_MAINTAINER:=Noah Meyerhans +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:iputils_project:iputils + +PKG_BUILD_DIR:=$(BUILD_DIR)/iputils-s$(PKG_VERSION) +PKG_BUILD_DEPENDS:=meson/host +include $(INCLUDE_DIR)/package.mk +include ../../devel/meson/meson.mk + +MESON_ARGS:=-DBUILD_MANS=false \ + -DBUILD_HTML_MANS=false \ + -DUSE_CAP=false \ + -DUSE_CRYPTO=kernel \ + -DUSE_IDN=false \ + -DUSE_GETTEXT=false \ + -DNO_SETCAP_OR_SUID=true \ + -DBUILD_PING=true \ + -DBUILD_ARPING=true \ + -DBUILD_CLOCKDIFF=true \ + -DBUILD_TRACEPATH=true \ + -DBUILD_TFTPD=true + +define Package/iputils/Default + SECTION:=net + CATEGORY:=Network + TITLE:=iputils + URL:=https://github.com/iputils/iputils +endef + +### ping + +define Package/iputils-ping + $(call Package/iputils/Default) + TITLE:=iputils-ping + DEPENDS:=+kmod-crypto-md5 +endef + +define Package/iputils-ping/config + source "$(SOURCE)/Config_ping.in" +endef + +define Package/iputils-ping/description + Send ICMP_ECHOREQUEST packets to IP hosts and report on replies +endef + +define Package/iputils-ping/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_SUID) $(MESON_BUILD_DIR)/ping $(1)/usr/bin/ +ifdef CONFIG_PING_LEGACY_SYMLINKS + ln -s ping $(1)/usr/bin/ping4 + ln -s ping $(1)/usr/bin/ping6 +endif +endef + +### arping + +define Package/iputils-arping + $(call Package/iputils/Default) + TITLE:=iputils-arping +endef + +define Package/iputils-arping/description + Send ARP REQUEST packets to a neighbor host +endef + +define Package/iputils-arping/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(MESON_BUILD_DIR)/arping $(1)/usr/bin/ +endef + +### clockdiff + +define Package/iputils-clockdiff + $(call Package/iputils/Default) + TITLE:=iputils-clockdiff +endef + +define Package/iputils-clockdiff/description + Measure the clock difference between two hosts +endef + +define Package/iputils-clockdiff/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(MESON_BUILD_DIR)/clockdiff $(1)/usr/bin/ +endef + +### tracepath + +define Package/iputils-tracepath + $(call Package/iputils/Default) + TITLE:=iputils-tracepath +endef + +define Package/iputils-tracepath/description + trace network path to a host, discovering PMTU +endef + +define Package/iputils-tracepath/config + source "$(SOURCE)/Config_tracepath.in" +endef + +define Package/iputils-tracepath/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(MESON_BUILD_DIR)/tracepath $(1)/usr/bin/ +ifdef CONFIG_TRACEPATH_LEGACY_SYMLINKS + ln -s tracepath $(1)/usr/bin/tracepath4 + ln -s tracepath $(1)/usr/bin/tracepath6 +endif +endef + +### tftp + +define Package/iputils-tftpd + $(call Package/iputils/Default) + TITLE:=iputils-tftpd +endef + +define Package/iputils-tftpd/description + Trivial File Transfer Protocol server +endef + +define Package/iputils-tftpd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(MESON_BUILD_DIR)/tftpd $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,iputils-ping)) +$(eval $(call BuildPackage,iputils-arping)) +$(eval $(call BuildPackage,iputils-clockdiff)) +$(eval $(call BuildPackage,iputils-tracepath)) +$(eval $(call BuildPackage,iputils-tftpd)) diff --git a/net/ipvsadm/Makefile b/net/ipvsadm/Makefile new file mode 100644 index 00000000..df064669 --- /dev/null +++ b/net/ipvsadm/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2016-2017 Mauro Mozzarelli +# +# This is free software, licensed under the GNU General Public License +# See /LICENSE for more information. +# +# AUTHOR: Mauro Mozzarelli +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipvsadm +PKG_VERSION:=1.31 +PKG_MAINTAINER:=Mauro Mozzarelli , \ + Florian Eckert +PKG_LICENSE:=GPL-2.0-or-later +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/ipvsadm/ +PKG_HASH:=1a0a5e25b5a1226435d2fb76341656f83a710183aebb0d204db39c0ec3bedfdb + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ipvsadm + SECTION:=net + CATEGORY:=Network + TITLE:=IP Virtual Server Configuration Manager + URL:=http://www.linuxvirtualserver.org + DEPENDS:= +kmod-nf-ipvs +libnl-genl +libpopt +endef + +define Package/ipvsadm/description + IPVS (IP Virtual Server) implements transport-layer load balancing + inside the Linux kernel, so called Layer-4 switching. The command line tool + ipvsadm is used to set up, maintain or inspect the virtual server table + in the Linux kernel. The Linux Virtual Server can be used to build scalable + network services based on a cluster of two or more nodes. +endef + +define Package/ipvsadm/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm-save $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm-restore $(1)/sbin/ +endef + +$(eval $(call BuildPackage,ipvsadm)) diff --git a/net/ipvsadm/patches/001-Makefile.patch b/net/ipvsadm/patches/001-Makefile.patch new file mode 100644 index 00000000..e552cfcb --- /dev/null +++ b/net/ipvsadm/patches/001-Makefile.patch @@ -0,0 +1,54 @@ +--- a/Makefile ++++ b/Makefile +@@ -35,7 +35,7 @@ ARCH = $(shell uname -m) + RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir') + RPMSPECDIR = $(shell rpm --eval '%_specdir') + +-CC = gcc ++BUILD_ROOT = $(DESTDIR) + INCLUDE = + SBIN = $(BUILD_ROOT)/sbin + MANDIR = usr/man +@@ -46,9 +46,9 @@ INSTALL = install + STATIC_LIBS = libipvs/libipvs.a + + ifeq "${ARCH}" "sparc64" +- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow ++ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow + else +- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g ++ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g + endif + + +@@ -83,8 +83,9 @@ DEFINES += $(shell if [ ! -f ../ip_vs.h + + all: libs ipvsadm + ++$(STATIC_LIBS): libs + libs: +- make -C libipvs ++ $(MAKE) -C libipvs + + ipvsadm: $(OBJS) $(STATIC_LIBS) + $(CC) $(CFLAGS) -o $@ $^ $(LIBS) +@@ -106,7 +107,7 @@ clean: + rm -rf debian/tmp + find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \ + -o -name "*.rej" -o -name core | xargs rm -f +- make -C libipvs clean ++ $(MAKE) -C libipvs clean + + distclean: clean + +--- a/libipvs/Makefile ++++ b/libipvs/Makefile +@@ -1,7 +1,6 @@ + # Makefile for libipvs + +-CC = gcc +-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC ++CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -fPIC + ifneq (0,$(HAVE_NL)) + CFLAGS += -DLIBIPVS_USE_NL + CFLAGS += $(shell \ diff --git a/net/ipvsadm/patches/002-save-restore.patch b/net/ipvsadm/patches/002-save-restore.patch new file mode 100644 index 00000000..34737a25 --- /dev/null +++ b/net/ipvsadm/patches/002-save-restore.patch @@ -0,0 +1,34 @@ +--- a/ipvsadm-restore ++++ b/ipvsadm-restore +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # ipvsadm-restore - Restore IPVS rules + # + # A very simple wrapper to restore IPVS rules +@@ -11,6 +11,8 @@ + # This file: + # + # ChangeLog ++# M. Mozzarelli : Amended to use /bin/sh for compatibility ++# : with embedded systems using busybox + # Horms : Clear IPVS rules before adding from STDIN + # Horms : Filter out "^#" + # +--- a/ipvsadm-save ++++ b/ipvsadm-save +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # ipvsadm-save - Save IPVS rules + # + # A very simple wrapper to save IPVS rules +@@ -12,6 +12,8 @@ + # + # ChangeLog + # ++# M. Mozzarelli : Amended to use /bin/sh for compatibility ++# : with embedded systems using busybox + # Wensong Zhang : Added the "-n" option and the help() + # + diff --git a/net/irssi/Makefile b/net/irssi/Makefile index f981e95d..95e841f4 100644 --- a/net/irssi/Makefile +++ b/net/irssi/Makefile @@ -8,14 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=irssi -PKG_VERSION:=1.1.1 +PKG_VERSION:=1.2.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/1.1.1/ -PKG_HASH:=784807e7a1ba25212347f03e4287cff9d0659f076edfb2c6b20928021d75a1bf +PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/$(PKG_VERSION)/ +PKG_HASH:=6727060c918568ba2ff4295ad736128dba0b995d7b20491bca11f593bd857578 + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:irssi:irssi PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -35,16 +40,14 @@ define Package/irssi/description Irssi is a terminal based IRC client for UNIX systems. endef +TARGET_LDFLAGS += -Wl,--gc-sections + CONFIGURE_ARGS += \ - --with-perl=no \ - --with-glib-prefix="$(STAGING_DIR)/usr" \ - --with-ssl="$(STAGING_DIR)/usr" \ + --disable-glibtest \ --with-textui \ --without-bot \ - --disable-proxy - -EXTRA_CFLAGS+=$(TARGET_CPPFLAGS) -EXTRA_LDFLAGS+=-lncurses + --without-perl \ + --without-proxy define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/irssi diff --git a/net/irssi/patches/010-Fix-finding-OpenSSL-when-1.1-with-deprecated-APIs-di.patch b/net/irssi/patches/010-Fix-finding-OpenSSL-when-1.1-with-deprecated-APIs-di.patch new file mode 100644 index 00000000..ac3f3093 --- /dev/null +++ b/net/irssi/patches/010-Fix-finding-OpenSSL-when-1.1-with-deprecated-APIs-di.patch @@ -0,0 +1,27 @@ +From cff1385b398b59c74c535d6c0cd9deec561101fd Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 15 Feb 2019 15:02:34 -0800 +Subject: [PATCH] Fix finding OpenSSL when 1.1 with deprecated APIs disabled + +SSL_library_init is a deprecated function. OPENSSL_init_ssl is not in 1.0.2. +SSL_CTX_new is in both. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e8290dfd..8dde6095 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -319,7 +319,7 @@ PKG_CHECK_MODULES([OPENSSL], [openssl], [ + CFLAGS="$CFLAGS $OPENSSL_CFLAGS" + LIBS="$LIBS $OPENSSL_LIBS" + ], [ +- AC_CHECK_LIB([ssl], [SSL_library_init], [ ++ AC_CHECK_LIB([ssl], [SSL_CTX_new], [ + LIBS="$LIBS -lssl -lcrypto" + ], [ + AC_MSG_ERROR([The OpenSSL library was not found]) +-- +2.17.1 + diff --git a/net/isc-dhcp/Makefile b/net/isc-dhcp/Makefile index 51541702..d80d2311 100644 --- a/net/isc-dhcp/Makefile +++ b/net/isc-dhcp/Makefile @@ -10,11 +10,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=isc-dhcp UPSTREAM_NAME:=dhcp PKG_VERSION:=4.4.1 -PKG_RELEASE:=2 +PKG_RELEASE:=6 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Philip Prindeville +PKG_CPE_ID:=cpe:/a:isc:dhcp PKG_SOURCE:=$(UPSTREAM_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION) \ @@ -59,7 +60,7 @@ define Package/isc-dhcp-relay/description endef define Package/isc-dhcp-relay-ipv4/description -$(call Package/isc-dhcp-relay-ipv6/description) +$(call Package/isc-dhcp-relay/description) This package is compiled with IPv4 support only. endef @@ -161,7 +162,6 @@ $(call Package/isc-dhcp-omshell/description) endef CONFIGURE_ARGS += \ - --disable-tracing \ --enable-paranoia \ --disable-dependency-tracking \ --with-randomdev=/dev/urandom \ @@ -196,7 +196,7 @@ define Package/isc-dhcp-relay-$(BUILD_VARIANT)/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/dhcrelay.conf $(1)/etc/config + $(INSTALL_DATA) ./files/dhcrelay.conf $(1)/etc/config/dhcrelay $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/dhcrelay4.init $(1)/etc/init.d/dhcrelay4 endef diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init index 954d332b..33e45ad8 100644 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -270,7 +270,16 @@ general_config() { echo "nameserver 127.0.0.1" >> /tmp/resolv.conf } +# base procd hooks + +boot() { + DHCPD_BOOT=1 + start "$@" +} + start_service() { + local domain dhcp_ifs authoritative + if [ -n "$DHCPD_BOOT" ] ; then return 0 fi @@ -279,15 +288,13 @@ start_service() { touch $lease_file fi - local domain dhcp_ifs - if [ -e "/etc/dhcpd.conf" ] ; then config_file="/etc/dhcpd.conf" else . /lib/functions/network.sh config_load dhcp - local authoritative + general_config > $config_file config_foreach dhcpd_add dhcp @@ -302,13 +309,33 @@ start_service() { procd_close_instance } -boot() { - DHCPD_BOOT=1 - start "$@" +reload_service() { + rc_procd start_service "$@" + prodcd_send_signal dhcpd "$@" } -service_triggers() -{ - procd_add_reload_trigger "dhcp" - procd_add_raw_trigger "interface.*" 3000 /etc/init.d/dhcpd reload +add_interface_trigger() { + local cfg=$1 + local trigger ignore + + config_get trigger "$cfg" interface + config_get_bool ignore "$cfg" ignore 0 + + if [ -n "$trigger" -a $ignore -eq 0 ] ; then + procd_add_reload_interface_trigger "$trigger" + fi } + +service_triggers() { + if [ -n "$DHCPD_BOOT" ] ; then + # Make the first start robust to slow interfaces; wait a while + procd_add_raw_trigger "interface.*.up" 5000 /etc/init.d/dhcpd restart + + else + # reload with normal parameters + procd_add_reload_trigger "network" "dhcp" + config_load dhcp + config_foreach add_interface_trigger dhcp + fi +} + diff --git a/net/jool/Makefile b/net/jool/Makefile index 17cd56bc..e6cdf3f7 100644 --- a/net/jool/Makefile +++ b/net/jool/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=jool -PKG_VERSION:=4.0.5 +PKG_VERSION:=4.0.9 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/NICMx/Jool/releases/download/v$(PKG_VERSION) -PKG_HASH:=b61ae37d7a71e28530765bdfd9a62f89e7878e3ea9c15dabbcefcd144891100d +PKG_HASH:=d42215f87abf2e113bc039d23e6b4e1c39cafc90f0e5584adf0e40e996c68ffb PKG_MAINTAINER:= PKG_LICENSE:=GPL-2.0-only @@ -30,14 +30,21 @@ define Build/Compile KERNEL_DIR="$(LINUX_DIR)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - SUBDIRS="$(PKG_BUILD_DIR)/src/mod/nat64" \ + M="$(PKG_BUILD_DIR)/src/mod/common" \ V="$(V)" \ modules $(MAKE) -C "$(LINUX_DIR)" \ KERNEL_DIR="$(LINUX_DIR)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - SUBDIRS="$(PKG_BUILD_DIR)/src/mod/siit" \ + M="$(PKG_BUILD_DIR)/src/mod/nat64" \ + V="$(V)" \ + modules + $(MAKE) -C "$(LINUX_DIR)" \ + KERNEL_DIR="$(LINUX_DIR)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + M="$(PKG_BUILD_DIR)/src/mod/siit" \ V="$(V)" \ modules $(call Build/Compile/Default) @@ -75,6 +82,7 @@ define KernelPackage/jool +kmod-nf-conntrack6 \ +kmod-nf-ipt FILES:= \ + $(PKG_BUILD_DIR)/src/mod/common/jool_common.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/src/mod/nat64/jool.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/src/mod/siit/jool_siit.$(LINUX_KMOD_SUFFIX) endef @@ -88,7 +96,7 @@ endef define Package/jool-tools $(call Package/jool/Default) TITLE:=Jool userspace control programs - DEPENDS:=+libnl +libxtables +ethtool + DEPENDS:=+libnl +libxtables endef define Package/jool-tools/description @@ -110,6 +118,12 @@ define Package/jool-tools/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/joold $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool_siit $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/usr/lib/iptables + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/iptables/libxt_JOOL_SIIT.so \ + $(1)/usr/lib/iptables + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/iptables/libxt_JOOL.so \ + $(1)/usr/lib/iptables endef $(eval $(call BuildPackage,jool)) diff --git a/net/jool/patches/010-musl.patch b/net/jool/patches/010-musl.patch deleted file mode 100644 index 0bac6157..00000000 --- a/net/jool/patches/010-musl.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/src/usr/argp/main.c -+++ b/src/usr/argp/main.c -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - - #include "command.h" - #include "log.h" ---- a/src/usr/iptables/Makefile -+++ b/src/usr/iptables/Makefile -@@ -34,9 +34,9 @@ uninstall: - rm -f ${DESTDIR}${XTABLES_SO_DIR}/libxt_JOOL_SIIT.so - rm -f ${DESTDIR}${XTABLES_SO_DIR}/libxt_JOOL.so - lib%.so: lib%.o -- gcc -shared -fPIC ${LDFLAGS} -o $@ $^; -+ ${CC} -shared -fPIC ${LDFLAGS} -o $@ $^; - lib%.o: lib%.c -- gcc ${DEFAULT_CFLAGS} ${CFLAGS} -D_INIT=lib$*_init -fPIC -c -o $@ $<; -+ ${CC} ${DEFAULT_CFLAGS} ${CFLAGS} -D_INIT=lib$*_init -fPIC -c -o $@ $<; - clean distclean: - rm -f *.so - distdir: diff --git a/net/kadnode/Makefile b/net/kadnode/Makefile index 5db3247e..22465465 100644 --- a/net/kadnode/Makefile +++ b/net/kadnode/Makefile @@ -1,19 +1,15 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk PKG_NAME:=kadnode -PKG_VERSION:=2.2.0 +PKG_VERSION:=2.3.0 PKG_RELEASE:=2 PKG_LICENSE:=MIT PKG_SOURCE_URL:=https://codeload.github.com/mwarning/KadNode/tar.gz/v$(PKG_VERSION)? -PKG_SOURCE:=KadNode-$(PKG_VERSION).tar.gz -PKG_HASH:=1b3ccaa01cbb7548ef268d8b562059452826dc774529303c494418d1a450ca97 +PKG_SOURCE:=kadnode-$(PKG_VERSION).tar.gz +PKG_HASH:=abb2ca66fb525fab53157d5486bbb43e3a522a4bdc9280a3dcb8cb403ee08583 PKG_BUILD_DIR:=$(BUILD_DIR)/KadNode-$(PKG_VERSION) @@ -80,6 +76,10 @@ MAKE_FLAGS += FEATURES="$(FEATURES)" TARGET_CFLAGS += -ffunction-sections -fdata-sections TARGET_LDFLAGS += -Wl,--gc-sections +define Package/kadnode/conffiles +/etc/config/kadnode +endef + define Package/kadnode/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/kadnode $(1)/usr/bin/ diff --git a/net/kadnode/patches/0001-LFLAGS-LDFLAGS.patch b/net/kadnode/patches/0001-LFLAGS-LDFLAGS.patch deleted file mode 100644 index 0e6de8e1..00000000 --- a/net/kadnode/patches/0001-LFLAGS-LDFLAGS.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 12f6ca15b1b80f7fedb3ae3cf9067a8045a9a8fd Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Wed, 2 May 2018 19:54:37 +0200 -Subject: [PATCH] LFLAGS => LDFLAGS - ---- - Makefile | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/Makefile b/Makefile -index 62be30a..ae994fc 100644 ---- a/Makefile -+++ b/Makefile -@@ -2,7 +2,7 @@ - CC ?= gcc - CFLAGS ?= -Os -Wall -Wwrite-strings -pedantic - CFLAGS += -std=gnu99 -I/usr/local/include --LFLAGS += -L/usr/local/lib -lc -+LDFLAGS += -L/usr/local/lib -lc - FEATURES ?= dns lpd tls bob cmd debug nss #natpmp upnp - - OBJS = build/searches.o build/kad.o build/log.o \ -@@ -30,7 +30,7 @@ endif - ifeq ($(findstring bob,$(FEATURES)),bob) - OBJS += build/ext-bob.o - CFLAGS += -DBOB -- LFLAGS += -lmbedtls -lmbedx509 -lmbedcrypto -+ LDFLAGS += -lmbedtls -lmbedx509 -lmbedcrypto - endif - - ifeq ($(findstring cmd,$(FEATURES)),cmd) -@@ -56,20 +56,20 @@ endif - ifeq ($(findstring tls,$(FEATURES)),tls) - OBJS += build/ext-tls-client.o build/ext-tls-server.o - CFLAGS += -DTLS -- LFLAGS += -lmbedtls -lmbedx509 -lmbedcrypto -+ LDFLAGS += -lmbedtls -lmbedx509 -lmbedcrypto - endif - - ifeq ($(findstring upnp,$(FEATURES)),upnp) - OBJS += build/upnp.o - CFLAGS += -DFWD_UPNP -- LFLAGS += -Wl,-Bdynamic -lminiupnpc -+ LDFLAGS += -Wl,-Bdynamic -lminiupnpc - ENABLE_FORWARDING = 1 - endif - - ifeq ($(findstring natpmp,$(FEATURES)),natpmp) - OBJS += build/natpmp.o - CFLAGS += -DFWD_NATPMP -- LFLAGS += -Wl,-Bdynamic -lnatpmp -+ LDFLAGS += -Wl,-Bdynamic -lnatpmp - ENABLE_FORWARDING = 1 - endif - -@@ -94,7 +94,7 @@ libkadnode.so: build/libkadnode.o $(OBJS) - $(CC) -shared $(OBJS) build/libkadnode.o -o build/libkadnode.so - - kadnode: build/main.o $(OBJS) $(EXTRA) -- $(CC) build/main.o $(OBJS) -o build/kadnode $(LFLAGS) -+ $(CC) build/main.o $(OBJS) -o build/kadnode $(LDFLAGS) - ln -s kadnode build/kadnode-ctl 2> /dev/null || true - - clean: --- -2.17.0 - diff --git a/net/kcptun/Makefile b/net/kcptun/Makefile new file mode 100644 index 00000000..45d13807 --- /dev/null +++ b/net/kcptun/Makefile @@ -0,0 +1,77 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=kcptun +PKG_VERSION:=20200409 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/xtaci/kcptun/tar.gz/v${PKG_VERSION}? +PKG_SOURCE_DATE:=2020-04-09 +PKG_HASH:=312b8f438549225dfd1eac95444dd6a4c50610578ddcf7ff21e19c73a855d4bc + +PKG_MAINTAINER:=Dengfeng Liu , Chao Liu +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.md + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/xtaci/kcptun + +GO_PKG_LDFLAGS:=-s -w +GO_PKG_LDFLAGS_X:=main.VERSION=$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../../lang/golang/golang-package.mk + +define Package/kcptun-config + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Kcptun Config Scripts + URL:=https://github.com/xtaci/kcptun + DEPENDS:=$(GO_ARCH_DEPENDS) +endef + +define Package/kcptun-config/conffiles +/etc/config/kcptun +endef + +define Package/kcptun-config/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/kcptun.config $(1)/etc/config/kcptun + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/kcptun.init $(1)/etc/init.d/kcptun +endef + +define Package/kcptun/Default + define Package/kcptun-$(1) + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=KCP-based Secure Tunnel $(1) + URL:=https://github.com/xtaci/kcptun + DEPENDS:=+kcptun-config + endef + + define Package/kcptun-$(1)/description + kcptun is a Stable & Secure Tunnel Based On KCP with N:M Multiplexing. +This package only contains kcptun $(1). + endef + + define Package/kcptun-$(1)/install + $$(call GoPackage/Package/Install/Bin,$$(PKG_INSTALL_DIR)) + + $$(INSTALL_DIR) $$(1)/usr/bin + $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/kcptun-$(1) + endef +endef + +$(eval $(call BuildPackage,kcptun-config)) +KCPTUN_COMPONENTS:=server client +$(foreach component,$(KCPTUN_COMPONENTS), \ + $(eval $(call Package/kcptun/Default,$(component))) \ + $(eval $(call GoBinPackage,kcptun-$(component))) \ + $(eval $(call BuildPackage,kcptun-$(component))) \ +) diff --git a/net/kcptun/README.md b/net/kcptun/README.md new file mode 100644 index 00000000..5faa4e0a --- /dev/null +++ b/net/kcptun/README.md @@ -0,0 +1,54 @@ +# UCI Configuration +Most option names are the same as those used in json config files: [`server.json`](https://github.com/xtaci/kcptun/blob/master/examples/server.json) and [`local.json`](https://github.com/xtaci/kcptun/blob/master/examples/local.json). Please check `validate_xxx_options` func definition of the [service script](files/kcptun.init) and kcptun's own [documentation](https://github.com/xtaci/kcptun) for supported options and expected value types. And a [sample config file](files/kcptun.config) is also provided for reference. + +A `kcptun` config file can contain two types of config section: `server` and `client`, one of which represents a server or client instance. A `server` section can contain one or more options in [Common options](#common-options) and [Server options](#server-options). And a `client` section can contain one or more options in [Common options](#common-options) and [Client options](#client-options). + +Every section has a `disabled` option to temporarily turn off the instance. + +## [Common options](#common-options) +| Name | Type | Option | Description | +| ---- | ---- | ------ | ----------- | +| disabled | boolean | | disable current config section when set to 1 (default: 0) | +| key | string | --key | pre-shared secret between client and server (default: "it's a secrect") | +| crypt | enum | --crypt | aes, aes-128, aes-192, salsa20, blowfish, twofish, cast5, 3des, tea, xtea, xor, sm4, none (default: "aes") | +| mode | enum | --mode | profiles: fast3, fast2, fast, normal, manual (default: "fast") | +| mtu | integer | --mtu | set maximum transmission unit for UDP packets (default: 1350) | +| sndwnd | integer | --sndwnd | set send window size(num of packets) (default: 1024 for server, 128 for client) | +| rcvwnd | integer | --rcvwnd | set receive window size(num of packets) (default: 1024 for server, 512 for client) | +| datashard | integer | --datashard, --ds | set reed-solomon erasure coding - datashard (default: 10) | +| parityshard | integer | --parityshard, --ps | set reed-solomon erasure coding - parityshard (default: 3) | +| dscp | integer | --dscp | set DSCP(6bit) (default: 0) | +| nocomp | boolean | --nocomp | disable compression | +| sockbuf | integer | --sockbuf | per-socket buffer in bytes (default: 4194304) | +| smuxver | integer | --smuxver | specify smux version, available 1,2 (default: 1) | +| smuxbuf | integer | --smuxbuf | the overall de-mux buffer in bytes (default: 4194304) | +| streambuf | integer | --streambuf | per stream receive buffer in bytes, for smux v2+ (default: 2097152) | +| keepalive | integer | --keepalive | seconds between heartbeats (default: 10) | +| snmplog | string | --snmplog | collect snmp to file, aware of timeformat in golang, like: ./snmp-20060102.log | +| snmpperiod | integer | --snmpperiod | snmp collect period, in seconds (default: 60) | +| quiet | boolean | --quiet | suppress the 'stream open/close' messages | +| gogc | integer | | set GOGC environment variable, see [Memory Control](https://github.com/xtaci/kcptun#memory-control). | +| syslog | boolean | | redirect logs to syslog when set to 1, implemented by [procd](https://openwrt.org/docs/guide-developer/procd-init-scripts#service_parameters). (default: 0) | +| user | string | | run as another user, implemented by [procd](https://openwrt.org/docs/guide-developer/procd-init-scripts#service_parameters). | + +### Limitation +* As kcptun outputs all logs to stderr by default, you may receive lots of **LOG_ERR** level message when set syslog to 1. + +## [Server options](#server-options) +| Name | Type | Option | Description | +| ---- | ---- | ------ | ----------- | +| listen | port number | --listen, -l | kcp server listen port (default: ":29900") | +| target | host | --target, -t | target server address (default: "127.0.0.1:12948") | +| target_port | port number | --target, -t | target server port (default: "127.0.0.1:12948") | +| pprof | boolean | --pprof | start profiling server on :6060 | + +## [Client options](#client-options) +| Name | Type | Option | Description | +| ---- | ---- | ------ | ----------- | +| bind_address | IP address | --localaddr, -l | local listen address (default: ":12948") | +| local_port | port number | --localaddr, -l | local listen port (default: ":12948") | +| server | host | --remoteaddr, -r | kcp server address (default: "vps:29900") | +| server_port | port number | --remoteaddr, -r | kcp server port (default: "vps:29900") | +| conn | integer | --conn | set num of UDP connections to server (default: 1) | +| autoexpire | integer | --autoexpire | set auto expiration time(in seconds) for a single UDP connection, 0 to disable (default: 0) | +| scavengettl | integer | --scavengettl | set how long an expired connection can live(in sec), -1 to disable (default: 600) | diff --git a/net/kcptun/files/kcptun.config b/net/kcptun/files/kcptun.config new file mode 100644 index 00000000..06000b47 --- /dev/null +++ b/net/kcptun/files/kcptun.config @@ -0,0 +1,43 @@ +config server + option disabled 1 + option listen 29900 + option target '127.0.0.1' + option target_port 12948 + option crypt 'aes' + option key 'secret' + option mode 'fast' + option datashard 10 + option parityshard 3 + option dscp 46 + option nocomp 1 + option snmplog '/var/log/snmp.log' + option snmpperiod 60 + option pprof 1 + option quiet 1 + option syslog 1 + option user nobody + +config client + option disabled 1 + option bind_address '0.0.0.0' + option local_port 12948 + option server 'vps' + option server_port 29900 + option crypt 'aes' + option key 'secret' + option mode 'fast' + option conn 1 + option autoexpire 0 + option scavengettl 600 + option mtu 1350 + option sndwnd 128 + option rcvwnd 512 + option nocomp 1 + option sockbuf 4194304 + option smuxver 1 + option smuxbuf 4194304 + option streambuf 2097152 + option keepalive 10 + option quiet 1 + option gogc 20 + option user nobody diff --git a/net/kcptun/files/kcptun.init b/net/kcptun/files/kcptun.init new file mode 100644 index 00000000..b22f8504 --- /dev/null +++ b/net/kcptun/files/kcptun.init @@ -0,0 +1,174 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2019 Chao Liu +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# + +USE_PROCD=1 +START=99 + +confdir=/var/etc/kcptun +bindir=/usr/bin + +mkjson_server_conf() { + [ "$disabled" = 0 ] || return 1 + [ -n "$listen" ] || return 1 + [ -n "$target" ] || return 1 + [ -n "$target_port" ] || return 1 + json_add_string listen ":$listen" + json_add_string target "$target:$target_port" + json_add_boolean pprof "$pprof" +} + +mkjson_client_conf() { + [ "$disabled" = 0 ] || return 1 + [ -n "$local_port" ] || return 1 + [ -n "$server" ] || return 1 + [ -n "$server_port" ] || return 1 + json_add_string localaddr "$bind_address:$local_port" + json_add_string remoteaddr "$server:$server_port" + [ -z "$conn" ] || json_add_int conn "$conn" + [ -z "$autoexpire" ] || json_add_int autoexpire "$autoexpire" + [ -z "$scavengettl" ] || json_add_int scavengettl "$scavengettl" +} + +kcptun() { + local cfg="$1" + local cfgtype="$2" + local bin="$bindir/kcptun-$cfgtype" + local confjson="$confdir/$cfgtype.$cfg.json" + + [ -x "$bin" ] || return + eval "$("validate_${cfgtype}_section" "$cfg" validate_mklocal)" + "validate_${cfgtype}_section" "$cfg" || return + [ "$disabled" = 0 ] || return + + json_init + mkjson_${cfgtype}_conf || return + [ -z "$crypt" ] || json_add_string crypt "$crypt" + [ -z "$key" ] || json_add_string key "$key" + [ -z "$mode" ] || json_add_string mode "$mode" + [ -z "$mtu" ] || json_add_int mtu "$mtu" + [ -z "$sndwnd" ] || json_add_int sndwnd "$sndwnd" + [ -z "$rcvwnd" ] || json_add_int rcvwnd "$rcvwnd" + [ -z "$datashard" ] || json_add_int datashard "$datashard" + [ -z "$parityshard" ] || json_add_int parityshard "$parityshard" + [ -z "$dscp" ] || json_add_int dscp "$dscp" + json_add_boolean nocomp "$nocomp" + [ -z "$sockbuf" ] || json_add_int sockbuf "$sockbuf" + [ -z "$smuxver" ] || json_add_int smuxver "$smuxver" + [ -z "$smuxbuf" ] || json_add_int smuxbuf "$smuxbuf" + [ -z "$streambuf" ] || json_add_int streambuf "$streambuf" + [ -z "$keepalive" ] || json_add_int keepalive "$keepalive" + [ -z "$snmplog" ] || json_add_string snmplog "$snmplog" + [ -z "$snmpperiod" ] || json_add_int snmpperiod "$snmpperiod" + json_add_boolean quiet "$quiet" + json_dump -i > "$confjson" + + procd_open_instance "$cfgtype.$cfg" + procd_set_param command "$bin" -c "$confjson" + [ -z "$gogc" ] || procd_set_param env GOGC="$gogc" + [ -z "$syslog" ] || procd_set_param stderr 1 + [ -z "$user" ] || procd_set_param user "$user" + procd_set_param file "$confjson" + procd_set_param respawn + procd_close_instance +} + +start_service() { + local cfgtype + + mkdir -p "$confdir" + config_load kcptun + for cfgtype in server client; do + config_foreach kcptun "$cfgtype" "$cfgtype" + done +} + +stop_service() { + rm -rf "$confdir" +} + +service_triggers() { + procd_add_reload_interface_trigger wan + procd_add_reload_trigger kcptun + procd_open_validate + validate_server_section + validate_client_section + procd_close_validate +} + +validate_mklocal() { + local tuple opts + + shift 2 + for tuple in "$@"; do + opts="${tuple%%:*} $opts" + done + [ -z "$opts" ] || echo "local $opts" +} + +validate() { + uci_validate_section kcptun "$@" +} + +validate_common_options() { + local cfgtype="$1"; shift + local cfg="$1"; shift + local func="$1"; shift + local crypt_methods='"aes", "aes-128", "aes-192", "salsa20", "blowfish", "twofish", "cast5", "3des", "tea", "xtea", "xor", "sm4", "none"' + local mode_profiles='"fast3", "fast2", "fast", "normal", "manual"' + + "${func:-validate}" "$cfgtype" "$cfg" "$@" \ + 'disabled:bool:0' \ + 'key:string' \ + "crypt:or($crypt_methods)" \ + "mode:or($mode_profiles)" \ + 'mtu:uinteger' \ + 'sndwnd:uinteger' \ + 'rcvwnd:uinteger' \ + 'datashard:uinteger' \ + 'parityshard:uinteger' \ + 'dscp:uinteger' \ + 'nocomp:bool' \ + 'sockbuf:uinteger' \ + 'smuxver:uinteger' \ + 'smuxbuf:uinteger' \ + 'streambuf:uinteger' \ + 'keepalive:uinteger' \ + 'snmplog:string' \ + 'snmpperiod:uinteger' \ + 'quiet:bool' \ + 'gogc:uinteger' \ + 'syslog:bool:1' \ + 'user:string:nobody' +} + +validate_server_options() { + validate_common_options server "$@" \ + 'listen:port' \ + 'target:host' \ + 'target_port:port' \ + 'pprof:bool' +} + +validate_client_options() { + validate_common_options client "$@" \ + 'bind_address:ipaddr' \ + 'local_port:port' \ + 'server:host' \ + 'server_port:port' \ + 'conn:uinteger' \ + 'autoexpire:uinteger' \ + 'scavengettl:uinteger' +} + +validate_server_section() { + validate_server_options "$1" "$2" +} + +validate_client_section() { + validate_client_options "$1" "$2" +} diff --git a/net/kea/Makefile b/net/kea/Makefile new file mode 100644 index 00000000..1f4b58ac --- /dev/null +++ b/net/kea/Makefile @@ -0,0 +1,252 @@ +# +# Copyright (C) 2019 Banglang Huang +# Copyright (C) 2019 Rosy Song +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kea +PKG_VERSION:=1.6.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION) +PKG_HASH:=2af7336027143c3e98d8d1d44165b2c2cbb0252a92bd88f6dd4d2c6adb69d7b5 + +PKG_MAINTAINER:=BangLang Huang, Rosy Song +PKG_LICENSE:=MPL-2.0 +PKG_LICENSE_FILES:=COPYING + +HOST_BUILD_DEPENDS:=boost/host log4cplus/host +PKG_BUILD_DEPENDS:=kea/host +HOST_BUILD_PARALLEL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/kea/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=ISC Kea + URL:=https://www.isc.org/kea +endef + + +###### ************************************************************************* +define Package/kea + $(call Package/kea/Default) + TITLE+=ISC Kea +endef +# shown in LuCI package description +define Package/kea/description + Kea is an open source DHCPv4/DHCPv6 server being developed by Internet + Systems Consortium. Kea is a high-performance, extensible DHCP server + engine that is designed to be easily modified and extended with hooks + libraries. It provides DHCPv4 and DHCPv6 servers, a dynamic DNS update + module, a portable DHCP library, libdhcp++, control agent that provides + management REST interface, and a DHCP benchmarking tool, perfdhcp. +endef + +###### ************************************************************************* +define Package/kea-libs + $(call Package/kea/Default) + TITLE+=Libraries + DEPENDS:=+libopenssl +log4cplus \ + +boost +boost-system +endef +define Package/kea-libs/description + Kea required Libraries. +endef + +###### ************************************************************************* +define Package/kea-ctrl + $(call Package/kea/Default) + TITLE+=Control + DEPENDS:=+procps-ng +procps-ng-ps +kea-dhcp4 \ + +IPV6:kea-dhcp6 +kea-dhcp-ddns +endef +define Package/kea-ctrl/description + Tool to start, stop, reconfigure, and report status for the Kea servers. +endef + +###### ************************************************************************* +define Package/kea-dhcp4 + $(call Package/kea/Default) + TITLE+=DHCP Server v4 + DEPENDS:=+kea-libs +endef +define Package/kea-dhcp4/description + The DHCPv4 server process. This process responds to DHCPv4 queries from clients. +endef + +###### ************************************************************************* +define Package/kea-dhcp6 + $(call Package/kea/Default) + TITLE+=DHCP Server v6 + DEPENDS:=@IPV6 +kea-libs +endef +define Package/kea-dhcp6/description + The DHCPv6 server process. This process responds to DHCPv6 queries from clients. +endef + +###### ************************************************************************* +define Package/kea-dhcp-ddns + $(call Package/kea/Default) + TITLE+=DHCP Dynamic DNS + DEPENDS:=+kea-libs +endef +define Package/kea-dhcp-ddns/description + The DHCP Dynamic DNS process. This process acts as an intermediary between +the DHCP servers and DNS servers. It receives name update requests from the +DHCP servers and sends DNS Update messages to the DNS servers. +endef + +###### ************************************************************************* +define Package/kea-admin + $(call Package/kea/Default) + TITLE+=Admin + DEPENDS:=+kea-libs +endef +define Package/kea-admin/description + A useful tool for database backend maintenance (creating a new database, +checking versions, upgrading etc.). +endef + +##### ************************************************************************* +define Package/kea-lfc + $(call Package/kea/Default) + TITLE+=lfc + DEPENDS:=+kea-libs +endef +define Package/kea-lfc/description + This process removes redundant information from the files used to provide +persistent storage for the memfile data base backend. While it can be run +standalone, it is normally run as and when required by the Kea DHCP servers. +endef + +##### ************************************************************************* +define Package/kea-perfdhcp + $(call Package/kea/Default) + TITLE+=perfdhcp (Benchmarking) + DEPENDS:=+kea-libs +endef +define Package/kea-perfdhcp/description + A DHCP benchmarking tool which simulates multiple clients to test both +DHCPv4 and DHCPv6 server performance. +endef + +###### ************************************************************************* +HOST_CONFIGURE_ARGS += \ + --with-boost-include="$(STAGING_DIR_HOSTPKG)" \ + --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \ + --with-openssl="$(STAGING_DIR_HOST)" \ + --enable-boost-headers-only \ + --enable-generate-messages + +HOST_LDFLAGS += \ + -Wl,--gc-sections,--as-needed + +CONFIGURE_ARGS += \ + --with-boost-include="$(STAGING_DIR)/usr" \ + --with-log4cplus="$(STAGING_DIR)/usr" \ + --with-openssl="$(STAGING_DIR)/usr" \ + --without-pic \ + $(if $(CONFIG_PACKAGE_kea-perfdhcp),--enable-perfdhcp,) + +CONFIGURE_VARS += \ + cross_compiling="yes" + +TARGET_CXXFLAGS += \ + $(FPIC) \ + -fdata-sections \ + -ffunction-sections + +TARGET_LDFLAGS += \ + -Wl,--gc-sections,--as-needed + +# Only compile the kea-msg-compiler which we need for +# package compilation +define Host/Compile + +$(HOST_MAKE_VARS) \ + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/exceptions $(HOST_MAKE_FLAGS) + +$(HOST_MAKE_VARS) \ + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/util $(HOST_MAKE_FLAGS) + +$(HOST_MAKE_VARS) \ + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/log $(HOST_MAKE_FLAGS) +endef + +define Host/Install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/lib/log/compiler/kea-msg-compiler \ + $(STAGING_DIR_HOSTPKG)/bin/ +endef + +define Build/Compile + $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/lib/log/compiler + $(INSTALL_BIN) $(STAGING_DIR_HOSTPKG)/bin/kea-msg-compiler \ + $(PKG_BUILD_DIR)/src/lib/log/compiler/ + $(call Build/Compile/Default) +endef + +define Package/kea-libs/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ +endef + +define Package/kea-dhcp4/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp4 $(1)/usr/sbin/kea-dhcp4 + $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp4.conf $(1)/etc/kea/ +endef + +define Package/kea-dhcp6/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp6 $(1)/usr/sbin/kea-dhcp6 + $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp6.conf $(1)/etc/kea/ +endef + +define Package/kea-dhcp-ddns/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp-ddns $(1)/usr/sbin/kea-dhcp-ddns + $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp-ddns.conf $(1)/etc/kea/ +endef + +define Package/kea-admin/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-admin $(1)/usr/sbin/kea-admin +endef + +define Package/kea-ctrl/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keactrl $(1)/usr/sbin/keactrl + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-ctrl-agent $(1)/usr/sbin/kea-ctrl-agent + $(CP) $(PKG_INSTALL_DIR)/etc/kea/keactrl.conf $(1)/etc/kea/ + $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-ctrl-agent.conf $(1)/etc/kea/ +endef + +define Package/kea-lfc/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-lfc $(1)/usr/sbin/kea-lfc +endef + +define Package/kea-perfdhcp/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/perfdhcp $(1)/usr/sbin/perfdhcp +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,kea-libs)) +$(eval $(call BuildPackage,kea-ctrl)) +$(eval $(call BuildPackage,kea-dhcp4)) +$(eval $(call BuildPackage,kea-dhcp6)) +$(eval $(call BuildPackage,kea-dhcp-ddns)) +$(eval $(call BuildPackage,kea-admin)) +$(eval $(call BuildPackage,kea-lfc)) +$(eval $(call BuildPackage,kea-perfdhcp)) diff --git a/net/kea/patches/001-fix-cross-compile.patch b/net/kea/patches/001-fix-cross-compile.patch new file mode 100644 index 00000000..3189c654 --- /dev/null +++ b/net/kea/patches/001-fix-cross-compile.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -542,8 +542,8 @@ AC_TRY_COMPILE([ + AC_MSG_CHECKING(for usuable C++11 regex) +-AC_TRY_RUN([ ++AC_TRY_COMPILE([ + #include +-#include +-int main() { ++#include ], ++[int main() { + const std::regex regex(".*"); + const std::string string = "This should match!"; + const auto result = std::regex_search(string, regex); diff --git a/net/kea/patches/002-fix-host-compile.patch b/net/kea/patches/002-fix-host-compile.patch new file mode 100644 index 00000000..01f20d1a --- /dev/null +++ b/net/kea/patches/002-fix-host-compile.patch @@ -0,0 +1,11 @@ +--- a/m4macros/ax_crypto.m4 ++++ b/m4macros/ax_crypto.m4 +@@ -454,7 +454,7 @@ EOF + dnl Check availability of SHA-2 + AC_MSG_CHECKING([support of SHA-2]) + LIBS_SAVED=${LIBS} +- LIBS="$LIBS $CRYPTO_LIBS" ++ LIBS="$LIBS $CRYPTO_LIBS -lpthread" + CPPFLAGS_SAVED=${CPPFLAGS} + CPPFLAGS="$CRYPTO_INCLUDES $CPPFLAGS" + AC_LINK_IFELSE( diff --git a/net/kea/patches/003-no-test-compile.patch b/net/kea/patches/003-no-test-compile.patch new file mode 100644 index 00000000..245c660a --- /dev/null +++ b/net/kea/patches/003-no-test-compile.patch @@ -0,0 +1,326 @@ +--- a/src/bin/admin/Makefile.am ++++ b/src/bin/admin/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + # Install kea-admin in sbin. + sbin_SCRIPTS = kea-admin +--- a/src/bin/agent/Makefile.am ++++ b/src/bin/agent/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin +--- a/src/bin/d2/Makefile.am ++++ b/src/bin/d2/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin +--- a/src/bin/dhcp4/Makefile.am ++++ b/src/bin/dhcp4/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin +--- a/src/bin/dhcp6/Makefile.am ++++ b/src/bin/dhcp6/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin +--- a/src/bin/keactrl/Makefile.am ++++ b/src/bin/keactrl/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + # Install keactrl in sbin and the keactrl.conf required by the keactrl + # in etc. keactrl will look for its configuration file in the etc folder. +--- a/src/bin/lfc/Makefile.am ++++ b/src/bin/lfc/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin +--- a/src/bin/netconf/Makefile.am ++++ b/src/bin/netconf/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin +--- a/src/bin/perfdhcp/Makefile.am ++++ b/src/bin/perfdhcp/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin +--- a/src/bin/shell/Makefile.am ++++ b/src/bin/shell/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + pkgpython_PYTHON = kea_conn.py kea_connector2.py kea_connector3.py + +--- a/src/hooks/dhcp/high_availability/Makefile.am ++++ b/src/hooks/dhcp/high_availability/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/hooks/dhcp/lease_cmds/Makefile.am ++++ b/src/hooks/dhcp/lease_cmds/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/hooks/dhcp/stat_cmds/Makefile.am ++++ b/src/hooks/dhcp/stat_cmds/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/hooks/dhcp/user_chk/Makefile.am ++++ b/src/hooks/dhcp/user_chk/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/asiodns/Makefile.am ++++ b/src/lib/asiodns/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/asiolink/Makefile.am ++++ b/src/lib/asiolink/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . testutils tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/cc/Makefile.am ++++ b/src/lib/cc/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/cfgrpt/Makefile.am ++++ b/src/lib/cfgrpt/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CXXFLAGS = $(KEA_CXXFLAGS) +--- a/src/lib/config/Makefile.am ++++ b/src/lib/config/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/config_backend/Makefile.am ++++ b/src/lib/config_backend/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/cql/Makefile.am ++++ b/src/lib/cql/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . testutils tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) $(CQL_CPPFLAGS) +--- a/src/lib/cryptolink/Makefile.am ++++ b/src/lib/cryptolink/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) +--- a/src/lib/database/Makefile.am ++++ b/src/lib/database/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . testutils tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/dhcp/Makefile.am ++++ b/src/lib/dhcp/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/dhcp_ddns/Makefile.am ++++ b/src/lib/dhcp_ddns/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/dhcpsrv/Makefile.am ++++ b/src/lib/dhcpsrv/Makefile.am +@@ -1,6 +1,6 @@ + AUTOMAKE_OPTIONS = subdir-objects + +-SUBDIRS = . testutils tests benchmarks ++SUBDIRS = . benchmarks + + dhcp_data_dir = @localstatedir@/@PACKAGE@ + kea_lfc_location = @prefix@/sbin/kea-lfc +--- a/src/lib/dns/Makefile.am ++++ b/src/lib/dns/Makefile.am +@@ -1,6 +1,6 @@ + AUTOMAKE_OPTIONS = subdir-objects + +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/eval/Makefile.am ++++ b/src/lib/eval/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/exceptions/Makefile.am ++++ b/src/lib/exceptions/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CXXFLAGS=$(KEA_CXXFLAGS) +--- a/src/lib/hooks/Makefile.am ++++ b/src/lib/hooks/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/http/Makefile.am ++++ b/src/lib/http/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/log/Makefile.am ++++ b/src/lib/log/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = interprocess . compiler tests ++SUBDIRS = interprocess . compiler + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/log/interprocess/Makefile.am ++++ b/src/lib/log/interprocess/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += -DLOCKFILE_DIR=\"$(localstatedir)/run/$(PACKAGE_NAME)\" +--- a/src/lib/mysql/Makefile.am ++++ b/src/lib/mysql/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . testutils tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) $(MYSQL_CPPFLAGS) +--- a/src/lib/pgsql/Makefile.am ++++ b/src/lib/pgsql/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . testutils tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) $(PGSQL_CPPFLAGS) +--- a/src/lib/process/Makefile.am ++++ b/src/lib/process/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . testutils tests ++SUBDIRS = . + # DATA_DIR is the directory where to put PID files. + dhcp_data_dir = @runstatedir@/@PACKAGE@ + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib +--- a/src/lib/stats/Makefile.am ++++ b/src/lib/stats/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/util/Makefile.am ++++ b/src/lib/util/Makefile.am +@@ -1,6 +1,6 @@ + AUTOMAKE_OPTIONS = subdir-objects + +-SUBDIRS = . io unittests tests python threads ++SUBDIRS = . io python threads + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +--- a/src/lib/util/threads/Makefile.am ++++ b/src/lib/util/threads/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . tests ++SUBDIRS = . + AM_CXXFLAGS = $(KEA_CXXFLAGS) + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib +--- a/src/lib/yang/Makefile.am ++++ b/src/lib/yang/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . testutils pretests tests ++SUBDIRS = . + + AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_CPPFLAGS) diff --git a/net/kea/patches/010-openssl-deprecated.patch b/net/kea/patches/010-openssl-deprecated.patch new file mode 100644 index 00000000..c8b438ef --- /dev/null +++ b/net/kea/patches/010-openssl-deprecated.patch @@ -0,0 +1,11 @@ +--- a/src/lib/cryptolink/openssl_link.cc ++++ b/src/lib/cryptolink/openssl_link.cc +@@ -79,7 +79,7 @@ CryptoLink::initialize() { + + std::string + CryptoLink::getVersion() { +- return (SSLeay_version(SSLEAY_VERSION)); ++ return (OpenSSL_version(OPENSSL_VERSION)); + } + + } // namespace cryptolink diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index bac2c594..be6d806c 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived -PKG_VERSION:=2.0.19 -PKG_RELEASE:=3 +PKG_VERSION:=2.0.20 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software -PKG_HASH:=0e2f8454765bc6a5fa26758bd9cec18aae42882843cdd24848aff0ae65ce4ca7 +PKG_HASH:=9670fbc5eb3dc113828be8b702549dc68ec9578cf83287520d935be76fc8f193 PKG_CPE_ID:=cpe:/a:keepalived:keepalived PKG_LICENSE:=GPL-2.0-or-later @@ -216,6 +216,10 @@ define Package/keepalived/install $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf \ $(1)/etc/keepalived/ + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/etc/uci-defaults/keepalived \ + $(1)/etc/uci-defaults/keepalived + $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/keepalived.init \ $(1)/etc/init.d/keepalived diff --git a/net/keepalived/files/etc/uci-defaults/keepalived b/net/keepalived/files/etc/uci-defaults/keepalived new file mode 100644 index 00000000..ff5ff7d7 --- /dev/null +++ b/net/keepalived/files/etc/uci-defaults/keepalived @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check if old config section is still in use +uci show keepalived.@global_defs[-1] 1>/dev/null 2>/dev/null +if [ "$?" -eq "0" ]; then + uci -q rename keepalived.@global_defs[-1]=globals + uci -q commit keepalived + sed -i "s|^config global_defs 'globals'$|config globals 'globals'|" \ + /etc/config/keepalived +fi + +exit 0 diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init index cf425e87..03c2af68 100644 --- a/net/keepalived/files/keepalived.init +++ b/net/keepalived/files/keepalived.init @@ -95,14 +95,11 @@ print_notify() { done } -global_defs() { - local linkbeat_use_polling notification_email +globals() { + local notification_email - config_get alt_config_file "$1" alt_config_file - [ -z "$alt_config_file" ] || return 0 - - config_get_bool linkbeat_use_polling "$1" linkbeat_use_polling 0 - [ "$linkbeat_use_polling" -gt 0 ] && printf 'linkbeat_use_polling\n\n' >> "$KEEPALIVED_CONF" + printf '%bscript_user root\n' "${INDENT_1}" >> "$KEEPALIVED_CONF" + printf '%benable_script_security\n' "${INDENT_1}" >> "$KEEPALIVED_CONF" config_get notification_email "$1" notification_email print_list_indent notification_email @@ -484,7 +481,7 @@ virtual_server() { } process_config() { - local alt_config_file + local alt_config_file linkbeat_use_polling rm -f "$KEEPALIVED_CONF" @@ -494,10 +491,7 @@ process_config() { [ -f /etc/config/keepalived ] || return 0 config_load 'keepalived' - - config_section_open "global_defs" - config_foreach_wrapper global_defs - config_section_close + config_get alt_config_file globals alt_config_file # If "alt_config_file" specified, use that instead [ -n "$alt_config_file" ] && [ -f "$alt_config_file" ] && { @@ -507,6 +501,13 @@ process_config() { return 0 } + config_get_bool linkbeat_use_polling globals linkbeat_use_polling 0 + [ "$linkbeat_use_polling" -gt 0 ] && printf 'linkbeat_use_polling\n\n' >> "$KEEPALIVED_CONF" + + config_section_open "global_defs" + config_foreach_wrapper globals + config_section_close + config_section_open "static_ipaddress" config_foreach_wrapper static_ipaddress config_section_close diff --git a/net/keepalived/patches/0001-Fix-building-with-disable-libipvs-dynamic.patch b/net/keepalived/patches/0001-Fix-building-with-disable-libipvs-dynamic.patch new file mode 100644 index 00000000..33d7ed1f --- /dev/null +++ b/net/keepalived/patches/0001-Fix-building-with-disable-libipvs-dynamic.patch @@ -0,0 +1,53 @@ +From 42c020aab6e51d09f22a2e4a33ce6fd73009e2dc Mon Sep 17 00:00:00 2001 +From: Quentin Armitage +Date: Wed, 4 Mar 2020 12:21:43 +0000 +Subject: [PATCH] Fix building with --disable-libipvs-dynamic + +Issue #1516 reported by the OpenWRT project identified that +keepalived_modprobe() was not defined if --disable-libipvs-dynamic +was specified. + +Signed-off-by: Quentin Armitage +--- + lib/utils.c | 4 ++-- + lib/utils.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/utils.c b/lib/utils.c +index 009da0ce..7f16f444 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -34,7 +34,7 @@ + #include + #include + #include +-#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_ ++#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_ + #include + #endif + #ifdef _WITH_PERF_ +@@ -1097,7 +1097,7 @@ memcmp_constant_time(const void *s1, const void *s2, size_t n) + * Utility functions coming from Wensong code + */ + +-#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_ ++#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_ + static char* + get_modprobe(void) + { +diff --git a/lib/utils.h b/lib/utils.h +index 66d64d9f..22325023 100644 +--- a/lib/utils.h ++++ b/lib/utils.h +@@ -263,7 +263,7 @@ extern int open_pipe(int [2]); + #endif + extern int memcmp_constant_time(const void *, const void *, size_t); + +-#if defined _WITH_LVS_ || defined _LIBIPSET_DYNAMIC_ ++#if defined _WITH_LVS_ || defined _HAVE_LIBIPSET_ + extern bool keepalived_modprobe(const char *); + #endif + +-- +2.20.1 + diff --git a/net/kismet/Makefile b/net/kismet/Makefile index 97f56fe8..baacf6e4 100644 --- a/net/kismet/Makefile +++ b/net/kismet/Makefile @@ -9,9 +9,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kismet PKG_VERSION:=2016-07-R1 -PKG_RELEASE:=1 +PKG_RELEASE:=4 PKG_LICENSE:=LGPLv2.1 +PKG_CPE_ID:=cpe:/a:kismet:kismet PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.kismetwireless.net/code @@ -27,7 +28,7 @@ define Package/kismet/Default MAINTAINER:=Jean-Michel lacroix DEPENDS:= $(CXX_DEPENDS) +libnl URL:=http://www.kismetwireless.net/ - SUBMENU:=wireless + SUBMENU:=Wireless endef define Package/kismet/Default/description @@ -40,10 +41,12 @@ define Package/kismet-client/conffiles endef define Package/kismet-drone/conffiles +/etc/config/kismet_drone /etc/kismet/kismet_drone.conf endef define Package/kismet-server/conffiles +/etc/config/kismet_server /etc/kismet/kismet.conf endef diff --git a/net/kismet/patches/030-libcxx.patch b/net/kismet/patches/030-libcxx.patch new file mode 100644 index 00000000..9f0a9966 --- /dev/null +++ b/net/kismet/patches/030-libcxx.patch @@ -0,0 +1,64 @@ +--- a/ipc_remote.cc ++++ b/ipc_remote.cc +@@ -914,7 +914,7 @@ int RootIPCRemote::OpenFDPassSock() { + return -1; + } + +- if (bind(ipc_fd_fd, (const struct sockaddr *) &unixsock, sizeof(unixsock))) { ++ if (::bind(ipc_fd_fd, (const struct sockaddr *) &unixsock, sizeof(unixsock))) { + close(ipc_fd_fd); + _MSG("Failed to bind socket to pass file descriptors: " + + string(strerror(errno)), MSGFLAG_ERROR); +--- a/packetsource_wext.cc ++++ b/packetsource_wext.cc +@@ -405,7 +405,7 @@ void PacketSource_Wext::OpenWpaSupplicant() { + wpa_local.sun_family = AF_UNIX; + snprintf(wpa_local.sun_path, sizeof(wpa_local.sun_path), + "%s", wpa_local_path.c_str()); +- if (bind(wpa_sock, (struct sockaddr *) &wpa_local, sizeof(wpa_local)) < 0) { ++ if (::bind(wpa_sock, (struct sockaddr *) &wpa_local, sizeof(wpa_local)) < 0) { + _MSG("Source '" + parent + "' failed to bind local socket for " + "wpa_supplicant, disabling scan_wpa: " + string(strerror(errno)), + MSGFLAG_PRINTERROR); +--- a/tcpclient.cc ++++ b/tcpclient.cc +@@ -75,7 +75,7 @@ int TcpClient::Connect(const char *in_remotehost, short int in_port, + local_sock.sin_addr.s_addr = htonl(INADDR_ANY); + local_sock.sin_port = htons(0); + +- if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) { ++ if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) { + snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno)); + globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR); + close(cli_fd); +@@ -170,7 +170,7 @@ int TcpClient::ConnectSync(const char *in_remotehost, short int in_port, + local_sock.sin_addr.s_addr = htonl(INADDR_ANY); + local_sock.sin_port = htons(0); + +- if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) { ++ if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) { + snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno)); + globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR); + close(cli_fd); +--- a/tcpserver.cc ++++ b/tcpserver.cc +@@ -84,7 +84,7 @@ int TcpServer::EnableServer() { + } + + // Bind the socket +- if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) { ++ if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) { + snprintf(errstr, STATUS_MAX, "TCP server bind() failed: %s", + strerror(errno)); + globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR); +--- a/unixdomainserver.cc ++++ b/unixdomainserver.cc +@@ -64,7 +64,7 @@ int UnixDomainServer::EnableServer() { + } + + // Bind the socket +- if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) { ++ if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) { + _MSG("Unix domain server bind() failed: " + string(strerror(errno)), + MSGFLAG_ERROR); + return -1; diff --git a/net/knot/Makefile b/net/knot/Makefile index 4bcd1280..f835a7f1 100644 --- a/net/knot/Makefile +++ b/net/knot/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2014-2018 CZ.NIC, z.s.p.o. +# Copyright (C) 2014-2019 CZ.NIC, z.s.p.o. # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,17 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=knot -PKG_VERSION:=2.6.6 +PKG_VERSION:=2.9.5 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/ -PKG_HASH:=9119d8a56828a596d246431492be8c015f918de65ba793d76071122567c3080a +PKG_HASH:=1109a8ba212ff8ddfdbaf44a6f8fc13a2b880a98a9e54c19112ba72a1aacbf76 PKG_MAINTAINER:=Daniel Salzman -PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD MIT OLDAP-2.8 +PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8 +PKG_CPE_ID:=cpe:/a:knot-dns:knot_dns -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -44,12 +44,13 @@ endef define Package/knot-libs $(call Package/knot-lib/Default) TITLE+= common DNS and DNSSEC libraries - DEPENDS+=+libgnutls + DEPENDS+=+libgnutls +lmdb @!arc endef define Package/knot-libzscanner $(call Package/knot-lib/Default) TITLE+= zone parser library + DEPENDS+=@!arc endef define Package/knot @@ -144,8 +145,11 @@ define Package/knot-tests/description Usage: /usr/share/knot/runtests.sh endef +export KNOT_VERSION_FORMAT=release + CONFIGURE_ARGS += \ --enable-recvmmsg=no \ + --enable-cap-ng=no \ --disable-fastparser \ --without-libidn \ --with-rundir=/var/run/knot \ @@ -161,12 +165,10 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) - $(MAKE) -C $(PKG_BUILD_DIR)/libtap check - $(MAKE) -C $(PKG_BUILD_DIR)/src/dnssec/tests check-compile $(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile - $(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile endef +ifneq ($(CONFIG_arc),y) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} $(1)/usr/lib/ @@ -174,15 +176,16 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/libknot $(CP) $(PKG_INSTALL_DIR)/usr/include/libknot/* $(1)/usr/include/libknot/ - $(INSTALL_DIR) $(1)/usr/include/dnssec - $(CP) $(PKG_INSTALL_DIR)/usr/include/dnssec/* $(1)/usr/include/dnssec/ + $(INSTALL_DIR) $(1)/usr/include/libdnssec + $(CP) $(PKG_INSTALL_DIR)/usr/include/libdnssec/* $(1)/usr/include/libdnssec/ - $(INSTALL_DIR) $(1)/usr/include/zscanner - $(CP) $(PKG_INSTALL_DIR)/usr/include/zscanner/* $(1)/usr/include/zscanner/ + $(INSTALL_DIR) $(1)/usr/include/libzscanner + $(CP) $(PKG_INSTALL_DIR)/usr/include/libzscanner/* $(1)/usr/include/libzscanner/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ endef +endif define Package/knot-libs/install $(INSTALL_DIR) $(1)/usr/lib @@ -237,30 +240,22 @@ define Package/knot-tests/install $(INSTALL_DIR) $(1)/usr/share/knot $(INSTALL_BIN) ./files/runtests.sh $(1)/usr/share/knot/ - $(INSTALL_DIR) $(1)/usr/share/knot/tap - $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/runtests $(1)/usr/share/knot/tap/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/tap/libtap.sh $(1)/usr/share/knot/tap/ + $(INSTALL_DIR) $(1)/usr/share/knot/tap + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/.libs/runtests $(1)/usr/share/knot/tap/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh $(1)/usr/share/knot/tap/ $(INSTALL_DIR) $(1)/usr/share/knot/tests - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/.libs/zscanner-tool $(1)/usr/share/knot/tests/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/unittests $(1)/usr/share/knot/tests/test_zscanner - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/zscanner/tests/TESTS $(1)/usr/share/knot/tests/ - cp -a $(PKG_BUILD_DIR)/src/zscanner/tests/data $(1)/usr/share/knot/tests/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/libzscanner/.libs/zscanner-tool $(1)/usr/share/knot/tests/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/libzscanner/test_zscanner $(1)/usr/share/knot/tests/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/libzscanner/TESTS $(1)/usr/share/knot/tests/ + cp -a $(PKG_BUILD_DIR)/tests/libzscanner/data $(1)/usr/share/knot/tests/ - find $(PKG_BUILD_DIR)/src/dnssec/tests -maxdepth 1 -executable -type f | \ - xargs -I{} basename {} | \ - xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/src/dnssec/tests/{} $(1)/usr/share/knot/tests/dnssec_test_{} - - find $(PKG_BUILD_DIR)/tests/.libs -maxdepth 1 -executable -type f | \ - xargs -I{} basename {} | \ - xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{} $(1)/usr/share/knot/tests/{} - - for module in contrib libknot modules utils; do \ + for module in contrib knot libdnssec libknot modules utils; do \ find $(PKG_BUILD_DIR)/tests/$$$${module}/.libs -maxdepth 1 -executable -type f | \ xargs -I{} basename {} | \ xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/$$$${module}/.libs/{} \ - $(1)/usr/share/knot/tests/$$$${module}_{}; \ + $(1)/usr/share/knot/tests/$$$${module}_{}; \ done endef diff --git a/net/knot/patches/01_zscanner_tests.patch b/net/knot/patches/01_zscanner_tests.patch index 7ea4cfdd..bd147ddc 100644 --- a/net/knot/patches/01_zscanner_tests.patch +++ b/net/knot/patches/01_zscanner_tests.patch @@ -1,17 +1,17 @@ -diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in -index 9a4af53..f9b45bf 100644 ---- a/src/zscanner/tests/unittests.in -+++ b/src/zscanner/tests/unittests.in +diff --git a/tests/libzscanner/test_zscanner.in b/tests/libzscanner/test_zscanner.in +index 2c0c27526..72b2124c7 100644 +--- a/tests/libzscanner/test_zscanner.in ++++ b/tests/libzscanner/test_zscanner.in @@ -1,15 +1,14 @@ #!/bin/sh --SOURCE=@top_srcdir@/src/zscanner/tests --BUILD=@top_builddir@/src/zscanner/tests +-SOURCE=@top_srcdir@/tests/libzscanner +-BUILD=@top_builddir@/tests/libzscanner +SOURCE="." +BUILD="/tmp/knot-test" +mkdir -p "$BUILD" --. @top_srcdir@/libtap/tap/libtap.sh +-. @top_srcdir@/tests/tap/libtap.sh - -cd "$BUILD" +. ../tap/libtap.sh @@ -19,7 +19,7 @@ index 9a4af53..f9b45bf 100644 TMPDIR=$(test_tmpdir) TESTS_DIR="$SOURCE"/data -ZSCANNER_TOOL="$BUILD"/zscanner-tool -+ZSCANNER_TOOL=./zscanner-tool ++ZSCANNER_TOOL="$SOURCE"/zscanner-tool - plan 71 + plan 84 diff --git a/net/knot/patches/02_knot.conf.patch b/net/knot/patches/02_knot.conf.patch index 54ad80b7..8c626690 100644 --- a/net/knot/patches/02_knot.conf.patch +++ b/net/knot/patches/02_knot.conf.patch @@ -1,24 +1,13 @@ diff --git a/samples/knot.sample.conf.in b/samples/knot.sample.conf.in -index e07c8a7..8e057b0 100644 +index 10302f958..75082f537 100644 --- a/samples/knot.sample.conf.in +++ b/samples/knot.sample.conf.in -@@ -9,7 +9,7 @@ server: - # Listen on all configured IPv6 interfaces. - listen: ::@53 - # User for running the server. -- # user: knot:knot -+ user: knot:knot - - log: - # Log info and more serious events to syslog. -@@ -33,7 +33,9 @@ acl: - # action: notify - - template: --# - id: default -+ - id: default -+ max-journal-db-size: 20M -+ max-timer-db-size: 5M - # storage: "@storage_dir@" +@@ -30,6 +30,8 @@ template: + - id: default + storage: "@storage_dir@" + file: "%s.zone" ++ max-journal-db-size: 20M ++ max-timer-db-size: 5M zone: + # # Master zone diff --git a/net/knxd/Makefile b/net/knxd/Makefile index 7cd65cac..774062c6 100644 --- a/net/knxd/Makefile +++ b/net/knxd/Makefile @@ -11,27 +11,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=knxd -PKG_VERSION:=0.14.24 -PKG_RELEASE:=2 +PKG_VERSION:=0.14.39 +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/knxd/knxd.git -PKG_SOURCE_VERSION:=d29f7047a8b20a7ac57c3c9ad349c12be60f9fee -PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=07857ce8c7c8be965b1baf81566671ab89c3ae8bbcd8f1fe05df0c38a4465664 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/knxd/knxd/tar.gz/$(PKG_VERSION)? +PKG_HASH:=9ed920fa3c4f12ededd4d413f27f149c91ce0846c561a7d19478502c06ac95f1 PKG_MAINTAINER:=Othmar Truniger - -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_BUILD_DEPENDS:=argp-standalone - PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone include $(INCLUDE_DIR)/package.mk @@ -39,7 +33,7 @@ define Package/knxd SECTION:=net CATEGORY:=Network TITLE:=EIB KNX daemon - DEPENDS:=+libusb-1.0 +libstdcpp +libev +libfmt + DEPENDS:=+libusb-1.0 +libev +libfmt endef define Package/knxd/description @@ -51,14 +45,10 @@ define Package/knxd/conffiles /etc/config/knxd endef -TARGET_CXXFLAGS+= -std=c++0x -TARGET_CXX=$(TARGET_CC) - CONFIGURE_ARGS+= \ --disable-systemd -EXTRA_LDFLAGS+= \ - -largp -lstdc++ +TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lm) define Package/knxd/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/net/knxd/files/knxd.config b/net/knxd/files/knxd.config index 81dacaab..b4cfa4e3 100644 --- a/net/knxd/files/knxd.config +++ b/net/knxd/files/knxd.config @@ -8,7 +8,9 @@ config daemon args #enable the EIBnet/IP server to answer discovery and description requests (SEARCH, DESCRIPTION) option Discovery 1 # EIBADDR set our EIB address to EIBADDR (default 0.0.1) - option eibaddr "0.0.2" + option eibaddr "0.0.1" + # CLIENTADDRS set client addrs + option client_addrs "0.0.2:10" # LEVEL set error level option error 0 # PORT listen at TCP port PORT (default 6720) diff --git a/net/knxd/files/knxd.ini b/net/knxd/files/knxd.ini index b4193dd5..b676e1c0 100644 --- a/net/knxd/files/knxd.ini +++ b/net/knxd/files/knxd.ini @@ -7,7 +7,6 @@ driver = ip name = mcast:knxd [main] addr = 0.0.1 -background = true client-addrs = 0.0.2:10 connections = A.tcp,server,B.ip [server] diff --git a/net/knxd/files/knxd.init b/net/knxd/files/knxd.init index 7eafebbb..5179cf45 100644 --- a/net/knxd/files/knxd.init +++ b/net/knxd/files/knxd.init @@ -36,7 +36,7 @@ start_service() { append_parm args client_addrs "client-addrs" "0.0.2:10" append_parm args layer2 "layer2" append_bool args GroupCache "GroupCache" 0 - append_parm args daemon "daemon" "/var/log/knxd.log" + #append_parm args daemon "daemon" "/var/log/knxd.log" append_parm args error "error" # "5" append_parm args listen_tcp "listen-tcp" "6720" append_parm args Interface "Interface" # "eth0" @@ -56,18 +56,16 @@ start_service() { if [ "$url" == "usb:" ] ; then url="usb:""$(findknxusb | tail -n1 | sed -e 's/device: \([0-9]:[0-9]:[0-9]\):[0-9].*/\1/')" fi - echo "/usr/lib/knxd_args $params $url" - /usr/lib/knxd_args $params $url > /tmp/etc/knxd.ini + echo "/usr/lib/knxd_args $params -b $url" + /usr/lib/knxd_args $params -b $url > /tmp/etc/knxd.ini procd_open_instance procd_set_param command $PROG "/tmp/etc/knxd.ini" procd_set_param respawn + procd_set_param stdout 1 + procd_set_param stderr 1 procd_close_instance } -stop_service() { - killall knxd -} - reload_service() { restart diff --git a/net/knxd/patches/0099-openwrt.patch b/net/knxd/patches/0099-openwrt.patch index b1da96ce..346a79b9 100644 --- a/net/knxd/patches/0099-openwrt.patch +++ b/net/knxd/patches/0099-openwrt.patch @@ -1,8 +1,9 @@ --- a/src/client/Makefile.am 2017-01-25 20:17:14.000000000 +0100 +++ b/src/client/Makefile.am 2017-01-25 20:18:50.639995000 +0100 @@ -4,5 +4,5 @@ - BUILDJAVA = + BUILDJAVA = endif - + -SUBDIRS=def c $(BUILDJAVA) php perl cs python pascal ruby lua go . +SUBDIRS=def c $(BUILDJAVA) php perl cs . + diff --git a/net/knxd/patches/0100-version.patch b/net/knxd/patches/0100-version.patch new file mode 100644 index 00000000..9ff5a311 --- /dev/null +++ b/net/knxd/patches/0100-version.patch @@ -0,0 +1,8 @@ +--- a/tools/version.sh 2020-04-08 19:39:40.349461034 +0200 ++++ b/tools/version.sh 2020-05-13 13:40:26.354277094 +0200 +@@ -1,4 +1,3 @@ + #!/bin/sh + +-test -d .git || exit +-git describe --tags ++echo -n "0.14.39" diff --git a/net/kplex/Makefile b/net/kplex/Makefile index d2a5395d..1c0aae99 100644 --- a/net/kplex/Makefile +++ b/net/kplex/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kplex -PKG_VERSION:=1.3.4 -PKG_RELEASE=1 +PKG_VERSION:=1.4 +PKG_RELEASE=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=http://www.stripydog.com/download -PKG_HASH:=b507d85d5f1def40303326459268a6262d37ea5f13fb73b37b72854e53594dcc +PKG_HASH:=8c2f1ccba4a22cb3b683b73b9dab6ce317e7d858764f1c2c695970f94c726fc1 -PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Nuno Goncalves diff --git a/net/krb5/Makefile b/net/krb5/Makefile index 5e366e36..c268950c 100644 --- a/net/krb5/Makefile +++ b/net/krb5/Makefile @@ -8,21 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=krb5 -PKG_VERSION:=1.16.1 -PKG_RELEASE:=3 +PKG_VERSION:=1.17 +PKG_RELEASE:=2 PKG_MAINTAINER:=W. Michael Petullo PKG_LICENSE:=MIT PKG_LICENSE_FILES:=NOTICE +PKG_CPE_ID:=cpe:/a:mit:kerberos PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://web.mit.edu/kerberos/dist/krb5/1.16/ -PKG_HASH:=214ffe394e3ad0c730564074ec44f1da119159d94281bbec541dc29168d21117 +PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.17 +PKG_HASH:=5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_CHECK_FORMAT_SECURITY:=0 PKG_USE_MIPS16:=0 include $(INCLUDE_DIR)/package.mk @@ -33,7 +33,7 @@ define Package/krb5/Default SECTION:=net CATEGORY:=Network TITLE:=Kerberos - URL:=http://web.mit.edu/kerberos/ + URL:=https://web.mit.edu/kerberos/ endef define Package/krb5-libs @@ -51,6 +51,12 @@ define Package/krb5-server TITLE:=Kerberos 5 Server endef +define Package/krb5-server-extras + $(call Package/krb5/Default) + DEPENDS:=+krb5-libs +libpthread + TITLE:=Kerberos 5 Admin Server +endef + define Package/krb5-client $(call Package/krb5/Default) DEPENDS:=+krb5-libs @@ -71,7 +77,8 @@ CONFIGURE_VARS += \ ac_cv_func_regcomp=yes \ ac_cv_printf_positional=yes \ ac_cv_file__etc_environment=no \ - ac_cv_file__etc_TIMEZONE=no + ac_cv_file__etc_TIMEZONE=no \ + ac_cv_header_keyutils_h=no CONFIGURE_ARGS += \ --localstatedir=/etc \ @@ -124,18 +131,25 @@ endef define Package/krb5-server/install $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc -# $(INSTALL_DIR) $(1)/usr/bin -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin +endef + +define Package/krb5-server-extras/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin +endef + +define Package/krb5-server/postinst +mkdir -p $${IPKG_INSTROOT}/etc/krb5kdc +touch $${IPKG_INSTROOT}/etc/krb5kdc/kadm5.acl endef $(eval $(call BuildPackage,krb5-libs)) $(eval $(call BuildPackage,krb5-server)) +$(eval $(call BuildPackage,krb5-server-extras)) $(eval $(call BuildPackage,krb5-client)) diff --git a/net/krb5/files/krb5kdc b/net/krb5/files/krb5kdc index dec7188e..fd428c93 100644 --- a/net/krb5/files/krb5kdc +++ b/net/krb5/files/krb5kdc @@ -10,10 +10,10 @@ start() { [ -f /etc/krb5kdc/principal ] || ( echo; echo ) | kdb5_util create -s /usr/sbin/krb5kdc - /usr/sbin/kadmind + [ -x /usr/sbin/kadmind ] && /usr/sbin/kadmind } stop() { killall krb5kdc 2> /dev/null - killall kadmind 2> /dev/null + [ -x /usr/sbin/kadmind ] && killall kadmind 2> /dev/null } diff --git a/net/krb5/patches/001-fix-uninitialized-warning-errors.patch b/net/krb5/patches/001-fix-uninitialized-warning-errors.patch index 88397c9e..2ec16f85 100644 --- a/net/krb5/patches/001-fix-uninitialized-warning-errors.patch +++ b/net/krb5/patches/001-fix-uninitialized-warning-errors.patch @@ -1,6 +1,17 @@ +--- a/src/kadmin/ktutil/ktutil_funcs.c ++++ b/src/kadmin/ktutil/ktutil_funcs.c +@@ -64,7 +64,7 @@ krb5_error_code ktutil_delete(context, list, idx) + krb5_kt_list *list; + int idx; + { +- krb5_kt_list lp, prev; ++ krb5_kt_list lp, prev = NULL; + int i; + + for (lp = *list, i = 1; lp; prev = lp, lp = lp->next, i++) { --- a/src/lib/kadm5/str_conv.c +++ b/src/lib/kadm5/str_conv.c -@@ -131,7 +131,7 @@ +@@ -133,7 +133,7 @@ raw_flagspec_to_mask(const char *s, int req_neg, krb5_flags *toset, { int found = 0, invert = 0; size_t i; @@ -11,7 +22,7 @@ for (i = 0; !found && i < NFTBL; i++) { --- a/src/lib/krad/packet.c +++ b/src/lib/krad/packet.c -@@ -253,7 +253,7 @@ +@@ -253,7 +253,7 @@ krad_packet_new_request(krb5_context ctx, const char *secret, krad_code code, { krb5_error_code retval; krad_packet *pkt; @@ -22,7 +33,7 @@ pkt = packet_new(); --- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c +++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c -@@ -3618,7 +3618,7 @@ +@@ -3764,7 +3764,7 @@ pkinit_open_session(krb5_context context, { CK_ULONG i, r; unsigned char *cp; @@ -33,7 +44,7 @@ CK_TOKEN_INFO tinfo; --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c -@@ -309,7 +309,7 @@ +@@ -309,7 +309,7 @@ errcode_t profile_update_file_data_locked(prf_data_t data, char **ret_modspec) unsigned long frac; time_t now; #endif @@ -42,14 +53,3 @@ int isdir = 0; #ifdef HAVE_STAT ---- a/src/kadmin/ktutil/ktutil_funcs.c -+++ b/src/kadmin/ktutil/ktutil_funcs.c -@@ -64,7 +64,7 @@ - krb5_kt_list *list; - int idx; - { -- krb5_kt_list lp, prev; -+ krb5_kt_list lp, prev = NULL; - int i; - - for (lp = *list, i = 1; lp; prev = lp, lp = lp->next, i++) { diff --git a/net/ksmbd-tools/Makefile b/net/ksmbd-tools/Makefile new file mode 100644 index 00000000..86b5aafc --- /dev/null +++ b/net/ksmbd-tools/Makefile @@ -0,0 +1,139 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=ksmbd-tools +PKG_VERSION:=3.2.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/ksmbd-tools/tar.gz/$(PKG_VERSION)? +PKG_HASH:=595029adb899fd8b4c49bea75bce4e3c3466811ef7089b2a55960174e720d919 + +PKG_MAINTAINER:=Andy Walsh +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING + +PKG_FIXUP:=autoreconf +PKG_REMOVE_FILES:=autogen.sh +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_BUILD_DEPENDS:=glib2 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TAR_OPTIONS+= --strip-components 1 +TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) + +define Package/ksmbd-tools/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + TITLE:=Kernel SMB + URL:=https://github.com/cifsd-team/cifsd-tools + DEPENDS:= $(ICONV_DEPENDS) $(INTL_DEPENDS) +endef + +define Package/ksmbd-tools/Default/description + Userspace tools to manage the SMB kernel fileserver (ksmbd.ko). + The config file location is /etc/ksmbd/smb.conf +endef + +define Package/ksmbd-server + $(call Package/ksmbd-tools/Default) + TITLE+= server + DEPENDS+= +kmod-fs-ksmbd +libnl-core +libnl-genl +endef + +define Package/ksmbd-server/description + installs: ksmbd.mountd + + This provides the basic fileserver service and is the minimum needed to serve 'guest only' file shares or use a existing user database file ksmbdpwd.db. +endef + +define Package/ksmbd-server/config + select PACKAGE_wsdd2 +endef + +define Package/ksmbd-utils + $(call Package/ksmbd-tools/Default) + TITLE+= user management-util +endef + +define Package/ksmbd-utils/description + installs: ksmbd.adduser (ksmbd.addshare) + + Tool needed to create the ksmbdpwd.db, to manage per user share passwords. + NOTE: Not needed for 'guest only' shares. +endef + +define Package/ksmbd-utils/config + config KSMBD_UTILS_SHAREADD + bool "Add ksmbd.addshare util" + depends on PACKAGE_ksmbd-utils + help + Add the ksmbd.addshare tool, to directly manipulate the /etc/ksmbd/smb.conf. + default n +endef + +define Package/ksmbd-avahi-service + $(call Package/ksmbd-tools/Default) + TITLE+= (Avahi service) + DEPENDS:= +avahi-daemon +endef + +define Package/ksmbd-avahi-service/description + installs: smb.service + + This package contains the service definition for announcing the + Ksmbd (smb/445) Daemon service via mDNS/DNS-SD. +endef + +CONFIGURE_ARGS += \ + --disable-shared \ + --enable-static + +CONFIGURE_VARS += GLIB_LIBS="$(STAGING_DIR)/usr/lib/libglib-2.0.a" + +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -liconv $(if $(INTL_FULL),-lintl) + +define Package/ksmbd-server/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ksmbd.mountd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/config $(1)/etc/ksmbd $(1)/etc/init.d + $(INSTALL_CONF) ./files/ksmbd.config $(1)/etc/config/ksmbd + $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/ksmbd/ + $(INSTALL_BIN) ./files/ksmbd.init $(1)/etc/init.d/ksmbd + # copy examples until we have a wiki page + $(INSTALL_DATA) ./files/ksmbd.config.example $(1)/etc/ksmbd/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/Documentation/configuration.txt $(1)/etc/ksmbd/ +endef + +define Package/ksmbd-utils/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ksmbd.adduser $(1)/usr/sbin/ +ifeq ($(CONFIG_KSMBD_UTILS_SHAREADD),y) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ksmbd.addshare $(1)/usr/sbin/ +endif +endef + +define Package/ksmbd-avahi-service/install + $(INSTALL_DIR) $(1)/etc/avahi/services + $(INSTALL_DATA) ./files/smb.service $(1)/etc/avahi/services/ +endef + +define Package/ksmbd-server/conffiles +/etc/config/ksmbd +/etc/ksmbd/smb.conf.template +/etc/ksmbd/smb.conf +/etc/ksmbd/ksmbdpwd.db +endef + +define Package/ksmbd-avahi-service/conffiles +/etc/avahi/services/smb.service +endef + +$(eval $(call BuildPackage,ksmbd-server)) +$(eval $(call BuildPackage,ksmbd-utils)) +$(eval $(call BuildPackage,ksmbd-avahi-service)) diff --git a/net/ksmbd-tools/files/ksmbd.config b/net/ksmbd-tools/files/ksmbd.config new file mode 100644 index 00000000..52c65185 --- /dev/null +++ b/net/ksmbd-tools/files/ksmbd.config @@ -0,0 +1,3 @@ +config globals + option 'workgroup' 'WORKGROUP' + option 'description' 'Ksmbd on OpenWrt' diff --git a/net/ksmbd-tools/files/ksmbd.config.example b/net/ksmbd-tools/files/ksmbd.config.example new file mode 100644 index 00000000..9a457e03 --- /dev/null +++ b/net/ksmbd-tools/files/ksmbd.config.example @@ -0,0 +1,11 @@ +config globals + option 'description' 'Ksmbd on OpenWrt' + +config share + option name 'testshare' + option path '/tmp' + option read_only 'no' + option guest_ok 'yes' + option create_mask '0666' + option dir_mask '0777' + option force_root '1' diff --git a/net/ksmbd-tools/files/ksmbd.init b/net/ksmbd-tools/files/ksmbd.init new file mode 100644 index 00000000..5eb34708 --- /dev/null +++ b/net/ksmbd-tools/files/ksmbd.init @@ -0,0 +1,207 @@ +#!/bin/sh /etc/rc.common + +START=98 +USE_PROCD=1 + +SMBD_IFACE="" + +smb_header() +{ + config_get SMBD_IFACE $1 interface "lan" + + # resolve interfaces + local interfaces + interfaces=$( + . /lib/functions/network.sh + + local net + for net in $SMBD_IFACE; do + local device + network_is_up $net || continue + network_get_device device "$net" + echo -n "${device:-$net} " + done + ) + + local workgroup description + local hostname + hostname="$(cat /proc/sys/kernel/hostname)" + + config_get workgroup $1 workgroup "WORKGROUP" + config_get description $1 description "Ksmbd on OpenWrt" + config_get_bool ALLOW_LEGACY_PROTOCOLS $1 allow_legacy_protocols 0 + + sed -e "s#|NAME|#$hostname#g" \ + -e "s#|WORKGROUP|#$workgroup#g" \ + -e "s#|DESCRIPTION|#$description#g" \ + -e "s#|INTERFACES|#$interfaces#g" \ + /etc/ksmbd/smb.conf.template > /var/etc/ksmbd/smb.conf + + { + printf "\n######### Dynamic written config options #########\n" + + if [ "$ALLOW_LEGACY_PROTOCOLS" -eq 1 ]; then + logger -p daemon.info -t 'ksmbd' "Legacy Protocols allowed, don't use this option for secure environments!" + printf "\tserver min protocol = NT1\n" + printf "\tserver signing = disabled\n" + fi + } >> /var/etc/ksmbd/smb.conf + + [ -e /etc/ksmbd/smb.conf ] || ln -nsf /var/etc/ksmbd/smb.conf /etc/ksmbd/smb.conf + + if [ ! -L /etc/ksmbd/smb.conf ]; then + logger -p daemon.warn -t 'ksmbd' "Local custom /etc/ksmbd/smb.conf file detected, all UCI/Luci config settings are ignored!" + fi +} + +smb_add_share() +{ + local name + local path + local comment + local users + local create_mask + local dir_mask + local browseable + local read_only + local writeable + local guest_ok + local force_root + local write_list + local read_list + local hide_dot_files + local veto_files + local inherit_owner + local force_create_mode + local force_directory_mode + + config_get name $1 name + config_get path $1 path + config_get comment $1 comment + config_get users $1 users + config_get create_mask $1 create_mask + config_get dir_mask $1 dir_mask + config_get browseable $1 browseable + config_get read_only $1 read_only + config_get writeable $1 writeable + config_get guest_ok $1 guest_ok + config_get_bool force_root $1 force_root 0 + config_get write_list $1 write_list + config_get read_list $1 read_list + config_get hide_dot_files $1 hide_dot_files + config_get veto_files $1 veto_files + config_get inherit_owner $1 inherit_owner + config_get force_create_mode $1 force_create_mode + config_get force_directory_mode $1 force_directory_mode + + [ -z "$name" ] || [ -z "$path" ] && return + + { + printf "\n[%s]\n\tpath = %s\n" "$name" "$path" + [ -n "$comment" ] && printf "\tcomment = %s\n" "$comment" + + if [ "$force_root" -eq 1 ]; then + printf "\tforce user = %s\n" "root" + printf "\tforce group = %s\n" "root" + else + [ -n "$users" ] && printf "\tvalid users = %s\n" "$users" + fi + + [ -n "$create_mask" ] && printf "\tcreate mask = %s\n" "$create_mask" + [ -n "$dir_mask" ] && printf "\tdirectory mask = %s\n" "$dir_mask" + [ -n "$force_create_mode" ] && printf "\tforce create mode = %s\n" "$force_create_mode" + [ -n "$force_directory_mode" ] && printf "\tforce directory mode = %s\n" "$force_directory_mode" + + [ -n "$browseable" ] && printf "\tbrowseable = %s\n" "$browseable" + [ -n "$read_only" ] && printf "\tread only = %s\n" "$read_only" + [ -n "$writeable" ] && printf "\twriteable = %s\n" "$writeable" + + [ -n "$guest_ok" ] && printf "\tguest ok = %s\n" "$guest_ok" + [ -n "$inherit_owner" ] && printf "\tinherit owner = %s\n" "$inherit_owner" + + [ -n "$write_list" ] && printf "\twrite list = %s\n" "$write_list" + [ -n "$read_list" ] && printf "\tread list = %s\n" "$read_list" + + [ -n "$hide_dot_files" ] && printf "\thide dot files = %s\n" "$hide_dot_files" + [ -n "$veto_files" ] && printf "\tveto files = %s\n" "$veto_files" + } >> /var/etc/ksmbd/smb.conf +} + +init_config() +{ + mkdir -p /var/etc/ksmbd + + config_load ksmbd + config_foreach smb_header globals + config_foreach smb_add_share share +} + +service_triggers() +{ + # PROCD_RELOAD_DELAY=1000 + + procd_add_reload_trigger "dhcp" "system" "ksmbd" + + local i + for i in $SMBD_IFACE; do + procd_add_reload_interface_trigger $i + done +} + +kill_server() +{ + if [ -e /sys/module/ksmbd ]; then + if [ -e /sys/class/ksmbd-control/kill_server ]; then + logger -p daemon.info -t 'ksmbd' "triggering kill_server" + echo hard > /sys/class/ksmbd-control/kill_server + fi + fi +} + +start_service() +{ + init_config + + if [ ! -e /etc/ksmbd/smb.conf ]; then + logger -p daemon.error -t 'ksmbd' "missing config /etc/ksmbd/smb.conf!" + exit 1 + fi + + # NOTE: We don't do a soft-reload via signal, since [global] smb.conf setting changes will be ignored, so always reset hard. + kill_server + + [ ! -e /sys/module/ksmbd ] && modprobe ksmbd 2> /dev/null + if [ ! -e /sys/module/ksmbd ]; then + logger -p daemon.error -t 'ksmbd' "modprobe of ksmbd module failed, can\'t start ksmbd!" + exit 1 + fi + + logger -p daemon.notice -t 'ksmbd' "Starting Ksmbd userspace service." + procd_open_instance + procd_add_mdns "smb" "tcp" "445" + procd_set_param command /usr/sbin/ksmbd.mountd --n + procd_set_param file /etc/ksmbd/smb.conf + procd_set_param limits nofile=16384 + procd_close_instance +} + +stop_service() +{ + logger -p daemon.notice -t 'ksmbd' "Stopping Ksmbd userspace service." + killall ksmbd.mountd > /dev/null 2>&1 + + [ -e /sys/module/ksmbd ] && rmmod ksmbd > /dev/null 2>&1 + # kill server if we cant rmmod + [ -e /sys/module/ksmbd ] && kill_server + # next try + [ -e /sys/module/ksmbd ] && rmmod ksmbd > /dev/null 2>&1 + + if [ -e /sys/module/ksmbd ]; then + logger -p daemon.error -t 'ksmbd' "module still loaded after kill_server?" + fi + [ -f /tmp/ksmbd.lock ] && rm /tmp/ksmbd.lock +} + +# reload_service() { + # restart "$@" +# } diff --git a/net/ksmbd-tools/files/smb.conf.template b/net/ksmbd-tools/files/smb.conf.template new file mode 100644 index 00000000..4cb7be3c --- /dev/null +++ b/net/ksmbd-tools/files/smb.conf.template @@ -0,0 +1,14 @@ +[global] + netbios name = |NAME| + server string = |DESCRIPTION| + workgroup = |WORKGROUP| + interfaces = |INTERFACES| + bind interfaces only = yes + ipc timeout = 20 + deadtime = 15 + map to guest = Bad User + smb2 max read = 64K + smb2 max write = 64K + smb2 max trans = 64K + cache read buffers = no + cache trans buffers = no diff --git a/net/ksmbd-tools/files/smb.service b/net/ksmbd-tools/files/smb.service new file mode 100644 index 00000000..24e64303 --- /dev/null +++ b/net/ksmbd-tools/files/smb.service @@ -0,0 +1,9 @@ + + + + %h + + _smb._tcp + 445 + + diff --git a/net/leech/Makefile b/net/leech/Makefile new file mode 100644 index 00000000..75b0cc1e --- /dev/null +++ b/net/leech/Makefile @@ -0,0 +1,57 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=leech +PKG_VERSION:=1.7 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://bitbucket.org/alekseyt/leech.git +PKG_SOURCE_DATE:=2019-07-17 +PKG_SOURCE_VERSION:=2378e7348a8ac8ed23b6d29be81dc3a73080d920 +PKG_MIRROR_HASH:=04ca1d1f2cf614edf871360c1adbc758d9b85b67296af438449367c068ce5320 + +PKG_MAINTAINER:=Leong Hui Wong +PKG_LICENSE:=blessing +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/leech + SECTION:=net + CATEGORY:=Network + SUBMENU:=Download Manager + TITLE:=RSS-feeds parser/files downloader + URL:=https://bitbucket.org/alekseyt/leech/ + DEPENDS:=+xsltproc +curl +endef + +define Package/leech/description + leech downloads files for you if you give it RSS-feeds of your favorite + trackers. Configuration files are under /etc/leech. +endef + +define Build/Compile +endef + +define Package/leech/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sbin/* $(1)/usr/sbin + + $(INSTALL_DIR) $(1)/etc/leech + $(INSTALL_CONF) $(PKG_BUILD_DIR)/config/* $(1)/etc/leech + + $(INSTALL_DIR) $(1)/usr/share/leech + $(INSTALL_DATA) $(PKG_BUILD_DIR)/share/leech/* $(1)/usr/share/leech +endef + +define Package/leech/conffiles +/etc/leech/default +/etc/leech/downloads +/etc/leech/foods +/etc/leech/wild-downloads +/etc/leech/reverse-downloads +endef + +$(eval $(call BuildPackage,leech)) diff --git a/net/lftp/Makefile b/net/lftp/Makefile index 9c17e435..4393500e 100644 --- a/net/lftp/Makefile +++ b/net/lftp/Makefile @@ -8,17 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lftp -PKG_VERSION:=4.8.3 +PKG_VERSION:=4.9.1 PKG_RELEASE:=1 + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://lftp.tech/ftp/ \ +PKG_SOURCE_URL:=https://lftp.tech/ftp/ \ https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/distfiles/ - -PKG_HASH:=de7aee451afaa1aa391f7076b5f602922c2da0e05524a8d8fea413eda83cc78b +PKG_HASH:=5969fcaefd102955dd882f3bcd8962198bc537224749ed92f206f415207a024b - -PKG_LICENSE:=GPL-3.0+ +PKG_MAINTAINER:=Federico Di Marco +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:lftp_project:lftp + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk @@ -29,8 +33,7 @@ define Package/lftp CATEGORY:=Network DEPENDS:=+libncurses +libopenssl +libreadline $(CXX_DEPENDS) +libexpat +zlib TITLE:=a sophisticated file transfer program with command line interface. - MAINTAINER:=Federico Di Marco - URL:=http://lftp.yar.ru/ + URL:=https://lftp.yar.ru/ endef define Package/lftp/description @@ -53,11 +56,9 @@ CONFIGURE_ARGS += \ --with-zlib="$(STAGING_DIR)/usr" \ --disable-static -TARGET_CXXFLAGS+= -std=c++11 - define Package/lftp/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lftp $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lftp $(1)/usr/bin/ endef $(eval $(call BuildPackage,lftp)) diff --git a/net/lftp/patches/010-openssl-deprecated.patch b/net/lftp/patches/010-openssl-deprecated.patch new file mode 100644 index 00000000..1154cd73 --- /dev/null +++ b/net/lftp/patches/010-openssl-deprecated.patch @@ -0,0 +1,65 @@ +--- a/src/lftp_ssl.cc ++++ b/src/lftp_ssl.cc +@@ -34,6 +34,9 @@ + #include "misc.h" + #include "network.h" + #include "buffer.h" ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject ++#endif + extern "C" { + #include "c-ctype.h" + #include "quotearg.h" +@@ -833,11 +836,13 @@ lftp_ssl_openssl_instance::lftp_ssl_openssl_instance() + if(RAND_load_file(file,-1) && RAND_status()!=0) + atexit(lftp_ssl_write_rnd); + +-#if SSLEAY_VERSION_NUMBER < 0x0800 ++#if OPENSSL_VERSION_NUMBER < 0x0800 + ssl_ctx=SSL_CTX_new(); + X509_set_default_verify_paths(ssl_ctx->cert); + #else ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSLeay_add_ssl_algorithms(); ++#endif + ssl_ctx=SSL_CTX_new(SSLv23_client_method()); + long options=SSL_OP_ALL|SSL_OP_NO_TICKET|SSL_OP_NO_SSLv2; + const char *priority=ResMgr::Query("ssl:priority", 0); +@@ -1075,7 +1080,9 @@ void lftp_ssl_openssl::copy_sid(const lftp_ssl_openssl *o) + + const char *lftp_ssl_openssl::strerror() + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_load_error_strings(); ++#endif + int error=ERR_get_error(); + const char *ssl_error=0; + if(ERR_GET_LIB(error)==ERR_LIB_SSL) +@@ -1154,7 +1161,7 @@ int lftp_ssl_openssl::verify_crl(X509_STORE_CTX *ctx) + obj = X509_OBJECT_new(); + store_ctx = X509_STORE_CTX_new(); + X509_STORE_CTX_init(store_ctx, instance->crl_store, NULL, NULL); +- rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, subject, obj); ++ rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, subject, obj); + X509_STORE_CTX_free(store_ctx); store_ctx=0; + crl = X509_OBJECT_get0_X509_CRL(obj); + if (rc > 0 && crl != NULL) { +@@ -1194,7 +1201,7 @@ int lftp_ssl_openssl::verify_crl(X509_STORE_CTX *ctx) + obj = X509_OBJECT_new(); + store_ctx = X509_STORE_CTX_new(); + X509_STORE_CTX_init(store_ctx, instance->crl_store, NULL, NULL); +- rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj); ++ rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj); + X509_STORE_CTX_free(store_ctx); store_ctx=0; + crl = X509_OBJECT_get0_X509_CRL(obj); + if (rc > 0 && crl != NULL) { +--- a/src/lftp_ssl.h ++++ b/src/lftp_ssl.h +@@ -28,6 +28,7 @@ + # include + # include + # include ++# include + # endif + + #include "Ref.h" diff --git a/net/libndp/Makefile b/net/libndp/Makefile new file mode 100644 index 00000000..406b049f --- /dev/null +++ b/net/libndp/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2017-2018 Thomas Guyot-Sionnest +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libndp +PKG_VERSION:=1.7 +PKG_RELEASE:=1 +PKG_LICENSE:=LGPL-2.1 +PKG_MAINTAINER:=Thomas Guyot-Sionnest +PKG_CPE_ID:=cpe:/a:libndp:libndp + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://libndp.org/files/ +PKG_HASH:=2c480afbffb02792dbae3c13bbfb71d89f735562f2795cca0640ed3428b491b6 + + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/libndp + SECTION:=net + CATEGORY:=Network + TITLE:=NDP Library + URL:=https://github.com/jpirko/libndp/ +endef + +define Package/libndp/description + Library for Neighbor Discovery Protocol +endef + +define Package/libndp/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libndp.so.* $(1)/usr/lib/ +endef + +define Package/ndptool + SECTION:=net + CATEGORY:=Network + TITLE:=NDP Tool + URL:=https://github.com/jpirko/libndp/ + DEPENDS:= +libndp +endef + +define Package/ndptool/description + Tool for Neighbor Discovery Protocol +endef + +define Package/ndptool/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndptool $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libndp)) +$(eval $(call BuildPackage,ndptool)) + diff --git a/net/libreswan/Makefile b/net/libreswan/Makefile new file mode 100644 index 00000000..d45f7932 --- /dev/null +++ b/net/libreswan/Makefile @@ -0,0 +1,121 @@ +# +# Copyright (C) 2019 Lucian Cristian +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libreswan +PKG_VERSION:=3.32 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://download.libreswan.org/ +PKG_HASH:=236b57fee8f562302c54f2b16d8a839a9039fcb5893668e61b398ec6b179432e + +PKG_MAINTAINER:=Lucian Cristian +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING LICENSE +PKG_CPE_ID:=cpe:/a:libreswan:libreswan + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libreswan/Default + TITLE:=Libreswan + URL:=https://libreswan.org/ +endef + +define Package/libreswan/Default/description + Libreswan is a free software implementation of the most widely supported and + standardized VPN protocol based on ("IPsec") and the Internet Key Exchange + ("IKE"). These standards are produced and maintained by the Internet + Engineering Task Force ("IETF"). +endef + +define Package/libreswan +$(call Package/libreswan/Default) + SUBMENU:=VPN + SECTION:=net + CATEGORY:=Network + DEPENDS:= +IPV6:kmod-ip6-vti +IPV6:kmod-ipsec6 +ip-full +iptables-mod-ipsec \ + +kmod-crypto-aead +kmod-crypto-authenc +kmod-crypto-gcm \ + +kmod-crypto-hash +kmod-crypto-rng +kmod-ip-vti +kmod-ipsec \ + +kmod-ipsec4 +kmod-ipt-ipsec +libevent2 +libevent2-pthreads \ + +libldns +librt +libunbound +nss-utils +nspr +libcap-ng + PROVIDES:=openswan + CONFLICTS:=strongswan + TITLE+= IPsec Server +endef + +define Package/libreswan/description +$(call Package/libreswan/Default/description) + Libreswan is a free software implementation of the most widely supported and + standardized VPN protocol based on ("IPsec") and the Internet Key Exchange + ("IKE"). These standards are produced and maintained by the Internet + Engineering Task Force ("IETF"). +endef + +define Package/libreswan/conffiles +/etc/ipsec.d +/etc/ipsec.conf +/etc/ipsec.secrets +endef +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_CFLAGS += -flto + +MAKE_FLAGS+= \ + WERROR_CFLAGS=" " \ + NSS_REQ_AVA_COPY=false \ + USE_LINUX_AUDIT=false \ + USE_LABELED_IPSEC=false \ + USE_NM=false \ + USE_NSS_KDF=true \ + USE_NSS_PRF=true \ + USE_LIBCURL=false \ + USE_GLIBC_KERN_FLIP_HEADERS=true \ + USE_XAUTHPAM=false \ + USE_LIBCAP_NG=true \ + USE_SYSTEMD_WATCHDOG=false \ + USE_SECCOMP=false\ + INC_USRLOCAL="/usr" \ + FINALRUNDIR="/var/run/pluto" \ + MODPROBEARGS="-q" \ + ARCH="$(LINUX_KARCH)" \ + +ifdef CONFIG_LINUX_4_14 + MAKE_FLAGS+= USE_XFRM_INTERFACE_IFLA_HEADER=true +endif + +define Build/Prepare + $(call Build/Prepare/Default) + $(SED) 's,include $$$$(top_srcdir)/mk/manpages.mk,,g' \ + $(PKG_BUILD_DIR)/mk/program.mk +endef + +define Build/Compile + $(call Build/Compile/Default,all) +endef + +define Package/libreswan/install + $(INSTALL_DIR) \ + $(1)/etc/init.d \ + $(1)/etc/ipsec.d/policies \ + $(1)/usr/libexec/ipsec \ + $(1)/usr/sbin + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec \ + $(1)/usr/sbin/ipsec + $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec + $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf + $(INSTALL_DATA) ./files/ipsec.secrets $(1)/etc/ipsec.secrets + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ipsec.d/policies/* \ + $(1)/etc/ipsec.d/policies/ + $(CP) $(PKG_INSTALL_DIR)/usr/libexec/ipsec/* \ + $(1)/usr/libexec/ipsec/ +endef + +$(eval $(call BuildPackage,libreswan)) diff --git a/net/libreswan/files/ipsec.conf b/net/libreswan/files/ipsec.conf new file mode 100644 index 00000000..8b7493b8 --- /dev/null +++ b/net/libreswan/files/ipsec.conf @@ -0,0 +1,25 @@ +config setup + # needed when using PSK only. Not needed for X.509 based servers + uniqueids=no + virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v4:!100.64.0.0/24 + +conn ikev1 + authby=secret + pfs=no + auto=add + rekey=no + left=%defaultroute + right=%any + ikev2=never + type=transport + leftprotoport=17/1701 + rightprotoport=17/%any + dpddelay=15 + dpdtimeout=30 + dpdaction=clear + +conn ikev1-nat + also=ikev1 + rightsubnet=vhost:%priv + +# include /etc/ipsec.d/*.conf diff --git a/net/libreswan/files/ipsec.init b/net/libreswan/files/ipsec.init new file mode 100755 index 00000000..f33d4129 --- /dev/null +++ b/net/libreswan/files/ipsec.init @@ -0,0 +1,36 @@ +#!/bin/sh /etc/rc.common + +START=90 +STOP=10 + +USE_PROCD=1 +PROG="/usr/libexec/ipsec/pluto" +IPSEC_SECRETS=/etc/ipsec.secrets +IPSEC_CONF=/etc/ipsec.conf +IPSEC_BIN=/usr/sbin/ipsec + +checkconfig() { + ${IPSEC_BIN} addconn --checkconfig || return 1 + mkdir -p /var/run/pluto +} + +start_service() { + checkconfig || return 1 + + ipsec _stackmanager start + # Enable nflog if configured + ipsec --checknflog > /dev/null + + procd_open_instance + procd_set_param command $PROG --config ${IPSEC_CONF} --nofork --secretsfile ${IPSEC_SECRETS} + procd_set_param respawn + procd_close_instance +} + +stop_service() { + ipsec whack --shutdown + ipsec _stackmanager stop + ipsec --stopnflog > /dev/null + +} + diff --git a/net/libreswan/files/ipsec.secrets b/net/libreswan/files/ipsec.secrets new file mode 100644 index 00000000..5ef87b09 --- /dev/null +++ b/net/libreswan/files/ipsec.secrets @@ -0,0 +1,10 @@ +# Unlike older openswan, this file does NOT contain any X.509 related +# information such as private key :RSA statements as these now reside +# in the NSS database. See: +# +# https://libreswan.org/wiki/Using_NSS_with_libreswan +# https://libreswan.org/wiki/Migrating_from_Openswan + +# A.B.C.D %any : PSK "SsEeCcRrEeTt" +: PSK "SsEeCcRrEeTt" +# include /etc/ipsec.d/*.secrets diff --git a/net/libreswan/patches/010-nanosleep.patch b/net/libreswan/patches/010-nanosleep.patch new file mode 100644 index 00000000..12427c14 --- /dev/null +++ b/net/libreswan/patches/010-nanosleep.patch @@ -0,0 +1,21 @@ +--- a/programs/pluto/send.c ++++ b/programs/pluto/send.c +@@ -26,7 +26,7 @@ + * + */ + +-#include /* for usleep() */ ++#include /* for nanosleep() */ + #include + + #include "defs.h" +@@ -172,7 +172,8 @@ + /* Send a duplicate packet when this impair is enabled - used for testing */ + if (IMPAIR(JACOB_TWO_TWO)) { + /* sleep for half a second, and second another packet */ +- usleep(500000); ++ const struct timespec req = {0, 500 * 1000 * 1000}; ++ nanosleep(&req, NULL); + endpoint_buf b; + endpoint_buf ib; + DBG_log("JACOB 2-2: resending %zu bytes for %s through %s from %s to %s:", diff --git a/net/libreswan/patches/020-limits.patch b/net/libreswan/patches/020-limits.patch new file mode 100644 index 00000000..5a563569 --- /dev/null +++ b/net/libreswan/patches/020-limits.patch @@ -0,0 +1,20 @@ +--- a/programs/pluto/connections.c ++++ b/programs/pluto/connections.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/programs/pluto/rcv_whack.c ++++ b/programs/pluto/rcv_whack.c +@@ -36,6 +36,7 @@ + #include + #include + #include /* for gethostname() */ ++#include + + #include + #include "libreswan/pfkeyv2.h" diff --git a/net/libreswan/patches/030-fix_nss_3.52.patch b/net/libreswan/patches/030-fix_nss_3.52.patch new file mode 100644 index 00000000..11209b9c --- /dev/null +++ b/net/libreswan/patches/030-fix_nss_3.52.patch @@ -0,0 +1,30 @@ +From db7715407efa43cd2a66caed67c02d8f7bb90b35 Mon Sep 17 00:00:00 2001 +From: Paul Wouters +Date: Tue, 12 May 2020 12:56:38 -0400 +Subject: [PATCH] nss: move NSS_PKCS11_2_0_COMPAT define to + ike_alg_encrypt_nss_gcm_ops.c + +It needs to go before any nss includes are done, and those includes are +all over the place. But CK_GCM_PARAMS is only used in one file, so +just define it there instead before the nss includes. +--- + lib/libswan/ike_alg_encrypt_nss_gcm_ops.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/lib/libswan/ike_alg_encrypt_nss_gcm_ops.c b/lib/libswan/ike_alg_encrypt_nss_gcm_ops.c +index 93a027089a..571913cc1e 100644 +--- a/lib/libswan/ike_alg_encrypt_nss_gcm_ops.c ++++ b/lib/libswan/ike_alg_encrypt_nss_gcm_ops.c +@@ -16,6 +16,12 @@ + #include + #include + ++/* ++ * Special advise from Bob Relyea - needs to go before any nss include ++ * ++ */ ++#define NSS_PKCS11_2_0_COMPAT 1 ++ + #include "lswlog.h" + #include "lswnss.h" + #include "prmem.h" diff --git a/net/libreswan/patches/099-continue_on_missing_ipv6.patch b/net/libreswan/patches/099-continue_on_missing_ipv6.patch new file mode 100644 index 00000000..10fd572f --- /dev/null +++ b/net/libreswan/patches/099-continue_on_missing_ipv6.patch @@ -0,0 +1,12 @@ +--- a/programs/pluto/kernel_xfrm.c 2020-05-16 19:12:30.107226478 +0300 ++++ b/programs/pluto/kernel_xfrm.c 2020-05-16 19:20:25.735522574 +0300 +@@ -2759,7 +2759,8 @@ + LOG_ERRNO(errno, "\"%s\"", proc_f); + } + } else { +- LOG_ERRNO(errno, "could not stat \"%s\"", proc_f); ++ DBG(DBG_KERNEL, DBG_log("starting without ipv6 support!")); ++ disable_ipv6 = 1; + } + + if (disable_ipv6 == 1) { diff --git a/net/lighttpd/Makefile b/net/lighttpd/Makefile index d0d358e0..c20d1624 100644 --- a/net/lighttpd/Makefile +++ b/net/lighttpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2015 OpenWrt.org +# Copyright (C) 2006-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,15 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lighttpd -PKG_VERSION:=1.4.48 -PKG_RELEASE:=3 +PKG_VERSION:=1.4.55 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x -PKG_HASH:=0f8ad5aac7529d7b948b9d7e8cd0b4a9e177309d85d6bf6516e28e6e40d74f36 +PKG_HASH:=6a0b50e9c9d5cc3d9e48592315c25a2d645858f863e1ccd120507a30ce21e927 -PKG_LICENSE:=BSD-3c +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:lighttpd:lighttpd PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -26,13 +28,14 @@ REBUILD_MODULES=authn_gssapi authn_ldap authn_mysql cml magnet mysql_vhost trigg PKG_CONFIG_DEPENDS:=CONFIG_LIGHTTPD_SSL $(patsubst %,CONFIG_PACKAGE_lighttpd-mod-%,$(REBUILD_MODULES)) include $(INCLUDE_DIR)/package.mk +# iconv is required for lighttpd's mysql plugin +include $(INCLUDE_DIR)/nls.mk define Package/lighttpd/Default - SUBMENU:=Web Servers/Proxies SECTION:=net CATEGORY:=Network - URL:=http://www.lighttpd.net/ - MAINTAINER:=W. Michael Petullo + SUBMENU:=Web Servers/Proxies + URL:=https://www.lighttpd.net/ endef define Package/lighttpd @@ -92,7 +95,7 @@ else CONFIGURE_ARGS+= --without-ldap endif -ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-authn_mysql),) +ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-authn_mysql)$(CONFIG_PACKAGE_lighttpd-mod-mysql_vhost),) CONFIGURE_ARGS+= --with-mysql else CONFIGURE_ARGS+= --without-mysql @@ -110,12 +113,6 @@ else CONFIGURE_ARGS+= --without-lua endif -ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-mysql_vhost),) - CONFIGURE_ARGS+= --with-mysql -else - CONFIGURE_ARGS+= --without-mysql -endif - #ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-cml)$(CONFIG_PACKAGE_lighttpd-mod-trigger_b4_dl),) # CONFIGURE_ARGS+= --with-memcached #else @@ -141,6 +138,14 @@ else --without-webdav-props endif +ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-authn_pam),) + CONFIGURE_ARGS+= \ + --with-pam +else + CONFIGURE_ARGS+= \ + --without-pam +endif + define Build/Configure $(call Build/Configure/Default) # XXX: override pcre (mis)detection by ./configure when cross-compiling @@ -177,6 +182,10 @@ define BuildPlugin TITLE:=$(2) module endef + define Package/lighttpd-mod-$(1)/conffiles +/etc/lighttpd/conf.d/$(4)-$(1).conf + endef + ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-$(1)),) define Package/lighttpd-mod-$(1)/install $(INSTALL_DIR) $$(1)/usr/lib/lighttpd @@ -184,6 +193,10 @@ define BuildPlugin $(INSTALL_DIR) $$(1)/etc/lighttpd/conf.d if [ -f $(PKG_BUILD_DIR)/doc/config/conf.d/$(1).conf ]; then \ $(CP) $(PKG_BUILD_DIR)/doc/config/conf.d/$(1).conf $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \ + if ! grep -qF 'mod_$(1)' $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf; then \ + sed -i "`sed '/^##/ !q' $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf | wc -l` i\ +server.modules += ( \"mod_$(1)\" )" $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \ + fi \ else \ echo 'server.modules += ( "mod_$(1)" )' > $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \ fi @@ -200,10 +213,11 @@ $(eval $(call BuildPlugin,redirect,URL redirection,+PACKAGE_lighttpd-mod-redirec # Next, permit authentication. $(eval $(call BuildPlugin,auth,Authentication,,20)) -$(eval $(call BuildPlugin,authn_file,File-based authentication,,20)) -$(eval $(call BuildPlugin,authn_gssapi,Kerberos-based authentication,+PACKAGE_lighttpd-mod-authn_gssapi:krb5-libs,20)) -$(eval $(call BuildPlugin,authn_ldap,LDAP-based authentication,+PACKAGE_lighttpd-mod-authn_ldap:libopenldap,20)) -$(eval $(call BuildPlugin,authn_mysql,Mysql-based authentication,+PACKAGE_lighttpd-mod-authn_mysql:libmysqlclient,20)) +$(eval $(call BuildPlugin,authn_file,File-based authentication,lighttpd-mod-auth,20)) +$(eval $(call BuildPlugin,authn_gssapi,Kerberos-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_gssapi:krb5-libs,20)) +$(eval $(call BuildPlugin,authn_ldap,LDAP-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_ldap:libopenldap,20)) +$(eval $(call BuildPlugin,authn_mysql,Mysql-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_mysql:libmysqlclient,20)) +$(eval $(call BuildPlugin,authn_pam,PAM-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_pam:libpam,20)) # Finally, everything else. $(eval $(call BuildPlugin,access,Access restrictions,,30)) diff --git a/net/lighttpd/patches/0001-core-fix-base64-decode-when-char-is-unsigned-fixes-2.patch b/net/lighttpd/patches/0001-core-fix-base64-decode-when-char-is-unsigned-fixes-2.patch deleted file mode 100644 index 18a9a1de..00000000 --- a/net/lighttpd/patches/0001-core-fix-base64-decode-when-char-is-unsigned-fixes-2.patch +++ /dev/null @@ -1,43 +0,0 @@ -From d4083effab0f9bf76528d5c47198b17e7471ed13 Mon Sep 17 00:00:00 2001 -From: Glenn Strauss -Date: Thu, 21 Dec 2017 17:41:17 -0500 -Subject: [PATCH] [core] fix base64 decode when char is unsigned (fixes #2848) - -thx, codehero - -x-ref: - "buffer_append_base64_decode() broken on compilers where char is assumed unsigned" - https://redmine.lighttpd.net/issues/2848 ---- - src/base64.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/src/base64.c -+++ b/src/base64.c -@@ -11,7 +11,7 @@ - - /* BASE64_STANDARD: "A-Z a-z 0-9 + /" maps to 0-63, pad with "=" */ - static const char base64_standard_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; --static const char base64_standard_reverse_table[] = { -+static const signed char base64_standard_reverse_table[] = { - /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ - -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, /* 0x00 - 0x0F */ - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, /* 0x10 - 0x1F */ -@@ -25,7 +25,7 @@ static const char base64_standard_revers - - /* BASE64_URL: "A-Z a-z 0-9 - _" maps to 0-63, pad with "." */ - static const char base64_url_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_."; --static const char base64_url_reverse_table[] = { -+static const signed char base64_url_reverse_table[] = { - /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ - -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, /* 0x00 - 0x0F */ - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, /* 0x10 - 0x1F */ -@@ -42,7 +42,7 @@ unsigned char* buffer_append_base64_deco - size_t out_pos = 0; /* current output character (position) that is decoded. can contain partial result */ - unsigned int group = 0; /* how many base64 digits in the current group were decoded already. each group has up to 4 digits */ - size_t i; -- const char *base64_reverse_table; -+ const signed char *base64_reverse_table; - - switch (charset) { - case BASE64_STANDARD: diff --git a/net/linknx/Makefile b/net/linknx/Makefile index 6c97d7b3..f097057b 100644 --- a/net/linknx/Makefile +++ b/net/linknx/Makefile @@ -8,33 +8,30 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linknx -PKG_VERSION:=0.0.1.34 +PKG_VERSION:=0.0.1.38 PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/linknx/linknx/tar.gz/$(PKG_VERSION)? +PKG_HASH:=00c53776c2e871295459ede922402d8ad0208367d2364781fdb92ddafad94d3d + PKG_MAINTAINER:=Othmar Truniger -PKG_LICENSE:=GPL-2.0+ - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/linknx/linknx.git -PKG_SOURCE_VERSION:=831ed395e232ead88e92cdf19f12e227e80e22cf -PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.xz -PKG_MIRROR_HASH:=1c53d181b5577d759b4d0faa5a267dd0a040d9fee1bfc6ad9545374b9002900f - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_BUILD_DEPENDS:=argp-standalone -PKG_FORTIFY_SOURCE:=1 +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone PKG_FIXUP:=autoreconf +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk define Package/linknx SECTION:=net CATEGORY:=Network TITLE:=KNX home automation platform - URL:=http://sourceforge.net/projects/linknx/ - DEPENDS:=+pthsem +lua +luac +libstdcpp +libcurl +libesmtp + URL:=https://github.com/linknx/linknx + DEPENDS:=+pthsem +lua +luac +libcurl +libesmtp $(CXX_DEPENDS) $(ICONV_DEPENDS) endef CONFIGURE_ARGS+= \ @@ -45,9 +42,6 @@ CONFIGURE_ARGS+= \ --with-libcurl \ --without-mysql -EXTRA_LDFLAGS+= \ - -fno-builtin - define Package/linknx/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/linknx $(1)/usr/bin/ diff --git a/net/linknx/files/linknx.config b/net/linknx/files/linknx.config index d2f05628..f3b60f39 100644 --- a/net/linknx/files/linknx.config +++ b/net/linknx/files/linknx.config @@ -1,8 +1,3 @@ -config daemon args - # daemon is started as 'linknx --config=$conf $options' - # use 'linknx --help' to get all possible options' - # - # typical example +config args option conf '/etc/linknx.xml' - option options '-w --daemon=/tmp/linknx/linknx.log --pid-file=/var/run/linknx.pid' diff --git a/net/linknx/files/linknx.init b/net/linknx/files/linknx.init index d38f194d..27b2c4b8 100644 --- a/net/linknx/files/linknx.init +++ b/net/linknx/files/linknx.init @@ -3,21 +3,25 @@ START=98 STOP=10 +USE_PROCD=1 NAME=linknx PROG=/usr/bin/$NAME . /lib/functions.sh -start() { - local conf options +start_service() { + local conf config_load "$NAME" config_get conf args conf '/etc/linknx.xml' - config_get options args options '' - test -f $conf || cp -p /etc/linknx.xml.dist $conf + [ -f "$conf" ] || cp -p /etc/linknx.xml.dist "$conf" mkdir -p /tmp/$NAME/persist - service_start $PROG --config=$conf $options -} -stop() { - service_stop $PROG + procd_open_instance + procd_set_param command "$PROG" + procd_append_param command --config="$conf" -w + procd_set_param file "$conf" + procd_set_param pidfile /var/run/linknx.pid + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance } diff --git a/net/linuxptp/Makefile b/net/linuxptp/Makefile index 85b66464..34e8c432 100644 --- a/net/linuxptp/Makefile +++ b/net/linuxptp/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linuxptp -PKG_VERSION:=1.9.2 -PKG_RELEASE:=1 +PKG_VERSION:=2.0 +PKG_RELEASE:=3 -PKG_MAINTAINER:=Wojciech Dubowik PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION) -PKG_HASH:=7f662e65c66c37ff211dc525476626875c2b74162ded05c8a25d036fb963b8d0 +PKG_HASH:=0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d +PKG_MAINTAINER:=Wojciech Dubowik PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk define Package/linuxptp SECTION:=net @@ -27,7 +28,6 @@ define Package/linuxptp SUBMENU:=Time Synchronization TITLE:=Linux Precision Time Protocol (PTP) daemon URL:=http://linuxptp.sourceforge.net/ - DEPENDS:=@!USE_UCLIBC +librt endef define Package/linuxptp/description @@ -40,7 +40,8 @@ endef EXTRA_CFLAGS += -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC MAKE_VARS += \ - EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CFLAGS)" + EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CFLAGS)" \ + KBUILD_OUTPUT="$(LINUX_DIR)" define Package/linuxptp/install $(INSTALL_DIR) $(1)/usr/sbin diff --git a/net/linuxptp/patches/001-fix_kbuild_output.patch b/net/linuxptp/patches/001-fix_kbuild_output.patch new file mode 100644 index 00000000..66d6b39b --- /dev/null +++ b/net/linuxptp/patches/001-fix_kbuild_output.patch @@ -0,0 +1,11 @@ +--- a/incdefs.sh ++++ b/incdefs.sh +@@ -62,7 +62,7 @@ user_flags() + kernel_flags() + { + prefix="" +- tstamp=/usr/include/linux/net_tstamp.h ++ tstamp=/include/uapi/linux/net_tstamp.h + + if [ "x$KBUILD_OUTPUT" != "x" ]; then + # With KBUILD_OUTPUT set, we are building against diff --git a/net/lispmob/Makefile b/net/lispmob/Makefile deleted file mode 100644 index 6783ea62..00000000 --- a/net/lispmob/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2012-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lispmob -PKG_REV:=180aa39d338a00bb532e421de7f8513492cf2e8b -PKG_VERSION:=0.4 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_MIRROR_HASH:=584300e1a59cc976f3599213487ea8425f94300887a51c9804f0292cf2f0c8cc -PKG_SOURCE_URL:=git://github.com/LISPmob/lispmob.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) - -PKG_LICENSE:=GPLv2 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/lispd/default - MAINTAINER:=Vasileios Lakafosis - URL:=http://lisp.cisco.com/ -endef - -define Package/lispd - SECTION:=net - CATEGORY:=Network - TITLE:=Locator/ID separation protocol (using TUN) - URL:=https://github.com/LISPmob - DEPENDS:= +librt +libopenssl +confuse +kmod-tun +uci @IPV6 - $(call Package/lispd/default) -endef - -define Package/lispd/description - This packet provides support for the Locator-ID Separation Protocol. -endef - -MAKE_FLAGS += \ - platform=openwrt - -define Package/lispd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lispd/lispd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) $(PKG_BUILD_DIR)/openWRT/lispd.uci.example $(1)/etc/config/lispd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/openWRT/openwrt.init.script $(1)/etc/init.d/lisp -endef - -$(eval $(call BuildPackage,lispd)) diff --git a/net/lispmob/patches/001-fix-musl-build.patch b/net/lispmob/patches/001-fix-musl-build.patch deleted file mode 100644 index 82a482cf..00000000 --- a/net/lispmob/patches/001-fix-musl-build.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/lispd/lispd_output.c -+++ b/lispd/lispd_output.c -@@ -26,6 +26,7 @@ - * Alberto Rodriguez Natal - */ - -+#define _GNU_SOURCE 1 - - - #include ---- a/lispd/lispd_input.c -+++ b/lispd/lispd_input.c -@@ -26,6 +26,7 @@ - * Alberto Rodriguez Natal - */ - -+#define _GNU_SOURCE 1 - - #include "lispd_input.h" - #include "lispd_map_notify.h" ---- a/lispd/lispd_pkt_lib.c -+++ b/lispd/lispd_pkt_lib.c -@@ -28,6 +28,8 @@ - * - */ - -+#define _GNU_SOURCE 1 -+ - #include "lispd_afi.h" - #include "lispd_pkt_lib.h" - #include "lispd_lib.h" diff --git a/net/lksctp-tools/Makefile b/net/lksctp-tools/Makefile index 1b79a77f..5a89aa37 100644 --- a/net/lksctp-tools/Makefile +++ b/net/lksctp-tools/Makefile @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lksctp-tools -PKG_VERSION:=1.0.16 +PKG_VERSION:=1.0.18 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/lksctp -PKG_HASH:=0903dd526b7f30a89d5031aa2c82757612becc38ed7bc6e4f972f8deae351f26 +PKG_SOURCE_URL:=https://codeload.github.com/sctp/lksctp-tools/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=3e9ab5b3844a8b65fc8152633aafe85f406e6da463e53921583dfc4a443ff03a +PKG_MAINTAINER:= PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -28,7 +29,7 @@ define Package/lksctp-tools/Default SECTION:=net CATEGORY:=Network TITLE:=SCTP user-land - URL:=http://lksctp.sourceforge.net + URL:=https://github.com/sctp/lksctp-tools endef define Package/libsctp @@ -37,29 +38,26 @@ $(call Package/lksctp-tools/Default) SECTION:=libs CATEGORY:=Libraries TITLE+= library - URL:=http://lksctp.sourceforge.net DEPENDS:=+kmod-sctp endef define Package/sctp $(call Package/lksctp-tools/Default) TITLE+= (meta) - URL:=http://lksctp.sourceforge.net DEPENDS:=+libsctp +sctp-tools endef define Package/sctp-tools $(call Package/lksctp-tools/Default) TITLE+= tools - URL:=http://lksctp.sourceforge.net DEPENDS:=+libsctp endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/netinet \ - $(STAGING_DIR)/usr/include/ + $(INSTALL_DIR) $(1)/usr/include/netinet + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/netinet/sctp.h \ + $(1)/usr/include/netinet $(INSTALL_DIR) $(1)/usr/lib $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libsctp.{a,so*} \ @@ -73,16 +71,12 @@ define Package/libsctp/install $(1)/usr/lib/ endef -define Package/sctp/install - : -endef - define Package/sctp-tools/install $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ + $(INSTALL_BIN) \ $(PKG_INSTALL_DIR)/usr/bin/checksctp \ $(1)/usr/bin/ - $(CP) \ + $(INSTALL_BIN) \ $(PKG_INSTALL_DIR)/usr/bin/sctp_{darn,status,test} \ $(1)/usr/bin/ endef diff --git a/net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch b/net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch new file mode 100644 index 00000000..3d9d9393 --- /dev/null +++ b/net/lksctp-tools/patches/010-build-fix-netinet-sctp.h-not-to-be-installed.patch @@ -0,0 +1,35 @@ +From 378560050a8f93786c590cc99a55461666205b61 Mon Sep 17 00:00:00 2001 +From: Xin Long +Date: Fri, 24 Aug 2018 01:13:32 +0800 +Subject: [PATCH] build: fix netinet/sctp.h not to be installed + +After libcnetinet_HEADERS was set to sctp.h.in, netinet/sctp.h can +no longer be installed into ${includedir}. + +Since "AC_CONFIG_HEADERS([src/include/netinet/sctp.h])" is already +added into configure.ac, there's no need to generate sctp.h by +automake. + +So we simply set libcnetinet_HEADERS back to sctp.h. + +Fixes: 9607dd85e70a ("netinet/sctp.h: dynamically build based on system setup") +Signed-off-by: Xin Long +Signed-off-by: Marcelo Ricardo Leitner +--- + src/include/netinet/Makefile.am | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/include/netinet/Makefile.am b/src/include/netinet/Makefile.am +index ca0aac2..965db8c 100644 +--- a/src/include/netinet/Makefile.am ++++ b/src/include/netinet/Makefile.am +@@ -11,5 +11,4 @@ libcnetinetdir = $(includedir)/netinet + # API. + include_HEADERS = + +-libcnetinet_HEADERS = sctp.h.in +-BUILT_SOURCES = sctp.h ++libcnetinet_HEADERS = sctp.h +-- +2.17.1 + diff --git a/net/lora-gateway-hal/Config.in b/net/lora-gateway-hal/Config.in new file mode 100644 index 00000000..3fc61d18 --- /dev/null +++ b/net/lora-gateway-hal/Config.in @@ -0,0 +1,13 @@ +# libloragw configuration + +if PACKAGE_libloragw + +config SX1301_SPI_PATH + string "SPI Dev Path" + default /dev/spidev0.0 + +config SX1301_SPI_SPEED + string "SPI Speed (Hz)" + default 8000000 + +endif diff --git a/net/lora-gateway-hal/Makefile b/net/lora-gateway-hal/Makefile new file mode 100644 index 00000000..80e802b1 --- /dev/null +++ b/net/lora-gateway-hal/Makefile @@ -0,0 +1,95 @@ +# +# Copyright (C) 2019 Xue Liu +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lora-gateway-hal +PKG_VERSION:=5.0.1 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=https://codeload.github.com/Lora-net/lora_gateway/tar.gz/v$(PKG_VERSION)? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=1a0447d5e8183d08e6dce5f739f6872b9c57824b98f4078830d5ee21b15782c1 +PKG_MAINTAINER:=Xue Liu +PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_DIR:=$(BUILD_DIR)/lora_gateway-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libloragw + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Driver/HAL library for Semtech SX1301 + URL:=https://www.semtech.com/products/wireless-rf/lora-gateways/sx1301 + DEPENDS:=+kmod-spi-dev @(!PACKAGE_lora-picogw-hal) +endef + +define Package/libloragw/description + Driver/HAL library for Semtech SX1301 multi-channel modem and + SX1257/SX1255 RF transceivers. +endef + +define Package/libloragw/config + source "$(SOURCE)/Config.in" +endef + +define Package/libloragw-tests + SECTION:=net + CATEGORY:=Network + SUBMENU:=LoRaWAN + TITLE:=Test programs for libloragw to check functionality + DEPENDS:=+libloragw +endef + +define Package/libloragw-utils + SECTION:=net + CATEGORY:=Network + SUBMENU:=LoRaWAN + TITLE:=Utility programs for libloragw + DEPENDS:=+libloragw +endef + +CMAKE_OPTIONS += \ + -DSPI_DEV_PATH:FILEPATH=$(CONFIG_SX1301_SPI_PATH) \ + -DSPI_SPEED:STRING=$(CONFIG_SX1301_SPI_SPEED) \ + -Dlora_gateway_build_shared_libs=ON + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/libloragw + $(CP) $(PKG_BUILD_DIR)/libloragw/inc/loragw_* $(1)/usr/include/libloragw + $(CP) $(PKG_BUILD_DIR)/libloragw/config.h $(1)/usr/include/libloragw + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libloragw/libloragw.so* $(1)/usr/lib/ + $(LN) libloragw.so.0 $(1)/usr/lib/libloragw.so + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_BUILD_DIR)/loragw.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libloragw/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libloragw/libloragw.so.* $(1)/usr/lib/ +endef + +define Package/libloragw-tests/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/test* $(1)/usr/sbin +endef + +define Package/libloragw-utils/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_lbt_test $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_pkt_logger $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_spectral_scan $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_tx_continuous $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_spi_stress $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_tx_test $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,libloragw)) +$(eval $(call BuildPackage,libloragw-tests)) +$(eval $(call BuildPackage,libloragw-utils)) diff --git a/net/lora-gateway-hal/patches/0001-add-cmake-support.patch b/net/lora-gateway-hal/patches/0001-add-cmake-support.patch new file mode 100644 index 00000000..e41e2ddc --- /dev/null +++ b/net/lora-gateway-hal/patches/0001-add-cmake-support.patch @@ -0,0 +1,496 @@ +From d49e5ea2988b2086c7deaa40d3e077531e449844 Mon Sep 17 00:00:00 2001 +From: Xue Liu +Date: Thu, 21 Feb 2019 00:27:42 +0100 +Subject: [PATCH 1/3] - add cmake support + +Signed-off-by: Xue Liu +--- + CMakeLists.txt | 77 +++++++++++++++ + cmake/loragw-config.cmake | 1 + + libloragw/CMakeLists.txt | 150 ++++++++++++++++++++++++++++++ + libloragw/loragw.pc.in | 10 ++ + libloragw/loragw_config.h.in | 14 +++ + util_lbt_test/CMakeLists.txt | 23 +++++ + util_pkt_logger/CMakeLists.txt | 29 ++++++ + util_spectral_scan/CMakeLists.txt | 23 +++++ + util_spi_stress/CMakeLists.txt | 23 +++++ + util_tx_continuous/CMakeLists.txt | 23 +++++ + util_tx_test/CMakeLists.txt | 23 +++++ + 11 files changed, 396 insertions(+) + create mode 100644 CMakeLists.txt + create mode 100644 cmake/loragw-config.cmake + create mode 100644 libloragw/CMakeLists.txt + create mode 100644 libloragw/loragw.pc.in + create mode 100644 libloragw/loragw_config.h.in + create mode 100644 util_lbt_test/CMakeLists.txt + create mode 100644 util_pkt_logger/CMakeLists.txt + create mode 100644 util_spectral_scan/CMakeLists.txt + create mode 100644 util_spi_stress/CMakeLists.txt + create mode 100644 util_tx_continuous/CMakeLists.txt + create mode 100644 util_tx_test/CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..b112150 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,77 @@ ++# -- Minimum required version ++cmake_minimum_required (VERSION 3.2) ++ ++# -- Project name ++project (lora_gateway) ++ ++# -- Various includes ++include (CMakePackageConfigHelpers) ++include (GNUInstallDirs) ++include (CheckFunctionExists) ++ ++# -- set c99 standard default ++set(CMAKE_C_STANDARD 99) ++ ++# -- options for shared lib (defaults off) ++option(lora_gateway_build_shared_libs "build as a shared library" OFF) ++set(BUILD_SHARED_LIBS ${lora_gateway_build_shared_libs}) ++ ++# -- Required to build ++set(CMAKE_THREAD_PREFER_PTHREAD TRUE) ++set(THREADS_PREFER_PTHREAD_FLAG TRUE) ++find_package(Threads REQUIRED) ++ ++# -- Versioning with git tag ++if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) ++ execute_process( ++ COMMAND git describe --tags --always ++ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" ++ OUTPUT_VARIABLE "lora_gateway_VERSION" ++ ERROR_QUIET ++ OUTPUT_STRIP_TRAILING_WHITESPACE) ++ if(lora_gateway_VERSION STREQUAL "") ++ set(lora_gateway_VERSION 0) ++ endif(lora_gateway_VERSION STREQUAL "") ++ message( STATUS "Git full version: ${lora_gateway_VERSION}" ) ++ execute_process( ++ COMMAND /bin/bash -c "git describe --tags --abbrev=0 | cut --delimiter='v' --fields=2" ++ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" ++ OUTPUT_VARIABLE "lora_gateway_VERSION_SHORT" ++ ERROR_QUIET ++ OUTPUT_STRIP_TRAILING_WHITESPACE) ++ if(lora_gateway_VERSION_SHORT STREQUAL "") ++ set(lora_gateway_VERSION_SHORT 0) ++ endif(lora_gateway_VERSION_SHORT STREQUAL "") ++ message( STATUS "Git version: ${lora_gateway_VERSION_SHORT}" ) ++else(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) ++ set(lora_gateway_VERSION_SHORT 0) ++ set(lora_gateway_VERSION 0) ++endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) ++ ++# when building, don't use the install RPATH already ++# (but later on when installing) ++SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) ++if (NOT (${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" ) ) ++ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") ++endif() ++ ++# -- add the core library ++add_subdirectory(libloragw) ++ ++# -- add util_lbt_test ++add_subdirectory(util_lbt_test) ++ ++# -- add util_pkt_logger ++add_subdirectory(util_pkt_logger) ++ ++# -- add util_pkt_logger ++add_subdirectory(util_spectral_scan) ++ ++# -- add util_spi_stress ++add_subdirectory(util_spi_stress) ++ ++# -- add util_tx_continuous ++add_subdirectory(util_tx_continuous) ++ ++# -- add util_tx_test ++add_subdirectory(util_tx_test) +diff --git a/cmake/loragw-config.cmake b/cmake/loragw-config.cmake +new file mode 100644 +index 0000000..ee8687b +--- /dev/null ++++ b/cmake/loragw-config.cmake +@@ -0,0 +1 @@ ++include("${CMAKE_CURRENT_LIST_DIR}/loragw-targets.cmake") +diff --git a/libloragw/CMakeLists.txt b/libloragw/CMakeLists.txt +new file mode 100644 +index 0000000..b2102ae +--- /dev/null ++++ b/libloragw/CMakeLists.txt +@@ -0,0 +1,150 @@ ++set(TARGET loragw) ++ ++add_library(${TARGET} "") ++ ++# -- add additional debug options ++# Set the DEBUG_* to 1 to activate debug mode in individual modules. ++# Warning: that makes the module *very verbose*, do not use for production ++option(DEBUG_AUX "Active debug mode in AUX module" OFF) ++option(DEBUG_SPI "Active debug mode in SPI module" OFF) ++option(DEBUG_REG "Active debug mode in REG module" OFF) ++option(DEBUG_HAL "Active debug mode in HAL module" OFF) ++option(DEBUG_GPIO "Active debug mode in GPIO module" OFF) ++option(DEBUG_LBT "Active debug mode in LBT module" OFF) ++option(DEBUG_GPS "Active debug mode in GPS module" OFF) ++ ++message("-- Build with debug AUX: ${DEBUG_AUX}") ++message("-- Build with debug SPI: ${DEBUG_SPI}") ++message("-- Build with debug REG: ${DEBUG_REG}") ++message("-- Build with debug HAL: ${DEBUG_HAL}") ++message("-- Build with debug GPIO: ${DEBUG_GPIO}") ++message("-- Build with debug LBT: ${DEBUG_LBT}") ++message("-- Build with debug GPS: ${DEBUG_GPS}") ++ ++# -- add the compile options ++target_compile_options( ++ ${TARGET} ++ PRIVATE ++ -Werror ++ -Wall ++ -Wextra ++) ++ ++target_sources(${TARGET} ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_aux.c ++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_fpga.c ++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_gps.c ++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_hal.c ++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_lbt.c ++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_radio.c ++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_reg.c ++ ${CMAKE_CURRENT_LIST_DIR}/src/loragw_spi.native.c ++) ++ ++# -- add the public headers ++set (${TARGET}_PUBLIC_HEADERS ++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_aux.h ++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_fpga.h ++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_gps.h ++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_hal.h ++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_lbt.h ++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_radio.h ++ ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_reg.h ++) ++ ++target_include_directories(${TARGET} ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR} ++ ${CMAKE_CURRENT_LIST_DIR}/inc ++ PUBLIC ++ $ ++ $ ++ $ ++) ++ ++configure_file(${CMAKE_CURRENT_LIST_DIR}/${TARGET}_config.h.in "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) ++ ++target_link_libraries(${TARGET} ++ PUBLIC ++ Threads::Threads ++ m ++) ++ ++set_target_properties(${TARGET} PROPERTIES VERSION ${lora_gateway_VERSION_SHORT}) ++set_target_properties(${TARGET} PROPERTIES SOVERSION ${lora_gateway_VERSION_SHORT}) ++set_target_properties(${TARGET} PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/config.h;${${TARGET}_PUBLIC_HEADERS}") ++ ++# -- add the install targets ++install (TARGETS ${TARGET} ++ EXPORT ${TARGET}_targets ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${TARGET} ++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${TARGET} ++) ++ ++# -- add pkg config file ++configure_file ("${CMAKE_CURRENT_LIST_DIR}/${TARGET}.pc.in" "${PROJECT_BINARY_DIR}/${TARGET}.pc" @ONLY) ++install (FILES ${PROJECT_BINARY_DIR}/${TARGET}.pc DESTINATION lib/pkgconfig) ++ ++# -- write cmake package config file ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config-version.cmake" ++ VERSION ${lora_gateway_VERSION} ++ COMPATIBILITY AnyNewerVersion ++) ++ ++export(EXPORT ${TARGET}_targets ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-targets.cmake" ++ NAMESPACE Semtech:: ++) ++ ++configure_file(${PROJECT_SOURCE_DIR}/cmake/${TARGET}-config.cmake ++ "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config.cmake" ++ COPYONLY ++) ++ ++set(ConfigPackageLocation lib/cmake/${TARGET}) ++ ++install(EXPORT ${TARGET}_targets ++ FILE ${TARGET}-targets.cmake ++ NAMESPACE Semtech:: ++ DESTINATION ${ConfigPackageLocation} ++) ++ ++install( ++ FILES ${PROJECT_SOURCE_DIR}/cmake/${TARGET}-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config-version.cmake" ++ DESTINATION ${ConfigPackageLocation} ++ COMPONENT Devel ++) ++ ++# -- add test programs ++foreach(TEST test_loragw_spi test_loragw_gps test_loragw_reg test_loragw_hal test_loragw_cal) ++ add_executable(${TEST} "") ++ ++ target_sources(${TEST} ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/tst/${TEST}.c ++ ) ++ ++ target_include_directories(${TEST} ++ PRIVATE ++ $ ++ $ ++ ${CMAKE_CURRENT_LIST_DIR}/inc ++ ${CMAKE_CURRENT_BINARY_DIR} ++ ) ++ ++ target_link_libraries(${TEST} ++ PRIVATE ++ loragw ++ ) ++ ++ install ( ++ TARGETS ${TEST} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) ++ ++endforeach() ++ +diff --git a/libloragw/loragw.pc.in b/libloragw/loragw.pc.in +new file mode 100644 +index 0000000..01bb3cf +--- /dev/null ++++ b/libloragw/loragw.pc.in +@@ -0,0 +1,10 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix}/bin ++includedir=${prefix}/include/libloragw ++libdir=${prefix}/lib ++ ++Name: LIBLORAGW ++Description: BLANK_TEXT ++Version: @lora_gateway_VERSION@ ++Cflags: -I${includedir} ++Libs: -L${libdir} -lloragw +diff --git a/libloragw/loragw_config.h.in b/libloragw/loragw_config.h.in +new file mode 100644 +index 0000000..76ad35a +--- /dev/null ++++ b/libloragw/loragw_config.h.in +@@ -0,0 +1,14 @@ ++#ifndef _LORAGW_CONFIGURATION_H ++#define _LORAGW_CONFIGURATION_H ++ ++#define LIBLORAGW_VERSION "@lora_gateway_VERSION_SHORT@" ++ ++#cmakedefine01 DEBUG_AUX ++#cmakedefine01 DEBUG_SPI ++#cmakedefine01 DEBUG_REG ++#cmakedefine01 DEBUG_HAL ++#cmakedefine01 DEBUG_GPS ++#cmakedefine01 DEBUG_GPIO ++#cmakedefine01 DEBUG_LBT ++ ++#endif +diff --git a/util_lbt_test/CMakeLists.txt b/util_lbt_test/CMakeLists.txt +new file mode 100644 +index 0000000..f184b82 +--- /dev/null ++++ b/util_lbt_test/CMakeLists.txt +@@ -0,0 +1,23 @@ ++ ++add_executable(util_lbt_test "") ++target_sources(util_lbt_test ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/src/util_lbt_test.c ++) ++ ++target_link_libraries(util_lbt_test ++ PUBLIC ++ loragw ++) ++ ++set_target_properties(util_lbt_test PROPERTIES ++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ++) ++ ++# add the install targets ++install ( ++ TARGETS util_lbt_test ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++) +diff --git a/util_pkt_logger/CMakeLists.txt b/util_pkt_logger/CMakeLists.txt +new file mode 100644 +index 0000000..82cfc86 +--- /dev/null ++++ b/util_pkt_logger/CMakeLists.txt +@@ -0,0 +1,29 @@ ++ ++add_executable(util_pkt_logger "") ++target_sources(util_pkt_logger ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/src/util_pkt_logger.c ++ ${CMAKE_CURRENT_LIST_DIR}/src/parson.c ++) ++ ++target_include_directories(util_pkt_logger ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/inc ++) ++ ++target_link_libraries(util_pkt_logger ++ PUBLIC ++ loragw ++) ++ ++set_target_properties(util_pkt_logger PROPERTIES ++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ++) ++ ++# add the install targets ++install ( ++ TARGETS util_pkt_logger ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++) +diff --git a/util_spectral_scan/CMakeLists.txt b/util_spectral_scan/CMakeLists.txt +new file mode 100644 +index 0000000..3cec2a9 +--- /dev/null ++++ b/util_spectral_scan/CMakeLists.txt +@@ -0,0 +1,23 @@ ++ ++add_executable(util_spectral_scan "") ++target_sources(util_spectral_scan ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/src/util_spectral_scan.c ++) ++ ++target_link_libraries(util_spectral_scan ++ PUBLIC ++ loragw ++) ++ ++set_target_properties(util_spectral_scan PROPERTIES ++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ++) ++ ++# add the install targets ++install ( ++ TARGETS util_spectral_scan ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++) +diff --git a/util_spi_stress/CMakeLists.txt b/util_spi_stress/CMakeLists.txt +new file mode 100644 +index 0000000..d5f0eea +--- /dev/null ++++ b/util_spi_stress/CMakeLists.txt +@@ -0,0 +1,23 @@ ++ ++add_executable(util_spi_stress "") ++target_sources(util_spi_stress ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/src/util_spi_stress.c ++) ++ ++target_link_libraries(util_spi_stress ++ PUBLIC ++ loragw ++) ++ ++set_target_properties(util_spi_stress PROPERTIES ++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ++) ++ ++# add the install targets ++install ( ++ TARGETS util_spi_stress ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++) +diff --git a/util_tx_continuous/CMakeLists.txt b/util_tx_continuous/CMakeLists.txt +new file mode 100644 +index 0000000..97c70e5 +--- /dev/null ++++ b/util_tx_continuous/CMakeLists.txt +@@ -0,0 +1,23 @@ ++ ++add_executable(util_tx_continuous "") ++target_sources(util_tx_continuous ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/src/util_tx_continuous.c ++) ++ ++target_link_libraries(util_tx_continuous ++ PUBLIC ++ loragw ++) ++ ++set_target_properties(util_tx_continuous PROPERTIES ++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ++) ++ ++# add the install targets ++install ( ++ TARGETS util_tx_continuous ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++) +diff --git a/util_tx_test/CMakeLists.txt b/util_tx_test/CMakeLists.txt +new file mode 100644 +index 0000000..6cc0e04 +--- /dev/null ++++ b/util_tx_test/CMakeLists.txt +@@ -0,0 +1,23 @@ ++ ++add_executable(util_tx_test "") ++target_sources(util_tx_test ++ PRIVATE ++ ${CMAKE_CURRENT_LIST_DIR}/src/util_tx_test.c ++) ++ ++target_link_libraries(util_tx_test ++ PUBLIC ++ loragw ++) ++ ++set_target_properties(util_tx_test PROPERTIES ++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ++) ++ ++# add the install targets ++install ( ++ TARGETS util_tx_test ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++) +-- +2.20.1 + diff --git a/net/lora-gateway-hal/patches/0002-add-preprocessing-for-SPI_DEV_PATH-and-SPI_SPEED.patch b/net/lora-gateway-hal/patches/0002-add-preprocessing-for-SPI_DEV_PATH-and-SPI_SPEED.patch new file mode 100644 index 00000000..084a114a --- /dev/null +++ b/net/lora-gateway-hal/patches/0002-add-preprocessing-for-SPI_DEV_PATH-and-SPI_SPEED.patch @@ -0,0 +1,35 @@ +From ea2a7752295ab734464c2877e1f484a9bf08d58d Mon Sep 17 00:00:00 2001 +From: Xue Liu +Date: Sun, 24 Feb 2019 01:03:48 +0100 +Subject: [PATCH 2/3] - add preprocessing for SPI_DEV_PATH and SPI_SPEED + +Signed-off-by: Xue Liu +--- + libloragw/src/loragw_spi.native.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/libloragw/src/loragw_spi.native.c b/libloragw/src/loragw_spi.native.c +index c01ed1c..fe251e3 100644 +--- a/libloragw/src/loragw_spi.native.c ++++ b/libloragw/src/loragw_spi.native.c +@@ -53,8 +53,15 @@ Maintainer: Sylvain Miermont + + #define READ_ACCESS 0x00 + #define WRITE_ACCESS 0x80 +-#define SPI_SPEED 8000000 +-#define SPI_DEV_PATH "/dev/spidev0.0" ++ ++#ifndef SPI_SPEED ++#error SPI_SPEED is not defined ++#endif ++ ++#ifndef SPI_DEV_PATH ++#error SPI_DEV_PATH is not defined ++#endif ++ + //#define SPI_DEV_PATH "/dev/spidev32766.0" + + /* -------------------------------------------------------------------------- */ +-- +2.20.1 + diff --git a/net/lora-gateway-hal/patches/0003-add-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.patch b/net/lora-gateway-hal/patches/0003-add-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.patch new file mode 100644 index 00000000..f80dde0f --- /dev/null +++ b/net/lora-gateway-hal/patches/0003-add-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.patch @@ -0,0 +1,45 @@ +From 81cd227c04ccb615cffaaa7b6372affb7964df2e Mon Sep 17 00:00:00 2001 +From: Xue Liu +Date: Sun, 24 Feb 2019 01:04:29 +0100 +Subject: [PATCH 3/3] - add SPI_DEV_PATH and SPI_SPEED to cmake + +Signed-off-by: Xue Liu +--- + libloragw/CMakeLists.txt | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libloragw/CMakeLists.txt b/libloragw/CMakeLists.txt +index b2102ae..32abf51 100644 +--- a/libloragw/CMakeLists.txt ++++ b/libloragw/CMakeLists.txt +@@ -13,6 +13,9 @@ option(DEBUG_GPIO "Active debug mode in GPIO module" OFF) + option(DEBUG_LBT "Active debug mode in LBT module" OFF) + option(DEBUG_GPS "Active debug mode in GPS module" OFF) + ++set(SPI_DEV_PATH "/dev/spidev0.0" CACHE FILEPATH "Path of spi-dev") ++set(SPI_SPEED 8000000 CACHE STRING "SPI clock frequency") ++ + message("-- Build with debug AUX: ${DEBUG_AUX}") + message("-- Build with debug SPI: ${DEBUG_SPI}") + message("-- Build with debug REG: ${DEBUG_REG}") +@@ -20,6 +23,8 @@ message("-- Build with debug HAL: ${DEBUG_HAL}") + message("-- Build with debug GPIO: ${DEBUG_GPIO}") + message("-- Build with debug LBT: ${DEBUG_LBT}") + message("-- Build with debug GPS: ${DEBUG_GPS}") ++message("-- Build with SPI_DEV_PATH: ${SPI_DEV_PATH}") ++message("-- Build with SPI_SPEED: ${SPI_SPEED}") + + # -- add the compile options + target_compile_options( +@@ -28,6 +33,8 @@ target_compile_options( + -Werror + -Wall + -Wextra ++ -DSPI_DEV_PATH="${SPI_DEV_PATH}" ++ -DSPI_SPEED=${SPI_SPEED} + ) + + target_sources(${TARGET} +-- +2.20.1 + diff --git a/net/lynx/Makefile b/net/lynx/Makefile new file mode 100644 index 00000000..3efea46d --- /dev/null +++ b/net/lynx/Makefile @@ -0,0 +1,70 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# +# Based on https://github.com/kyak/openwrt-packages/tree/master/lynx +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lynx +PKG_VERSION:=2.8.9rel.1 +PKG_RELEASE:=1 + +PKG_LICENSE:=GPL-2.0 +PKG_MAINTAINER:=Leonid Esman +PKG_CPE_ID:=cpe:/a:lynx:lynx +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://invisible-mirror.net/archives/lynx/tarballs/ \ + https://ftp.icm.edu.pl/packages/lynx/tarballs/ \ + http://ftp.oregonstate.edu/pub/blfs/conglomeration/lynx/ \ + https://ftp.osuosl.org/pub/blfs/conglomeration/lynx/ \ + https://fossies.org/linux/www/ +PKG_HASH:=387f193d7792f9cfada14c60b0e5c0bff18f227d9257a39483e14fa1aaf79595 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION) +# try current development version +# URL for current development version - http://invisible-island.net/datafiles/release/lynx-cur.tar.bz2 + + +include $(INCLUDE_DIR)/package.mk + +define Package/lynx + TITLE:=Lynx is the text web browser + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libncursesw +zlib +libopenssl +ca-bundle + URL:=http://lynx.invisible-island.net/ +endef + +define Package/lynx/description + Classic non-graphical (text-mode) web browser +endef + +# customize as you need +CONFIGURE_ARGS += --with-zlib --with-ssl \ + --enable-ipv6 \ + --with-screen=ncursesw \ + --enable-widec \ + --enable-locale-charset \ + --enable-charset-choice \ + --enable-cjk \ + --enable-japanese-utf8 \ + --enable-nsl-fork \ + --disable-config-info --disable-echo \ + --disable-dired --disable-trace \ + --disable-finger --disable-gopher --disable-news --disable-wais \ + --disable-prettysrc --disable-scrollbar --disable-gzip-help \ + --disable-idna --disable-syslog --disable-font-switch + +CONFIGURE_VARS += cf_cv_ncurses_header="ncursesw/curses.h" \ + ac_cv_path_NCURSES_CONFIG="" + +define Package/lynx/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/etc + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lynx $(1)/usr/bin/ + $(INSTALL_DATA) ./files/lynx.cfg $(1)/etc/ + $(INSTALL_DATA) ./files/lynx.lss $(1)/etc/ +endef + +$(eval $(call BuildPackage,lynx)) + diff --git a/net/lynx/files/lynx.cfg b/net/lynx/files/lynx.cfg new file mode 100644 index 00000000..062b22a5 --- /dev/null +++ b/net/lynx/files/lynx.cfg @@ -0,0 +1,7 @@ +# +LOCALE_CHARSET:TRUE +# +#http_proxy:http://some.server.dom:port/ +#https_proxy:http://some.server.dom:port/ +#no_proxy:host.domain.dom + diff --git a/net/lynx/files/lynx.lss b/net/lynx/files/lynx.lss new file mode 100644 index 00000000..2d02eb18 --- /dev/null +++ b/net/lynx/files/lynx.lss @@ -0,0 +1,115 @@ +# Setting the normal and default types lets us keep (almost) the same colors +# whether the terminal's default colors are white-on-black or black-on-white. +# It is not exact since the default "white" is not necessarily the same color +# as the ANSI lightgray, but is as close as we can get in a standard way. +# +# If you really want the terminal's default colors, and if lynx is built using +# ncurses' default-color support, remove these two lines: +normal: normal: lightgray:black +default: normal: white:black + +# Normal type styles correspond to HTML tags. +# +# The next line (beginning with "em") means: use bold if mono, otherwise +# brightblue on +em: bold: brightblue +strong: bold: brightred +b: bold: red +i: bold: brightblue +a: bold: green +img: dim: brown +fig: normal: gray +caption: reverse: brown +hr: normal: yellow +blockquote: normal: brightblue +ul: normal: brown +address: normal: magenta +title: normal: magenta +tt: dim: brightmagenta: black +h1: bold: yellow: blue +label: normal: magenta +q: normal: yellow: magenta +small: dim: default +big: bold: yellow +sup: bold: yellow +sub: dim: gray +li: normal: magenta +code: normal: cyan +cite: normal: cyan + +table: normal: brightcyan +tr: bold: brown +td: normal: default +br: normal: default + +# Special styles - not corresponding directly to HTML tags +# alert - status bar, when message begins "Alert". +# alink - active link +# normal - default attributes +# status - status bar +# whereis - whereis search target +# +#normal:normal:default:blue +alink: reverse: yellow: black +status: reverse: yellow: blue +alert: bold: yellow: red +whereis: reverse+underline: magenta: cyan +# currently not used +#value:normal:green + +menu.bg: normal: black: lightgray +menu.frame: normal: black: lightgray +menu.entry: normal: lightgray: black +menu.n: normal: red: gray +menu.active: normal: yellow: black +menu.sb: normal: brightred: lightgray + +forwbackw.arrow:reverse +hot.paste: normal: brightred: gray + +# Styles with classes -