From f116137591c6f17e9b7d9049a6e0fb8808aa455c Mon Sep 17 00:00:00 2001 From: RISCi_ATOM Date: Fri, 12 May 2017 15:29:18 -0400 Subject: [PATCH] Fresh pull from upstream --- CONTRIBUTING.md | 114 - admin/debootstrap/Makefile | 4 +- admin/openwisp-config/Makefile | 119 + admin/sudo/Makefile | 4 +- admin/syslog-ng/Makefile | 76 + admin/syslog-ng/files/syslog-ng.conf | 37 + admin/syslog-ng/files/syslog-ng.init | 19 + kernel/exfat-nofuse/Makefile | 51 - lang/lua-bencode/Makefile | 7 +- lang/lualanes/Makefile | 4 +- lang/luarocks/Makefile | 8 +- ...onfigure_uname_siteconfig_adjustment.patch | 37 + lang/node/Makefile | 2 +- lang/perl-cgi/Makefile | 12 +- lang/perl-www-curl/Makefile | 49 + ...rl-www-curl_disable_curl-config_hack.patch | 74 + .../patches/101-skip-preprocessor-symbol.path | 34 + .../patches/200-fix_default_lflags.patch | 11 + lang/perl-xml-parser/Makefile | 4 +- lang/perl/Config.in | 11 + lang/perl/Makefile | 7 +- lang/perl/perlmod.mk | 16 +- lang/php7-pecl-dio/Makefile | 6 +- .../patches/0000-unify-line-endings.patch | 3110 ---- .../patches/0001-fix-svn-prop.patch | 32 - .../patches/0002-fix-Wunused-variable.patch | 39 - .../0003-Fix-Wmaybe-uninitialized.patch | 39 - ...arning-Wunused-but-set-variable-sorr.patch | 42 - ...E-file-as-requested-in-Request-65869.patch | 91 - ...CH_RESOURCE-macro-with-zend_fetch_re.patch | 117 - ...ISTER_RESOURCE-with-zend_register_re.patch | 66 - ...ETURN_STRINGL-takes-only-2-arguments.patch | 34 - ...nd_hash_find-with-zend_hash_str_find.patch | 125 - .../0010-Replace-dio_convert_to_long.patch | 240 - ...dopt-to-changed-stream-API-interface.patch | 89 - ...cient-macros-TSRMLS_CC-and-TSRMLS_DC.patch | 829 -- .../0013-Fix-tests-for-legacy-interface.patch | 69 - ...ges-from-changed-stream-API-interfac.patch | 54 - .../patches/0015-Add-.gitignore.patch | 48 - .../0016-Add-additional-baudrates.patch | 44 - lang/php7-pecl-http/Makefile | 21 +- .../100_config9-m4.patch | 0 .../100_php_http_etag_bigendian_check.patch | 11 + lang/php7/Makefile | 5 +- ...-use-of-the-system-timezone-database.patch | 43 +- .../patches/0032-Use-system-timezone.patch | 4 +- ...ove-build-timestamps-from-generated-.patch | 65 +- ...onstraints-in-aarch64-multiply-macro.patch | 29 + lang/php7/pecl.mk | 3 + lang/python-cffi/Makefile | 2 +- lang/python-gmpy/Makefile | 44 - lang/python-packages/Makefile | 4 +- lang/python-pip/Makefile | 2 +- lang/python-ply/Makefile | 2 +- lang/python-pycparser/Makefile | 2 +- lang/python-setuptools/Makefile | 2 +- lang/python/Makefile | 37 +- lang/python/files/python-host.mk | 13 +- lang/python/files/python-package-dev.mk | 2 +- lang/python/files/python-package.mk | 35 +- lang/python/files/python-version.mk | 2 +- .../005-fix-libffi-x86-64-configure.patch | 31 - .../patches/011-do-not-prefer-ncursesw.patch | 15 - .../011-remove-setupterm-definition.patch | 12 + lang/python3/Makefile | 39 +- lang/python3/files/python3-host.mk | 90 + lang/python3/files/python3-package-dev.mk | 4 +- lang/python3/files/python3-package-lib2to3.mk | 2 + lang/python3/files/python3-package.mk | 73 +- lang/python3/files/python3-version.mk | 13 + ...11-fix-ncursesw-definition-colisions.patch | 24 + .../patches/016-adjust-config-paths.patch | 72 + lang/ruby/Makefile | 449 +- .../001-acinclude.m4_rename_aclocal.m4.patch | 152 - lang/ruby/ruby_find_pkgsdeps | 4 +- lang/ruby/ruby_missingfiles | 2 +- libs/boost/Makefile | 24 +- libs/boost/patches/01_fiber_fix.patch | 9 +- libs/dtc/Makefile | 74 + libs/eventlog/Makefile | 44 + libs/expat/Makefile | 8 +- libs/fftw3/Makefile | 4 +- libs/fftw3/patches/001-makefile.patch | 16 +- libs/glib2/Makefile | 14 +- libs/gnutls/Makefile | 6 +- libs/icu/Makefile | 69 +- .../000-dont-cpy-files-from-topdirs.patch | 2 +- libs/icu/patches/001-disable-strtod_l.patch | 26 + .../patches/CVE-2017-7867_CVE-2017-7868.patch | 176 + libs/libcanfestival/Makefile | 71 + .../patches/001-sigval-ref-fix.patch | 11 + .../patches/002-makefile-gcc-linker.patch | 33 + .../patches/003-makefile-skip-examples.patch | 20 + libs/libcoap/Makefile | 64 + libs/libevhtp/Makefile | 51 - .../patches/010-strcmp-endianness-fix.patch | 49 - libs/libexif/Makefile | 1 + libs/libextractor/Makefile | 7 +- .../patches/002-ffmpeg2.9_api_backport.patch | 347 + libs/libgd/Makefile | 2 +- libs/libgee/Makefile | 4 +- libs/libidn/Makefile | 6 +- .../002-disable-po-docs-examples.patch | 2 +- .../patches/010-fix-idn-error-usage.patch | 12 +- libs/liblz4/Makefile | 2 +- libs/liboping/Makefile | 8 +- libs/libpng/Makefile | 4 +- libs/libshout/Makefile | 63 +- .../patches/100-add_with-openssl_option.patch | 27 + libs/libshout/patches/120-vorbis-c.patch | 6 +- .../patches/140-no_example_doc_win32.patch | 20 +- libs/libstrophe/Makefile | 9 +- libs/libtasn1/Makefile | 9 +- libs/libuecc/Makefile | 9 +- libs/libuv/Makefile | 11 +- libs/libvpx/Makefile | 6 +- libs/libzdb/Makefile | 4 +- .../020-filterh-use-host-built-version.patch | 2 +- libs/opus/Makefile | 9 +- libs/pcre/Makefile | 6 +- libs/pcre/patches/001-CVE-2017-7186 | 53 + libs/poco/Makefile | 9 +- libs/postgresql/Makefile | 8 +- libs/protobuf/Makefile | 2 +- libs/rxtx/Makefile | 49 + libs/rxtx/patches/010-acm-devices.patch | 11 + libs/sqlite3/Makefile | 12 +- mail/dovecot/Makefile | 99 + mail/dovecot/files/dovecot.init | 16 + mail/dovecot/patches/001-configure_in.patch | 31 + multimedia/ffmpeg/Config.in | 4 - multimedia/ffmpeg/Makefile | 35 +- multimedia/grilo/Makefile | 4 +- multimedia/gst1-libav/Config.in | 279 + multimedia/gst1-libav/Makefile | 198 + multimedia/icecast/Makefile | 66 +- multimedia/icecast/libvorbisidec.mk | 41 - .../patches/001-icecast-2.4.0-tremor.patch | 203 +- .../patches/005-no_examples_doc_win32.patch | 20 + .../patches/015-add_with-openssl_option.patch | 25 + multimedia/ices/Makefile | 10 +- net/adblock/Makefile | 27 +- net/adblock/files/README.md | 255 +- net/adblock/files/adblock-helper.sh | 753 - net/adblock/files/adblock-update.sh | 278 - net/adblock/files/adblock.conf | 38 +- net/adblock/files/adblock.hotplug | 24 - net/adblock/files/adblock.init | 185 +- net/adblock/files/adblock.sh | 586 + net/adblock/files/www/adblock/index.html | 8 - net/apache/Makefile | 18 +- net/apache/patches/002-test_char_h.patch | 25 +- net/apache/patches/003-logdir_fix.patch | 14 +- net/apache/patches/004-pidfile_fix.patch | 10 +- net/apache/patches/005-httpd_conf.patch | 29 +- net/apache/patches/006-remove-ssl3.patch | 13 - net/aria2/Makefile | 4 +- net/bcp38/Makefile | 8 +- net/bcp38/files/bcp38.config | 4 + net/bind/Config.in | 2 +- net/bind/Makefile | 8 +- net/bmon/Makefile | 5 +- net/chrony/Makefile | 5 +- net/cifs-utils/Makefile | 2 +- net/clamav/Makefile | 120 - net/clamav/files/bytecode.cvd | Bin 68662 -> 0 bytes net/clamav/files/clamav.config | 34 - net/clamav/files/clamav.init | 116 - net/clamav/files/freshclam.config | 7 - net/clamav/files/freshclam.init | 63 - net/clamav/patches/001-compile.patch | 10 - net/cshark/Makefile | 10 +- net/ctorrent-svn/Makefile | 98 - .../patches/100-compile-fix.patch | 88 - net/ctorrent-svn/patches/300-negative.patch | 14 - .../patches/400-musl-compat.patch | 10 - net/ctorrent/Makefile | 84 - net/ctorrent/patches/100-CVE-2009-1759.patch | 364 - net/ctorrent/patches/100-negative-ints.patch | 13 - net/ctorrent/patches/200-musl-compat.patch | 10 - net/ddns-scripts/Makefile | 160 +- net/ddns-scripts/files/ddns.defaults | 310 +- .../files/dynamic_dns_functions.sh | 36 +- .../files/dynamic_dns_lucihelper.sh | 2 +- net/ddns-scripts/files/dynamic_dns_updater.sh | 4 +- net/ddns-scripts/files/public_suffix_list.dat | 12310 ++++++++++++++++ net/ddns-scripts/files/services | 4 +- net/ddns-scripts/files/services_ipv6 | 4 +- .../files/update_cloudflare_com_v1.sh | 35 +- .../files/update_cloudflare_com_v4.sh | 30 +- .../files/update_godaddy_com_v1.sh | 16 +- net/dnscrypt-proxy/Makefile | 7 +- .../files/dnscrypt-proxy.config | 12 +- net/dnscrypt-proxy/files/dnscrypt-proxy.init | 120 +- net/dynapoint/Makefile | 47 + net/dynapoint/src/dynapoint.config | 9 + net/dynapoint/src/dynapoint.init | 15 + net/dynapoint/src/dynapoint.lua | 203 + net/esniper/Makefile | 6 +- net/fastd/Makefile | 6 +- net/freeradius2/Config.in | 14 - net/freeradius2/Makefile | 636 - net/freeradius2/files/radiusd.init | 29 - .../patches/001-fix-makefile.patch | 12 - net/freeradius2/patches/002-config.patch | 613 - .../patches/004-ldap_configure.patch | 4257 ------ .../patches/008-honor_ccpflags.patch | 17 - .../patches/010-disbale-openssl-check.patch | 40 - net/fwknop/Config.in | 4 + net/fwknop/Makefile | 10 +- net/fwknop/files/fwknopd.init | 23 +- net/git/Makefile | 4 +- net/gnunet/Makefile | 53 +- net/haproxy/Makefile | 22 +- ...BUG-MINOR-Fix-OSX-compilation-errors.patch | 53 - ...ayed-PCRE-version-is-running-release.patch | 31 - ...3-MINOR-show-Built-with-PCRE-version.patch | 49 - ...4-MINOR-show-Running-on-zlib-version.patch | 25 - ...5-MINOR-Add-fe_req_rate-sample-fetch.patch | 66 - ...EDIUM-make-SO_REUSEPORT-configurable.patch | 134 - ...se-sess-and-not-s-sess-in-action_sto.patch | 29 - ...ake-smp_fetch_var-more-robust-agains.patch | 47 - ...mp_fetch_var-doesn-t-depend-on-HTTP-.patch | 31 - ...G-MINOR-ssl-Check-malloc-return-code.patch | 29 - ...event-multiple-entries-for-the-same-.patch | 70 - ...d-make-the-wrapper-return-a-non-null.patch | 31 - ...d-always-restore-signals-before-exec.patch | 117 - ...systemd-check-return-value-of-calloc.patch | 41 - ...-systemd-report-it-when-execve-fails.patch | 41 - ...md-let-the-wrapper-know-that-haproxy.patch | 144 - ...col-fix-some-build-errors-on-OpenBSD.patch | 32 - ...requires-to-include-sys-uio.h-on-Ope.patch | 32 - ...-not-include-netinet-ip.h-for-IP_TTL.patch | 32 - ...ove-the-last-strcat-and-eliminate-a-.patch | 48 - ...e-unused-hap_fd_isset-which-causes-a.patch | 39 - ...INOR-cfgparse-few-memory-leaks-fixes.patch | 48 - ...w-linking-to-device-atlas-library-fi.patch | 33 - ...description-of-st-parameter-in-man-p.patch | 32 - ...-on-shutdown-wake-up-the-appctx-not-.patch | 39 - ...-fix-use-after-free-in-peer_session_.patch | 64 - ...md-wrapper-return-correct-exit-codes.patch | 70 - ...tate-properly-restore-the-DRAIN-stat.patch | 72 - ...ate-allow-to-have-both-CMAINT-and-FD.patch | 33 - ...rs-properly-propagate-the-maintenanc.patch | 172 - ...-set-var-converter-because-of-a-typo.patch | 37 - net/https-dns-proxy/Makefile | 8 +- .../files/https_dns_proxy.init | 2 +- net/iotivity/Makefile | 132 +- .../files/etc/iotivity/oic_svr_db.cbor | Bin 1132 -> 1234 bytes .../files/etc/iotivity/oic_svr_db.json | 85 +- net/iotivity/patches/001-no_unit_test.patch | 242 +- net/iotivity/patches/004-use-env.patch | 38 - ...-not-set-architecture-specific-flags.patch | 60 - .../020-linux-Add-more-architectures.patch | 44 + .../021-add-some-more-architectures.patch | 35 - ...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 | 4 +- .../040-linux-Use-system-sqlite3.patch | 27 + .../patches/040-remove-provisioning.patch | 24 - ...tyHandlerResponse-from-stack-to-heap.patch | 54 + ...-OCClientResponse-from-stack-to-heap.patch | 357 + ...-OCClientResponse-from-stack-to-heap.patch | 103 + ...capsulation-deactivate-test-covergae.patch | 38 - ...ding-of-permission-attribute-from-co.patch | 39 - ...endianness-dependency-for-credential.patch | 87 - ...ption-when-reading-inetgers-from-cbo.patch | 93 - ...ainer-Backported-init-fix-to-1.1-rel.patch | 36 - ...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 | 33 +- net/irssi/Makefile | 6 +- net/isc-dhcp/Makefile | 18 +- net/isc-dhcp/files/dhcrelay4.init | 2 +- net/isc-dhcp/files/dhcrelay6.init | 2 +- .../100-relay-rfc3527-link-selection.patch | 100 - net/jool/Makefile | 114 + net/keepalived/Makefile | 13 +- net/keepalived/files/keepalived.config | 147 + net/keepalived/files/keepalived.init | 400 +- net/keepalived/patches/100-musl-compat.patch | 10 - ... 101-0001-vrrp-update-struct-msghdr.patch} | 35 +- ...tate-initialisation-of-msghdr-fields.patch | 41 + net/lftp/Makefile | 4 +- net/lighttpd/Makefile | 188 - net/lighttpd/files/lighttpd.conf | 32 - net/lighttpd/files/lighttpd.init | 20 - net/luci-app-bcp38/Makefile | 2 +- net/luci-app-bcp38/files/bcp38-cbi.lua | 4 +- net/memcached/Makefile | 4 +- net/mwan3-luci/Makefile | 2 +- .../usr/lib/lua/luci/controller/mwan3.lua | 9 + .../cbi/mwan/advanced_wirelessconfig.lua | 32 + .../luci/view/mwan/advanced_diagnostics.htm | 1 + .../luci/view/mwan/advanced_hotplugscript.htm | 1 + .../luci/view/mwan/advanced_mwanconfig.htm | 1 + .../luci/view/mwan/advanced_networkconfig.htm | 1 + .../view/mwan/advanced_troubleshooting.htm | 9 +- .../view/mwan/advanced_wirelessconfig.htm | 24 + net/net-snmp/Makefile | 83 +- net/net-snmp/files/snmpd.conf | 7 + net/net-snmp/files/snmpd.init | 21 + net/net-snmp/patches/000-cross-compile.patch | 47 + .../patches/100-debian-statistics.patch | 4 +- .../patches/110-debian-makefiles.patch | 35 +- .../patches/120-debian-searchdirs.patch | 2 +- .../patches/130-debian-extramibs.patch | 1078 -- net/net-snmp/patches/160-no_ldconfig.patch | 4 +- net/net-snmp/patches/170-ldflags.patch | 6 +- .../patches/800-format-security.patch | 29 - net/nfs-kernel-server/Makefile | 12 +- net/nginx/Makefile | 8 +- net/ntpd/Makefile | 8 +- net/ntpd/files/ntpd.hotplug-helper | 13 + net/ntpd/files/ntpd.init | 10 +- net/ocserv/Makefile | 6 +- net/ocserv/files/ocserv.conf.template | 42 +- net/ocserv/patches/001-makefile-fix.patch | 47 - net/openssh/Makefile | 11 +- ...00-openssh-7.3_p1-NEWKEYS_null_deref.patch | 27 - ...er-the-KEXINIT-handler-after-receive.patch | 18 - net/openvswitch/Makefile | 17 +- net/pen/Makefile | 58 + net/pptpd/files/pptpd.init | 2 +- net/prosody/Makefile | 6 +- net/rsync/Makefile | 2 +- net/seafile-ccnet/patches/010-Makefile.patch | 4 +- net/seafile-server/Config.in | 16 - net/seafile-server/Makefile | 150 - net/seafile-server/files/seafile.conf | 12 - net/seafile-server/files/seafile.init | 157 - net/seafile-server/files/seahub.init | 226 - .../patches/020-script-patches.patch | 77 - .../030-pidfiles-in-same-directory.patch | 24 - .../patches/040-seafile-admin.patch | 61 - .../050-libseafile-makefile-fixes.patch | 43 - .../patches/060-timestamps-as-int64.patch | 39 - .../patches/070-fuse-mount.patch | 21 - net/ser2net/Makefile | 5 +- net/shadowsocks-libev/Makefile | 28 +- net/sngrep/Makefile | 6 +- net/socat/Makefile | 9 +- .../patches/110-drop_egd_sslv3_support.patch | 184 + net/softethervpn/Makefile | 152 + net/softethervpn/files/dummy | 0 net/softethervpn/files/launcher.sh | 2 + net/softethervpn/files/vpnbridge.init | 12 + net/softethervpn/files/vpnclient.init | 12 + net/softethervpn/files/vpnserver.init | 12 + net/softethervpn/patches/103-noeucjp.patch | 29 + net/softethervpn/patches/105-nossl3.patch | 33 + net/sqm-scripts/Makefile | 10 +- net/sstp-client/Makefile | 28 +- net/strongswan/Makefile | 1 + net/stunnel/Makefile | 4 +- net/subversion/Makefile | 142 + net/subversion/files/subversion.config | 3 + net/subversion/files/subversion.init | 37 + .../patches/301-cross-compilation-macos.patch | 97 + net/tor/Makefile | 58 +- net/tor/patches/001-torrc.patch | 18 +- net/transmission/Makefile | 69 +- .../patches/020-use-internal-miniupnp.patch | 2 +- .../patches/030-fix-musl-build.patch | 8 +- .../patches/040-fix-for-mbedtls.patch | 29 + .../patches/050-mask-as-release.patch | 26 + net/travelmate/Makefile | 4 +- net/travelmate/files/README.md | 29 +- net/travelmate/files/travelmate.conf | 4 +- net/travelmate/files/travelmate.init | 36 +- net/travelmate/files/travelmate.sh | 341 +- net/umurmur/Makefile | 37 +- .../patches/010-mbedtls_fix_includes.patch | 11 + ...-check-for-POLARSSL_VERSION_FEATURES.patch | 17 - net/unbound/Makefile | 27 +- net/unbound/files/README.md | 369 +- net/unbound/files/dnsmasq.sh | 48 +- net/unbound/files/odhcpd.awk | 207 + net/unbound/files/odhcpd.sh | 99 + net/unbound/files/root.key | 2 + net/unbound/files/rootzone.sh | 2 +- net/unbound/files/unbound.iface | 20 - net/unbound/files/unbound.init | 28 +- net/unbound/files/unbound.ntpd | 7 +- net/unbound/files/unbound.sh | 650 +- net/unbound/files/unbound.uci | 16 +- net/unbound/files/unbound_ext.conf | 8 + net/unbound/files/unbound_srv.conf | 8 + net/unbound/patches/001-conf.patch | 13 +- net/vsftpd/Makefile | 12 +- net/vsftpd/files/vsftpd.conf | 8 +- net/wireguard/Makefile | 22 +- net/wireguard/files/wireguard.sh | 51 +- net/xl2tpd/Makefile | 2 +- ...ontrol-fix-xl2tpd-hanged-up-in-fopen.patch | 92 + net/zerotier/Config.in | 24 + net/zerotier/Makefile | 87 + net/zerotier/files/zerotier.config | 7 + net/zerotier/files/zerotier.init | 71 + ...ng-under-MUSL-libc-e.g.-Alpine-Linux.patch | 44 + net/zerotier/patches/0002-fix-build.patch | 51 + .../0003-workaround_to_avoid_seg_faults.patch | 27 + ...05-use-external-miniupnpc-and-natpmp.patch | 32 + sound/mocp/Makefile | 8 +- sound/pianod/Makefile | 24 +- .../005-Remove_svn_version_query.patch | 11 - .../010-Configure_add_SSL_options.patch | 42 - ...Use_package_config_h_for_all_modules.patch | 59 - .../030-Waitress_add_polarssl_variant.patch | 333 - sound/shairport-sync/Makefile | 32 +- .../100-replace_polarssl_with_mbedtls.patch | 395 + sound/shine/Makefile | 6 +- .../002-fix-name-collision-with-ffmpeg.patch | 64 + sound/sox/Makefile | 11 +- sound/sox/patches/001-cross_compile.patch | 22 +- .../patches/010-fix_uclibc_build_issue.patch | 12 +- sound/sox/patches/020-ffmpeg-0.11.patch | 129 - sound/sox/patches/020-ffmpeg-2.x.patch | 72 - utils/bandwidthd-php/Makefile | 51 - utils/bandwidthd-php/files/legend.gif | Bin 1649 -> 0 bytes utils/bandwidthd/Makefile | 155 +- .../bandwidthd/files/bandwidthd-pgsql.config | 6 +- .../files/bandwidthd-php.config | 0 .../files/bandwidthd-php.init | 2 +- .../bandwidthd/files/bandwidthd-sqlite.config | 13 + ...dthd-pgsql.init => bandwidthd-sqlite.init} | 67 +- utils/bandwidthd/files/bandwidthd.config | 2 +- utils/bandwidthd/files/bandwidthd.init | 38 +- .../files/logo-openwrt.gif} | Bin utils/bandwidthd/files/logo.gif | Bin 9431 -> 0 bytes .../files/phphtdocs-sqlite/details.php | 104 + .../files/phphtdocs-sqlite}/footer.php | 0 .../files/phphtdocs-sqlite/graph.php | 455 + .../files/phphtdocs-sqlite/include.php | 69 + .../files/phphtdocs-sqlite/index.php | 190 + .../files/phphtdocs}/details.php | 2 +- utils/bandwidthd/files/phphtdocs/footer.php | 3 + .../files/phphtdocs}/graph.php | 69 +- .../files/phphtdocs}/include.php | 0 .../files/phphtdocs}/index.php | 2 +- ...010-dont-add-host-paths-in-config.in.patch | 24 + .../patches/010-dont-add-host-paths.patch | 36 - .../patches/020-change-p2p-to-smtp.patch | 20 + .../patches/100-fix_config_file_location | 31 - utils/ccid/Makefile | 6 +- utils/ccrypt/Makefile | 2 +- utils/collectd/Makefile | 12 +- ...upstream-fix-for-network-plugin-ddos.patch | 50 + .../patches/200-fix-git-describe-error.patch | 2 +- .../patches/600-fix-libmodbus-detection.patch | 12 +- .../patches/900-add-iwinfo-plugin.patch | 4 +- .../patches/920-fix-ping-droprate.patch | 2 +- utils/coreutils/Makefile | 8 +- utils/dbus/Makefile | 8 +- utils/dump1090/Makefile | 4 +- utils/ecdsautils/Makefile | 72 + utils/flent-tools/Makefile | 4 +- utils/gnupg/Makefile | 27 +- utils/gpsd/Makefile | 10 +- utils/gpsd/files/gpsd.config | 10 +- utils/gpsd/files/gpsd.hotplug | 16 - .../gpsd/patches/0001-Remove-a-BSD-ism.patch | 42 - .../patches/0002-ncurses6_detection.patch | 15 + utils/grep/Makefile | 4 +- utils/hamlib/Makefile | 100 + utils/haveged/Makefile | 6 +- utils/hfsprogs/Makefile | 81 - utils/hfsprogs/files/hfsfsck.sh | 30 - ...01-Create-short-Makefiles-for-Debian.patch | 93 - ...002-Add-exclude-Darwin-specific-code.patch | 1407 -- ...de-files-absent-from-the-upstream-pa.patch | 1024 -- ...004-Fix-compilation-on-64-bit-arches.patch | 131 - ...Remove-Apple-specific-p-from-strings.patch | 291 - .../0006-Adjust-types-for-printing.patch | 37 - .../0007-Fix-path-for-HFS-wrapper-block.patch | 23 - .../0008-Provide-command-line-option-a.patch | 40 - .../0009-Rename-dprintf-to-dbg_printf.patch | 187 - ...10-Rename-custom-macro-nil-with-NULL.patch | 1319 -- utils/hfsprogs/patches/0011-Fix-types.patch | 71 - ...t-creating-UUIDs-for-new-filesystems.patch | 50 - .../hfsprogs/patches/0013-Fix-manpages.patch | 157 - .../patches/0014-uClibc_no_loadavg.patch | 15 - .../patches/0015-sysctl-only-on-glibc.patch | 91 - utils/io/Makefile | 36 + utils/io/src/io.c | 428 + utils/irqbalance/Makefile | 52 + .../patches/100-disable-ui-compilation.patch | 47 + utils/irqbalance/patches/200-avoid-glib.patch | 421 + utils/mysql/files/mysqld.init | 28 +- utils/nano/Makefile | 5 +- utils/open-plc-utils/Makefile | 10 +- .../patches/100-musl-compat.patch | 33 - utils/pcsc-lite/Makefile | 6 +- utils/qemu/Makefile | 22 +- utils/rng-tools/files/rngd.init | 2 +- utils/tar/Makefile | 4 +- utils/tar/patches/001-CVE-2016-6321.patch | 30 + utils/tmux/Makefile | 4 +- utils/unzip/Makefile | 4 +- ...-cve-2014-9913-unzip-buffer-overflow.patch | 29 + ...ve-2016-9844-zipinfo-buffer-overflow.patch | 28 + utils/xz/Makefile | 9 +- utils/zip/Makefile | 2 +- ...e-borrow-the-LFS-test-from-autotools.patch | 90 + 509 files changed, 25669 insertions(+), 26518 deletions(-) delete mode 100644 CONTRIBUTING.md create mode 100644 admin/openwisp-config/Makefile create mode 100644 admin/syslog-ng/Makefile create mode 100644 admin/syslog-ng/files/syslog-ng.conf create mode 100644 admin/syslog-ng/files/syslog-ng.init delete mode 100644 kernel/exfat-nofuse/Makefile create mode 100644 lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch create mode 100644 lang/perl-www-curl/Makefile create mode 100644 lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch create mode 100644 lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path create mode 100644 lang/perl-www-curl/patches/200-fix_default_lflags.patch delete mode 100644 lang/php7-pecl-dio/patches/0000-unify-line-endings.patch delete mode 100644 lang/php7-pecl-dio/patches/0001-fix-svn-prop.patch delete mode 100644 lang/php7-pecl-dio/patches/0002-fix-Wunused-variable.patch delete mode 100644 lang/php7-pecl-dio/patches/0003-Fix-Wmaybe-uninitialized.patch delete mode 100644 lang/php7-pecl-dio/patches/0004-Fix-last-build-warning-Wunused-but-set-variable-sorr.patch delete mode 100644 lang/php7-pecl-dio/patches/0005-Added-LICENCE-file-as-requested-in-Request-65869.patch delete mode 100644 lang/php7-pecl-dio/patches/0006-Replace-ZEND_FETCH_RESOURCE-macro-with-zend_fetch_re.patch delete mode 100644 lang/php7-pecl-dio/patches/0007-Replace-ZEND_REGISTER_RESOURCE-with-zend_register_re.patch delete mode 100644 lang/php7-pecl-dio/patches/0008-RETURN_STRINGL-takes-only-2-arguments.patch delete mode 100644 lang/php7-pecl-dio/patches/0009-Replace-zend_hash_find-with-zend_hash_str_find.patch delete mode 100644 lang/php7-pecl-dio/patches/0010-Replace-dio_convert_to_long.patch delete mode 100644 lang/php7-pecl-dio/patches/0011-Adopt-to-changed-stream-API-interface.patch delete mode 100644 lang/php7-pecl-dio/patches/0012-Remove-ancient-macros-TSRMLS_CC-and-TSRMLS_DC.patch delete mode 100644 lang/php7-pecl-dio/patches/0013-Fix-tests-for-legacy-interface.patch delete mode 100644 lang/php7-pecl-dio/patches/0014-Add-missing-changes-from-changed-stream-API-interfac.patch delete mode 100644 lang/php7-pecl-dio/patches/0015-Add-.gitignore.patch delete mode 100644 lang/php7-pecl-dio/patches/0016-Add-additional-baudrates.patch rename lang/php7-pecl-http/{patches => patches.old}/100_config9-m4.patch (100%) create mode 100644 lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch create mode 100644 lang/php7/patches/1005-fix-asm-constraints-in-aarch64-multiply-macro.patch delete mode 100644 lang/python-gmpy/Makefile delete mode 100644 lang/python/patches/005-fix-libffi-x86-64-configure.patch delete mode 100644 lang/python/patches/011-do-not-prefer-ncursesw.patch create mode 100644 lang/python/patches/011-remove-setupterm-definition.patch create mode 100644 lang/python3/files/python3-host.mk create mode 100644 lang/python3/files/python3-version.mk create mode 100644 lang/python3/patches/011-fix-ncursesw-definition-colisions.patch create mode 100644 lang/python3/patches/016-adjust-config-paths.patch delete mode 100644 lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch create mode 100644 libs/dtc/Makefile create mode 100644 libs/eventlog/Makefile create mode 100644 libs/icu/patches/001-disable-strtod_l.patch create mode 100644 libs/icu/patches/CVE-2017-7867_CVE-2017-7868.patch create mode 100644 libs/libcanfestival/Makefile create mode 100644 libs/libcanfestival/patches/001-sigval-ref-fix.patch create mode 100644 libs/libcanfestival/patches/002-makefile-gcc-linker.patch create mode 100644 libs/libcanfestival/patches/003-makefile-skip-examples.patch create mode 100644 libs/libcoap/Makefile delete mode 100644 libs/libevhtp/Makefile delete mode 100644 libs/libevhtp/patches/010-strcmp-endianness-fix.patch create mode 100644 libs/libextractor/patches/002-ffmpeg2.9_api_backport.patch create mode 100644 libs/libshout/patches/100-add_with-openssl_option.patch create mode 100644 libs/pcre/patches/001-CVE-2017-7186 create mode 100755 libs/rxtx/Makefile create mode 100755 libs/rxtx/patches/010-acm-devices.patch create mode 100644 mail/dovecot/Makefile create mode 100644 mail/dovecot/files/dovecot.init create mode 100644 mail/dovecot/patches/001-configure_in.patch create mode 100644 multimedia/gst1-libav/Config.in create mode 100644 multimedia/gst1-libav/Makefile delete mode 100644 multimedia/icecast/libvorbisidec.mk create mode 100644 multimedia/icecast/patches/005-no_examples_doc_win32.patch create mode 100644 multimedia/icecast/patches/015-add_with-openssl_option.patch delete mode 100644 net/adblock/files/adblock-helper.sh delete mode 100755 net/adblock/files/adblock-update.sh delete mode 100644 net/adblock/files/adblock.hotplug create mode 100755 net/adblock/files/adblock.sh delete mode 100644 net/adblock/files/www/adblock/index.html delete mode 100644 net/apache/patches/006-remove-ssl3.patch delete mode 100644 net/clamav/Makefile delete mode 100644 net/clamav/files/bytecode.cvd delete mode 100644 net/clamav/files/clamav.config delete mode 100644 net/clamav/files/clamav.init delete mode 100644 net/clamav/files/freshclam.config delete mode 100644 net/clamav/files/freshclam.init delete mode 100644 net/clamav/patches/001-compile.patch delete mode 100644 net/ctorrent-svn/Makefile delete mode 100644 net/ctorrent-svn/patches/100-compile-fix.patch delete mode 100644 net/ctorrent-svn/patches/300-negative.patch delete mode 100644 net/ctorrent-svn/patches/400-musl-compat.patch delete mode 100644 net/ctorrent/Makefile delete mode 100644 net/ctorrent/patches/100-CVE-2009-1759.patch delete mode 100644 net/ctorrent/patches/100-negative-ints.patch delete mode 100644 net/ctorrent/patches/200-musl-compat.patch create mode 100644 net/ddns-scripts/files/public_suffix_list.dat create mode 100644 net/dynapoint/Makefile create mode 100644 net/dynapoint/src/dynapoint.config create mode 100644 net/dynapoint/src/dynapoint.init create mode 100644 net/dynapoint/src/dynapoint.lua delete mode 100644 net/freeradius2/Config.in delete mode 100644 net/freeradius2/Makefile delete mode 100644 net/freeradius2/files/radiusd.init delete mode 100644 net/freeradius2/patches/001-fix-makefile.patch delete mode 100644 net/freeradius2/patches/002-config.patch delete mode 100644 net/freeradius2/patches/004-ldap_configure.patch delete mode 100644 net/freeradius2/patches/008-honor_ccpflags.patch delete mode 100644 net/freeradius2/patches/010-disbale-openssl-check.patch delete mode 100644 net/haproxy/patches/0001-BUG-MINOR-Fix-OSX-compilation-errors.patch delete mode 100644 net/haproxy/patches/0002-BUG-MINOR-displayed-PCRE-version-is-running-release.patch delete mode 100644 net/haproxy/patches/0003-MINOR-show-Built-with-PCRE-version.patch delete mode 100644 net/haproxy/patches/0004-MINOR-show-Running-on-zlib-version.patch delete mode 100644 net/haproxy/patches/0005-MINOR-Add-fe_req_rate-sample-fetch.patch delete mode 100644 net/haproxy/patches/0006-MEDIUM-make-SO_REUSEPORT-configurable.patch delete mode 100644 net/haproxy/patches/0007-BUG-MINOR-vars-use-sess-and-not-s-sess-in-action_sto.patch delete mode 100644 net/haproxy/patches/0008-BUG-MINOR-vars-make-smp_fetch_var-more-robust-agains.patch delete mode 100644 net/haproxy/patches/0009-BUG-MINOR-vars-smp_fetch_var-doesn-t-depend-on-HTTP-.patch delete mode 100644 net/haproxy/patches/0010-BUG-MINOR-ssl-Check-malloc-return-code.patch delete mode 100644 net/haproxy/patches/0011-BUG-MINOR-ssl-prevent-multiple-entries-for-the-same-.patch delete mode 100644 net/haproxy/patches/0012-BUG-MINOR-systemd-make-the-wrapper-return-a-non-null.patch delete mode 100644 net/haproxy/patches/0013-BUG-MINOR-systemd-always-restore-signals-before-exec.patch delete mode 100644 net/haproxy/patches/0014-BUG-MINOR-systemd-check-return-value-of-calloc.patch delete mode 100644 net/haproxy/patches/0015-MINOR-systemd-report-it-when-execve-fails.patch delete mode 100644 net/haproxy/patches/0016-BUG-MEDIUM-systemd-let-the-wrapper-know-that-haproxy.patch delete mode 100644 net/haproxy/patches/0017-BUILD-protocol-fix-some-build-errors-on-OpenBSD.patch delete mode 100644 net/haproxy/patches/0018-BUILD-log-iovec-requires-to-include-sys-uio.h-on-Ope.patch delete mode 100644 net/haproxy/patches/0019-BUILD-tcp-do-not-include-netinet-ip.h-for-IP_TTL.patch delete mode 100644 net/haproxy/patches/0020-BUILD-checks-remove-the-last-strcat-and-eliminate-a-.patch delete mode 100644 net/haproxy/patches/0021-BUILD-poll-remove-unused-hap_fd_isset-which-causes-a.patch delete mode 100644 net/haproxy/patches/0022-MINOR-cfgparse-few-memory-leaks-fixes.patch delete mode 100644 net/haproxy/patches/0023-MINOR-build-Allow-linking-to-device-atlas-library-fi.patch delete mode 100644 net/haproxy/patches/0024-DOC-Fix-typo-in-description-of-st-parameter-in-man-p.patch delete mode 100644 net/haproxy/patches/0025-BUG-MEDIUM-peers-on-shutdown-wake-up-the-appctx-not-.patch delete mode 100644 net/haproxy/patches/0026-BUG-MEDIUM-peers-fix-use-after-free-in-peer_session_.patch delete mode 100644 net/haproxy/patches/0027-BUG-MEDIUM-systemd-wrapper-return-correct-exit-codes.patch delete mode 100644 net/haproxy/patches/0028-BUG-MEDIUM-srv-state-properly-restore-the-DRAIN-stat.patch delete mode 100644 net/haproxy/patches/0029-BUG-MINOR-srv-state-allow-to-have-both-CMAINT-and-FD.patch delete mode 100644 net/haproxy/patches/0030-BUG-MEDIUM-servers-properly-propagate-the-maintenanc.patch delete mode 100644 net/haproxy/patches/0031-BUG-vars-Fix-set-var-converter-because-of-a-typo.patch delete mode 100644 net/iotivity/patches/004-use-env.patch delete mode 100644 net/iotivity/patches/020-Do-not-set-architecture-specific-flags.patch create mode 100644 net/iotivity/patches/020-linux-Add-more-architectures.patch delete mode 100644 net/iotivity/patches/021-add-some-more-architectures.patch create mode 100644 net/iotivity/patches/021-build-do-not-set-TARGET_ARCH-to-default.patch create mode 100644 net/iotivity/patches/022-build-restrict-compiler-options-to-supported-archite.patch create mode 100644 net/iotivity/patches/023-build-take-compiler-options-from-environment.patch create mode 100644 net/iotivity/patches/040-linux-Use-system-sqlite3.patch delete mode 100644 net/iotivity/patches/040-remove-provisioning.patch create mode 100644 net/iotivity/patches/050-csdk-move-OCEntityHandlerResponse-from-stack-to-heap.patch create mode 100644 net/iotivity/patches/051-csdk-move-OCClientResponse-from-stack-to-heap.patch create mode 100644 net/iotivity/patches/053-src-move-OCClientResponse-from-stack-to-heap.patch delete mode 100644 net/iotivity/patches/054-resource-encapsulation-deactivate-test-covergae.patch delete mode 100644 net/iotivity/patches/060-security-fix-reading-of-permission-attribute-from-co.patch delete mode 100644 net/iotivity/patches/061-Remove-the-endianness-dependency-for-credential.patch delete mode 100644 net/iotivity/patches/062-Fix-memory-corruption-when-reading-inetgers-from-cbo.patch delete mode 100644 net/iotivity/patches/070-Resource-container-Backported-init-fix-to-1.1-rel.patch create mode 100644 net/iotivity/patches/070-ssl-fix-compilation-against-non-debug-mbedtls.patch create mode 100644 net/iotivity/patches/071-ssl-call-mbedtls_version_get_string-only-if-availabl.patch create mode 100644 net/iotivity/patches/072-ssl-call-mbedtls_ssl_conf_renegotiation-only-if-avai.patch create mode 100644 net/iotivity/patches/075-ssl-enable-usage-of-patched-mbed-functions-condition.patch create mode 100644 net/iotivity/patches/078-use-system-mbedtls.patch create mode 100644 net/iotivity/patches/080-zigbee_wrapper-do-not-check-for-floating-point.patch delete mode 100644 net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch create mode 100644 net/jool/Makefile create mode 100644 net/keepalived/files/keepalived.config delete mode 100644 net/keepalived/patches/100-musl-compat.patch rename net/keepalived/patches/{101-update-struct-msghdr.patch => 101-0001-vrrp-update-struct-msghdr.patch} (55%) create mode 100644 net/keepalived/patches/101-0002-Reinstate-initialisation-of-msghdr-fields.patch delete mode 100644 net/lighttpd/Makefile delete mode 100644 net/lighttpd/files/lighttpd.conf delete mode 100644 net/lighttpd/files/lighttpd.init create mode 100644 net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_wirelessconfig.lua create mode 100644 net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_wirelessconfig.htm create mode 100644 net/net-snmp/patches/000-cross-compile.patch delete mode 100644 net/net-snmp/patches/800-format-security.patch create mode 100644 net/ntpd/files/ntpd.hotplug-helper delete mode 100644 net/ocserv/patches/001-makefile-fix.patch delete mode 100644 net/openssh/patches/100-openssh-7.3_p1-NEWKEYS_null_deref.patch delete mode 100644 net/openssh/patches/101-Unregister-the-KEXINIT-handler-after-receive.patch create mode 100644 net/pen/Makefile delete mode 100644 net/seafile-server/Config.in delete mode 100644 net/seafile-server/Makefile delete mode 100644 net/seafile-server/files/seafile.conf delete mode 100755 net/seafile-server/files/seafile.init delete mode 100755 net/seafile-server/files/seahub.init delete mode 100644 net/seafile-server/patches/020-script-patches.patch delete mode 100644 net/seafile-server/patches/030-pidfiles-in-same-directory.patch delete mode 100644 net/seafile-server/patches/040-seafile-admin.patch delete mode 100644 net/seafile-server/patches/050-libseafile-makefile-fixes.patch delete mode 100644 net/seafile-server/patches/060-timestamps-as-int64.patch delete mode 100644 net/seafile-server/patches/070-fuse-mount.patch create mode 100644 net/socat/patches/110-drop_egd_sslv3_support.patch create mode 100644 net/softethervpn/Makefile create mode 100644 net/softethervpn/files/dummy create mode 100755 net/softethervpn/files/launcher.sh create mode 100644 net/softethervpn/files/vpnbridge.init create mode 100644 net/softethervpn/files/vpnclient.init create mode 100644 net/softethervpn/files/vpnserver.init create mode 100644 net/softethervpn/patches/103-noeucjp.patch create mode 100644 net/softethervpn/patches/105-nossl3.patch create mode 100644 net/subversion/Makefile create mode 100644 net/subversion/files/subversion.config create mode 100644 net/subversion/files/subversion.init create mode 100644 net/subversion/patches/301-cross-compilation-macos.patch create mode 100644 net/transmission/patches/040-fix-for-mbedtls.patch create mode 100644 net/transmission/patches/050-mask-as-release.patch create mode 100644 net/umurmur/patches/010-mbedtls_fix_includes.patch delete mode 100644 net/umurmur/patches/10-Add-compile-time-check-for-POLARSSL_VERSION_FEATURES.patch create mode 100644 net/unbound/files/odhcpd.awk create mode 100644 net/unbound/files/odhcpd.sh delete mode 100755 net/unbound/files/unbound.iface create mode 100644 net/unbound/files/unbound_ext.conf create mode 100644 net/unbound/files/unbound_srv.conf create mode 100644 net/xl2tpd/patches/200-xl2tpd-control-fix-xl2tpd-hanged-up-in-fopen.patch create mode 100644 net/zerotier/Config.in create mode 100644 net/zerotier/Makefile create mode 100644 net/zerotier/files/zerotier.config create mode 100644 net/zerotier/files/zerotier.init create mode 100644 net/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch create mode 100644 net/zerotier/patches/0002-fix-build.patch create mode 100644 net/zerotier/patches/0003-workaround_to_avoid_seg_faults.patch create mode 100644 net/zerotier/patches/0005-use-external-miniupnpc-and-natpmp.patch delete mode 100644 sound/pianod/patches/005-Remove_svn_version_query.patch delete mode 100644 sound/pianod/patches/010-Configure_add_SSL_options.patch delete mode 100644 sound/pianod/patches/020-Use_package_config_h_for_all_modules.patch delete mode 100644 sound/pianod/patches/030-Waitress_add_polarssl_variant.patch create mode 100644 sound/shairport-sync/patches/100-replace_polarssl_with_mbedtls.patch create mode 100644 sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch delete mode 100644 sound/sox/patches/020-ffmpeg-0.11.patch delete mode 100644 sound/sox/patches/020-ffmpeg-2.x.patch delete mode 100644 utils/bandwidthd-php/Makefile delete mode 100644 utils/bandwidthd-php/files/legend.gif rename utils/{bandwidthd-php => bandwidthd}/files/bandwidthd-php.config (100%) rename utils/{bandwidthd-php => bandwidthd}/files/bandwidthd-php.init (97%) create mode 100644 utils/bandwidthd/files/bandwidthd-sqlite.config rename utils/bandwidthd/files/{bandwidthd-pgsql.init => bandwidthd-sqlite.init} (50%) mode change 100644 => 100755 mode change 100644 => 100755 utils/bandwidthd/files/bandwidthd.init rename utils/{bandwidthd-php/files/logo.gif => bandwidthd/files/logo-openwrt.gif} (100%) delete mode 100644 utils/bandwidthd/files/logo.gif create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/details.php rename utils/{bandwidthd-php/files => bandwidthd/files/phphtdocs-sqlite}/footer.php (100%) create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/graph.php create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/include.php create mode 100644 utils/bandwidthd/files/phphtdocs-sqlite/index.php rename utils/{bandwidthd-php/files => bandwidthd/files/phphtdocs}/details.php (99%) create mode 100644 utils/bandwidthd/files/phphtdocs/footer.php rename utils/{bandwidthd-php/files => bandwidthd/files/phphtdocs}/graph.php (80%) rename utils/{bandwidthd-php/files => bandwidthd/files/phphtdocs}/include.php (100%) rename utils/{bandwidthd-php/files => bandwidthd/files/phphtdocs}/index.php (99%) create mode 100644 utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch delete mode 100644 utils/bandwidthd/patches/010-dont-add-host-paths.patch create mode 100644 utils/bandwidthd/patches/020-change-p2p-to-smtp.patch delete mode 100644 utils/bandwidthd/patches/100-fix_config_file_location create mode 100644 utils/collectd/patches/050-upstream-fix-for-network-plugin-ddos.patch create mode 100644 utils/ecdsautils/Makefile delete mode 100644 utils/gpsd/files/gpsd.hotplug delete mode 100644 utils/gpsd/patches/0001-Remove-a-BSD-ism.patch create mode 100644 utils/gpsd/patches/0002-ncurses6_detection.patch create mode 100644 utils/hamlib/Makefile delete mode 100644 utils/hfsprogs/Makefile delete mode 100644 utils/hfsprogs/files/hfsfsck.sh delete mode 100644 utils/hfsprogs/patches/0001-Create-short-Makefiles-for-Debian.patch delete mode 100644 utils/hfsprogs/patches/0002-Add-exclude-Darwin-specific-code.patch delete mode 100644 utils/hfsprogs/patches/0003-Add-helper-include-files-absent-from-the-upstream-pa.patch delete mode 100644 utils/hfsprogs/patches/0004-Fix-compilation-on-64-bit-arches.patch delete mode 100644 utils/hfsprogs/patches/0005-Remove-Apple-specific-p-from-strings.patch delete mode 100644 utils/hfsprogs/patches/0006-Adjust-types-for-printing.patch delete mode 100644 utils/hfsprogs/patches/0007-Fix-path-for-HFS-wrapper-block.patch delete mode 100644 utils/hfsprogs/patches/0008-Provide-command-line-option-a.patch delete mode 100644 utils/hfsprogs/patches/0009-Rename-dprintf-to-dbg_printf.patch delete mode 100644 utils/hfsprogs/patches/0010-Rename-custom-macro-nil-with-NULL.patch delete mode 100644 utils/hfsprogs/patches/0011-Fix-types.patch delete mode 100644 utils/hfsprogs/patches/0012-Fix-mkfs-not-creating-UUIDs-for-new-filesystems.patch delete mode 100644 utils/hfsprogs/patches/0013-Fix-manpages.patch delete mode 100644 utils/hfsprogs/patches/0014-uClibc_no_loadavg.patch delete mode 100644 utils/hfsprogs/patches/0015-sysctl-only-on-glibc.patch create mode 100644 utils/io/Makefile create mode 100644 utils/io/src/io.c create mode 100644 utils/irqbalance/Makefile create mode 100644 utils/irqbalance/patches/100-disable-ui-compilation.patch create mode 100644 utils/irqbalance/patches/200-avoid-glib.patch delete mode 100644 utils/open-plc-utils/patches/100-musl-compat.patch create mode 100644 utils/tar/patches/001-CVE-2016-6321.patch create mode 100644 utils/unzip/patches/008-cve-2014-9913-unzip-buffer-overflow.patch create mode 100644 utils/unzip/patches/009-cve-2016-9844-zipinfo-buffer-overflow.patch create mode 100644 utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 29ba5db..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,114 +0,0 @@ -# Contributing Guidelines -(See 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. -* 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! - -#### 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 `) -* 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). -* 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. - -#### 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 ) - -### Advice on pull requests: - -Pull requests are the easiest way to contribute changes to git repos at Github. They are the preferred contribution method, as they offer a nice way for commenting and amending the proposed changes. - -* You need a local "fork" of the Github repo. -* Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request. Workflow using "feature_x" as the example: - - Update your local git fork to the tip (of the master, usually) - - Create the feature branch with `git checkout -b feature_x` - - Edit changes and commit them locally - - Push them to your Github fork by `git push -u origin feature_x`. That creates the "feature_x" branch at your Github fork and sets it as the remote of this branch - - When you now visit Github, you should see a proposal to create a pull request - -* If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then use `git push` to automatically update the pull request. - -* If you need to change something in the existing pull request (e.g. to add a missing signed-off-by line to the commit message), you can use `git push -f` to overwrite the original commits. That is easy and safe when using a feature branch. Example workflow: - - Checkout the feature branch by `git checkout feature_x` - - Edit changes and commit them locally. If you are just updating the commit message in the last commit, you can use `git commit --amend` to do that - - If you added several new commits or made other changes that require cleaning up, you can use `git rebase -i HEAD~X` (X = number of commits to edit) to possibly squash some commits - - Push the changed commits to Github with `git push -f` to overwrite the original commits in the "feature_x" branch with the new ones. The pull request gets automatically updated - -### If you have commit access: - -* Do NOT use git push --force. -* Do NOT commit to other maintainer's packages without their consent. -* Use Pull Requests if you are unsure and to suggest changes to other maintainers. - -#### Gaining commit access: - -* We will gladly grant commit access to responsible contributors who have made - useful pull requests and / or feedback or patches to this repository or - OpenWrt in general. Please include your request for commit access in your - next pull request or ticket. - -### Release Branches: - -* Branches named "for-XX.YY" (e.g. for-14.07) are release branches. -* These branches are built with the respective OpenWrt release and are created - during the release stabilisation phase. -* Please ONLY cherry-pick or commit security and bug-fixes to these branches. -* Do NOT add new packages and do NOT do major upgrades of packages here. -* 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: ) - -| Full Name | Identifier | -|---|:---| -|Apache License 1.0|Apache-1.0| -|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 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 with attribution|BSD-3-Clause-Attribution| -|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+| -|Fair License|Fair| -|ISC License|ISC| -|MIT License|MIT| -|No Limit Public License|NLPL| -|OpenSSL License|OpenSSL| -|X11 License|X11| -|zlib License|Zlib| diff --git a/admin/debootstrap/Makefile b/admin/debootstrap/Makefile index a7d45c2..72d2c5b 100644 --- a/admin/debootstrap/Makefile +++ b/admin/debootstrap/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=debootstrap -PKG_VERSION:=1.0.83 +PKG_VERSION:=1.0.87 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_MD5SUM:=877fe5281a0e424bd6c71d121cbb725b8f56694e66558cd47c20c3aa87ceff72 +PKG_MD5SUM:=784f5754f3287ae80715d9100a4ed04e7895be5f7b81b7b2295d335dd69d79fb PKG_LICENSE:=Unique PKG_LICENSE_FILES:=debian/copyright diff --git a/admin/openwisp-config/Makefile b/admin/openwisp-config/Makefile new file mode 100644 index 0000000..ed539b0 --- /dev/null +++ b/admin/openwisp-config/Makefile @@ -0,0 +1,119 @@ +# openwisp.org +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +include $(TOPDIR)/rules.mk + +PKG_NAME:=openwisp-config +PKG_VERSION:=0.4.5 +PKG_RELEASE:=1 + +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 +PKG_SOURCE_VERSION:=0.4.5 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) +PKG_MIRROR_HASH:=017a8ed35ebfda2805426e7da02559d5cc2845ee9ded60fdae8e848d377424fb +PKG_LICENSE:=GPL-3.0 +PKGARCH:=all + +include $(INCLUDE_DIR)/package.mk + +define Package/openwisp-config/default + TITLE:=Remote configuration management agent ($(2) variant) + CATEGORY:=Administration + SECTION:=admin + SUBMENU:=openwisp + DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3) + VARIANT:=$(1) + MAINTAINER:=Federico Capoano + URL:=http://openwisp.org +endef + +Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl) +Package/openwisp-config-mbedtls=$(call Package/openwisp-config/default,mbedtls,mbedTLS,+ca-certificates +libmbedtls) +Package/openwisp-config-cyassl=$(call Package/openwisp-config/default,cyassl,CyaSSL,+ca-certificates +libcyassl) +# deprecated on recent versions of OpenWRT (>= Designated Driver) and LEDE (>= 17.01) +Package/openwisp-config-polarssl=$(call Package/openwisp-config/default,polarssl,PolarSSL,+ca-certificates +libpolarssl) +Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL) + +define Build/Compile +endef + +define Package/openwisp-config-$(BUILD_VARIANT)/conffiles +/etc/config/openwisp +endef + +ifeq ($(BUILD_VARIANT),openssl) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),mbedtls) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),cyassl) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),polarssl) +CONFIG_OPENWISP_UCI:=ssl +endif +ifeq ($(BUILD_VARIANT),nossl) +CONFIG_OPENWISP_UCI:=nossl +endif + + +define Package/openwisp-config-$(BUILD_VARIANT)/install + $(INSTALL_DIR) \ + $(1)/usr/sbin \ + $(1)/etc/init.d \ + $(1)/etc/config \ + $(1)/etc/openwisp \ + $(1)/usr/lib/lua/openwisp + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \ + $(1)/usr/sbin/openwisp_config + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \ + $(1)/etc/init.d/openwisp_config + + $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp-$(CONFIG_OPENWISP_UCI).config \ + $(1)/etc/config/openwisp + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \ + $(1)/usr/sbin/openwisp-reload-config + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \ + $(1)/usr/lib/lua/openwisp/utils.lua + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \ + $(1)/usr/sbin/openwisp-store-unmanaged + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \ + $(1)/usr/sbin/openwisp-restore-unmanaged + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \ + $(1)/usr/sbin/openwisp-remove-default-wifi + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \ + $(1)/usr/sbin/openwisp-uci-autoname + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \ + $(1)/usr/sbin/openwisp-update-config + + $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp/ +endef + +$(eval $(call BuildPackage,openwisp-config-openssl)) +$(eval $(call BuildPackage,openwisp-config-mbedtls)) +$(eval $(call BuildPackage,openwisp-config-cyassl)) +$(eval $(call BuildPackage,openwisp-config-polarssl)) +$(eval $(call BuildPackage,openwisp-config-nossl)) diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile index 0555161..e9090ee 100644 --- a/admin/sudo/Makefile +++ b/admin/sudo/Makefile @@ -64,8 +64,8 @@ define Host/Compile endef define Host/Install - $(INSTALL_DIR) $(HOST_BUILD_PREFIX)/bin - $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(HOST_BUILD_PREFIX)/bin/ + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin + $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR_HOSTPKG)/bin/ endef $(eval $(call HostBuild)) diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile new file mode 100644 index 0000000..0486164 --- /dev/null +++ b/admin/syslog-ng/Makefile @@ -0,0 +1,76 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=syslog-ng +PKG_VERSION:=3.8.1 +PKG_RELEASE:=3 + +PKG_MAINTAINER:=W. Michael Petullo + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af + +PKG_INSTALL:=1 + +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/ +endef + +define Package/syslog-ng/description + syslog-ng reads and logs messages to the system console, log + files, other machines and/or users as specified by its + configuration file. +endef + +define Package/syslog-ng/conffiles + /etc/syslog-ng.conf +endef + +define Build/Configure + $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure + $(Build/Configure/Default) +endef + +CONFIGURE_ARGS += \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) \ + --disable-dependency-tracking \ + --disable-ampq \ + --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_VARS += \ + 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)" + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc + $(call libtool_remove_files,$(1)) +endef + +$(eval $(call BuildPackage,syslog-ng)) diff --git a/admin/syslog-ng/files/syslog-ng.conf b/admin/syslog-ng/files/syslog-ng.conf new file mode 100644 index 0000000..6786bc3 --- /dev/null +++ b/admin/syslog-ng/files/syslog-ng.conf @@ -0,0 +1,37 @@ +@version:3.8 + +options { + chain_hostnames(no); + 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); +}; + +source src { + internal(); + unix-stream("/dev/log"); +}; + +source net { + udp(ip(0.0.0.0) port(514)); +}; + +source kernel { + file("/proc/kmsg" program_override("kernel")); +}; + +destination messages { + file("/var/log/messages"); +}; + +log { + source(src); + source(net); + source(kernel); + destination(messages); +}; diff --git a/admin/syslog-ng/files/syslog-ng.init b/admin/syslog-ng/files/syslog-ng.init new file mode 100644 index 0000000..cecb3f9 --- /dev/null +++ b/admin/syslog-ng/files/syslog-ng.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2016 OpenWrt.org + +START=20 + +SERVICE_USE_PID=1 + +start() { + [ -f /etc/syslog-ng.conf ] || return 1 + service_start /usr/sbin/syslog-ng +} + +stop() { + service_stop /usr/sbin/syslog-ng +} + +reload() { + service_reload /usr/sbin/syslog-ng +} diff --git a/kernel/exfat-nofuse/Makefile b/kernel/exfat-nofuse/Makefile deleted file mode 100644 index 694ad1e..0000000 --- a/kernel/exfat-nofuse/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2014 Bruno Randolf -# -# 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:=exfat-nofuse -PKG_VERSION=2016-09-26-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=1 - -PKG_SOURCE=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/dorimanx/exfat-nofuse.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=051167ceccbe75d9d77fc4f5356f5a39a01779e8 - -PKG_MAINTAINER:=Bruno Randolf -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/fs-exfat - SUBMENU:=Filesystems - TITLE:=ExFAT Kernel driver - FILES:=$(PKG_BUILD_DIR)/exfat.ko - AUTOLOAD:=$(call AutoLoad,30,exfat,1) - DEPENDS:=+kmod-nls-base @BUILD_PATENTED -endef - -define KernelPackage/fs-exfat/description - Kernel module for ExFAT Filesytems -endef - -MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - M="$(PKG_BUILD_DIR)" - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ - CONFIG_EXFAT_FS=m \ - modules -endef - -$(eval $(call KernelPackage,fs-exfat)) diff --git a/lang/lua-bencode/Makefile b/lang/lua-bencode/Makefile index 0b32056..a7b898b 100644 --- a/lang/lua-bencode/Makefile +++ b/lang/lua-bencode/Makefile @@ -11,11 +11,10 @@ PKG_NAME:=lua-bencode PKG_VERSION:=2.1.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode -PKG_SOURCE_PROTO:=hg -PKG_SOURCE_VERSION:=500243383cb6acbddd3cf12aee6e4667aab53324 +PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode/downloads/ +PKG_HASH:=4624f33ff026bc62990a323ee4953e42d68430c38a1a4726c9cfd77c085b1422 PKG_LICENSE:=MIT include $(INCLUDE_DIR)/package.mk diff --git a/lang/lualanes/Makefile b/lang/lualanes/Makefile index 6161290..749709d 100644 --- a/lang/lualanes/Makefile +++ b/lang/lualanes/Makefile @@ -42,8 +42,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) all \ CC="$(TARGET_CC)" \ - LUA="$(STAGING_DIR)/host/bin/lua" \ - LUAC="$(STAGING_DIR)/host/bin/luac" \ + LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \ + LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \ OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield" endef diff --git a/lang/luarocks/Makefile b/lang/luarocks/Makefile index 7519f8f..73dbde7 100644 --- a/lang/luarocks/Makefile +++ b/lang/luarocks/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luarocks PKG_VERSION:=2.2.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_PROTO:=git @@ -41,7 +41,11 @@ endef CONFIGURE_ARGS = \ --prefix=$(CONFIGURE_PREFIX) \ --sysconfdir=/etc \ - --with-lua=$(STAGING_DIR)/host + --with-lua=$(STAGING_DIR_HOSTPKG) + +CONFIGURE_VARS = \ + LUAROCKS_UNAME_S="Linux" \ + LUAROCKS_UNAME_M="$(ARCH)" define Build/Compile $(call Build/Compile/Default,build) diff --git a/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch b/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch new file mode 100644 index 0000000..5c9c968 --- /dev/null +++ b/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch @@ -0,0 +1,37 @@ +Index: luarocks-2.2.2/configure +=================================================================== +--- luarocks-2.2.2.orig/configure ++++ luarocks-2.2.2/configure +@@ -388,18 +388,22 @@ then + fi + + echo_n "Configuring for system... " +-if uname -s +-then +- LUAROCKS_UNAME_S=`uname -s` +-else +- die "Could not determine operating system. 'uname -s' failed." ++if [ -z "$LUAROCKS_UNAME_S" ]; then ++ if uname -s ++ then ++ LUAROCKS_UNAME_S=`uname -s` ++ else ++ die "Could not determine operating system. 'uname -s' failed." ++ fi + fi + echo_n "Configuring for architecture... " +-if uname -m +-then +- LUAROCKS_UNAME_M=`uname -m` +-else +- die "Could not determine processor architecture. 'uname -m' failed." ++if [ -z "$LUAROCKS_UNAME_M" ]; then ++ if uname -m ++ then ++ LUAROCKS_UNAME_M=`uname -m` ++ else ++ die "Could not determine processor architecture. 'uname -m' failed." ++ fi + fi + + for v in 5.1 5.2 5.3; do diff --git a/lang/node/Makefile b/lang/node/Makefile index 6cb1e20..3a1a2f3 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -72,7 +72,7 @@ HOST_CONFIGURE_VARS:= HOST_CONFIGURE_ARGS:= \ --dest-os=linux \ --without-snapshot \ - --prefix=$(HOST_BUILD_PREFIX) + --prefix=$(STAGING_DIR_HOSTPKG) HOST_CONFIGURE_CMD:=python ./configure diff --git a/lang/perl-cgi/Makefile b/lang/perl-cgi/Makefile index afecaa0..eaca425 100644 --- a/lang/perl-cgi/Makefile +++ b/lang/perl-cgi/Makefile @@ -8,18 +8,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl-cgi -PKG_VERSION:=4.28 -PKG_RELEASE:=1 +PKG_VERSION:=4.35 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=28efb391377f6e98c19c23292d5fcc8c +PKG_MD5SUM:=15e63942c02354426b25f056f2a4467c PKG_LICENSE:=GPL Artistic-2.0 -PKG_MAINTAINER:=Marcel Denia +PKG_MAINTAINER:=Marcel Denia , \ + Philip Prindeville PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION) +# don't strip comments because that will mangle this module +PKG_LEAVE_COMMENTS:=1 + include $(INCLUDE_DIR)/package.mk include ../perl/perlmod.mk diff --git a/lang/perl-www-curl/Makefile b/lang/perl-www-curl/Makefile new file mode 100644 index 0000000..1e424cb --- /dev/null +++ b/lang/perl-www-curl/Makefile @@ -0,0 +1,49 @@ +# +# 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:=perl-www-curl +PKG_VERSION:=4.17 +PKG_RELEASE:=4 + +PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/ +PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=997ac81cd6b03b30b36f7cd930474845 + +PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Marcel Denia + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Curl-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www-curl + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl bindings to libcurl + URL:=http://search.cpan.org/dist/WWW-Curl/ + DEPENDS:=perl +libcurl +perlbase-essential +perlbase-xsloader +endef + +define Build/Configure + $(call perlmod/Configure,$(STAGING_DIR)/usr/include,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www-curl/install + $(call perlmod/Install,$(1),WWW/Curl WWW/Curl.pm auto/WWW/Curl) +endef + + +$(eval $(call BuildPackage,perl-www-curl)) diff --git a/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch new file mode 100644 index 0000000..568b65c --- /dev/null +++ b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch @@ -0,0 +1,74 @@ +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -12,31 +12,31 @@ no_index directory => 'template'; + repository 'http://github.com/szbalint/WWW--Curl'; + # This is a hack. If you have libcurl installed, just specify curl.h below + # and comment out this line. +-if ($^O ne 'MSWin32') { +- if (!$ENV{CURL_CONFIG}) { +- requires_external_bin 'curl-config'; +- } +-} else { +- print "Sorry, no automated install is available on Windows,\n". +- "please see the README.Win32 file on instructions for a manual install.\n"; +- exit(0); +-} +- +-my $curl_config = $ENV{CURL_CONFIG} || 'curl-config'; +- +-my $vernum = `${curl_config} --vernum`; chomp $vernum; +-my $version = `${curl_config} --version`; chomp $version; +- +-my $minimum_ver = hex("070a08"); +- +-if ($vernum && hex($vernum) <= $minimum_ver) { +- print "Your currently installed libcurl version - $version - is too old.\n". +- "This module doesn't seek compatibility with versions older than 7.10.8\n". +- "Proceed manually if you know what you're doing.\n"; +- exit(0); +-} +- +-print "The version is $version\n"; ++#if ($^O ne 'MSWin32') { ++# if (!$ENV{CURL_CONFIG}) { ++# requires_external_bin 'curl-config'; ++# } ++#} else { ++# print "Sorry, no automated install is available on Windows,\n". ++# "please see the README.Win32 file on instructions for a manual install.\n"; ++# exit(0); ++#} ++# ++#my $curl_config = $ENV{CURL_CONFIG} || 'curl-config'; ++# ++#my $vernum = `${curl_config} --vernum`; chomp $vernum; ++#my $version = `${curl_config} --version`; chomp $version; ++# ++#my $minimum_ver = hex("070a08"); ++# ++#if ($vernum && hex($vernum) <= $minimum_ver) { ++# print "Your currently installed libcurl version - $version - is too old.\n". ++# "This module doesn't seek compatibility with versions older than 7.10.8\n". ++# "Proceed manually if you know what you're doing.\n"; ++# exit(0); ++#} ++# ++#print "The version is $version\n"; + + my @includes = qw(); + my ($cflags,$lflags, $ldflags) = ('','',''); +@@ -58,10 +58,10 @@ if ($^O ne 'MSWin32') { + # Get curl to tell us where it is, if we can. + # + +-if ($^O ne 'MSWin32') { +- $cflags = `${curl_config} --cflags`; +- $lflags = `${curl_config} --libs`; +-} ++#if ($^O ne 'MSWin32') { ++# $cflags = `${curl_config} --cflags`; ++# $lflags = `${curl_config} --libs`; ++#} + + # can't find link flags, make some guesses + if (!defined($lflags)) { diff --git a/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path b/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path new file mode 100644 index 0000000..34221c0 --- /dev/null +++ b/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path @@ -0,0 +1,34 @@ +From 0be0223422e6e5f4091c6e4e058d213623eed105 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 12 Sep 2016 14:40:44 +0200 +Subject: [PATCH] Skip preprocessor symbol only CURL_STRICTER +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +CURL_STRICTER leaked into curl-constants.c when building against +curl-7.50.2. This is a preprocessor only macro without a value. + +CPAN RT#117793 + +Signed-off-by: Petr Písař +--- + Makefile.PL | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.PL b/Makefile.PL +index f9170bb..ad2bd3d 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -127,7 +127,7 @@ if (!defined($curl_h)) { + close H; + + for my $e (sort @syms) { +- if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) { ++ if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/) { + next; + } + my ($group) = $e =~ m/^([^_]+_)/; +-- +2.7.4 + diff --git a/lang/perl-www-curl/patches/200-fix_default_lflags.patch b/lang/perl-www-curl/patches/200-fix_default_lflags.patch new file mode 100644 index 0000000..f51eaf5 --- /dev/null +++ b/lang/perl-www-curl/patches/200-fix_default_lflags.patch @@ -0,0 +1,11 @@ +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -39,7 +39,7 @@ repository 'http://github.com/szbalint/ + #print "The version is $version\n"; + + my @includes = qw(); +-my ($cflags,$lflags, $ldflags) = ('','',''); ++my ($cflags,$lflags, $ldflags) = ('','-lcurl',''); + + # You may need to specify where to find curl.h on your platform + # These are guesses only, in case curl-config is not telling us. diff --git a/lang/perl-xml-parser/Makefile b/lang/perl-xml-parser/Makefile index e5d3b2c..57977c1 100644 --- a/lang/perl-xml-parser/Makefile +++ b/lang/perl-xml-parser/Makefile @@ -25,8 +25,8 @@ HOST_BUILD_DEPENDS:=perl/host expat/host EXPAT_LIBPATH:=$(STAGING_DIR)/usr/lib EXPAT_INCPATH=$(STAGING_DIR)/usr/include -HOST_EXPAT_LIBPATH:=$(STAGING_DIR)/host/lib -HOST_EXPAT_INCPATH=$(STAGING_DIR)/host/include +HOST_EXPAT_LIBPATH:=$(STAGING_DIR_HOSTPKG)/lib +HOST_EXPAT_INCPATH=$(STAGING_DIR_HOSTPKG)/include include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk diff --git a/lang/perl/Config.in b/lang/perl/Config.in index 14aedc2..65a3a47 100644 --- a/lang/perl/Config.in +++ b/lang/perl/Config.in @@ -17,4 +17,15 @@ config PERL_TESTS Test support is still in development. Some tests will fail, others are just missing completely. +config PERL_NOCOMMENT + bool "Strip comments and pod sections from modules" + default y + help + Remove comments and pod sections for all perl packages. + + This will descrease the size of perl libraries moderately. + + Stripping occasionally gets confused and mangles valid code, + so disable this option if you're not pressed for space. + endmenu diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 7c7f10d..d3cb081 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl PKG_VERSION:=5.22.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \ http://www.cpan.org/src/5.0 \ @@ -24,7 +24,8 @@ PKG_MD5SUM:=19295bbb775a3c36123161b9bf4892f1 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl PKG_LICENSE_FILES:=Copying Artistic README -PKG_MAINTAINER:=Marcel Denia +PKG_MAINTAINER:=Marcel Denia , \ + Philip Prindeville # Build settings PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION) @@ -35,7 +36,7 @@ PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 # Variables used during configuration/build -HOST_PERL_PREFIX:=$(STAGING_DIR)/host/usr +HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr # Filter -g3, it will break Compress-Raw-Zlib TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS)) diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index c64942f..be56608 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -4,12 +4,12 @@ PERL_VERSION:=5.22 # Build environment -HOST_PERL_PREFIX:=$(STAGING_DIR)/host/usr +HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr ifneq ($(CONFIG_USE_GLIBC),) EXTRA_LIBS:=bsd EXTRA_LIBDIRS:=$(STAGING_DIR)/lib endif -PERL_CMD:=$(STAGING_DIR)/host/usr/bin/perl$(PERL_VERSION).0 +PERL_CMD:=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION).0 MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) ifdef CONFIG_PERL_THREADS @@ -26,7 +26,7 @@ define perlmod/host/relink rm -f $(1)/Makefile.aperl $(MAKE) -C $(1) perl $(CP) $(1)/perl $(PERL_CMD) - $(CP) $(1)/perl $(STAGING_DIR)/host/usr/bin/perl + $(CP) $(1)/perl $(STAGING_DIR_HOSTPKG)/usr/bin/perl endef define perlmod/host/Configure @@ -129,9 +129,7 @@ define perlmod/Install/NoStrip endef -define perlmod/Install - $(call perlmod/Install/NoStrip,$(1),$(2),$(3)) - +define perlmod/_DoStrip @echo "---> Stripping modules in: $(strip $(1))$(PERL_SITELIB)" find $(strip $(1))$(PERL_SITELIB) -name \*.pm -or -name \*.pl | \ xargs -r sed -i \ @@ -141,6 +139,12 @@ define perlmod/Install -e '/^#[^!"'"'"']/d' endef +define perlmod/Install + $(call perlmod/Install/NoStrip,$(1),$(2),$(3)) + + $(if $(CONFIG_PERL_NOCOMMENT),$(if $(PKG_LEAVE_COMMENTS),,$(call perlmod/_DoStrip,$(1),$(2),$(3)))) +endef + # You probably don't want to use this directly. Look at perlmod/InstallTests define perlmod/_InstallTests $(INSTALL_DIR) $(strip $(1)) diff --git a/lang/php7-pecl-dio/Makefile b/lang/php7-pecl-dio/Makefile index bcf32a1..9c1d52e 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.0.7 -PKG_RELEASE:=2 -PKG_MD5SUM:=a1a4df428a17dbe1ab4277b492dfa052 +PKG_VERSION:=0.0.9 +PKG_RELEASE:=1 +PKG_MD5SUM:=2c80b63fbbbaead856cb468955c14dc328d1262621b0c704b122d902053c8156 PKG_NAME:=php7-pecl-$(PECL_NAME) PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz diff --git a/lang/php7-pecl-dio/patches/0000-unify-line-endings.patch b/lang/php7-pecl-dio/patches/0000-unify-line-endings.patch deleted file mode 100644 index b6c2750..0000000 --- a/lang/php7-pecl-dio/patches/0000-unify-line-endings.patch +++ /dev/null @@ -1,3110 +0,0 @@ ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -1,659 +1,659 @@ --/* -- +----------------------------------------------------------------------+ -- | PHP Version 5 | -- +----------------------------------------------------------------------+ -- | Copyright (c) 2009 Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- | This source file is subject to version 3.0 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_0.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: Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- */ -- --#ifdef HAVE_CONFIG_H --#include "config.h" --#endif -- --#include "php.h" -- --#include "php_dio_common.h" -- --/* {{{ dio_stream_mode_to_flags -- * Convert an fopen() mode string to open() flags -- */ --static int dio_stream_mode_to_flags(const char *mode) { -- int flags = 0, ch = 0, bin = 1; -- -- switch(mode[ch++]) { -- case 'r': -- flags = 0; -- break; -- case 'w': -- flags = O_TRUNC | O_CREAT; -- break; -- case 'a': -- flags = O_APPEND | O_CREAT; -- break; -- case 'x': -- flags = O_EXCL | O_CREAT; -- break; -- } -- -- if (mode[ch] != '+') { -- bin = (mode[ch++] == 'b'); -- } -- -- if (mode[ch] == '+') { -- flags |= O_RDWR; -- } else if (flags) { -- flags |= O_WRONLY; -- } else { -- flags |= O_RDONLY; -- } -- --#if defined(_O_TEXT) && defined(O_BINARY) -- if (bin) { -- flags |= O_BINARY; -- } else { -- flags |= _O_TEXT; -- } --#endif -- -- return flags; --} --/* }}} */ -- --/* {{{ dio_data_rate_to_define -- * Converts a numeric data rate to a termios define -- */ --static int dio_data_rate_to_define(long rate, speed_t *def) { -- speed_t val; -- -- switch (rate) { -- case 0: -- val = 0; -- break; -- case 50: -- val = B50; -- break; -- case 75: -- val = B75; -- break; -- case 110: -- val = B110; -- break; -- case 134: -- val = B134; -- break; -- case 150: -- val = B150; -- break; -- case 200: -- val = B200; -- break; -- case 300: -- val = B300; -- break; -- case 600: -- val = B600; -- break; -- case 1200: -- val = B1200; -- break; -- case 1800: -- val = B1800; -- break; -- case 2400: -- val = B2400; -- break; -- case 4800: -- val = B4800; -- break; -- case 9600: -- val = B9600; -- break; -- case 19200: -- val = B19200; -- break; -- case 38400: -- val = B38400; -- break; --#ifdef B57600 -- case 57600: -- val = B57600; -- break; --#endif --#ifdef B115200 -- case 115200: -- val = B115200; -- break; --#endif --#ifdef B230400 -- case 230400: -- val = B230400; -- break; --#endif --#ifdef B460800 -- case 460800: -- val = B460800; -- break; --#endif -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} -- --/* {{{ dio_data_bits_to_define -- * Converts a number of data bits to a termios define -- */ --static int dio_data_bits_to_define(int data_bits, int *def) { -- int val; -- -- switch (data_bits) { -- case 8: -- val = CS8; -- break; -- case 7: -- val = CS7; -- break; -- case 6: -- val = CS6; -- break; -- case 5: -- val = CS5; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_stop_bits_to_define -- * Converts a number of stop bits to a termios define -- */ --static int dio_stop_bits_to_define(int stop_bits, int *def) { -- int val; -- -- switch (stop_bits) { -- case 1: -- val = 0; -- break; -- case 2: -- val = CSTOPB; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_parity_to_define -- * Converts a parity type to a termios define -- */ --static int dio_parity_to_define(int parity, int *def) { -- int val; -- -- switch (parity) { -- case 0: -- val = 0; -- break; -- case 1: -- val = PARENB | PARODD; -- break; -- case 2: -- val = PARENB; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_create_stream_data -- * Creates an initialised stream data structure. Free with efree(). -- */ --php_dio_stream_data * dio_create_stream_data(void) { -- php_dio_posix_stream_data * data = emalloc(sizeof(php_dio_posix_stream_data)); -- dio_init_stream_data(&(data->common)); -- data->fd = -1; -- data->flags = 0; -- -- return (php_dio_stream_data *)data; --} --/* }}} */ -- --/* {{{ dio_common_write -- * Writes count chars from the buffer to the stream described by the stream data. -- */ --size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count) { -- size_t ret; -- -- /* Blocking writes can be interrupted by signals etc. If -- * interrupted try again. Not sure about non-blocking -- * writes but it doesn't hurt to check. */ -- do { -- ret = write(((php_dio_posix_stream_data*)data)->fd, buf, count); -- if (ret > 0) { -- return ret; -- } -- } while (errno == EINTR); -- return 0; --} --/* }}} */ -- --#ifdef DIO_NONBLOCK --/* {{{ dio_timeval_subtract -- * Calculates the difference between two timevals returning the result in the -- * structure pointed to by diffptr. Returns -1 as error if late time is -- * earlier than early time. -- */ --static int dio_timeval_subtract(struct timeval *late, struct timeval *early, struct timeval *diff) { -- struct timeval *tmp; -- -- /* Handle negatives */ -- if (late->tv_sec < early->tv_sec) { -- return 0; -- } -- -- if ((late->tv_sec == early->tv_sec) && (late->tv_usec < early->tv_usec)) { -- return 0; -- } -- -- /* Handle any carry. If later usec is smaller than earlier usec simple -- * subtraction will result in negative value. Since usec has a maximum -- * of one second by adding another second before the subtraction the -- * result will always be positive. */ -- if (late->tv_usec < early->tv_usec) { -- late->tv_usec += 1000000; -- late->tv_sec--; -- } -- -- /* Once adjusted can just subtract values. */ -- diff->tv_sec = late->tv_sec - early->tv_sec; -- diff->tv_usec = late->tv_usec - early->tv_usec; -- -- return 1; --} --#endif -- --/* {{{ dio_common_read -- * Reads count chars to the buffer to the stream described by the stream data. -- */ --size_t dio_common_read(php_dio_stream_data *data, const char *buf, size_t count) { -- int fd = ((php_dio_posix_stream_data*)data)->fd; -- size_t ret, total = 0; -- char *ptr = (char*)buf; -- -- struct timeval timeout, timeouttmp, before, after, diff; -- fd_set rfds; -- -- if (!data->has_timeout) { -- /* Blocking reads can be interrupted by signals etc. If -- * interrupted try again. Not sure about non-blocking -- * reads but it doesn't hurt to check. */ -- do { -- ret = read(fd, (char*)ptr, count); -- if (ret > 0) { -- return ret; -- } else if (!ret) { -- data->end_of_file = 1; -- } -- } while ((errno == EINTR) && !data->end_of_file); -- return 0; -- } --#ifdef DIO_NONBLOCK -- else { -- /* Clear timed out flag */ -- data->timed_out = 0; -- -- /* The initial timeout value */ -- timeout.tv_sec = data->timeout_sec; -- timeout.tv_usec = data->timeout_usec; -- -- do { -- /* The semantics of select() are that you cannot guarantee -- * that the timeval structure passed in has not been changed by -- * the select call. So you keep a copy. */ -- timeouttmp = timeout; -- -- /* The time before we wait for data. */ -- (void) gettimeofday(&before, NULL); -- -- /* Wait for an event on our file descriptor. */ -- FD_ZERO(&rfds); -- FD_SET(fd, &rfds); -- -- ret = select(fd + 1, &rfds, NULL, NULL, &timeouttmp); -- /* An error. */ -- if ((ret < 0) && (errno != EINTR) && (errno != EAGAIN)) { -- return 0; -- } -- -- /* We have data to read. */ -- if ((ret > 0) && FD_ISSET(fd, &rfds)) { -- ret = read(fd, ptr, count); -- /* Another error */ -- if ((ret < 0) && (errno != EINTR) && (errno != EAGAIN)) { -- return 0; -- } -- -- if (ret > 0) { -- /* Got data, add it to the buffer. */ -- ptr += ret; -- total += ret; -- count -= ret; -- } else if (!ret) { -- /* This should never happen since how can we have -- * data to read at an end of file, but still -- * just in case! */ -- data->end_of_file = 1; -- break; -- } -- } -- -- /* If not timed out and not end of file and not all data read -- * calculate how long it took us and loop if we still have time -- * out time left. */ -- if (count) { -- (void) gettimeofday(&after, NULL); -- -- /* Diff the timevals */ -- (void) dio_timeval_subtract(&after, &before, &diff); -- -- /* Now adjust the timeout. */ -- if (!dio_timeval_subtract(&timeout, &diff, &timeout)) { -- /* If it errors we've run out of time. */ -- data->timed_out = 1; -- break; -- } else if (!timeout.tv_sec && !(timeout.tv_usec / 1000)) { -- /* Check for rounding issues (millisecond accuracy) */ -- data->timed_out = 1; -- break; -- } -- } -- } while (count); /* Until time out or end of file or all data read. */ -- -- return total; -- } --#endif --} --/* }}} */ -- --/* {{{ php_dio_stream_data -- * Closes the php_stream. -- */ --int dio_common_close(php_dio_stream_data *data) { -- if (close(((php_dio_posix_stream_data*)data)->fd) < 0) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_common_set_option -- * Sets/gets stream options -- */ --int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam) { -- int fd = ((php_dio_posix_stream_data*)data)->fd; -- int old_is_blocking; -- int flags; -- -- switch (option) { --#ifdef DIO_NONBLOCK -- case PHP_STREAM_OPTION_READ_TIMEOUT: -- if (ptrparam) { -- struct timeval *tv = (struct timeval*)ptrparam; -- -- flags = fcntl(fd, F_GETFL, 0); -- -- /* A timeout of zero seconds and zero microseconds disables -- any existing timeout. */ -- if (tv->tv_sec || tv->tv_usec) { -- data->timeout_sec = tv->tv_sec; -- data->timeout_usec = tv->tv_usec; -- data->has_timeout = -1; -- (void) fcntl(fd, F_SETFL, flags & ~DIO_NONBLOCK); -- } else { -- data->timeout_sec = 0; -- data->timeout_usec = 0; -- data->has_timeout = 0; -- data->timed_out = 0; -- (void) fcntl(fd, F_SETFL, flags | DIO_NONBLOCK); -- } -- -- return PHP_STREAM_OPTION_RETURN_OK; -- } else { -- return PHP_STREAM_OPTION_RETURN_ERR; -- } -- -- case PHP_STREAM_OPTION_BLOCKING: -- flags = fcntl(fd, F_GETFL, 0); -- if (value) { -- flags &= ~DIO_NONBLOCK; -- } else { -- flags |= DIO_NONBLOCK; -- } -- (void) fcntl(fd, F_SETFL, flags); -- -- old_is_blocking = data->is_blocking; -- data->is_blocking = value; -- return old_is_blocking ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; --#endif /* O_NONBLOCK */ -- -- default: -- break; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_raw_open_stream -- * Opens the underlying stream. -- */ --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- pdata->flags = dio_stream_mode_to_flags(mode); -- --#ifdef DIO_NONBLOCK -- if (!data->is_blocking || data->has_timeout) { -- pdata->flags |= DIO_NONBLOCK; -- } --#endif -- -- /* Open the file and handle any errors. */ --#ifdef DIO_HAS_FILEPERMS -- if (data->has_perms) { -- pdata->fd = open(filename, pdata->flags, (mode_t)data->perms); -- } else { -- pdata->fd = open(filename, pdata->flags); -- } --#else -- pdata->fd = open(filename, pdata->flags); --#endif -- -- if (pdata->fd < 0) { -- switch (errno) { -- case EEXIST: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -- return 0; -- default: -- return 0; -- } -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_init -- * Initialises the serial settings storing the original settings before hand. -- */ --static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- int ret = 0, data_bits_def, stop_bits_def, parity_def; -- struct termios tio; -- speed_t rate_def; -- -- if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%ld)", data->data_rate); -- return 0; -- } -- -- if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -- return 0; -- } -- -- if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -- return 0; -- } -- -- if (!dio_parity_to_define(data->parity, &parity_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -- return 0; -- } -- -- ret = tcgetattr(pdata->fd, &(pdata->oldtio)); -- if (ret < 0) { -- if ((errno == ENOTTY) || (errno == ENODEV)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a serial port or terminal!"); -- } -- return 0; -- } -- -- ret = tcgetattr(pdata->fd, &tio); -- if (ret < 0) { -- return 0; -- } -- -- if (data->canonical) { -- tio.c_iflag = IGNPAR | ICRNL; -- tio.c_oflag = 0; -- tio.c_lflag = ICANON; -- } else { -- cfmakeraw(&tio); -- } -- -- cfsetispeed(&tio, rate_def); -- cfsetospeed(&tio, rate_def); -- -- tio.c_cflag &= ~CSIZE; -- tio.c_cflag |= data_bits_def; -- tio.c_cflag &= ~CSTOPB; -- tio.c_cflag |= stop_bits_def; -- tio.c_cflag &= ~(PARENB|PARODD); -- tio.c_cflag |= parity_def; -- --#ifdef CRTSCTS -- tio.c_cflag &= ~(CLOCAL | CRTSCTS); --#else -- tio.c_cflag &= ~CLOCAL; --#endif -- if (!data->flow_control) { -- tio.c_cflag |= CLOCAL; --#ifdef CRTSCTS -- } else { -- tio.c_cflag |= CRTSCTS; --#endif -- } -- -- ret = tcsetattr(pdata->fd, TCSANOW, &tio); -- if (ret < 0) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_uninit -- * Restores the serial settings back to their original state. -- */ --int dio_serial_uninit(php_dio_stream_data *data) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- int ret; -- -- do { -- ret = tcsetattr(pdata->fd, TCSANOW, &(pdata->oldtio)); -- } while ((ret < 0) && (errno == EINTR)); -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_flush -- * Purges the serial buffers of data. -- */ --int dio_serial_purge(php_dio_stream_data *data) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- int ret; -- -- if ((pdata->flags & O_RDWR) == O_RDWR) { -- ret = tcflush(pdata->fd, TCIOFLUSH); -- } else if ((pdata->flags & O_WRONLY) == O_WRONLY) { -- ret = tcflush(pdata->fd, TCOFLUSH); -- } else if ((pdata->flags & O_RDONLY) == O_RDONLY) { -- ret = tcflush(pdata->fd, TCIFLUSH); -- } -- -- if (ret < 0) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_open_stream -- * Opens the underlying stream. -- */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -- php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -- --#ifdef O_NOCTTY -- /* We don't want a controlling TTY */ -- pdata->flags |= O_NOCTTY; --#endif -- -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -- return 0; -- } -- -- if (!dio_serial_init(data TSRMLS_CC)) { -- close(pdata->fd); -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* -- * Local variables: -- * c-basic-offset: 4 -- * tab-width: 4 -- * End: -- * vim600: fdm=marker -- * vim: sw=4 ts=4 noet -- */ -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 5 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2009 Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 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_0.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: Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include "php.h" -+ -+#include "php_dio_common.h" -+ -+/* {{{ dio_stream_mode_to_flags -+ * Convert an fopen() mode string to open() flags -+ */ -+static int dio_stream_mode_to_flags(const char *mode) { -+ int flags = 0, ch = 0, bin = 1; -+ -+ switch(mode[ch++]) { -+ case 'r': -+ flags = 0; -+ break; -+ case 'w': -+ flags = O_TRUNC | O_CREAT; -+ break; -+ case 'a': -+ flags = O_APPEND | O_CREAT; -+ break; -+ case 'x': -+ flags = O_EXCL | O_CREAT; -+ break; -+ } -+ -+ if (mode[ch] != '+') { -+ bin = (mode[ch++] == 'b'); -+ } -+ -+ if (mode[ch] == '+') { -+ flags |= O_RDWR; -+ } else if (flags) { -+ flags |= O_WRONLY; -+ } else { -+ flags |= O_RDONLY; -+ } -+ -+#if defined(_O_TEXT) && defined(O_BINARY) -+ if (bin) { -+ flags |= O_BINARY; -+ } else { -+ flags |= _O_TEXT; -+ } -+#endif -+ -+ return flags; -+} -+/* }}} */ -+ -+/* {{{ dio_data_rate_to_define -+ * Converts a numeric data rate to a termios define -+ */ -+static int dio_data_rate_to_define(long rate, speed_t *def) { -+ speed_t val; -+ -+ switch (rate) { -+ case 0: -+ val = 0; -+ break; -+ case 50: -+ val = B50; -+ break; -+ case 75: -+ val = B75; -+ break; -+ case 110: -+ val = B110; -+ break; -+ case 134: -+ val = B134; -+ break; -+ case 150: -+ val = B150; -+ break; -+ case 200: -+ val = B200; -+ break; -+ case 300: -+ val = B300; -+ break; -+ case 600: -+ val = B600; -+ break; -+ case 1200: -+ val = B1200; -+ break; -+ case 1800: -+ val = B1800; -+ break; -+ case 2400: -+ val = B2400; -+ break; -+ case 4800: -+ val = B4800; -+ break; -+ case 9600: -+ val = B9600; -+ break; -+ case 19200: -+ val = B19200; -+ break; -+ case 38400: -+ val = B38400; -+ break; -+#ifdef B57600 -+ case 57600: -+ val = B57600; -+ break; -+#endif -+#ifdef B115200 -+ case 115200: -+ val = B115200; -+ break; -+#endif -+#ifdef B230400 -+ case 230400: -+ val = B230400; -+ break; -+#endif -+#ifdef B460800 -+ case 460800: -+ val = B460800; -+ break; -+#endif -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+ -+/* {{{ dio_data_bits_to_define -+ * Converts a number of data bits to a termios define -+ */ -+static int dio_data_bits_to_define(int data_bits, int *def) { -+ int val; -+ -+ switch (data_bits) { -+ case 8: -+ val = CS8; -+ break; -+ case 7: -+ val = CS7; -+ break; -+ case 6: -+ val = CS6; -+ break; -+ case 5: -+ val = CS5; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_stop_bits_to_define -+ * Converts a number of stop bits to a termios define -+ */ -+static int dio_stop_bits_to_define(int stop_bits, int *def) { -+ int val; -+ -+ switch (stop_bits) { -+ case 1: -+ val = 0; -+ break; -+ case 2: -+ val = CSTOPB; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_parity_to_define -+ * Converts a parity type to a termios define -+ */ -+static int dio_parity_to_define(int parity, int *def) { -+ int val; -+ -+ switch (parity) { -+ case 0: -+ val = 0; -+ break; -+ case 1: -+ val = PARENB | PARODD; -+ break; -+ case 2: -+ val = PARENB; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_create_stream_data -+ * Creates an initialised stream data structure. Free with efree(). -+ */ -+php_dio_stream_data * dio_create_stream_data(void) { -+ php_dio_posix_stream_data * data = emalloc(sizeof(php_dio_posix_stream_data)); -+ dio_init_stream_data(&(data->common)); -+ data->fd = -1; -+ data->flags = 0; -+ -+ return (php_dio_stream_data *)data; -+} -+/* }}} */ -+ -+/* {{{ dio_common_write -+ * Writes count chars from the buffer to the stream described by the stream data. -+ */ -+size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count) { -+ size_t ret; -+ -+ /* Blocking writes can be interrupted by signals etc. If -+ * interrupted try again. Not sure about non-blocking -+ * writes but it doesn't hurt to check. */ -+ do { -+ ret = write(((php_dio_posix_stream_data*)data)->fd, buf, count); -+ if (ret > 0) { -+ return ret; -+ } -+ } while (errno == EINTR); -+ return 0; -+} -+/* }}} */ -+ -+#ifdef DIO_NONBLOCK -+/* {{{ dio_timeval_subtract -+ * Calculates the difference between two timevals returning the result in the -+ * structure pointed to by diffptr. Returns -1 as error if late time is -+ * earlier than early time. -+ */ -+static int dio_timeval_subtract(struct timeval *late, struct timeval *early, struct timeval *diff) { -+ struct timeval *tmp; -+ -+ /* Handle negatives */ -+ if (late->tv_sec < early->tv_sec) { -+ return 0; -+ } -+ -+ if ((late->tv_sec == early->tv_sec) && (late->tv_usec < early->tv_usec)) { -+ return 0; -+ } -+ -+ /* Handle any carry. If later usec is smaller than earlier usec simple -+ * subtraction will result in negative value. Since usec has a maximum -+ * of one second by adding another second before the subtraction the -+ * result will always be positive. */ -+ if (late->tv_usec < early->tv_usec) { -+ late->tv_usec += 1000000; -+ late->tv_sec--; -+ } -+ -+ /* Once adjusted can just subtract values. */ -+ diff->tv_sec = late->tv_sec - early->tv_sec; -+ diff->tv_usec = late->tv_usec - early->tv_usec; -+ -+ return 1; -+} -+#endif -+ -+/* {{{ dio_common_read -+ * Reads count chars to the buffer to the stream described by the stream data. -+ */ -+size_t dio_common_read(php_dio_stream_data *data, const char *buf, size_t count) { -+ int fd = ((php_dio_posix_stream_data*)data)->fd; -+ size_t ret, total = 0; -+ char *ptr = (char*)buf; -+ -+ struct timeval timeout, timeouttmp, before, after, diff; -+ fd_set rfds; -+ -+ if (!data->has_timeout) { -+ /* Blocking reads can be interrupted by signals etc. If -+ * interrupted try again. Not sure about non-blocking -+ * reads but it doesn't hurt to check. */ -+ do { -+ ret = read(fd, (char*)ptr, count); -+ if (ret > 0) { -+ return ret; -+ } else if (!ret) { -+ data->end_of_file = 1; -+ } -+ } while ((errno == EINTR) && !data->end_of_file); -+ return 0; -+ } -+#ifdef DIO_NONBLOCK -+ else { -+ /* Clear timed out flag */ -+ data->timed_out = 0; -+ -+ /* The initial timeout value */ -+ timeout.tv_sec = data->timeout_sec; -+ timeout.tv_usec = data->timeout_usec; -+ -+ do { -+ /* The semantics of select() are that you cannot guarantee -+ * that the timeval structure passed in has not been changed by -+ * the select call. So you keep a copy. */ -+ timeouttmp = timeout; -+ -+ /* The time before we wait for data. */ -+ (void) gettimeofday(&before, NULL); -+ -+ /* Wait for an event on our file descriptor. */ -+ FD_ZERO(&rfds); -+ FD_SET(fd, &rfds); -+ -+ ret = select(fd + 1, &rfds, NULL, NULL, &timeouttmp); -+ /* An error. */ -+ if ((ret < 0) && (errno != EINTR) && (errno != EAGAIN)) { -+ return 0; -+ } -+ -+ /* We have data to read. */ -+ if ((ret > 0) && FD_ISSET(fd, &rfds)) { -+ ret = read(fd, ptr, count); -+ /* Another error */ -+ if ((ret < 0) && (errno != EINTR) && (errno != EAGAIN)) { -+ return 0; -+ } -+ -+ if (ret > 0) { -+ /* Got data, add it to the buffer. */ -+ ptr += ret; -+ total += ret; -+ count -= ret; -+ } else if (!ret) { -+ /* This should never happen since how can we have -+ * data to read at an end of file, but still -+ * just in case! */ -+ data->end_of_file = 1; -+ break; -+ } -+ } -+ -+ /* If not timed out and not end of file and not all data read -+ * calculate how long it took us and loop if we still have time -+ * out time left. */ -+ if (count) { -+ (void) gettimeofday(&after, NULL); -+ -+ /* Diff the timevals */ -+ (void) dio_timeval_subtract(&after, &before, &diff); -+ -+ /* Now adjust the timeout. */ -+ if (!dio_timeval_subtract(&timeout, &diff, &timeout)) { -+ /* If it errors we've run out of time. */ -+ data->timed_out = 1; -+ break; -+ } else if (!timeout.tv_sec && !(timeout.tv_usec / 1000)) { -+ /* Check for rounding issues (millisecond accuracy) */ -+ data->timed_out = 1; -+ break; -+ } -+ } -+ } while (count); /* Until time out or end of file or all data read. */ -+ -+ return total; -+ } -+#endif -+} -+/* }}} */ -+ -+/* {{{ php_dio_stream_data -+ * Closes the php_stream. -+ */ -+int dio_common_close(php_dio_stream_data *data) { -+ if (close(((php_dio_posix_stream_data*)data)->fd) < 0) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_common_set_option -+ * Sets/gets stream options -+ */ -+int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam) { -+ int fd = ((php_dio_posix_stream_data*)data)->fd; -+ int old_is_blocking; -+ int flags; -+ -+ switch (option) { -+#ifdef DIO_NONBLOCK -+ case PHP_STREAM_OPTION_READ_TIMEOUT: -+ if (ptrparam) { -+ struct timeval *tv = (struct timeval*)ptrparam; -+ -+ flags = fcntl(fd, F_GETFL, 0); -+ -+ /* A timeout of zero seconds and zero microseconds disables -+ any existing timeout. */ -+ if (tv->tv_sec || tv->tv_usec) { -+ data->timeout_sec = tv->tv_sec; -+ data->timeout_usec = tv->tv_usec; -+ data->has_timeout = -1; -+ (void) fcntl(fd, F_SETFL, flags & ~DIO_NONBLOCK); -+ } else { -+ data->timeout_sec = 0; -+ data->timeout_usec = 0; -+ data->has_timeout = 0; -+ data->timed_out = 0; -+ (void) fcntl(fd, F_SETFL, flags | DIO_NONBLOCK); -+ } -+ -+ return PHP_STREAM_OPTION_RETURN_OK; -+ } else { -+ return PHP_STREAM_OPTION_RETURN_ERR; -+ } -+ -+ case PHP_STREAM_OPTION_BLOCKING: -+ flags = fcntl(fd, F_GETFL, 0); -+ if (value) { -+ flags &= ~DIO_NONBLOCK; -+ } else { -+ flags |= DIO_NONBLOCK; -+ } -+ (void) fcntl(fd, F_SETFL, flags); -+ -+ old_is_blocking = data->is_blocking; -+ data->is_blocking = value; -+ return old_is_blocking ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; -+#endif /* O_NONBLOCK */ -+ -+ default: -+ break; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_raw_open_stream -+ * Opens the underlying stream. -+ */ -+int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ pdata->flags = dio_stream_mode_to_flags(mode); -+ -+#ifdef DIO_NONBLOCK -+ if (!data->is_blocking || data->has_timeout) { -+ pdata->flags |= DIO_NONBLOCK; -+ } -+#endif -+ -+ /* Open the file and handle any errors. */ -+#ifdef DIO_HAS_FILEPERMS -+ if (data->has_perms) { -+ pdata->fd = open(filename, pdata->flags, (mode_t)data->perms); -+ } else { -+ pdata->fd = open(filename, pdata->flags); -+ } -+#else -+ pdata->fd = open(filename, pdata->flags); -+#endif -+ -+ if (pdata->fd < 0) { -+ switch (errno) { -+ case EEXIST: -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -+ return 0; -+ default: -+ return 0; -+ } -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_init -+ * Initialises the serial settings storing the original settings before hand. -+ */ -+static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ int ret = 0, data_bits_def, stop_bits_def, parity_def; -+ struct termios tio; -+ speed_t rate_def; -+ -+ if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%ld)", data->data_rate); -+ return 0; -+ } -+ -+ if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -+ return 0; -+ } -+ -+ if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -+ return 0; -+ } -+ -+ if (!dio_parity_to_define(data->parity, &parity_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -+ return 0; -+ } -+ -+ ret = tcgetattr(pdata->fd, &(pdata->oldtio)); -+ if (ret < 0) { -+ if ((errno == ENOTTY) || (errno == ENODEV)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a serial port or terminal!"); -+ } -+ return 0; -+ } -+ -+ ret = tcgetattr(pdata->fd, &tio); -+ if (ret < 0) { -+ return 0; -+ } -+ -+ if (data->canonical) { -+ tio.c_iflag = IGNPAR | ICRNL; -+ tio.c_oflag = 0; -+ tio.c_lflag = ICANON; -+ } else { -+ cfmakeraw(&tio); -+ } -+ -+ cfsetispeed(&tio, rate_def); -+ cfsetospeed(&tio, rate_def); -+ -+ tio.c_cflag &= ~CSIZE; -+ tio.c_cflag |= data_bits_def; -+ tio.c_cflag &= ~CSTOPB; -+ tio.c_cflag |= stop_bits_def; -+ tio.c_cflag &= ~(PARENB|PARODD); -+ tio.c_cflag |= parity_def; -+ -+#ifdef CRTSCTS -+ tio.c_cflag &= ~(CLOCAL | CRTSCTS); -+#else -+ tio.c_cflag &= ~CLOCAL; -+#endif -+ if (!data->flow_control) { -+ tio.c_cflag |= CLOCAL; -+#ifdef CRTSCTS -+ } else { -+ tio.c_cflag |= CRTSCTS; -+#endif -+ } -+ -+ ret = tcsetattr(pdata->fd, TCSANOW, &tio); -+ if (ret < 0) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_uninit -+ * Restores the serial settings back to their original state. -+ */ -+int dio_serial_uninit(php_dio_stream_data *data) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ int ret; -+ -+ do { -+ ret = tcsetattr(pdata->fd, TCSANOW, &(pdata->oldtio)); -+ } while ((ret < 0) && (errno == EINTR)); -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_flush -+ * Purges the serial buffers of data. -+ */ -+int dio_serial_purge(php_dio_stream_data *data) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ int ret; -+ -+ if ((pdata->flags & O_RDWR) == O_RDWR) { -+ ret = tcflush(pdata->fd, TCIOFLUSH); -+ } else if ((pdata->flags & O_WRONLY) == O_WRONLY) { -+ ret = tcflush(pdata->fd, TCOFLUSH); -+ } else if ((pdata->flags & O_RDONLY) == O_RDONLY) { -+ ret = tcflush(pdata->fd, TCIFLUSH); -+ } -+ -+ if (ret < 0) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_open_stream -+ * Opens the underlying stream. -+ */ -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; -+ -+#ifdef O_NOCTTY -+ /* We don't want a controlling TTY */ -+ pdata->flags |= O_NOCTTY; -+#endif -+ -+ if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ return 0; -+ } -+ -+ if (!dio_serial_init(data TSRMLS_CC)) { -+ close(pdata->fd); -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* -+ * Local variables: -+ * c-basic-offset: 4 -+ * tab-width: 4 -+ * End: -+ * vim600: fdm=marker -+ * vim: sw=4 ts=4 noet -+ */ ---- a/dio_win32.c -+++ b/dio_win32.c -@@ -1,759 +1,759 @@ --/* -- +----------------------------------------------------------------------+ -- | PHP Version 5 | -- +----------------------------------------------------------------------+ -- | Copyright (c) 2009 Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- | This source file is subject to version 3.0 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_0.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: Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- */ -- --#ifdef HAVE_CONFIG_H --#include "config.h" --#endif -- --#include "php.h" --#include "php_dio_common.h" -- --#ifndef ZEND_WIN32 --#error ZEND_WIN32 not defined! --#endif -- --/* {{{ dio_last_error_php_error -- * Generates a PHP error message based upon the last Windows error. -- */ --static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { -- LPVOID msgbuf; -- DWORD msgbuflen; -- char * errmsg; -- DWORD err; -- --#ifdef UNICODE -- DWORD errmsglen; --#endif -- -- err = GetLastError(); -- msgbuflen = FormatMessage( -- FORMAT_MESSAGE_ALLOCATE_BUFFER| -- FORMAT_MESSAGE_FROM_SYSTEM| -- FORMAT_MESSAGE_IGNORE_INSERTS, -- NULL, -- err, -- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), -- (LPTSTR)&msgbuf, -- 0, -- NULL); -- --#ifdef UNICODE -- -- /* Get the length of the converted message */ -- errmsglen = WideCharToMultibyte( -- CP_ACP, -- 0 -- (LPCWSTR)msgbuf, -- -1, -- (LPSTR)errmsg, -- 0, -- NULL, -- NULL); -- -- /* Allocate a buffer */ -- errmsg = emalloc(errmsglen); -- if (!errmsg) { -- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Out of memory in dio_last_error_php_error()!"); -- LocalFree(msgbuf); -- return; -- } -- -- /* Convert the message */ -- errmsglen = WideCharToMultibyte( -- CP_ACP, -- 0 -- (LPCWSTR)msgbuf, -- -1, -- (LPSTR)errmsg, -- errmsglen, -- NULL, -- NULL); -- --#else -- errmsg = (char *)msgbuf; --#endif -- -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s[ERROR %d] %s", message, err, errmsg); -- -- LocalFree(msgbuf); --#ifdef UNICODE -- efree(errmsg); --#endif --} -- --/* {{{ dio_data_rate_to_define -- * Converts a numeric data rate to a termios define -- */ --static int dio_data_rate_to_define(long rate, DWORD *def) { -- switch (rate) { -- case 75: -- case 110: -- case 134: -- case 150: -- case 300: -- case 600: -- case 1200: -- case 1800: -- case 2400: -- case 4800: -- case 7200: -- case 9600: -- case 14400: -- case 19200: -- case 38400: -- case 57600: -- case 115200: -- case 56000: -- case 128000: -- case 256000: -- break; -- default: -- return 0; -- } -- -- *def = (DWORD)rate; -- return 1; --} --/* }}} */ -- -- --/* {{{ dio_data_bits_to_define -- * Converts a number of data bits to a termios define -- */ --static int dio_data_bits_to_define(int data_bits, DWORD *def) { -- switch (data_bits) { -- case 8: -- case 7: -- case 6: -- case 5: -- case 4: -- break; -- default: -- return 0; -- } -- -- *def = (DWORD)data_bits; -- return 1; --} --/* }}} */ -- --/* {{{ dio_stop_bits_to_define -- * Converts a number of stop bits to a termios define -- */ --static int dio_stop_bits_to_define(int stop_bits, DWORD *def) { -- DWORD val; -- -- switch (stop_bits) { -- case 1: -- val = ONESTOPBIT; -- break; -- case 2: -- val = TWOSTOPBITS; -- break; -- case 3: -- val = ONE5STOPBITS; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_parity_to_define -- * Converts a parity type to a termios define -- */ --static int dio_parity_to_define(int parity, DWORD *def) { -- DWORD val; -- -- switch (parity) { -- case 0: -- val = NOPARITY; -- break; -- case 1: -- val = ODDPARITY; -- break; -- case 2: -- val = EVENPARITY; -- break; -- default: -- return 0; -- } -- -- *def = val; -- return 1; --} --/* }}} */ -- --/* {{{ dio_create_stream_data -- * Creates an initialised stream data structure. Free with efree(). -- */ --php_dio_stream_data * dio_create_stream_data(void) { -- php_dio_win32_stream_data * data = emalloc(sizeof(php_dio_win32_stream_data)); -- memset(data, 0, sizeof(php_dio_win32_stream_data)); -- dio_init_stream_data(&(data->common)); -- data->handle = INVALID_HANDLE_VALUE; -- data->desired_access = 0; -- data->creation_disposition = 0; -- data->olddcb.DCBlength = sizeof(DCB); -- -- return (php_dio_stream_data *)data; --} --/* }}} */ -- --/* {{{ dio_common_write -- * Writes count chars from the buffer to the stream described by the stream data. -- */ --size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- DWORD total = 0; -- -- if (WriteFile(wdata->handle, buf, (DWORD)count, &total, NULL)) { -- return (size_t)total; -- } -- -- return 0; --} --/* }}} */ -- --/* {{{ dio_buffer_read -- * Reads any available chars from the canonical buffer. -- */ --static size_t dio_buffer_read(php_dio_win32_stream_data *wdata, const char *buf, size_t count) { -- php_dio_win32_canon_data *canon_data = wdata->canon_data; -- size_t total = 0; -- -- /* Read always follows write. I.e. if read ptr > write ptr buffer has -- wrapped and so we need to copy two blocks of data. */ -- if (canon_data->read_pos > canon_data->write_pos) { -- -- /* Check we actually need to copy both blocks */ -- if ((canon_data->size - canon_data->read_pos) > count) { -- -- /* No we don't. Just copy as much as we were asked for. */ -- memcpy((char*)buf, -- &(canon_data->buf[canon_data->read_pos]), -- count); -- /* Update the read pointer. */ -- canon_data->read_pos += count; -- -- /* Return the amount read. */ -- return count; -- } else { -- -- /* We need to copy both blocks so copy data up to the end of -- the buffer. */ -- total = canon_data->size - canon_data->read_pos; -- memcpy((char*)buf, -- &(canon_data->buf[canon_data->read_pos]), -- total); -- canon_data->read_pos = 0; -- count -= total; -- -- /* Now copy the data from the start of the buffer either up -- count or the number of bytes in the buffer. */ -- -- if (canon_data->write_pos > count) { -- memcpy((char*)buf, canon_data->buf, count); -- canon_data->read_pos = count; -- total += count; -- -- return total; -- } else { -- memcpy((char*)buf, canon_data->buf, canon_data->write_pos); -- canon_data->read_pos = canon_data->write_pos; -- total += canon_data->write_pos; -- -- return total; -- } -- } -- -- /* Else if write follows read. This is a simpler case. We just copy -- either all the data buffered or count, which ever is smaller. */ -- } else if (canon_data->write_pos > canon_data->read_pos) { -- if ((canon_data->write_pos - canon_data->read_pos) > count) { -- memcpy((char*)buf, -- &(canon_data->buf[canon_data->read_pos]), -- count); -- canon_data->read_pos += count; -- -- return count; -- } else { -- total = canon_data->write_pos - canon_data->read_pos; -- memcpy((char*)buf, -- &(canon_data->buf[canon_data->read_pos]), -- total); -- canon_data->read_pos += total; -- -- return total; -- } -- } -- -- /* Else we need to read more data from the data port. */ -- return 0; --} -- --/* {{{ dio_com_read -- * Read chars from the data port. -- */ --static size_t dio_com_read(php_dio_stream_data *data, const char *buf, size_t count) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- DWORD err, total = 0; -- -- if (ReadFile(wdata->handle, (void*)buf, (DWORD)count, &total, NULL)) { -- -- if (total) { -- return (size_t)total; -- } -- -- data->end_of_file = 1; -- } -- -- if (!data->end_of_file) { -- err = GetLastError(); -- -- if (ERROR_HANDLE_EOF == err) { -- data->end_of_file = 1; -- } -- } -- -- return 0; --} -- --/* {{{ dio_canonical_read -- * Reads chars from the input stream until the internal buffer is full or a new -- * line is reached. -- */ --static size_t dio_canonical_read(php_dio_win32_stream_data *wdata, const char *buf, size_t count) { -- php_dio_win32_canon_data *canon_data = wdata->canon_data; -- size_t total = 0; -- char ch; -- -- /* See if there's any buffered data and copy it. */ -- total = dio_buffer_read(wdata, buf, count); -- if (total) { -- return total; -- } -- -- /* Need to read more data from the data port. Buffer should be empty(er) -- by now. */ -- do { -- /* Is the buffer full? */ -- if (((canon_data->write_pos + 1) % canon_data->size) == -- canon_data->read_pos) { -- break; -- } -- -- /* Read a byte from the input checking for EOF. */ -- if (!dio_com_read((php_dio_stream_data*)wdata, &ch, 1)) { -- break; -- } -- -- /* Translate CR to newlines (same as ICRNL in POSIX) */ -- ch = (ch != '\r') ? ch : '\n'; -- -- /* We read a character! So buffer it. */ -- canon_data->buf[canon_data->write_pos++] = ch; -- if (canon_data->write_pos >= canon_data->size) { -- canon_data->write_pos = 0; -- } -- -- /* End of line/input (^D)? */ -- } while ((ch != '\n') && (ch != 0x04)); -- -- return dio_buffer_read(wdata, buf, count); --} --/* }}} */ -- --/* {{{ dio_common_read -- * Reads count chars to the buffer to the stream described by the stream data. -- */ --size_t dio_common_read(php_dio_stream_data *data, const char *buf, size_t count) { -- -- /* You ask for no bytes you'll get none :-) */ -- if (!count) { -- return 0; -- } -- -- if (data->canonical) { -- return dio_canonical_read((php_dio_win32_stream_data*)data, buf, count); -- } else { -- return dio_com_read(data, buf, count); -- } --} --/* }}} */ -- --/* {{{ php_dio_stream_data -- * Closes the php_stream. -- */ --int dio_common_close(php_dio_stream_data *data) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- -- if (data->canonical) { -- efree(wdata->canon_data); -- } -- -- if (!CloseHandle(wdata->handle)) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_common_set_option -- * Sets/gets stream options -- */ --int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam) { -- COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; -- int old_is_blocking = 0; -- -- /* Can't do timeouts or non blocking with raw windows streams :-( */ -- if (DIO_STREAM_TYPE_SERIAL == data->stream_type) { -- switch (option) { -- case PHP_STREAM_OPTION_BLOCKING: -- old_is_blocking = data->is_blocking; -- data->is_blocking = value ? 1 : 0; -- -- /* Only change values if we need to change them. */ -- if (data->is_blocking != old_is_blocking) { -- /* If we're not blocking but don't have a timeout -- set to return immediately */ -- if (!data->is_blocking && !data->has_timeout) { -- cto.ReadIntervalTimeout = MAXDWORD; -- } -- -- /* If we have a timeout ignore the blocking and set -- the total time in which to read the data */ -- if (data->has_timeout) { -- cto.ReadIntervalTimeout = MAXDWORD; -- cto.ReadTotalTimeoutMultiplier = MAXDWORD; -- cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -- (data->timeout_sec * 1000); -- } -- -- if (!SetCommTimeouts(((php_dio_win32_stream_data*)data)->handle, &cto)) { -- return PHP_STREAM_OPTION_RETURN_ERR; -- } -- } -- return old_is_blocking ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; -- -- case PHP_STREAM_OPTION_READ_TIMEOUT: -- if (ptrparam) { -- /* struct timeval is supported with PHP_WIN32 defined. */ -- struct timeval *tv = (struct timeval*)ptrparam; -- -- /* A timeout of zero seconds and zero microseconds disables -- any existing timeout. */ -- if (tv->tv_sec || tv->tv_usec) { -- data->timeout_sec = tv->tv_sec; -- data->timeout_usec = tv->tv_usec; -- data->has_timeout = -1; -- -- cto.ReadIntervalTimeout = MAXDWORD; -- cto.ReadTotalTimeoutMultiplier = MAXDWORD; -- cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -- (data->timeout_sec * 1000); -- } else { -- data->timeout_sec = 0; -- data->timeout_usec = 0; -- data->has_timeout = 0; -- data->timed_out = 0; -- -- /* If we're not blocking but don't have a timeout -- set to return immediately */ -- if (!data->is_blocking) { -- cto.ReadIntervalTimeout = MAXDWORD; -- } -- } -- -- if (!SetCommTimeouts(((php_dio_win32_stream_data*)data)->handle, &cto)) { -- return PHP_STREAM_OPTION_RETURN_ERR; -- } else { -- return PHP_STREAM_OPTION_RETURN_OK; -- } -- } else { -- return PHP_STREAM_OPTION_RETURN_ERR; -- } -- -- default: -- break; -- } -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_raw_open_stream -- * Opens the underlying stream. -- */ --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- DWORD err; -- -- switch(*mode) { -- case 'r': -- wdata->creation_disposition = OPEN_EXISTING; -- break; -- case 'w': -- wdata->creation_disposition = TRUNCATE_EXISTING; -- break; -- case 'a': -- wdata->creation_disposition = OPEN_ALWAYS; -- break; -- case 'x': -- wdata->creation_disposition = CREATE_NEW; -- break; -- } -- mode ++; -- -- if (*mode && (*mode != '+')) { -- mode++; -- } -- -- if (*mode && (*mode == '+')) { -- wdata->desired_access = GENERIC_READ | GENERIC_WRITE; -- } else if (OPEN_EXISTING == wdata->creation_disposition) { -- wdata->desired_access = GENERIC_READ; -- } else { -- wdata->desired_access = GENERIC_WRITE; -- } -- -- wdata->handle = CreateFile(filename, wdata->desired_access, 0, -- NULL, wdata->creation_disposition, FILE_ATTRIBUTE_NORMAL, NULL); -- if (INVALID_HANDLE_VALUE == wdata->handle) { -- err = GetLastError(); -- switch (err) { -- case ERROR_FILE_EXISTS: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -- return 0; -- -- case ERROR_FILE_NOT_FOUND: -- /* ERROR_FILE_NOT_FOUND with TRUNCATE_EXISTING means that -- * the file doesn't exist so now try to create it. */ -- if (TRUNCATE_EXISTING == wdata->creation_disposition) { -- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "File does not exist, creating new file!"); -- -- wdata->handle = CreateFile(filename, wdata->desired_access, 0, -- NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); -- if (INVALID_HANDLE_VALUE == wdata->handle) { -- dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -- return 0; -- } -- } else { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File not found!"); -- return 0; -- } -- break; -- -- default: -- dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -- return 0; -- } -- } -- -- /* If canonical allocate the canonical buffer. */ -- if (data->canonical) { -- wdata->canon_data = emalloc(sizeof(php_dio_win32_canon_data)); -- memset(wdata->canon_data, 0, sizeof(php_dio_win32_canon_data)); -- wdata->canon_data->size = DIO_WIN32_CANON_BUF_SIZE; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_init -- * Initialises the serial port -- */ --static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- DWORD rate_def, data_bits_def, stop_bits_def, parity_def; -- DCB dcb; -- -- if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%d)", data->data_rate); -- return 0; -- } -- -- if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -- return 0; -- } -- -- if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -- return 0; -- } -- -- if (!dio_parity_to_define(data->parity, &parity_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -- return 0; -- } -- -- if (!GetCommState(wdata->handle, &(wdata->olddcb))) { -- dio_last_error_php_error(E_WARNING, "GetCommState() failed:" TSRMLS_CC); -- return 0; -- } -- -- /* Init the DCB structure */ -- memset(&dcb, 0, sizeof(DCB)); -- dcb.DCBlength = sizeof(DCB); -- -- /* Set the communication parameters */ -- dcb.fBinary = 1; -- dcb.BaudRate = rate_def; -- dcb.ByteSize = (BYTE)data_bits_def; -- dcb.StopBits = (BYTE)stop_bits_def; -- dcb.Parity = (BYTE)parity_def; -- -- /* Set the control line parameters */ -- dcb.fDtrControl = DTR_CONTROL_DISABLE; -- dcb.fDsrSensitivity = FALSE; -- dcb.fOutxDsrFlow = FALSE; -- dcb.fTXContinueOnXoff = FALSE; -- dcb.fOutX = FALSE; -- dcb.fInX = FALSE; -- dcb.fErrorChar = FALSE; -- dcb.fNull = FALSE; -- dcb.fAbortOnError = FALSE; -- -- /* Hardware flow control */ -- if (data->flow_control) { -- dcb.fOutxCtsFlow = TRUE; -- dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; -- } else { -- dcb.fOutxCtsFlow = FALSE; -- dcb.fRtsControl = RTS_CONTROL_DISABLE; -- } -- -- if (!SetCommState(wdata->handle, &dcb)) { -- dio_last_error_php_error(E_WARNING, "SetCommState() failed:" TSRMLS_CC); -- return 0; -- } -- -- return 1; --} --/* }}} */ -- -- --/* {{{ dio_serial_uninit -- * Restores the serial settings back to their original state. -- */ --int dio_serial_uninit(php_dio_stream_data *data) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- -- if (!SetCommState(wdata->handle, &(wdata->olddcb))) { -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* {{{ dio_serial_flush -- * Purges the serial buffers of data. -- */ --int dio_serial_purge(php_dio_stream_data *data) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- BOOL ret; -- -- /* Purge the canonical buffer if required */ -- if (data->canonical && ((wdata->desired_access & GENERIC_READ) == GENERIC_READ)) { -- wdata->canon_data->read_pos = 0; -- wdata->canon_data->write_pos = 0; -- } -- -- /* Purge the com port */ -- if ((wdata->desired_access & (GENERIC_READ|GENERIC_WRITE)) == (GENERIC_READ|GENERIC_WRITE)) { -- ret = PurgeComm(wdata->handle, PURGE_RXCLEAR|PURGE_TXCLEAR); -- } else if ((wdata->desired_access & GENERIC_WRITE) == GENERIC_WRITE) { -- ret = PurgeComm(wdata->handle, PURGE_TXCLEAR); -- } else if ((wdata->desired_access & GENERIC_READ) == GENERIC_READ) { -- ret = PurgeComm(wdata->handle, PURGE_RXCLEAR); -- } -- -- return ret; --} --/* }}} */ -- --/* {{{ dio_serial_open_stream -- * Opens the underlying stream. -- */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -- php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -- COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; -- -- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Opening \"%s\" as a serial port (mode=\"%s\").", filename, mode); -- -- if (*mode != 'r') { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must open serial ports in read or read/write mode!"); -- return 0; -- } -- -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -- return 0; -- } -- -- if (!GetCommTimeouts(wdata->handle, &(wdata->oldcto))) { -- dio_last_error_php_error(E_WARNING, "GetCommTimeouts() failed (Not a comm port?):" TSRMLS_CC); -- CloseHandle(wdata->handle); -- return 0; -- } -- -- /* If we're not blocking but don't have a timeout -- set to return immediately */ -- if (!data->is_blocking && !data->has_timeout) { -- cto.ReadIntervalTimeout = MAXDWORD; -- } -- -- /* If we have a timeout ignore the blocking and set -- the total time in which to read the data */ -- if (data->has_timeout) { -- cto.ReadIntervalTimeout = MAXDWORD; -- cto.ReadTotalTimeoutMultiplier = MAXDWORD; -- cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -- (data->timeout_sec * 1000); -- } -- -- if (!SetCommTimeouts(wdata->handle, &cto)) { -- dio_last_error_php_error(E_WARNING, "SetCommTimeouts() failed:" TSRMLS_CC); -- CloseHandle(wdata->handle); -- return 0; -- } -- -- if (!dio_serial_init(data TSRMLS_CC)) { -- CloseHandle(wdata->handle); -- return 0; -- } -- -- return 1; --} --/* }}} */ -- --/* -- * Local variables: -- * c-basic-offset: 4 -- * tab-width: 4 -- * End: -- * vim600: fdm=marker -- * vim: sw=4 ts=4 noet -- */ -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 5 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2009 Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 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_0.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: Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include "php.h" -+#include "php_dio_common.h" -+ -+#ifndef ZEND_WIN32 -+#error ZEND_WIN32 not defined! -+#endif -+ -+/* {{{ dio_last_error_php_error -+ * Generates a PHP error message based upon the last Windows error. -+ */ -+static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { -+ LPVOID msgbuf; -+ DWORD msgbuflen; -+ char * errmsg; -+ DWORD err; -+ -+#ifdef UNICODE -+ DWORD errmsglen; -+#endif -+ -+ err = GetLastError(); -+ msgbuflen = FormatMessage( -+ FORMAT_MESSAGE_ALLOCATE_BUFFER| -+ FORMAT_MESSAGE_FROM_SYSTEM| -+ FORMAT_MESSAGE_IGNORE_INSERTS, -+ NULL, -+ err, -+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), -+ (LPTSTR)&msgbuf, -+ 0, -+ NULL); -+ -+#ifdef UNICODE -+ -+ /* Get the length of the converted message */ -+ errmsglen = WideCharToMultibyte( -+ CP_ACP, -+ 0 -+ (LPCWSTR)msgbuf, -+ -1, -+ (LPSTR)errmsg, -+ 0, -+ NULL, -+ NULL); -+ -+ /* Allocate a buffer */ -+ errmsg = emalloc(errmsglen); -+ if (!errmsg) { -+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Out of memory in dio_last_error_php_error()!"); -+ LocalFree(msgbuf); -+ return; -+ } -+ -+ /* Convert the message */ -+ errmsglen = WideCharToMultibyte( -+ CP_ACP, -+ 0 -+ (LPCWSTR)msgbuf, -+ -1, -+ (LPSTR)errmsg, -+ errmsglen, -+ NULL, -+ NULL); -+ -+#else -+ errmsg = (char *)msgbuf; -+#endif -+ -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s[ERROR %d] %s", message, err, errmsg); -+ -+ LocalFree(msgbuf); -+#ifdef UNICODE -+ efree(errmsg); -+#endif -+} -+ -+/* {{{ dio_data_rate_to_define -+ * Converts a numeric data rate to a termios define -+ */ -+static int dio_data_rate_to_define(long rate, DWORD *def) { -+ switch (rate) { -+ case 75: -+ case 110: -+ case 134: -+ case 150: -+ case 300: -+ case 600: -+ case 1200: -+ case 1800: -+ case 2400: -+ case 4800: -+ case 7200: -+ case 9600: -+ case 14400: -+ case 19200: -+ case 38400: -+ case 57600: -+ case 115200: -+ case 56000: -+ case 128000: -+ case 256000: -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = (DWORD)rate; -+ return 1; -+} -+/* }}} */ -+ -+ -+/* {{{ dio_data_bits_to_define -+ * Converts a number of data bits to a termios define -+ */ -+static int dio_data_bits_to_define(int data_bits, DWORD *def) { -+ switch (data_bits) { -+ case 8: -+ case 7: -+ case 6: -+ case 5: -+ case 4: -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = (DWORD)data_bits; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_stop_bits_to_define -+ * Converts a number of stop bits to a termios define -+ */ -+static int dio_stop_bits_to_define(int stop_bits, DWORD *def) { -+ DWORD val; -+ -+ switch (stop_bits) { -+ case 1: -+ val = ONESTOPBIT; -+ break; -+ case 2: -+ val = TWOSTOPBITS; -+ break; -+ case 3: -+ val = ONE5STOPBITS; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_parity_to_define -+ * Converts a parity type to a termios define -+ */ -+static int dio_parity_to_define(int parity, DWORD *def) { -+ DWORD val; -+ -+ switch (parity) { -+ case 0: -+ val = NOPARITY; -+ break; -+ case 1: -+ val = ODDPARITY; -+ break; -+ case 2: -+ val = EVENPARITY; -+ break; -+ default: -+ return 0; -+ } -+ -+ *def = val; -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_create_stream_data -+ * Creates an initialised stream data structure. Free with efree(). -+ */ -+php_dio_stream_data * dio_create_stream_data(void) { -+ php_dio_win32_stream_data * data = emalloc(sizeof(php_dio_win32_stream_data)); -+ memset(data, 0, sizeof(php_dio_win32_stream_data)); -+ dio_init_stream_data(&(data->common)); -+ data->handle = INVALID_HANDLE_VALUE; -+ data->desired_access = 0; -+ data->creation_disposition = 0; -+ data->olddcb.DCBlength = sizeof(DCB); -+ -+ return (php_dio_stream_data *)data; -+} -+/* }}} */ -+ -+/* {{{ dio_common_write -+ * Writes count chars from the buffer to the stream described by the stream data. -+ */ -+size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ DWORD total = 0; -+ -+ if (WriteFile(wdata->handle, buf, (DWORD)count, &total, NULL)) { -+ return (size_t)total; -+ } -+ -+ return 0; -+} -+/* }}} */ -+ -+/* {{{ dio_buffer_read -+ * Reads any available chars from the canonical buffer. -+ */ -+static size_t dio_buffer_read(php_dio_win32_stream_data *wdata, const char *buf, size_t count) { -+ php_dio_win32_canon_data *canon_data = wdata->canon_data; -+ size_t total = 0; -+ -+ /* Read always follows write. I.e. if read ptr > write ptr buffer has -+ wrapped and so we need to copy two blocks of data. */ -+ if (canon_data->read_pos > canon_data->write_pos) { -+ -+ /* Check we actually need to copy both blocks */ -+ if ((canon_data->size - canon_data->read_pos) > count) { -+ -+ /* No we don't. Just copy as much as we were asked for. */ -+ memcpy((char*)buf, -+ &(canon_data->buf[canon_data->read_pos]), -+ count); -+ /* Update the read pointer. */ -+ canon_data->read_pos += count; -+ -+ /* Return the amount read. */ -+ return count; -+ } else { -+ -+ /* We need to copy both blocks so copy data up to the end of -+ the buffer. */ -+ total = canon_data->size - canon_data->read_pos; -+ memcpy((char*)buf, -+ &(canon_data->buf[canon_data->read_pos]), -+ total); -+ canon_data->read_pos = 0; -+ count -= total; -+ -+ /* Now copy the data from the start of the buffer either up -+ count or the number of bytes in the buffer. */ -+ -+ if (canon_data->write_pos > count) { -+ memcpy((char*)buf, canon_data->buf, count); -+ canon_data->read_pos = count; -+ total += count; -+ -+ return total; -+ } else { -+ memcpy((char*)buf, canon_data->buf, canon_data->write_pos); -+ canon_data->read_pos = canon_data->write_pos; -+ total += canon_data->write_pos; -+ -+ return total; -+ } -+ } -+ -+ /* Else if write follows read. This is a simpler case. We just copy -+ either all the data buffered or count, which ever is smaller. */ -+ } else if (canon_data->write_pos > canon_data->read_pos) { -+ if ((canon_data->write_pos - canon_data->read_pos) > count) { -+ memcpy((char*)buf, -+ &(canon_data->buf[canon_data->read_pos]), -+ count); -+ canon_data->read_pos += count; -+ -+ return count; -+ } else { -+ total = canon_data->write_pos - canon_data->read_pos; -+ memcpy((char*)buf, -+ &(canon_data->buf[canon_data->read_pos]), -+ total); -+ canon_data->read_pos += total; -+ -+ return total; -+ } -+ } -+ -+ /* Else we need to read more data from the data port. */ -+ return 0; -+} -+ -+/* {{{ dio_com_read -+ * Read chars from the data port. -+ */ -+static size_t dio_com_read(php_dio_stream_data *data, const char *buf, size_t count) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ DWORD err, total = 0; -+ -+ if (ReadFile(wdata->handle, (void*)buf, (DWORD)count, &total, NULL)) { -+ -+ if (total) { -+ return (size_t)total; -+ } -+ -+ data->end_of_file = 1; -+ } -+ -+ if (!data->end_of_file) { -+ err = GetLastError(); -+ -+ if (ERROR_HANDLE_EOF == err) { -+ data->end_of_file = 1; -+ } -+ } -+ -+ return 0; -+} -+ -+/* {{{ dio_canonical_read -+ * Reads chars from the input stream until the internal buffer is full or a new -+ * line is reached. -+ */ -+static size_t dio_canonical_read(php_dio_win32_stream_data *wdata, const char *buf, size_t count) { -+ php_dio_win32_canon_data *canon_data = wdata->canon_data; -+ size_t total = 0; -+ char ch; -+ -+ /* See if there's any buffered data and copy it. */ -+ total = dio_buffer_read(wdata, buf, count); -+ if (total) { -+ return total; -+ } -+ -+ /* Need to read more data from the data port. Buffer should be empty(er) -+ by now. */ -+ do { -+ /* Is the buffer full? */ -+ if (((canon_data->write_pos + 1) % canon_data->size) == -+ canon_data->read_pos) { -+ break; -+ } -+ -+ /* Read a byte from the input checking for EOF. */ -+ if (!dio_com_read((php_dio_stream_data*)wdata, &ch, 1)) { -+ break; -+ } -+ -+ /* Translate CR to newlines (same as ICRNL in POSIX) */ -+ ch = (ch != '\r') ? ch : '\n'; -+ -+ /* We read a character! So buffer it. */ -+ canon_data->buf[canon_data->write_pos++] = ch; -+ if (canon_data->write_pos >= canon_data->size) { -+ canon_data->write_pos = 0; -+ } -+ -+ /* End of line/input (^D)? */ -+ } while ((ch != '\n') && (ch != 0x04)); -+ -+ return dio_buffer_read(wdata, buf, count); -+} -+/* }}} */ -+ -+/* {{{ dio_common_read -+ * Reads count chars to the buffer to the stream described by the stream data. -+ */ -+size_t dio_common_read(php_dio_stream_data *data, const char *buf, size_t count) { -+ -+ /* You ask for no bytes you'll get none :-) */ -+ if (!count) { -+ return 0; -+ } -+ -+ if (data->canonical) { -+ return dio_canonical_read((php_dio_win32_stream_data*)data, buf, count); -+ } else { -+ return dio_com_read(data, buf, count); -+ } -+} -+/* }}} */ -+ -+/* {{{ php_dio_stream_data -+ * Closes the php_stream. -+ */ -+int dio_common_close(php_dio_stream_data *data) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ -+ if (data->canonical) { -+ efree(wdata->canon_data); -+ } -+ -+ if (!CloseHandle(wdata->handle)) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_common_set_option -+ * Sets/gets stream options -+ */ -+int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam) { -+ COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; -+ int old_is_blocking = 0; -+ -+ /* Can't do timeouts or non blocking with raw windows streams :-( */ -+ if (DIO_STREAM_TYPE_SERIAL == data->stream_type) { -+ switch (option) { -+ case PHP_STREAM_OPTION_BLOCKING: -+ old_is_blocking = data->is_blocking; -+ data->is_blocking = value ? 1 : 0; -+ -+ /* Only change values if we need to change them. */ -+ if (data->is_blocking != old_is_blocking) { -+ /* If we're not blocking but don't have a timeout -+ set to return immediately */ -+ if (!data->is_blocking && !data->has_timeout) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ } -+ -+ /* If we have a timeout ignore the blocking and set -+ the total time in which to read the data */ -+ if (data->has_timeout) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ cto.ReadTotalTimeoutMultiplier = MAXDWORD; -+ cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -+ (data->timeout_sec * 1000); -+ } -+ -+ if (!SetCommTimeouts(((php_dio_win32_stream_data*)data)->handle, &cto)) { -+ return PHP_STREAM_OPTION_RETURN_ERR; -+ } -+ } -+ return old_is_blocking ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; -+ -+ case PHP_STREAM_OPTION_READ_TIMEOUT: -+ if (ptrparam) { -+ /* struct timeval is supported with PHP_WIN32 defined. */ -+ struct timeval *tv = (struct timeval*)ptrparam; -+ -+ /* A timeout of zero seconds and zero microseconds disables -+ any existing timeout. */ -+ if (tv->tv_sec || tv->tv_usec) { -+ data->timeout_sec = tv->tv_sec; -+ data->timeout_usec = tv->tv_usec; -+ data->has_timeout = -1; -+ -+ cto.ReadIntervalTimeout = MAXDWORD; -+ cto.ReadTotalTimeoutMultiplier = MAXDWORD; -+ cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -+ (data->timeout_sec * 1000); -+ } else { -+ data->timeout_sec = 0; -+ data->timeout_usec = 0; -+ data->has_timeout = 0; -+ data->timed_out = 0; -+ -+ /* If we're not blocking but don't have a timeout -+ set to return immediately */ -+ if (!data->is_blocking) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ } -+ } -+ -+ if (!SetCommTimeouts(((php_dio_win32_stream_data*)data)->handle, &cto)) { -+ return PHP_STREAM_OPTION_RETURN_ERR; -+ } else { -+ return PHP_STREAM_OPTION_RETURN_OK; -+ } -+ } else { -+ return PHP_STREAM_OPTION_RETURN_ERR; -+ } -+ -+ default: -+ break; -+ } -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_raw_open_stream -+ * Opens the underlying stream. -+ */ -+int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ DWORD err; -+ -+ switch(*mode) { -+ case 'r': -+ wdata->creation_disposition = OPEN_EXISTING; -+ break; -+ case 'w': -+ wdata->creation_disposition = TRUNCATE_EXISTING; -+ break; -+ case 'a': -+ wdata->creation_disposition = OPEN_ALWAYS; -+ break; -+ case 'x': -+ wdata->creation_disposition = CREATE_NEW; -+ break; -+ } -+ mode ++; -+ -+ if (*mode && (*mode != '+')) { -+ mode++; -+ } -+ -+ if (*mode && (*mode == '+')) { -+ wdata->desired_access = GENERIC_READ | GENERIC_WRITE; -+ } else if (OPEN_EXISTING == wdata->creation_disposition) { -+ wdata->desired_access = GENERIC_READ; -+ } else { -+ wdata->desired_access = GENERIC_WRITE; -+ } -+ -+ wdata->handle = CreateFile(filename, wdata->desired_access, 0, -+ NULL, wdata->creation_disposition, FILE_ATTRIBUTE_NORMAL, NULL); -+ if (INVALID_HANDLE_VALUE == wdata->handle) { -+ err = GetLastError(); -+ switch (err) { -+ case ERROR_FILE_EXISTS: -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -+ return 0; -+ -+ case ERROR_FILE_NOT_FOUND: -+ /* ERROR_FILE_NOT_FOUND with TRUNCATE_EXISTING means that -+ * the file doesn't exist so now try to create it. */ -+ if (TRUNCATE_EXISTING == wdata->creation_disposition) { -+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "File does not exist, creating new file!"); -+ -+ wdata->handle = CreateFile(filename, wdata->desired_access, 0, -+ NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); -+ if (INVALID_HANDLE_VALUE == wdata->handle) { -+ dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -+ return 0; -+ } -+ } else { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "File not found!"); -+ return 0; -+ } -+ break; -+ -+ default: -+ dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -+ return 0; -+ } -+ } -+ -+ /* If canonical allocate the canonical buffer. */ -+ if (data->canonical) { -+ wdata->canon_data = emalloc(sizeof(php_dio_win32_canon_data)); -+ memset(wdata->canon_data, 0, sizeof(php_dio_win32_canon_data)); -+ wdata->canon_data->size = DIO_WIN32_CANON_BUF_SIZE; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_init -+ * Initialises the serial port -+ */ -+static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ DWORD rate_def, data_bits_def, stop_bits_def, parity_def; -+ DCB dcb; -+ -+ if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%d)", data->data_rate); -+ return 0; -+ } -+ -+ if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -+ return 0; -+ } -+ -+ if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -+ return 0; -+ } -+ -+ if (!dio_parity_to_define(data->parity, &parity_def)) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -+ return 0; -+ } -+ -+ if (!GetCommState(wdata->handle, &(wdata->olddcb))) { -+ dio_last_error_php_error(E_WARNING, "GetCommState() failed:" TSRMLS_CC); -+ return 0; -+ } -+ -+ /* Init the DCB structure */ -+ memset(&dcb, 0, sizeof(DCB)); -+ dcb.DCBlength = sizeof(DCB); -+ -+ /* Set the communication parameters */ -+ dcb.fBinary = 1; -+ dcb.BaudRate = rate_def; -+ dcb.ByteSize = (BYTE)data_bits_def; -+ dcb.StopBits = (BYTE)stop_bits_def; -+ dcb.Parity = (BYTE)parity_def; -+ -+ /* Set the control line parameters */ -+ dcb.fDtrControl = DTR_CONTROL_DISABLE; -+ dcb.fDsrSensitivity = FALSE; -+ dcb.fOutxDsrFlow = FALSE; -+ dcb.fTXContinueOnXoff = FALSE; -+ dcb.fOutX = FALSE; -+ dcb.fInX = FALSE; -+ dcb.fErrorChar = FALSE; -+ dcb.fNull = FALSE; -+ dcb.fAbortOnError = FALSE; -+ -+ /* Hardware flow control */ -+ if (data->flow_control) { -+ dcb.fOutxCtsFlow = TRUE; -+ dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; -+ } else { -+ dcb.fOutxCtsFlow = FALSE; -+ dcb.fRtsControl = RTS_CONTROL_DISABLE; -+ } -+ -+ if (!SetCommState(wdata->handle, &dcb)) { -+ dio_last_error_php_error(E_WARNING, "SetCommState() failed:" TSRMLS_CC); -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+ -+/* {{{ dio_serial_uninit -+ * Restores the serial settings back to their original state. -+ */ -+int dio_serial_uninit(php_dio_stream_data *data) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ -+ if (!SetCommState(wdata->handle, &(wdata->olddcb))) { -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_flush -+ * Purges the serial buffers of data. -+ */ -+int dio_serial_purge(php_dio_stream_data *data) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ BOOL ret; -+ -+ /* Purge the canonical buffer if required */ -+ if (data->canonical && ((wdata->desired_access & GENERIC_READ) == GENERIC_READ)) { -+ wdata->canon_data->read_pos = 0; -+ wdata->canon_data->write_pos = 0; -+ } -+ -+ /* Purge the com port */ -+ if ((wdata->desired_access & (GENERIC_READ|GENERIC_WRITE)) == (GENERIC_READ|GENERIC_WRITE)) { -+ ret = PurgeComm(wdata->handle, PURGE_RXCLEAR|PURGE_TXCLEAR); -+ } else if ((wdata->desired_access & GENERIC_WRITE) == GENERIC_WRITE) { -+ ret = PurgeComm(wdata->handle, PURGE_TXCLEAR); -+ } else if ((wdata->desired_access & GENERIC_READ) == GENERIC_READ) { -+ ret = PurgeComm(wdata->handle, PURGE_RXCLEAR); -+ } -+ -+ return ret; -+} -+/* }}} */ -+ -+/* {{{ dio_serial_open_stream -+ * Opens the underlying stream. -+ */ -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+ php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; -+ COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; -+ -+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Opening \"%s\" as a serial port (mode=\"%s\").", filename, mode); -+ -+ if (*mode != 'r') { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must open serial ports in read or read/write mode!"); -+ return 0; -+ } -+ -+ if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ return 0; -+ } -+ -+ if (!GetCommTimeouts(wdata->handle, &(wdata->oldcto))) { -+ dio_last_error_php_error(E_WARNING, "GetCommTimeouts() failed (Not a comm port?):" TSRMLS_CC); -+ CloseHandle(wdata->handle); -+ return 0; -+ } -+ -+ /* If we're not blocking but don't have a timeout -+ set to return immediately */ -+ if (!data->is_blocking && !data->has_timeout) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ } -+ -+ /* If we have a timeout ignore the blocking and set -+ the total time in which to read the data */ -+ if (data->has_timeout) { -+ cto.ReadIntervalTimeout = MAXDWORD; -+ cto.ReadTotalTimeoutMultiplier = MAXDWORD; -+ cto.ReadTotalTimeoutConstant = (data->timeout_usec / 1000) + -+ (data->timeout_sec * 1000); -+ } -+ -+ if (!SetCommTimeouts(wdata->handle, &cto)) { -+ dio_last_error_php_error(E_WARNING, "SetCommTimeouts() failed:" TSRMLS_CC); -+ CloseHandle(wdata->handle); -+ return 0; -+ } -+ -+ if (!dio_serial_init(data TSRMLS_CC)) { -+ CloseHandle(wdata->handle); -+ return 0; -+ } -+ -+ return 1; -+} -+/* }}} */ -+ -+/* -+ * Local variables: -+ * c-basic-offset: 4 -+ * tab-width: 4 -+ * End: -+ * vim600: fdm=marker -+ * vim: sw=4 ts=4 noet -+ */ ---- a/php_dio_posix.h -+++ b/php_dio_posix.h -@@ -1,70 +1,70 @@ --/* -- +----------------------------------------------------------------------+ -- | PHP Version 5 | -- +----------------------------------------------------------------------+ -- | Copyright (c) 2009 Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- | This source file is subject to version 3.0 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_0.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: Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- */ -- --#ifndef PHP_DIO_POSIX_H_ --#define PHP_DIO_POSIX_H_ -- --#include --#include --#include --#include -- --#ifdef HAVE_UNISTD_H --#include --#endif -- --#include --#include -- -- --/** -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 5 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2009 Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 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_0.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: Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ */ -+ -+#ifndef PHP_DIO_POSIX_H_ -+#define PHP_DIO_POSIX_H_ -+ -+#include -+#include -+#include -+#include -+ -+#ifdef HAVE_UNISTD_H -+#include -+#endif -+ -+#include -+#include -+ -+ -+/** - * Detect if we can support non blocking IO. -- */ --#ifdef O_NONBLOCK --#define DIO_NONBLOCK O_NONBLOCK --#else --#ifdef O_NDELAY --#define DIO_NONBLOCK O_NDELAY --#endif --#endif -- --/** -+ */ -+#ifdef O_NONBLOCK -+#define DIO_NONBLOCK O_NONBLOCK -+#else -+#ifdef O_NDELAY -+#define DIO_NONBLOCK O_NDELAY -+#endif -+#endif -+ -+/** - * POSIXy platforms have file permissions -- */ --#define DIO_HAS_FILEPERMS -- --#include "php_dio_common_data.h" -- --typedef struct _php_dio_posix_stream_data { -- php_dio_stream_data common; -- int fd; -- int flags; -- /* Serial options */ -- struct termios oldtio; --} php_dio_posix_stream_data ; -- --#endif /* PHP_DIO_POSIX_H_ */ -- --/* -- * Local variables: -- * c-basic-offset: 4 -- * tab-width: 4 -- * End: -- * vim600: fdm=marker -- * vim: sw=4 ts=4 noet -- */ -+ */ -+#define DIO_HAS_FILEPERMS -+ -+#include "php_dio_common_data.h" -+ -+typedef struct _php_dio_posix_stream_data { -+ php_dio_stream_data common; -+ int fd; -+ int flags; -+ /* Serial options */ -+ struct termios oldtio; -+} php_dio_posix_stream_data ; -+ -+#endif /* PHP_DIO_POSIX_H_ */ -+ -+/* -+ * Local variables: -+ * c-basic-offset: 4 -+ * tab-width: 4 -+ * End: -+ * vim600: fdm=marker -+ * vim: sw=4 ts=4 noet -+ */ ---- a/php_dio_win32.h -+++ b/php_dio_win32.h -@@ -1,62 +1,62 @@ --/* -- +----------------------------------------------------------------------+ -- | PHP Version 5 | -- +----------------------------------------------------------------------+ -- | Copyright (c) 2009 Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- | This source file is subject to version 3.0 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_0.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: Melanie Rhianna Lewis | -- +----------------------------------------------------------------------+ -- */ -- --#ifndef PHP_DIO_WIN32_H_ --#define PHP_DIO_WIN32_H_ -- --#include -- --/* Windows platform can do non blocking. */ --#define DIO_NONBLOCK -- --#include "php_dio_common_data.h" -- --#define DIO_WIN32_CANON_BUF_SIZE 8192 -- --/* This is the buffer information when reading in canonical mode. Data is -- read right up to either buffer being full or a newline being read. Excess -- data will be retained in the buffer until the next read. */ --typedef struct _php_dio_win32_canon_data { -- size_t size; -- size_t read_pos; -- size_t write_pos; -- char buf[DIO_WIN32_CANON_BUF_SIZE]; -- --} php_dio_win32_canon_data; -- --typedef struct _php_dio_win32_stream_data { -- php_dio_stream_data common; -- HANDLE handle; -- DWORD desired_access; -- DWORD creation_disposition; -- DCB olddcb; -- COMMTIMEOUTS oldcto; -- php_dio_win32_canon_data *canon_data; -- --} php_dio_win32_stream_data ; -- --#endif /* PHP_DIO_WIN32_H_ */ -- --/* -- * Local variables: -- * c-basic-offset: 4 -- * tab-width: 4 -- * End: -- * vim600: fdm=marker -- * vim: sw=4 ts=4 noet -- */ -+/* -+ +----------------------------------------------------------------------+ -+ | PHP Version 5 | -+ +----------------------------------------------------------------------+ -+ | Copyright (c) 2009 Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ | This source file is subject to version 3.0 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_0.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: Melanie Rhianna Lewis | -+ +----------------------------------------------------------------------+ -+ */ -+ -+#ifndef PHP_DIO_WIN32_H_ -+#define PHP_DIO_WIN32_H_ -+ -+#include -+ -+/* Windows platform can do non blocking. */ -+#define DIO_NONBLOCK -+ -+#include "php_dio_common_data.h" -+ -+#define DIO_WIN32_CANON_BUF_SIZE 8192 -+ -+/* This is the buffer information when reading in canonical mode. Data is -+ read right up to either buffer being full or a newline being read. Excess -+ data will be retained in the buffer until the next read. */ -+typedef struct _php_dio_win32_canon_data { -+ size_t size; -+ size_t read_pos; -+ size_t write_pos; -+ char buf[DIO_WIN32_CANON_BUF_SIZE]; -+ -+} php_dio_win32_canon_data; -+ -+typedef struct _php_dio_win32_stream_data { -+ php_dio_stream_data common; -+ HANDLE handle; -+ DWORD desired_access; -+ DWORD creation_disposition; -+ DCB olddcb; -+ COMMTIMEOUTS oldcto; -+ php_dio_win32_canon_data *canon_data; -+ -+} php_dio_win32_stream_data ; -+ -+#endif /* PHP_DIO_WIN32_H_ */ -+ -+/* -+ * Local variables: -+ * c-basic-offset: 4 -+ * tab-width: 4 -+ * End: -+ * vim600: fdm=marker -+ * vim: sw=4 ts=4 noet -+ */ diff --git a/lang/php7-pecl-dio/patches/0001-fix-svn-prop.patch b/lang/php7-pecl-dio/patches/0001-fix-svn-prop.patch deleted file mode 100644 index e8a56fb..0000000 --- a/lang/php7-pecl-dio/patches/0001-fix-svn-prop.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 46d3a1ff2c6e316cf0928a9fd403cb5284bfe863 Mon Sep 17 00:00:00 2001 -From: remi -Date: Wed, 9 Oct 2013 12:04:16 +0000 -Subject: [PATCH 01/16] fix svn prop - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331748 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - dio_posix.c | 0 - dio_win32.c | 0 - php_dio_posix.h | 0 - php_dio_win32.h | 0 - 4 files changed, 0 insertions(+), 0 deletions(-) - mode change 100755 => 100644 dio_posix.c - mode change 100755 => 100644 dio_win32.c - mode change 100755 => 100644 php_dio_posix.h - mode change 100755 => 100644 php_dio_win32.h - -diff --git a/dio_posix.c b/dio_posix.c -old mode 100755 -new mode 100644 -diff --git a/dio_win32.c b/dio_win32.c -old mode 100755 -new mode 100644 -diff --git a/php_dio_posix.h b/php_dio_posix.h -old mode 100755 -new mode 100644 -diff --git a/php_dio_win32.h b/php_dio_win32.h -old mode 100755 -new mode 100644 --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0002-fix-Wunused-variable.patch b/lang/php7-pecl-dio/patches/0002-fix-Wunused-variable.patch deleted file mode 100644 index 6624174..0000000 --- a/lang/php7-pecl-dio/patches/0002-fix-Wunused-variable.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e9261081d447492e7eff3a22601b1de4f1ae550f Mon Sep 17 00:00:00 2001 -From: remi -Date: Wed, 9 Oct 2013 12:15:51 +0000 -Subject: [PATCH 02/16] fix [-Wunused-variable] - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331749 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - dio.c | 2 +- - dio_posix.c | 1 - - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/dio.c b/dio.c -index e400cf0..408a171 100644 ---- a/dio.c -+++ b/dio.c -@@ -775,7 +775,7 @@ ZEND_BEGIN_ARG_INFO_EX(dio_serial_args, 0, 0, 2) - ZEND_ARG_INFO(0, options) - ZEND_END_ARG_INFO() - --static zend_object_handlers dio_raw_object_handlers; -+// not used static zend_object_handlers dio_raw_object_handlers; - - static zend_function_entry dio_functions[] = { - /* Class functions. */ -diff --git a/dio_posix.c b/dio_posix.c -index 16fb3d6..01e1109 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -266,7 +266,6 @@ size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count - * earlier than early time. - */ - static int dio_timeval_subtract(struct timeval *late, struct timeval *early, struct timeval *diff) { -- struct timeval *tmp; - - /* Handle negatives */ - if (late->tv_sec < early->tv_sec) { --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0003-Fix-Wmaybe-uninitialized.patch b/lang/php7-pecl-dio/patches/0003-Fix-Wmaybe-uninitialized.patch deleted file mode 100644 index 21f4cff..0000000 --- a/lang/php7-pecl-dio/patches/0003-Fix-Wmaybe-uninitialized.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6cbc1651b6b6f865f9aae1e9adff73743298666f Mon Sep 17 00:00:00 2001 -From: remi -Date: Wed, 9 Oct 2013 12:18:34 +0000 -Subject: [PATCH 03/16] Fix [-Wmaybe-uninitialized] - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331750 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - dio_stream_wrappers.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c -index 844b006..811bc07 100644 ---- a/dio_stream_wrappers.c -+++ b/dio_stream_wrappers.c -@@ -228,9 +228,8 @@ PHP_FUNCTION(dio_raw) { - efree(data); - RETURN_FALSE; - } -+ php_stream_to_zval(stream, return_value); - } -- -- php_stream_to_zval(stream, return_value); - } - /* }}} */ - -@@ -390,9 +389,8 @@ PHP_FUNCTION(dio_serial) { - efree(data); - RETURN_FALSE; - } -+ php_stream_to_zval(stream, return_value); - } -- -- php_stream_to_zval(stream, return_value); - } - /* }}} */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0004-Fix-last-build-warning-Wunused-but-set-variable-sorr.patch b/lang/php7-pecl-dio/patches/0004-Fix-last-build-warning-Wunused-but-set-variable-sorr.patch deleted file mode 100644 index ba69d22..0000000 --- a/lang/php7-pecl-dio/patches/0004-Fix-last-build-warning-Wunused-but-set-variable-sorr.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1e6f98d9fb65b9c052e6d555eab573d7e5073dae Mon Sep 17 00:00:00 2001 -From: remi -Date: Wed, 9 Oct 2013 12:24:28 +0000 -Subject: [PATCH 04/16] Fix last build warning [-Wunused-but-set-variable] - (sorry for legibility...) - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331751 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - dio_posix.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/dio_posix.c b/dio_posix.c -index 01e1109..6ed8630 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -28,7 +28,10 @@ - * Convert an fopen() mode string to open() flags - */ - static int dio_stream_mode_to_flags(const char *mode) { -- int flags = 0, ch = 0, bin = 1; -+ int flags = 0, ch = 0; -+#if defined(_O_TEXT) && defined(O_BINARY) -+ int bin = 1; -+#endif - - switch(mode[ch++]) { - case 'r': -@@ -45,9 +48,11 @@ static int dio_stream_mode_to_flags(const char *mode) { - break; - } - -+#if defined(_O_TEXT) && defined(O_BINARY) - if (mode[ch] != '+') { - bin = (mode[ch++] == 'b'); - } -+#endif - - if (mode[ch] == '+') { - flags |= O_RDWR; --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0005-Added-LICENCE-file-as-requested-in-Request-65869.patch b/lang/php7-pecl-dio/patches/0005-Added-LICENCE-file-as-requested-in-Request-65869.patch deleted file mode 100644 index fc9961a..0000000 --- a/lang/php7-pecl-dio/patches/0005-Added-LICENCE-file-as-requested-in-Request-65869.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 7c85a44880d9d748e7554f8fe7448505fa86aa28 Mon Sep 17 00:00:00 2001 -From: cyberspice -Date: Sat, 12 Oct 2013 22:20:19 +0000 -Subject: [PATCH 05/16] Added LICENCE file as requested in Request #65869 - -Files added: - LICENCE - -git-svn-id: http://svn.php.net/repository/pecl/dio/trunk@331788 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - LICENSE | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 68 insertions(+) - create mode 100644 LICENSE - -diff --git a/LICENSE b/LICENSE -new file mode 100644 -index 0000000..d376afe ---- /dev/null -+++ b/LICENSE -@@ -0,0 +1,68 @@ -+-------------------------------------------------------------------- -+ The PHP License, version 3.01 -+Copyright (c) 2008 - 2013 The PHP Group. All rights reserved. -+-------------------------------------------------------------------- -+ -+Redistribution and use in source and binary forms, with or without -+modification, is permitted provided that the following conditions -+are met: -+ -+ 1. Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ -+ 2. Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in -+ the documentation and/or other materials provided with the -+ distribution. -+ -+ 3. The name "PHP" must not be used to endorse or promote products -+ derived from this software without prior written permission. For -+ written permission, please contact group@php.net. -+ -+ 4. Products derived from this software may not be called "PHP", nor -+ may "PHP" appear in their name, without prior written permission -+ from group@php.net. You may indicate that your software works in -+ conjunction with PHP by saying "Foo for PHP" instead of calling -+ it "PHP Foo" or "phpfoo" -+ -+ 5. The PHP Group may publish revised and/or new versions of the -+ license from time to time. Each version will be given a -+ distinguishing version number. -+ Once covered code has been published under a particular version -+ of the license, you may always continue to use it under the terms -+ of that version. You may also choose to use such covered code -+ under the terms of any subsequent version of the license -+ published by the PHP Group. No one other than the PHP Group has -+ the right to modify the terms applicable to covered code created -+ under this License. -+ -+ 6. Redistributions of any form whatsoever must retain the following -+ acknowledgment: -+ "This product includes PHP software, freely available from -+ ". -+ -+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND -+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP -+DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -+OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+-------------------------------------------------------------------- -+ -+This software consists of voluntary contributions made by many -+individuals on behalf of the PHP Group. -+ -+The PHP Group can be contacted via Email at group@php.net. -+ -+For more information on the PHP Group and the PHP project, -+please see . -+ -+PHP includes the Zend Engine, freely available at -+. --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0006-Replace-ZEND_FETCH_RESOURCE-macro-with-zend_fetch_re.patch b/lang/php7-pecl-dio/patches/0006-Replace-ZEND_FETCH_RESOURCE-macro-with-zend_fetch_re.patch deleted file mode 100644 index 6d9c483..0000000 --- a/lang/php7-pecl-dio/patches/0006-Replace-ZEND_FETCH_RESOURCE-macro-with-zend_fetch_re.patch +++ /dev/null @@ -1,117 +0,0 @@ -From b69e1067f70ef293587b72979193e68b01d90902 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Wed, 13 Jul 2016 00:23:29 +0200 -Subject: [PATCH 06/16] Replace ZEND_FETCH_RESOURCE macro with - zend_fetch_resource - -Signed-off-by: Michael Heimpold ---- - dio.c | 36 +++++++++++++++++++++++++++--------- - 1 file changed, 27 insertions(+), 9 deletions(-) - -diff --git a/dio.c b/dio.c -index 408a171..6b687ac 100644 ---- a/dio.c -+++ b/dio.c -@@ -161,7 +161,9 @@ PHP_FUNCTION(dio_dup) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - dfd = dup(f->fd); - if (dfd == -1) { -@@ -192,7 +194,9 @@ PHP_FUNCTION(dio_read) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - if (bytes <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0."); -@@ -233,7 +237,9 @@ PHP_FUNCTION(dio_write) - RETURN_FALSE; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - res = write(f->fd, data, trunc_len ? trunc_len : data_len); - if (res == -1) { -@@ -258,7 +264,9 @@ PHP_FUNCTION(dio_truncate) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - if (ftruncate(f->fd, offset) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "couldn't truncate %d to %ld bytes: %s", f->fd, offset, strerror(errno)); -@@ -284,7 +292,9 @@ PHP_FUNCTION(dio_stat) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - if (fstat(f->fd, &s) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot stat %d: %s", f->fd, strerror(errno)); -@@ -323,7 +333,9 @@ PHP_FUNCTION(dio_seek) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - RETURN_LONG(lseek(f->fd, offset, whence)); - } -@@ -344,7 +356,9 @@ PHP_FUNCTION(dio_fcntl) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - switch (cmd) { - case F_SETLK: -@@ -454,7 +468,9 @@ PHP_FUNCTION(dio_tcsetattr) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - if (Z_TYPE_P(arg) != IS_ARRAY) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"tcsetattr, third argument should be an associative array"); -@@ -639,7 +655,9 @@ PHP_FUNCTION(dio_close) - return; - } - -- ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); -+ if ((f = (php_fd_t *)zend_fetch_resource(Z_RES_P(r_fd), le_fd_name, le_fd)) == NULL) { -+ RETURN_FALSE; -+ } - - zend_list_delete(Z_LVAL_P(r_fd)); - } --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0007-Replace-ZEND_REGISTER_RESOURCE-with-zend_register_re.patch b/lang/php7-pecl-dio/patches/0007-Replace-ZEND_REGISTER_RESOURCE-with-zend_register_re.patch deleted file mode 100644 index c676a25..0000000 --- a/lang/php7-pecl-dio/patches/0007-Replace-ZEND_REGISTER_RESOURCE-with-zend_register_re.patch +++ /dev/null @@ -1,66 +0,0 @@ -From dbf03eb09bf1a41bcd140c4edba351121ac24729 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Wed, 13 Jul 2016 00:36:46 +0200 -Subject: [PATCH 07/16] Replace ZEND_REGISTER_RESOURCE with - zend_register_resource - -Signed-off-by: Michael Heimpold ---- - dio.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/dio.c b/dio.c -index 6b687ac..6f2d58c 100644 ---- a/dio.c -+++ b/dio.c -@@ -72,9 +72,9 @@ static int new_php_fd(php_fd_t **f, int fd) - return 1; - } - --static void _dio_close_fd(zend_rsrc_list_entry *rsrc TSRMLS_DC) -+static void _dio_close_fd(zend_resource *res) - { -- php_fd_t *f = (php_fd_t *) rsrc->ptr; -+ php_fd_t *f = (php_fd_t *)zend_fetch_resource(res, NULL, le_fd); - if (f) { - close(f->fd); - free(f); -@@ -115,7 +115,7 @@ PHP_FUNCTION(dio_open) - RETURN_FALSE; - } - -- ZEND_REGISTER_RESOURCE(return_value, f, le_fd); -+ RETVAL_RES(zend_register_resource(f, le_fd)); - } - /* }}} */ - -@@ -144,7 +144,7 @@ PHP_FUNCTION(dio_fdopen) - RETURN_FALSE; - } - -- ZEND_REGISTER_RESOURCE(return_value, f, le_fd); -+ RETVAL_RES(zend_register_resource(f, le_fd)); - } - /* }}} */ - -@@ -175,7 +175,7 @@ PHP_FUNCTION(dio_dup) - RETURN_FALSE; - } - -- ZEND_REGISTER_RESOURCE(return_value, df, le_fd); -+ RETVAL_RES(zend_register_resource(f, le_fd)); - } - /* }}} */ - #endif -@@ -434,7 +434,7 @@ PHP_FUNCTION(dio_fcntl) - if (!new_php_fd(&new_f, fcntl(f->fd, cmd, Z_LVAL_P(arg)))) { - RETURN_FALSE; - } -- ZEND_REGISTER_RESOURCE(return_value, new_f, le_fd); -+ RETVAL_RES(zend_register_resource(new_f, le_fd)); - break; - } - default: --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0008-RETURN_STRINGL-takes-only-2-arguments.patch b/lang/php7-pecl-dio/patches/0008-RETURN_STRINGL-takes-only-2-arguments.patch deleted file mode 100644 index 2197d12..0000000 --- a/lang/php7-pecl-dio/patches/0008-RETURN_STRINGL-takes-only-2-arguments.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 47422cf01f0a352c3f5f015585a28c99dba79862 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Wed, 13 Jul 2016 00:40:08 +0200 -Subject: [PATCH 08/16] RETURN_STRINGL takes only 2 arguments - -Signed-off-by: Michael Heimpold ---- - dio.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/dio.c b/dio.c -index 6f2d58c..e8660f8 100644 ---- a/dio.c -+++ b/dio.c -@@ -24,6 +24,7 @@ - #include "php.h" - #include "php_ini.h" - #include "ext/standard/info.h" -+#include "ext/standard/php_string.h" - - #include "php_dio.h" - #include "php_dio_stream_wrappers.h" -@@ -213,7 +214,7 @@ PHP_FUNCTION(dio_read) - data = erealloc(data, res + 1); - data[res] = 0; - -- RETURN_STRINGL(data, res, 0); -+ RETURN_STRINGL(data, res); - } - /* }}} */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0009-Replace-zend_hash_find-with-zend_hash_str_find.patch b/lang/php7-pecl-dio/patches/0009-Replace-zend_hash_find-with-zend_hash_str_find.patch deleted file mode 100644 index 85a8a07..0000000 --- a/lang/php7-pecl-dio/patches/0009-Replace-zend_hash_find-with-zend_hash_str_find.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 7533f64b19006262fae7c6a4769392c67078166b Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Wed, 13 Jul 2016 01:07:22 +0200 -Subject: [PATCH 09/16] Replace zend_hash_find with zend_hash_str_find - -Signed-off-by: Michael Heimpold ---- - dio.c | 44 ++++++++++++++++++++++---------------------- - 1 file changed, 22 insertions(+), 22 deletions(-) - -diff --git a/dio.c b/dio.c -index e8660f8..b489747 100644 ---- a/dio.c -+++ b/dio.c -@@ -364,7 +364,7 @@ PHP_FUNCTION(dio_fcntl) - switch (cmd) { - case F_SETLK: - case F_SETLKW: { -- zval **element; -+ zval *element; - struct flock lk = {0}; - HashTable *fh; - -@@ -374,28 +374,28 @@ PHP_FUNCTION(dio_fcntl) - } - if (Z_TYPE_P(arg) == IS_ARRAY) { - fh = HASH_OF(arg); -- if (zend_hash_find(fh, "start", sizeof("start"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "start", sizeof("start"))) == NULL) { - lk.l_start = 0; - } else { -- lk.l_start = Z_LVAL_PP(element); -+ lk.l_start = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "length", sizeof("length"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "length", sizeof("length"))) == NULL) { - lk.l_len = 0; - } else { -- lk.l_len = Z_LVAL_PP(element); -+ lk.l_len = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "whence", sizeof("whence"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "whence", sizeof("whence"))) == NULL) { - lk.l_whence = 0; - } else { -- lk.l_whence = Z_LVAL_PP(element); -+ lk.l_whence = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "type", sizeof("type"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "type", sizeof("type"))) == NULL) { - lk.l_type = 0; - } else { -- lk.l_type = Z_LVAL_PP(element); -+ lk.l_type = Z_LVAL_P(element); - } - } else if (Z_TYPE_P(arg) == IS_LONG) { - lk.l_start = 0; -@@ -463,7 +463,7 @@ PHP_FUNCTION(dio_tcsetattr) - int Baud_Rate, Data_Bits=8, Stop_Bits=1, Parity=0, Flow_Control=1, Is_Canonical=1; - long BAUD,DATABITS,STOPBITS,PARITYON,PARITY; - HashTable *fh; -- zval **element; -+ zval *element; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &r_fd, &arg) == FAILURE) { - return; -@@ -480,40 +480,40 @@ PHP_FUNCTION(dio_tcsetattr) - - fh = HASH_OF(arg); - -- if (zend_hash_find(fh, "baud", sizeof("baud"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "baud", sizeof("baud"))) == NULL) { - Baud_Rate = 9600; - } else { -- Baud_Rate = Z_LVAL_PP(element); -+ Baud_Rate = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "bits", sizeof("bits"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "bits", sizeof("bits"))) == NULL) { - Data_Bits = 8; - } else { -- Data_Bits = Z_LVAL_PP(element); -+ Data_Bits = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "stop", sizeof("stop"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "stop", sizeof("stop"))) == NULL) { - Stop_Bits = 1; - } else { -- Stop_Bits = Z_LVAL_PP(element); -+ Stop_Bits = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "parity", sizeof("parity"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "parity", sizeof("parity"))) == NULL) { - Parity = 0; - } else { -- Parity = Z_LVAL_PP(element); -+ Parity = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "flow_control", sizeof("flow_control"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "flow_control", sizeof("flow_control"))) == NULL) { - Flow_Control = 1; - } else { -- Flow_Control = Z_LVAL_PP(element); -+ Flow_Control = Z_LVAL_P(element); - } - -- if (zend_hash_find(fh, "is_canonical", sizeof("is_canonical"), (void **) &element) == FAILURE) { -+ if ((element = zend_hash_str_find(fh, "is_canonical", sizeof("is_canonical"))) == NULL) { - Is_Canonical = 0; - } else { -- Is_Canonical = Z_LVAL_PP(element); -+ Is_Canonical = Z_LVAL_P(element); - } - - /* assign to correct values... */ --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0010-Replace-dio_convert_to_long.patch b/lang/php7-pecl-dio/patches/0010-Replace-dio_convert_to_long.patch deleted file mode 100644 index b5d7b61..0000000 --- a/lang/php7-pecl-dio/patches/0010-Replace-dio_convert_to_long.patch +++ /dev/null @@ -1,240 +0,0 @@ -From fb31b1cf4da2bfd0830d0a83754f5ecb125d1c4a Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 00:38:52 +0200 -Subject: [PATCH 10/16] Replace dio_convert_to_long - -Signed-off-by: Michael Heimpold ---- - dio_common.c | 106 +++++++++++++++++++++++-------------------------------- - php_dio_common.h | 2 -- - 2 files changed, 44 insertions(+), 64 deletions(-) - -diff --git a/dio_common.c b/dio_common.c -index c50f56d..a5f4c63 100644 ---- a/dio_common.c -+++ b/dio_common.c -@@ -52,29 +52,12 @@ void dio_init_stream_data(php_dio_stream_data *data) { - } - /* }}} */ - --/* {{{ dio_convert_to_long -- * Returns as a long, the value of the zval regardless of its type. -- */ --long dio_convert_to_long(zval *val) { -- zval *copyval; -- long longval; -- -- ALLOC_INIT_ZVAL(copyval); -- *copyval = *val; -- convert_to_long(copyval); -- longval = Z_LVAL_P(copyval); -- zval_ptr_dtor(©val); -- -- return longval; --} --/* }}} */ -- - /* {{{ dio_assoc_array_get_basic_options - * Retrieves the basic open option values from an associative array - */ - void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data TSRMLS_DC) { - #if defined(DIO_HAS_FILEPERMS) || defined(DIO_NONBLOCK) -- zval **tmpzval; -+ zval *tmpzval; - HashTable *opthash; - - opthash = HASH_OF(options); -@@ -82,8 +65,8 @@ void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data - - #ifdef DIO_HAS_FILEPERMS - /* This is the file mode flags used by open(). */ -- if (zend_hash_find(opthash, "perms", sizeof("perms"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->perms = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "perms", sizeof("perms"))) != NULL) { -+ data->perms = (int)zval_get_long(tmpzval); - data->has_perms = 1; - } - #endif -@@ -91,20 +74,20 @@ void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data - #ifdef DIO_NONBLOCK - /* This sets the underlying stream to be blocking/non - block (i.e. O_NONBLOCK) */ -- if (zend_hash_find(opthash, "is_blocking", sizeof("is_blocking"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->is_blocking = dio_convert_to_long(*tmpzval) ? 1 : 0; -+ if ((tmpzval = zend_hash_str_find(opthash, "is_blocking", sizeof("is_blocking"))) != NULL) { -+ data->is_blocking = zval_get_long(tmpzval) ? 1 : 0; - } - - /* This is the timeout value for reads in seconds. Only one of - timeout_secs or timeout_usecs need be defined to define a timeout. */ -- if (zend_hash_find(opthash, "timeout_secs", sizeof("timeout_secs"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->timeout_sec = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "timeout_secs", sizeof("timeout_secs"))) != NULL) { -+ data->timeout_sec = zval_get_long(tmpzval); - } - - /* This is the timeout value for reads in microseconds. Only one of - timeout_secs or timeout_usecs need be defined to define a timeout. */ -- if (zend_hash_find(opthash, "timeout_usecs", sizeof("timeout_usecs"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->timeout_usec = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "timeout_usecs", sizeof("timeout_usecs"))) != NULL) { -+ data->timeout_usec = zval_get_long(tmpzval); - } - - data->has_timeout = (data->timeout_sec | data->timeout_usec) ? 1 : 0; -@@ -116,33 +99,33 @@ void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data - * Retrieves the serial open option values from an associative array - */ - void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data TSRMLS_DC) { -- zval **tmpzval; -+ zval *tmpzval; - HashTable *opthash; - - opthash = HASH_OF(options); - -- if (zend_hash_find(opthash, "data_rate", sizeof("data_rate"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->data_rate = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "data_rate", sizeof("data_rate"))) != NULL) { -+ data->data_rate = zval_get_long(tmpzval); - } - -- if (zend_hash_find(opthash, "data_bits", sizeof("data_bits"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->data_bits = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "data_bits", sizeof("data_bits"))) != NULL) { -+ data->data_bits = (int)zval_get_long(tmpzval); - } - -- if (zend_hash_find(opthash, "stop_bits", sizeof("stop_bits"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->stop_bits = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "stop_bits", sizeof("stop_bits"))) != NULL) { -+ data->stop_bits = (int)zval_get_long(tmpzval); - } - -- if (zend_hash_find(opthash, "parity", sizeof("parity"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->parity = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = zend_hash_str_find(opthash, "parity", sizeof("parity"))) != NULL) { -+ data->parity = (int)zval_get_long(tmpzval); - } - -- if (zend_hash_find(opthash, "flow_control", sizeof("flow_control"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->flow_control = (int)(dio_convert_to_long(*tmpzval) ? 1 : 0); -+ if ((tmpzval = zend_hash_str_find(opthash, "flow_control", sizeof("flow_control"))) != NULL) { -+ data->flow_control = zval_get_long(tmpzval) ? 1 : 0; - } - -- if (zend_hash_find(opthash, "is_canonical", sizeof("is_canonical"), (void **)&tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->canonical = (int)(dio_convert_to_long(*tmpzval) ? 1 : 0); -+ if ((tmpzval = zend_hash_str_find(opthash, "is_canonical", sizeof("is_canonical"))) != NULL) { -+ data->canonical = zval_get_long(tmpzval) ? 1 : 0; - } - } - /* }}} */ -@@ -152,13 +135,13 @@ void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data - */ - void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC) { - #if defined(DIO_HAS_FILEPERMS) || defined(DIO_NONBLOCK) -- zval **tmpzval; -+ zval *tmpzval; - #endif - - #ifdef DIO_HAS_FILEPERMS - /* This is the file mode flags used by open(). */ -- if (php_stream_context_get_option(context, "dio", "perms", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->perms = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "perms")) != NULL) { -+ data->perms = (int)zval_get_long(tmpzval); - data->has_perms = 1; - } - #endif -@@ -166,20 +149,20 @@ void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_s - #ifdef DIO_NONBLOCK - /* This sets the underlying stream to be blocking/non - block (i.e. O_NONBLOCK) */ -- if (php_stream_context_get_option(context, "dio", "is_blocking", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->is_blocking = dio_convert_to_long(*tmpzval) ? 1 : 0; -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "is_blocking")) != NULL) { -+ data->is_blocking = zval_get_long(tmpzval) ? 1 : 0; - } - - /* This is the timeout value for reads in seconds. Only one of - timeout_secs or timeout_usecs need be defined to define a timeout. */ -- if (php_stream_context_get_option(context, "dio", "timeout_secs", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->timeout_sec = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "timeout_secs")) != NULL) { -+ data->timeout_sec = zval_get_long(tmpzval); - } - - /* This is the timeout value for reads in microseconds. Only one of - timeout_secs or timeout_usecs need be defined to define a timeout. */ -- if (php_stream_context_get_option(context, "dio", "timeout_usecs", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->timeout_usec = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "timeout_usecs")) != NULL) { -+ data->timeout_usec = zval_get_long(tmpzval); - } - - data->has_timeout = (data->timeout_sec | data->timeout_usec) ? 1 : 0; -@@ -191,30 +174,30 @@ void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_s - * Extracts the option values for dio.serial mode from a context - */ - void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC) { -- zval **tmpzval; -+ zval *tmpzval; - -- if (php_stream_context_get_option(context, "dio", "data_rate", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->data_rate = dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "data_rate")) != NULL) { -+ data->data_rate = zval_get_long(tmpzval); - } - -- if (php_stream_context_get_option(context, "dio", "data_bits", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->data_bits = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "data_bits")) != NULL) { -+ data->data_bits = (int)zval_get_long(tmpzval); - } - -- if (php_stream_context_get_option(context, "dio", "stop_bits", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->stop_bits = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "stop_bits")) != NULL) { -+ data->stop_bits = (int)zval_get_long(tmpzval); - } - -- if (php_stream_context_get_option(context, "dio", "parity", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->parity = (int)dio_convert_to_long(*tmpzval); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "parity")) != NULL) { -+ data->parity = (int)zval_get_long(tmpzval); - } - -- if (php_stream_context_get_option(context, "dio", "flow_control", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->flow_control = (int)(dio_convert_to_long(*tmpzval) ? 1 : 0); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "flow_control")) != NULL) { -+ data->flow_control = zval_get_long(tmpzval) ? 1 : 0; - } - -- if (php_stream_context_get_option(context, "dio", "is_canonical", &tmpzval) == SUCCESS && tmpzval && *tmpzval) { -- data->canonical = (int)(dio_convert_to_long(*tmpzval) ? 1 : 0); -+ if ((tmpzval = php_stream_context_get_option(context, "dio", "is_canonical")) != NULL) { -+ data->canonical = zval_get_long(tmpzval) ? 1 : 0; - } - } - /* }}} */ -@@ -227,4 +210,3 @@ void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_ - * vim600: fdm=marker - * vim: sw=4 ts=4 noet - */ -- -diff --git a/php_dio_common.h b/php_dio_common.h -index f6e4d98..6b14040 100644 ---- a/php_dio_common.h -+++ b/php_dio_common.h -@@ -35,8 +35,6 @@ - #define DIO_STREAM_TYPE_RAW 1 - #define DIO_STREAM_TYPE_SERIAL 2 - --long dio_convert_to_long(zval *val); -- - php_dio_stream_data * dio_create_stream_data(void); - - void dio_init_stream_data(php_dio_stream_data *data); --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0011-Adopt-to-changed-stream-API-interface.patch b/lang/php7-pecl-dio/patches/0011-Adopt-to-changed-stream-API-interface.patch deleted file mode 100644 index dde8565..0000000 --- a/lang/php7-pecl-dio/patches/0011-Adopt-to-changed-stream-API-interface.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 3d71063ada4f1a4ef90611d263aa8e1d4f275359 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 00:50:12 +0200 -Subject: [PATCH 11/16] Adopt to changed stream API interface - -Signed-off-by: Michael Heimpold ---- - dio_posix.c | 2 +- - dio_stream_wrappers.c | 14 +++++++------- - dio_win32.c | 2 +- - php_dio_common.h | 2 +- - 4 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/dio_posix.c b/dio_posix.c -index 6ed8630..527d683 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -474,7 +474,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void - /* {{{ dio_raw_open_stream - * Opens the underlying stream. - */ --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - pdata->flags = dio_stream_mode_to_flags(mode); - -diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c -index 811bc07..817b0d1 100644 ---- a/dio_stream_wrappers.c -+++ b/dio_stream_wrappers.c -@@ -126,12 +126,12 @@ php_stream_ops dio_raw_stream_ops = { - * fopen for the dio.raw stream. - */ - static php_stream *dio_raw_fopen_wrapper(php_stream_wrapper *wrapper, -- char *path, char *mode, -- int options, char **opened_path, -- php_stream_context *context STREAMS_DC TSRMLS_DC) { -+ const char *path, const char *mode, int options, -+ zend_string **opened_path, php_stream_context *context STREAMS_DC) -+{ - php_dio_stream_data *data; - php_stream *stream; -- char *filename; -+ const char *filename; - - /* Check it was actually for us (not a corrupted function pointer - somewhere!). */ -@@ -287,9 +287,9 @@ php_stream_ops dio_serial_stream_ops = { - * fopen for the dio.raw stream. - */ - static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, -- char *path, char *mode, -- int options, char **opened_path, -- php_stream_context *context STREAMS_DC TSRMLS_DC) { -+ const char *path, const char *mode, int options, -+ zend_string **opened_path, php_stream_context *context STREAMS_DC) -+{ - php_dio_stream_data *data; - php_stream *stream; - char *filename; -diff --git a/dio_win32.c b/dio_win32.c -index e7ccedd..1023d36 100644 ---- a/dio_win32.c -+++ b/dio_win32.c -@@ -505,7 +505,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void - /* {{{ dio_raw_open_stream - * Opens the underlying stream. - */ --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { - php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; - DWORD err; - -diff --git a/php_dio_common.h b/php_dio_common.h -index 6b14040..7a75370 100644 ---- a/php_dio_common.h -+++ b/php_dio_common.h -@@ -55,7 +55,7 @@ int dio_common_close(php_dio_stream_data *data); - - int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam); - --int dio_raw_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); -+int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); - - int dio_serial_uninit(php_dio_stream_data *data); - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0012-Remove-ancient-macros-TSRMLS_CC-and-TSRMLS_DC.patch b/lang/php7-pecl-dio/patches/0012-Remove-ancient-macros-TSRMLS_CC-and-TSRMLS_DC.patch deleted file mode 100644 index c15fd89..0000000 --- a/lang/php7-pecl-dio/patches/0012-Remove-ancient-macros-TSRMLS_CC-and-TSRMLS_DC.patch +++ /dev/null @@ -1,829 +0,0 @@ -From 760ec7072cbba2cbbb6e4e17b0c54ee3c7b661a8 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 00:59:42 +0200 -Subject: [PATCH 12/16] Remove ancient macros TSRMLS_CC and TSRMLS_DC - -Signed-off-by: Michael Heimpold ---- - dio.c | 70 +++++++++++++++++++++++++-------------------------- - dio_common.c | 8 +++--- - dio_posix.c | 22 ++++++++-------- - dio_stream_wrappers.c | 48 +++++++++++++++++------------------ - dio_win32.c | 46 ++++++++++++++++----------------- - php_dio_common.h | 12 ++++----- - 6 files changed, 103 insertions(+), 103 deletions(-) - -diff --git a/dio.c b/dio.c -index b489747..7bad575 100644 ---- a/dio.c -+++ b/dio.c -@@ -93,11 +93,11 @@ PHP_FUNCTION(dio_open) - long mode = 0; - int fd; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|l", &file_name, &file_name_length, &flags, &mode) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l", &file_name, &file_name_length, &flags, &mode) == FAILURE) { - return; - } - -- if (php_check_open_basedir(file_name TSRMLS_CC) || DIO_SAFE_MODE_CHECK(file_name, "wb+")) { -+ if (php_check_open_basedir(file_name) || DIO_SAFE_MODE_CHECK(file_name, "wb+")) { - RETURN_FALSE; - } - -@@ -108,7 +108,7 @@ PHP_FUNCTION(dio_open) - } - - if (fd == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot open file %s with flags %ld and permissions %ld: %s", file_name, flags, mode, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "cannot open file %s with flags %ld and permissions %ld: %s", file_name, flags, mode, strerror(errno)); - RETURN_FALSE; - } - -@@ -130,14 +130,14 @@ PHP_FUNCTION(dio_fdopen) - long lfd; - int fd; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &lfd) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &lfd) == FAILURE) { - return; - } - - fd = (int)lfd; - - if ((fcntl(fd, F_GETFL, 0) == -1) && (errno == EBADF)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad file descriptor %d", fd); -+ php_error_docref(NULL, E_WARNING, "Bad file descriptor %d", fd); - RETURN_FALSE; - } - -@@ -158,7 +158,7 @@ PHP_FUNCTION(dio_dup) - php_fd_t *f, *df; - int dfd; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &r_fd) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &r_fd) == FAILURE) { - return; - } - -@@ -168,7 +168,7 @@ PHP_FUNCTION(dio_dup) - - dfd = dup(f->fd); - if (dfd == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot duplication file descriptor %d: %s", f->fd, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "cannot duplication file descriptor %d: %s", f->fd, strerror(errno)); - RETURN_FALSE; - } - -@@ -191,7 +191,7 @@ PHP_FUNCTION(dio_read) - long bytes = 1024; - ssize_t res; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &r_fd, &bytes) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &r_fd, &bytes) == FAILURE) { - return; - } - -@@ -200,7 +200,7 @@ PHP_FUNCTION(dio_read) - } - - if (bytes <= 0) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0."); -+ php_error_docref(NULL, E_WARNING, "Length parameter must be greater than 0."); - RETURN_FALSE; - } - -@@ -229,12 +229,12 @@ PHP_FUNCTION(dio_write) - long trunc_len = 0; - ssize_t res; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &r_fd, &data, &data_len, &trunc_len) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &r_fd, &data, &data_len, &trunc_len) == FAILURE) { - return; - } - - if (trunc_len < 0 || trunc_len > data_len) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "length must be greater or equal to zero and less then the length of the specified string."); -+ php_error_docref(NULL, E_WARNING, "length must be greater or equal to zero and less then the length of the specified string."); - RETURN_FALSE; - } - -@@ -244,7 +244,7 @@ PHP_FUNCTION(dio_write) - - res = write(f->fd, data, trunc_len ? trunc_len : data_len); - if (res == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot write data to file descriptor %d: %s", f->fd, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "cannot write data to file descriptor %d: %s", f->fd, strerror(errno)); - } - - RETURN_LONG(res); -@@ -261,7 +261,7 @@ PHP_FUNCTION(dio_truncate) - php_fd_t *f; - long offset; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &r_fd, &offset) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &r_fd, &offset) == FAILURE) { - return; - } - -@@ -270,7 +270,7 @@ PHP_FUNCTION(dio_truncate) - } - - if (ftruncate(f->fd, offset) == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "couldn't truncate %d to %ld bytes: %s", f->fd, offset, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "couldn't truncate %d to %ld bytes: %s", f->fd, offset, strerror(errno)); - RETURN_FALSE; - } - -@@ -289,7 +289,7 @@ PHP_FUNCTION(dio_stat) - php_fd_t *f; - struct stat s; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &r_fd) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &r_fd) == FAILURE) { - return; - } - -@@ -298,7 +298,7 @@ PHP_FUNCTION(dio_stat) - } - - if (fstat(f->fd, &s) == -1) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot stat %d: %s", f->fd, strerror(errno)); -+ php_error_docref(NULL, E_WARNING, "cannot stat %d: %s", f->fd, strerror(errno)); - RETURN_FALSE; - } - -@@ -330,7 +330,7 @@ PHP_FUNCTION(dio_seek) - long offset; - long whence = SEEK_SET; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|l", &r_fd, &offset, &whence) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|l", &r_fd, &offset, &whence) == FAILURE) { - return; - } - -@@ -353,7 +353,7 @@ PHP_FUNCTION(dio_fcntl) - php_fd_t *f; - long cmd; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &r_fd, &cmd, &arg) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|z", &r_fd, &cmd, &arg) == FAILURE) { - return; - } - -@@ -369,7 +369,7 @@ PHP_FUNCTION(dio_fcntl) - HashTable *fh; - - if (!arg) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 3 to be array or int, none given"); -+ php_error_docref(NULL, E_WARNING, "expects argument 3 to be array or int, none given"); - RETURN_FALSE; - } - if (Z_TYPE_P(arg) == IS_ARRAY) { -@@ -403,7 +403,7 @@ PHP_FUNCTION(dio_fcntl) - lk.l_whence = SEEK_SET; - lk.l_type = Z_LVAL_P(arg); - } else { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 3 to be array or int, %s given", zend_zval_type_name(arg)); -+ php_error_docref(NULL, E_WARNING, "expects argument 3 to be array or int, %s given", zend_zval_type_name(arg)); - RETURN_FALSE; - } - -@@ -428,7 +428,7 @@ PHP_FUNCTION(dio_fcntl) - php_fd_t *new_f; - - if (!arg || Z_TYPE_P(arg) != IS_LONG) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 3 to be int"); -+ php_error_docref(NULL, E_WARNING, "expects argument 3 to be int"); - RETURN_FALSE; - } - -@@ -440,7 +440,7 @@ PHP_FUNCTION(dio_fcntl) - } - default: - if (!arg || Z_TYPE_P(arg) != IS_LONG) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 3 to be int"); -+ php_error_docref(NULL, E_WARNING, "expects argument 3 to be int"); - RETURN_FALSE; - } - -@@ -465,7 +465,7 @@ PHP_FUNCTION(dio_tcsetattr) - HashTable *fh; - zval *element; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &r_fd, &arg) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz", &r_fd, &arg) == FAILURE) { - return; - } - -@@ -474,7 +474,7 @@ PHP_FUNCTION(dio_tcsetattr) - } - - if (Z_TYPE_P(arg) != IS_ARRAY) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING,"tcsetattr, third argument should be an associative array"); -+ php_error_docref(NULL, E_WARNING,"tcsetattr, third argument should be an associative array"); - return; - } - -@@ -564,7 +564,7 @@ PHP_FUNCTION(dio_tcsetattr) - BAUD = B50; - break; - default: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid baud rate %d", Baud_Rate); -+ php_error_docref(NULL, E_WARNING, "invalid baud rate %d", Baud_Rate); - RETURN_FALSE; - } - switch (Data_Bits) { -@@ -581,7 +581,7 @@ PHP_FUNCTION(dio_tcsetattr) - DATABITS = CS5; - break; - default: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data bits %d", Data_Bits); -+ php_error_docref(NULL, E_WARNING, "invalid data bits %d", Data_Bits); - RETURN_FALSE; - } - switch (Stop_Bits) { -@@ -592,7 +592,7 @@ PHP_FUNCTION(dio_tcsetattr) - STOPBITS = CSTOPB; - break; - default: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop bits %d", Stop_Bits); -+ php_error_docref(NULL, E_WARNING, "invalid stop bits %d", Stop_Bits); - RETURN_FALSE; - } - -@@ -610,7 +610,7 @@ PHP_FUNCTION(dio_tcsetattr) - PARITY = 0; - break; - default: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity %d", Parity); -+ php_error_docref(NULL, E_WARNING, "invalid parity %d", Parity); - RETURN_FALSE; - } - -@@ -652,7 +652,7 @@ PHP_FUNCTION(dio_close) - zval *r_fd; - php_fd_t *f; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &r_fd) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &r_fd) == FAILURE) { - return; - } - -@@ -669,7 +669,7 @@ PHP_FUNCTION(dio_close) - /* {{{ dio_init_legacy_defines - * Initialises the legacy PHP defines - */ --static void dio_init_legacy_defines(int module_number TSRMLS_DC) { -+static void dio_init_legacy_defines(int module_number) { - RDIOC(O_RDONLY); - RDIOC(O_WRONLY); - RDIOC(O_RDWR); -@@ -852,11 +852,11 @@ PHP_MINIT_FUNCTION(dio) - /* Legacy resource destructor. */ - le_fd = zend_register_list_destructors_ex(_dio_close_fd, NULL, le_fd_name, module_number); - -- dio_init_legacy_defines(module_number TSRMLS_CC); -+ dio_init_legacy_defines(module_number); - - /* Register the stream wrappers */ -- return (php_register_url_stream_wrapper(DIO_RAW_STREAM_NAME, &php_dio_raw_stream_wrapper TSRMLS_CC) == SUCCESS && -- php_register_url_stream_wrapper(DIO_SERIAL_STREAM_NAME, &php_dio_serial_stream_wrapper TSRMLS_CC) == SUCCESS) ? SUCCESS : FAILURE; -+ return (php_register_url_stream_wrapper(DIO_RAW_STREAM_NAME, &php_dio_raw_stream_wrapper) == SUCCESS && -+ php_register_url_stream_wrapper(DIO_SERIAL_STREAM_NAME, &php_dio_serial_stream_wrapper) == SUCCESS) ? SUCCESS : FAILURE; - } - /* }}} */ - -@@ -864,8 +864,8 @@ PHP_MINIT_FUNCTION(dio) - */ - PHP_MSHUTDOWN_FUNCTION(dio) - { -- return (php_unregister_url_stream_wrapper(DIO_RAW_STREAM_NAME TSRMLS_CC) == SUCCESS && -- php_unregister_url_stream_wrapper(DIO_SERIAL_STREAM_NAME TSRMLS_CC) == SUCCESS) ? SUCCESS : FAILURE; -+ return (php_unregister_url_stream_wrapper(DIO_RAW_STREAM_NAME) == SUCCESS && -+ php_unregister_url_stream_wrapper(DIO_SERIAL_STREAM_NAME) == SUCCESS) ? SUCCESS : FAILURE; - } - /* }}} */ - -diff --git a/dio_common.c b/dio_common.c -index a5f4c63..d09c0ec 100644 ---- a/dio_common.c -+++ b/dio_common.c -@@ -55,7 +55,7 @@ void dio_init_stream_data(php_dio_stream_data *data) { - /* {{{ dio_assoc_array_get_basic_options - * Retrieves the basic open option values from an associative array - */ --void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data TSRMLS_DC) { -+void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data) { - #if defined(DIO_HAS_FILEPERMS) || defined(DIO_NONBLOCK) - zval *tmpzval; - HashTable *opthash; -@@ -98,7 +98,7 @@ void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data - /* {{{ dio_assoc_array_get_serial_options - * Retrieves the serial open option values from an associative array - */ --void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data TSRMLS_DC) { -+void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data) { - zval *tmpzval; - HashTable *opthash; - -@@ -133,7 +133,7 @@ void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data - /* {{{ dio_stream_context_get_raw_options - * Extracts the option values for dio.raw mode from a context - */ --void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC) { -+void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data) { - #if defined(DIO_HAS_FILEPERMS) || defined(DIO_NONBLOCK) - zval *tmpzval; - #endif -@@ -173,7 +173,7 @@ void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_s - /* {{{ dio_stream_context_get_serial_options - * Extracts the option values for dio.serial mode from a context - */ --void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC) { -+void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data) { - zval *tmpzval; - - if ((tmpzval = php_stream_context_get_option(context, "dio", "data_rate")) != NULL) { -diff --git a/dio_posix.c b/dio_posix.c -index 527d683..843e234 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -474,7 +474,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void - /* {{{ dio_raw_open_stream - * Opens the underlying stream. - */ --int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_raw_open_stream(const char *filename, const char *mode, php_dio_stream_data *data) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - pdata->flags = dio_stream_mode_to_flags(mode); - -@@ -498,7 +498,7 @@ int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *d - if (pdata->fd < 0) { - switch (errno) { - case EEXIST: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -+ php_error_docref(NULL, E_WARNING, "File exists!"); - return 0; - default: - return 0; -@@ -512,36 +512,36 @@ int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *d - /* {{{ dio_serial_init - * Initialises the serial settings storing the original settings before hand. - */ --static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -+static int dio_serial_init(php_dio_stream_data *data) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - int ret = 0, data_bits_def, stop_bits_def, parity_def; - struct termios tio; - speed_t rate_def; - - if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%ld)", data->data_rate); -+ php_error_docref(NULL, E_WARNING, "invalid data_rate value (%ld)", data->data_rate); - return 0; - } - - if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -+ php_error_docref(NULL, E_WARNING, "invalid data_bits value (%d)", data->data_bits); - return 0; - } - - if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -+ php_error_docref(NULL, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); - return 0; - } - - if (!dio_parity_to_define(data->parity, &parity_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -+ php_error_docref(NULL, E_WARNING, "invalid parity value (%d)", data->parity); - return 0; - } - - ret = tcgetattr(pdata->fd, &(pdata->oldtio)); - if (ret < 0) { - if ((errno == ENOTTY) || (errno == ENODEV)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a serial port or terminal!"); -+ php_error_docref(NULL, E_WARNING, "Not a serial port or terminal!"); - } - return 0; - } -@@ -632,7 +632,7 @@ int dio_serial_purge(php_dio_stream_data *data) { - /* {{{ dio_serial_open_stream - * Opens the underlying stream. - */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - - #ifdef O_NOCTTY -@@ -640,11 +640,11 @@ int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data - pdata->flags |= O_NOCTTY; - #endif - -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (!dio_raw_open_stream(filename, mode, data)) { - return 0; - } - -- if (!dio_serial_init(data TSRMLS_CC)) { -+ if (!dio_serial_init(data)) { - close(pdata->fd); - return 0; - } -diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c -index 817b0d1..eb23752 100644 ---- a/dio_stream_wrappers.c -+++ b/dio_stream_wrappers.c -@@ -36,7 +36,7 @@ - /* {{{ dio_stream_write - * Write to the stream - */ --static size_t dio_stream_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) -+static size_t dio_stream_write(php_stream *stream, const char *buf, size_t count) - { - return dio_common_write((php_dio_stream_data*)stream->abstract, buf, count); - } -@@ -45,7 +45,7 @@ static size_t dio_stream_write(php_stream *stream, const char *buf, size_t count - /* {{{ dio_stream_read - * Read from the stream - */ --static size_t dio_stream_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) -+static size_t dio_stream_read(php_stream *stream, char *buf, size_t count) - { - php_dio_stream_data* data = (php_dio_stream_data*)stream->abstract; - size_t bytes = dio_common_read(data, buf, count); -@@ -58,7 +58,7 @@ static size_t dio_stream_read(php_stream *stream, char *buf, size_t count TSRMLS - /* {{{ dio_stream_flush - * Flush the stream. For raw streams this does nothing. - */ --static int dio_stream_flush(php_stream *stream TSRMLS_DC) -+static int dio_stream_flush(php_stream *stream) - { - return 1; - } -@@ -67,7 +67,7 @@ static int dio_stream_flush(php_stream *stream TSRMLS_DC) - /* {{{ dio_stream_close - * Close the stream - */ --static int dio_stream_close(php_stream *stream, int close_handle TSRMLS_DC) -+static int dio_stream_close(php_stream *stream, int close_handle) - { - php_dio_stream_data *abstract = (php_dio_stream_data*)stream->abstract; - -@@ -83,7 +83,7 @@ static int dio_stream_close(php_stream *stream, int close_handle TSRMLS_DC) - /* {{{ dio_stream_set_option - * Set the stream options. - */ --static int dio_stream_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC) -+static int dio_stream_set_option(php_stream *stream, int option, int value, void *ptrparam) - { - php_dio_stream_data *abstract = (php_dio_stream_data*)stream->abstract; - -@@ -143,7 +143,7 @@ static php_stream *dio_raw_fopen_wrapper(php_stream_wrapper *wrapper, - filename = path + sizeof(DIO_RAW_STREAM_PROTOCOL) - 1; - - /* Check we can actually access it. */ -- if (php_check_open_basedir(filename TSRMLS_CC) || DIO_SAFE_MODE_CHECK(filename, mode)) { -+ if (php_check_open_basedir(filename) || DIO_SAFE_MODE_CHECK(filename, mode)) { - return NULL; - } - -@@ -152,11 +152,11 @@ static php_stream *dio_raw_fopen_wrapper(php_stream_wrapper *wrapper, - - /* Parse the context. */ - if (context) { -- dio_stream_context_get_basic_options(context, data TSRMLS_CC); -+ dio_stream_context_get_basic_options(context, data); - } - - /* Try and open a raw stream. */ -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (!dio_raw_open_stream(filename, mode, data)) { - return NULL; - } - -@@ -199,7 +199,7 @@ PHP_FUNCTION(dio_raw) { - char *mode; - int mode_len; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|z", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|z", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { - RETURN_FALSE; - } - -@@ -209,7 +209,7 @@ PHP_FUNCTION(dio_raw) { - } - - /* Check we can actually access the file. */ -- if (php_check_open_basedir(filename TSRMLS_CC) || DIO_SAFE_MODE_CHECK(filename, mode)) { -+ if (php_check_open_basedir(filename) || DIO_SAFE_MODE_CHECK(filename, mode)) { - RETURN_FALSE; - } - -@@ -217,11 +217,11 @@ PHP_FUNCTION(dio_raw) { - data->stream_type = DIO_STREAM_TYPE_RAW; - - if (options) { -- dio_assoc_array_get_basic_options(options, data TSRMLS_CC); -+ dio_assoc_array_get_basic_options(options, data); - } - - /* Try and open a raw stream. */ -- if (dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (dio_raw_open_stream(filename, mode, data)) { - stream = php_stream_alloc(&dio_raw_stream_ops, data, 0, mode); - if (!stream) { - (void) dio_common_close(data); -@@ -244,7 +244,7 @@ PHP_FUNCTION(dio_raw) { - * stream, if it is write only it flushes the write, otherwise it flushes - * both. - */ --static int dio_serial_stream_flush(php_stream *stream TSRMLS_DC) -+static int dio_serial_stream_flush(php_stream *stream) - { - return dio_serial_purge((php_dio_stream_data*)stream->abstract); - } -@@ -254,7 +254,7 @@ static int dio_serial_stream_flush(php_stream *stream TSRMLS_DC) - * Close the stream. Restores the serial settings to their value before - * the stream was open. - */ --static int dio_serial_stream_close(php_stream *stream, int close_handle TSRMLS_DC) -+static int dio_serial_stream_close(php_stream *stream, int close_handle) - { - php_dio_stream_data *abstract = (php_dio_stream_data*)stream->abstract; - -@@ -304,7 +304,7 @@ static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, - filename = path + sizeof(DIO_SERIAL_STREAM_PROTOCOL) - 1; - - /* Check we can actually access it. */ -- if (php_check_open_basedir(filename TSRMLS_CC) || DIO_SAFE_MODE_CHECK(filename, mode)) { -+ if (php_check_open_basedir(filename) || DIO_SAFE_MODE_CHECK(filename, mode)) { - return NULL; - } - -@@ -313,12 +313,12 @@ static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, - - /* Parse the context. */ - if (context) { -- dio_stream_context_get_basic_options(context, data TSRMLS_CC); -- dio_stream_context_get_serial_options(context, data TSRMLS_CC); -+ dio_stream_context_get_basic_options(context, data); -+ dio_stream_context_get_serial_options(context, data); - } - - /* Try and open a serial stream. */ -- if (!dio_serial_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (!dio_serial_open_stream(filename, mode, data)) { - return NULL; - } - -@@ -359,18 +359,18 @@ PHP_FUNCTION(dio_serial) { - char *mode; - int mode_len; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|z", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|z", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { - RETURN_FALSE; - } - - /* Check the third argument is an array. */ - if (options && (Z_TYPE_P(options) != IS_ARRAY)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING,"dio_serial, the third argument should be an array of options"); -+ php_error_docref(NULL, E_WARNING,"dio_serial, the third argument should be an array of options"); - RETURN_FALSE; - } - - /* Check we can actually access the file. */ -- if (php_check_open_basedir(filename TSRMLS_CC) || DIO_SAFE_MODE_CHECK(filename, mode)) { -+ if (php_check_open_basedir(filename) || DIO_SAFE_MODE_CHECK(filename, mode)) { - RETURN_FALSE; - } - -@@ -378,12 +378,12 @@ PHP_FUNCTION(dio_serial) { - data->stream_type = DIO_STREAM_TYPE_SERIAL; - - if (options) { -- dio_assoc_array_get_basic_options(options, data TSRMLS_CC); -- dio_assoc_array_get_serial_options(options, data TSRMLS_CC); -+ dio_assoc_array_get_basic_options(options, data); -+ dio_assoc_array_get_serial_options(options, data); - } - - /* Try and open a serial stream. */ -- if (dio_serial_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (dio_serial_open_stream(filename, mode, data)) { - stream = php_stream_alloc(&dio_serial_stream_ops, data, 0, mode); - if (!stream) { - efree(data); -diff --git a/dio_win32.c b/dio_win32.c -index 1023d36..25c838a 100644 ---- a/dio_win32.c -+++ b/dio_win32.c -@@ -30,7 +30,7 @@ - /* {{{ dio_last_error_php_error - * Generates a PHP error message based upon the last Windows error. - */ --static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { -+static void dio_last_error_php_error(int level, char * message) { - LPVOID msgbuf; - DWORD msgbuflen; - char * errmsg; -@@ -68,7 +68,7 @@ static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { - /* Allocate a buffer */ - errmsg = emalloc(errmsglen); - if (!errmsg) { -- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Out of memory in dio_last_error_php_error()!"); -+ php_error_docref(NULL, E_ERROR, "Out of memory in dio_last_error_php_error()!"); - LocalFree(msgbuf); - return; - } -@@ -88,7 +88,7 @@ static void dio_last_error_php_error(int level, char * message TSRMLS_DC) { - errmsg = (char *)msgbuf; - #endif - -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s[ERROR %d] %s", message, err, errmsg); -+ php_error_docref(NULL, E_WARNING, "%s[ERROR %d] %s", message, err, errmsg); - - LocalFree(msgbuf); - #ifdef UNICODE -@@ -505,7 +505,7 @@ int dio_common_set_option(php_dio_stream_data *data, int option, int value, void - /* {{{ dio_raw_open_stream - * Opens the underlying stream. - */ --int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_raw_open_stream(const char *filename, const char *mode, php_dio_stream_data *data) { - php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; - DWORD err; - -@@ -543,29 +543,29 @@ int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *d - err = GetLastError(); - switch (err) { - case ERROR_FILE_EXISTS: -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File exists!"); -+ php_error_docref(NULL, E_WARNING, "File exists!"); - return 0; - - case ERROR_FILE_NOT_FOUND: - /* ERROR_FILE_NOT_FOUND with TRUNCATE_EXISTING means that - * the file doesn't exist so now try to create it. */ - if (TRUNCATE_EXISTING == wdata->creation_disposition) { -- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "File does not exist, creating new file!"); -+ php_error_docref(NULL, E_NOTICE, "File does not exist, creating new file!"); - - wdata->handle = CreateFile(filename, wdata->desired_access, 0, - NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (INVALID_HANDLE_VALUE == wdata->handle) { -- dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "CreateFile() failed:"); - return 0; - } - } else { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "File not found!"); -+ php_error_docref(NULL, E_WARNING, "File not found!"); - return 0; - } - break; - - default: -- dio_last_error_php_error(E_WARNING, "CreateFile() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "CreateFile() failed:"); - return 0; - } - } -@@ -584,33 +584,33 @@ int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *d - /* {{{ dio_serial_init - * Initialises the serial port - */ --static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { -+static int dio_serial_init(php_dio_stream_data *data) { - php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; - DWORD rate_def, data_bits_def, stop_bits_def, parity_def; - DCB dcb; - - if (!dio_data_rate_to_define(data->data_rate, &rate_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_rate value (%d)", data->data_rate); -+ php_error_docref(NULL, E_WARNING, "invalid data_rate value (%d)", data->data_rate); - return 0; - } - - if (!dio_data_bits_to_define(data->data_bits, &data_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid data_bits value (%d)", data->data_bits); -+ php_error_docref(NULL, E_WARNING, "invalid data_bits value (%d)", data->data_bits); - return 0; - } - - if (!dio_stop_bits_to_define(data->stop_bits, &stop_bits_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); -+ php_error_docref(NULL, E_WARNING, "invalid stop_bits value (%d)", data->stop_bits); - return 0; - } - - if (!dio_parity_to_define(data->parity, &parity_def)) { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity value (%d)", data->parity); -+ php_error_docref(NULL, E_WARNING, "invalid parity value (%d)", data->parity); - return 0; - } - - if (!GetCommState(wdata->handle, &(wdata->olddcb))) { -- dio_last_error_php_error(E_WARNING, "GetCommState() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "GetCommState() failed:"); - return 0; - } - -@@ -646,7 +646,7 @@ static int dio_serial_init(php_dio_stream_data *data TSRMLS_DC) { - } - - if (!SetCommState(wdata->handle, &dcb)) { -- dio_last_error_php_error(E_WARNING, "SetCommState() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "SetCommState() failed:"); - return 0; - } - -@@ -698,23 +698,23 @@ int dio_serial_purge(php_dio_stream_data *data) { - /* {{{ dio_serial_open_stream - * Opens the underlying stream. - */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC) { -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data) { - php_dio_win32_stream_data *wdata = (php_dio_win32_stream_data*)data; - COMMTIMEOUTS cto = { 0, 0, 0, 0, 0 }; - -- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Opening \"%s\" as a serial port (mode=\"%s\").", filename, mode); -+ php_error_docref(NULL, E_NOTICE, "Opening \"%s\" as a serial port (mode=\"%s\").", filename, mode); - - if (*mode != 'r') { -- php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must open serial ports in read or read/write mode!"); -+ php_error_docref(NULL, E_WARNING, "You must open serial ports in read or read/write mode!"); - return 0; - } - -- if (!dio_raw_open_stream(filename, mode, data TSRMLS_CC)) { -+ if (!dio_raw_open_stream(filename, mode, data)) { - return 0; - } - - if (!GetCommTimeouts(wdata->handle, &(wdata->oldcto))) { -- dio_last_error_php_error(E_WARNING, "GetCommTimeouts() failed (Not a comm port?):" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "GetCommTimeouts() failed (Not a comm port?):"); - CloseHandle(wdata->handle); - return 0; - } -@@ -735,12 +735,12 @@ int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data - } - - if (!SetCommTimeouts(wdata->handle, &cto)) { -- dio_last_error_php_error(E_WARNING, "SetCommTimeouts() failed:" TSRMLS_CC); -+ dio_last_error_php_error(E_WARNING, "SetCommTimeouts() failed:"); - CloseHandle(wdata->handle); - return 0; - } - -- if (!dio_serial_init(data TSRMLS_CC)) { -+ if (!dio_serial_init(data)) { - CloseHandle(wdata->handle); - return 0; - } -diff --git a/php_dio_common.h b/php_dio_common.h -index 7a75370..6af202f 100644 ---- a/php_dio_common.h -+++ b/php_dio_common.h -@@ -39,13 +39,13 @@ php_dio_stream_data * dio_create_stream_data(void); - - void dio_init_stream_data(php_dio_stream_data *data); - --void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data TSRMLS_DC); -+void dio_assoc_array_get_basic_options(zval *options, php_dio_stream_data *data); - --void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data TSRMLS_DC); -+void dio_assoc_array_get_serial_options(zval *options, php_dio_stream_data *data); - --void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC); -+void dio_stream_context_get_basic_options(php_stream_context *context, php_dio_stream_data *data); - --void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data TSRMLS_DC); -+void dio_stream_context_get_serial_options(php_stream_context *context, php_dio_stream_data *data); - - size_t dio_common_write(php_dio_stream_data *data, const char *buf, size_t count); - -@@ -55,13 +55,13 @@ int dio_common_close(php_dio_stream_data *data); - - int dio_common_set_option(php_dio_stream_data *data, int option, int value, void *ptrparam); - --int dio_raw_open_stream(const char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); -+int dio_raw_open_stream(const char *filename, const char *mode, php_dio_stream_data *data); - - int dio_serial_uninit(php_dio_stream_data *data); - - int dio_serial_purge(php_dio_stream_data *data); - --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data TSRMLS_DC); -+int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data); - - #endif /* PHP_DIO_COMMON_H_ */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0013-Fix-tests-for-legacy-interface.patch b/lang/php7-pecl-dio/patches/0013-Fix-tests-for-legacy-interface.patch deleted file mode 100644 index e632552..0000000 --- a/lang/php7-pecl-dio/patches/0013-Fix-tests-for-legacy-interface.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 942b77d84417298fb9e99c216029f22fbd1e2d98 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 01:47:05 +0200 -Subject: [PATCH 13/16] Fix tests for legacy interface - -Signed-off-by: Michael Heimpold ---- - dio.c | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/dio.c b/dio.c -index 7bad575..1a130a2 100644 ---- a/dio.c -+++ b/dio.c -@@ -73,9 +73,9 @@ static int new_php_fd(php_fd_t **f, int fd) - return 1; - } - --static void _dio_close_fd(zend_resource *res) -+static void _dio_close_fd(zend_resource *rsrc) - { -- php_fd_t *f = (php_fd_t *)zend_fetch_resource(res, NULL, le_fd); -+ php_fd_t *f = (php_fd_t *)rsrc->ptr; - if (f) { - close(f->fd); - free(f); -@@ -87,8 +87,8 @@ static void _dio_close_fd(zend_resource *res) - PHP_FUNCTION(dio_open) - { - php_fd_t *f; -- char *file_name; -- int file_name_length; -+ char *file_name = NULL; -+ size_t file_name_length = 0; - long flags; - long mode = 0; - int fd; -@@ -97,6 +97,10 @@ PHP_FUNCTION(dio_open) - return; - } - -+ if (!file_name || file_name[0] == '\0') { -+ RETURN_FALSE; -+ } -+ - if (php_check_open_basedir(file_name) || DIO_SAFE_MODE_CHECK(file_name, "wb+")) { - RETURN_FALSE; - } -@@ -176,7 +180,7 @@ PHP_FUNCTION(dio_dup) - RETURN_FALSE; - } - -- RETVAL_RES(zend_register_resource(f, le_fd)); -+ RETVAL_RES(zend_register_resource(df, le_fd)); - } - /* }}} */ - #endif -@@ -660,7 +664,7 @@ PHP_FUNCTION(dio_close) - RETURN_FALSE; - } - -- zend_list_delete(Z_LVAL_P(r_fd)); -+ zend_list_delete(Z_RES_P(r_fd)); - } - /* }}} */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0014-Add-missing-changes-from-changed-stream-API-interfac.patch b/lang/php7-pecl-dio/patches/0014-Add-missing-changes-from-changed-stream-API-interfac.patch deleted file mode 100644 index b9e2e00..0000000 --- a/lang/php7-pecl-dio/patches/0014-Add-missing-changes-from-changed-stream-API-interfac.patch +++ /dev/null @@ -1,54 +0,0 @@ -From ff469d3a11409e9b043dc10ddfc44792c5359ff1 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Thu, 14 Jul 2016 01:47:05 +0200 -Subject: [PATCH 14/16] Add missing changes from changed stream API interface - -Signed-off-by: Michael Heimpold ---- - dio_posix.c | 2 +- - dio_stream_wrappers.c | 2 +- - php_dio_common.h | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/dio_posix.c b/dio_posix.c -index 843e234..b2aa228 100644 ---- a/dio_posix.c -+++ b/dio_posix.c -@@ -632,7 +632,7 @@ int dio_serial_purge(php_dio_stream_data *data) { - /* {{{ dio_serial_open_stream - * Opens the underlying stream. - */ --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data) { -+int dio_serial_open_stream(const char *filename, const char *mode, php_dio_stream_data *data) { - php_dio_posix_stream_data *pdata = (php_dio_posix_stream_data*)data; - - #ifdef O_NOCTTY -diff --git a/dio_stream_wrappers.c b/dio_stream_wrappers.c -index eb23752..0a00daa 100644 ---- a/dio_stream_wrappers.c -+++ b/dio_stream_wrappers.c -@@ -292,7 +292,7 @@ static php_stream *dio_serial_fopen_wrapper(php_stream_wrapper *wrapper, - { - php_dio_stream_data *data; - php_stream *stream; -- char *filename; -+ const char *filename; - - /* Check it was actually for us (not a corrupted function pointer - somewhere!). */ -diff --git a/php_dio_common.h b/php_dio_common.h -index 6af202f..7068ea7 100644 ---- a/php_dio_common.h -+++ b/php_dio_common.h -@@ -61,7 +61,7 @@ int dio_serial_uninit(php_dio_stream_data *data); - - int dio_serial_purge(php_dio_stream_data *data); - --int dio_serial_open_stream(char *filename, char *mode, php_dio_stream_data *data); -+int dio_serial_open_stream(const char *filename, const char *mode, php_dio_stream_data *data); - - #endif /* PHP_DIO_COMMON_H_ */ - --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0015-Add-.gitignore.patch b/lang/php7-pecl-dio/patches/0015-Add-.gitignore.patch deleted file mode 100644 index ef675de..0000000 --- a/lang/php7-pecl-dio/patches/0015-Add-.gitignore.patch +++ /dev/null @@ -1,48 +0,0 @@ -From def92a2db269d4ea6d2e8b7f8fe9dd473886a6b1 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Sun, 17 Jul 2016 01:08:47 +0200 -Subject: [PATCH 15/16] Add .gitignore - -Signed-off-by: Michael Heimpold ---- - .gitignore | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - create mode 100644 .gitignore - -diff --git a/.gitignore b/.gitignore -new file mode 100644 -index 0000000..dae52e8 ---- /dev/null -+++ b/.gitignore -@@ -0,0 +1,28 @@ -+.deps -+.libs -+Makefile -+Makefile.fragments -+Makefile.global -+Makefile.objects -+acinclude.m4 -+aclocal.m4 -+autom4te.cache -+build -+config.guess -+config.h -+config.h.in -+config.log -+config.nice -+config.status -+config.sub -+configure -+configure.in -+*.la -+*.lo -+install-sh -+libtool -+ltmain.sh -+missing -+mkinstalldirs -+modules -+run-tests.php --- -2.5.0 - diff --git a/lang/php7-pecl-dio/patches/0016-Add-additional-baudrates.patch b/lang/php7-pecl-dio/patches/0016-Add-additional-baudrates.patch deleted file mode 100644 index 16cceea..0000000 --- a/lang/php7-pecl-dio/patches/0016-Add-additional-baudrates.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0f8df09a8008eed8a7ac0c6400bce523014ff770 Mon Sep 17 00:00:00 2001 -From: Michael Heimpold -Date: Mon, 18 Jul 2016 22:45:04 +0200 -Subject: [PATCH 16/16] Add additional baudrates - -Signed-off-by: Michael Heimpold ---- - dio.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/dio.c b/dio.c -index 1a130a2..a4e8e7d 100644 ---- a/dio.c -+++ b/dio.c -@@ -522,6 +522,26 @@ PHP_FUNCTION(dio_tcsetattr) - - /* assign to correct values... */ - switch (Baud_Rate) { -+#ifdef B460800 -+ case 460800: -+ BAUD = B460800; -+ break; -+#endif -+#ifdef B230400 -+ case 230400: -+ BAUD = B230400; -+ break; -+#endif -+#ifdef B115200 -+ case 115200: -+ BAUD = B115200; -+ break; -+#endif -+#ifdef B57600 -+ case 57600: -+ BAUD = B57600; -+ break; -+#endif - case 38400: - BAUD = B38400; - break; --- -2.5.0 - diff --git a/lang/php7-pecl-http/Makefile b/lang/php7-pecl-http/Makefile index 4166d2c..be9267a 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.0.1 +PKG_VERSION:=3.1.0 PKG_RELEASE:=2 -PKG_MD5SUM:=042c97314c180f6473338f0c5d35fabd +PKG_MD5SUM:=e3de67b156e7d5f6c2e5eb1e2b5f0acceb7004f1260d68c9f8b2c0f9629aabf0 PKG_NAME:=php7-pecl-http PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz @@ -32,8 +32,19 @@ include $(INCLUDE_DIR)/nls.mk include ../php7/pecl.mk CONFIGURE_VARS+= \ - PHP_PROPRO=yes \ - PHP_RAPHF=yes \ + PECL_cv_HAVE_EXT_propro=yes \ + PECL_cv_HAVE_EXT_raphf=yes \ + PECL_cv_HAVE_LIBCURL_ARES=no \ + PECL_cv_HAVE_LIBCURL_OpenSSL=$(if $(CONFIG_LIBCURL_OPENSSL),yes,no) \ + PECL_cv_HAVE_LIBCURL_GnuTLS=$(if $(CONFIG_LIBCURL_GNUTLS),yes,no) \ + PECL_cv_HAVE_LIBCURL_NSS=no \ + 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_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) \ CONFIGURE_ARGS+= \ --with-http \ @@ -42,5 +53,5 @@ CONFIGURE_ARGS+= \ --with-http-libevent-dir="$(STAGING_DIR)/usr" \ --with-http-libidn-dir="$(STAGING_DIR)/usr" -$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+libcurl +librt +libevent2 +libidn +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30)) +$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +libidn +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_config9-m4.patch b/lang/php7-pecl-http/patches.old/100_config9-m4.patch similarity index 100% rename from lang/php7-pecl-http/patches/100_config9-m4.patch rename to lang/php7-pecl-http/patches.old/100_config9-m4.patch 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 new file mode 100644 index 0000000..ee925c4 --- /dev/null +++ b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch @@ -0,0 +1,11 @@ +--- 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/Makefile b/lang/php7/Makefile index d311a7b..6cd2beb 100644 --- a/lang/php7/Makefile +++ b/lang/php7/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=7.0.13 +PKG_VERSION:=7.1.1 PKG_RELEASE:=1 PKG_MAINTAINER:=Michael Heimpold @@ -16,7 +16,8 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=eb117bf1d1efc99c522f132b265a3402 +PKG_MD5SUM:=65eef256f6e7104a05361939f5e23ada +PKG_HASH:=b3565b0c1441064eba204821608df1ec7367abff881286898d900c2c2a5ffe70 PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 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 9d8f989..819ad1e 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,11 +1,12 @@ From: Joe Orton -Date: Sun, 18 Oct 2015 02:15:17 +0200 +Date: Thu, 20 Oct 2016 11:44:14 +0200 Subject: Add support for use of the system timezone database Add support for use of the system timezone database, rather than embedding a copy. Discussed upstream but was not desired. History: +r14: improve check for valid tz file r13: adapt for upstream changes to use PHP allocator r12: adapt for upstream changes for new zic r11: use canonical names to avoid more case sensitivity issues @@ -25,12 +26,12 @@ 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/lib/parse_tz.c | 549 +++++++++++++++++++++++++++++++++++++++++++++++- - ext/date/lib/timelib.m4 | 14 ++ - 2 files changed, 552 insertions(+), 11 deletions(-) + ext/date/lib/parse_tz.c | 560 +++++++++++++++++++++++++++++++++++++++++++++++- + ext/date/lib/timelib.m4 | 13 ++ + 2 files changed, 562 insertions(+), 11 deletions(-) diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c -index 20d7eea..6301dc5 100644 +index 20d7eea..ed7717e 100644 --- a/ext/date/lib/parse_tz.c +++ b/ext/date/lib/parse_tz.c @@ -24,6 +24,16 @@ @@ -75,7 +76,7 @@ index 20d7eea..6301dc5 100644 /* read ID */ version = (*tzf)[3] - '0'; *tzf += 4; -@@ -302,7 +321,418 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) +@@ -302,7 +321,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) } } @@ -294,6 +295,7 @@ index 20d7eea..6301dc5 100644 + && strcmp(ent->d_name, "posix") != 0 + && strcmp(ent->d_name, "posixrules") != 0 + && strcmp(ent->d_name, "right") != 0 ++ && strstr(ent->d_name, ".list") == NULL + && strstr(ent->d_name, ".tab") == NULL; +} + @@ -434,8 +436,18 @@ index 20d7eea..6301dc5 100644 + +/* Returns true if the passed-in stat structure describes a + * probably-valid timezone file. */ -+static int is_valid_tzfile(const struct stat *st) ++static int is_valid_tzfile(const struct stat *st, int fd) +{ ++ if (fd) { ++ char buf[20]; ++ if (read(fd, buf, 20)!=20) { ++ return 0; ++ } ++ lseek(fd, SEEK_SET, 0); ++ if (memcmp(buf, "TZif", 4)) { ++ return 0; ++ } ++ } + return S_ISREG(st->st_mode) && st->st_size > 20; +} + @@ -473,11 +485,11 @@ index 20d7eea..6301dc5 100644 + } + + snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); -+ ++ + fd = open(fname, O_RDONLY); + if (fd == -1) { + return NULL; -+ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st)) { ++ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st, fd)) { + close(fd); + return NULL; + } @@ -495,7 +507,7 @@ index 20d7eea..6301dc5 100644 { int left = 0, right = tzdb->index_size - 1; #ifdef HAVE_SETLOCALE -@@ -341,21 +771,88 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const +@@ -341,21 +782,88 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const return 0; } @@ -577,7 +589,7 @@ index 20d7eea..6301dc5 100644 + + snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); + -+ return stat(fname, &st) == 0 && is_valid_tzfile(&st); ++ return stat(fname, &st) == 0 && is_valid_tzfile(&st, 0); + } +#endif + @@ -585,7 +597,7 @@ index 20d7eea..6301dc5 100644 } static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) -@@ -380,24 +877,54 @@ static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -380,24 +888,54 @@ static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz) timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) { const unsigned char *tzf; @@ -650,13 +662,13 @@ index 20d7eea..6301dc5 100644 tmp = NULL; } diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 -index c725572..4c837c7 100644 +index 99bf9fa..4bf7e46 100644 --- a/ext/date/lib/timelib.m4 +++ b/ext/date/lib/timelib.m4 -@@ -78,3 +78,17 @@ stdlib.h +@@ -78,3 +78,16 @@ stdlib.h dnl Check for strtoll, atoll - AC_CHECK_FUNCS(strtoll atoll strftime) + 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], @@ -670,4 +682,3 @@ index c725572..4c837c7 100644 + [Define for location of system timezone data]) + fi +fi -+ diff --git a/lang/php7/patches/0032-Use-system-timezone.patch b/lang/php7/patches/0032-Use-system-timezone.patch index 11a6393..efa1fc7 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 e780b2e..2b5a528 100644 +index cbe6e91..1999c83 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c -@@ -992,6 +992,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb) +@@ -1003,6 +1003,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 abfd6f7..0a10afa 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 @@ -8,15 +8,14 @@ Subject: Add patch to remove build timestamps from generated binaries. sapi/cgi/cgi_main.c | 4 ++-- sapi/cli/php_cli.c | 4 ++-- sapi/fpm/fpm/fpm_main.c | 4 ++-- - sapi/litespeed/lsapi_main.c | 4 ++-- sapi/phpdbg/phpdbg.c | 4 +--- - 7 files changed, 12 insertions(+), 24 deletions(-) + 6 files changed, 10 insertions(+), 22 deletions(-) diff --git a/ext/standard/info.c b/ext/standard/info.c -index e6eaac3..024e5c9 100644 +index e74d6b4..883fbdf 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c -@@ -863,7 +863,6 @@ PHPAPI void php_print_info(int flag) +@@ -865,7 +865,6 @@ PHPAPI 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)); @@ -51,78 +50,62 @@ index f286b1a..fba92b8 100644 case $host_alias in *aix*) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c -index 8983b53..589e299 100644 +index 0b6deb1..bb9014a 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c -@@ -2216,9 +2216,9 @@ consult the installation file that came with this distribution, or visit \n\ +@@ -2342,9 +2342,9 @@ consult the installation file that came with this distribution, or visit \n\ SG(request_info).no_headers = 1; } #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 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-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #endif php_request_shutdown((void *) 0); fcgi_shutdown(); diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c -index 978c8b3..3ee61a4 100644 +index dc92045..bb28364 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c -@@ -682,8 +682,8 @@ static int do_cli(int argc, char **argv) /* {{{ */ +@@ -690,8 +690,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-2016 The PHP Group\n%s", +- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", - PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, -+ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", ++ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", + PHP_VERSION, cli_sapi_module.name, #if ZTS "ZTS " #else diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c -index 5adeb63..5e60255 100644 +index 6768113..545c52e 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c -@@ -1757,9 +1757,9 @@ int main(int argc, char *argv[]) +@@ -1756,9 +1756,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-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 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-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); +- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); ++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); #endif php_request_shutdown((void *) 0); fcgi_shutdown(); -diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c -index b0ea105..4feb8f3 100644 ---- a/sapi/litespeed/lsapi_main.c -+++ b/sapi/litespeed/lsapi_main.c -@@ -811,9 +811,9 @@ static int cli_main( int argc, char * argv[] ) - case 'v': - if (php_request_startup() != FAILURE) { - #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 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-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 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/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c -index 68a164c..82565d8 100644 +index b47c7c8..ab94bba 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c -@@ -1657,10 +1657,8 @@ - phpdbg_do_help(NULL); +@@ -1699,10 +1699,8 @@ phpdbg_main: + phpdbg_do_help_cmd(exec); } else if (show_version) { phpdbg_out( -- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s", -+ "phpdbg %s\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s", +- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s", ++ "phpdbg %s\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s", PHPDBG_VERSION, - __DATE__, - __TIME__, diff --git a/lang/php7/patches/1005-fix-asm-constraints-in-aarch64-multiply-macro.patch b/lang/php7/patches/1005-fix-asm-constraints-in-aarch64-multiply-macro.patch new file mode 100644 index 0000000..0afa951 --- /dev/null +++ b/lang/php7/patches/1005-fix-asm-constraints-in-aarch64-multiply-macro.patch @@ -0,0 +1,29 @@ +From 6cbb9f4c247c5361b8c165fbb40b4118d5d7c0e5 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Mon, 25 Apr 2016 11:59:14 +0200 +Subject: [PATCH] Fix asm constraints in aarch64 multiply macro + +All operands must be register operands and the output operands are early +clobbered. +--- + Zend/zend_multiply.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h +index dfd21f7..651dd43 100644 +--- a/Zend/zend_multiply.h ++++ b/Zend/zend_multiply.h +@@ -53,8 +53,8 @@ + __asm__("mul %0, %2, %3\n" \ + "smulh %1, %2, %3\n" \ + "sub %1, %1, %0, asr #63\n" \ +- : "=X"(__tmpvar), "=X"(usedval) \ +- : "X"(a), "X"(b)); \ ++ : "=&r"(__tmpvar), "=&r"(usedval) \ ++ : "r"(a), "r"(b)); \ + if (usedval) (dval) = (double) (a) * (double) (b); \ + else (lval) = __tmpvar; \ + } while (0) +-- +2.8.0 + diff --git a/lang/php7/pecl.mk b/lang/php7/pecl.mk index 7b7c244..caafc66 100644 --- a/lang/php7/pecl.mk +++ b/lang/php7/pecl.mk @@ -16,6 +16,9 @@ define Build/Prepare ( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/usr/bin/phpize7 ) endef +CONFIGURE_VARS+= \ + ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) + CONFIGURE_ARGS+= \ --with-php-config=$(STAGING_DIR)/usr/bin/php7-config diff --git a/lang/python-cffi/Makefile b/lang/python-cffi/Makefile index b8a5000..b6d15fd 100644 --- a/lang/python-cffi/Makefile +++ b/lang/python-cffi/Makefile @@ -45,7 +45,7 @@ define Build/Compile endef define Host/Compile - $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)") + $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") endef define Host/Install diff --git a/lang/python-gmpy/Makefile b/lang/python-gmpy/Makefile deleted file mode 100644 index 09ed13d..0000000 --- a/lang/python-gmpy/Makefile +++ /dev/null @@ -1,44 +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:=gmpy -PKG_VERSION:=1.17 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip -PKG_SOURCE_URL:=https://pypi.python.org/packages/source/g/gmpy -PKG_MD5SUM:=2bf419076b06e107167e219f60ac6d27 - -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=lgpl-2.1.txt -PKG_MAINTAINER:=Jeffery To - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/python-gmpy - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=python-gmpy - URL:=http://code.google.com/p/gmpy/ - DEPENDS:=+libgmp +python-light -endef - -define Package/python-gmpy/description -gmpy is a C-coded Python extension module that provides access to the -GMP (or MPIR) multiple-precision arithmetic library. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)") -endef - -$(eval $(call PyPackage,python-gmpy)) -$(eval $(call BuildPackage,python-gmpy)) diff --git a/lang/python-packages/Makefile b/lang/python-packages/Makefile index f12b78e..701f0e6 100644 --- a/lang/python-packages/Makefile +++ b/lang/python-packages/Makefile @@ -69,7 +69,7 @@ CONFIG_PACKAGE_python-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python-packa CONFIG_PACKAGE_python-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-extra-deps)) CONFIG_PACKAGE_python-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-pip-opts)) -HOST_PYTHON_PIP:=$(STAGING_DIR)/host/bin/pip$(PYTHON_VERSION) +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)) @@ -92,7 +92,7 @@ HOST_PYTHON_PIP_INSTALL=$(HOST_PYTHON_PIP) install \ $(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)/host,"") +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) diff --git a/lang/python-pip/Makefile b/lang/python-pip/Makefile index db40f8f..2099e63 100644 --- a/lang/python-pip/Makefile +++ b/lang/python-pip/Makefile @@ -62,7 +62,7 @@ endef define Host/Compile $(call Build/Compile/HostPyMod,,\ - install --root="$(STAGING_DIR)/host" --prefix="" \ + install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \ --single-version-externally-managed \ ) endef diff --git a/lang/python-ply/Makefile b/lang/python-ply/Makefile index ba90ecb..0b0e553 100644 --- a/lang/python-ply/Makefile +++ b/lang/python-ply/Makefile @@ -46,7 +46,7 @@ define Build/Compile endef define Host/Compile - $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)") + $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") endef define Host/Install diff --git a/lang/python-pycparser/Makefile b/lang/python-pycparser/Makefile index ff17417..37e6c84 100644 --- a/lang/python-pycparser/Makefile +++ b/lang/python-pycparser/Makefile @@ -47,7 +47,7 @@ define Build/Compile endef define Host/Compile - $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(HOST_BUILD_PREFIX)") + $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)") endef define Host/Install diff --git a/lang/python-setuptools/Makefile b/lang/python-setuptools/Makefile index 6efc433..1f31222 100644 --- a/lang/python-setuptools/Makefile +++ b/lang/python-setuptools/Makefile @@ -63,7 +63,7 @@ endef define Host/Compile $(call Build/Compile/HostPyMod,,\ - install --root="$(HOST_BUILD_PREFIX)" --prefix="" \ + install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \ --single-version-externally-managed \ ) endef diff --git a/lang/python/Makefile b/lang/python/Makefile index 3eb4e9d..d17b6e1 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -10,23 +10,24 @@ include $(TOPDIR)/rules.mk # For PYTHON_VERSION include ./files/python-version.mk -# This file provides the necsessary host build variables -include ./files/python-host.mk - -# For PyPackage -include ./files/python-package.mk - PKG_NAME:=python PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) -PKG_RELEASE:=2 +PKG_RELEASE:=4 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_MD5SUM:=57dffcee9cee8bb2ab5f82af1d8e9a69 +PKG_MD5SUM:=53b43534153bb2a0363f08bae8b9d990 +PKG_HASH:=35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731 PKG_LICENSE:=PSF PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE +# This file provides the necsessary host build variables +include ./files/python-host.mk + +# For PyPackage +include ./files/python-package.mk + PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -35,7 +36,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) PKG_BUILD_DEPENDS:=python/host -HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host +HOST_BUILD_DEPENDS:=bzip2/host expat/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -122,13 +123,21 @@ 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) + CONFIGURE_ARGS+= \ --sysconfdir=/etc \ --enable-shared \ --without-cxx-main \ --with-threads \ - --with-system-ffi="$(STAGING_DIR)/usr" \ + --with-system-ffi \ --without-pymalloc \ + PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \ $(ENABLE_IPV6) \ CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \ OPT="$(TARGET_CFLAGS)" @@ -220,6 +229,9 @@ define PyPackage/python/filespec -|$(PYTHON_PKG_DIR) endef +HOST_LDFLAGS += \ + $$$$(pkg-config --static --libs libcrypto libssl) + HOST_CONFIGURE_ARGS+= \ --without-cxx-main \ --without-pymalloc \ @@ -227,9 +239,8 @@ HOST_CONFIGURE_ARGS+= \ --prefix=$(HOST_PYTHON_DIR) \ --exec-prefix=$(HOST_PYTHON_DIR) \ --with-system-expat=$(STAGING_DIR_HOSTPKG) \ - --with-system-ffi=$(STAGING_DIR_HOSTPKG) \ - CONFIG_SITE= \ - CFLAGS="$(HOST_CFLAGS)" + --with-system-ffi=no \ + CONFIG_SITE= define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) install diff --git a/lang/python/files/python-host.mk b/lang/python/files/python-host.mk index dc0c0c0..6953a09 100644 --- a/lang/python/files/python-host.mk +++ b/lang/python/files/python-host.mk @@ -11,12 +11,6 @@ __python_host_mk_inc=1 # For PYTHON_VERSION $(call include_mk, python-version.mk) -# Compatibility fallback for older OpenWrt and LEDE versions -ifeq ($(STAGING_DIR_HOSTPKG),) - $(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host) - STAGING_DIR_HOSTPKG := $(STAGING_DIR)/host -endif - 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) @@ -77,4 +71,11 @@ define Build/Compile/HostPyMod $(3)) endef +define HostPy/Compile/Default + $(call Build/Compile/HostPyMod,,\ + install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \ + --single-version-externally-managed \ + ) +endef + endif # __python_host_mk_inc diff --git a/lang/python/files/python-package-dev.mk b/lang/python/files/python-package-dev.mk index 6a2b942..647f649 100644 --- a/lang/python/files/python-package-dev.mk +++ b/lang/python/files/python-package-dev.mk @@ -8,7 +8,7 @@ define Package/python-dev $(call Package/python/Default) TITLE:=Python $(PYTHON_VERSION) development files - DEPENDS:=+python + DEPENDS:=+python +python-lib2to3 endef define PyPackage/python-dev/install diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 2a2e371..d0818a6 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -41,6 +41,15 @@ define PyPackage 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 + $(call shexport,PyPackage/$(1)/filespec) define Package/$(1)/install @@ -115,21 +124,15 @@ define Build/Compile/PyMod find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f endef -define PyMod/Default - define Build/Compile - $$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) - endef - - define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR) $$(1)/usr/bin - if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then find $(PKG_INSTALL_DIR)/usr/bin -mindepth 1 -maxdepth 1 -type f -exec $(CP) \{\} $$(1)/usr/bin/ \; ; fi - find $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) -mindepth 1 -maxdepth 1 \( -type f -o -type d \) -exec $(CP) \{\} $$(1)$(PYTHON_PKG_DIR)/ \; - endef - - define Build/InstallDev - $(INSTALL_DIR) $$(1)/usr/bin $$(1)$(PYTHON_PKG_DIR) - if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then find $(PKG_INSTALL_DIR)/usr/bin -mindepth 1 -maxdepth 1 -type f -exec $(CP) \{\} $$(1)/usr/bin/ \; ; fi - find $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) -mindepth 1 -maxdepth 1 \( -type f -o -type d \) -exec $(CP) \{\} $$(1)$(PYTHON_PKG_DIR)/ \; - endef +define PyBuild/Compile/Default + $(call Build/Compile/PyMod,, \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ + --single-version-externally-managed \ + ) endef +ifeq ($(BUILD_VARIANT),python) +define Build/Compile + $(call PyBuild/Compile/Default) +endef +endif # python diff --git a/lang/python/files/python-version.mk b/lang/python/files/python-version.mk index 6905c3d..847eaf5 100644 --- a/lang/python/files/python-version.mk +++ b/lang/python/files/python-version.mk @@ -6,5 +6,5 @@ # PYTHON_VERSION:=2.7 -PYTHON_VERSION_MICRO:=12 +PYTHON_VERSION_MICRO:=13 diff --git a/lang/python/patches/005-fix-libffi-x86-64-configure.patch b/lang/python/patches/005-fix-libffi-x86-64-configure.patch deleted file mode 100644 index ea062a3..0000000 --- a/lang/python/patches/005-fix-libffi-x86-64-configure.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure -index 75f62a7..4d6c9f2 100755 ---- a/Modules/_ctypes/libffi/configure -+++ b/Modules/_ctypes/libffi/configure -@@ -17257,20 +17257,12 @@ case "$host" in - fi - ;; - -- i?86-*-* | x86_64-*-*) -- TARGETDIR=x86 -- if test $ac_cv_sizeof_size_t = 4; then -- case "$host" in -- *-gnux32) -- TARGET=X86_64 -- ;; -- *) -- TARGET=X86 -- ;; -- esac -- else -- TARGET=X86_64; -- fi -+ i?86-*-*) -+ TARGET=X86; TARGETDIR=x86 -+ ;; -+ -+ x86_64-*-*) -+ TARGET=X86_64; TARGETDIR=x86 - ;; - - ia64*-*-*) diff --git a/lang/python/patches/011-do-not-prefer-ncursesw.patch b/lang/python/patches/011-do-not-prefer-ncursesw.patch deleted file mode 100644 index c5f323c..0000000 --- a/lang/python/patches/011-do-not-prefer-ncursesw.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/setup.py b/setup.py -index 7868b7b..86b0119 100644 ---- a/setup.py -+++ b/setup.py -@@ -725,8 +725,8 @@ class PyBuildExt(build_ext): - # use the same library for the readline and curses modules. - if 'curses' in readline_termcap_library: - curses_library = readline_termcap_library -- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): -- curses_library = 'ncursesw' -+ #elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): -+ # curses_library = 'ncursesw' - elif self.compiler.find_library_file(lib_dirs, 'ncurses'): - curses_library = 'ncurses' - elif self.compiler.find_library_file(lib_dirs, 'curses'): diff --git a/lang/python/patches/011-remove-setupterm-definition.patch b/lang/python/patches/011-remove-setupterm-definition.patch new file mode 100644 index 0000000..e55d708 --- /dev/null +++ b/lang/python/patches/011-remove-setupterm-definition.patch @@ -0,0 +1,12 @@ +diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c +index e478a57..eb297b4 100644 +--- a/Modules/_cursesmodule.c ++++ b/Modules/_cursesmodule.c +@@ -117,7 +117,6 @@ char *PyCursesVersion = "2.2"; + #defines many common symbols (such as "lines") which breaks the + curses module in other ways. So the code will just specify + explicit prototypes here. */ +-extern int setupterm(char *,int,int *); + #ifdef __sgi + #include + #endif diff --git a/lang/python3/Makefile b/lang/python3/Makefile index 2e0f872..3a08a93 100644 --- a/lang/python3/Makefile +++ b/lang/python3/Makefile @@ -8,22 +8,29 @@ include $(TOPDIR)/rules.mk # The file included below defines PYTHON_VERSION -include ./files/python3-package.mk +include ./files/python3-version.mk PYTHON_VERSION:=$(PYTHON3_VERSION) PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO) PKG_NAME:=python3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_MD5SUM:=8906efbacfcdc7c3c9198aeefafd159e +PKG_MD5SUM:=82b143ebbf4514d7e05876bed7a6b1f5 +PKG_HASH:=b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622 PKG_LICENSE:=PSF PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE +# This file provides the necsessary host build variables +include ./files/python3-host.mk + +# For Py3Package +include ./files/python3-package.mk + PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -31,7 +38,7 @@ HOST_BUILD_PARALLEL:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=libbz2/host expat/host python3/host +PKG_BUILD_DEPENDS:=python3/host HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host include $(INCLUDE_DIR)/host-build.mk @@ -81,8 +88,12 @@ endef PYTHON3_LIB_FILES_DEL:= PYTHON3_PACKAGES:= PYTHON3_SO_SUFFIX:=cpython-$(PYTHON3_VERSION_MAJOR)$(PYTHON3_VERSION_MINOR).so +PYTHON3_PACKAGES_DEPENDS:= define Py3BasePackage PYTHON3_PACKAGES+=$(1) + ifeq ($(3),) + PYTHON3_PACKAGES_DEPENDS+=$(1) + endif PYTHON3_LIB_FILES_DEL+=$(2) define Py3Package/$(1)/filespec $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file))) @@ -93,7 +104,7 @@ include ./files/python3-package-*.mk define Package/python3 $(call Package/python3/Default) - DEPENDS:=+python3-light $(foreach package,$(filter-out python3-dev python3-lib2to3,$(PYTHON3_PACKAGES)),+$(package)) + DEPENDS:=+python3-light $(foreach package,$(PYTHON3_PACKAGES_DEPENDS),+$(package)) endef define Package/python3/description @@ -120,14 +131,22 @@ 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_PYTHON3_BIN) + CONFIGURE_ARGS+= \ --sysconfdir=/etc \ --enable-shared \ --without-cxx-main \ --with-threads \ - --with-system-ffi="$(STAGING_DIR)/usr" \ + --with-system-ffi \ --without-pymalloc \ --with-ensurepip=no \ + PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \ $(ENABLE_IPV6) \ CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \ OPT="$(TARGET_CFLAGS)" @@ -141,7 +160,11 @@ define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR)/mk/ $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/ - $(INSTALL_DATA) ./files/python3-package.mk $(STAGING_DIR)/mk/ + $(INSTALL_DATA) \ + ./files/python3-package.mk \ + ./files/python3-host.mk \ + ./files/python3-version.mk \ + $(STAGING_DIR)/mk/ $(CP) \ $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ $(1)/usr/include/ @@ -215,7 +238,7 @@ HOST_CONFIGURE_ARGS+= \ --prefix=$(HOST_PYTHON3_DIR) \ --exec-prefix=$(HOST_PYTHON3_DIR) \ --with-system-expat=$(STAGING_DIR_HOSTPKG) \ - --with-system-ffi=$(STAGING_DIR_HOSTPKG) \ + --with-system-ffi \ --with-ensurepip=no \ CONFIG_SITE= \ CFLAGS="$(HOST_CFLAGS)" diff --git a/lang/python3/files/python3-host.mk b/lang/python3/files/python3-host.mk new file mode 100644 index 0000000..8ff6dd7 --- /dev/null +++ b/lang/python3/files/python3-host.mk @@ -0,0 +1,90 @@ +# +# Copyright (C) 2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifneq ($(__python3_host_mk_inc),1) +__python3_host_mk_inc=1 + +# For PYTHON3_VERSION +$(call include_mk, python3-version.mk) + +HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG) +HOST_PYTHON3_INC_DIR:=$(HOST_PYTHON3_DIR)/include/python$(PYTHON3_VERSION) +HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION) + +HOST_PYTHON3_PKG_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)/site-packages + +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 + +# $(1) => commands to execute before running pythons script +# $(2) => python script and its arguments +# $(3) => additional variables +define Build/Compile/HostPy3RunHost + $(call HostPython3, \ + $(if $(1),$(1);) \ + CC="$(HOSTCC)" \ + CCSHARED="$(HOSTCC) $(HOST_FPIC)" \ + CXX="$(HOSTCXX)" \ + LD="$(HOSTCC)" \ + LDSHARED="$(HOSTCC) -shared" \ + 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 \ + $(3) \ + , \ + $(2) \ + , \ + HOST \ + ) +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), \ + $(3)) +endef + +define HostPy3/Compile/Default + $(call Build/Compile/HostPy3Mod,,\ + install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \ + --single-version-externally-managed \ + ) +endef + +ifeq ($(BUILD_VARIANT),python3) +define Host/Compile + $(call HostPy3/Compile/Default) +endef + +define Host/Install +endef +endif # python3 + +endif # __python3_host_mk_inc diff --git a/lang/python3/files/python3-package-dev.mk b/lang/python3/files/python3-package-dev.mk index 7c2fc0d..19d9592 100644 --- a/lang/python3/files/python3-package-dev.mk +++ b/lang/python3/files/python3-package-dev.mk @@ -8,7 +8,7 @@ define Package/python3-dev $(call Package/python3/Default) TITLE:=Python $(PYTHON3_VERSION) development files - DEPENDS:=+python3 + DEPENDS:=+python3 +python3-lib2to3 endef define Py3Package/python3-dev/install @@ -22,4 +22,6 @@ $(eval $(call Py3BasePackage,python3-dev, \ /usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \ /usr/include/python$(PYTHON_VERSION) \ /usr/lib/pkgconfig \ + , \ + DO_NOT_ADD_TO_PACKAGE_DEPENDS \ )) diff --git a/lang/python3/files/python3-package-lib2to3.mk b/lang/python3/files/python3-package-lib2to3.mk index 801fd91..ed712b6 100644 --- a/lang/python3/files/python3-package-lib2to3.mk +++ b/lang/python3/files/python3-package-lib2to3.mk @@ -13,4 +13,6 @@ endef $(eval $(call Py3BasePackage,python3-lib2to3, \ /usr/lib/python$(PYTHON3_VERSION)/lib2to3 \ + , \ + DO_NOT_ADD_TO_PACKAGE_DEPENDS \ )) diff --git a/lang/python3/files/python3-package.mk b/lang/python3/files/python3-package.mk index 60feaf1..f13e737 100644 --- a/lang/python3/files/python3-package.mk +++ b/lang/python3/files/python3-package.mk @@ -5,17 +5,7 @@ # See /LICENSE for more information. # -# Compatibility fallback for older OpenWrt and LEDE versions -ifeq ($(STAGING_DIR_HOSTPKG),) - $(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host) - STAGING_DIR_HOSTPKG := $(STAGING_DIR)/host -endif - -PYTHON3_VERSION_MAJOR:=3 -PYTHON3_VERSION_MINOR:=5 -PYTHON3_VERSION_MICRO:=2 - -PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) +$(call include_mk, python3-version.mk) PYTHON3_DIR:=$(STAGING_DIR)/usr PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin @@ -26,22 +16,7 @@ PYTHON3_PKG_DIR:=/usr/lib/python$(PYTHON3_VERSION)/site-packages PYTHON3:=python$(PYTHON3_VERSION) -HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG) -HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION) -HOST_PYTHON3_BIN:=$(HOST_PYTHON3_DIR)/bin/python3 - PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) -define HostPython3 - ( export PYTHONPATH="$(PYTHON3PATH)"; \ - export PYTHONOPTIMIZE=""; \ - export PYTHONDONTWRITEBYTECODE=1; \ - export _python_sysroot="$(STAGING_DIR)"; \ - export _python_prefix="/usr"; \ - export _python_exec_prefix="/usr"; \ - $(1) \ - $(HOST_PYTHON3_BIN) $(2); \ - ) -endef # These configure args are needed in detection of path to Python header files # using autotools. @@ -66,6 +41,15 @@ define Py3Package endef 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 + endef + endif + $(call shexport,Py3Package/$(1)/filespec) define Package/$(1)/install @@ -104,15 +88,17 @@ define Py3Package endef endef -# $(1) => build subdir -# $(2) => additional arguments to setup.py +$(call include_mk, python3-host.mk) + +# $(1) => commands to execute before running pythons script +# $(2) => python script and its arguments # $(3) => additional variables -define Build/Compile/Py3Mod - $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) +define Build/Compile/HostPy3RunTarget $(call HostPython3, \ - cd $(PKG_BUILD_DIR)/$(strip $(1)); \ + $(if $(1),$(1);) \ CC="$(TARGET_CC)" \ CCSHARED="$(TARGET_CC) $(FPIC)" \ + CXX="$(TARGET_CXX)" \ LD="$(TARGET_CC)" \ LDSHARED="$(TARGET_CC) -shared" \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -122,8 +108,31 @@ define Build/Compile/Py3Mod __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \ $(3) \ , \ - ./setup.py $(2) \ + $(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)) find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f endef +define Py3Build/Compile/Default + $(call Build/Compile/Py3Mod,, \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ + --single-version-externally-managed \ + ) +endef + +ifeq ($(BUILD_VARIANT),python3) +define Build/Compile + $(call Py3Build/Compile/Default) +endef +endif # python3 diff --git a/lang/python3/files/python3-version.mk b/lang/python3/files/python3-version.mk new file mode 100644 index 0000000..08a130f --- /dev/null +++ b/lang/python3/files/python3-version.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +PYTHON3_VERSION_MAJOR:=3 +PYTHON3_VERSION_MINOR:=6 +PYTHON3_VERSION_MICRO:=0 + +PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) + diff --git a/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch b/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch new file mode 100644 index 0000000..0df72c7 --- /dev/null +++ b/lang/python3/patches/011-fix-ncursesw-definition-colisions.patch @@ -0,0 +1,24 @@ +diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c +index 3bf2ca7..c156964 100644 +--- a/Modules/_cursesmodule.c ++++ b/Modules/_cursesmodule.c +@@ -116,7 +116,6 @@ char *PyCursesVersion = "2.2"; + #defines many common symbols (such as "lines") which breaks the + curses module in other ways. So the code will just specify + explicit prototypes here. */ +-extern int setupterm(char *,int,int *); + #ifdef __sgi + #include + #endif +diff --git a/setup.py b/setup.py +index af9a414..ee19ecd 100644 +--- a/setup.py ++++ b/setup.py +@@ -1349,7 +1349,6 @@ class PyBuildExt(build_ext): + panel_library = 'panel' + if curses_library == 'ncursesw': + curses_defines.append(('HAVE_NCURSESW', '1')) +- curses_includes.append('/usr/include/ncursesw') + # Bug 1464056: If _curses.so links with ncursesw, + # _curses_panel.so must link with panelw. + panel_library = 'panelw' diff --git a/lang/python3/patches/016-adjust-config-paths.patch b/lang/python3/patches/016-adjust-config-paths.patch new file mode 100644 index 0000000..fb709b7 --- /dev/null +++ b/lang/python3/patches/016-adjust-config-paths.patch @@ -0,0 +1,72 @@ +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 8bf1a70..c2708c3 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -424,6 +424,7 @@ def _init_posix(): + platform=sys.platform, + multiarch=getattr(sys.implementation, '_multiarch', ''), + )) ++ name = '_sysconfigdata' + _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) + build_time_vars = _temp.build_time_vars + global _config_vars +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index 9314e71..4861261 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -343,6 +343,7 @@ def get_makefile_filename(): + + + def _get_sysconfigdata_name(): ++ return '_sysconfigdata' + return os.environ.get('_PYTHON_SYSCONFIGDATA_NAME', + '_sysconfigdata_{abi}_{platform}_{multiarch}'.format( + abi=sys.abiflags, +diff --git a/Makefile.pre.in b/Makefile.pre.in +index cd7d33d..ad6572f 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1301,7 +1301,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c + esac; \ + done; \ + done +- $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ ++ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata*.py \ + $(DESTDIR)$(LIBDEST); \ + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt + if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ +@@ -1436,7 +1436,7 @@ sharedinstall: sharedmods + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ + --root=$(DESTDIR)/ +- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py ++ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata*.py + -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__ + + # Here are a couple of targets for MacOSX again, to install a full +diff --git a/configure b/configure +index cf95b27..8203fbb 100755 +--- a/configure ++++ b/configure +@@ -14895,7 +14895,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)' + $as_echo "$LDVERSION" >&6; } + + +-if test x$PLATFORM_TRIPLET = x; then ++if true ; then + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" + else + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" +diff --git a/configure.ac b/configure.ac +index 1d63813..25f25ed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4600,7 +4600,7 @@ AC_MSG_RESULT($LDVERSION) + + dnl define LIBPL after ABIFLAGS and LDVERSION is defined. + AC_SUBST(PY_ENABLE_SHARED) +-if test x$PLATFORM_TRIPLET = x; then ++if true ; then + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" + else + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index f6dcd2d..adca82f 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -1,23 +1,25 @@ # # Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2017 Luiz Angelo Daros de Luca # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # # To Do: -# - dirs not removed when uninstalling! +# - dirs not removed when uninstalling! opkg bug? # include $(TOPDIR)/rules.mk PKG_NAME:=ruby -PKG_VERSION:=2.3.3 +PKG_VERSION:=2.4.1 PKG_RELEASE:=1 -PKG_LIBVER:=2.3 +# First two numbes +PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION)))) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/ -PKG_MD5SUM:=882e6146ed26c6e78c02342835f5d46b86de95f0dc4e16543294bc656594cc5b +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/ +PKG_HASH:=4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=COPYING @@ -36,7 +38,7 @@ HOST_CONFIGURE_ARGS += \ --disable-install-rdoc \ --disable-install-capi \ --without-gmp \ - --with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \ + --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 # Does not compile with this. Workaround is --without-gmp # https://bugs.ruby-lang.org/issues/11940 @@ -57,7 +59,7 @@ CONFIGURE_ARGS += \ --disable-install-capi \ --with-ruby-version=minor \ --with-iconv-dir=$(ICONV_PREFIX) \ - --with-out-ext=tk,tk/tkutil,win32,win32ole + --with-out-ext=win32,win32ole ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL CONFIGURE_ARGS += \ @@ -73,7 +75,7 @@ TARGET_LDFLAGS += -L$(PKG_BUILD_DIR) # Ruby uses DLDFLAGS and not LDFLAGS for libraries. LDFLAGS is only for execs. # However, DLDFLAGS from configure is not passed to Makefile when target is linux. # XLDFLAGS is used by both libraries and execs. This is somehow brute force but -# if will fix when some LD_FLAGS is needef for libraries. As side effect, it will +# it will fix when some LD_FLAGS is needed for libraries. As side effect, it will # duplicate ld args for binaries. CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)" @@ -90,7 +92,7 @@ endef define Host/Install # When ruby version is updated, make install asks in some cases before replace # an existing different file. Remove them before install and avoid the interaction - rm -f $(HOST_BUILD_PREFIX)/bin/rake + rm -f $(STAGING_DIR_HOSTPKG)/bin/rake $(call Host/Install/Default) endef @@ -155,15 +157,15 @@ endef define Package/ruby/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) - $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER) - $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_ABI_VERSION) + $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION) + $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_ABI_VERSION)-bin $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/ - $(SED) "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby - $(SED) "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_ABI_VERSION)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_ABI_VERSION)/ + $(SED) "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_ABI_VERSION)%" $(1)/usr/bin/ruby + $(SED) "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_ABI_VERSION)-bin%" $(1)/usr/bin/ruby endef define Package/libruby @@ -173,7 +175,7 @@ $(call Package/ruby/Default) CATEGORY:=Libraries TITLE+= (shared library) DEPENDS+= +libpthread +librt +libgmp - ABI_VERSION:=$(PKG_LIBVER) + ABI_VERSION:=$(PKG_ABI_VERSION) endef define Package/libruby/install $(INSTALL_DIR) $(1)/usr/lib @@ -200,25 +202,25 @@ define Package/ruby-stdlib/install endef define Package/ruby-bigdecimal/files -/usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so -/usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/bigdecimal.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bigdecimal-*.gemspec endef define Package/ruby-cgi/files -/usr/lib/ruby/$(PKG_LIBVER)/cgi -/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/cgi/escape.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi +/usr/lib/ruby/$(PKG_ABI_VERSION)/cgi.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/cgi/escape.so endef define Package/ruby-csv/files -/usr/lib/ruby/$(PKG_LIBVER)/csv.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/csv.rb endef define Package/ruby-datetime/files -/usr/lib/ruby/$(PKG_LIBVER)/time.rb -/usr/lib/ruby/$(PKG_LIBVER)/date.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/time.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/date.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/date_core.so endef define Package/ruby-dbm/description @@ -227,28 +229,28 @@ define Package/ruby-dbm/description endef define Package/ruby-dbm/files -/usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/dbm.so endef define Package/ruby-debuglib/files -/usr/lib/ruby/$(PKG_LIBVER)/profile.rb -/usr/lib/ruby/$(PKG_LIBVER)/profiler.rb -/usr/lib/ruby/$(PKG_LIBVER)/debug.rb -/usr/lib/ruby/$(PKG_LIBVER)/tracer.rb -/usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so +/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_LIBVER)/specifications/did_you_mean-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/did_you_mean-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/did_you_mean-*/ endef define Package/ruby-did-you-mean/files-excluded -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/benchmark -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/doc -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/evaluation -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/test -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/*.md +/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 endef define Package/ruby-digest/description @@ -270,26 +272,26 @@ define Package/ruby-digest/config endef define Package/ruby-digest/files -/usr/lib/ruby/$(PKG_LIBVER)/digest -/usr/lib/ruby/$(PKG_LIBVER)/digest.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/digest.so -/usr/lib/ruby/$(PKG_LIBVER)/*/digest/* +/usr/lib/ruby/$(PKG_ABI_VERSION)/digest +/usr/lib/ruby/$(PKG_ABI_VERSION)/digest.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/digest.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/digest/* endef define Package/ruby-drb/files -/usr/lib/ruby/$(PKG_LIBVER)/drb.rb -/usr/lib/ruby/$(PKG_LIBVER)/drb +/usr/lib/ruby/$(PKG_ABI_VERSION)/drb.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/drb endef define Package/ruby-enc/files -/usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so -/usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so -/usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_*.so -/usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/encdb.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/iso_8859_1.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/utf_*.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/euc_jp.so endef define Package/ruby-enc-extra/files -/usr/lib/ruby/$(PKG_LIBVER)/*/enc +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc endef define Package/ruby-enc-extra/files-excluded $(call Package/ruby-enc/files) @@ -297,59 +299,59 @@ endef define Package/ruby-erb/files /usr/bin/erb -/usr/lib/ruby/$(PKG_LIBVER)/erb.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/erb.rb endef define Package/ruby-fiddle/files -/usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb -/usr/lib/ruby/$(PKG_LIBVER)/fiddle/ -/usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/fiddle.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/fiddle/ +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fiddle.so endef define Package/ruby-filelib/files -/usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb -/usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb -/usr/lib/ruby/$(PKG_LIBVER)/pathname.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so -/usr/lib/ruby/$(PKG_LIBVER)/find.rb -/usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/tmpdir.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/tempfile.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/pathname.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/pathname.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/find.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/fileutils.rb endef define Package/ruby-gdbm/files -/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/gdbm.so endef define Package/ruby-gems/files -/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb -/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb -/usr/lib/ruby/$(PKG_LIBVER)/rubygems +/usr/lib/ruby/$(PKG_ABI_VERSION)/ubygems.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems endef define Package/ruby-gems/files-excluded -/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb -/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb -/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/test_case.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/package/tar_test_case.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rubygems/installer_test_case.rb endef define Package/ruby-gems/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default - $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems - $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc - $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache - $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions - $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/doc + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/cache + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/extensions + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/build_info $(call RubyBuildPackage/install,gems,$(1)) endef define Package/ruby-io-console/files -/usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so -/usr/lib/ruby/$(PKG_LIBVER)/io/console/ -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/console.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/io/console/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/io-console-*.gemspec endef define Package/ruby-irb/files -/usr/lib/ruby/$(PKG_LIBVER)/irb -/usr/lib/ruby/$(PKG_LIBVER)/irb.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/irb +/usr/lib/ruby/$(PKG_ABI_VERSION)/irb.rb endef define Package/ruby-irb/install $(INSTALL_DIR) $(1)/usr/bin @@ -358,159 +360,156 @@ define Package/ruby-irb/install endef define Package/ruby-json/files -/usr/lib/ruby/$(PKG_LIBVER)/json.rb -/usr/lib/ruby/$(PKG_LIBVER)/json -/usr/lib/ruby/$(PKG_LIBVER)/*/json -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec +/usr/lib/ruby/$(PKG_ABI_VERSION)/json.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/json +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/json +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/json-*.gemspec endef define Package/ruby-json/files-excluded $(call Package/ruby-psych/files) endef define Package/ruby-logger/files -/usr/lib/ruby/$(PKG_LIBVER)/logger.rb -/usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/logger.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/syslog/logger.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/syslog.so endef define Package/ruby-math/files -/usr/lib/ruby/$(PKG_LIBVER)/prime.rb -/usr/lib/ruby/$(PKG_LIBVER)/mathn.rb -/usr/lib/ruby/$(PKG_LIBVER)/cmath.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/mathn -/usr/lib/ruby/$(PKG_LIBVER)/matrix.rb -/usr/lib/ruby/$(PKG_LIBVER)/matrix +/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/mathn.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/cmath.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/mathn +/usr/lib/ruby/$(PKG_ABI_VERSION)/matrix.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/matrix endef define Package/ruby-minitest/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/minitest-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-* endef define Package/ruby-minitest/files-excluded -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.rdoc -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.txt +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/test +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/*.rdoc +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/minitest-*/*.txt endef define Package/ruby-misc/files -/usr/lib/ruby/$(PKG_LIBVER)/English.rb -/usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb -/usr/lib/ruby/$(PKG_LIBVER)/base64.rb -/usr/lib/ruby/$(PKG_LIBVER)/delegate.rb -/usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb -/usr/lib/ruby/$(PKG_LIBVER)/expect.rb -/usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb -/usr/lib/ruby/$(PKG_LIBVER)/open3.rb -/usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb -/usr/lib/ruby/$(PKG_LIBVER)/scanf.rb -/usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb -/usr/lib/ruby/$(PKG_LIBVER)/set.rb -/usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb -/usr/lib/ruby/$(PKG_LIBVER)/tsort.rb -/usr/lib/ruby/$(PKG_LIBVER)/weakref.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so -/usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so -/usr/lib/ruby/$(PKG_LIBVER)/*/etc.so -/usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so -/usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so -/usr/lib/ruby/$(PKG_LIBVER)/*/pty.so -/usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so -/usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so +/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)/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)/scanf.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 +/usr/lib/ruby/$(PKG_ABI_VERSION)/tsort.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/weakref.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/continuation.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/coverage.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/etc.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fcntl.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/fiber.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/pty.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/stringio.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/strscan.so endef define Package/ruby-mkmf/files -/usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb -/usr/lib/ruby/$(PKG_LIBVER)/un.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/mkmf.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/un.rb endef define Package/ruby-multithread/files -/usr/lib/ruby/$(PKG_LIBVER)/monitor.rb -/usr/lib/ruby/$(PKG_LIBVER)/timeout.rb -/usr/lib/ruby/$(PKG_LIBVER)/thwait.rb -/usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb -/usr/lib/ruby/$(PKG_LIBVER)/sync.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/thread.so -/usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so -/usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so +/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)/*/io/wait.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/nonblock.so endef define Package/ruby-net/files -/usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb -/usr/lib/ruby/$(PKG_LIBVER)/net/* +/usr/lib/ruby/$(PKG_ABI_VERSION)/open-uri.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/net/* endef define Package/ruby-net-telnet/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/net-telnet-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/net-telnet-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/ endef define Package/ruby-net-telnet/files-excluded -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.md -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.txt +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/*.md +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/net-telnet-*/*.txt endef define Package/ruby-nkf/files -/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/kconv.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/nkf.so endef define Package/ruby-openssl/files -/usr/lib/ruby/$(PKG_LIBVER)/openssl -/usr/lib/ruby/$(PKG_LIBVER)/openssl.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/openssl +/usr/lib/ruby/$(PKG_ABI_VERSION)/openssl.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/openssl.so +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/openssl-*.gemspec endef define Package/ruby-optparse/files -/usr/lib/ruby/$(PKG_LIBVER)/optparse.rb -/usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb -/usr/lib/ruby/$(PKG_LIBVER)/optparse +/usr/lib/ruby/$(PKG_ABI_VERSION)/optparse.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/optionparser.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/optparse endef define Package/ruby-patterns/files -/usr/lib/ruby/$(PKG_LIBVER)/observer.rb -/usr/lib/ruby/$(PKG_LIBVER)/singleton.rb -/usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb +/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 endef define Package/ruby-powerassert/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/power_assert-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/power_assert-* endef define Package/ruby-powerassert/files-excluded -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/power_assert-*/test endef define Package/ruby-prettyprint/files -/usr/lib/ruby/$(PKG_LIBVER)/pp.rb -/usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/pp.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/prettyprint.rb endef define Package/ruby-pstore/files -/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/pstore.rb endef define Package/ruby-psych/files -/usr/lib/ruby/$(PKG_LIBVER)/psych -/usr/lib/ruby/$(PKG_LIBVER)/psych.rb -/usr/lib/ruby/$(PKG_LIBVER)/psych_jars.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/psych.so -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec +/usr/lib/ruby/$(PKG_ABI_VERSION)/psych +/usr/lib/ruby/$(PKG_ABI_VERSION)/psych.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/psych.so +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/psych-*.gemspec endef define Package/ruby-racc/files -/usr/lib/ruby/$(PKG_LIBVER)/racc -/usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/racc +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/racc/*.so endef define Package/ruby-rake/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/rake-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/ +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/rake-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/ endef define Package/ruby-rake/files-excluded -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/doc -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/test -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.rdoc -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.txt -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-10.4.2/lib/rake/runtest.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/doc +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/rake-*/*.rdoc endef define Package/ruby-rake/install $(INSTALL_DIR) $(1)/usr/bin @@ -519,21 +518,21 @@ define Package/ruby-rake/install endef define Package/ruby-rbconfig/files -/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb -/usr/lib/ruby/$(PKG_LIBVER)/rbconfig/* -/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/rbconfig.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rbconfig/* +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/rbconfig/*.so endef define Package/ruby-rdoc/files - /usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb - /usr/lib/ruby/$(PKG_LIBVER)/rdoc - /usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* - /usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec + /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc.rb + /usr/lib/ruby/$(PKG_ABI_VERSION)/rdoc + /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_LIBVER)/rdoc/test_case.rb - /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb - /usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb + /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 @@ -543,83 +542,87 @@ define Package/ruby-rdoc/install endef define Package/ruby-readline/files -/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/readline.so endef define Package/ruby-rexml/files -/usr/lib/ruby/$(PKG_LIBVER)/rexml +/usr/lib/ruby/$(PKG_ABI_VERSION)/rexml endef define Package/ruby-rinda/files -/usr/lib/ruby/$(PKG_LIBVER)/rinda +/usr/lib/ruby/$(PKG_ABI_VERSION)/rinda endef define Package/ruby-ripper/files -/usr/lib/ruby/$(PKG_LIBVER)/ripper.rb -/usr/lib/ruby/$(PKG_LIBVER)/ripper -/usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/ripper.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/ripper +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/ripper.so endef define Package/ruby-rss/files -/usr/lib/ruby/$(PKG_LIBVER)/rss -/usr/lib/ruby/$(PKG_LIBVER)/rss.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/rss +/usr/lib/ruby/$(PKG_ABI_VERSION)/rss.rb endef define Package/ruby-sdbm/files -/usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/sdbm.so endef define Package/ruby-shell/files -/usr/lib/ruby/$(PKG_LIBVER)/shell.rb -/usr/lib/ruby/$(PKG_LIBVER)/shell +/usr/lib/ruby/$(PKG_ABI_VERSION)/shell.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/shell endef define Package/ruby-socket/files -/usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb -/usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb -/usr/lib/ruby/$(PKG_LIBVER)/resolv.rb -/usr/lib/ruby/$(PKG_LIBVER)/socket.rb -/usr/lib/ruby/$(PKG_LIBVER)/*/socket.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/ipaddr.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/resolv-replace.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/resolv.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/socket.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/socket.so endef define Package/ruby-testunit/files -/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/test-unit-*.gemspec +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-* endef define Package/ruby-testunit/files-excluded -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/doc -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample -/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/*.md +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/doc +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/test +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/sample +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*/*.md endef define Package/ruby-unicodenormalize/files -/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb -/usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize +/usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize endef define Package/ruby-uri/files -/usr/lib/ruby/$(PKG_LIBVER)/uri.rb -/usr/lib/ruby/$(PKG_LIBVER)/uri +/usr/lib/ruby/$(PKG_ABI_VERSION)/uri.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/uri endef define Package/ruby-webrick/files -/usr/lib/ruby/$(PKG_LIBVER)/webrick -/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/webrick +/usr/lib/ruby/$(PKG_ABI_VERSION)/webrick.rb endef define Package/ruby-xmlrpc/files -/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc -/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-* +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/xmlrpc-*.gemspec +endef +define Package/ruby-xmlrpc/files-excluded +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-0.2.1/*.md +/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/xmlrpc-0.2.1/*.txt endef define Package/ruby-yaml/files -/usr/lib/ruby/$(PKG_LIBVER)/yaml -/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb +/usr/lib/ruby/$(PKG_ABI_VERSION)/yaml +/usr/lib/ruby/$(PKG_ABI_VERSION)/yaml.rb endef define Package/ruby-zlib/files -/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so +/usr/lib/ruby/$(PKG_ABI_VERSION)/*/zlib.so endef RUBY_FILES = $(strip $(call Package/ruby-$(1)/files)) @@ -690,14 +693,14 @@ $(patsubst /%, $$(eval $$(call BuildPackage,ruby-$(1))) endef -$(eval $(call BuildPackage,ruby)) $(eval $(call BuildPackage,libruby)) +$(eval $(call BuildPackage,ruby)) $(eval $(call RubyBuildPackage,bigdecimal,Arbitrary-precision decimal floating-point library,)) $(eval $(call RubyBuildPackage,cgi,CGI support toolkit,+ruby-filelib +ruby-pstore)) -$(eval $(call RubyBuildPackage,csv,CSV library,+ruby-patterns +ruby-datetime +ruby-enc)) +$(eval $(call RubyBuildPackage,csv,CSV library,+ruby-patterns +ruby-datetime +ruby-enc +ruby-misc)) $(eval $(call RubyBuildPackage,datetime,date library)) $(eval $(call RubyBuildPackage,dbm,support for dbm,+libdb47)) -$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-multithread +ruby-prettyprint)) +$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-prettyprint)) $(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-patterns +ruby-socket)) @@ -712,7 +715,7 @@ $(eval $(call RubyBuildPackage,io-console,Console interface,)) $(eval $(call RubyBuildPackage,irb,(interactive shell),+ruby-debuglib +ruby-filelib +ruby-math)) $(eval $(call RubyBuildPackage,json,support for JSON,+ruby-datetime +ruby-misc)) $(eval $(call RubyBuildPackage,logger,logger and syslog library,+ruby-multithread)) -$(eval $(call RubyBuildPackage,math,math library,+ruby-patterns)) +$(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)) @@ -722,24 +725,24 @@ $(eval $(call RubyBuildPackage,net-telnet,telnet client,+ruby-net)) $(eval $(call RubyBuildPackage,nkf,Network Kanji Filter,+ruby-enc)) $(eval $(call RubyBuildPackage,openssl,support for openssl,+ruby-enc +ruby-multithread +libopenssl)) $(eval $(call RubyBuildPackage,optparse,command-line option analysis,+ruby-misc)) -$(eval $(call RubyBuildPackage,patterns,design patterns implementation,+ruby-multithread)) -$(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-ripper)) +$(eval $(call RubyBuildPackage,patterns,design patterns implementation,)) +$(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-ripper +ruby-debuglib)) $(eval $(call RubyBuildPackage,prettyprint,PrettyPrint library,+ruby-misc)) $(eval $(call RubyBuildPackage,pstore,file based persistence,+ruby-digest +ruby-enc)) $(eval $(call RubyBuildPackage,psych,YAML parser and emitter,+ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc +libyaml)) $(eval $(call RubyBuildPackage,racc,LALR parser generator,)) -$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig)) +$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig +ruby-multithread)) $(eval $(call RubyBuildPackage,rbconfig,RbConfig,)) $(eval $(call RubyBuildPackage,rdoc,documentation generator,+ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib)) $(eval $(call RubyBuildPackage,readline,support for readline,+libncurses +libreadline)) -$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-patterns +ruby-enc)) +$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-patterns +ruby-enc +ruby-misc)) $(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb)) $(eval $(call RubyBuildPackage,ripper,script parser,)) $(eval $(call RubyBuildPackage,rss,RSS toolkit,+ruby-net +ruby-nkf +ruby-rexml)) $(eval $(call RubyBuildPackage,sdbm,simple file-based key-value dbm implementation,)) -$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-patterns)) +$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-patterns +ruby-multithread)) $(eval $(call RubyBuildPackage,socket,socket support,+ruby-multithread)) -$(eval $(call RubyBuildPackage,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml)) +$(eval $(call RubyBuildPackage,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-rexml +ruby-yaml)) $(eval $(call RubyBuildPackage,unicodenormalize,String additions for Unicode normalization,+ruby-enc +ruby-enc-extra)) $(eval $(call RubyBuildPackage,uri,library to handle URI,+ruby-socket +ruby-enc)) $(eval $(call RubyBuildPackage,webrick,Web server toolkit,+ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig)) diff --git a/lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch b/lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch deleted file mode 100644 index 271bd71..0000000 --- a/lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch +++ /dev/null @@ -1,152 +0,0 @@ -https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/53414 - -Fixes: - -https://bugs.ruby-lang.org/issues/11941 - -It might be incorporated in the following release - -Index: aclocal.m4 -=================================================================== ---- a/aclocal.m4 (revision 53413) -+++ b/aclocal.m4 (revision 53414) -@@ -1,46 +0,0 @@ --# -*- autoconf -*- -- --AC_DEFUN([_COLORIZE_RESULT_PREPARE], [ -- msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset= -- AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [ -- msg_begin="`tput smso 2>/dev/null`" -- AS_CASE(["$msg_begin"], ['@<:@'*m], -- [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`" -- msg_checking="${msg_begin}33m" -- AS_IF([test ${TEST_COLORS:+set}], [ -- msg_result_yes=[`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`] -- msg_result_no=[`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`] -- msg_result_other=[`expr ":$TEST_COLORS:" : ".*:skip=\([^:]*\):"`] -- ]) -- msg_result_yes="${msg_begin}${msg_result_yes:-32;1}m" -- msg_result_no="${msg_begin}${msg_result_no:-31;1}m" -- msg_result_other="${msg_begin}${msg_result_other:-33;1}m" -- msg_reset="${msg_begin}m" -- ]) -- AS_UNSET(msg_begin) -- ]) -- AS_REQUIRE_SHELL_FN([colorize_result], -- [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])], -- [AS_CASE(["$[]1"], -- [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")], -- [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")], -- [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])]) --]) -- --AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl -- AS_LITERAL_IF([$1], -- [m4_case([$1], -- [yes], [AS_ECHO(["${msg_result_yes}$1${msg_reset}"])], -- [no], [AS_ECHO(["${msg_result_no}$1${msg_reset}"])], -- [AS_ECHO(["${msg_result_other}$1${msg_reset}"])])], -- [colorize_result "$1"]) dnl --]) -- --AC_DEFUN([AC_CHECKING],[dnl --AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl --AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])]) -- --AC_DEFUN([AC_MSG_RESULT], [dnl --{ _AS_ECHO_LOG([result: $1]) --COLORIZE_RESULT([$1]); dnl --}]) -Index: acinclude.m4 -=================================================================== ---- a/acinclude.m4 (revision 0) -+++ b/acinclude.m4 (revision 53414) -@@ -0,0 +1,46 @@ -+# -*- autoconf -*- -+ -+AC_DEFUN([_COLORIZE_RESULT_PREPARE], [ -+ msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset= -+ AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [ -+ msg_begin="`tput smso 2>/dev/null`" -+ AS_CASE(["$msg_begin"], ['@<:@'*m], -+ [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`" -+ msg_checking="${msg_begin}33m" -+ AS_IF([test ${TEST_COLORS:+set}], [ -+ msg_result_yes=[`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`] -+ msg_result_no=[`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`] -+ msg_result_other=[`expr ":$TEST_COLORS:" : ".*:skip=\([^:]*\):"`] -+ ]) -+ msg_result_yes="${msg_begin}${msg_result_yes:-32;1}m" -+ msg_result_no="${msg_begin}${msg_result_no:-31;1}m" -+ msg_result_other="${msg_begin}${msg_result_other:-33;1}m" -+ msg_reset="${msg_begin}m" -+ ]) -+ AS_UNSET(msg_begin) -+ ]) -+ AS_REQUIRE_SHELL_FN([colorize_result], -+ [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])], -+ [AS_CASE(["$[]1"], -+ [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")], -+ [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")], -+ [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])]) -+]) -+ -+AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl -+ AS_LITERAL_IF([$1], -+ [m4_case([$1], -+ [yes], [AS_ECHO(["${msg_result_yes}$1${msg_reset}"])], -+ [no], [AS_ECHO(["${msg_result_no}$1${msg_reset}"])], -+ [AS_ECHO(["${msg_result_other}$1${msg_reset}"])])], -+ [colorize_result "$1"]) dnl -+]) -+ -+AC_DEFUN([AC_CHECKING],[dnl -+AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl -+AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])]) -+ -+AC_DEFUN([AC_MSG_RESULT], [dnl -+{ _AS_ECHO_LOG([result: $1]) -+COLORIZE_RESULT([$1]); dnl -+}]) - -Property changes on: acinclude.m4 -___________________________________________________________________ -Added: svn:eol-style -## -0,0 +1 ## -+LF -\ No newline at end of property -Index: common.mk -=================================================================== ---- a/common.mk (revision 53413) -+++ b/common.mk (revision 53414) -@@ -518,7 +518,7 @@ - $(Q)$(RM) id.c id.h probes.dmyh - $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) parse.c parse.h lex.c enc/trans/newline.c $(PRELUDES) revision.h - $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) id.c id.h probes.dmyh -- $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure tool/config.guess tool/config.sub gems/*.gem -+ $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure aclocal.m4 tool/config.guess tool/config.sub gems/*.gem - realclean-ext:: PHONY - realclean-golf: distclean-golf - $(Q)$(RM) $(GOLFPRELUDES) -Index: Makefile.in -=================================================================== ---- a/Makefile.in (revision 53413) -+++ b/Makefile.in (revision 53414) -@@ -22,6 +22,7 @@ - YACC = bison - PURIFY = - AUTOCONF = autoconf -+ACLOCAL = aclocal - CONFIGURE = @CONFIGURE@ - @SET_MAKE@ - MKFILES = @MAKEFILES@ -@@ -310,6 +311,9 @@ - $(srcdir)/$(CONFIGURE): $(srcdir)/configure.in $(srcdir)/aclocal.m4 - $(CHDIR) $(srcdir) && exec $(AUTOCONF) -o $(@F) - -+$(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4 -+ $(CHDIR) $(srcdir) && exec $(ACLOCAL) -+ - incs: id.h - all-incs: probes.h - diff --git a/lang/ruby/ruby_find_pkgsdeps b/lang/ruby/ruby_find_pkgsdeps index 16f664a..15a6408 100644 --- a/lang/ruby/ruby_find_pkgsdeps +++ b/lang/ruby/ruby_find_pkgsdeps @@ -25,7 +25,7 @@ require_regex_ignore=/^require ([a-zA-Z\$]|["']$|.*\/$)/ require_ignore=%w{drb/invokemethod16 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 - iconv uconv win32ole gettext/po_parser gettext/mo libxml psych.jar jar-dependencies} + iconv uconv win32ole gettext/po_parser gettext/mo libxml psych.jar psych_jars jar-dependencies thread minitest/proveit} builtin_enc=[ Encoding.find("ASCII-8BIT"), @@ -164,7 +164,7 @@ package_requires_files.each do else found = package_files.detect {|(pkg,files)| files.detect {|file| $:.detect {|path| "#{path}/#{require}" == file.gsub(/\.(so|rb)$/,"") } } } if not found - $stderr.puts "#{pkg}: Nothing provides #{require}" + $stderr.puts "#{pkg}: Nothing provides #{require} for #{files.collect {|file| file.sub("/usr/lib/ruby/","") }.join(",")}" failed = true next end diff --git a/lang/ruby/ruby_missingfiles b/lang/ruby/ruby_missingfiles index e23b73d..25e5810 100644 --- a/lang/ruby/ruby_missingfiles +++ b/lang/ruby/ruby_missingfiles @@ -5,7 +5,7 @@ function list_staging_files { cd "$1"; find \ - \( \( -name "root-x86" -or -name "packages" -or -name "stamp" -or -name "pkginfo" \) -prune \) -or -true \ + \( \( -name "root-*" -or -name "packages" -or -name "stamp" -or -name "pkginfo" -or -name "host" \) -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" \ -not -path "*/usr/lib/ruby/gems/*/cache/*" \ diff --git a/libs/boost/Makefile b/libs/boost/Makefile index fd87298..45e9c62 100644 --- a/libs/boost/Makefile +++ b/libs/boost/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015-2016 OpenWrt.org +# Copyright (C) 2015-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -16,15 +16,15 @@ include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=boost -PKG_VERSION:=1.62.0 -PKG_SOURCE_VERSION:=1_62_0 -PKG_RELEASE:=5 +PKG_VERSION:=1.63.0 +PKG_SOURCE_VERSION:=1_63_0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceforge.net/projects/boost/files/boost/$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION) -PKG_MD5SUM:=36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0 +PKG_MD5SUM:=beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0 PKG_LICENSE:=Boost Software License PKG_MAINTAINER:=Carlos M. Ferreira @@ -44,7 +44,7 @@ define Package/boost/Default endef define Package/boost/description -This package provides the Boost v1.62 libraries. +This package provides the Boost v1.63 libraries. Boost is a set of free, peer-reviewed, portable C++ source libraries. ----------------------------------------------------------------------------- @@ -68,7 +68,7 @@ This package provides the following run-time libraries: - date_time - exception - filesystem - - fiber (Requires GCC v5 and up) - BROKEN + - fiber (Requires GCC v5 and up) - graph - - graph-parallel - iostreams @@ -88,7 +88,7 @@ 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_62_0/ +See more at http://www.boost.org/doc/libs/1_63_0/ endef PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3 @@ -336,6 +336,8 @@ TARGET_CFLAGS += \ $(if $(CONFIG_PACKAGE_boost-python3), -I$(STAGING_DIR)/usr/include/python3.5/) \ $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC +EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14) + ifneq ($(findstring mips,$(ARCH)),) BOOST_ABI = o32 ifneq ($(findstring 64,$(ARCH)),) @@ -354,7 +356,7 @@ comma := , define Build/Compile $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CPU_TYPE) $(CPU_SUBTYPE)) ( cd $(PKG_BUILD_DIR) ; \ - echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : \"$(TARGET_CFLAGS)\" \"$(TARGET_CXXFLAGS) $(if $(CONFIG_boost-coroutine2),-std=c++14,)\" \"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \ + echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : \"$(TARGET_CFLAGS)\" \"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" \"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \ $(if $(CONFIG_PACKAGE_boost-python3), \ echo "using python : 3.5 : $(STAGING_DIR_ROOT)/usr/bin/python3 : $(STAGING_DIR)/usr/include/python3.5/ ;" >> \ tools/build/src/user-config.jam; \ @@ -415,11 +417,11 @@ endef define Host/Install $(INSTALL_DIR) \ - $(STAGING_DIR)/host/bin + $(STAGING_DIR_HOSTPKG)/bin $(CP) \ $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 \ - $(STAGING_DIR)/host/bin/ + $(STAGING_DIR_HOSTPKG)/bin/ endef define Package/boost/Default/install diff --git a/libs/boost/patches/01_fiber_fix.patch b/libs/boost/patches/01_fiber_fix.patch index dc62f6f..8989e0b 100644 --- a/libs/boost/patches/01_fiber_fix.patch +++ b/libs/boost/patches/01_fiber_fix.patch @@ -1,8 +1,8 @@ -Index: boost_1_62_0/libs/fiber/build/Jamfile.v2 +Index: boost_1_63_0/libs/fiber/build/Jamfile.v2 =================================================================== ---- boost_1_62_0.orig/libs/fiber/build/Jamfile.v2 -+++ boost_1_62_0/libs/fiber/build/Jamfile.v2 -@@ -43,19 +43,6 @@ lib boost_fiber +--- boost_1_63_0.orig/libs/fiber/build/Jamfile.v2 ++++ boost_1_63_0/libs/fiber/build/Jamfile.v2 +@@ -44,20 +44,6 @@ lib boost_fiber recursive_timed_mutex.cpp timed_mutex.cpp scheduler.cpp @@ -11,6 +11,7 @@ Index: boost_1_62_0/libs/fiber/build/Jamfile.v2 - cxx11_constexpr - cxx11_defaulted_functions - cxx11_final +- cxx11_hdr_mutex - cxx11_hdr_tuple - cxx11_lambdas - cxx11_noexcept diff --git a/libs/dtc/Makefile b/libs/dtc/Makefile new file mode 100644 index 0000000..a2d74a9 --- /dev/null +++ b/libs/dtc/Makefile @@ -0,0 +1,74 @@ +# +# 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:=dtc +PKG_VERSION:=1.4.2 +PKG_RELEASE:=2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://www.kernel.org/pub/software/utils/dtc +PKG_SOURCE_MD5SUM:=3d5814e31b2046ef51fca8fece998db0 +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=GPL +PKG_INSTALL:=1 +PKG_MAINTAINER:=Yousong Zhou + +include $(INCLUDE_DIR)/package.mk + + +define Package/dtc + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Device Tree Compiler + URL:=http://devicetree.org/Device_Tree_Compiler +endef + +define Package/dtc/description + Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes + as input a device-tree in a given format and outputs a device-tree in another + format for booting kernels on embedded systems. +endef + +define Package/dtc/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/bin/dtc $(1)/usr/bin +endef + + +define Package/libfdt + SECTION:=libs + CATEGORY:=Libraries + TITLE:=a utility library for reading and manipulating dtb files + URL:=http://devicetree.org/Device_Tree_Compiler +endef + +define Package/libfdt/description + This is a library containing functions for manipulating Flat Device Trees. +endef + +define Package/libfdt/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib +endef + +TARGET_CFLAGS += \ + $(FPIC) + +MAKE_FLAGS += \ + PREFIX= \ + CFLAGS="$(TARGET_CFLAGS)" + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,dtc)) +$(eval $(call BuildPackage,libfdt)) diff --git a/libs/eventlog/Makefile b/libs/eventlog/Makefile new file mode 100644 index 0000000..d0658ff --- /dev/null +++ b/libs/eventlog/Makefile @@ -0,0 +1,44 @@ +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_MD5SUM:=3d6ebda8a161d36cb40d09328f78786b + +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/expat/Makefile b/libs/expat/Makefile index db599d9..27a8e50 100644 --- a/libs/expat/Makefile +++ b/libs/expat/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=expat -PKG_VERSION:=2.1.0 -PKG_RELEASE:=3 +PKG_VERSION:=2.2.0 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=dd7dab7a5fea97d2a6a43f511449b7cd +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=2f47841c829facb346eb6e3fab5212e2 PKG_SOURCE_URL:=@SF/expat PKG_MAINTAINER:=Steven Barth diff --git a/libs/fftw3/Makefile b/libs/fftw3/Makefile index 7d31b73..e6634da 100644 --- a/libs/fftw3/Makefile +++ b/libs/fftw3/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fftw3 -PKG_VERSION:=3.3.4 +PKG_VERSION:=3.3.6 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0+ PKG_SOURCE:=fftw-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.fftw.org -PKG_MD5SUM:=2edab8c06b24feeb3b82bbb3ebf3e7b3 +PKG_MD5SUM:=ccd91b5b12bd0a441e100070ff09a310 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/fftw-$(PKG_VERSION) PKG_FIXUP:=autoreconf diff --git a/libs/fftw3/patches/001-makefile.patch b/libs/fftw3/patches/001-makefile.patch index c5dd857..6f56fa6 100644 --- a/libs/fftw3/patches/001-makefile.patch +++ b/libs/fftw3/patches/001-makefile.patch @@ -1,19 +1,19 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -232,7 +232,7 @@ +@@ -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 - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - distdir = $(PACKAGE)-$(VERSION) - top_distdir = $(distdir) -@@ -444,7 +444,7 @@ - # - @COMBINED_THREADS_TRUE@CHICKEN_EGG = threads . + 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 doc tools m4 +-libbench2 $(CHICKEN_EGG) tests mpi $(DOCDIR) tools m4 +libbench2 $(CHICKEN_EGG) mpi m4 EXTRA_DIST = COPYRIGHT bootstrap.sh CONVENTIONS fftw.pc.in diff --git a/libs/glib2/Makefile b/libs/glib2/Makefile index 013e23b..dce64f9 100644 --- a/libs/glib2/Makefile +++ b/libs/glib2/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glib2 -PKG_VERSION:=2.49.7 -PKG_RELEASE:=1 +PKG_VERSION:=2.50.2 +PKG_RELEASE:=2 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION) -PKG_SOURCE_URL:=@GNOME/glib/2.49 -PKG_MD5SUM:=397ead3fcf325cb921d54e2c9e7dfd7a +PKG_SOURCE_URL:=@GNOME/glib/2.50 +PKG_MD5SUM:=5eeb2bfaf78a07be59585e8b6e80b1d6 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -47,13 +47,15 @@ endef HOST_CONFIGURE_ARGS += \ --disable-selinux \ --with-libiconv=gnu \ - --with-pcre=internal + --with-pcre=internal \ + --enable-libmount=no CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --enable-debug=no \ --disable-selinux \ + --enable-libmount=no \ --disable-fam \ --with-libiconv=gnu \ --with-pcre=internal @@ -61,7 +63,7 @@ CONFIGURE_ARGS += \ CONFIGURE_VARS += \ glib_cv_stack_grows=no \ glib_cv_uscore=no \ - ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR)/host/bin/glib-genmarshal \ + ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOSTPKG)/bin/glib-genmarshal \ ac_cv_func_mmap_fixed_mapped=yes \ ac_cv_func_posix_getpwuid_r=yes \ ac_cv_func_posix_getgrgid_r=yes diff --git a/libs/gnutls/Makefile b/libs/gnutls/Makefile index 69cac8d..aba3255 100644 --- a/libs/gnutls/Makefile +++ b/libs/gnutls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnutls -PKG_VERSION:=3.5.6 +PKG_VERSION:=3.5.11 PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5 -PKG_MD5SUM:=7a38b23757aae009c3eb5bb12fb0afda +PKG_HASH:=51765cc5579e250da77fbd7871507c517d01b15353cc40af7b67e9ec7b6fe28f #PKG_FIXUP:=autoreconf gettext-version PKG_MAINTAINER:=Nikos Mavrogiannopoulos PKG_LICENSE:=LGPLv2.1+ @@ -110,8 +110,10 @@ CONFIGURE_ARGS+= \ --enable-static \ --disable-rpath \ --disable-libdane \ + --with-included-unistring \ --disable-guile \ --disable-nls \ + --without-idn \ --without-zlib \ --enable-local-libopts \ --disable-doc \ diff --git a/libs/icu/Makefile b/libs/icu/Makefile index c70ac16..ecf261e 100644 --- a/libs/icu/Makefile +++ b/libs/icu/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2016 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:=icu4c -PKG_VERSION:=55.1 -PKG_RELEASE:=1 +PKG_VERSION:=58.2 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-55_1-src.tgz -PKG_SOURCE_URL:=http://download.icu-project.org/files/icu4c/55.1 -PKG_MD5SUM:=e2d523df79d6cb7855c2fbe284f4db29 +PKG_SOURCE:=$(PKG_NAME)-58_2-src.tgz +PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION) +PKG_MD5SUM:=fac212b32b7ec7ab007a12dff1f3aea1 PKG_LICENSE:=ICU-1.8.1+ -PKG_LICENSE_FILES:=license.html +PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Mirko Vogt +PKG_MAINTAINER:=Hirokazu MORIKAWA PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -26,7 +26,6 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DEPENDS:=icu/host - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -41,25 +40,39 @@ define Package/icu DEPENDS:=+libstdcpp +libpthread endef -define Build/Configure - $(call Build/Configure/Default, \ - --disable-debug \ - --enable-release \ - --enable-shared \ - --enable-static \ - --enable-draft \ - --enable-renaming \ - --disable-tracing \ - --disable-extras \ - --enable-dyload \ - --enable-layout \ - --enable-layoutex \ - --disable-tools \ - --disable-tests \ - --disable-samples \ - --with-cross-build="$(HOST_BUILD_DIR)" \ - ) -endef +CONFIGURE_CMD:= ./runConfigureICU +CONFIGURE_VARS:= +CONFIGURE_ARGS:= \ + Linux/gcc \ + --disable-debug \ + --enable-release \ + --enable-shared \ + --enable-static \ + --enable-draft \ + --enable-renaming \ + --disable-tracing \ + --disable-extras \ + --enable-dyload \ + --disable-tools \ + --disable-tests \ + --disable-samples \ + --with-cross-build="$(HOST_BUILD_DIR)" \ + --prefix=/usr + +HOST_CONFIGURE_CMD:= ./runConfigureICU +HOST_CONFIGURE_VARS:= +HOST_CONFIGURE_ARGS:= \ + Linux/gcc \ + --disable-debug \ + --enable-release \ + --enable-shared \ + --enable-static \ + --enable-draft \ + --enable-renaming \ + --disable-tracing \ + --disable-extras \ + --enable-dyload \ + --prefix=$(HOST_BUILD_PREFIX) define Build/InstallDev $(INSTALL_DIR) \ diff --git a/libs/icu/patches/000-dont-cpy-files-from-topdirs.patch b/libs/icu/patches/000-dont-cpy-files-from-topdirs.patch index cc7d938..8b8cb7b 100644 --- a/libs/icu/patches/000-dont-cpy-files-from-topdirs.patch +++ b/libs/icu/patches/000-dont-cpy-files-from-topdirs.patch @@ -6,7 +6,7 @@ index 9db6c52..6aa2273 100644 $(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig $(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/ -- $(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html +- $(INSTALL_DATA) $(top_srcdir)/../LICENSE $(DESTDIR)$(pkgdatadir)/LICENSE $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc $(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc diff --git a/libs/icu/patches/001-disable-strtod_l.patch b/libs/icu/patches/001-disable-strtod_l.patch new file mode 100644 index 0000000..b84d14f --- /dev/null +++ b/libs/icu/patches/001-disable-strtod_l.patch @@ -0,0 +1,26 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -893,8 +893,8 @@ + AC_CHECK_FUNC(strtod_l) + if test x$ac_cv_func_strtod_l = xyes + then +- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1" +- U_HAVE_STRTOD_L=1 ++ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0" ++ U_HAVE_STRTOD_L=0 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0" + U_HAVE_STRTOD_L=0 +--- a/configure ++++ b/configure +@@ -7053,8 +7053,8 @@ + + if test x$ac_cv_func_strtod_l = xyes + then +- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1" +- U_HAVE_STRTOD_L=1 ++ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0" ++ U_HAVE_STRTOD_L=0 + else + CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0" + U_HAVE_STRTOD_L=0 diff --git a/libs/icu/patches/CVE-2017-7867_CVE-2017-7868.patch b/libs/icu/patches/CVE-2017-7867_CVE-2017-7868.patch new file mode 100644 index 0000000..accba5f --- /dev/null +++ b/libs/icu/patches/CVE-2017-7867_CVE-2017-7868.patch @@ -0,0 +1,176 @@ +Index: source/test/intltest/utxttest.h +=================================================================== +--- source/test/intltest/utxttest.h (revision 39670) ++++ source/test/intltest/utxttest.h (revision 39671) +@@ -38,6 +38,7 @@ + void Ticket10562(); + void Ticket10983(); + void Ticket12130(); ++ void Ticket12888(); + + private: + struct m { // Map between native indices & code points. +Index: source/test/intltest/utxttest.cpp +=================================================================== +--- source/test/intltest/utxttest.cpp (revision 39670) ++++ source/test/intltest/utxttest.cpp (revision 39671) +@@ -67,6 +67,8 @@ + if (exec) Ticket10983(); break; + case 7: name = "Ticket12130"; + if (exec) Ticket12130(); break; ++ case 8: name = "Ticket12888"; ++ if (exec) Ticket12888(); break; + default: name = ""; break; + } + } +@@ -1583,3 +1585,63 @@ + } + utext_close(&ut); + } ++ ++// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal, ++// six byte utf-8 forms. Original implementation had an assumption that ++// there would be at most three utf-8 bytes per UTF-16 code unit. ++// The five and six byte sequences map to a single replacement character. ++ ++void UTextTest::Ticket12888() { ++ const char *badString = ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80" ++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"; ++ ++ UErrorCode status = U_ZERO_ERROR; ++ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status)); ++ TEST_SUCCESS(status); ++ for (;;) { ++ UChar32 c = utext_next32(ut.getAlias()); ++ if (c == U_SENTINEL) { ++ break; ++ } ++ } ++ int32_t endIdx = utext_getNativeIndex(ut.getAlias()); ++ if (endIdx != (int32_t)strlen(badString)) { ++ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx); ++ return; ++ } ++ ++ for (int32_t prevIndex = endIdx; prevIndex>0;) { ++ UChar32 c = utext_previous32(ut.getAlias()); ++ int32_t currentIndex = utext_getNativeIndex(ut.getAlias()); ++ if (c != 0xfffd) { ++ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n", ++ __FILE__, __LINE__, 0xfffd, c, currentIndex); ++ break; ++ } ++ if (currentIndex != prevIndex - 6) { ++ errln("%s:%d: wrong index. Expected, actual = %d, %d", ++ __FILE__, __LINE__, prevIndex - 6, currentIndex); ++ break; ++ } ++ prevIndex = currentIndex; ++ } ++} +Index: source/common/utext.cpp +=================================================================== +--- source/common/utext.cpp (revision 39670) ++++ source/common/utext.cpp (revision 39671) +@@ -847,9 +847,15 @@ + //------------------------------------------------------------------------------ + + // Chunk size. +-// Must be less than 85, because of byte mapping from UChar indexes to native indexes. +-// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes +-// to two UChars.) ++// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes. ++// Worst case there are six UTF-8 bytes per UChar. ++// obsolete 6 byte form fd + 5 trails maps to fffd ++// obsolete 5 byte form fc + 4 trails maps to fffd ++// non-shortest 4 byte forms maps to fffd ++// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit ++// mapToUChars array size must allow for the worst case, 6. ++// This could be brought down to 4, by treating fd and fc as pure illegal, ++// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros. + // + enum { UTF8_TEXT_CHUNK_SIZE=32 }; + +@@ -889,7 +895,7 @@ + // Requires two extra slots, + // one for a supplementary starting in the last normal position, + // and one for an entry for the buffer limit position. +- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to ++ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to + // correspoding offset in filled part of buf. + int32_t align; + }; +@@ -1032,6 +1038,7 @@ + // Requested index is in this buffer. + u8b = (UTF8Buf *)ut->p; // the current buffer + mapIndex = ix - u8b->toUCharsMapStart; ++ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars)); + ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx; + return TRUE; + +@@ -1298,6 +1305,10 @@ + // Can only do this if the incoming index is somewhere in the interior of the string. + // If index is at the end, there is no character there to look at. + if (ix != ut->b) { ++ // Note: this function will only move the index back if it is on a trail byte ++ // and there is a preceding lead byte and the sequence from the lead ++ // through this trail could be part of a valid UTF-8 sequence ++ // Otherwise the index remains unchanged. + U8_SET_CP_START(s8, 0, ix); + } + +@@ -1311,7 +1322,10 @@ + UChar *buf = u8b->buf; + uint8_t *mapToNative = u8b->mapToNative; + uint8_t *mapToUChars = u8b->mapToUChars; +- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1); ++ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1; ++ // Note that toUCharsMapStart can be negative. Happens when the remaining ++ // text from current position to the beginning is less than the buffer size. ++ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry. + int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region + // at end of buffer to leave room + // for a surrogate pair at the +@@ -1338,6 +1352,7 @@ + if (c<0x80) { + // Special case ASCII range for speed. + buf[destIx] = (UChar)c; ++ U_ASSERT(toUCharsMapStart <= srcIx); + mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx; + mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart); + } else { +@@ -1367,6 +1382,7 @@ + do { + mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx; + } while (sIx >= srcIx); ++ U_ASSERT(toUCharsMapStart <= (srcIx+1)); + + // Set native indexing limit to be the current position. + // We are processing a non-ascii, non-native-indexing char now; +@@ -1541,6 +1557,7 @@ + U_ASSERT(index>=ut->chunkNativeStart+ut->nativeIndexingLimit); + U_ASSERT(index<=ut->chunkNativeLimit); + int32_t mapIndex = index - u8b->toUCharsMapStart; ++ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars)); + int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx; + U_ASSERT(offset>=0 && offset<=ut->chunkLength); + return offset; diff --git a/libs/libcanfestival/Makefile b/libs/libcanfestival/Makefile new file mode 100644 index 0000000..9758ef3 --- /dev/null +++ b/libs/libcanfestival/Makefile @@ -0,0 +1,71 @@ +# +# 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:=3 + +PKG_SOURCE_PROTO:=hg +PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3 +PKG_SOURCE_SUBDIR:=$(PKG_NAME) +PKG_SOURCE_VERSION:=8bfe0ac00cdb +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 + +PKG_MAINTAINER:=Anton Glukhov +PKG_LICENSE:=LGPL-2.1+ +PKG_LICENSE_FILES:=LICENCE + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +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 new file mode 100644 index 0000000..7e15ff1 --- /dev/null +++ b/libs/libcanfestival/patches/001-sigval-ref-fix.patch @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 0000000..129743f --- /dev/null +++ b/libs/libcanfestival/patches/002-makefile-gcc-linker.patch @@ -0,0 +1,33 @@ +--- 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 new file mode 100644 index 0000000..e52fc6a --- /dev/null +++ b/libs/libcanfestival/patches/003-makefile-skip-examples.patch @@ -0,0 +1,20 @@ +--- 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/libcoap/Makefile b/libs/libcoap/Makefile new file mode 100644 index 0000000..fb220a9 --- /dev/null +++ b/libs/libcoap/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:=libcoap +PKG_RELEASE:=3 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/obgm/libcoap +PKG_SOURCE_SUBDIR:=$(PKG_NAME) +PKG_SOURCE_VERSION:=2da31de732c0e51a9bc9e1d4aea21e25da89cf87 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 + +PKG_MAINTAINER:=Anton Glukhov +PKG_LICENSE:=GPL-2.0+ BSD-2-Clause +PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libcoap + SECTION:=libs + CATEGORY:=Libraries + TITLE:=CoAP (RFC 7252) library + URL:=http://libcoap.net/ +endef + +define Package/libcoap/description + Constrained Application Protocol (RFC 7252) library +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --disable-examples \ + --disable-documentation + +ifeq ($(CONFIG_BIG_ENDIAN),y) +TARGET_CFLAGS += -DWORDS_BIGENDIAN +endif + +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/libcoap/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libcoap)) diff --git a/libs/libevhtp/Makefile b/libs/libevhtp/Makefile deleted file mode 100644 index a81e7ab..0000000 --- a/libs/libevhtp/Makefile +++ /dev/null @@ -1,51 +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. -# - -# NOTE: please DO NOT update this package without the maintainer's consent. -# See https://github.com/haiwen/seafile/issues/1119 - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libevhtp -PKG_VERSION:=1.1.6 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/ellzey/libevhtp.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=91071e2f20749cd469b87ac2ef1c158dc2a6806f -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.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 -endef - -define Package/libevhtp/description - Libevhtp was created as a replacement API for Libevent's current HTTP API. - The reality of libevent's http interface is that it was created as a JIT server, - meaning the developer never thought of it being used for creating a full-fledged HTTP service. -endef - -include $(INCLUDE_DIR)/cmake.mk - -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/ -endef - -$(eval $(call BuildPackage,libevhtp)) 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 072b76b..0000000 --- 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 c290bdd..0588304 100644 --- a/libs/libexif/Makefile +++ b/libs/libexif/Makefile @@ -41,6 +41,7 @@ CONFIGURE_ARGS+= \ --enable-shared \ --enable-static \ --disable-rpath \ + --disable-nls \ --without-libiconv-prefix \ --without-libintl-prefix \ diff --git a/libs/libextractor/Makefile b/libs/libextractor/Makefile index ddccc88..914dd56 100644 --- a/libs/libextractor/Makefile +++ b/libs/libextractor/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2015 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:=libextractor PKG_VERSION:=1.3 -PKG_RELEASE:=3 +PKG_RELEASE:=4 # ToDo: # - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy @@ -17,6 +15,7 @@ PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) PKG_MD5SUM:=35b8913dbebafe583a2781bf71509c48 +PKG_HASH:=868ad64c9a056d6b923d451d746935bffb1ddf5d89c3eb4f67d786001a3f7b7f PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING @@ -31,7 +30,7 @@ PLUGINS:= \ dvi \ flac:+libflac \ gif:+giflib \ - gstreamer:+libgstreamer1:+libgst1app:+libgst1pbutils:+libgst1tag \ + gstreamer:+libgstreamer1:+gstreamer1-plugins-base:+libgst1app:+libgst1pbutils:+libgst1tag \ it \ jpeg:+libjpeg \ man \ diff --git a/libs/libextractor/patches/002-ffmpeg2.9_api_backport.patch b/libs/libextractor/patches/002-ffmpeg2.9_api_backport.patch new file mode 100644 index 0000000..f875729 --- /dev/null +++ b/libs/libextractor/patches/002-ffmpeg2.9_api_backport.patch @@ -0,0 +1,347 @@ +--- a/src/plugins/thumbnailffmpeg_extractor.c ++++ b/src/plugins/thumbnailffmpeg_extractor.c +@@ -59,6 +59,20 @@ + #include + #endif + ++#if USE_JPEG ++#ifdef PIX_FMT_YUVJ420P ++#define PIX_OUTPUT_FORMAT PIX_FMT_YUVJ420P ++#else ++#define PIX_OUTPUT_FORMAT AV_PIX_FMT_YUVJ420P ++#endif ++#else ++#ifdef PIX_FMT_RGB24 ++#define PIX_OUTPUT_FORMAT PIX_FMT_RGB24 ++#else ++#define PIX_OUTPUT_FORMAT AV_PIX_FMT_RGB24 ++#endif ++#endif ++ + /** + * Set to 1 to enable debug output. + */ +@@ -153,7 +167,7 @@ + static size_t + create_thumbnail (int src_width, int src_height, + int src_stride[], +- enum PixelFormat src_pixfmt, ++ enum AVPixelFormat src_pixfmt, + const uint8_t * const src_data[], + int dst_width, int dst_height, + uint8_t **output_data, +@@ -189,7 +203,8 @@ + if (NULL == + (scaler_ctx = + sws_getContext (src_width, src_height, src_pixfmt, +- dst_width, dst_height, PIX_FMT_RGB24, ++ dst_width, dst_height, ++ PIX_OUTPUT_FORMAT, + SWS_BILINEAR, NULL, NULL, NULL))) + { + #if DEBUG +@@ -199,7 +214,12 @@ + return 0; + } + +- if (NULL == (dst_frame = avcodec_alloc_frame ())) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ dst_frame = av_frame_alloc (); ++#else ++ dst_frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == dst_frame) + { + #if DEBUG + fprintf (stderr, +@@ -209,18 +229,24 @@ + return 0; + } + if (NULL == (dst_buffer = +- av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height)))) ++ av_malloc (avpicture_get_size (PIX_OUTPUT_FORMAT, ++ dst_width, dst_height)))) + { + #if DEBUG + fprintf (stderr, + "Failed to allocate the destination image buffer\n"); + #endif +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + return 0; + } + avpicture_fill ((AVPicture *) dst_frame, dst_buffer, +- PIX_FMT_RGB24, dst_width, dst_height); ++ PIX_OUTPUT_FORMAT, ++ dst_width, dst_height); + sws_scale (scaler_ctx, + src_data, + src_stride, +@@ -236,7 +262,11 @@ + "Failed to allocate the encoder output buffer\n"); + #endif + av_free (dst_buffer); +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + return 0; + } +@@ -249,13 +279,17 @@ + #endif + av_free (encoder_output_buffer); + av_free (dst_buffer); +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + return 0; + } + encoder_codec_ctx->width = dst_width; + encoder_codec_ctx->height = dst_height; +- encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24; ++ encoder_codec_ctx->pix_fmt = PIX_OUTPUT_FORMAT; + opts = NULL; + if (avcodec_open2 (encoder_codec_ctx, encoder_codec, &opts) < 0) + { +@@ -263,10 +297,14 @@ + fprintf (stderr, + "Failed to open the encoder\n"); + #endif +- av_free (encoder_codec_ctx); ++ avcodec_free_context (&encoder_codec_ctx); + av_free (encoder_output_buffer); + av_free (dst_buffer); +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + return 0; + } +@@ -295,9 +333,13 @@ + cleanup: + av_dict_free (&opts); + avcodec_close (encoder_codec_ctx); +- av_free (encoder_codec_ctx); ++ avcodec_free_context (&encoder_codec_ctx); + av_free (dst_buffer); +- av_free (dst_frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&dst_frame); ++#else ++ avcodec_free_frame (&dst_frame); ++#endif + sws_freeContext (scaler_ctx); + *output_data = encoder_output_buffer; + +@@ -406,18 +448,23 @@ + fprintf (stderr, + "Failed to open image codec\n"); + #endif +- av_free (codec_ctx); ++ avcodec_free_context (&codec_ctx); + return; + } + av_dict_free (&opts); +- if (NULL == (frame = avcodec_alloc_frame ())) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ frame = av_frame_alloc (); ++#else ++ frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == frame) + { + #if DEBUG + fprintf (stderr, + "Failed to allocate frame\n"); + #endif + avcodec_close (codec_ctx); +- av_free (codec_ctx); ++ avcodec_free_context (&codec_ctx); + return; + } + +@@ -441,9 +488,13 @@ + fprintf (stderr, + "Failed to decode a complete frame\n"); + #endif +- av_free (frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&frame); ++#else ++ avcodec_free_frame (&frame); ++#endif + avcodec_close (codec_ctx); +- av_free (codec_ctx); ++ avcodec_free_context (&codec_ctx); + return; + } + calculate_thumbnail_dimensions (codec_ctx->width, codec_ctx->height, +@@ -467,9 +518,13 @@ + err); + av_free (encoded_thumbnail); + } +- av_free (frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&frame); ++#else ++ avcodec_free_frame (&frame); ++#endif + avcodec_close (codec_ctx); +- av_free (codec_ctx); ++ avcodec_free_context (&codec_ctx); + } + + +@@ -563,7 +618,12 @@ + return; + } + +- if (NULL == (frame = avcodec_alloc_frame ())) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ frame = av_frame_alloc (); ++#else ++ frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == frame) + { + #if DEBUG + fprintf (stderr, +@@ -616,7 +676,11 @@ + fprintf (stderr, + "Failed to decode a complete frame\n"); + #endif +- av_free (frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&frame); ++#else ++ avcodec_free_frame (&frame); ++#endif + avcodec_close (codec_ctx); + avformat_close_input (&format_ctx); + av_free (io_ctx); +@@ -643,7 +707,11 @@ + err); + av_free (encoded_thumbnail); + } +- av_free (frame); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&frame); ++#else ++ avcodec_free_frame (&frame); ++#endif + avcodec_close (codec_ctx); + avformat_close_input (&format_ctx); + av_free (io_ctx); +--- a/src/plugins/previewopus_extractor.c ++++ b/src/plugins/previewopus_extractor.c +@@ -296,7 +296,12 @@ + /** Initialize one audio frame for reading from the input file */ + static int init_input_frame(AVFrame **frame) + { +- if (!(*frame = avcodec_alloc_frame())) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ *frame = av_frame_alloc (); ++#else ++ *frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == *frame) { + #if DEBUG + fprintf(stderr, "Could not allocate input frame\n"); + #endif +@@ -655,7 +660,11 @@ + av_freep(&converted_input_samples[0]); + free(converted_input_samples); + } ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&input_frame); ++#else + avcodec_free_frame(&input_frame); ++#endif + + return ret; + } +@@ -671,7 +680,12 @@ + int error; + + /** Create a new frame to store the audio samples. */ +- if (!(*frame = avcodec_alloc_frame())) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ *frame = av_frame_alloc (); ++#else ++ *frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == *frame) { + #if DEBUG + fprintf(stderr, "Could not allocate output frame\n"); + #endif +@@ -702,7 +716,11 @@ + #if DEBUG + fprintf(stderr, "Could allocate output frame samples (error '%s')\n", get_error_text(error)); + #endif ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (frame); ++#else + avcodec_free_frame(frame); ++#endif + return error; + } + +@@ -783,17 +801,29 @@ + #if DEBUG + fprintf(stderr, "Could not read data from FIFO\n"); + #endif ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&output_frame); ++#else + avcodec_free_frame(&output_frame); ++#endif + return AVERROR_EXIT; + } + + /** Encode one frame worth of audio samples. */ + if (encode_audio_frame(output_frame, output_format_context, + output_codec_context, &data_written)) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&output_frame); ++#else + avcodec_free_frame(&output_frame); ++#endif + return AVERROR_EXIT; + } ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ av_frame_free (&output_frame); ++#else + avcodec_free_frame(&output_frame); ++#endif + return 0; + } + /** Write the trailer of the output file container. */ +@@ -907,7 +937,12 @@ + return; + } + +- if (NULL == (frame = avcodec_alloc_frame ())) ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) ++ frame = av_frame_alloc (); ++#else ++ frame = avcodec_alloc_frame(); ++#endif ++ if (NULL == frame) + { + #if DEBUG + fprintf (stderr, diff --git a/libs/libgd/Makefile b/libs/libgd/Makefile index 0309ff2..3749982 100644 --- a/libs/libgd/Makefile +++ b/libs/libgd/Makefile @@ -54,7 +54,7 @@ CONFIGURE_ARGS += \ --without-iconv CONFIGURE_VARS += \ - LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config" \ + LIBPNG12_CONFIG="$(STAGING_DIR_HOSTPKG)/bin/libpng12-config" \ ac_cv_header_iconv_h=no define Build/InstallDev diff --git a/libs/libgee/Makefile b/libs/libgee/Makefile index 9be5648..27b353c 100644 --- a/libs/libgee/Makefile +++ b/libs/libgee/Makefile @@ -57,10 +57,10 @@ define Build/InstallDev $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ $(1)/usr/lib/pkgconfig/ - $(INSTALL_DIR) $(STAGING_DIR)/host/share/vala-0.30/vapi/ + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi/ $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/share/vala/vapi/* \ - $(STAGING_DIR)/host/share/vala-0.30/vapi + $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi endef define Package/libgee/install diff --git a/libs/libidn/Makefile b/libs/libidn/Makefile index d7f5247..2d20216 100644 --- a/libs/libidn/Makefile +++ b/libs/libidn/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libidn PKG_VERSION:=1.33 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/libidn @@ -28,7 +28,7 @@ define Package/idn/Default SECTION:=net CATEGORY:=Network URL:=http://www.gnu.org/software/libidn/ - MAINTAINER:=Marcel Denia + MAINTAINER:=Kevin Darbyshire-Bryant endef define Package/idn/Default/description @@ -79,6 +79,8 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libidn.pc $(1)/usr/lib/pkgconfig/ endef define Package/idn/install diff --git a/libs/libidn/patches/002-disable-po-docs-examples.patch b/libs/libidn/patches/002-disable-po-docs-examples.patch index e99f2a1..dcac7c4 100644 --- a/libs/libidn/patches/002-disable-po-docs-examples.patch +++ b/libs/libidn/patches/002-disable-po-docs-examples.patch @@ -11,7 +11,7 @@ EXTRA_DIST = cfg.mk maint.mk .clcopying --- a/configure.ac +++ b/configure.ac -@@ -48,8 +48,6 @@ AC_PROG_LIBTOOL +@@ -47,8 +47,6 @@ LT_INIT([win32-dll]) # Checks for programs. AM_MISSING_PROG(PERL, perl, $missing_dir) AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) diff --git a/libs/libidn/patches/010-fix-idn-error-usage.patch b/libs/libidn/patches/010-fix-idn-error-usage.patch index 9b7ab2c..e9201c4 100644 --- a/libs/libidn/patches/010-fix-idn-error-usage.patch +++ b/libs/libidn/patches/010-fix-idn-error-usage.patch @@ -1,6 +1,6 @@ --- a/src/idn.c +++ b/src/idn.c -@@ -169,7 +169,7 @@ main (int argc, char *argv[]) +@@ -170,7 +170,7 @@ main (int argc, char *argv[]) (args_info.idna_to_unicode_given ? 1 : 0) + (args_info.nfkc_given ? 1 : 0) != 1) { @@ -9,7 +9,7 @@ usage (EXIT_FAILURE); } -@@ -184,7 +184,7 @@ main (int argc, char *argv[]) +@@ -185,7 +185,7 @@ main (int argc, char *argv[]) if (!args_info.quiet_given && args_info.inputs_num == 0 && isatty (fileno (stdin))) @@ -18,7 +18,7 @@ "terminated by a newline character.\n")); do -@@ -199,7 +199,7 @@ main (int argc, char *argv[]) +@@ -197,7 +197,7 @@ main (int argc, char *argv[]) if (feof (stdin)) break; @@ -26,8 +26,8 @@ + error (EXIT_FAILURE, errno, "%s", _("input error")); } - if (readbuf[strlen (readbuf) - 1] == '\n') -@@ -216,7 +216,7 @@ main (int argc, char *argv[]) + if (strlen (line) > 0) +@@ -215,7 +215,7 @@ main (int argc, char *argv[]) if (!q) { free (p); @@ -36,7 +36,7 @@ _("could not convert from UTF-8 to UCS-4")); } -@@ -241,7 +241,7 @@ main (int argc, char *argv[]) +@@ -240,7 +240,7 @@ main (int argc, char *argv[]) if (!q) { free (r); diff --git a/libs/liblz4/Makefile b/libs/liblz4/Makefile index fd173e5..6e52067 100644 --- a/libs/liblz4/Makefile +++ b/libs/liblz4/Makefile @@ -16,7 +16,7 @@ PKG_RELEASE:=1 PKG_LICENSE:=BSD-2-Clause PKG_MAINTAINER:=Darik Horn -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/Cyan4973/lz4.git diff --git a/libs/liboping/Makefile b/libs/liboping/Makefile index faca681..ffed96d 100644 --- a/libs/liboping/Makefile +++ b/libs/liboping/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=liboping -PKG_VERSION:=1.6.2 +PKG_VERSION:=1.9.0 PKG_RELEASE:=1 PKG_MAINTAINER:=Jo-Philipp Wich -PKG_LICENSE:=GPL-2.0 +PKG_LICENSE:=LGPL-2.1+ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://verplant.org/liboping/files -PKG_MD5SUM:=64a6f31310093d2517cfe7f05aa011e0 +PKG_SOURCE_URL:=https://noping.cc/files +PKG_MD5SUM:=9c9f65bfd297d7e7092c7f219c31f66a PKG_FIXUP:=autoreconf diff --git a/libs/libpng/Makefile b/libs/libpng/Makefile index 2ff620a..a4eda8e 100644 --- a/libs/libpng/Makefile +++ b/libs/libpng/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libpng -PKG_VERSION:=1.2.56 +PKG_VERSION:=1.2.57 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/libpng -PKG_MD5SUM:=868562bd1c58b76ed8703f135a2e439a +PKG_MD5SUM:=307052e5e8af97b82b17b64fb1b3677a PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause diff --git a/libs/libshout/Makefile b/libs/libshout/Makefile index aeff853..d491e32 100644 --- a/libs/libshout/Makefile +++ b/libs/libshout/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2008-2015 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -8,17 +6,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libshout -PKG_VERSION:=2.3.1 -PKG_RELEASE:=3 +PKG_VERSION:=2.4.1 +PKG_RELEASE:=1 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_MD5SUM:=11765b2592e7ea623ccd93d3f8df172c +PKG_MD5SUM:=89cebf8cb0197f639cde69c95177fe47 +PKG_HASH:=f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d PKG_LICENSE:=LGPL-2.0+ PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_MAINTAINER:=Nicolas Thill , \ + Ted Hess PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -29,24 +29,31 @@ define Package/libshout/default SECTION:=libs CATEGORY:=Libraries TITLE:=Shoutcast client library - URL:=http://www.icecast.org/download.php - DEPENDS:= +libvorbis +libvorbisidec +libpthread + URL:=http://www.icecast.org + DEPENDS:= +libvorbisidec +libpthread endef define Package/libshout $(call Package/libshout/default) - TITLE+= (no speex & theora) - VARIANT:=nospeex + TITLE+= (no theora) + DEPENDS+= +libopenssl + VARIANT:=notheora +endef + +define Package/libshout-nossl + $(call Package/libshout/default) + TITLE+= (no ssl/theora) + VARIANT:=nossl endef define Package/libshout-full $(call Package/libshout/default) - TITLE+= (all codecs) - DEPENDS+= +libspeex +libtheora + TITLE+=(full) + DEPENDS+= +libtheora +libopenssl VARIANT:=full endef -define Package/libshout/description +define Package/libshout/description/default libshout allows applications to easily communicate and broadcast to an Icecast streaming media server. It handles the socket connections, metadata communication, and data streaming for the calling application, @@ -54,19 +61,36 @@ define Package/libshout/description details. endef -Package/libshout-full/description=Package/libshout/description +define Package/libshout/description + $(call Package/libshout/description/default) + . + This package does not have Theora support. +endef + +define Package/libshout-nossl/description + $(call Package/libshout/description/default) + . + This package does not have OpenSSL or Theora support. +endef + +Package/libshout-full/description=$(Package/libshout/description/default) CONFIGURE_ARGS += \ --enable-shared \ - --enable-static + --enable-static \ + --disable-speex -ifeq ($(BUILD_VARIANT),nospeex) - CONFIGURE_ARGS += --disable-theora --disable-speex +ifeq ($(BUILD_VARIANT),notheora) + CONFIGURE_ARGS += --disable-theora +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS += --disable-theora --with-openssl="no" endif CONFIGURE_VARS += \ VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \ - VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbis -lvorbisidec" \ + VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \ TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link="$(STAGING_DIR)/usr/lib" @@ -86,7 +110,10 @@ define Package/libshout/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.so.* $(1)/usr/lib/ endef + Package/libshout-full/install=$(Package/libshout/install) +Package/libshout-nossl/install=$(Package/libshout/install) $(eval $(call BuildPackage,libshout)) +$(eval $(call BuildPackage,libshout-nossl)) $(eval $(call BuildPackage,libshout-full)) diff --git a/libs/libshout/patches/100-add_with-openssl_option.patch b/libs/libshout/patches/100-add_with-openssl_option.patch new file mode 100644 index 0000000..7319e29 --- /dev/null +++ b/libs/libshout/patches/100-add_with-openssl_option.patch @@ -0,0 +1,27 @@ +--- a/m4/xiph_openssl.m4 ++++ b/m4/xiph_openssl.m4 +@@ -29,14 +29,16 @@ else + fi + fi + +-# Now try linking to openssl +-xt_save_CFLAGS="$CFLAGS" +-xt_save_LIBS="$LIBS" +-CFLAGS="$CFLAGS $OPENSSL_CFLAGS" +-LIBS="$OPENSSL_LIBS $LIBS" +-AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) +-CFLAGS="$xt_save_CFLAGS" +-LIBS="$xt_save_LIBS" ++if test "x$openssl_prefix" != "xno"; then ++ # Now try linking to openssl ++ xt_save_CFLAGS="$CFLAGS" ++ xt_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $OPENSSL_CFLAGS" ++ LIBS="$OPENSSL_LIBS $LIBS" ++ AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) ++ CFLAGS="$xt_save_CFLAGS" ++ LIBS="$xt_save_LIBS" ++fi + + if test "$openssl_ok" = "yes"; then + AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.]) diff --git a/libs/libshout/patches/120-vorbis-c.patch b/libs/libshout/patches/120-vorbis-c.patch index a9e41f9..be7ca7a 100644 --- a/libs/libshout/patches/120-vorbis-c.patch +++ b/libs/libshout/patches/120-vorbis-c.patch @@ -1,5 +1,5 @@ ---- a/src/vorbis.c -+++ b/src/vorbis.c +--- a/src/codec_vorbis.c ++++ b/src/codec_vorbis.c @@ -28,7 +28,7 @@ #endif #include @@ -8,4 +8,4 @@ +#include #include "shout_private.h" - #include "shout_ogg.h" + #include "format_ogg.h" diff --git a/libs/libshout/patches/140-no_example_doc_win32.patch b/libs/libshout/patches/140-no_example_doc_win32.patch index 9e8b5a3..4f09328 100644 --- a/libs/libshout/patches/140-no_example_doc_win32.patch +++ b/libs/libshout/patches/140-no_example_doc_win32.patch @@ -1,17 +1,19 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -288,12 +288,12 @@ top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,14 +3,14 @@ AUTOMAKE_OPTIONS = 1.6 foreign ACLOCAL_AMFLAGS = -I m4 --SUBDIRS = include src examples debian doc win32 -+SUBDIRS = include src debian + +-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 + m4/xiph_types.m4 libshout.ckport + docdir = $(datadir)/doc/$(PACKAGE) -doc_DATA = COPYING NEWS README examples/example.c examples/nonblocking.c -+doc_DATA = COPYING NEWS README ++doc_DATA = COPYING README + m4datadir = $(datadir)/aclocal m4data_DATA = m4/shout.m4 - @HAVE_PKGCONFIG_TRUE@pkgconfigdir = $(libdir)/pkgconfig diff --git a/libs/libstrophe/Makefile b/libs/libstrophe/Makefile index 49997bf..61b7be0 100644 --- a/libs/libstrophe/Makefile +++ b/libs/libstrophe/Makefile @@ -15,9 +15,12 @@ PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Chih-Wei Chen -PKG_SOURCE_URL:=https://github.com/strophe/libstrophe/archive/ -PKG_SOURCE:=$(PKG_VERSION).tar.gz -PKG_MD5SUM:=2db62ab21187785ec5f870adc33b74e5 +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_MD5SUM:=6a499bcfc7c52db6765957ff38f48a344ad121ac0b665fd3d4adb7d8deadc427 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/libs/libtasn1/Makefile b/libs/libtasn1/Makefile index 2f8292c..466547d 100644 --- a/libs/libtasn1/Makefile +++ b/libs/libtasn1/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtasn1 -PKG_VERSION:=4.8 -PKG_RELEASE:=2 +PKG_VERSION:=4.9 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/libtasn1 -PKG_MD5SUM:=9a6767705725544f2b86670dcfb34107 +PKG_SOURCE_URL:=@GNU/$(PKG_NAME) +PKG_MD5SUM:=4f6f7a8fd691ac2b8307c8ca365bad711db607d4ad5966f6938a9d2ecd65c920 PKG_LICENSE:=LGPLv2.1+ PKG_LICENSE_FILES:=COPYING.LIB @@ -39,6 +39,7 @@ TARGET_CFLAGS += $(FPIC) CONFIGURE_ARGS += \ --enable-shared \ + --disable-gcc-warnings \ --enable-static define Build/InstallDev diff --git a/libs/libuecc/Makefile b/libs/libuecc/Makefile index c1ba53f..8111062 100644 --- a/libs/libuecc/Makefile +++ b/libs/libuecc/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libuecc PKG_VERSION:=7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Matthias Schiffer PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -35,11 +35,16 @@ CMAKE_OPTIONS += \ -DCMAKE_BUILD_TYPE:String="MINSIZEREL" +define Package/libuecc/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.so* $(1)/usr/lib/ +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libuecc-$(PKG_VERSION) $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.a $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libuecc.pc $(1)/usr/lib/pkgconfig/ endef diff --git a/libs/libuv/Makefile b/libs/libuv/Makefile index c191c0e..4f40a20 100644 --- a/libs/libuv/Makefile +++ b/libs/libuv/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libuv -PKG_VERSION:=1.9.1 +PKG_VERSION:=1.10.2 PKG_RELEASE:=1 PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Luka Perkov +PKG_MAINTAINER:=Luka Perkov PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/ -PKG_MD5SUM:=654bf6783ac7fc10435c84ec86720a6e +PKG_MD5SUM:=fad96b56f517c1ad3f274a19a10c53b2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 @@ -56,6 +56,9 @@ define Build/InstallDev $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libuv.so* \ $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libuv.a \ + $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) \ diff --git a/libs/libvpx/Makefile b/libs/libvpx/Makefile index 3da90f4..6678970 100644 --- a/libs/libvpx/Makefile +++ b/libs/libvpx/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libvpx -PKG_VERSION:=1.6.0 +PKG_VERSION:=1.6.1 PKG_RELEASE:=1 PKG_REV:=v$(PKG_VERSION) @@ -24,6 +24,8 @@ PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE +PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION)))) + PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -34,7 +36,7 @@ define Package/libvpx TITLE:=libvpx URL:=http://www.webmproject.org/ DEPENDS:=+libpthread - ABI_VERSION:=$(PKG_VERSION) + ABI_VERSION:=$(PKG_ABI_VERSION) endef define Package/libvpx/description diff --git a/libs/libzdb/Makefile b/libs/libzdb/Makefile index a8fcf30..c4f38f4 100644 --- a/libs/libzdb/Makefile +++ b/libs/libzdb/Makefile @@ -63,8 +63,8 @@ define Host/Compile endef define Host/Install - $(INSTALL_DIR) $(STAGING_DIR)/host/bin - $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR)/host/bin/ + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin + $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOSTPKG)/bin/ endef $(eval $(call HostBuild)) diff --git a/libs/libzdb/patches/020-filterh-use-host-built-version.patch b/libs/libzdb/patches/020-filterh-use-host-built-version.patch index 1edfd77..7495fbc 100644 --- a/libs/libzdb/patches/020-filterh-use-host-built-version.patch +++ b/libs/libzdb/patches/020-filterh-use-host-built-version.patch @@ -14,7 +14,7 @@ diff -rupN libzdb-3.0.orig/Makefile.am libzdb-3.0/Makefile.am RE2C = @RE2C@ RE2CFLAGS = -b -FILTERH = ./tools/bin/filterh -+FILTERH = $(STAGING_DIR)/host/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/opus/Makefile b/libs/opus/Makefile index d23e9bb..4a6a452 100644 --- a/libs/opus/Makefile +++ b/libs/opus/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=opus -PKG_VERSION:=1.1.3 -PKG_RELEASE:=2 +PKG_VERSION:=1.1.4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/ -PKG_MD5SUM:=32bbb6b557fe1b6066adc0ae1f08b629 +PKG_MD5SUM:=a2c09d995d0885665ff83b5df2505a5f +PKG_HASH:=9122b6b380081dd2665189f97bfd777f04f92dc3ab6698eea1dbb27ad59d8692 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_MAINTAINER:=Ted Hess Ian Leonard PKG_INSTALL:=1 diff --git a/libs/pcre/Makefile b/libs/pcre/Makefile index 1e04161..861b561 100644 --- a/libs/pcre/Makefile +++ b/libs/pcre/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcre -PKG_VERSION:=8.39 -PKG_RELEASE:=1 +PKG_VERSION:=8.40 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ -PKG_MD5SUM:=e3fca7650a0556a2647821679d81f585 +PKG_MD5SUM:=41a842bf7dcecd6634219336e2167d1d PKG_MAINTAINER:=Thomas Heil PKG_LICENSE:=BSD-3-Clause diff --git a/libs/pcre/patches/001-CVE-2017-7186 b/libs/pcre/patches/001-CVE-2017-7186 new file mode 100644 index 0000000..984cf81 --- /dev/null +++ b/libs/pcre/patches/001-CVE-2017-7186 @@ -0,0 +1,53 @@ +#CVE-2017-7186 patch +--- trunk/pcre_internal.h 2016/05/21 13:34:44 1649 ++++ trunk/pcre_internal.h 2017/02/24 17:30:30 1688 +@@ -2772,6 +2772,9 @@ + extern const pcre_uint16 PRIV(ucd_stage2)[]; + extern const pcre_uint32 PRIV(ucp_gentype)[]; + extern const pcre_uint32 PRIV(ucp_gbtable)[]; ++#ifdef COMPILE_PCRE32 ++extern const ucd_record PRIV(dummy_ucd_record)[]; ++#endif + #ifdef SUPPORT_JIT + extern const int PRIV(ucp_typerange)[]; + #endif +@@ -2780,9 +2783,15 @@ + /* UCD access macros */ + + #define UCD_BLOCK_SIZE 128 +-#define GET_UCD(ch) (PRIV(ucd_records) + \ ++#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \ + PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \ + UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE]) ++ ++#ifdef COMPILE_PCRE32 ++#define GET_UCD(ch) ((ch > 0x10ffff)? PRIV(dummy_ucd_record) : REAL_GET_UCD(ch)) ++#else ++#define GET_UCD(ch) REAL_GET_UCD(ch) ++#endif + + #define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype + #define UCD_SCRIPT(ch) GET_UCD(ch)->script +--- trunk/pcre_ucd.c 2014/06/19 07:51:39 1490 ++++ trunk/pcre_ucd.c 2017/02/24 17:30:30 1688 +@@ -38,6 +38,20 @@ + const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0}; + #else + ++/* If the 32-bit library is run in non-32-bit mode, character values ++greater than 0x10ffff may be encountered. For these we set up a ++special record. */ ++ ++#ifdef COMPILE_PCRE32 ++const ucd_record PRIV(dummy_ucd_record)[] = {{ ++ ucp_Common, /* script */ ++ ucp_Cn, /* type unassigned */ ++ ucp_gbOther, /* grapheme break property */ ++ 0, /* case set */ ++ 0, /* other case */ ++ }}; ++#endif ++ + /* When recompiling tables with a new Unicode version, please check the + types in this structure definition from pcre_internal.h (the actual + field names will be different): diff --git a/libs/poco/Makefile b/libs/poco/Makefile index 990346c..fd3eefc 100644 --- a/libs/poco/Makefile +++ b/libs/poco/Makefile @@ -1,5 +1,6 @@ # # Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2017 Daniel Engberg # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=poco -PKG_VERSION:=1.7.5 +PKG_VERSION:=1.7.7 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pocoproject.org/releases/poco-1.7.5 -PKG_MD5SUM:=baafda4833c4dd95993398d9f237c96c +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://pocoproject.org/releases/$(PKG_NAME)-$(PKG_VERSION) +PKG_MD5SUM:=17783e30f5ef9c852544ac0e9d1fd316c4804317026059a9d6aad798b61c77f8 PKG_LICENSE:=BSL-1.0 PKG_LICENSE_FILES:=LICENSE diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index f27fa1e..0507146 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -147,14 +147,14 @@ endef define Host/Install $(INSTALL_DIR) $(STAGING_DIR)/usr/bin/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR)/usr/bin/ - $(INSTALL_DIR) $(STAGING_DIR)/host/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR)/host/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR)/host/bin/ + $(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)/host/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress + $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR_HOSTPKG)/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress endef TARGET_CFLAGS += $(FPIC) -lpthread diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile index 1e70a12..93d538a 100644 --- a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -41,7 +41,7 @@ define Package/protobuf/description of its internal RPC protocols and file formats. endef -CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR)/host/bin/protoc +CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc define Build/InstallDev $(INSTALL_DIR) \ diff --git a/libs/rxtx/Makefile b/libs/rxtx/Makefile new file mode 100755 index 0000000..5a1374f --- /dev/null +++ b/libs/rxtx/Makefile @@ -0,0 +1,49 @@ +# +# 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_MD5SUM:=7eedb18e3f33a427e2b0e9be8ce3f94c + +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 new file mode 100755 index 0000000..3833c5c --- /dev/null +++ b/libs/rxtx/patches/010-acm-devices.patch @@ -0,0 +1,11 @@ +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/sqlite3/Makefile b/libs/sqlite3/Makefile index f9bd2c7..7f9b1b3 100644 --- a/libs/sqlite3/Makefile +++ b/libs/sqlite3/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sqlite -PKG_VERSION:=3130000 -PKG_RELEASE:=2 +PKG_VERSION:=3160000 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.sqlite.org/2016/ -PKG_MD5SUM:=4e83f39fa2ffb610ac5ecd36865da6a2 +PKG_SOURCE_URL:=http://www.sqlite.org/2017/ +PKG_MD5SUM:=5102404047054b2cec2f43463293f94dea39425d42bf386d24596ab4fac7c7ff PKG_LICENSE:=PUBLICDOMAIN PKG_LICENSE_FILES:= @@ -69,7 +69,9 @@ $(call Package/sqlite3/Default/description) endef TARGET_CFLAGS += $(FPIC) \ - -DSQLITE_ENABLE_UNLOCK_NOTIFY \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \ + -DHAVE_ISNAN=1 \ + -DHAVE_MALLOC_USABLE_SIZE=1 CONFIGURE_ARGS += \ --enable-shared \ diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile new file mode 100644 index 0000000..aad6e68 --- /dev/null +++ b/mail/dovecot/Makefile @@ -0,0 +1,99 @@ +# +# 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:=dovecot +PKG_VERSION:=2.2.26.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2 +PKG_MD5SUM:=85bc42328de41d1eb8d6d3f1db666db8 +PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique +PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT + +PKG_BUILD_DEPENDS:=libiconv + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/dovecot + SECTION:=mail + CATEGORY:=Mail + DEPENDS:=+DOVECOT_LDAP:libopenldap +libopenssl +librt +zlib +libbz2 +libcap + TITLE:=An IMAP and POP3 daemon + MAINTAINER:=Lucian Cristian + URL:=http://www.dovecot.org/ + USERID:=dovecot=59:dovecot=59 +endef + +define Package/dovecot/description + Dovecot is a program which provides POP3 and IMAP services. +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. + endmenu +endef + +CONFIGURE_ARGS += \ + --without-gssapi \ + --without-pam \ + --with-moduledir=/usr/lib/dovecot/modules \ + --with-notify=dnotify \ + --without-lzma \ + --without-lz4 \ + --with-icu=no + +ifneq ($(strip $(CONFIG_DOVECOT_LDAP)),) + CONFIGURE_ARGS+= \ + --with-ldap=yes +else + CONFIGURE_ARGS+= \ + --with-ldap=no +endif + +CONFIGURE_VARS += \ + RPCGEN= \ + i_cv_signed_size_t=no \ + i_cv_signed_time_t=no \ + i_cv_gmtime_max_time_t=32 \ + i_cv_mmap_plays_with_write=yes \ + i_cv_fd_passing=yes \ + i_cv_c99_vsnprintf=yes \ + lib_cv_va_copy=yes \ + lib_cv_va_copy=yes \ + lib_cv___va_copy=yes \ + lib_cv_va_val_copy=yes + +define Package/dovecot/install + $(INSTALL_DIR) $(1)/etc/init.d \ + $(1)/etc/dovecot \ + $(1)/usr/share/doc/dovecot/example-config \ + $(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/example-config + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot + rm $(1)/usr/lib/dovecot/dovecot-config + find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm +endef + +$(eval $(call BuildPackage,dovecot)) diff --git a/mail/dovecot/files/dovecot.init b/mail/dovecot/files/dovecot.init new file mode 100644 index 0000000..1f83184 --- /dev/null +++ b/mail/dovecot/files/dovecot.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2013 OpenWrt.org + +START=75 +STOP=75 + +USE_PROCD=1 + +start_service() { + mkdir -p -m 0755 /var/lib/dovecot + mkdir -p -m 0755 /var/run/dovecot + chmod 0750 /var/lib/dovecot + procd_open_instance + procd_set_param command /usr/sbin/dovecot -F + procd_close_instance +} diff --git a/mail/dovecot/patches/001-configure_in.patch b/mail/dovecot/patches/001-configure_in.patch new file mode 100644 index 0000000..7cf68fc --- /dev/null +++ b/mail/dovecot/patches/001-configure_in.patch @@ -0,0 +1,31 @@ +--- 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,[ +- AC_TRY_RUN([ ++ AC_TRY_LINK([ + #include +- ++ ], [ + 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; diff --git a/multimedia/ffmpeg/Config.in b/multimedia/ffmpeg/Config.in index a488908..d2ab7d1 100644 --- a/multimedia/ffmpeg/Config.in +++ b/multimedia/ffmpeg/Config.in @@ -63,7 +63,6 @@ config FFMPEG_CUSTOM_AUDIO_DEC_SUPPORT select FFMPEG_CUSTOM_DECODER_opus select FFMPEG_CUSTOM_DECODER_pcm_s16be select FFMPEG_CUSTOM_DECODER_pcm_s16le - select FFMPEG_CUSTOM_SELECT_speex select FFMPEG_CUSTOM_DECODER_vorbis select FFMPEG_CUSTOM_DECODER_wavpack select FFMPEG_CUSTOM_DECODER_wmav1 @@ -117,9 +116,6 @@ config FFMPEG_CUSTOM_SELECT_mp3lame config FFMPEG_CUSTOM_SELECT_libopus bool "Opus" -config FFMPEG_CUSTOM_SELECT_speex - bool "Speex" - config FFMPEG_CUSTOM_SELECT_x264 bool "x264" depends on FFMPEG_CUSTOM_PATENTED diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index a982ea7..f874014 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2006-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ffmpeg -PKG_VERSION:=2.8.8 -PKG_RELEASE:=2 +PKG_VERSION:=3.2.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://ffmpeg.org/releases/ -PKG_MD5SUM:=5fae1ba5a5d37a2d0de750479b7270d4 +PKG_SOURCE_URL:=https://ffmpeg.org/releases/ +PKG_MD5SUM:=e34d1b92c5d844f2a3611c741a6dba18 +PKG_HASH:=3f01bd1fe1a17a277f8c84869e5d9192b4b978cb660872aa2b54c3cc8a2fedfc PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3 @@ -292,7 +293,7 @@ endef define Package/libffmpeg-custom $(call Package/libffmpeg/Default) TITLE+= (custom) - DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus +FFMPEG_CUSTOM_SELECT_speex:libspeex \ + DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus \ +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib VARIANT:=custom @@ -313,7 +314,6 @@ endef define Package/libffmpeg-audio-dec $(call Package/libffmpeg/Default) TITLE+= (audio) - DEPENDS+= +libspeex VARIANT:=audio-dec endef @@ -327,7 +327,7 @@ endef define Package/libffmpeg-full $(call Package/libffmpeg/Default) TITLE+= (full) - DEPENDS+= +alsa-lib +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib +libopus +libspeex + DEPENDS+= +alsa-lib +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib +libopus VARIANT:=full endef @@ -382,6 +382,8 @@ FFMPEG_CONFIGURE:= \ ifeq ($(CONFIG_SOFT_FLOAT),y) FFMPEG_CONFIGURE += \ --disable-altivec \ + --disable-vsx \ + --disable-power8 \ --disable-amd3dnow \ --disable-amd3dnowext \ --disable-mmx \ @@ -397,11 +399,17 @@ FFMPEG_CONFIGURE += \ --disable-fma3 \ --disable-fma4 \ --disable-avx2 \ + --disable-aesni \ + --disable-armv5te \ + --disable-armv6 \ + --disable-armv6t2 \ --disable-inline-asm \ - --disable-mips32r2 \ - --disable-mipsdspr1 \ + --disable-mipsdsp \ --disable-mipsdspr2 \ --disable-mipsfpu \ + --disable-msa \ + --disable-mmi \ + --disable-fast-unaligned \ --disable-runtime-cpudetect else ifneq ($(findstring arm,$(CONFIG_ARCH)),) @@ -434,7 +442,6 @@ endif ifeq ($(BUILD_VARIANT),full) FFMPEG_CONFIGURE+= \ --enable-libopus --enable-decoder=libopus \ - --enable-libspeex --enable-decoder=libspeex \ $(if $(CONFIG_PACKAGE_libx264),--enable-libx264) \ $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame) endif @@ -473,11 +480,6 @@ ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libopus),y) --enable-libopus --enable-decoder=libopus endif -ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_speex),y) - FFMPEG_CONFIGURE+= \ - --enable-libspeex --enable-decoder=libspeex -endif - ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_x264),y) FFMPEG_CONFIGURE+= \ --enable-libx264 @@ -508,7 +510,6 @@ ifeq ($(BUILD_VARIANT),audio-dec) $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \ $(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \ $(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \ - --enable-libspeex --enable-decoder=libspeex \ --disable-decoder=pcm_bluray,pcm_dvd \ endif diff --git a/multimedia/grilo/Makefile b/multimedia/grilo/Makefile index 66875d5..2daa0d5 100644 --- a/multimedia/grilo/Makefile +++ b/multimedia/grilo/Makefile @@ -56,13 +56,13 @@ define Build/InstallDev $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ $(1)/usr/lib/pkgconfig/ - $(INSTALL_DIR) $(STAGING_DIR)/host/share/vala-0.30/vapi/ + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/vala-0.30/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)/host/share/vala-0.30/vapi + $(STAGING_DIR_HOSTPKG)/share/vala-0.30/vapi endef define Package/grilo/install diff --git a/multimedia/gst1-libav/Config.in b/multimedia/gst1-libav/Config.in new file mode 100644 index 0000000..b394d7d --- /dev/null +++ b/multimedia/gst1-libav/Config.in @@ -0,0 +1,279 @@ +menu "Select GStreamer libav configuration options" + depends on PACKAGE_gst1-libav + +config GST1_LIBAV_IPV6 + bool "Enable IPv6" + default IPV6 + +config GST1_LIBAV_PATENTED + bool "Include patented codecs and technologies" + default BUILD_PATENTED + +config GET_LIBAV_COMMON_AV_SUPPORT + bool "Include support for common audio/video decoders" + default y + select GST1_LIBAV_DECODER_aac if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_ac3 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_h264 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_atrac3 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_jpegls + select GST1_LIBAV_DECODER_mp3 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_mpeg1video + select GST1_LIBAV_DECODER_mpeg2video if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_mpeg4 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_mpeg4aac if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_mpegvideo + select GST1_LIBAV_DECODER_pcm_s16be + select GST1_LIBAV_DECODER_pcm_s16le + select GST1_LIBAV_DECODER_vorbis + select GST1_LIBAV_DECODER_wmav1 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_wmav2 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_png + select GST1_LIBAV_PARSER_aac if GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_h264 if GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_mpegaudio + select GST1_LIBAV_PARSER_mpegvideo + select GST1_LIBAV_PARSER_mpeg4video + select GST1_LIBAV_DEMUXER_ac3 + select GST1_LIBAV_DEMUXER_h264 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DEMUXER_mp3 if GST1_LIBAV_PATENTED + select GST1_LIBAV_DEMUXER_mpegvideo if GST1_LIBAV_PATENTED + select GST1_LIBAV_DEMUXER_ogg + +comment "Encoders ---" + +config GST1_LIBAV_ENCODER_ac3 + bool "AC3" + depends on GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_ac3 + +config GST1_LIBAV_ENCODER_jpegls + bool "JPEG-LS" + +config GST1_LIBAV_ENCODER_mpeg1video + bool "MPEG-1 Video" + +config GST1_LIBAV_ENCODER_mpeg2video + bool "MPEG-2 Video" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_ENCODER_mpeg4 + bool "MPEG-4" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_ENCODER_pcm_s16be + bool "PCM signed 16-bit big-endian" + +config GST1_LIBAV_ENCODER_pcm_s16le + bool "PCM signed 16-bit little-endian" + +config GST1_LIBAV_ENCODER_png + bool "PNG" + select GST1_LIBAV_ENCODER_zlib + +config GST1_LIBAV_ENCODER_vorbis + bool "Vorbis" + +config GST1_LIBAV_ENCODER_zlib + bool "Zlib" + +comment "Decoders ---" + +config GST1_LIBAV_DECODER_aac + bool "AAC (Advanced Audio Coding)" + depends on GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_aac + +config GST1_LIBAV_DECODER_ac3 + bool "AC3" + depends on GST1_LIBAV_PATENTED + select GST1_LIBAV_PARSER_ac3 + +config GST1_LIBAV_DECODER_atrac3 + bool "ATRAC3" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_gif + bool "GIF" + +config GST1_LIBAV_DECODER_h264 + bool "H.264" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_jpegls + bool "JPEG-LS" + +config GST1_LIBAV_DECODER_mp2 + bool "MP2 (MPEG Audio Layer 2)" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_mp3 + bool "MP3 (MPEG Audio Layer 2)" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_mpegvideo + bool "MPEG Video" + +config GST1_LIBAV_DECODER_mpeg1video + bool "MPEG-1 Video" + +config GST1_LIBAV_DECODER_mpeg2video + bool "MPEG-2 Video" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_mpeg4 + bool "MPEG-4" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_mpeg4aac + bool "MPEG-4 (AAC)" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_pcm_s16be + bool "PCM signed 16-bit big-endian" + +config GST1_LIBAV_DECODER_pcm_s16le + bool "PCM signed 16-bit little-endian" + +config GST1_LIBAV_DECODER_png + bool "PNG" + select GST1_LIBAV_DECODER_zlib + +config GST1_LIBAV_DECODER_vorbis + bool "Vorbis" + +config GST1_LIBAV_DECODER_wmav1 + bool "WMAv1" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_wmav2 + bool "WMAv2" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DECODER_zlib + bool "Zlib" + +comment "Muxers ---" + +config GST1_LIBAV_MUXER_ac3 + bool "AC3" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_MUXER_ffm + bool "FFM (ffserver live feed)" + +config GST1_LIBAV_MUXER_h264 + bool "H.264" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_MUXER_mp3 + bool "MP3 (MPEG Audio Layer 3)" + +config GST1_LIBAV_MUXER_mp4 + bool "MP4" + +config GST1_LIBAV_MUXER_mpeg1video + bool "MPEG-1 Video" + +config GST1_LIBAV_MUXER_mpeg2video + bool "MPEG-2 Video" + +config GST1_LIBAV_MUXER_mpegts + bool "MPEG-2 (TS)" + +config GST1_LIBAV_MUXER_ogg + bool "Ogg" + +config GST1_LIBAV_MUXER_oss + bool "OSS (Open Sound System playback)" + +config GST1_LIBAV_MUXER_rtp + bool "RTP" + +comment "Demuxers ---" + +config GST1_LIBAV_DEMUXER_ac3 + bool "AC3" + +config GST1_LIBAV_DEMUXER_ffm + bool "FFM (ffserver live feed)" + +config GST1_LIBAV_DEMUXER_h264 + bool "H.264" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_DEMUXER_mp3 + bool "MP3 (MPEG Audio Layer 3)" + +config GST1_LIBAV_DEMUXER_mpegvideo + bool "MPEG Video" + +config GST1_LIBAV_DEMUXER_mpegps + bool "MPEG-2 (PS)" + +config GST1_LIBAV_DEMUXER_mpegts + bool "MPEG-2 (TS)" + +config GST1_LIBAV_DEMUXER_ogg + bool "Ogg" + +config GST1_LIBAV_DEMUXER_rm + bool "RM" + help + RealMedia format demuxer + +config GST1_LIBAV_DEMUXER_rtsp + bool "RTSP" + select GST1_LIBAV_DEMUXER_rm + select GST1_LIBAV_DEMUXER_sdp + +config GST1_LIBAV_DEMUXER_sdp + bool "SDP" + select GST1_LIBAV_DEMUXER_mpegts + +comment "Parsers ---" + +config GST1_LIBAV_PARSER_aac + bool "AAC (Advanced Audio Coding)" + depends on GST1_LIBAV_PATENTED + +config GST1_LIBAV_PARSER_ac3 + bool "AC3" + +config GST1_LIBAV_PARSER_h264 + bool "H.264" + depends on GST1_LIBAV_PATENTED + select GST1_LIBAV_DECODER_h264 + +config GST1_LIBAV_PARSER_mpegaudio + bool "MPEG Audio" + +config GST1_LIBAV_PARSER_mpegvideo + bool "MPEG Video" + +config GST1_LIBAV_PARSER_mpeg4video + bool "MPEG-4 Video" + +comment "Protocols ---" + +config GST1_LIBAV_PROTOCOL_file + bool "file:" + +config GST1_LIBAV_PROTOCOL_http + bool "http:" + +config GST1_LIBAV_PROTOCOL_pipe + bool "pipe:" + +config GST1_LIBAV_PROTOCOL_rtp + bool "rtp:" + select GST1_LIBAV_PROTOCOL_udp + +config GST1_LIBAV_PROTOCOL_tcp + bool "tcp:" + +config GST1_LIBAV_PROTOCOL_udp + bool "udp:" + +endmenu + diff --git a/multimedia/gst1-libav/Makefile b/multimedia/gst1-libav/Makefile new file mode 100644 index 0000000..bed00ac --- /dev/null +++ b/multimedia/gst1-libav/Makefile @@ -0,0 +1,198 @@ +# +# 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 + +PKG_NAME:=gst1-libav +PKG_VERSION:=1.8.2 +PKG_RELEASE:=2 + +PKG_MAINTAINER:=W. Michael Petullo \ + Ted Hess + +PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-libav +PKG_MD5SUM:=b5f3c7a27b39b5f5c2f0bfd546b0c655020faf6b38d27b64b346c43e5ebf687a + +PKG_LICENSE:=GPL-2.0 LGPL-2.0 +PKG_LICENSE_FILES:=COPYING COPYING.LIB + +PKG_BUILD_DIR:=$(BUILD_DIR)/gst-libav-$(PKG_VERSION) + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +PKG_USE_MIPS16:=0 + +GST_VERSION:=1.0 + +LIBAV_ENCODERS:= \ + ac3 \ + jpegls \ + mpeg1video \ + mpeg2video \ + mpeg4 \ + pcm_s16be \ + pcm_s16le \ + png \ + vorbis \ + zlib \ + +LIBAV_DECODERS:= \ + aac \ + ac3 \ + atrac3 \ + gif \ + h264 \ + jpegls \ + mp2 \ + mp3 \ + mpeg1video \ + mpeg2video \ + mpeg4 \ + mpegvideo \ + pcm_s16be \ + pcm_s16le \ + png \ + vorbis \ + wmav1 \ + wmav2 \ + zlib \ + +LIBAV_MUXERS:= \ + ac3 \ + ffm \ + h264 \ + mp3 \ + mp4 \ + mpeg1video \ + mpeg2video \ + mpegts \ + ogg \ + oss \ + rtp \ + +LIBAV_DEMUXERS:= \ + ac3 \ + ffm \ + h264 \ + mp3 \ + mpegps \ + mpegts \ + mpegvideo \ + ogg \ + rm \ + rtsp \ + sdp \ + v4l2 \ + +LIBAV_PARSERS:= \ + aac \ + ac3 \ + h264 \ + mpegaudio \ + mpegvideo \ + mpeg4video \ + +LIBAV_PROTOCOLS:= \ + file http pipe rtp tcp udp + +PKG_CONFIG_DEPENDS:= \ + $(patsubst %,CONFIG_GST1_LIBAV_ENCODER_%,$(LIBAV_ENCODERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_DECODER_%,$(LIBAV_DECODERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_MUXER_%,$(LIBAV_DEMUXERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_DEMUXER_%,$(LIBAV_DEMUXERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_PARSER_%,$(LIBAV_PARSERS)) \ + $(patsubst %,CONFIG_GST1_LIBAV_PROTOCOL_%,$(LIBAV_PROTOCOLS)) + +PKG_BUILD_DEPENDS:= libgstreamer1 gstreamer1-plugins-base + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/gst1-libav + SECTION:=multimedia + CATEGORY:=Multimedia + TITLE:=GStreamer Libav plugin + URL:=http://www.gstreamer.net/modules/gst-libav.html + DEPENDS:= +libgstreamer1 +gstreamer1-plugins-base \ + +gst1-mod-alsa +libgst1audio +libgst1pbutils +libgst1video \ + +libbz2 +liblzma +endef + +define Package/gst1-libav/description + GStreamer with libav bindings using internal Libav +endef + +define Package/gst1-libav/config + source "$(SOURCE)/Config.in" +endef + +FILTER_CONFIG= \ + $(foreach c, $(3), \ + $(if $(CONFIG_GST1_LIBAV_$(1)_$(c)),--enable-$(2)='$(c)') \ + ) + +LIBAV_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(LIBAV_ENCODERS)) +LIBAV_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(LIBAV_DECODERS)) +LIBAV_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(LIBAV_MUXERS)) +LIBAV_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(LIBAV_DEMUXERS)) +LIBAV_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(LIBAV_PARSERS)) +LIBAV_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(LIBAV_PROTOCOLS)) + +CONFIGURE_ARGS += \ + --without-system-libav \ + --with-libav-extra-configure="--target-os=linux \ + $(if $(findstring " ",$(CONFIG_CPU_TYPE)),,--cpu=$(CONFIG_CPU_TYPE)) \ + --disable-bsfs \ + --disable-programs \ + --disable-devices \ + --disable-encoders \ + $(LIBAV_CONFIGURE_ENCODERS) \ + --disable-decoders \ + $(LIBAV_CONFIGURE_DECODERS) \ + --disable-muxers \ + $(LIBAV_CONFIGURE_MUXERS) \ + --disable-demuxers \ + $(LIBAV_CONFIGURE_DEMUXERS) \ + --disable-parsers \ + $(LIBAV_CONFIGURE_PARSERS) \ + --disable-protocols \ + $(LIBAV_CONFIGURE_PROTOCOLS) \ + --disable-asm \ + --disable-altivec \ + --disable-amd3dnow \ + --disable-amd3dnowext \ + --disable-mmx \ + --disable-mmxext \ + --disable-sse \ + --disable-sse2 \ + --disable-sse3 \ + --disable-ssse3 \ + --disable-sse4 \ + --disable-sse42 \ + --disable-avx \ + --disable-xop \ + --disable-fma3 \ + --disable-fma4 \ + --disable-avx2 \ + --disable-inline-asm \ + --disable-yasm" + +TARGET_CFLAGS += -D_GNU_SOURCE + +TARGET_LDFLAGS += $(FPIC) + +define Package/gst1-libav/install + $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION) + ( cd $(PKG_INSTALL_DIR); $(CP) \ + ./usr/lib/gstreamer-$(GST_VERSION)/libgstlibav.so* \ + $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \ + ) +endef + +$(eval $(call BuildPackage,gst1-libav)) diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile index ea115f3..2ef95b7 100644 --- a/multimedia/icecast/Makefile +++ b/multimedia/icecast/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2006-2011 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -9,25 +7,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icecast PKG_VERSION:=2.4.3 -PKG_RELEASE:=2 -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=André Gaul +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://downloads.xiph.org/releases/icecast/ +PKG_SOURCE_URL:=https://downloads.xiph.org/releases/icecast/ PKG_MD5SUM:=83d7d34dbe22f0f8fc119d2c9839efc0 +PKG_HASH:=c85ca48c765d61007573ee1406a797ae6cb31fb5961a42e7f1c87adb45ddc592 + +PKG_MAINTAINER:=André Gaul , \ + Ted Hess + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf +PKG_INSTALL:= 1 include $(INCLUDE_DIR)/package.mk -TREMOR_BUILD_DIR=$(PKG_BUILD_DIR)/libvorbisidec-1.2.0-dave -TREMOR_DIR=$(TREMOR_BUILD_DIR)/ipkg-install/usr - define Package/icecast SECTION:=multimedia CATEGORY:=Multimedia - DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libopenssl + 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/ @@ -42,39 +43,22 @@ define Package/icecast/description interaction. endef -define Build/Prepare - $(Build/Prepare/Default) - $(SUBMAKE) -f libvorbisidec.mk \ - BUILD_DIR="$(PKG_BUILD_DIR)" \ - V=99 \ - prepare -endef +CONFIGURE_ARGS+= \ + --enable-yp \ + --with-openssl="no" \ + --with-curl="yes" \ + --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \ + --with-ogg="$(STAGING_DIR)/usr" \ + --with-speex="no" \ + --with-theora="no" \ + --with-vorbis="$(STAGING_DIR)/usr" \ + --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" -define Build/Configure - $(MAKE) -f libvorbisidec.mk \ - BUILD_DIR="$(PKG_BUILD_DIR)" \ - V=99 \ - compile - $(SED) 's,-lvorbis ,$(TREMOR_DIR)/lib/libvorbisidec.a -logg ,g' $(PKG_BUILD_DIR)/configure - $(call Build/Configure/Default, \ - --enable-yp \ - --with-curl="yes" \ - --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \ - --with-ogg="$(STAGING_DIR)/usr" \ - --with-speex="no" \ - --with-theora="no" \ - --with-vorbis="$(TREMOR_DIR)" \ - --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \ - , \ - CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 $(TARGET_CPPFLAGS)" \ - ) -endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - INCLUDES="-I$(PKG_BUILD_DIR)/src -I$(TREMOR_DIR)/include" \ - all install +# Manually edit configure in case both vorbis and tremor host packages are installed +define Build/Configure + $(SED) 's,-lvorbis -lm,-lvorbisidec -logg ,g' $(PKG_BUILD_DIR)/configure + $(call Build/Configure/Default) endef define Package/icecast/install diff --git a/multimedia/icecast/libvorbisidec.mk b/multimedia/icecast/libvorbisidec.mk deleted file mode 100644 index eda6e76..0000000 --- a/multimedia/icecast/libvorbisidec.mk +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2006 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:=icecast-libvorbisidec -PKG_VERSION:=1.2.0-dave -PKG_RELEASE:=1 - -PKG_SOURCE:=libvorbisidec-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://users.tpg.com.au/davico/openwrt/ -PKG_MD5SUM:=cb8e51aab92ef164f8e0e8853f7164fa - -PKG_BUILD_DIR:=$(BUILD_DIR)/libvorbisidec-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -PATCH_DIR=./patches-libvorbisidec - -include $(INCLUDE_DIR)/package.mk - -define Build/Configure - $(call Build/Configure/Default, \ - --disable-shared \ - --enable-static \ - ) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Build/InstallDev - true -endef - -$(eval $(call Build/DefaultTargets)) 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 6fa6f08..49861d2 100644 --- a/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch +++ b/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch @@ -1,104 +1,114 @@ ---- a/src/format_flac.c -+++ b/src/format_flac.c -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; ---- a/src/format_midi.c -+++ b/src/format_midi.c -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; ---- a/src/format_ogg.c -+++ b/src/format_ogg.c -@@ -24,7 +24,7 @@ - #include - #include - --#include -+#include - - #include "refbuf.h" - #include "source.h" ---- a/src/format_ogg.h -+++ b/src/format_ogg.h -@@ -18,7 +18,7 @@ - #ifndef __FORMAT_OGG_H__ - #define __FORMAT_OGG_H__ - --#include -+#include - #include "refbuf.h" - #include "format.h" - ---- a/src/format_speex.c -+++ b/src/format_speex.c -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; ---- a/src/format_theora.c -+++ b/src/format_theora.c -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - #include - - typedef struct source_tag source_t; --- a/src/format_vorbis.c +++ b/src/format_vorbis.c -@@ -18,8 +18,8 @@ - #endif +@@ -19,7 +19,7 @@ #include --#include + #include -#include -+#include +#include #include #include ---- a/src/source.c -+++ b/src/source.c -@@ -19,7 +19,7 @@ - #include - #include - #include --#include -+#include - #include - - #ifndef _WIN32 ---- a/src/format_kate.c -+++ b/src/format_kate.c -@@ -19,7 +19,7 @@ - - #include - #include --#include -+#include - #ifdef HAVE_KATE - #include - #endif +@@ -34,6 +34,7 @@ + #define CATMODULE "format-vorbis" + #include "logging.h" + ++int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op); + + typedef struct vorbis_codec_tag + { +@@ -583,3 +584,91 @@ static refbuf_t *process_vorbis_page (og + return NULL; + } + ++/* Some additional functions from vorbis missing from tremor */ ++ ++static void _v_writestring(oggpack_buffer *o,char *s, int bytes) ++{ ++ ++ while(bytes--){ ++ oggpack_write(o,*s++,8); ++ } ++} ++ ++static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc) ++{ ++ char temp[]="Xiph.Org libVorbis I 20150104"; ++ int bytes = strlen(temp); ++ ++ /* preamble */ ++ oggpack_write(opb,0x03,8); ++ _v_writestring(opb,"vorbis", 6); ++ ++ /* vendor */ ++ oggpack_write(opb,bytes,32); ++ _v_writestring(opb,temp, bytes); ++ ++ /* comments */ ++ ++ oggpack_write(opb,vc->comments,32); ++ if(vc->comments){ ++ int i; ++ for(i=0;icomments;i++){ ++ if(vc->user_comments[i]){ ++ oggpack_write(opb,vc->comment_lengths[i],32); ++ _v_writestring(opb,vc->user_comments[i], vc->comment_lengths[i]); ++ }else{ ++ oggpack_write(opb,0,32); ++ } ++ } ++ } ++ oggpack_write(opb,1,1); ++ ++ return(0); ++} ++ ++void vorbis_comment_add(vorbis_comment *vc,char *comment) ++{ ++ vc->user_comments=_ogg_realloc(vc->user_comments, ++ (vc->comments+2)*sizeof(*vc->user_comments)); ++ vc->comment_lengths=_ogg_realloc(vc->comment_lengths, ++ (vc->comments+2)*sizeof(*vc->comment_lengths)); ++ vc->comment_lengths[vc->comments]=strlen(comment); ++ vc->user_comments[vc->comments]=_ogg_malloc(vc->comment_lengths[vc->comments]+1); ++ strcpy(vc->user_comments[vc->comments], comment); ++ vc->comments++; ++ vc->user_comments[vc->comments]=NULL; ++} ++ ++void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *contents) ++{ ++ char *comment=alloca(strlen(tag)+strlen(contents)+2); /* +2 for = and \0 */ ++ strcpy(comment, tag); ++ strcat(comment, "="); ++ strcat(comment, contents); ++ vorbis_comment_add(vc, comment); ++ ++ return; ++} ++ ++int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op) ++{ ++ oggpack_buffer opb; ++ ++ oggpack_writeinit(&opb); ++ if(_vorbis_pack_comment(&opb,vc)){ ++ oggpack_writeclear(&opb); ++ return OV_EIMPL; ++ } ++ ++ op->packet = _ogg_malloc(oggpack_bytes(&opb)); ++ memcpy(op->packet, opb.buffer, oggpack_bytes(&opb)); ++ ++ op->bytes=oggpack_bytes(&opb); ++ op->b_o_s=0; ++ op->e_o_s=0; ++ op->granulepos=0; ++ op->packetno=1; ++ ++ 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 @@ -144,12 +154,3 @@ # # check if the installed Ogg is sufficiently new. -@@ -42,7 +42,7 @@ LIBS="$LIBS $OGG_LIBS" - LDFLAGS="$LDFLAGS $OGG_LDFLAGS" - AC_TRY_LINK_FUNC(ogg_sync_init, - [ xt_cv_lib_ogg=ok ], -- [ AC_TRY_LINK([#include ],, -+ [ AC_TRY_LINK([#include ],, - [ xt_cv_lib_ogg="pre v1.0, needs updating" ], - [ xt_cv_lib_ogg="not found" ]) - ]) diff --git a/multimedia/icecast/patches/005-no_examples_doc_win32.patch b/multimedia/icecast/patches/005-no_examples_doc_win32.patch new file mode 100644 index 0000000..178df54 --- /dev/null +++ b/multimedia/icecast/patches/005-no_examples_doc_win32.patch @@ -0,0 +1,20 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,7 +3,7 @@ + AUTOMAKE_OPTIONS = foreign dist-zip + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = src conf doc web admin win32 examples ++SUBDIRS = src conf web admin + + 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 + m4/xiph_types.m4 m4/xiph_xml2.m4 + + docdir = $(datadir)/doc/$(PACKAGE) +-doc_DATA = README AUTHORS COPYING NEWS TODO ChangeLog ++doc_DATA = README AUTHORS COPYING + + debug: + $(MAKE) all CFLAGS="@DEBUG@" diff --git a/multimedia/icecast/patches/015-add_with-openssl_option.patch b/multimedia/icecast/patches/015-add_with-openssl_option.patch new file mode 100644 index 0000000..f0a5b70 --- /dev/null +++ b/multimedia/icecast/patches/015-add_with-openssl_option.patch @@ -0,0 +1,25 @@ +--- a/m4/xiph_openssl.m4 ++++ b/m4/xiph_openssl.m4 +@@ -30,13 +30,15 @@ else + fi + + # Now try linking to openssl +-xt_save_CFLAGS="$CFLAGS" +-xt_save_LIBS="$LIBS" +-CFLAGS="$CFLAGS $OPENSSL_CFLAGS" +-LIBS="$OPENSSL_LIBS $LIBS" +-AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) +-CFLAGS="$xt_save_CFLAGS" +-LIBS="$xt_save_LIBS" ++if test "x$openssl_prefix" != "xno"; then ++ xt_save_CFLAGS="$CFLAGS" ++ xt_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $OPENSSL_CFLAGS" ++ LIBS="$OPENSSL_LIBS $LIBS" ++ AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) ++ CFLAGS="$xt_save_CFLAGS" ++ LIBS="$xt_save_LIBS" ++fi + + if test "$openssl_ok" = "yes"; then + AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.]) diff --git a/multimedia/ices/Makefile b/multimedia/ices/Makefile index a3cb714..c0569ab 100644 --- a/multimedia/ices/Makefile +++ b/multimedia/ices/Makefile @@ -1,7 +1,4 @@ # -# Copyright (C) 2009-2015 OpenWrt.org -# Copyright (C) 2009 Freifunk Leipzig -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -18,7 +15,8 @@ PKG_MD5SUM:=832c448cc993170a70fd95804fcda5b2 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_MAINTAINER:=Nicolas Thill , \ + Ted Hess PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -41,7 +39,9 @@ endef CONFIGURE_ARGS+= \ --with-ogg="$(STAGING_DIR)/usr/include" \ - --with-vorbis="$(STAGING_DIR)/usr/include" \ + --with-vorbis="$(STAGING_DIR)/usr/include" + +TARGET_LDFLAGS+= -logg define Package/ices/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/net/adblock/Makefile b/net/adblock/Makefile index 08a11d7..1511790 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -1,34 +1,33 @@ # -# Copyright (C) 2015-2016 OpenWrt.org -# +# Copyright (c) 2015-2017 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:=1.5.4 +PKG_VERSION:=2.6.2 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken include $(INCLUDE_DIR)/package.mk -define Package/$(PKG_NAME) +define Package/adblock SECTION:=net CATEGORY:=Network TITLE:=Powerful adblock script to block ad/abuse domains PKGARCH:=all endef -define Package/$(PKG_NAME)/description -Powerful adblock script to block ad/abuse domains. +define Package/adblock/description +Powerful adblock script to block ad/abuse domains via dnsmasq or unbound dns backend. 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. endef -define Package/$(PKG_NAME)/conffiles +define Package/adblock/conffiles /etc/config/adblock /etc/adblock/adblock.whitelist /etc/adblock/adblock.blacklist @@ -43,13 +42,9 @@ endef define Build/Compile endef -define Package/$(PKG_NAME)/install +define Package/adblock/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./files/adblock-update.sh $(1)/usr/bin/ - $(INSTALL_DATA) ./files/adblock-helper.sh $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/adblock.hotplug $(1)/etc/hotplug.d/iface/90-adblock + $(INSTALL_BIN) ./files/adblock.sh $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/adblock.init $(1)/etc/init.d/adblock @@ -58,12 +53,8 @@ define Package/$(PKG_NAME)/install $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/config/adblock $(INSTALL_DIR) $(1)/etc/adblock - $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/adblock/adblock.conf.default $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock/ $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock/ - - $(INSTALL_DIR) $(1)/www/adblock - $(INSTALL_DATA) ./files/www/adblock/* $(1)/www/adblock/ endef -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,adblock)) diff --git a/net/adblock/files/README.md b/net/adblock/files/README.md index 043b99a..6950ec7 100644 --- a/net/adblock/files/README.md +++ b/net/adblock/files/README.md @@ -1,12 +1,14 @@ # 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 the local ip address of your router and the internal web server delivers a transparent pixel instead. +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): +* support of the following domain block list 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 * [blacklist]() * => static local blacklist, located by default in '/etc/adblock/adblock.blacklist' * [disconnect](https://disconnect.me) @@ -27,10 +29,14 @@ A lot of people already use adblocker plugins within their desktop browsers, but * => daily updates, approx. 15 entries * [ransomware tracker](https://ransomwaretracker.abuse.ch) * => daily updates, approx. 150 entries - * [rolist/easylist](https://easylist-downloads.adblockplus.org/rolist+easylist.txt) - * => weekly updates, approx. 600 entries - * [ruadlist/easylist](https://code.google.com/p/ruadlist) - * => weekly updates, approx. 2.000 entries + * [reg_cn](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt) + * => regional blocklist for China, daily updates, approx. 1.600 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 * [securemecca](http://www.securemecca.com) * => infrequent updates, approx. 25.000 entries * [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default) @@ -49,107 +55,120 @@ A lot of people already use adblocker plugins within their desktop browsers, but * => 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 (i.e. ip address, network devices etc.) -* supports a wide range of router modes (incl. AP mode), as long as firewall and dnsmasq are installed and in use +* 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 +* automatically selects dnsmasq or unbound as dns backend +* automatically selects uclient-fetch or wget as download utility (other tools like curl or aria2c are supported as well) +* support http only mode (without installed ssl library) for all non-SSL blocklist sources +* automatically supports a wide range of router modes, even AP modes are supported * full IPv4 and IPv6 support -* each blocklist source will be updated and processed separately -* timestamp check to download and process only updated adblock list sources -* overall duplicate removal in separate adblock lists (will be automatically disabled on low memory systems) -* adblock source list parsing by fast & flexible regex rulesets +* supports tld compression (top level domain compression), this feature removes thousands of needless host entries from the block lists and lowers the memory footprint for the dns backends +* each block list source will be updated and processed separately +* block list source parsing by fast & flexible regex rulesets +* overall duplicate removal in separate block lists * additional whitelist for manual overrides, located by default in /etc/adblock/adblock.whitelist -* quality checks during & after update of adblock lists to ensure a reliable dnsmasq service -* adblock statistics, last runtime and list states/counts/update times will be stored in uci config for LuCI frontend -* status & error logging to stdout and syslog -* use two dynamic uhttpd instances as adblock pixel server, separated for ads delivered on port 80 and on port 443 -* use dynamic iptables chains/rulesets for adblock related redirects/rejects -* init system support (start/stop/restart/reload/toggle/stats/cfgup/envchk/query) -* hotplug support, the adblock start will be triggered by wan 'ifup' event, this can be restricted to a certain wan interface or disabled at all (see config options below) -* toggle to quickly switch adblock 'on' or 'off' -* envchk function to check the volatile adblock environment only (without list updates) -* query function to quickly identify blocked (sub-)domains, i.e. for whitelisting -* optional: automatic adblock list backup/restore, backups will be (de-)compressed on the fly (disabled by default) -* optional: add new adblock sources via uci config (see example below) +* quality checks during block list 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 based hotplug support, the adblock start will be solely triggered by network interface triggers +* suspend & resume adblock actions temporarily without block list reloading +* runtime information available via LuCI & via 'status' init command +* query function to quickly identify blocked (sub-)domains, e.g. for whitelisting +* optional: force dns requests to local resolver +* optional: force overall sort / duplicate removal for low memory devices (handle with care!) +* optional: automatic block list backup & restore, backups will be (de-)compressed and restored on the fly in case of any runtime error +* optional: add new adblock sources on your own via uci config ## Prerequisites -* [openwrt](https://openwrt.org), tested with latest stable release (Chaos Calmer) and with current trunk (Designated Driver) -* [LEDE project](https://www.lede-project.org), tested with trunk > r98 -* usual setup with enabled 'iptables', 'dnsmasq' and 'uhttpd' - dump AP modes without these basics are _not_ supported! -* additional required software packages: - * a download utility: 'uclient-fetch' and 'wget' (full versions with ssl support) are supported. Normally you should use 'wget', it's quite stable and supports the online timestamp checks. If you need a smaller memory footprint try 'uclient-fetch' without openssl dependency. The default ustream ssl backend 'libustream-polarssl' has issues with certain https sites and is currently not supported. To change the ssl backend see example below. - * optional: 'kmod-ipt-nat6' for IPv6 support -* the above dependencies and requirements will be checked during package installation & script runtime - -## OpenWrt / LEDE trunk Installation & Usage -* install 'adblock' (_opkg install adblock_) -* adblock starts automatically during boot, triggered by wan-ifup event, check _logread -e "adblock"_ for adblock related information -* optional: start/restart/stop the adblock service manually with _/etc/init.d/adblock_ -* optional: enable/disable your required adblock list sources in _/etc/config/adblock_ - 'adaway', 'disconnect' and 'yoyo' are enabled by default -* optional: maintain the adblock service in LuCI under 'System => Startup' +* [LEDE project](https://www.lede-project.org), tested with latest stable release (LEDE 17.01) and with current LEDE 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 plain http option and supports wget-nossl and uclient-fetch (without libustream-ssl), too + * for more configuration options see examples below + +## LEDE trunk Installation & Usage +* install 'adblock' (_opkg install adblock_) and that's it - the adblock start will be automatically triggered by procd interface trigger +* control the adblock service manually with _/etc/init.d/adblock_ start/stop/restart/reload/suspend/resume/status or use the LuCI frontend +* enable/disable your favored block list sources in _/etc/config/adblock_ - 'adaway', 'disconnect' and 'yoyo' are enabled by default ## LuCI adblock companion package -* for easy management of the various blocklist sources and adblock options there is also a nice & efficient LuCI frontend available +* for easy management of the various block list sources and all other adblock options you can also use a nice & efficient LuCI frontend * install 'luci-app-adblock' (_opkg install luci-app-adblock_) * the application is located in LuCI under 'Services' menu -* _Thanks to Hannu Nyman for this great adblock LuCI frontend!_ - -## Chaos Calmer installation notes -* 'adblock' and 'luci-app-adblock' are _not_ available as .ipk packages in the Chaos Calmer download repository -* download both packages from a development snapshot package directory: - * for 'adblock' look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages/) - * for 'luci-app-adblock' look [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci/) -* manually transfer the packages to your routers temp directory (with tools like _sshfs_ or _winscp_) -* install the packages with _opkg install <...>_ as described above ## Tweaks -* **storage:** to process & 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 -* **white-/blacklist:** add domain white- or blacklist entries to always-allow or -deny certain (sub) domains, by default both lists are located in _/etc/adblock_. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below) -* **backup/restore:** enable the backup/restore feature, to restore automatically the latest compressed backup of your adblock lists in case of any processing error (i.e. a single blocklist source is down). Please use an (external) solid partition and _not_ your volatile router temp directory for this -* **list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below) -* **hotplug fine tuning:** to restrict hotplug support to a certain wan interface or to disable it at all, you can set 'adb\_hotplugif' to an existing interface like 'wan' or to a non-existing 'dummy' interface -* **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) -* **AP mode:** in 'AP mode' adblock uses automatically the local router ip as nullip address. To make sure that your LuCI interface will be still accessible, you have to change the local uhttpd instance to ports <> 80/443 (see example below), also make sure that firewall and dnsmasq are installed and running -* **restricted mode:** to disable flash writes with adblock status information to the adblock config file (used by LuCI frontend), please set 'adb\_restricted' to '1' -* **adblock toggle:** to quickly switch adblocking 'on' or 'off', simply use _/etc/init.d/adblock toggle_ -* **adblock statistics:** to update only the adblock statistics (without updating the block lists as well), please run _/etc/init.d/adblock stats_ -* **adblock query ``:** to query the active blocklists for a specific domain, please run _/etc/init.d/adblock query ``_ (see example below) -* **configuration update:** to update an outdated adblock config file with the current default version, please run _/etc/init.d/adblock cfgup_, make your individual changes and start the adblock service again -* **debugging:** for script debugging please set the 'adb\_debug' variable in the header of _/etc/init.d/adblock_ to '1' -* **mute output** to mute the normal adblock output and print only warn/error messages, please set 'adb\_loglevel to '0' -* **disable active dns probing in windows:** to prevent a possible 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_ +* **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 block list 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 block lists:** enable this feature, to restore automatically the latest compressed backup of your block lists in case of any processing error (e.g. a single block list source is not available during update). Please use an (external) solid partition and _not_ your volatile router temp directory for this +* **scheduled list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below) +* **restrict procd interface trigger:** restrict the procd interface trigger to a (list of) certain interface(s) (default: wan). To disable it at all, remove all entries +* **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 block lists for a specific domain, please run _/etc/init.d/adblock query ``_ (see example below) +* **add new list sources:** you could add new block list 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_ ## Further adblock config options -* usually the adblock autodetection works quite well and no manual config overrides are needed, all options apply to the 'global' config section: +* usually the pre-configured adblock setup works quite well and no manual config overrides are needed, all listed options apply to the 'global' config section: * adb\_enabled => main switch to enable/disable adblock service (default: '1', enabled) - * adb\_cfgver => config version string (do not change!) - adblock will check this entry during startup - * adb\_lanif => name of the logical lan interface (default: 'lan') - * adb\_nullport => port of the adblock uhttpd instance used for ads delivered on port 80 (default: '65534') - * adb\_nullportssl => port of the adblock uhttpd instance used for ads delivered on port 443 (default: '65535') - * adb\_nullipv4 => IPv4 blackhole ip address (default: '198.18.0.1', in AP mode: local router ip) - * adb\_nullipv6 => IPv6 blackhole ip address (default: '::ffff:c612:0001', in AP mode: local router ip) - * adb\_forcedns => redirect all local DNS queries to the local dnsmasq resolver (default: '1', enabled / always disabled in 'AP mode') - * adb\_fetchttl => set the timeout for list downloads (default: '5' seconds) - * adb\_restricted => disable updates of the adblock config file (no flash writes) during runtime (default: '0', disabled) - * adb\_hotplugif => restrict hotplug support to a certain wan interface or disable it at all (default: '', disabled) - * adb\_loglevel => set it to '0' to mute normal adblock output and print only error messages (default: '1', normal output) + * adb\_debug => enable/disable adblock debug output (default: '0', disabled) + * adb\_iface => set the procd interface trigger to a (list of) lan / wan interface(s) (default: 'wan') + * adb\_fetch => full path to a different download utility, see example below (default: not set, use wget) + * adb\_fetchparm => options for the download utility, see example below (default: not set, use wget options) + * adb\_triggerdelay => additional trigger delay in seconds before adblock processing starts (default: '2') + * adb\_forcedns => force dns requests to local resolver (default: '0', disabled) + * adb\_forcesrt => force overall sort on low memory devices with less than 64 MB RAM (default: '0', disabled) ## Examples +**change default dns backend to 'unbound':** +

+Adblock detects the presence of an active unbound dns backend and the block lists will be automatically pulled in by unbound.
+The adblock script deposits the sorted and filtered block lists in '/var/lib/unbound' where unbound can find them in its jail.
+If you use manual configuration for unbound, then just include the following line in your 'server:' clause:
+
+  include: "/var/lib/unbound/adb_list.*"
+
+ +**configuration for different download utilities:** +

+wget (default):
+  option adb_fetch="/usr/bin/wget"
+  option adb_fetchparm="--no-config --quiet --no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"
+
+aria2c:
+  option adb_fetch '/usr/bin/aria2c'
+  option adb_fetchparm '-q --timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o'
+
+uclient-fetch:
+  option adb_fetch '/bin/uclient-fetch'
+  option adb_fetchparm '-q --timeout=10 --no-check-certificate -O'
 
-**example to change the ssl backend for 'uclient-fetch':**
+curl:
+  option adb_fetch '/usr/bin/curl'
+  option adb_fetchparm '-s --connect-timeout 10 --insecure -o'
+
+ +**receive adblock runtime information:**

-opkg update
-opkg remove --force-depends libustream-polarssl
-opkg install libustream-mbedtls
+root@blackhole:~# /etc/init.d/adblock status
+::: adblock runtime information
+ status          : active
+ adblock_version : 2.6.0
+ blocked_domains : 113711
+ fetch_info      : wget (built-in)
+ dns_backend     : dnsmasq
+ last_rundate    : 12.04.2017 13:08:26
+ system          : LEDE Reboot SNAPSHOT r3900-399d5cf532
 
-**example cronjob for a regular block list update:** +**cronjob for a regular block list update (/etc/crontabs/root):**

-# configuration found in /etc/crontabs/root
-# start adblock script once a day at 6 a.m.
-#
 0 06 * * *    /etc/init.d/adblock start
 
-**example blacklist entry (/etc/adblock/adblock.blacklist):** +**blacklist entry (/etc/adblock/adblock.blacklist):**

 ads.example.com
 
@@ -163,11 +182,11 @@ This entry does not block:
   http://example.com/
 
-**example whitelist entry (/etc/adblock/adblock.whitelist):** +**whitelist entry (/etc/adblock/adblock.whitelist):**

 here.com
 
-This entry removes the following (sub)domains from the blocklists:
+This entry removes the following (sub)domains from the block lists:
   maps.here.com
   here.com
 
@@ -176,53 +195,25 @@ This entry does not remove:
   www.adwhere.com
 
-**example uhttpd configuration in AP mode:** +**query active block lists for a certain (sub-)domain, e.g. for whitelisting:**

-# configuration found in /etc/config/uhttpd
-# change default http/https ports <> 80/443
-#
-config uhttpd 'main'
-    list listen_http '0.0.0.0:88'
-    list listen_https '0.0.0.0:445'
-
- -**example to query active blocklists for a certain (sub-)domain, i.e. for whitelisting:** -

-/etc/init.d/adblock query "example.www.doubleclick.net"
-=> distinct results for domain 'example.www.doubleclick.net' (overall 0)
-   no matches in active blocklists
-=> distinct results for domain 'www.doubleclick.net' (overall 1)
-   adb_list.winhelp     : www.doubleclick.net
-=> distinct results for domain 'doubleclick.net' (overall 252)
-   adb_list.adaway      : ad-g.doubleclick.net
-   adb_list.hphosts     : 1016557.fls.doubleclick.net
-   adb_list.rolist      : feedads.g.doubleclick.net
-   adb_list.securemecca : 1168945.fls.doubleclick.net
-   adb_list.sysctl      : ad.co.doubleclick.net
-   adb_list.whocares    : 3ad.doubleclick.net
-   adb_list.winhelp     : 1435575.fls.doubleclick.net
+/etc/init.d/adblock query example.www.doubleclick.net
+::: distinct results for domain 'example.www.doubleclick.net'
+ no match
+::: distinct results for domain 'www.doubleclick.net'
+ adb_list.sysctl      : www.doubleclick.net
+::: distinct results for domain 'doubleclick.net'
+ adb_list.adaway      : ad-g.doubleclick.net
+ adb_list.securemecca : 1168945.fls.doubleclick.net
+ adb_list.sysctl      : 1435575.fls.doubleclick.net
+ adb_list.whocares    : 3ad.doubleclick.net
 
 The query function checks against the submitted (sub-)domain and recurses automatically to the upper top level domain(s).
-For every domain it returns the overall count plus a distinct list of active blocklists with the first relevant result.
-In the example above you have to whitelist "www.doubleclick.net" to free the submitted domain.
+For every domain it returns the overall count plus a distinct list of active block lists with the first relevant result.
+In the example above whitelist "www.doubleclick.net" to free the submitted domain.
 
-**example to identify blocked domains during web browsing, i.e. for whitelisting:** -

-1. the easy way ...
-enable the network analysis builtins in chrome or firefox to identify domains
-which are redirected to the adblock null-ip (default 198.18.0.1), add these domains to your whitelist
-
-2. a bit harder ...
-enable 'Log queries' in the dnsmasq configuration (via LuCI Network => DHCP/DNS),
-ssh to your router and start tracing with 'logread -f -e "dnsmasq" -e "198.18.0.1"'
-switch to your client, access the relevant site and check all domains
-that are blocked/listed in logread, add these domains to your whitelist
-
-=> finally restart the adblock service (/etc/init.d/adblock restart) in both variants
-
- -**example to add a new blocklist source:** +**add a new block list source:**

 1. the easy way ...
 example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt
@@ -251,14 +242,8 @@ the output result should be a sequential list with one domain/host per line - no
 If your awk one-liner works quite well, add a new source section in adblock config and test your new source
 
-## Background -This adblock package is a dns/dnsmasq based adblock solution. -Queries to ad/abuse domains are never forwarded and always replied with a local IP address which may be IPv4 or IPv6. For that purpose adblock uses an ip address from the private 'Benchmark Test' subnet (198.18.0.1 / ::ffff:c612:0001) by default (in AP mode the local router ip address will be used). Furthermore all ad/abuse queries will be filtered by ip(6)tables and redirected to two uhttpd instances, separated for ads delivered on port 80 and on port 443 (in PREROUTING chain) or rejected (in FORWARD or OUTPUT chain). In 'AP mode' only the uhttpd related rules in PREROUTING chain are enabled. - -All iptables and uhttpd related adblock additions are non-destructive, no hard-coded changes in 'firewall.user', 'uhttpd' config or any other system related config files. There is _no_ adblock background daemon running, the (scheduled) start of the adblock service keeps only the adblock lists up-to-date. - ## Support -Please join the adblock discussion in this [openwrt forum thread](https://forum.openwrt.org/viewtopic.php?id=59803) or contact me by mail +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_ diff --git a/net/adblock/files/adblock-helper.sh b/net/adblock/files/adblock-helper.sh deleted file mode 100644 index 8be9941..0000000 --- a/net/adblock/files/adblock-helper.sh +++ /dev/null @@ -1,753 +0,0 @@ -#!/bin/sh -# function library used by adblock-update.sh -# written by Dirk Brenken (dev@brenken.org) - -# set initial defaults -# -LC_ALL=C -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -adb_scriptver="1.5.4" -adb_mincfgver="2.5" -adb_hotplugif="" -adb_lanif="lan" -adb_nullport="65534" -adb_nullportssl="65535" -adb_nullipv4="198.18.0.1" -adb_nullipv6="::ffff:c612:0001" -adb_whitelist="/etc/adblock/adblock.whitelist" -adb_whitelist_rset="\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}" -adb_dnsdir="/tmp/dnsmasq.d" -adb_dnshidedir="${adb_dnsdir}/.adb_hidden" -adb_dnsprefix="adb_list" -adb_count=0 -adb_minspace=12000 -adb_forcedns=1 -adb_fetchttl=5 -adb_restricted=0 -adb_loglevel=1 -adb_uci="$(which uci)" - -# f_envload: load adblock environment -# -f_envload() -{ - # source in system function library - # - if [ -r "/lib/functions.sh" ] - then - . "/lib/functions.sh" - else - rc=-10 - f_log "system function library not found, please check your installation" - f_exit - fi - - # source in system network library - # - if [ -r "/lib/functions/network.sh" ] - then - . "/lib/functions/network.sh" - else - rc=-10 - f_log "system network library not found, please check your installation" - f_exit - fi - - # uci function to parse global 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 - } - - # uci function to parse 'service' and 'source' sections - # - parse_config() - { - local value opt section="${1}" options="enabled adb_dir adb_src adb_src_rset adb_src_cat" - if [ "${section}" != "backup" ] - then - eval "adb_sources=\"${adb_sources} ${section}\"" - fi - for opt in ${options} - do - config_get value "${section}" "${opt}" - if [ -n "${value}" ] - then - eval "${opt}_${section}=\"${value}\"" - fi - done - } - - # load adblock config and start parsing functions - # - config_load adblock - config_foreach parse_config service - config_foreach parse_config source - - # get network basics - # - network_get_ipaddr adb_ipv4 "${adb_lanif}" - network_get_ipaddr6 adb_ipv6 "${adb_lanif}" - network_get_device adb_landev "${adb_lanif}" - network_find_wan adb_wanif4 - network_find_wan6 adb_wanif6 -} - -# f_envcheck: check/set environment prerequisites -# -f_envcheck() -{ - local check - - # check 'enabled' & 'version' config options - # - if [ -z "${adb_enabled}" ] || [ -z "${adb_cfgver}" ] || [ "${adb_cfgver%%.*}" != "${adb_mincfgver%%.*}" ] - then - rc=-1 - f_log "outdated adblock config (${adb_cfgver} vs. ${adb_mincfgver}), please run '/etc/init.d/adblock cfgup' to update your configuration" - f_exit - elif [ "${adb_cfgver#*.}" != "${adb_mincfgver#*.}" ] - then - outdated_ok="true" - fi - if [ "${adb_enabled}" != "1" ] - then - rc=-10 - f_log "adblock is currently disabled, please set adb_enabled to '1' to use this service" - f_exit - fi - - # check opkg availability - # - adb_pkglist="$(opkg list-installed)" - if [ $(($?)) -eq 255 ] - then - rc=-10 - f_log "adblock installation finished successfully, 'opkg' currently locked by package installer" - f_exit - elif [ -z "${adb_pkglist}" ] - then - rc=-1 - f_log "empty 'opkg' package list, please check your installation" - f_exit - fi - adb_sysver="$(printf "${adb_pkglist}" | grep "^base-files -")" - adb_sysver="${adb_sysver##*-}" - - # get lan ip addresses - # - if [ -z "${adb_ipv4}" ] && [ -z "${adb_ipv6}" ] - then - rc=-1 - f_log "no valid IPv4/IPv6 configuration found (${adb_lanif}), please set 'adb_lanif' manually" - f_exit - fi - - # check logical update interfaces (with default route) - # - if [ -z "${adb_wanif4}" ] && [ -z "${adb_wanif6}" ] - then - adb_wanif4="${adb_lanif}" - fi - - # check AP mode - # - if [ "${adb_wanif4}" = "${adb_lanif}" ] || [ "${adb_wanif6}" = "${adb_lanif}" ] - then - adb_nullipv4="${adb_ipv4}" - adb_nullipv6="${adb_ipv6}" - if [ -n "$(${adb_uci} -q get uhttpd.main.listen_http | grep -o ":80$")" ] || - [ -n "$(${adb_uci} -q get uhttpd.main.listen_https | grep -o ":443$")" ] - then - rc=-1 - f_log "AP mode detected, please set local LuCI instance to ports <> 80/443" - f_exit - else - apmode_ok="true" - fi - else - apmode_ok="false" - check="$(${adb_uci} -q get bcp38.@bcp38[0].enabled)" - if [ "${check}" = "1" ] - then - if [ -n "$(${adb_uci} -q get bcp38.@bcp38[0].match | grep -Fo "${adb_nullipv4%.*}")" ] - then - rc=-1 - f_log "please whitelist '${adb_nullipv4}' in your bcp38 configuration to use adblock" - f_exit - fi - fi - fi - - # check general package dependencies - # - f_depend "busybox -" - f_depend "uci -" - f_depend "uhttpd -" - f_depend "iptables -" - f_depend "kmod-ipt-nat -" - f_depend "firewall -" - f_depend "dnsmasq*" - - # check ipv6 related package dependencies - # - if [ -n "${adb_wanif6}" ] - then - f_depend "ip6tables -" "true" - if [ "${package_ok}" = "false" ] - then - f_log "package 'ip6tables' not found, IPv6 support will be disabled" - unset adb_wanif6 - else - f_depend "kmod-ipt-nat6 -" "true" - if [ "${package_ok}" = "false" ] - then - f_log "package 'kmod-ipt-nat6' not found, IPv6 support will be disabled" - unset adb_wanif6 - fi - fi - fi - - # check uclient-fetch/wget dependencies - # - f_depend "uclient-fetch -" "true" - if [ "${package_ok}" = "true" ] - then - f_depend "libustream-polarssl -" "true" - if [ "${package_ok}" = "false" ] - then - f_depend "libustream-\(mbedtls\|openssl\|cyassl\) -" "true" - if [ "${package_ok}" = "true" ] - then - adb_fetch="$(which uclient-fetch)" - fetch_parm="-q" - response_parm= - fi - fi - fi - if [ -z "${adb_fetch}" ] - then - f_depend "wget -" "true" - if [ "${package_ok}" = "true" ] - then - adb_fetch="$(which /usr/bin/wget* | head -1)" - fetch_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=${adb_fetchttl} --connect-timeout=${adb_fetchttl} --read-timeout=${adb_fetchttl}" - response_parm="--spider --server-response" - fi - if [ -z "${adb_fetch}" ] - then - rc=-1 - f_log "please install 'uclient-fetch' or 'wget' with ssl support to use adblock" - f_exit - fi - fi - - # check ca-certificate package and set fetch parm accordingly - # - f_depend "ca-certificates -" "true" - if [ "${package_ok}" = "false" ] - then - fetch_parm="${fetch_parm} --no-check-certificate" - fi - - # start normal processing/logging - # - f_log "domain adblock processing started (${adb_scriptver}, ${adb_sysver}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))" - - # log partially outdated config - # - if [ "${outdated_ok}" = "true" ] - then - f_log "partially outdated adblock config (${adb_mincfgver} vs. ${adb_cfgver}), please run '/etc/init.d/adblock cfgup' to update your configuration" - fi - - # log ap mode - # - if [ "${apmode_ok}" = "true" ] - then - f_log "AP mode enabled" - fi - - # set/log restricted mode - # - if [ "${adb_restricted}" = "1" ] - then - adb_uci="$(which true)" - f_log "Restricted mode enabled" - fi - - # check dns hideout directory - # - if [ -d "${adb_dnshidedir}" ] - then - mv_done="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print -exec mv -f "{}" "${adb_dnsdir}" \;)" - else - mkdir -p -m 660 "${adb_dnshidedir}" - fi - - # check adblock temp directory - # - adb_tmpfile="$(mktemp -tu)" - adb_tmpdir="$(mktemp -p /tmp -d)" - if [ -n "${adb_tmpdir}" ] && [ -d "${adb_tmpdir}" ] - then - f_space "${adb_tmpdir}" - if [ "${space_ok}" = "false" ] - then - if [ $((av_space)) -le 2000 ] - then - rc=105 - f_log "not enough free space in '${adb_tmpdir}' (avail. ${av_space} kb)" - f_exit - else - f_log "not enough free space to handle all block list sources at once in '${adb_tmpdir}' (avail. ${av_space} kb)" - fi - fi - else - rc=110 - f_log "temp directory not found" - f_exit - fi - - # check memory - # - mem_total="$(awk '$1 ~ /^MemTotal/ {printf $2}' "/proc/meminfo")" - mem_free="$(awk '$1 ~ /^MemFree/ {printf $2}' "/proc/meminfo")" - mem_swap="$(awk '$1 ~ /^SwapTotal/ {printf $2}' "/proc/meminfo")" - if [ $((mem_total)) -le 64000 ] && [ $((mem_swap)) -eq 0 ] - then - mem_ok="false" - f_log "not enough free memory, overall sort processing will be disabled (total: ${mem_total}, free: ${mem_free}, swap: ${mem_swap})" - else - mem_ok="true" - fi - - # check backup configuration - # - if [ "${enabled_backup}" = "1" ] && [ -d "${adb_dir_backup}" ] - then - f_space "${adb_dir_backup}" - if [ "${space_ok}" = "false" ] - then - f_log "not enough free space in '${adb_dir_backup}'(avail. ${av_space} kb), backup/restore will be disabled" - backup_ok="false" - else - f_log "backup/restore will be enabled" - backup_ok="true" - fi - else - backup_ok="false" - f_log "backup/restore will be disabled" - fi - - # set dnsmasq defaults - # - if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ] - then - adb_dnsformat="awk -v ipv4="${adb_nullipv4}" -v ipv6="${adb_nullipv6}" '{print \"address=/\"\$0\"/\"ipv4\"\n\"\"address=/\"\$0\"/\"ipv6}'" - elif [ -n "${adb_wanif4}" ] - then - adb_dnsformat="awk -v ipv4="${adb_nullipv4}" '{print \"address=/\"\$0\"/\"ipv4}'" - else - adb_dnsformat="awk -v ipv6="${adb_nullipv6}" '{print \"address=/\"\$0\"/\"ipv6}'" - fi - - # check volatile iptables configuration - # - if [ -n "${adb_wanif4}" ] - then - if [ "${apmode_ok}" = "false" ] - then - if [ "${adb_forcedns}" = "1" ] && [ -n "${adb_landev}" ] - then - f_firewall "IPv4" "nat" "prerouting_rule" "adb-dns" "1" "dns" "-p udp --dport 53 -j DNAT --to-destination ${adb_ipv4}:53" - f_firewall "IPv4" "nat" "prerouting_rule" "adb-dns" "2" "dns" "-p tcp --dport 53 -j DNAT --to-destination ${adb_ipv4}:53" - fi - f_firewall "IPv4" "filter" "forwarding_rule" "adb-fwd" "1" "fwd" "-p tcp -j REJECT --reject-with tcp-reset" - f_firewall "IPv4" "filter" "forwarding_rule" "adb-fwd" "2" "fwd" "-j REJECT --reject-with icmp-host-unreachable" - f_firewall "IPv4" "filter" "output_rule" "adb-out" "1" "out" "-p tcp -j REJECT --reject-with tcp-reset" - f_firewall "IPv4" "filter" "output_rule" "adb-out" "2" "out" "-j REJECT --reject-with icmp-host-unreachable" - fi - f_firewall "IPv4" "nat" "prerouting_rule" "adb-nat" "1" "nat" "-p tcp --dport 80 -j DNAT --to-destination ${adb_ipv4}:${adb_nullport}" - f_firewall "IPv4" "nat" "prerouting_rule" "adb-nat" "2" "nat" "-p tcp --dport 443 -j DNAT --to-destination ${adb_ipv4}:${adb_nullportssl}" - fi - if [ -n "${adb_wanif6}" ] - then - if [ "${apmode_ok}" = "false" ] - then - if [ "${adb_forcedns}" = "1" ] && [ -n "${adb_landev}" ] - then - f_firewall "IPv6" "nat" "PREROUTING" "adb-dns" "1" "dns" "-p udp --dport 53 -j DNAT --to-destination [${adb_ipv6}]:53" - f_firewall "IPv6" "nat" "PREROUTING" "adb-dns" "2" "dns" "-p tcp --dport 53 -j DNAT --to-destination [${adb_ipv6}]:53" - fi - f_firewall "IPv6" "filter" "forwarding_rule" "adb-fwd" "1" "fwd" "-p tcp -j REJECT --reject-with tcp-reset" - f_firewall "IPv6" "filter" "forwarding_rule" "adb-fwd" "2" "fwd" "-j REJECT --reject-with icmp6-addr-unreachable" - f_firewall "IPv6" "filter" "output_rule" "adb-out" "1" "out" "-p tcp -j REJECT --reject-with tcp-reset" - f_firewall "IPv6" "filter" "output_rule" "adb-out" "2" "out" "-j REJECT --reject-with icmp6-addr-unreachable" - fi - f_firewall "IPv6" "nat" "PREROUTING" "adb-nat" "1" "nat" "-p tcp --dport 80 -j DNAT --to-destination [${adb_ipv6}]:${adb_nullport}" - f_firewall "IPv6" "nat" "PREROUTING" "adb-nat" "2" "nat" "-p tcp --dport 443 -j DNAT --to-destination [${adb_ipv6}]:${adb_nullportssl}" - fi - if [ "${firewall_ok}" = "true" ] - then - f_log "created volatile firewall rulesets" - fi - - # check volatile uhttpd instance configuration - # - if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ] - then - f_uhttpd "adbIPv46_80" "1" "-p ${adb_ipv4}:${adb_nullport} -p [${adb_ipv6}]:${adb_nullport}" - f_uhttpd "adbIPv46_443" "0" "-p ${adb_ipv4}:${adb_nullportssl} -p [${adb_ipv6}]:${adb_nullportssl}" - elif [ -n "${adb_wanif4}" ] - then - f_uhttpd "adbIPv4_80" "1" "-p ${adb_ipv4}:${adb_nullport}" - f_uhttpd "adbIPv4_443" "0" "-p ${adb_ipv4}:${adb_nullportssl}" - else - f_uhttpd "adbIPv6_80" "1" "-p [${adb_ipv6}]:${adb_nullport}" - f_uhttpd "adbIPv6_443" "0" "-p [${adb_ipv6}]:${adb_nullportssl}" - fi - if [ "${uhttpd_ok}" = "true" ] - then - f_log "created volatile uhttpd instances" - fi - - # check whitelist entries - # - if [ -s "${adb_whitelist}" ] - then - awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.whitelist" - fi - - # remove temporary package list - # - unset adb_pkglist -} - -# f_depend: check package dependencies -# -f_depend() -{ - local check - local package="${1}" - local check_only="${2}" - package_ok="true" - - check="$(printf "${adb_pkglist}" | grep "^${package}")" - if [ "${check_only}" = "true" ] && [ -z "${check}" ] - then - package_ok="false" - elif [ -z "${check}" ] - then - rc=-1 - f_log "package '${package}' not found" - f_exit - fi -} - -# f_firewall: set iptables rules for ipv4/ipv6 -# -f_firewall() -{ - local ipt="iptables" - local nullip="${adb_nullipv4}" - local proto="${1}" - local table="${2}" - local chsrc="${3}" - local chain="${4}" - local chpos="${5}" - local notes="adb-${6}" - local rules="${7}" - - # select appropriate iptables executable for IPv6 - # - if [ "${proto}" = "IPv6" ] - then - ipt="ip6tables" - nullip="${adb_nullipv6}" - fi - - # check whether iptables chain already exist - # - rc="$("${ipt}" -w -t "${table}" -nL "${chain}" >/dev/null 2>&1; printf ${?})" - if [ $((rc)) -ne 0 ] - then - "${ipt}" -w -t "${table}" -N "${chain}" - "${ipt}" -w -t "${table}" -A "${chain}" -m comment --comment "${notes}" -j RETURN - if [ "${chain}" = "adb-dns" ] - then - "${ipt}" -w -t "${table}" -A "${chsrc}" -i "${adb_landev}+" -m comment --comment "${notes}" -j "${chain}" - else - "${ipt}" -w -t "${table}" -A "${chsrc}" -d "${nullip}" -m comment --comment "${notes}" -j "${chain}" - fi - rc=${?} - if [ $((rc)) -ne 0 ] - then - f_log "failed to initialize volatile ${proto} firewall chain '${chain}'" - f_exit - fi - fi - - # check whether iptables rule already exist - # - rc="$("${ipt}" -w -t "${table}" -C "${chain}" -m comment --comment "${notes}" ${rules} >/dev/null 2>&1; printf ${?})" - if [ $((rc)) -ne 0 ] - then - "${ipt}" -w -t "${table}" -I "${chain}" "${chpos}" -m comment --comment "${notes}" ${rules} - rc=${?} - if [ $((rc)) -eq 0 ] - then - firewall_ok="true" - else - f_log "failed to initialize volatile ${proto} firewall rule '${notes}'" - f_exit - fi - fi -} - -# f_uhttpd: start uhttpd instances -# -f_uhttpd() -{ - local check - local realm="${1}" - local timeout="${2}" - local ports="${3}" - - check="$(pgrep -f "uhttpd -h /www/adblock -N 25 -T ${timeout} -r ${realm}")" - if [ -z "${check}" ] - then - uhttpd -h "/www/adblock" -N 25 -T "${timeout}" -r "${realm}" -k 0 -t 0 -R -D -S -E "/index.html" ${ports} - rc=${?} - if [ $((rc)) -eq 0 ] - then - uhttpd_ok="true" - else - f_log "failed to initialize volatile uhttpd instance (${realm})" - f_exit - fi - fi -} - -# f_space: check mount points/space requirements -# -f_space() -{ - local mp="${1}" - space_ok="true" - - if [ -d "${mp}" ] - then - av_space="$(df "${mp}" | tail -n1 | awk '{printf $4}')" - if [ $((av_space)) -lt $((adb_minspace)) ] - then - space_ok="false" - fi - fi -} - -# f_cntconfig: calculate counters in config -# -f_cntconfig() -{ - local src_name - local count=0 - - for src_name in $(ls -ASr "${adb_dnsdir}/${adb_dnsprefix}"*) - do - count="$(wc -l < "${src_name}")" - src_name="${src_name##*.}" - if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ] - then - count=$((count / 2)) - fi - "${adb_uci}" -q set "adblock.${src_name}.adb_src_count=${count}" - adb_count=$((adb_count + count)) - done - "${adb_uci}" -q set "adblock.global.adb_overall_count=${adb_count}" -} - -# f_rmconfig: remove volatile config entries -# -f_rmconfig() -{ - local opt - local options="adb_src_timestamp adb_src_count" - local section="${1}" - - "${adb_uci}" -q delete "adblock.global.adb_overall_count" - "${adb_uci}" -q delete "adblock.global.adb_dnstoggle" - "${adb_uci}" -q delete "adblock.global.adb_percentage" - "${adb_uci}" -q delete "adblock.global.adb_lastrun" - for opt in ${options} - do - "${adb_uci}" -q delete "adblock.${section}.${opt}" - done -} - -# f_rmdns: remove dns block lists and backups -# -f_rmdns() -{ - rm_dns="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print -exec rm -f "{}" \;)" - if [ -n "${rm_dns}" ] - then - rm -rf "${adb_dnshidedir}" - if [ "${enabled_backup}" = "1" ] && [ -d "${adb_dir_backup}" ] - then - rm -f "${adb_dir_backup}/${adb_dnsprefix}"*.gz - fi - /etc/init.d/dnsmasq restart - fi -} - -# f_rmuhttpd: remove uhttpd instances -# -f_rmuhttpd() -{ - rm_uhttpd="$(pgrep -f "uhttpd -h /www/adblock")" - if [ -n "${rm_uhttpd}" ] - then - for pid in ${rm_uhttpd} - do - kill -9 "${pid}" - done - fi -} - -# f_rmfirewall: remove firewall rulsets -# -f_rmfirewall() -{ - rm_fw="$(iptables -w -t nat -vnL | grep -Fo "adb-")" - if [ -n "${rm_fw}" ] - then - iptables-save | grep -Fv -- "adb-" | iptables-restore - if [ -n "$(lsmod | grep -Fo "ip6table_nat")" ] - then - ip6tables-save | grep -Fv -- "adb-" | ip6tables-restore - fi - fi -} - -# f_log: log messages to stdout and syslog -# -f_log() -{ - local log_parm - local log_msg="${1}" - local class="info " - - if [ $((rc)) -gt 0 ] - then - class="error" - elif [ $((rc)) -lt 0 ] - then - class="warn " - fi - if [ -t 1 ] - then - log_parm="-s" - fi - if [ -n "${log_msg}" ] && ([ $((adb_loglevel)) -gt 0 ] || [ "${class}" != "info " ]) - then - logger ${log_parm} -t "adblock[${adb_pid}] ${class}" "${log_msg}" 2>&1 - fi -} - -# f_statistics: adblock runtime statistics -f_statistics() -{ - local ipv4_blk=0 ipv4_all=0 ipv4_pct=0 - local ipv6_blk=0 ipv6_all=0 ipv6_pct=0 - - if [ -n "${adb_wanif4}" ] - then - ipv4_blk="$(iptables -t nat -vxnL adb-nat | awk '$3 ~ /^DNAT$/ {sum += $1} END {printf sum}')" - ipv4_all="$(iptables -t nat -vxnL PREROUTING | awk '$3 ~ /^(delegate_prerouting|prerouting_rule)$/ {sum += $1} END {printf sum}')" - if [ $((ipv4_all)) -gt 0 ] && [ $((ipv4_blk)) -gt 0 ] && [ $((ipv4_all)) -gt $((ipv4_blk)) ] - then - ipv4_pct="$(printf "${ipv4_blk}" | awk -v all="${ipv4_all}" '{printf( "%5.2f\n",$1/all*100)}')" - elif [ $((ipv4_all)) -lt $((ipv4_blk)) ] - then - iptables -t nat -Z adb-nat - fi - fi - if [ -n "${adb_wanif6}" ] - then - ipv6_blk="$(ip6tables -t nat -vxnL adb-nat | awk '$3 ~ /^DNAT$/ {sum += $1} END {printf sum}')" - ipv6_all="$(ip6tables -t nat -vxnL PREROUTING | awk '$3 ~ /^(adb-nat|DNAT)$/ {sum += $1} END {printf sum}')" - if [ $((ipv6_all)) -gt 0 ] && [ $((ipv6_blk)) -gt 0 ] && [ $((ipv6_all)) -gt $((ipv6_blk)) ] - then - ipv6_pct="$(printf "${ipv6_blk}" | awk -v all="${ipv6_all}" '{printf( "%5.2f\n",$1/all*100)}')" - elif [ $((ipv6_all)) -lt $((ipv6_blk)) ] - then - ip6tables -t nat -Z adb-nat - fi - fi - "${adb_uci}" -q set "adblock.global.adb_percentage=${ipv4_pct}%/${ipv6_pct}%" - f_log "firewall statistics (IPv4/IPv6): ${ipv4_pct}%/${ipv6_pct}% of all packets in prerouting chain are ad related & blocked" -} - -# f_exit: delete temporary files, generate statistics and exit -# -f_exit() -{ - local lastrun="$(date "+%d.%m.%Y %H:%M:%S")" - - if [ "${adb_restricted}" = "1" ] - then - adb_uci="$(which true)" - fi - - # delete temp files & directories - # - rm -f "${adb_tmpfile}" - rm -rf "${adb_tmpdir}" - - # tidy up on error - # - if [ $((rc)) -lt 0 ] || [ $((rc)) -gt 0 ] - then - f_rmdns - f_rmuhttpd - f_rmfirewall - config_foreach f_rmconfig source - if [ $((rc)) -eq -1 ] - then - "${adb_uci}" -q set "adblock.global.adb_lastrun=${lastrun} => runtime error, please check the log!" - fi - fi - - # final log message and iptables statistics - # - if [ $((rc)) -eq 0 ] - then - f_statistics - "${adb_uci}" -q set "adblock.global.adb_lastrun=${lastrun}" - f_log "domain adblock processing finished successfully (${adb_scriptver}, ${adb_sysver}, ${lastrun})" - elif [ $((rc)) -gt 0 ] - then - f_log "domain adblock processing failed (${adb_scriptver}, ${adb_sysver}, ${lastrun})" - else - rc=0 - fi - if [ -n "$("${adb_uci}" -q changes adblock)" ] - then - "${adb_uci}" -q commit "adblock" - fi - rm -f "${adb_pidfile}" - exit ${rc} -} diff --git a/net/adblock/files/adblock-update.sh b/net/adblock/files/adblock-update.sh deleted file mode 100755 index 661081d..0000000 --- a/net/adblock/files/adblock-update.sh +++ /dev/null @@ -1,278 +0,0 @@ -#!/bin/sh -# dns based ad/abuse domain blocking script -# written by 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 . - -# prepare environment -# -adb_pid="${$}" -adb_pidfile="/var/run/adblock.pid" -adb_scriptdir="${0%/*}" - -if [ -r "${adb_pidfile}" ] -then - rc=255 - logger -s -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile}))" - exit ${rc} -else - printf "${adb_pid}" > "${adb_pidfile}" - if [ -r "${adb_scriptdir}/adblock-helper.sh" ] - then - . "${adb_scriptdir}/adblock-helper.sh" - f_envload - else - rc=254 - logger -s -t "adblock[${adb_pid}] error" "adblock function library not found" - rm -f "${adb_pidfile}" - exit ${rc} - fi -fi - -# call trap function on error signals (HUP, INT, QUIT, BUS, SEGV, TERM) -# -trap "rc=250; f_log 'error signal received/trapped'; f_exit" 1 2 3 10 11 15 - -# check environment -# -f_envcheck - -# main loop for all block list sources -# -f_log "use '${adb_fetch}' for list downloads" - -for src_name in ${adb_sources} -do - # check disabled sources - # - eval "enabled=\"\${enabled_${src_name}}\"" - if [ "${enabled}" = "0" ] - then - if [ -r "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" ] - then - rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - rm -f "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" - fi - rm_done="true" - f_log "=> disabled source '${src_name}' removed" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_timestamp" - continue - fi - - f_log "=> processing source '${src_name}'" - eval "url=\"\${adb_src_${src_name}}\"" - eval "src_rset=\"\${adb_src_rset_${src_name}}\"" - eval "list_time=\"\${CONFIG_${src_name}_adb_src_timestamp}\"" - adb_dnsfile="${adb_dnsdir}/${adb_dnsprefix}.${src_name}" - - # check 'url' and 'src_rset' values - # - if [ -z "${url}" ] || [ -z "${src_rset}" ] - then - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=broken config" - f_log " broken source configuration, skipped" - continue - fi - - # download only block list with newer/updated timestamp - # - if [ "${src_name}" = "blacklist" ] - then - url_time="$(date -r "${url}")" - elif [ -n "${response_parm}" ] - then - url_time="$(${adb_fetch} ${fetch_parm} ${response_parm} "${url}" 2>&1 | awk '$0 ~ /Last-Modified/ {printf substr($0,18)}')" - fi - if [ -z "${url_time}" ] - then - url_time="$(date)" - f_log " no online timestamp" - fi - if [ -z "${list_time}" ] || [ "${list_time}" != "${url_time}" ] || [ ! -r "${adb_dnsfile}" ] ||\ - ([ "${backup_ok}" = "true" ] && [ ! -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ]) - then - if [ "${src_name}" = "blacklist" ] - then - tmp_domains="$(strings -n 1 "${url}")" - elif [ "${src_name}" = "shalla" ] - then - shalla_archive="${adb_tmpdir}/shallalist.tar.gz" - shalla_file="${adb_tmpdir}/shallalist.txt" - "${adb_fetch}" ${fetch_parm} -O "${shalla_archive}" "${url}" - rc=${?} - if [ $((rc)) -eq 0 ] - then - > "${shalla_file}" - for category in ${adb_src_cat_shalla} - do - tar -xOzf "${shalla_archive}" BL/${category}/domains >> "${shalla_file}" - rc=${?} - if [ $((rc)) -ne 0 ] - then - f_log " archive extraction failed (${category})" - break - fi - done - tmp_domains="$(strings -n 1 "${shalla_file}")" - rm -rf "${adb_tmpdir}/BL" - rm -f "${shalla_archive}" - rm -f "${shalla_file}" - fi - else - tmp_domains="$(${adb_fetch} ${fetch_parm} -O- "${url}" | strings -n 1)" - fi - rc=${?} - else - f_log " source doesn't change, skipped" - continue - fi - - # check download result and prepare domain output, backup/restore if needed - # - if [ $((rc)) -eq 0 ] && [ -n "${tmp_domains}" ] - then - count="$(printf "%s\n" "${tmp_domains}" | awk "${src_rset}" | tee "${adb_tmpfile}" | wc -l)" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=${url_time}" - if [ "${backup_ok}" = "true" ] - then - gzip -cf "${adb_tmpfile}" > "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" - fi - f_log " source download finished (${count} entries)" - unset tmp_domains - elif [ $((rc)) -eq 0 ] && [ -z "${tmp_domains}" ] - then - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - gunzip -cf "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" > "${adb_tmpfile}" - count="$(wc -l < "${adb_tmpfile}")" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=list restored" - f_log " empty source download, restored (${count} entries)" - else - if [ -r "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" ] - then - rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" - rm_done="true" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=empty download" - f_log " empty source download, skipped" - continue - fi - else - rc=0 - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - gunzip -cf "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" > "${adb_tmpfile}" - count="$(wc -l < "${adb_tmpfile}")" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=list restored" - f_log " source download failed, restored (${count} entries)" - else - if [ -r "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" ] - then - rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" - rm_done="true" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=download failed" - f_log " source download failed, skipped" - continue - fi - fi - - # remove whitelist domains, sort domains and make them unique, - # rewrite ad/abuse domain information to separate dnsmasq files - # - if [ $((count)) -gt 0 ] && [ -n "${adb_tmpfile}" ] - then - if [ -s "${adb_tmpdir}/tmp.whitelist" ] - then - grep -vf "${adb_tmpdir}/tmp.whitelist" "${adb_tmpfile}" | sort -u | eval "${adb_dnsformat}" > "${adb_dnsfile}" - else - sort -u "${adb_tmpfile}" | eval "${adb_dnsformat}" > "${adb_dnsfile}" - fi - rc=${?} - if [ $((rc)) -eq 0 ] - then - rev_done="true" - f_log " domain merging finished" - else - rc=0 - rm -f "${adb_dnsfile}" - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - rm -f "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=domain merging failed" - f_log " domain merging failed, skipped" - continue - fi - else - rm -f "${adb_dnsfile}" - if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] - then - rm -f "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" - fi - "${adb_uci}" -q delete "adblock.${src_name}.adb_src_count" - "${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=empty domain input" - f_log " empty domain input, skipped" - continue - fi -done - -# overall sort, make block list entries unique -# -if [ "${rev_done}" = "true" ] && [ "${mem_ok}" = "true" ] -then - f_log "remove duplicates in separate block lists" - for list in $(ls -ASr "${adb_dnsdir}/${adb_dnsprefix}"*) - do - list="${list/*./}" - if [ -s "${adb_tmpdir}/blocklist.overall" ] - then - sort "${adb_tmpdir}/blocklist.overall" "${adb_tmpdir}/blocklist.overall" "${adb_dnsdir}/${adb_dnsprefix}.${list}" | uniq -u > "${adb_tmpdir}/tmp.blocklist" - cat "${adb_tmpdir}/tmp.blocklist" > "${adb_dnsdir}/${adb_dnsprefix}.${list}" - fi - cat "${adb_dnsdir}/${adb_dnsprefix}.${list}" >> "${adb_tmpdir}/blocklist.overall" - done -fi - -# restart & check dnsmasq with generated set of block lists -# -if [ "${rev_done}" = "true" ] || [ "${rm_done}" = "true" ] || [ -n "${mv_done}" ] -then - "${adb_uci}" -q delete "adblock.global.adb_dnstoggle" - /etc/init.d/dnsmasq restart - sleep 1 - check="$(pgrep -f "dnsmasq")" - if [ -n "${check}" ] - then - f_cntconfig - f_log "block lists with overall ${adb_count} domains loaded" - else - f_rmdns - sleep 1 - check="$(pgrep -f "dnsmasq")" - if [ -n "${check}" ] - then - f_log "dnsmasq restart without block lists succeeded, please check your configuration" - else - f_log "dnsmasq restart without block lists failed, please check your configuration" - fi - rc=100 - f_exit - fi -else - f_cntconfig - f_log "block lists with overall ${adb_count} domains are still valid, no update required" -fi - -# remove temporary files and exit -# -f_exit diff --git a/net/adblock/files/adblock.conf b/net/adblock/files/adblock.conf index cc86b50..0e4fd02 100644 --- a/net/adblock/files/adblock.conf +++ b/net/adblock/files/adblock.conf @@ -3,14 +3,16 @@ config adblock 'global' option adb_enabled '1' - option adb_cfgver '2.5' + option adb_debug '0' + option adb_forcesrt '0' + option adb_forcedns '0' + option adb_iface 'wan' + option adb_triggerdelay '2' option adb_whitelist '/etc/adblock/adblock.whitelist' option adb_whitelist_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}' - option adb_forcedns '1' - -config service 'backup' - option enabled '0' - option adb_dir '/mnt' + option adb_backup '0' + option adb_backupdir '/mnt' + option adb_rtfile '/tmp/adb_runtime.json' config source 'adaway' option enabled '1' @@ -18,6 +20,12 @@ config source 'adaway' option adb_src_rset '\$0 ~/^127\.0\.0\.1[ \t]+([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$2)}' option adb_src_desc 'focus on mobile ads, infrequent updates, approx. 400 entries' +config source 'adguard' + option enabled '0' + option adb_src 'https://raw.githubusercontent.com/AdguardTeam/AdguardDNS/master/Filters/filter.txt' + option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' + option adb_src_desc 'combined adguard dns filter list, approx. 12.000 entries' + config source 'blacklist' option enabled '0' option adb_src '/etc/adblock/adblock.blacklist' @@ -32,7 +40,7 @@ config source 'disconnect' config source 'dshield' option enabled '0' - option adb_src 'http://www.dshield.org/feeds/suspiciousdomains_Low.txt' + option adb_src 'https://www.dshield.org/feeds/suspiciousdomains_Low.txt' option adb_src_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}' option adb_src_desc 'generic blocklist, daily updates, approx. 4.500 entries' @@ -78,13 +86,25 @@ config source 'ransomware' option adb_src_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}' option adb_src_desc 'focus on ransomware, numerous updates on the same day, approx. 130 entries' -config source 'rolist' +config source 'reg_cn' + option enabled '0' + option adb_src 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt' + option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' + option adb_src_desc 'focus on chinese ads, daily updates, approx. 1.600 entries' + +config source 'reg_pl' + option enabled '0' + option adb_src 'http://adblocklist.org/adblock-pxf-polish.txt' + option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' + option adb_src_desc 'focus on polish ads, daily updates, approx. 50 entries' + +config source 'reg_ro' option enabled '0' option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt' option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 600 entries' -config source 'ruadlist' +config source 'reg_ru' option enabled '0' option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt' option adb_src_rset '{FS=\"[|^]\"} \$0 ~/^\|\|([A-Za-z0-9_-]+\.){1,}[A-Za-z]+\^$/{print tolower(\$3)}' diff --git a/net/adblock/files/adblock.hotplug b/net/adblock/files/adblock.hotplug deleted file mode 100644 index ee48bb0..0000000 --- a/net/adblock/files/adblock.hotplug +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# - -adb_pid="${$}" -adb_helper="/usr/bin/adblock-helper.sh" -adb_pidfile="/var/run/adblock.pid" -adb_enabled="$(/etc/init.d/adblock enabled; echo $?)" - -if [ "${adb_enabled}" = "1" ] || [ -f "${adb_pidfile}" ] || [ "${ACTION}" != "ifup" ] -then - exit 0 -fi - -. "${adb_helper}" -f_envload - -if [ "${INTERFACE}" = "${adb_wanif4}" ] || [ "${INTERFACE}" = "${adb_wanif6}" ] -then - if [ -z "${adb_hotplugif}" ] || [ "${INTERFACE}" = "${adb_hotplugif}" ] - then - /etc/init.d/adblock start - f_log "adblock service started due to '${ACTION}' of '${INTERFACE}' interface" - fi -fi diff --git a/net/adblock/files/adblock.init b/net/adblock/files/adblock.init index 5cd8672..ee94aa8 100755 --- a/net/adblock/files/adblock.init +++ b/net/adblock/files/adblock.init @@ -1,173 +1,82 @@ #!/bin/sh /etc/rc.common # -START=90 -EXTRA_COMMANDS="toggle stats cfgup envchk query" -EXTRA_HELP=" toggle Toggle adblock 'on' or 'off' - stats Update adblock statistics - cfgup Update adblock configuration file - envchk Check/Set adblock environment - query Query active blocklists for specific domain" +START=50 +USE_PROCD=1 -adb_debug=0 -adb_pid="${$}" -adb_script="/usr/bin/adblock-update.sh" -adb_helper="/usr/bin/adblock-helper.sh" -adb_pidfile="/var/run/adblock.pid" -bg_parm="&" +EXTRA_COMMANDS="suspend resume query status" +EXTRA_HELP=" suspend Suspend adblock processing + resume Resume adblock processing + query Query active blocklists for specific domains + status Print runtime information" -if [ $((adb_debug)) -eq 0 ] -then - exec 2>/dev/null -fi - -if [ -r "${adb_pidfile}" ] -then - logger -s -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile}))" 2>&1 - exit 255 -fi - -. "${adb_helper}" -f_envload - -if [ "${adb_restricted}" = "1" ] -then - adb_uci="$(which true)" -fi +adb_init="/etc/init.d/adblock" +adb_script="/usr/bin/adblock.sh" boot() { - return 0 + adb_boot=1 + ubus -t 30 wait_for network.interface 2>/dev/null + rc_procd start_service } -start() +start_service() { - if [ -t 1 ] + if [ $("${adb_init}" enabled; printf ${?}) -eq 0 ] then - unset bg_parm + if [ -n "${adb_boot}" ] + then + return 0 + fi + procd_open_instance "adblock" + procd_set_param command "${adb_script}" "${@}" + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance fi - eval "${adb_script}" ${bg_parm} - return 0 -} - -restart() -{ - stop - start } -reload() +stop_service() { - reload="true" - stop - start + rc_procd "${adb_script}" stop + rc_procd start_service } -stop() +restart() { - f_rmdns - f_rmuhttpd - config_foreach f_rmconfig source - if [ -z "${reload}" ] - then - f_rmfirewall - fi - if [ -n "${rm_dns}" ] || [ -n "${rm_uhttpd}" ] || [ -n "${rm_fw}" ] || [ -n "$(${adb_uci} -q changes adblock)" ] - then - "${adb_uci}" -q commit adblock - f_log "all adblock related services stopped" - fi - return 0 + rc_procd start_service restart } -toggle() +suspend() { - if [ -d "${adb_dnshidedir}" ] - then - list_dns="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" - list_dnshide="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" - if [ -n "${list_dns}" ] - then - source="${adb_dnsdir}/${adb_dnsprefix}" - target="${adb_dnshidedir}" - pos="off" - elif [ -n "${list_dnshide}" ] - then - source="${adb_dnshidedir}/${adb_dnsprefix}" - target="${adb_dnsdir}" - pos="on" - fi - if [ -n "${list_dns}" ] || [ -n "${list_dnshide}" ] - then - mv -f "${source}"* "${target}" - /etc/init.d/dnsmasq restart - "${adb_uci}" -q set "adblock.global.adb_dnstoggle=${pos}" - "${adb_uci}" -q commit "adblock" - f_log "adblock toggle switched '${pos}'" - fi - fi - return 0 + rc_procd "${adb_script}" suspend } -stats() +resume() { - f_statistics - "${adb_uci}" -q commit "adblock" - return 0 + rc_procd "${adb_script}" resume } -cfgup() +query() { - stop - cp -pf "/etc/adblock/adblock.conf.default" "/etc/config/adblock" - rc=$? - if [ $((rc)) -eq 0 ] - then - f_log "default adblock configuration applied, please check the settings in '/etc/config/adblock'" - else - f_log "default adblock configuration not found, please re-install the package via 'opkg install adblock --force-maintainer'" - fi - return 0 + rc_procd "${adb_script}" query "${1}" } -query() +status() { - domain="${1}" - tld="${domain#*.}" - list_dns="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" - if [ -z "${list_dns}" ] - then - f_log "no active blocklists found, please start adblock first" - elif [ -z "${domain}" ] || [ "${domain}" = "${tld}" ] - then - f_log "invalid domain query input, please submit a specific (sub-)domain, i.e. 'www.abc.xyz'" - else - while [ "${domain}" != "${tld}" ] - do - search="${domain//./\.}" - result="$(grep -Hm 1 "[/\.]${search}/" "${adb_dnsdir}/adb_list"* | awk -F ':|/' '{print " "$4"\t: "$6}')" - count="$(grep -hc "[/\.]${search}/" "${adb_dnsdir}/adb_list"* | awk '{sum += $1} END {printf sum}')" - printf "%s\n" "=> distinct results for domain '${domain}' (overall ${count})" - if [ -z "${result}" ] - then - printf "%s\n" " no matches in active blocklists" - else - printf "%s\n" "${result}" - fi - domain="${tld}" - tld="${domain#*.}" - done - fi - return 0 + rc_procd "${adb_script}" status } -envchk() +service_triggers() { - adb_loglevel=0 - f_envcheck - rm -f "${adb_tmpfile}" - rm -rf "${adb_tmpdir}" - adb_loglevel=1 - f_log "adblock environment check finished successfully" - return 0 + local iface="$(uci -q get adblock.global.adb_iface)" + local delay="$(uci -q get adblock.global.adb_triggerdelay)" + + PROCD_RELOAD_DELAY=$((${delay:=2} * 1000)) + for name in ${iface} + do + procd_add_interface_trigger "interface.*.up" "${name}" "${adb_init}" start + done + PROCD_RELOAD_DELAY=1000 + procd_add_config_trigger "config.change" "adblock" "${adb_init}" start } diff --git a/net/adblock/files/adblock.sh b/net/adblock/files/adblock.sh new file mode 100755 index 0000000..03f86b0 --- /dev/null +++ b/net/adblock/files/adblock.sh @@ -0,0 +1,586 @@ +#!/bin/sh +# dns based ad/abuse domain blocking +# written by 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 initial defaults +# +LC_ALL=C +PATH="/usr/sbin:/usr/bin:/sbin:/bin" +adb_ver="2.6.2" +adb_sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')" +adb_enabled=1 +adb_debug=0 +adb_forcesrt=0 +adb_forcedns=0 +adb_backup=0 +adb_backupdir="/mnt" +adb_whitelist="/etc/adblock/adblock.whitelist" +adb_whitelist_rset="\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}" +adb_fetch="/usr/bin/wget" +adb_fetchparm="--no-config --quiet --no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O" +adb_dnslist="dnsmasq unbound" +adb_dnsprefix="adb_list" +adb_rtfile="/tmp/adb_runtime.json" + +# f_envload: load adblock environment +# +f_envload() +{ + local dns_up cnt=0 + + # source in system library + # + if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ] + then + . "/lib/functions.sh" + . "/usr/share/libubox/jshn.sh" + else + f_log "error" "system libraries not found" + fi + + # set dns backend environment + # + while [ ${cnt} -le 20 ] + do + for dns in ${adb_dnslist} + do + dns_up="$(ubus -S call service list "{\"name\":\"${dns}\"}" | jsonfilter -l1 -e "@.${dns}.instances.*.running")" + if [ "${dns_up}" = "true" ] + then + case "${dns}" in + dnsmasq) + adb_dns="dnsmasq" + adb_dnsdir="/tmp/dnsmasq.d" + adb_dnshidedir="${adb_dnsdir}/.adb_hidden" + adb_dnsformat="awk '{print \"local=/\"\$0\"/\"}'" + break 2 + ;; + unbound) + adb_dns="unbound" + adb_dnsdir="/var/lib/unbound" + adb_dnshidedir="${adb_dnsdir}/.adb_hidden" + adb_dnsformat="awk '{print \"local-zone: \042\"\$0\"\042 static\"}'" + break 2 + ;; + esac + fi + done + sleep 1 + cnt=$((cnt+1)) + done + if [ -z "${adb_dns}" ] + then + f_log "error" "no active/supported DNS backend found" + fi + + # parse global 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' section + # + 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 + + # force dns to local resolver + # + if [ ${adb_forcedns} -eq 1 ] && [ -z "$(uci -q get firewall.adblock_dns)" ] + then + uci -q set firewall.adblock_dns="redirect" + uci -q set firewall.adblock_dns.name="Adblock DNS" + uci -q set firewall.adblock_dns.src="lan" + uci -q set firewall.adblock_dns.proto="tcp udp" + uci -q set firewall.adblock_dns.src_dport="53" + uci -q set firewall.adblock_dns.dest_port="53" + uci -q set firewall.adblock_dns.target="DNAT" + elif [ ${adb_forcedns} -eq 0 ] && [ -n "$(uci -q get firewall.adblock_dns)" ] + then + uci -q delete firewall.adblock_dns + fi + if [ -n "$(uci -q changes firewall)" ] + then + uci -q commit firewall + if [ $(/etc/init.d/firewall enabled; printf ${?}) -eq 0 ] + then + /etc/init.d/firewall reload >/dev/null 2>&1 + fi + fi +} + +# f_envcheck: check/set environment prerequisites +# +f_envcheck() +{ + local ssl_lib + + # check 'enabled' option + # + if [ ${adb_enabled} -ne 1 ] + then + if [ -n "$(ls -dA "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null)" ] + then + f_rmdns + f_dnsrestart + fi + f_log "info " "adblock is currently disabled, please set adb_enabled to '1' to use this service" + exit 0 + fi + + # check fetch utility + # + ssl_lib="-" + if [ -x "${adb_fetch}" ] + then + if [ "$(readlink -fn "${adb_fetch}")" = "/usr/bin/wget-nossl" ] + then + adb_fetchparm="--no-config --quiet --no-cache --no-cookies --max-redirect=0 --timeout=10 -O" + elif [ "$(readlink -fn "/bin/wget")" = "/bin/busybox" ] || [ "$(readlink -fn "${adb_fetch}")" = "/bin/busybox" ] + then + adb_fetch="/bin/busybox" + adb_fetchparm="-q -O" + else + ssl_lib="built-in" + fi + fi + if [ ! -x "${adb_fetch}" ] && [ "$(readlink -fn "/bin/wget")" = "/bin/uclient-fetch" ] + then + adb_fetch="/bin/uclient-fetch" + if [ -f "/lib/libustream-ssl.so" ] + then + adb_fetchparm="-q --timeout=10 --no-check-certificate -O" + ssl_lib="libustream-ssl" + else + adb_fetchparm="-q --timeout=10 -O" + fi + fi + if [ ! -x "${adb_fetch}" ] || [ -z "${adb_fetch}" ] || [ -z "${adb_fetchparm}" ] + then + f_log "error" "no download utility found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package" + fi + adb_fetchinfo="${adb_fetch##*/} (${ssl_lib})" + + # create dns hideout directory + # + if [ ! -d "${adb_dnshidedir}" ] + then + mkdir -p -m 660 "${adb_dnshidedir}" + chown -R "${adb_dns}":"${adb_dns}" "${adb_dnshidedir}" 2>/dev/null + else + rm -f "${adb_dnshidedir}/${adb_dnsprefix}"* + fi + + # create adblock temp file/directory + # + adb_tmpload="$(mktemp -tu)" + adb_tmpfile="$(mktemp -tu)" + adb_tmpdir="$(mktemp -p /tmp -d)" + + # prepare whitelist entries + # + if [ -s "${adb_whitelist}" ] + then + awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.whitelist" + fi +} + +# f_rmtemp: remove temporary files & directories +# +f_rmtemp() +{ + if [ -d "${adb_tmpdir}" ] + then + rm -f "${adb_tmpload}" + rm -f "${adb_tmpfile}" + rm -rf "${adb_tmpdir}" + fi +} + +# f_rmdns: remove dns related files & directories +# +f_rmdns() +{ + if [ -n "${adb_dns}" ] + then + rm -f "${adb_dnsdir}/${adb_dnsprefix}"* + rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz + rm -rf "${adb_dnshidedir}" + > "${adb_rtfile}" + fi +} + +# f_dnsrestart: restart the dns backend +# +f_dnsrestart() +{ + local cnt=0 + + "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1 + while [ ${cnt} -le 10 ] + do + adb_dnsup="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@.${adb_dns}.instances.*.running")" + if [ "${adb_dnsup}" = "true" ] + then + break + fi + cnt=$((cnt+1)) + sleep 1 + done +} + +# f_list: backup/restore/remove block lists +# +f_list() +{ + local mode="${1}" in_rc="${adb_rc}" cnt=0 + + case "${mode}" in + backup) + cnt="$(wc -l < "${adb_tmpfile}")" + if [ ${adb_backup} -eq 1 ] && [ -d "${adb_backupdir}" ] + then + gzip -cf "${adb_tmpfile}" > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" + adb_rc=${?} + fi + ;; + restore) + if [ ${adb_backup} -eq 1 ] && [ -d "${adb_backupdir}" ] + then + rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" + if [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ] + then + gunzip -cf "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" > "${adb_tmpfile}" + adb_rc=${?} + fi + fi + ;; + remove) + rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" + if [ -d "${adb_backupdir}" ] + then + rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" + fi + adb_rc=${?} + ;; + esac + f_log "debug" "name: ${src_name}, mode: ${mode}, count: ${cnt}, in_rc: ${in_rc}, out_rc: ${adb_rc}" +} + +# f_switch: suspend/resume adblock processing +# +f_switch() +{ + if [ -d "${adb_dnshidedir}" ] + then + local source target status mode="${1}" + local dns_active="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + local dns_passive="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + + if [ -n "${dns_active}" ] && [ "${mode}" = "suspend" ] + then + source="${adb_dnsdir}/${adb_dnsprefix}" + target="${adb_dnshidedir}" + status="suspended" + elif [ -n "${dns_passive}" ] && [ "${mode}" = "resume" ] + then + source="${adb_dnshidedir}/${adb_dnsprefix}" + target="${adb_dnsdir}" + status="resumed" + fi + if [ -n "${status}" ] + then + mv -f "${source}"* "${target}" + f_dnsrestart + f_log "info " "adblock processing ${status}" + fi + fi +} + +# f_query: query block lists for certain (sub-)domains +# +f_query() +{ + local search result cnt + local domain="${1}" + local tld="${domain#*.}" + local dns_active="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + + if [ -z "${dns_active}" ] + then + printf "%s\n" "::: no active block lists found, please start / resume adblock first" + elif [ -z "${domain}" ] || [ "${domain}" = "${tld}" ] + then + printf "%s\n" "::: invalid domain input, please submit a specific (sub-)domain, e.g. 'www.abc.xyz'" + else + cd "${adb_dnsdir}" + while [ "${domain}" != "${tld}" ] + do + search="${domain//./\.}" + result="$(grep -Hm1 "[/\"\.]${search}[/\"]" "${adb_dnsprefix}"* | awk -F ':|=|/|\"' '{printf(" %-20s : %s\n",$1,$4)}')" + printf "%s\n" "::: distinct results for domain '${domain}'" + printf "%s\n" "${result:=" no match"}" + domain="${tld}" + tld="${domain#*.}" + done + fi +} + +# f_status: output runtime information +# +f_status() +{ + local key keylist value + + if [ -s "${adb_rtfile}" ] + then + local dns_active="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + local dns_passive="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)" + + if [ -n "${dns_active}" ] + then + value="active" + elif [ -n "${dns_passive}" ] || [ -z "${dns_active}" ] + then + value="no domains blocked" + fi + printf "%s\n" "::: adblock runtime information" + printf " %-15s : %s\n" "status" "${value}" + json_load "$(cat "${adb_rtfile}" 2>/dev/null)" + json_select data + json_get_keys keylist + for key in ${keylist} + do + json_get_var value ${key} + printf " %-15s : %s\n" "${key}" "${value}" + done + fi +} + +# f_log: write to syslog, exit on error +# +f_log() +{ + local class="${1}" log_msg="${2}" + + if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${adb_debug} -eq 1 ]) + then + logger -t "adblock-[${adb_ver}] ${class}" "${log_msg}" + if [ "${class}" = "error" ] + then + logger -t "adblock-[${adb_ver}] ${class}" "Please check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md' (${adb_sysver})" + f_rmtemp + if [ -n "$(ls -dA "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null)" ] + then + f_rmdns + f_dnsrestart + fi + exit 255 + fi + fi +} + +# main function for block list processing +# +f_main() +{ + local enabled url cnt sum_cnt=0 mem_total=0 + local src_name src_rset shalla_archive + mem_total="$(awk '$1 ~ /^MemTotal/ {printf $2}' "/proc/meminfo" 2>/dev/null)" + + f_log "info " "start adblock processing ..." + > "${adb_rtfile}" + for src_name in ${adb_sources} + do + eval "enabled=\"\${enabled_${src_name}}\"" + eval "url=\"\${adb_src_${src_name}}\"" + eval "src_rset=\"\${adb_src_rset_${src_name}}\"" + adb_dnsfile="${adb_tmpdir}/${adb_dnsprefix}.${src_name}" + > "${adb_tmpload}" + > "${adb_tmpfile}" + adb_rc=0 + + # basic pre-checks + # + if [ "${enabled}" != "1" ] || [ -z "${url}" ] || [ -z "${src_rset}" ] + then + f_list remove + continue + fi + + # download block list + # + f_log "debug" "name: ${src_name}, enabled: ${enabled}, backup: ${adb_backup}, dns: ${adb_dns}, fetch: ${adb_fetchinfo}, memory: ${mem_total}, force srt/dns: ${adb_forcesrt}/${adb_forcedns}" + if [ "${src_name}" = "blacklist" ] + then + cat "${url}" 2>/dev/null > "${adb_tmpload}" + adb_rc=${?} + elif [ "${src_name}" = "shalla" ] + then + shalla_archive="${adb_tmpdir}/shallalist.tar.gz" + "${adb_fetch}" ${adb_fetchparm} "${shalla_archive}" "${url}" 2>/dev/null + adb_rc=${?} + if [ ${adb_rc} -eq 0 ] + then + for category in ${adb_src_cat_shalla} + do + tar -xOzf "${shalla_archive}" BL/${category}/domains >> "${adb_tmpload}" + adb_rc=${?} + if [ ${adb_rc} -ne 0 ] + then + break + fi + done + fi + rm -f "${shalla_archive}" + rm -rf "${adb_tmpdir}/BL" + else + "${adb_fetch}" ${adb_fetchparm} "${adb_tmpload}" "${url}" 2>/dev/null + adb_rc=${?} + fi + + # check download result and prepare domain output (incl. tld compression, list backup & restore) + # + if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ] + then + awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}" + if [ -s "${adb_tmpfile}" ] + then + awk -F "." '{for(f=NF;f > 1;f--) printf "%s.", $f;print $1}' "${adb_tmpfile}" 2>/dev/null | sort -u > "${adb_tmpload}" + awk '{if(NR==1){tld=$NF};while(getline){if($NF !~ tld"\\."){print tld;tld=$NF}}print tld}' "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}" + awk -F "." '{for(f=NF;f > 1;f--) printf "%s.", $f;print $1}' "${adb_tmpfile}" 2>/dev/null > "${adb_tmpload}" + mv -f "${adb_tmpload}" "${adb_tmpfile}" + f_list backup + else + f_list restore + fi + else + f_list restore + fi + + # remove whitelist domains, final list preparation + # + if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ] + then + if [ -s "${adb_tmpdir}/tmp.whitelist" ] + then + grep -vf "${adb_tmpdir}/tmp.whitelist" "${adb_tmpfile}" 2>/dev/null | eval "${adb_dnsformat}" > "${adb_dnsfile}" + else + cat "${adb_tmpfile}" 2>/dev/null | eval "${adb_dnsformat}" > "${adb_dnsfile}" + fi + adb_rc=${?} + if [ ${adb_rc} -ne 0 ] + then + f_list remove + fi + else + f_list remove + fi + done + + # overall sort + # + for src_name in $(ls -dASr "${adb_tmpdir}/${adb_dnsprefix}"* 2>/dev/null) + do + if [ ${mem_total} -ge 64000 ] || [ ${adb_forcesrt} -eq 1 ] + then + if [ -s "${adb_tmpdir}/blocklist.overall" ] + then + sort "${adb_tmpdir}/blocklist.overall" "${adb_tmpdir}/blocklist.overall" "${src_name}" | uniq -u > "${adb_tmpdir}/tmp.blocklist" + mv -f "${adb_tmpdir}/tmp.blocklist" "${src_name}" + fi + cat "${src_name}" >> "${adb_tmpdir}/blocklist.overall" + fi + cnt="$(wc -l < "${src_name}")" + sum_cnt=$((sum_cnt + cnt)) + done + + # restart the dns backend and export runtime information + # + mv -f "${adb_tmpdir}/${adb_dnsprefix}"* "${adb_dnsdir}" 2>/dev/null + chown "${adb_dns}":"${adb_dns}" "${adb_dnsdir}/${adb_dnsprefix}"* 2>/dev/null + f_rmtemp + f_dnsrestart + if [ "${adb_dnsup}" = "true" ] + then + json_init + json_add_object "data" + json_add_string "adblock_version" "${adb_ver}" + json_add_string "blocked_domains" "${sum_cnt}" + json_add_string "fetch_info" "${adb_fetchinfo}" + json_add_string "dns_backend" "${adb_dns}" + json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")" + json_add_string "system" "${adb_sysver}" + json_close_object + json_dump > "${adb_rtfile}" + f_log "info " "block lists with overall ${sum_cnt} domains loaded successfully (${adb_sysver})" + else + f_log "error" "dns backend restart with active block lists failed" + fi +} + +# handle different adblock actions +# +f_envload +case "${1}" in + stop) + f_rmtemp + f_rmdns + f_dnsrestart + ;; + restart) + f_rmtemp + f_rmdns + f_envcheck + f_main + ;; + suspend) + f_switch suspend + ;; + resume) + f_switch resume + ;; + query) + f_query "${2}" + ;; + status) + f_status + ;; + *) + f_envcheck + f_main + ;; +esac +exit 0 diff --git a/net/adblock/files/www/adblock/index.html b/net/adblock/files/www/adblock/index.html deleted file mode 100644 index ff6c903..0000000 --- a/net/adblock/files/www/adblock/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/net/apache/Makefile b/net/apache/Makefile index 6d24fb4..d436bd3 100644 --- a/net/apache/Makefile +++ b/net/apache/Makefile @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apache -PKG_VERSION:=2.2.31 -PKG_RELEASE:=2 +PKG_VERSION:=2.4.25 +PKG_RELEASE:=1 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_MD5SUM:=6c10e15835ab214464228a9beb7afba8 +PKG_MD5SUM:=2826f49619112ad5813c0be5afcc7ddb PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION) @@ -40,7 +40,7 @@ endef define Package/apache $(call Package/apache/Default) - DEPENDS:=+libapr +libaprutil +libpcre +libopenssl +unixodbc + DEPENDS:=+libapr +libaprutil +libpcre +libopenssl +unixodbc endef define Package/apache/description @@ -90,6 +90,7 @@ 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, \ @@ -97,16 +98,22 @@ define Build/Configure --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \ --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \ --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" \ ) endef @@ -140,7 +147,8 @@ 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/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/ + $(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 diff --git a/net/apache/patches/002-test_char_h.patch b/net/apache/patches/002-test_char_h.patch index e8ea3cd..ad07704 100644 --- a/net/apache/patches/002-test_char_h.patch +++ b/net/apache/patches/002-test_char_h.patch @@ -1,5 +1,7 @@ +Index: httpd-2.4.25/server/test_char.h +=================================================================== --- /dev/null -+++ b/server/test_char.h ++++ 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) @@ -24,3 +26,24 @@ + 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 index 635c65c..fd22410 100644 --- a/net/apache/patches/003-logdir_fix.patch +++ b/net/apache/patches/003-logdir_fix.patch @@ -1,6 +1,8 @@ ---- a/build/mkconfNW.awk -+++ b/build/mkconfNW.awk -@@ -24,7 +24,7 @@ BEGIN { +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" @@ -9,8 +11,10 @@ A["errordir"] = "error" A["proxycachedir"] = "proxy" ---- a/config.layout -+++ b/config.layout +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 diff --git a/net/apache/patches/004-pidfile_fix.patch b/net/apache/patches/004-pidfile_fix.patch index e9f0b6d..647f821 100644 --- a/net/apache/patches/004-pidfile_fix.patch +++ b/net/apache/patches/004-pidfile_fix.patch @@ -1,6 +1,8 @@ ---- a/include/scoreboard.h -+++ b/include/scoreboard.h -@@ -42,7 +42,7 @@ extern "C" { +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 @@ -8,4 +10,4 @@ +#define DEFAULT_SCOREBOARD "log/apache_runtime_status" #endif - /* Scoreboard info on a process is, for now, kept very brief --- + /* 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 3bcbba4..04a73a9 100644 --- a/net/apache/patches/005-httpd_conf.patch +++ b/net/apache/patches/005-httpd_conf.patch @@ -1,14 +1,16 @@ ---- a/docs/conf/httpd.conf.in -+++ b/docs/conf/httpd.conf.in -@@ -52,7 +52,6 @@ Listen @@Port@@ +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@@ - - -@@ -64,8 +63,8 @@ Listen @@Port@@ + + # +@@ -74,8 +73,8 @@ Listen @@Port@@ # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # @@ -18,8 +20,8 @@ +Group nogroup - -@@ -192,7 +191,7 @@ ErrorLog "@rel_logfiledir@/error_log" + +@@ -188,7 +187,7 @@ ErrorLog "@rel_logfiledir@/error_log" # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # @@ -28,7 +30,7 @@ # -@@ -337,7 +336,7 @@ DefaultType text/plain +@@ -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. # @@ -37,16 +39,16 @@ # # Customizable error responses come in three flavors: -@@ -366,7 +365,7 @@ DefaultType text/plain - # broken on your system. +@@ -360,7 +359,7 @@ LogLevel warn + # Defaults: EnableMMAP On, EnableSendfile Off # #EnableMMAP off --#EnableSendfile off +-#EnableSendfile on +EnableSendfile off # Supplemental configuration # -@@ -412,7 +411,7 @@ DefaultType text/plain +@@ -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. # @@ -58,3 +60,4 @@ +#SSLRandomSeed startup builtin +#SSLRandomSeed connect builtin +# + diff --git a/net/apache/patches/006-remove-ssl3.patch b/net/apache/patches/006-remove-ssl3.patch deleted file mode 100644 index c09654c..0000000 --- a/net/apache/patches/006-remove-ssl3.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/support/ab.c -+++ b/support/ab.c -@@ -2232,8 +2232,10 @@ int main(int argc, const char * const ar - } else if (strncasecmp(optarg, "SSL2", 4) == 0) { - meth = SSLv2_client_method(); - #endif -+#ifndef OPENSSL_NO_SSL3_METHOD - } else if (strncasecmp(optarg, "SSL3", 4) == 0) { - meth = SSLv3_client_method(); -+#endif - #ifdef HAVE_TLSV1_X - } else if (strncasecmp(optarg, "TLS1.1", 6) == 0) { - meth = TLSv1_1_client_method(); diff --git a/net/aria2/Makefile b/net/aria2/Makefile index 81acf83..a96d4b8 100644 --- a/net/aria2/Makefile +++ b/net/aria2/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=aria2 -PKG_VERSION:=1.28.0 +PKG_VERSION:=1.30.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/ -PKG_MD5SUM:=f649ab30f3b09d0c0ebb816ce0c0205d +PKG_MD5SUM:=8c22f569d3fb9e42c5fd9a95173b9b5f PKG_INSTALL:=1 PKG_MAINTAINER:=Imre Kaloz , Hsing-Wang Liao diff --git a/net/bcp38/Makefile b/net/bcp38/Makefile index 9ca1910..4677a29 100644 --- a/net/bcp38/Makefile +++ b/net/bcp38/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bcp38 PKG_VERSION:=5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENCE:=GPL-3.0+ include $(INCLUDE_DIR)/package.mk @@ -23,7 +23,11 @@ define Package/bcp38 endef define Package/bcp38/description - bcp38 implements IETF BCP38 for home routers. See https://tools.ietf.org/html/bcp38. + bcp38 implements IETF BCP38 for home routers. + See https://tools.ietf.org/html/bcp38. + + This package provides BCP38 for IPv4 only - IPv6 uses source + specific default routes, so no firewall configuration is needed. endef define Package/bcp38/conffiles diff --git a/net/bcp38/files/bcp38.config b/net/bcp38/files/bcp38.config index 08e8e20..fc785eb 100644 --- a/net/bcp38/files/bcp38.config +++ b/net/bcp38/files/bcp38.config @@ -17,6 +17,10 @@ config bcp38 # There is a dhcp trigger to do this for the netmask of a # double natted connection needed +# You can only specify IPv4 addresses here - for IPv6, only source +# specific default routes will be installed, which achieves the same +# without needing any firewall routes. + # I will argue that this level of indirection doesn't scale # very well - see how to block china as an example # http://www.okean.com/china.txt diff --git a/net/bind/Config.in b/net/bind/Config.in index f0d4847..04d6bdc 100644 --- a/net/bind/Config.in +++ b/net/bind/Config.in @@ -2,7 +2,7 @@ if PACKAGE_bind-server config BIND_ENABLE_FILTER_AAAA bool - default n + default y prompt "Enable filtering of AAAA records returned to the client" help BIND 9 has an option to filter AAAA (IPv6 address) records diff --git a/net/bind/Makefile b/net/bind/Makefile index 959184a..a4a8b85 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2006-2012 OpenWrt.org -# 2014-2016 Noah Meyerhans +# 2014-2017 Noah Meyerhans # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bind -PKG_VERSION:=9.10.4-P4 -PKG_RELEASE:=2 +PKG_VERSION:=9.10.4-P5 +PKG_RELEASE:=1 USERID:=bind=57:bind=57 PKG_MAINTAINER:=Noah Meyerhans @@ -20,7 +20,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= \ ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \ http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) -PKG_MD5SUM:=e110904a1d54f83f01d4be8bcd842927 +PKG_MD5SUM:=c53a3e34e7aabb16820b036ae9afd3c9 PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libtool.m4 diff --git a/net/bmon/Makefile b/net/bmon/Makefile index e39e24e..a8c08fb 100644 --- a/net/bmon/Makefile +++ b/net/bmon/Makefile @@ -1,5 +1,6 @@ # # Copyright (C) 2007-2014 OpenWrt.org +# Copyright (C) 2014-2016 Baptiste Jonglez # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bmon -PKG_VERSION:=3.9 +PKG_VERSION:=4.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/tgraf/bmon/releases/download/v$(PKG_VERSION)/ -PKG_MD5SUM:=a959371dc6f8eecdfe27c088447ec636 +PKG_MD5SUM:=02fdc312b8ceeb5786b28bf905f54328f414040ff42f45c83007f24b76cc9f7a PKG_MAINTAINER:=Baptiste Jonglez PKG_LICENSE:=MIT diff --git a/net/chrony/Makefile b/net/chrony/Makefile index db631fe..4e1cb12 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=chrony PKG_VERSION:=2.4.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/ @@ -27,7 +27,7 @@ define Package/chrony SUBMENU:=Time Synchronization SECTION:=net CATEGORY:=Network - DEPENDS:=+libcap + DEPENDS:=+libcap +libpthread USERID:=chrony=323:chrony=323 TITLE:=A versatile NTP client and server URL:=http://chrony.tuxfamily.org/ @@ -53,7 +53,6 @@ CONFIGURE_ARGS+= \ --chronysockdir=/var/run/chrony \ --disable-readline \ --disable-rtc \ - --disable-asyncdns \ --with-user=chrony CONFIGURE_VARS+=CPPFLAGS=-DNDEBUG diff --git a/net/cifs-utils/Makefile b/net/cifs-utils/Makefile index ed2edd6..3d67e94 100644 --- a/net/cifs-utils/Makefile +++ b/net/cifs-utils/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=cifs-utils PKG_VERSION:=6.4 PKG_RELEASE:=2 -PKG_SOURCE_URL:=http://ftp.samba.org/pub/linux-cifs/cifs-utils +PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_MD5SUM:=b7d75b67fd3987952896d27256c7293d diff --git a/net/clamav/Makefile b/net/clamav/Makefile deleted file mode 100644 index 3f3edab..0000000 --- a/net/clamav/Makefile +++ /dev/null @@ -1,120 +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:=clamav -PKG_VERSION:=0.98.7 -PKG_RELEASE:=1 - -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Marko Ratkaj - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://sourceforge.net/projects/clamav/files/clamav/$(PKG_VERSION)/ -PKG_MD5SUM:=157c601161da1c2d5a0e48ea1b49e067 - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk - -define Package/clamav/Default - SECTION:=net - DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=ClamAV - URL:=http://www.clamav.net/ -endef - -define Package/clamav - $(call Package/clamav/Default) -endef - -define Package/freshclam - $(call Package/clamav/Default) - DEPENDS+= +clamav - TITLE+=database updater -endef - -define Package/clamav/description - ClamAV is an open source antivirus engine for detecting trojans, - viruses, malware & other malicious threats. -endef - -define Package/freshclam/description - Database updater for ClamAV -endef - -define Package/clamav/conffiles -endef - -CONFIGURE_VARS += \ - INCLUDES="" \ - CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \ - LIBS="-lpthread" \ - -define Build/Configure - $(call Build/Configure/Default, \ - --sysconfdir=/etc/clamav/ \ - --prefix=/usr/ \ - --exec-prefix=/usr/ \ - --disable-xml \ - --disable-bzip2 \ - --enable-ltdl-install \ - --with-user nobody \ - --with-group nogroup \ - ) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Package/clamav/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamd $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamav-config $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clambc $(1)/usr/sbin/ - $(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/sigtool $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/clamav.h $(1)/usr/include/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib*/* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/clamav.config $(1)/etc/config/clamav - - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/clamav.init $(1)/etc/init.d/clamav - - $(INSTALL_DIR) $(1)/usr/share/clamav - $(CP) ./files/bytecode.cvd $(1)/usr/share/clamav/ -endef - -define Package/freshclam/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/freshclam $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/freshclam.config $(1)/etc/config/freshclam - - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/freshclam.init $(1)/etc/init.d/freshclam -endef - -$(eval $(call BuildPackage,clamav)) -$(eval $(call BuildPackage,freshclam)) diff --git a/net/clamav/files/bytecode.cvd b/net/clamav/files/bytecode.cvd deleted file mode 100644 index 07ff8ab014f8f8288b7df3dd11bddd9b777c6fda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68662 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 z 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 GZUq1nQNSty diff --git a/net/clamav/files/clamav.config b/net/clamav/files/clamav.config deleted file mode 100644 index 1543caa..0000000 --- a/net/clamav/files/clamav.config +++ /dev/null @@ -1,34 +0,0 @@ -config clamav 'clamav' - option clamd_config_file '/etc/clamav/clamd.conf' - option LogFile '/tmp/clamd.log' - option LogFileMaxSize '1M' - option LogTime 'no' - option LogVerbose 'no' - option ExtendedDetectionInfo 'no' - option OfficialDatabaseOnly 'no' - option StreamMinPort '1024' - option StreamMaxPort '2048' - option MaxThreads '10' - option ReadTimeout '30' - option CommandReadTimeout '5' - option MaxDirectoryRecursion '15' - option FollowDirectorySymlinks 'no' - option FollowFileSymlinks 'no' - option SelfCheck '600' - option DetectPUA 'yes' - option ScanPE 'yes' - option DisableCertCheck 'no' - option ScanELF 'yes' - option DetectBrokenExecutables 'no' - option ScanOLE2 'yes' - option ScanPDF 'yes' - option ScanSWF 'yes' - option ScanMail 'yes' - option ScanPartialMessages 'no' - option ScanArchive 'yes' - option ArchiveBlockEncrypted 'yes' - option MaxFileSize '10M' - option TemporaryDirectory '/tmp' - option LocalSocket '/var/run/clamav/clamd.sock' - option User 'nobody' - option ExitOnOOM 'yes' diff --git a/net/clamav/files/clamav.init b/net/clamav/files/clamav.init deleted file mode 100644 index b2a8950..0000000 --- a/net/clamav/files/clamav.init +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/usr/sbin/clamd -CLAMD_CONFIGFILE="/tmp/clamav/clamd.conf" - -validate_clamav_section() { - uci_validate_section clamav clamav "${1}" \ - 'clamd_config_file:string' \ - 'LogFile:string' \ - 'LogFileMaxSize:string' \ - 'LogVerbose:string' \ - 'ExtendedDetectionInfo:string' \ - 'LogTime:string' \ - 'OfficialDatabaseOnly:string' \ - 'StreamMinPort:uinteger' \ - 'StreamMaxPort:uinteger' \ - 'MaxThreads:uinteger' \ - 'ReadTimeout:uinteger' \ - 'CommandReadTimeout:uinteger' \ - 'MaxDirectoryRecursion:uinteger' \ - 'FollowDirectorySymlinks:string' \ - 'FollowFileSymlinks:string' \ - 'SelfCheck:uinteger' \ - 'DetectPUA:string' \ - 'ScanPE:string' \ - 'DisableCertCheck:string' \ - 'ScanELF:string' \ - 'DetectBrokenExecutables:string' \ - 'ScanOLE2:string' \ - 'ScanPDF:string' \ - 'ScanSWF:string' \ - 'ScanMail:string' \ - 'ScanPartialMessages:string' \ - 'ScanArchive:string' \ - 'TemporaryDirectory:string' \ - 'ArchiveBlockEncrypted:string' \ - 'MaxFileSize:string' \ - 'LocalSocket:string' \ - 'User:string' \ - 'ExitOnOOM:string' -} - -start_service() { - local clamd_config_file LogFile LogTime StreamMinPort \ - StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \ - FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \ - ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \ - ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User - - validate_clamav_section clamav || { - echo "validation failed" - return 1 - } - - mkdir -p /usr/share/clamav - 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 - - 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 "DetectBrokenExecutables " $DetectBrokenExecutables >> $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 "ArchiveBlockEncrypted " $ArchiveBlockEncrypted >> $CLAMD_CONFIGFILE - echo "MaxFileSize " $MaxFileSize >> $CLAMD_CONFIGFILE - echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE - echo "User " $User >> $CLAMD_CONFIGFILE - echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE - - procd_open_instance - procd_set_param command $PROG -c $CLAMD_CONFIGFILE - procd_set_param file $CLAMD_CONFIGFILE - procd_close_instance -} - -stop_service() -{ - service_stop ${PROG} -} - -service_triggers() -{ - procd_add_reload_trigger "clamav" - procd_add_validation validate_clamav_section -} diff --git a/net/clamav/files/freshclam.config b/net/clamav/files/freshclam.config deleted file mode 100644 index 827e8dd..0000000 --- a/net/clamav/files/freshclam.config +++ /dev/null @@ -1,7 +0,0 @@ -config freshclam 'freshclam' - option freshclam_config_file '/etc/clamav/freshclam.conf' - option UpdateLogFile '/tmp/freshclam.log' - option DatabaseMirror 'database.clamav.net' - option NotifyClamd '/etc/clamav/clamd.conf' - option DatabaseOwner 'root' - option CompressLocalDatabase 'yes' diff --git a/net/clamav/files/freshclam.init b/net/clamav/files/freshclam.init deleted file mode 100644 index 37b2767..0000000 --- a/net/clamav/files/freshclam.init +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/usr/sbin/freshclam -FRESHCLAM_CONFIGFILE="/tmp/clamav/freshclam.conf" - -validate_freshclam_section() { - uci_validate_section freshclam freshclam "${1}" \ - 'freshclam_config_file:string' \ - 'UpdateLogFile:string' \ - 'DatabaseMirror:string' \ - 'NotifyClamd:string' \ - 'DatabaseOwner:string' \ - 'CompressLocalDatabase:string:' -} - -start_service() { - local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror - - validate_freshclam_section freshclam || { - echo "validation failed" - return 1 - } - - [ -f /tmp/freshclam.pid ] && echo "already running" && return 0 - - mkdir -p /usr/share/clamav - mkdir -p /etc/clamav - touch /tmp/freshclam.log - touch /tmp/freshclam.pid - - 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 - - procd_open_instance - procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings - procd_set_param file $FRESHCLAM_CONFIGFILE - procd_close_instance -} - -stop_service() -{ - [ ! -f /tmp/freshclam.pid ] && echo "not running" && return 0 - PID=`cat /tmp/freshclam.pid` - kill $PID - rm -f /tmp/freshclam.pid -} - -service_triggers() -{ - procd_add_reload_trigger "freshclam" - procd_add_validation validate_freshclam_section -} diff --git a/net/clamav/patches/001-compile.patch b/net/clamav/patches/001-compile.patch deleted file mode 100644 index 3992257..0000000 --- a/net/clamav/patches/001-compile.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/clamdscan/proto.c -+++ b/clamdscan/proto.c -@@ -55,6 +55,7 @@ - #include "shared/misc.h" - #include "shared/clamdcom.h" - -+#include - #include "proto.h" - #include "client.h" - diff --git a/net/cshark/Makefile b/net/cshark/Makefile index 88fd17d..4ed43fc 100644 --- a/net/cshark/Makefile +++ b/net/cshark/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cshark -PKG_VERSION:=2015-11-24 -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_VERSION=2015-11-24-$(PKG_SOURCE_VERSION) +PKG_RELEASE=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=e575ab3d35d75a6f70488001fcba45690ebe9b3e -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -28,7 +28,7 @@ define Package/cshark CATEGORY:=Network TITLE:=CloudShark capture tool URL:=http://www.cloudshark.org/ - DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-polarssl + DEPENDS:=+libjson-c +libpcap +libuci +libubox +libuclient +libustream-mbedtls MAINTAINER:=Luka Perkov endef diff --git a/net/ctorrent-svn/Makefile b/net/ctorrent-svn/Makefile deleted file mode 100644 index 0725f59..0000000 --- a/net/ctorrent-svn/Makefile +++ /dev/null @@ -1,98 +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:=ctorrent-svn -PKG_REV:=322 -PKG_VERSION:=r$(PKG_REV) -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://svn.code.sf.net/p/dtorrent/code/dtorrent/trunk -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=svn - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_CHECK_FORMAT_SECURITY:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/ctorrent-svn/Default - SUBMENU:=BitTorrent - SECTION:=net - CATEGORY:=Network - DEPENDS:=+uclibcxx - TITLE:=console-based BitTorrent client - MAINTAINER:=Peter Wagner - URL:=http://www.rahul.net/dholmes/ctorrent/ -endef - -define Package/ctorrent-svn/Default/description - CTorrent is a BitTorrent client written in the C programming language, - known to be a very robust and mature programming language, which produces - fast and optimized application. -endef - -define Package/ctorrent-svn -$(call Package/ctorrent-svn/Default) - TITLE+= (with OpenSSL support) - DEPENDS+=+libopenssl - VARIANT:=ssl -endef - -define Package/ctorrent-svn/description -$(call Package/ctorrent-svn/Default/description) - This package is built with OpenSSL support. -endef - -define Package/ctorrent-svn-nossl -$(call Package/ctorrent-svn/Default) - TITLE+= (with builtin SHA-1) - VARIANT:=nossl -endef - -define Package/ctorrent-svn-nossl/description -$(call Package/ctorrent-svn/Default/description) - This package is built with builtin (Steve Reid's public-domain) SHA-1 support -endef - -CONFIGURE_VARS += \ - CXX="g++-uc" \ - LIBS="-nodefaultlibs -luClibc++ $(LIBGCC_S) -lc" - -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += \ - --with-ssl="$(STAGING_DIR)/usr" -endif - -ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += \ - --with-ssl=no -endif - -define Build/Configure - (cd $(PKG_BUILD_DIR); touch \ - configure.ac \ - aclocal.m4 \ - Makefile.in \ - config.h.in \ - configure \ - ); - $(call Build/Configure/Default) -endef - -define Package/ctorrent-svn/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ctorrent $(1)/usr/bin/ctorrent -endef - -Package/ctorrent-svn-nossl/install = $(Package/ctorrent-svn/install) - -$(eval $(call BuildPackage,ctorrent-svn)) -$(eval $(call BuildPackage,ctorrent-svn-nossl)) diff --git a/net/ctorrent-svn/patches/100-compile-fix.patch b/net/ctorrent-svn/patches/100-compile-fix.patch deleted file mode 100644 index bb7d33f..0000000 --- a/net/ctorrent-svn/patches/100-compile-fix.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff --git a/btconfig.cpp b/btconfig.cpp -index e1badd0..aaa6feb 100644 ---- a/btconfig.cpp -+++ b/btconfig.cpp -@@ -828,7 +828,7 @@ void CfgCTCS(Config *config) - strncpy(CTCS.m_host, *cfg_ctcs, MAXHOSTNAMELEN-1); - CTCS.m_host[MAXHOSTNAMELEN-1] = '\0'; - if( (s = strchr(CTCS.m_host, ':')) ) *s='\0'; -- CTCS.m_port = atoi(s = (strchr(*cfg_ctcs, ':')+1)); -+ CTCS.m_port = atoi(s = (char*)(strchr(*cfg_ctcs, ':')+1)); - if( strchr(s, ':') ) - CONSOLE.Input("Enter CTCS password: ", CTCS.m_pass, CTCS_PASS_SIZE); - else *CTCS.m_pass = '\0'; -diff --git a/btcontent.cpp b/btcontent.cpp -index d84f450..88ccb50 100644 ---- a/btcontent.cpp -+++ b/btcontent.cpp -@@ -1408,27 +1408,27 @@ void btContent::CompletionCommand() - ptmp = cmdstr + strlen(cmdstr); - parg = strstr(parg, "&t") + 2; - strcat(pt, parg); -- pt = strstr(ptmp, "&t"); -- if( pd ) pd = strstr(ptmp, "&d"); -- if( pw ) pw = strstr(ptmp, "&w"); -+ pt = (char *)strstr(ptmp, "&t"); -+ if( pd ) pd = (char *)strstr(ptmp, "&d"); -+ if( pw ) pw = (char *)strstr(ptmp, "&w"); - } - if( pd && (!pt || pd < pt) && (!pw || pd < pw) ){ - strcpy(pd, m_btfiles.GetDataName()); - ptmp = cmdstr + strlen(cmdstr); - parg = strstr(parg, "&d") + 2; - strcat(pd, parg); -- pd = strstr(ptmp, "&d"); -- if( pt ) pt = strstr(ptmp, "&t"); -- if( pw ) pw = strstr(ptmp, "&w"); -+ pd = (char *)strstr(ptmp, "&d"); -+ if( pt ) pt = (char *)strstr(ptmp, "&t"); -+ if( pw ) pw = (char *)strstr(ptmp, "&w"); - } - if( pw && (!pt || pw < pt) && (!pd || pw < pd) ){ - strcpy(pw, wd); - ptmp = cmdstr + strlen(cmdstr); - parg = strstr(parg, "&w") + 2; - strcat(pw, parg); -- pw = strstr(ptmp, "&w"); -- if( pt ) pt = strstr(ptmp, "&t"); -- if( pd ) pd = strstr(ptmp, "&d"); -+ pw = (char *)strstr(ptmp, "&w"); -+ if( pt ) pt = (char *)strstr(ptmp, "&t"); -+ if( pd ) pd = (char *)strstr(ptmp, "&d"); - } - } - } -diff --git a/console.cpp b/console.cpp -index bdadb61..5ab2492 100644 ---- a/console.cpp -+++ b/console.cpp -@@ -511,11 +511,8 @@ void ConStream::Error(int sev, const char *message, ...) - va_list ap; - - va_start(ap, message); -- if( g_console_ready ) CONSOLE.Error(sev, message, ap); -- else{ - vfprintf(stderr, message, ap); - fflush(stderr); -- } - va_end(ap); - } - -@@ -1766,7 +1763,7 @@ void Console::Warning(int sev, const char *message, ...) - va_end(ap); - } - -- -+/* - void Console::Error(int sev, const char *message, va_list ap) - { - vsnprintf(m_buffer, sizeof(m_buffer), message, ap); -@@ -1778,7 +1775,7 @@ void Console::Error(int sev, const char *message, va_list ap) - m_warnings.AddMessage(sev, m_buffer); - if( sev && *cfg_ctcs ) CTCS.Send_Info(sev, m_buffer); - } -- -+*/ - - void Console::Debug(const char *message, ...) - { diff --git a/net/ctorrent-svn/patches/300-negative.patch b/net/ctorrent-svn/patches/300-negative.patch deleted file mode 100644 index e1e1e65..0000000 --- a/net/ctorrent-svn/patches/300-negative.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/bencode.cpp b/bencode.cpp -index fef82ba..b7f14bc 100644 ---- a/bencode.cpp -+++ b/bencode.cpp -@@ -45,6 +45,9 @@ size_t buf_int(const char *b, size_t len, char beginchar, char endchar, - p++; - len--; - } -+ if( *p == '-'){ -+ p++; len--; -+ } - - for( psave = p; len && isdigit(*p); p++, len-- ); - diff --git a/net/ctorrent-svn/patches/400-musl-compat.patch b/net/ctorrent-svn/patches/400-musl-compat.patch deleted file mode 100644 index e17c147..0000000 --- a/net/ctorrent-svn/patches/400-musl-compat.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/compat.c -+++ b/compat.c -@@ -51,6 +51,7 @@ int snprintf(char *str, size_t size, con - - #ifndef HAVE_STRNSTR - #include -+#include - /* FUNCTION PROGRAMER: Siberiaic Sang */ - char *strnstr(const char *haystack, const char *needle, size_t haystacklen) - { diff --git a/net/ctorrent/Makefile b/net/ctorrent/Makefile deleted file mode 100644 index 6a8e481..0000000 --- a/net/ctorrent/Makefile +++ /dev/null @@ -1,84 +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:=ctorrent -PKG_VERSION:=dnh3.3.2 -PKG_RELEASE:=7 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/dtorrent \ - http://www.rahul.net/dholmes/ctorrent/ -PKG_MD5SUM:=59b23dd05ff70791cd6449effa7fc3b6 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk - -define Package/ctorrent/Default - SUBMENU:=BitTorrent - SECTION:=net - CATEGORY:=Network - DEPENDS:=$(CXX_DEPENDS) - TITLE:=console-based BitTorrent client - MAINTAINER:=Peter Wagner - URL:=http://www.rahul.net/dholmes/ctorrent/ -endef - -define Package/ctorrent/Default/description - CTorrent is a BitTorrent client written in the C programming language, - known to be a very robust and mature programming language, which produces - fast and optimized application. -endef - -define Package/ctorrent -$(call Package/ctorrent/Default) - TITLE+= (with OpenSSL support) - DEPENDS+=+libopenssl - VARIANT:=ssl -endef - -define Package/ctorrent/description -$(call Package/ctorrent/Default/description) - This package is built with OpenSSL support. -endef - -define Package/ctorrent-nossl -$(call Package/ctorrent/Default) - TITLE+= (with builtin SHA-1) - VARIANT:=nossl -endef - -define Package/ctorrent-nossl/description -$(call Package/ctorrent/Default/description) - This package is built with builtin (Steve Reid's public-domain) SHA-1 support -endef - -CONFIGURE_VARS += \ - CXXFLAGS="$$$$CXXFLAGS -fno-rtti" - -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += \ - --with-ssl="$(STAGING_DIR)/usr" -endif - -ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += \ - --with-ssl=no -endif - -define Package/ctorrent/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME) -endef - -Package/ctorrent-nossl/install = $(Package/ctorrent/install) - -$(eval $(call BuildPackage,ctorrent)) -$(eval $(call BuildPackage,ctorrent-nossl)) diff --git a/net/ctorrent/patches/100-CVE-2009-1759.patch b/net/ctorrent/patches/100-CVE-2009-1759.patch deleted file mode 100644 index 86ae1d7..0000000 --- a/net/ctorrent/patches/100-CVE-2009-1759.patch +++ /dev/null @@ -1,364 +0,0 @@ -Patch for CVE-2009-1759. -Source: Upstream SVN, rev 302 from the dtorrent-3 branch. - -Index: a/bencode.h -=================================================================== ---- a/bencode.h (revision 300) -+++ b/bencode.h (revision 302) -@@ -25,7 +25,7 @@ - size_t decode_list(const char *b,size_t len,const char *keylist); - size_t decode_rev(const char *b,size_t len,const char *keylist); - size_t decode_query(const char *b,size_t len,const char *keylist,const char **ps,size_t *pi,int64_t *pl,int method); --size_t decode_list2path(const char *b, size_t n, char *pathname); -+size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen); - size_t bencode_buf(const char *str,size_t len,FILE *fp); - size_t bencode_str(const char *str, FILE *fp); - size_t bencode_int(const uint64_t integer, FILE *fp); -Index: a/bencode.cpp -=================================================================== ---- a/bencode.cpp (revision 300) -+++ b/bencode.cpp (revision 302) -@@ -233,22 +233,28 @@ - return bencode_end_dict_list(fp); - } - --size_t decode_list2path(const char *b, size_t n, char *pathname) -+size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen) - { - const char *pb = b; - const char *s = (char *) 0; -+ const char *endmax = pathname + maxlen - 1; - size_t r,q; - - if( 'l' != *pb ) return 0; - pb++; - n--; - if( !n ) return 0; -- for(; n;){ -+ while( n && pathname < endmax ){ - if(!(r = buf_str(pb, n, &s, &q)) ) return 0; -+ if( q >= maxlen ) return 0; - memcpy(pathname, s, q); - pathname += q; -- pb += r; n -= r; -- if( 'e' != *pb ){*pathname = PATH_SP, pathname++;} else break; -+ maxlen -= q; -+ pb += r; -+ n -= r; -+ if( 'e' == *pb ) break; -+ if( pathname >= endmax ) return 0; -+ *pathname++ = PATH_SP; - } - *pathname = '\0'; - return (pb - b + 1); -Index: a/btfiles.cpp -=================================================================== ---- a/btfiles.cpp (revision 300) -+++ b/btfiles.cpp (revision 302) -@@ -449,7 +449,8 @@ - return 0; - } - --int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len, const char *saveas) -+int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len, -+ const char *saveas, unsigned char exam_only) - { - char path[MAXPATHLEN]; - const char *s, *p; -@@ -458,11 +459,19 @@ - int f_warned = 0; - - if( !decode_query(metabuf, metabuf_len, "info|name", &s, &q, (int64_t*)0, -- QUERY_STR) || MAXPATHLEN <= q ) -+ QUERY_STR) || MAXPATHLEN <= q ){ -+ errno = EINVAL; - return -1; -+ } - - memcpy(path, s, q); - path[q] = '\0'; -+ if( !exam_only && -+ (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){ -+ CONSOLE.Warning(1, "error, unsafe path \"%s\" in torrent data", path); -+ errno = EINVAL; -+ return -1; -+ } - - r = decode_query(metabuf, metabuf_len, "info|files", (const char**)0, &q, - (int64_t*)0, QUERY_POS); -@@ -471,21 +480,31 @@ - BTFILE *pbf_last = (BTFILE*) 0; - BTFILE *pbf = (BTFILE*) 0; - size_t dl; -+ unsigned long nfiles = 0; -+ - if( decode_query(metabuf,metabuf_len,"info|length", -- (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) ) -+ (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) ){ -+ errno = EINVAL; - return -1; -+ } - - if( saveas ){ - m_directory = new char[strlen(saveas) + 1]; - #ifndef WINDOWS -- if(!m_directory) return -1; -+ if( !m_directory ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(m_directory,saveas); - }else{ - int f_conv; - char *tmpfn = new char[strlen(path)*2+5]; - #ifndef WINDOWS -- if( !tmpfn ) return -1; -+ if( !tmpfn ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){ - if( arg_flg_convert_filenames ){ -@@ -493,6 +512,7 @@ - #ifndef WINDOWS - if( !m_directory ){ - delete []tmpfn; -+ errno = ENOMEM; - return -1; - } - #endif -@@ -507,7 +527,10 @@ - if( !f_conv || !arg_flg_convert_filenames ){ - m_directory = new char[strlen(path) + 1]; - #ifndef WINDOWS -- if( !m_directory ) return -1; -+ if( !m_directory ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(m_directory,path); - } -@@ -517,24 +540,50 @@ - p = metabuf + r + 1; - q--; - for(; q && 'e' != *p; p += dl, q -= dl){ -- if(!(dl = decode_dict(p, q, (const char*) 0)) ) return -1; -- if( !decode_query(p, dl, "length", (const char**) 0, -- (size_t*) 0,&t,QUERY_LONG) ) return -1; -+ if( !(dl = decode_dict(p, q, (const char*) 0)) || -+ !decode_query(p, dl, "length", (const char**) 0, (size_t*) 0, &t, -+ QUERY_LONG) ){ -+ errno = EINVAL; -+ return -1; -+ } - pbf = _new_bfnode(); - #ifndef WINDOWS -- if( !pbf ) return -1; -+ if( !pbf ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif -+ nfiles++; - pbf->bf_length = t; - m_total_files_length += t; - r = decode_query(p, dl, "path", (const char **)0, &n, (int64_t*)0, - QUERY_POS); -- if( !r ) return -1; -- if(!decode_list2path(p + r, n, path)) return -1; -+ if( !r || !decode_list2path(p + r, n, path, sizeof(path)) ){ -+ CONSOLE.Warning(1, -+ "error, invalid path in torrent data for file %lu at offset %llu", -+ nfiles, m_total_files_length - t); -+ delete pbf; -+ errno = EINVAL; -+ return -1; -+ } -+ if( !exam_only && -+ (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){ -+ CONSOLE.Warning(1, -+ "error, unsafe path \"%s\" in torrent data for file %lu", -+ path, nfiles); -+ delete pbf; -+ errno = EINVAL; -+ return -1; -+ } - -+ - int f_conv; - char *tmpfn = new char[strlen(path)*2+5]; - #ifndef WINDOWS -- if( !tmpfn ) return -1; -+ if( !tmpfn ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){ - if( arg_flg_convert_filenames ){ -@@ -542,6 +591,7 @@ - #ifndef WINDOWS - if( !pbf->bf_filename ){ - delete []tmpfn; -+ errno = ENOMEM; - return -1; - } - #endif -@@ -556,7 +606,10 @@ - if( !f_conv || !arg_flg_convert_filenames ){ - pbf->bf_filename = new char[strlen(path) + 1]; - #ifndef WINDOWS -- if( !pbf->bf_filename ) return -1; -+ if( !pbf->bf_filename ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(pbf->bf_filename, path); - } -@@ -564,30 +617,42 @@ - pbf_last = pbf; - } - }else{ -- if( !decode_query(metabuf,metabuf_len,"info|length", -- (const char**) 0,(size_t*) 0,&t,QUERY_LONG) ) -+ if( !decode_query(metabuf,metabuf_len, "info|length", -+ (const char**)0, (size_t*) 0, &t, QUERY_LONG) ){ -+ errno = EINVAL; - return -1; -+ } - m_btfhead = _new_bfnode(); - #ifndef WINDOWS -- if( !m_btfhead) return -1; -+ if( !m_btfhead ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - m_btfhead->bf_length = m_total_files_length = t; - if( saveas ){ - m_btfhead->bf_filename = new char[strlen(saveas) + 1]; - #ifndef WINDOWS -- if(!m_btfhead->bf_filename ) return -1; -+ if( !m_btfhead->bf_filename ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(m_btfhead->bf_filename, saveas); - }else if( arg_flg_convert_filenames ){ - char *tmpfn = new char[strlen(path)*2+5]; - #ifndef WINDOWS -- if( !tmpfn ) return -1; -+ if( !tmpfn ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - ConvertFilename(tmpfn, path, strlen(path)*2+5); - m_btfhead->bf_filename = new char[strlen(tmpfn) + 1]; - #ifndef WINDOWS - if( !m_btfhead->bf_filename ){ - delete []tmpfn; -+ errno = ENOMEM; - return -1; - } - #endif -@@ -596,7 +661,10 @@ - }else{ - m_btfhead->bf_filename = new char[strlen(path) + 1]; - #ifndef WINDOWS -- if(!m_btfhead->bf_filename ) return -1; -+ if( !m_btfhead->bf_filename ){ -+ errno = ENOMEM; -+ return -1; -+ } - #endif - strcpy(m_btfhead->bf_filename, path); - } -@@ -694,6 +762,32 @@ - size_t btFiles::FillMetaInfo(FILE* fp) - { - BTFILE *p; -+ const char *refname, *s; -+ char path[MAXPATHLEN]; -+ -+ refname = m_directory ? m_directory : m_btfhead->bf_filename; -+ while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){ -+ refname = s + 1; -+ } -+ if( m_directory && '.' == *refname ){ -+ char dir[MAXPATHLEN]; -+ if( getcwd(dir, sizeof(dir)) && 0==chdir(m_directory) ){ -+ if( getcwd(path, sizeof(path)) ){ -+ refname = path; -+ while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){ -+ refname = s + 1; -+ } -+ } -+ chdir(dir); -+ } -+ } -+ if( '/' == *refname || '\0' == *refname || '.' == *refname ){ -+ CONSOLE.Warning(1, "error, inappropriate file or directory name \"%s\"", -+ m_directory ? m_directory : m_btfhead->bf_filename); -+ errno = EINVAL; -+ return 0; -+ } -+ - if( m_directory ){ - // multi files - if( bencode_str("files", fp) != 1 ) return 0; -@@ -715,16 +809,15 @@ - if(bencode_end_dict_list(fp) != 1 ) return 0; - - if(bencode_str("name", fp) != 1) return 0; -- return bencode_str(m_directory, fp); -- -+ return bencode_str(refname, fp); - }else{ - if( bencode_str("length", fp) != 1 ) return 0; - if( bencode_int(m_btfhead->bf_length, fp) != 1) return 0; - - if( bencode_str("name", fp) != 1 ) return 0; -- return bencode_str(m_btfhead->bf_filename, fp); -+ return bencode_str(refname, fp); - } -- return 1; -+ return 0; - } - - -Index: a/btcontent.cpp -=================================================================== ---- a/btcontent.cpp (revision 300) -+++ b/btcontent.cpp (revision 302) -@@ -357,7 +357,11 @@ - - cfg_req_queue_length = (m_piece_length / cfg_req_slice_size) * 2 - 1; - -- if( m_btfiles.BuildFromMI(b, flen, saveas) < 0 ) ERR_RETURN(); -+ if( m_btfiles.BuildFromMI(b, flen, saveas, arg_flg_exam_only) < 0 ){ -+ if( EINVAL == errno ) -+ CONSOLE.Warning(1, "Torrent metainfo file data is invalid or unusable."); -+ ERR_RETURN(); -+ } - - delete []b; - b = (char *)0; -Index: a/btfiles.h -=================================================================== ---- a/btfiles.h (revision 300) -+++ b/btfiles.h (revision 302) -@@ -61,7 +61,7 @@ - - int BuildFromFS(const char *pathname); - int BuildFromMI(const char *metabuf, const size_t metabuf_len, -- const char *saveas); -+ const char *saveas, unsigned char exam_only); - - char *GetDataName() const; - uint64_t GetTotalLength() const { return m_total_files_length; } diff --git a/net/ctorrent/patches/100-negative-ints.patch b/net/ctorrent/patches/100-negative-ints.patch deleted file mode 100644 index 864ce1b..0000000 --- a/net/ctorrent/patches/100-negative-ints.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/bencode.cpp -+++ b/bencode.cpp -@@ -44,6 +44,10 @@ size_t buf_long(const char *b,size_t len - p++; len--; - } - -+ if( *p == '-'){ -+ p++; len--; -+ } -+ - for(psave = p; len && isdigit(*p); p++,len--) ; - - if(!len || MAX_INT_SIZ < (p - psave) || *p != endchar) return 0; diff --git a/net/ctorrent/patches/200-musl-compat.patch b/net/ctorrent/patches/200-musl-compat.patch deleted file mode 100644 index 65cb71e..0000000 --- a/net/ctorrent/patches/200-musl-compat.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/compat.c -+++ b/compat.c -@@ -63,6 +63,7 @@ int snprintf(char *str, size_t size, con - - #ifndef HAVE_STRNSTR - #include -+#include - /* FUNCTION PROGRAMER: Siberiaic Sang */ - char *strnstr(const char *haystack, const char *needle, size_t haystacklen) - { diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 6be7846..7be4947 100755 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2016 OpenWrt.org +# Copyright (C) 2008-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # @@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts PKG_VERSION:=2.7.6 # Release == build # increase on changes of services files or tld_names.dat -PKG_RELEASE:=4 +PKG_RELEASE:=13 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Christian Schoenebeck @@ -117,21 +117,19 @@ define Build/Configure endef define Build/Compile $(CP) ./files $(PKG_BUILD_DIR) + # ensure that VERSION inside dynamic_dns_functions.sh reflect PKG_VERSION of Makefile + $(SED) '/^VERSION=*/s/.*/VERSION="$(PKG_VERSION)-$(PKG_RELEASE)"/' $(PKG_BUILD_DIR)/files/dynamic_dns_functions.sh + # remove comments, white spaces and empty lines for FILE in `find $(PKG_BUILD_DIR)/files -type f`; do \ - $(SED) 's/^\s*#/#/' \ - -e '/^#\s\|^#$$$$/d' \ - -e 's/\s#\s.*$$$$//' \ - -e 's/\s*$$$$//' \ - -e '/^\/\/\s/d' \ - -e '/^\s*$$$$/d' $$$$FILE; \ + $(SED) 's/^[[:space:]]*//' \ + -e '/^#[[:space:]]\|^#$$$$/d' \ + -e 's/[[:space:]]#[[:space:]].*$$$$//' \ + -e 's/[[:space:]]*$$$$//' \ + -e '/^\/\/[[:space:]]/d' \ + -e '/^[[:space:]]*$$$$/d' $$$$FILE; \ done - # ensure that VERSION inside dynamic_dns_functions.sh reflect PKG_VERSION of Makefile - $(SED) '/^VERSION=*/s/.*/VERSION="$(PKG_VERSION)"/' $(PKG_BUILD_DIR)/files/dynamic_dns_functions.sh - $(CP) ./tools $(PKG_BUILD_DIR) - chmod 755 $(PKG_BUILD_DIR)/tools/* - $(PKG_BUILD_DIR)/tools/public_suffix_list.sh - mv -f $(PKG_BUILD_DIR)/tools/public_suffix_list.dat.gz \ - $(PKG_BUILD_DIR)/files/public_suffix_list.dat.gz + # compress public_suffix_list.dat + gzip -f9 $(PKG_BUILD_DIR)/files/public_suffix_list.dat endef define Package/$(PKG_NAME)/conffiles @@ -141,8 +139,8 @@ endef ###### ************************************************************************* define Package/$(PKG_NAME)/preinst #!/bin/sh - # if NOT run buildroot and PKG_UPGRADE then stop service - [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/ddns stop >/dev/null 2>&1 + # 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/$(PKG_NAME)/install @@ -164,23 +162,24 @@ endef define Package/$(PKG_NAME)/postinst #!/bin/sh # if NOT run buildroot and PKG_UPGRADE then (re)start service if enabled - [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && { + [ -x /etc/uci-defaults/ddns ] && \ + /etc/uci-defaults/ddns && \ + rm -f /etc/uci-defaults/ddns >/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/$(PKG_NAME)/prerm #!/bin/sh # if run within buildroot exit [ -n "$${IPKG_INSTROOT}" ] && exit 0 - # stop running scripts /etc/init.d/ddns stop /etc/init.d/ddns disable - # clear LuCI indexcache rm -f /tmp/luci-indexcache >/dev/null 2>&1 - exit 0 # suppress errors endef @@ -194,28 +193,34 @@ endef define Package/$(PKG_NAME)_cloudflare/install $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare - $(INSTALL_DIR) $(1)/usr/lib/ddns - $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns $(INSTALL_DIR) $(1)/usr/share $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/public_suffix_list.dat.gz $(1)/usr/share + $(INSTALL_DIR) $(1)/usr/lib/ddns + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns endef define Package/$(PKG_NAME)_cloudflare/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 - } + # remove old services file entries + /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_cloudflare ] && \ + /etc/uci-defaults/ddns_cloudflare && \ + rm -f /etc/uci-defaults/ddns_cloudflare >/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/$(PKG_NAME)_cloudflare/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 '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 exit 0 # suppress errors @@ -236,20 +241,27 @@ define Package/$(PKG_NAME)_cloudflare.com-v4/install endef define Package/$(PKG_NAME)_cloudflare.com-v4/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - 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 - } + # remove old services file entries + /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # 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 # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_cloudflare.com-v4 ] && \ + /etc/uci-defaults/ddns_cloudflare.com-v4 && \ + rm -f /etc/uci-defaults/ddns_cloudflare.com-v4 >/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/$(PKG_NAME)_cloudflare.com-v4/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 '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 exit 0 # suppress errors @@ -270,20 +282,27 @@ define Package/$(PKG_NAME)_godaddy.com-v1/install endef define Package/$(PKG_NAME)_godaddy.com-v1/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 - } + # remove old services file entries + /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_godaddy.com-v1 ] && \ + /etc/uci-defaults/ddns_godaddy.com-v1 && \ + rm -f /etc/uci-defaults/ddns_godaddy.com-v1 >/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/$(PKG_NAME)_godaddy.com-v1/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 '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 exit 0 # suppress errors @@ -304,19 +323,25 @@ define Package/$(PKG_NAME)_no-ip_com/install endef define Package/$(PKG_NAME)_no-ip_com/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"no-ip.com"' '"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - } + # remove old services file entries + /bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"no-ip.com"' '"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_no-ip_com ] && \ + /etc/uci-defaults/ddns_no-ip_com && \ + rm -f /etc/uci-defaults/ddns_no-ip_com >/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/$(PKG_NAME)_no-ip_com/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 '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 exit 0 # suppress errors endef @@ -336,20 +361,27 @@ define Package/$(PKG_NAME)_nsupdate/install endef define Package/$(PKG_NAME)_nsupdate/postinst #!/bin/sh - # if NOT upgrading add entries - [ "$${PKG_UPGRADE}" = "1" ] || { - printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services - printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 - } + # remove old services file entries + /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 + /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 + # and create new + printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services + printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 # on real system restart service if enabled - [ -z "$${IPKG_INSTROOT}" ] \ - && /etc/init.d/ddns enabled \ - && /etc/init.d/ddns start >/dev/null 2>&1 + [ -z "$${IPKG_INSTROOT}" ] && { + [ -x /etc/uci-defaults/ddns_nsupdate ] && \ + /etc/uci-defaults/ddns_nsupdate && \ + rm -f /etc/uci-defaults/ddns_nsupdate >/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/$(PKG_NAME)_nsupdate/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 '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 exit 0 # suppress errors diff --git a/net/ddns-scripts/files/ddns.defaults b/net/ddns-scripts/files/ddns.defaults index 8631208..3908bb4 100755 --- a/net/ddns-scripts/files/ddns.defaults +++ b/net/ddns-scripts/files/ddns.defaults @@ -1,67 +1,263 @@ #!/bin/sh +g_pslfile=/usr/share/public_suffix_list.dat.gz +[ -f "$g_pslfile" ] || g_pslfile="$(dirname $0)/public_suffix_list.dat.gz" + +g_pslerr=0 +g_cfgfile="ddns" + +# modify "cloudflare.com-v1" domain to new syntax +# returns "host[.subdom]@domain.TLD" of given FQDN ############################# +mod_cloudflare_v1_domain() { + # $1 entry to validate/split + [ -f "$g_pslfile" ] || return 1 + + [ $# -ne 1 -o -z "$1" ] && \ + { printf "%s\\n" "mod_cloudflare_v1_domain() - Invalid number of parameters" >&2; return 1; } + + local mcd_fqdn=$1 + local mcd_fsub="" + local mcd_fdom="" + local mcd_ctld="" + local mcd_ftld="" + + # check if already new syntax, "@" inside string + if [ $( printf "%s" "$mcd_fqdn" | grep -cF "@" 2>/dev/null ) -gt 0 ]; then + # already done + printf "%s" "$mcd_fqdn" + return 0 + fi + + # we need to do in one line because otherwise sh doesn't work correctly + # to lower | replace "." to " " | awk invert word order + set -- $(printf %s "$mcd_fqdn" | tr [A-Z] [a-z] | tr "." " " \ + | awk '{do printf "%s"(NF>1?OFS:ORS),$NF;while (--NF)}' ) + + while [ -n "${1:-}" ] ; do # as long we have parameters + if [ -z "$mcd_ctld" ]; then # first loop + mcd_ctld="$1" # CURRENT TLD to look at + shift + else + mcd_ctld="$1.$mcd_ctld" # Next TLD to look at + shift + fi + # check if TLD exact match in public_suffix_name.dat, save TLD + zcat $g_pslfile | grep -E "^$mcd_ctld$" >/dev/null 2>&1 && { + mcd_ftld="$mcd_ctld" # save found + mcd_fdom="${1:-}" # save domain next step might be invalid + continue + } + # check if match any "*" in public_suffix_name.dat, + zcat $g_pslfile | grep -E "^\*.$mcd_ctld$" >/dev/null 2>&1 && { + [ -z "${1:-}" ] && break # no more data break + # check if next level TLD match excludes "!" in tld_names.dat + if zcat $g_pslfile | grep -E "^!$1.$mcd_ctld$" >/dev/null 2>&1 ; then + mcd_ftld="$mcd_ctld" # Yes + else + mcd_ftld="$1.$mcd_ctld" + shift + fi + mcd_fdom="$1"; shift + } + [ -n "$mcd_ftld" ] && break # we have something valid, break + done + + # the leftover parameters are the HOST/SUBDOMAIN + while [ -n "${1:-}" ]; do + mcd_fsub="${1}${mcd_fsub:+.$mcd_fsub}" # remember we need to invert + shift # and insert dot if mcd_fsub not empty + done + + # now validate found data + [ -z "$mcd_ftld" ] && { printf "%s\\n" "mod_cloudflare_v1_domain() - no TLD not found in '$mcd_fqdn'" >&1; return 1; } + [ -z "$mcd_fdom" ] && { printf "%s\\n" "mod_cloudflare_v1_domain() - no registrable Domain not found in '$mcd_fqdn'" >&1; return 1; } + + # return data + printf "%s" "${mcd_fsub:+${mcd_fsub}@}${mcd_fdom}.${mcd_ftld}" + return 0 +} + +# modify timer settings from interval and unit to dhms format +timer2dhms() { +# $1 Number and +# $2 Unit of time interval + local t=0 + case $2 in + days) t=$(( $1 * 86400 ));; + hours) t=$(( $1 * 3600 ));; + minutes) t=$(( $1 * 60 ));; + *) t=$1;; + esac + + local d=$(( $t / 86400 )) + local h=$(( $t % 86400 / 3600 )) + local m=$(( $t % 3600 / 60 )) + local s=$(( $t % 60 )) + if [ $d -gt 0 ]; then printf "%dd %02dh %02dm %02ds" "$d" "$h" "$m" "$s" + elif [ $h -gt 0 ]; then printf "%dh %02dm %02ds" "$h" "$m" "$s" + elif [ $m -gt 0 ]; then printf "%dm %02ds" "$m" "$s" + else printf "%ds" "$s"; fi + + unset d h m s t + return 0 +} + # using function to not confuse function calls with existing ones inside /lib/functions.sh -update_ddns_config() { - udc_uci="$(which uci) -q" # ignore errors - udc_pkg="ddns" - udc_cfg="" - udc_name="" - udc_var="" - udc_val="" +update_config() { + uc_uci="$(which uci) -q" # ignore errors + uc_cfg="" + uc_name="" + uc_var="" + uc_val="" package() { return 0; } config () { - udc_cfg="$1" - udc_name="$2" + uc_cfg="$1" + uc_name="$2" # Type = ddns Name = global - if [ "$udc_cfg" = "$udc_pkg" -a "$udc_name" = "global" ]; then - option() { return 0; } - # rename options - $udc_uci rename $udc_pkg.$udc_name.allow_local_ip="upd_privateip" - $udc_uci rename $udc_pkg.$udc_name.date_format="ddns_dateformat" - $udc_uci rename $udc_pkg.$udc_name.log_dir="ddns_logdir" - $udc_uci rename $udc_pkg.$udc_name.log_lines="ddns_loglines" - $udc_uci rename $udc_pkg.$udc_name.run_dir="ddns_rundir" + if [ "$uc_cfg" = "$g_cfgfile" -a "$uc_name" = "global" ]; then + option() { + uc_var="$1"; shift + uc_val="$*" + case "$uc_var" in + allow_local_ip) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_privateip";; + date_format) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_dateformat";; + log_lines) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_loglines";; + log_dir) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_logdir";; + run_dir) $uc_uci rename $g_cfgfile.$uc_name.$uc_var="ddns_rundir";; + # leave all other options currently unchanged + *) ;; + esac + } # Type = service Name = ??? - elif [ "$udc_cfg" = "service" ]; then + elif [ "$uc_cfg" = "service" ]; then option() { - udc_var="$1"; shift - udc_val="$*" - # fix some option service_name values - case "$udc_var" in - service_name) - case "$udc_val" in + uc_var="$1"; shift + uc_val="$*" + case "$uc_var" in + # fix some option service_name values + # and some settings for specific providers + service_name|upd_provider) + case "$uc_val" in freedns\.afraid\.org|afraid\.org) - $udc_uci set $udc_pkg.$udc_name.$udc_var="afraid.org-keyauth";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="afraid.org-keyauth";; Bind-nsupdate) - $udc_uci set $udc_pkg.$udc_name.$udc_var="bind-nsupdate";; - CloudFlare|cloudflare\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="cloudflare.com-v1";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="bind-nsupdate";; + CloudFlare|cloudflare\.com|cloudflare\.com-v1) + # verify if lookup_host is set + $uc_uci get $g_cfgfile.$uc_name.lookup_host >/dev/null 2>&1 || { + ucv_domain=$($uc_uci get $g_cfgfile.$uc_name.domain 2>/dev/null) + $uc_uci set $g_cfgfile.$uc_name.lookup_host="$ucv_domain" + } + if [ -f "$g_pslfile" ]; then + # change value of domain/upd_object to new syntax + # there is no sort order inside uci data so we need multiple checks + ucv_domain=$($uc_uci get $g_cfgfile.$uc_name.domain 2>/dev/null) + ucv_object=$($uc_uci get $g_cfgfile.$uc_name.upd_object 2>/dev/null) + # still old option domain + if [ -n "$ucv_domain" ]; then + ucv_new=$(mod_cloudflare_v1_domain "$ucv_domain") || g_pslerr=1 + # no error save data save data + [ $g_pslerr -eq 0 ] && \ + $uc_uci set $g_cfgfile.$uc_name.domain="$ucv_new" + fi + # already new option upd_object + if [ -n "$ucv_object" ]; then + ucv_new=$(mod_cloudflare_v1_domain "$ucv_object") || g_pslerr=1 + # no error save data save data + [ $g_pslerr -eq 0 ] && \ + $uc_uci set $g_cfgfile.$uc_name.upd_object="$ucv_new" + fi + fi + unset ucv_domain ucv_object ucv_new + # set new option value + $uc_uci set $g_cfgfile.$uc_name.$uc_var="cloudflare.com-v1" + ;; dyndns\.org|dyndns\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="dyn.com";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="dyn.com";; free\.editdns\.net) - $udc_uci set $udc_pkg.$udc_name.$udc_var="editdns.net";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="editdns.net";; domains\.google\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="google.com";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="google.com";; loopia\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="loopia.se";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="loopia.se";; NoIP\.com|No-IP\.com) - $udc_uci set $udc_pkg.$udc_name.$udc_var="no-ip.com";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="no-ip.com";; spdns\.de) - $udc_uci set $udc_pkg.$udc_name.$udc_var="spdyn.de";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="spdyn.de";; strato\.de) - $udc_uci set $udc_pkg.$udc_name.$udc_var="strato.com";; + $uc_uci set $g_cfgfile.$uc_name.$uc_var="strato.com";; *) # all others leave unchanged ;; esac # rename option service_name to option upd_provider -# $udc_uci rename $udc_pkg.$udc_name.$udc_var="upd_provider" +# $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_provider" ;; - *) - # leave all other options currently unchanged + domain|upd_object) + # verify if lookup_host is set + $uc_uci get $g_cfgfile.$uc_name.lookup_host >/dev/null 2>&1 || \ + $uc_uci set $g_cfgfile.$uc_name.lookup_host="$uc_val" + if [ -f "$g_pslfile" ]; then + # if service_name/upd_provider cloudflare_v1 then change domain/upd_object to new syntax + # there is no sort order inside uci data so we need multiple checks + uco_provider=$($uc_uci get $g_cfgfile.$uc_name.upd_provider 2>/dev/null) || \ + uco_provider=$($uc_uci get $g_cfgfile.$uc_name.service_name 2>/dev/null) + if [ "$uco_provider" = "CloudFlare" \ + -o "$uco_provider" = "cloudflare.com" \ + -o "$uco_provider" = "cloudflare.com-v1" ]; then + ucv_new=$(mod_cloudflare_v1_domain "$uc_val") || g_pslerr=1 + # no error save data save data + [ $g_pslerr -eq 0 ] && \ + $uc_uci set $g_cfgfile.$uc_name.$uc_var="$ucv_new" + unset ucv_new + fi + unset uco_provider + fi + # rename option domain to option upd_object +# $uc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_object" ;; +# dns_server) +# # if bind-nsupdate takeover old "dns_server" value as new "upd_nsupd_server" value +# uco_provider=$($uc_uci get $g_cfgfile.$uc_name.upd_provider 2>/dev/null) || \ +# uco_provider=$($uc_uci get $g_cfgfile.$uc_name.service_name 2>/dev/null) +# [ "$uco_provider" = "Bind-nsupdate" -o \ +# "$uco_provider" = "bind-nsupdate" ] && \ +# $uc_uci set $g_cfgfile.$uc_name.upd_nsupd_server="$uc_val" +# # rename option dns_server to new option global_dnssvr +# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="global_dnssvr" +# ;; +# bind_network) +# $udc_uci set $g_cfgfile.$uc_name.upd_url_bindnet="$uc_val" +# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_url_bindnet" +# ;; +# proxy) +# # proxy value must include protocoll +# $udc_uci set $g_cfgfile.$uc_name.$uc_var="http://$uc_val" +# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_proxy" +# ;; +# use_ipv6) +# $udc_uci set $g_cfgfile.$uc_name.$uc_var="$(( 4 + ( 2 * $uc_val ) ))" +# $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_ipversion" +# TODO update_url) +# TODO update_script) + # other renames +# TODO lookup_host) -> rip_host +# enabled) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_enabled";; +# force_dnstcp) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="rip_host_dnstcp";; +# is_glue) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="rip_host_isglue";; +# ip_interface) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_iface";; +# ip_network) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="lip_net";; +# use_https) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_secure";; +# cacert) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_url_cacert";; +# username) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_username";; +# password) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_password";; +# param_opt) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_paramopt";; +# param_enc) $udc_uci rename $g_cfgfile.$uc_name.$uc_var="upd_paramenc";; + + # leave all other options currently unchanged + *) ;; esac return 0 } @@ -73,27 +269,41 @@ update_ddns_config() { fi } - # read package config file - udc_data=$($udc_uci -S -n export "$udc_pkg") - udc_ret="$?" - # No error and udc_data then execute (eval) + # read config file + uc_data=$($uc_uci -S -n export "$g_cfgfile") + uc_ret="$?" + # Error then create config file + [ $uc_ret -ne 0 ] && { + touch /etc/config/$uc_cfgfile + chmod 644 /etc/config/$uc_cfgfile + } + # No error and uc_data then execute (eval) # this will call functions defined above - [ "$udc_ret" -eq 0 -a -n "$udc_data" ] && eval "$udc_data" + [ $uc_ret -eq 0 -a -n "$uc_data" ] && eval "$uc_data" # add config ddns "global" (ignore error if exists) - $udc_uci set ddns.global="$udc_pkg" + $uc_uci set ddns.global="$g_cfgfile" # write changes to config file - $udc_uci commit "$udc_pkg" + $uc_uci commit "$g_cfgfile" - unset udc_uci udc_pkg udc_cfg udc_name udc_var udc_val udc_ret udc_data + unset uc_uci uc_cfg uc_name uc_var uc_val uc_ret uc_data return 0 } -# do existing config update -update_ddns_config - -# clear Ludc_uci indexcache +# clear LuCI indexcache rm -f /tmp/luci-indexcache >/dev/null 2>&1 +# do config update +update_config + +#cleanup +[ $g_pslerr -ne 0 ] && { + unset g_pslfile g_pslerr g_cfgfile + return 1 +} + +[ -f "$g_pslfile" ] && rm -f "$g_pslfile" +unset g_pslfile g_pslerr g_cfgfile return 0 + diff --git a/net/ddns-scripts/files/dynamic_dns_functions.sh b/net/ddns-scripts/files/dynamic_dns_functions.sh index 8d64851..c8b3962 100755 --- a/net/ddns-scripts/files/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/dynamic_dns_functions.sh @@ -6,7 +6,7 @@ # (Loosely) based on the script on the one posted by exobyte in the forums here: # http://forum.openwrt.org/viewtopic.php?id=14040 # extended and partial rewritten -#.2014-2016 Christian Schoenebeck +#.2014-2017 Christian Schoenebeck # # function timeout # copied from http://www.ict.griffith.edu.au/anthony/software/timeout.sh @@ -21,9 +21,9 @@ . /lib/functions/network.sh # GLOBAL VARIABLES # -VERSION="2.7.6" +VERSION="2.7.6-13" SECTION_ID="" # hold config's section name -VERBOSE=1 # default mode is log to console, but easily changed with parameter +VERBOSE=0 # default mode is log to console, but easily changed with parameter MYPROG=$(basename $0) # my program call name LOGFILE="" # logfile - all files are set in dynamic_dns_updater.sh @@ -89,22 +89,22 @@ UCLIENT_FETCH_SSL=$(find /lib /usr/lib -name libustream-ssl.so* 2>/dev/null) # Global configuration settings # allow NON-public IP's -upd_privateip=$(uci -q get ddns.global.allow_local_ip) || upd_privateip=0 +upd_privateip=$(uci -q get ddns.global.upd_privateip) || upd_privateip=0 # directory to store run information to. -ddns_rundir=$(uci -q get ddns.global.run_dir) || ddns_rundir="/var/run/ddns" +ddns_rundir=$(uci -q get ddns.global.ddns_rundir) || ddns_rundir="/var/run/ddns" [ -d $ddns_rundir ] || mkdir -p -m755 $ddns_rundir # directory to store log files -ddns_logdir=$(uci -q get ddns.global.log_dir) || ddns_logdir="/var/log/ddns" +ddns_logdir=$(uci -q get ddns.global.ddns_logdir) || ddns_logdir="/var/log/ddns" [ -d $ddns_logdir ] || mkdir -p -m755 $ddns_logdir # number of lines to before rotate logfile -ddns_loglines=$(uci -q get ddns.global.log_lines) || ddns_loglines=250 +ddns_loglines=$(uci -q get ddns.global.ddns_loglines) || ddns_loglines=250 ddns_loglines=$((ddns_loglines + 1)) # correct sed handling # format to show date information in log and luci-app-ddns default ISO 8601 format -ddns_dateformat=$(uci -q get ddns.global.date_format) || ddns_dateformat="%F %R" +ddns_dateformat=$(uci -q get ddns.global.ddns_dateformat) || ddns_dateformat="%F %R" DATE_PROG="date +'$ddns_dateformat'" # USE_CURL if GNU Wget and cURL installed normally Wget is used by do_transfer() @@ -907,6 +907,8 @@ get_local_ip () { __ERR=$? if [ $__ERR -eq 0 ]; then # DATFILE (sample) + # 10: l2tp-inet: mtu 1456 qdisc fq_codel state UNKNOWN qlen 3\ link/ppp + # 10: l2tp-inet inet 95.30.176.51 peer 95.30.176.1/32 scope global l2tp-inet\ valid_lft forever preferred_lft forever # 5: eth1: mtu 1500 qdisc fq_codel state UP qlen 1000\ link/ether 08:00:27:d0:10:32 brd ff:ff:ff:ff:ff:ff # 5: eth1 inet 172.27.10.128/24 brd 172.27.10.255 scope global eth1\ valid_lft forever preferred_lft forever # 5: eth1 inet 172.55.55.155/24 brd 172.27.10.255 scope global eth1\ valid_lft 12345sec preferred_lft 12345sec @@ -915,9 +917,11 @@ get_local_ip () { # 5: eth1 inet6 fd43:5368:6f6d:6500:a00:27ff:fed0:1032/64 scope global dynamic \ valid_lft 14352sec preferred_lft 14352sec # 5: eth1 inet6 2002:b0c7:f326::a00:27ff:fed0:1032/64 scope global dynamic \ valid_lft 14352sec preferred_lft 14352sec - # remove remove remove replace remove remove - # BROADCAST inet6 fxxx sec forever=>-1 between / and pref.. linestart to inet - sed -i "/BROADCAST/d; /inet6 f/d; s/sec//g; s/forever/-1/g; s/\/.*preferred_lft//g; s/^.*$ip_interface *//g" $DATFILE + # remove remove remove replace replace + # link inet6 fxxx sec forever=>-1 / => ' ' to separate subnet from ip + sed "/link/d; /inet6 f/d; s/sec//g; s/forever/-1/g; s/\// /g" $DATFILE | \ + awk '{ print $3" "$4" "$NF }' > $ERRFILE # temp reuse ERRFILE + # we only need inet? IP prefered time local __TIME4=0; local __TIME6=0 local __TYP __ADR __TIME @@ -932,7 +936,7 @@ get_local_ip () { __DATA4="$__ADR" __TIME4="$__TIME" } - done < $DATFILE + done < $ERRFILE else write_log 3 "ip Error: '$__ERR'" write_log 7 "$(cat $ERRFILE)" # report error @@ -1121,18 +1125,16 @@ get_registered_ip() { write_log 3 "$__PROG error: '$__ERR'" write_log 7 "$(cat $ERRFILE)" else - if [ -n "$BIND_HOST" ]; then + if [ -n "$BIND_HOST" -o -n "$KNOT_HOST" ]; then if [ $is_glue -eq 1 ]; then - __DATA=$(cat $DATFILE | grep "^$lookup_host" | grep -m 1 -o "$__REGEX" ) + __DATA=$(cat $DATFILE | grep "^$lookup_host" | grep -om1 "$__REGEX" ) else __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' ) fi - elif [ -n "$KNOT_HOST" ]; then - __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' ) elif [ -n "$DRILL" ]; then __DATA=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5; exit}' ) elif [ -n "$HOSTIP" ]; then - __DATA=$(cat $DATFILE | grep -m 1 -o "$__REGEX") + __DATA=$(cat $DATFILE | grep -om1 "$__REGEX") elif [ -n "$NSLOOKUP" ]; then __DATA=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($__REGEX\).*$/\\1/p }" ) fi diff --git a/net/ddns-scripts/files/dynamic_dns_lucihelper.sh b/net/ddns-scripts/files/dynamic_dns_lucihelper.sh index b2831e6..4948e98 100755 --- a/net/ddns-scripts/files/dynamic_dns_lucihelper.sh +++ b/net/ddns-scripts/files/dynamic_dns_lucihelper.sh @@ -2,7 +2,7 @@ # /usr/lib/ddns/dynamic_dns_lucihelper.sh # #.Distributed under the terms of the GNU General Public License (GPL) version 2.0 -#.2014-2016 Christian Schoenebeck +#.2014-2017 Christian Schoenebeck # This script is used by luci-app-ddns # # variables in small chars are read from /etc/config/ddns as parameter given here diff --git a/net/ddns-scripts/files/dynamic_dns_updater.sh b/net/ddns-scripts/files/dynamic_dns_updater.sh index c58be2e..46e5842 100755 --- a/net/ddns-scripts/files/dynamic_dns_updater.sh +++ b/net/ddns-scripts/files/dynamic_dns_updater.sh @@ -6,7 +6,7 @@ # (Loosely) based on the script on the one posted by exobyte in the forums here: # http://forum.openwrt.org/viewtopic.php?id=14040 # extended and partial rewritten -#.2014-2016 Christian Schoenebeck +#.2014-2017 Christian Schoenebeck # # variables in small chars are read from /etc/config/ddns # variables in big chars are defined inside these scripts as global vars @@ -299,7 +299,7 @@ get_uptime CURR_TIME if [ $LAST_TIME -eq 0 ]; then write_log 7 "last update: never" else - EPOCH_TIME=$(( $(date +%s) - CURR_TIME + LAST_TIME )) + EPOCH_TIME=$(( $(date +%s) - $CURR_TIME + $LAST_TIME )) EPOCH_TIME="date -d @$EPOCH_TIME +'$ddns_dateformat'" write_log 7 "last update: $(eval $EPOCH_TIME)" fi diff --git a/net/ddns-scripts/files/public_suffix_list.dat b/net/ddns-scripts/files/public_suffix_list.dat new file mode 100644 index 0000000..998973b --- /dev/null +++ b/net/ddns-scripts/files/public_suffix_list.dat @@ -0,0 +1,12310 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat, +// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported. + +// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/. + +// ===BEGIN ICANN DOMAINS=== + +// ac : https://en.wikipedia.org/wiki/.ac +ac +com.ac +edu.ac +gov.ac +net.ac +mil.ac +org.ac + +// ad : https://en.wikipedia.org/wiki/.ad +ad +nom.ad + +// ae : https://en.wikipedia.org/wiki/.ae +// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php +ae +co.ae +net.ae +org.ae +sch.ae +ac.ae +gov.ae +mil.ae + +// aero : see https://www.information.aero/index.php?id=66 +aero +accident-investigation.aero +accident-prevention.aero +aerobatic.aero +aeroclub.aero +aerodrome.aero +agents.aero +aircraft.aero +airline.aero +airport.aero +air-surveillance.aero +airtraffic.aero +air-traffic-control.aero +ambulance.aero +amusement.aero +association.aero +author.aero +ballooning.aero +broker.aero +caa.aero +cargo.aero +catering.aero +certification.aero +championship.aero +charter.aero +civilaviation.aero +club.aero +conference.aero +consultant.aero +consulting.aero +control.aero +council.aero +crew.aero +design.aero +dgca.aero +educator.aero +emergency.aero +engine.aero +engineer.aero +entertainment.aero +equipment.aero +exchange.aero +express.aero +federation.aero +flight.aero +freight.aero +fuel.aero +gliding.aero +government.aero +groundhandling.aero +group.aero +hanggliding.aero +homebuilt.aero +insurance.aero +journal.aero +journalist.aero +leasing.aero +logistics.aero +magazine.aero +maintenance.aero +media.aero +microlight.aero +modelling.aero +navigation.aero +parachuting.aero +paragliding.aero +passenger-association.aero +pilot.aero +press.aero +production.aero +recreation.aero +repbody.aero +res.aero +research.aero +rotorcraft.aero +safety.aero +scientist.aero +services.aero +show.aero +skydiving.aero +software.aero +student.aero +trader.aero +trading.aero +trainer.aero +union.aero +workinggroup.aero +works.aero + +// af : http://www.nic.af/help.jsp +af +gov.af +com.af +org.af +net.af +edu.af + +// ag : http://www.nic.ag/prices.htm +ag +com.ag +org.ag +net.ag +co.ag +nom.ag + +// ai : http://nic.com.ai/ +ai +off.ai +com.ai +net.ai +org.ai + +// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 +al +com.al +edu.al +gov.al +mil.al +net.al +org.al + +// am : https://en.wikipedia.org/wiki/.am +am + +// ao : https://en.wikipedia.org/wiki/.ao +// http://www.dns.ao/REGISTR.DOC +ao +ed.ao +gv.ao +og.ao +co.ao +pb.ao +it.ao + +// aq : https://en.wikipedia.org/wiki/.aq +aq + +// ar : https://nic.ar/normativa-vigente.xhtml +ar +com.ar +edu.ar +gob.ar +gov.ar +int.ar +mil.ar +net.ar +org.ar +tur.ar + +// arpa : https://en.wikipedia.org/wiki/.arpa +// Confirmed by registry 2008-06-18 +arpa +e164.arpa +in-addr.arpa +ip6.arpa +iris.arpa +uri.arpa +urn.arpa + +// as : https://en.wikipedia.org/wiki/.as +as +gov.as + +// asia : https://en.wikipedia.org/wiki/.asia +asia + +// at : https://en.wikipedia.org/wiki/.at +// Confirmed by registry 2008-06-17 +at +ac.at +co.at +gv.at +or.at + +// au : https://en.wikipedia.org/wiki/.au +// http://www.auda.org.au/ +au +// 2LDs +com.au +net.au +org.au +edu.au +gov.au +asn.au +id.au +// Historic 2LDs (closed to new registration, but sites still exist) +info.au +conf.au +oz.au +// CGDNs - http://www.cgdn.org.au/ +act.au +nsw.au +nt.au +qld.au +sa.au +tas.au +vic.au +wa.au +// 3LDs +act.edu.au +nsw.edu.au +nt.edu.au +qld.edu.au +sa.edu.au +tas.edu.au +vic.edu.au +wa.edu.au +// act.gov.au Bug 984824 - Removed at request of Greg Tankard +// nsw.gov.au Bug 547985 - Removed at request of +// nt.gov.au Bug 940478 - Removed at request of Greg Connors +qld.gov.au +sa.gov.au +tas.gov.au +vic.gov.au +wa.gov.au + +// aw : https://en.wikipedia.org/wiki/.aw +aw +com.aw + +// ax : https://en.wikipedia.org/wiki/.ax +ax + +// az : https://en.wikipedia.org/wiki/.az +az +com.az +net.az +int.az +gov.az +org.az +edu.az +info.az +pp.az +mil.az +name.az +pro.az +biz.az + +// ba : http://nic.ba/users_data/files/pravilnik_o_registraciji.pdf +ba +com.ba +edu.ba +gov.ba +mil.ba +net.ba +org.ba + +// bb : https://en.wikipedia.org/wiki/.bb +bb +biz.bb +co.bb +com.bb +edu.bb +gov.bb +info.bb +net.bb +org.bb +store.bb +tv.bb + +// bd : https://en.wikipedia.org/wiki/.bd +*.bd + +// be : https://en.wikipedia.org/wiki/.be +// Confirmed by registry 2008-06-08 +be +ac.be + +// bf : https://en.wikipedia.org/wiki/.bf +bf +gov.bf + +// bg : https://en.wikipedia.org/wiki/.bg +// https://www.register.bg/user/static/rules/en/index.html +bg +a.bg +b.bg +c.bg +d.bg +e.bg +f.bg +g.bg +h.bg +i.bg +j.bg +k.bg +l.bg +m.bg +n.bg +o.bg +p.bg +q.bg +r.bg +s.bg +t.bg +u.bg +v.bg +w.bg +x.bg +y.bg +z.bg +0.bg +1.bg +2.bg +3.bg +4.bg +5.bg +6.bg +7.bg +8.bg +9.bg + +// bh : https://en.wikipedia.org/wiki/.bh +bh +com.bh +edu.bh +net.bh +org.bh +gov.bh + +// bi : https://en.wikipedia.org/wiki/.bi +// http://whois.nic.bi/ +bi +co.bi +com.bi +edu.bi +or.bi +org.bi + +// biz : https://en.wikipedia.org/wiki/.biz +biz + +// bj : https://en.wikipedia.org/wiki/.bj +bj +asso.bj +barreau.bj +gouv.bj + +// bm : http://www.bermudanic.bm/dnr-text.txt +bm +com.bm +edu.bm +gov.bm +net.bm +org.bm + +// bn : https://en.wikipedia.org/wiki/.bn +*.bn + +// bo : http://www.nic.bo/ +bo +com.bo +edu.bo +gov.bo +gob.bo +int.bo +org.bo +net.bo +mil.bo +tv.bo + +// br : http://registro.br/dominio/categoria.html +// Submitted by registry +br +adm.br +adv.br +agr.br +am.br +arq.br +art.br +ato.br +b.br +bio.br +blog.br +bmd.br +cim.br +cng.br +cnt.br +com.br +coop.br +ecn.br +eco.br +edu.br +emp.br +eng.br +esp.br +etc.br +eti.br +far.br +flog.br +fm.br +fnd.br +fot.br +fst.br +g12.br +ggf.br +gov.br +imb.br +ind.br +inf.br +jor.br +jus.br +leg.br +lel.br +mat.br +med.br +mil.br +mp.br +mus.br +net.br +*.nom.br +not.br +ntr.br +odo.br +org.br +ppg.br +pro.br +psc.br +psi.br +qsl.br +radio.br +rec.br +slg.br +srv.br +taxi.br +teo.br +tmp.br +trd.br +tur.br +tv.br +vet.br +vlog.br +wiki.br +zlg.br + +// bs : http://www.nic.bs/rules.html +bs +com.bs +net.bs +org.bs +edu.bs +gov.bs + +// bt : https://en.wikipedia.org/wiki/.bt +bt +com.bt +edu.bt +gov.bt +net.bt +org.bt + +// bv : No registrations at this time. +// Submitted by registry +bv + +// bw : https://en.wikipedia.org/wiki/.bw +// http://www.gobin.info/domainname/bw.doc +// list of other 2nd level tlds ? +bw +co.bw +org.bw + +// by : https://en.wikipedia.org/wiki/.by +// http://tld.by/rules_2006_en.html +// list of other 2nd level tlds ? +by +gov.by +mil.by +// Official information does not indicate that com.by is a reserved +// second-level domain, but it's being used as one (see www.google.com.by and +// www.yahoo.com.by, for example), so we list it here for safety's sake. +com.by + +// http://hoster.by/ +of.by + +// bz : https://en.wikipedia.org/wiki/.bz +// http://www.belizenic.bz/ +bz +com.bz +net.bz +org.bz +edu.bz +gov.bz + +// ca : https://en.wikipedia.org/wiki/.ca +ca +// ca geographical names +ab.ca +bc.ca +mb.ca +nb.ca +nf.ca +nl.ca +ns.ca +nt.ca +nu.ca +on.ca +pe.ca +qc.ca +sk.ca +yk.ca +// gc.ca: https://en.wikipedia.org/wiki/.gc.ca +// see also: http://registry.gc.ca/en/SubdomainFAQ +gc.ca + +// cat : https://en.wikipedia.org/wiki/.cat +cat + +// cc : https://en.wikipedia.org/wiki/.cc +cc + +// cd : https://en.wikipedia.org/wiki/.cd +// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 +cd +gov.cd + +// cf : https://en.wikipedia.org/wiki/.cf +cf + +// cg : https://en.wikipedia.org/wiki/.cg +cg + +// ch : https://en.wikipedia.org/wiki/.ch +ch + +// ci : https://en.wikipedia.org/wiki/.ci +// http://www.nic.ci/index.php?page=charte +ci +org.ci +or.ci +com.ci +co.ci +edu.ci +ed.ci +ac.ci +net.ci +go.ci +asso.ci +xn--aroport-bya.ci +aéroport.ci +int.ci +presse.ci +md.ci +gouv.ci + +// ck : https://en.wikipedia.org/wiki/.ck +*.ck +!www.ck + +// cl : https://en.wikipedia.org/wiki/.cl +cl +gov.cl +gob.cl +co.cl +mil.cl + +// cm : https://en.wikipedia.org/wiki/.cm plus bug 981927 +cm +co.cm +com.cm +gov.cm +net.cm + +// cn : https://en.wikipedia.org/wiki/.cn +// Submitted by registry +cn +ac.cn +com.cn +edu.cn +gov.cn +net.cn +org.cn +mil.cn +xn--55qx5d.cn +公司.cn +xn--io0a7i.cn +网络.cn +xn--od0alg.cn +網絡.cn +// cn geographic names +ah.cn +bj.cn +cq.cn +fj.cn +gd.cn +gs.cn +gz.cn +gx.cn +ha.cn +hb.cn +he.cn +hi.cn +hl.cn +hn.cn +jl.cn +js.cn +jx.cn +ln.cn +nm.cn +nx.cn +qh.cn +sc.cn +sd.cn +sh.cn +sn.cn +sx.cn +tj.cn +xj.cn +xz.cn +yn.cn +zj.cn +hk.cn +mo.cn +tw.cn + +// co : https://en.wikipedia.org/wiki/.co +// Submitted by registry +co +arts.co +com.co +edu.co +firm.co +gov.co +info.co +int.co +mil.co +net.co +nom.co +org.co +rec.co +web.co + +// com : https://en.wikipedia.org/wiki/.com +com + +// coop : https://en.wikipedia.org/wiki/.coop +coop + +// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do +cr +ac.cr +co.cr +ed.cr +fi.cr +go.cr +or.cr +sa.cr + +// cu : https://en.wikipedia.org/wiki/.cu +cu +com.cu +edu.cu +org.cu +net.cu +gov.cu +inf.cu + +// cv : https://en.wikipedia.org/wiki/.cv +cv + +// cw : http://www.una.cw/cw_registry/ +// Confirmed by registry 2013-03-26 +cw +com.cw +edu.cw +net.cw +org.cw + +// cx : https://en.wikipedia.org/wiki/.cx +// list of other 2nd level tlds ? +cx +gov.cx + +// cy : http://www.nic.cy/ +// Submitted by registry Panayiotou Fotia +cy +ac.cy +biz.cy +com.cy +ekloges.cy +gov.cy +ltd.cy +name.cy +net.cy +org.cy +parliament.cy +press.cy +pro.cy +tm.cy + +// cz : https://en.wikipedia.org/wiki/.cz +cz + +// de : https://en.wikipedia.org/wiki/.de +// Confirmed by registry (with technical +// reservations) 2008-07-01 +de + +// dj : https://en.wikipedia.org/wiki/.dj +dj + +// dk : https://en.wikipedia.org/wiki/.dk +// Confirmed by registry 2008-06-17 +dk + +// dm : https://en.wikipedia.org/wiki/.dm +dm +com.dm +net.dm +org.dm +edu.dm +gov.dm + +// do : https://en.wikipedia.org/wiki/.do +do +art.do +com.do +edu.do +gob.do +gov.do +mil.do +net.do +org.do +sld.do +web.do + +// dz : https://en.wikipedia.org/wiki/.dz +dz +com.dz +org.dz +net.dz +gov.dz +edu.dz +asso.dz +pol.dz +art.dz + +// ec : http://www.nic.ec/reg/paso1.asp +// Submitted by registry +ec +com.ec +info.ec +net.ec +fin.ec +k12.ec +med.ec +pro.ec +org.ec +edu.ec +gov.ec +gob.ec +mil.ec + +// edu : https://en.wikipedia.org/wiki/.edu +edu + +// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B +ee +edu.ee +gov.ee +riik.ee +lib.ee +med.ee +com.ee +pri.ee +aip.ee +org.ee +fie.ee + +// eg : https://en.wikipedia.org/wiki/.eg +eg +com.eg +edu.eg +eun.eg +gov.eg +mil.eg +name.eg +net.eg +org.eg +sci.eg + +// er : https://en.wikipedia.org/wiki/.er +*.er + +// es : https://www.nic.es/site_ingles/ingles/dominios/index.html +es +com.es +nom.es +org.es +gob.es +edu.es + +// et : https://en.wikipedia.org/wiki/.et +et +com.et +gov.et +org.et +edu.et +biz.et +name.et +info.et +net.et + +// eu : https://en.wikipedia.org/wiki/.eu +eu + +// fi : https://en.wikipedia.org/wiki/.fi +fi +// aland.fi : https://en.wikipedia.org/wiki/.ax +// This domain is being phased out in favor of .ax. As there are still many +// domains under aland.fi, we still keep it on the list until aland.fi is +// completely removed. +// TODO: Check for updates (expected to be phased out around Q1/2009) +aland.fi + +// fj : https://en.wikipedia.org/wiki/.fj +*.fj + +// fk : https://en.wikipedia.org/wiki/.fk +*.fk + +// fm : https://en.wikipedia.org/wiki/.fm +fm + +// fo : https://en.wikipedia.org/wiki/.fo +fo + +// fr : http://www.afnic.fr/ +// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs +fr +com.fr +asso.fr +nom.fr +prd.fr +presse.fr +tm.fr +// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels +aeroport.fr +assedic.fr +avocat.fr +avoues.fr +cci.fr +chambagri.fr +chirurgiens-dentistes.fr +experts-comptables.fr +geometre-expert.fr +gouv.fr +greta.fr +huissier-justice.fr +medecin.fr +notaires.fr +pharmacien.fr +port.fr +veterinaire.fr + +// ga : https://en.wikipedia.org/wiki/.ga +ga + +// gb : This registry is effectively dormant +// Submitted by registry +gb + +// gd : https://en.wikipedia.org/wiki/.gd +gd + +// ge : http://www.nic.net.ge/policy_en.pdf +ge +com.ge +edu.ge +gov.ge +org.ge +mil.ge +net.ge +pvt.ge + +// gf : https://en.wikipedia.org/wiki/.gf +gf + +// gg : http://www.channelisles.net/register-domains/ +// Confirmed by registry 2013-11-28 +gg +co.gg +net.gg +org.gg + +// gh : https://en.wikipedia.org/wiki/.gh +// see also: http://www.nic.gh/reg_now.php +// Although domains directly at second level are not possible at the moment, +// they have been possible for some time and may come back. +gh +com.gh +edu.gh +gov.gh +org.gh +mil.gh + +// gi : http://www.nic.gi/rules.html +gi +com.gi +ltd.gi +gov.gi +mod.gi +edu.gi +org.gi + +// gl : https://en.wikipedia.org/wiki/.gl +// http://nic.gl +gl +co.gl +com.gl +edu.gl +net.gl +org.gl + +// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm +gm + +// gn : http://psg.com/dns/gn/gn.txt +// Submitted by registry +gn +ac.gn +com.gn +edu.gn +gov.gn +org.gn +net.gn + +// gov : https://en.wikipedia.org/wiki/.gov +gov + +// gp : http://www.nic.gp/index.php?lang=en +gp +com.gp +net.gp +mobi.gp +edu.gp +org.gp +asso.gp + +// gq : https://en.wikipedia.org/wiki/.gq +gq + +// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html +// Submitted by registry +gr +com.gr +edu.gr +net.gr +org.gr +gov.gr + +// gs : https://en.wikipedia.org/wiki/.gs +gs + +// gt : http://www.gt/politicas_de_registro.html +gt +com.gt +edu.gt +gob.gt +ind.gt +mil.gt +net.gt +org.gt + +// gu : http://gadao.gov.gu/registration.txt +*.gu + +// gw : https://en.wikipedia.org/wiki/.gw +gw + +// gy : https://en.wikipedia.org/wiki/.gy +// http://registry.gy/ +gy +co.gy +com.gy +edu.gy +gov.gy +net.gy +org.gy + +// hk : https://www.hkdnr.hk +// Submitted by registry +hk +com.hk +edu.hk +gov.hk +idv.hk +net.hk +org.hk +xn--55qx5d.hk +公司.hk +xn--wcvs22d.hk +教育.hk +xn--lcvr32d.hk +敎育.hk +xn--mxtq1m.hk +政府.hk +xn--gmqw5a.hk +個人.hk +xn--ciqpn.hk +个人.hk +xn--gmq050i.hk +箇人.hk +xn--zf0avx.hk +網络.hk +xn--io0a7i.hk +网络.hk +xn--mk0axi.hk +组織.hk +xn--od0alg.hk +網絡.hk +xn--od0aq3b.hk +网絡.hk +xn--tn0ag.hk +组织.hk +xn--uc0atv.hk +組織.hk +xn--uc0ay4a.hk +組织.hk + +// hm : https://en.wikipedia.org/wiki/.hm +hm + +// hn : http://www.nic.hn/politicas/ps02,,05.html +hn +com.hn +edu.hn +org.hn +net.hn +mil.hn +gob.hn + +// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf +hr +iz.hr +from.hr +name.hr +com.hr + +// ht : http://www.nic.ht/info/charte.cfm +ht +com.ht +shop.ht +firm.ht +info.ht +adult.ht +net.ht +pro.ht +org.ht +med.ht +art.ht +coop.ht +pol.ht +asso.ht +edu.ht +rel.ht +gouv.ht +perso.ht + +// hu : http://www.domain.hu/domain/English/sld.html +// Confirmed by registry 2008-06-12 +hu +co.hu +info.hu +org.hu +priv.hu +sport.hu +tm.hu +2000.hu +agrar.hu +bolt.hu +casino.hu +city.hu +erotica.hu +erotika.hu +film.hu +forum.hu +games.hu +hotel.hu +ingatlan.hu +jogasz.hu +konyvelo.hu +lakas.hu +media.hu +news.hu +reklam.hu +sex.hu +shop.hu +suli.hu +szex.hu +tozsde.hu +utazas.hu +video.hu + +// id : https://register.pandi.or.id/ +id +ac.id +biz.id +co.id +desa.id +go.id +mil.id +my.id +net.id +or.id +sch.id +web.id + +// ie : https://en.wikipedia.org/wiki/.ie +ie +gov.ie + +// il : http://www.isoc.org.il/domains/ +il +ac.il +co.il +gov.il +idf.il +k12.il +muni.il +net.il +org.il + +// im : https://www.nic.im/ +// Submitted by registry +im +ac.im +co.im +com.im +ltd.co.im +net.im +org.im +plc.co.im +tt.im +tv.im + +// in : https://en.wikipedia.org/wiki/.in +// see also: https://registry.in/Policies +// Please note, that nic.in is not an official eTLD, but used by most +// government institutions. +in +co.in +firm.in +net.in +org.in +gen.in +ind.in +nic.in +ac.in +edu.in +res.in +gov.in +mil.in + +// info : https://en.wikipedia.org/wiki/.info +info + +// int : https://en.wikipedia.org/wiki/.int +// Confirmed by registry 2008-06-18 +int +eu.int + +// io : http://www.nic.io/rules.html +// list of other 2nd level tlds ? +io +com.io + +// iq : http://www.cmc.iq/english/iq/iqregister1.htm +iq +gov.iq +edu.iq +mil.iq +com.iq +org.iq +net.iq + +// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules +// Also see http://www.nic.ir/Internationalized_Domain_Names +// Two .ir entries added at request of , 2010-04-16 +ir +ac.ir +co.ir +gov.ir +id.ir +net.ir +org.ir +sch.ir +// xn--mgba3a4f16a.ir (.ir, Persian YEH) +xn--mgba3a4f16a.ir +ایران.ir +// xn--mgba3a4fra.ir (.ir, Arabic YEH) +xn--mgba3a4fra.ir +ايران.ir + +// is : http://www.isnic.is/domain/rules.php +// Confirmed by registry 2008-12-06 +is +net.is +com.is +edu.is +gov.is +org.is +int.is + +// it : https://en.wikipedia.org/wiki/.it +it +gov.it +edu.it +// Reserved geo-names: +// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf +// There is also a list of reserved geo-names corresponding to Italian municipalities +// http://www.nic.it/documenti/appendice-c.pdf, but it is not included here. +// Regions +abr.it +abruzzo.it +aosta-valley.it +aostavalley.it +bas.it +basilicata.it +cal.it +calabria.it +cam.it +campania.it +emilia-romagna.it +emiliaromagna.it +emr.it +friuli-v-giulia.it +friuli-ve-giulia.it +friuli-vegiulia.it +friuli-venezia-giulia.it +friuli-veneziagiulia.it +friuli-vgiulia.it +friuliv-giulia.it +friulive-giulia.it +friulivegiulia.it +friulivenezia-giulia.it +friuliveneziagiulia.it +friulivgiulia.it +fvg.it +laz.it +lazio.it +lig.it +liguria.it +lom.it +lombardia.it +lombardy.it +lucania.it +mar.it +marche.it +mol.it +molise.it +piedmont.it +piemonte.it +pmn.it +pug.it +puglia.it +sar.it +sardegna.it +sardinia.it +sic.it +sicilia.it +sicily.it +taa.it +tos.it +toscana.it +trentino-a-adige.it +trentino-aadige.it +trentino-alto-adige.it +trentino-altoadige.it +trentino-s-tirol.it +trentino-stirol.it +trentino-sud-tirol.it +trentino-sudtirol.it +trentino-sued-tirol.it +trentino-suedtirol.it +trentinoa-adige.it +trentinoaadige.it +trentinoalto-adige.it +trentinoaltoadige.it +trentinos-tirol.it +trentinostirol.it +trentinosud-tirol.it +trentinosudtirol.it +trentinosued-tirol.it +trentinosuedtirol.it +tuscany.it +umb.it +umbria.it +val-d-aosta.it +val-daosta.it +vald-aosta.it +valdaosta.it +valle-aosta.it +valle-d-aosta.it +valle-daosta.it +valleaosta.it +valled-aosta.it +valledaosta.it +vallee-aoste.it +valleeaoste.it +vao.it +vda.it +ven.it +veneto.it +// Provinces +ag.it +agrigento.it +al.it +alessandria.it +alto-adige.it +altoadige.it +an.it +ancona.it +andria-barletta-trani.it +andria-trani-barletta.it +andriabarlettatrani.it +andriatranibarletta.it +ao.it +aosta.it +aoste.it +ap.it +aq.it +aquila.it +ar.it +arezzo.it +ascoli-piceno.it +ascolipiceno.it +asti.it +at.it +av.it +avellino.it +ba.it +balsan.it +bari.it +barletta-trani-andria.it +barlettatraniandria.it +belluno.it +benevento.it +bergamo.it +bg.it +bi.it +biella.it +bl.it +bn.it +bo.it +bologna.it +bolzano.it +bozen.it +br.it +brescia.it +brindisi.it +bs.it +bt.it +bz.it +ca.it +cagliari.it +caltanissetta.it +campidano-medio.it +campidanomedio.it +campobasso.it +carbonia-iglesias.it +carboniaiglesias.it +carrara-massa.it +carraramassa.it +caserta.it +catania.it +catanzaro.it +cb.it +ce.it +cesena-forli.it +cesenaforli.it +ch.it +chieti.it +ci.it +cl.it +cn.it +co.it +como.it +cosenza.it +cr.it +cremona.it +crotone.it +cs.it +ct.it +cuneo.it +cz.it +dell-ogliastra.it +dellogliastra.it +en.it +enna.it +fc.it +fe.it +fermo.it +ferrara.it +fg.it +fi.it +firenze.it +florence.it +fm.it +foggia.it +forli-cesena.it +forlicesena.it +fr.it +frosinone.it +ge.it +genoa.it +genova.it +go.it +gorizia.it +gr.it +grosseto.it +iglesias-carbonia.it +iglesiascarbonia.it +im.it +imperia.it +is.it +isernia.it +kr.it +la-spezia.it +laquila.it +laspezia.it +latina.it +lc.it +le.it +lecce.it +lecco.it +li.it +livorno.it +lo.it +lodi.it +lt.it +lu.it +lucca.it +macerata.it +mantova.it +massa-carrara.it +massacarrara.it +matera.it +mb.it +mc.it +me.it +medio-campidano.it +mediocampidano.it +messina.it +mi.it +milan.it +milano.it +mn.it +mo.it +modena.it +monza-brianza.it +monza-e-della-brianza.it +monza.it +monzabrianza.it +monzaebrianza.it +monzaedellabrianza.it +ms.it +mt.it +na.it +naples.it +napoli.it +no.it +novara.it +nu.it +nuoro.it +og.it +ogliastra.it +olbia-tempio.it +olbiatempio.it +or.it +oristano.it +ot.it +pa.it +padova.it +padua.it +palermo.it +parma.it +pavia.it +pc.it +pd.it +pe.it +perugia.it +pesaro-urbino.it +pesarourbino.it +pescara.it +pg.it +pi.it +piacenza.it +pisa.it +pistoia.it +pn.it +po.it +pordenone.it +potenza.it +pr.it +prato.it +pt.it +pu.it +pv.it +pz.it +ra.it +ragusa.it +ravenna.it +rc.it +re.it +reggio-calabria.it +reggio-emilia.it +reggiocalabria.it +reggioemilia.it +rg.it +ri.it +rieti.it +rimini.it +rm.it +rn.it +ro.it +roma.it +rome.it +rovigo.it +sa.it +salerno.it +sassari.it +savona.it +si.it +siena.it +siracusa.it +so.it +sondrio.it +sp.it +sr.it +ss.it +suedtirol.it +sv.it +ta.it +taranto.it +te.it +tempio-olbia.it +tempioolbia.it +teramo.it +terni.it +tn.it +to.it +torino.it +tp.it +tr.it +trani-andria-barletta.it +trani-barletta-andria.it +traniandriabarletta.it +tranibarlettaandria.it +trapani.it +trentino.it +trento.it +treviso.it +trieste.it +ts.it +turin.it +tv.it +ud.it +udine.it +urbino-pesaro.it +urbinopesaro.it +va.it +varese.it +vb.it +vc.it +ve.it +venezia.it +venice.it +verbania.it +vercelli.it +verona.it +vi.it +vibo-valentia.it +vibovalentia.it +vicenza.it +viterbo.it +vr.it +vs.it +vt.it +vv.it + +// je : http://www.channelisles.net/register-domains/ +// Confirmed by registry 2013-11-28 +je +co.je +net.je +org.je + +// jm : http://www.com.jm/register.html +*.jm + +// jo : http://www.dns.jo/Registration_policy.aspx +jo +com.jo +org.jo +net.jo +edu.jo +sch.jo +gov.jo +mil.jo +name.jo + +// jobs : https://en.wikipedia.org/wiki/.jobs +jobs + +// jp : https://en.wikipedia.org/wiki/.jp +// http://jprs.co.jp/en/jpdomain.html +// Submitted by registry +jp +// jp organizational type names +ac.jp +ad.jp +co.jp +ed.jp +go.jp +gr.jp +lg.jp +ne.jp +or.jp +// jp prefecture type names +aichi.jp +akita.jp +aomori.jp +chiba.jp +ehime.jp +fukui.jp +fukuoka.jp +fukushima.jp +gifu.jp +gunma.jp +hiroshima.jp +hokkaido.jp +hyogo.jp +ibaraki.jp +ishikawa.jp +iwate.jp +kagawa.jp +kagoshima.jp +kanagawa.jp +kochi.jp +kumamoto.jp +kyoto.jp +mie.jp +miyagi.jp +miyazaki.jp +nagano.jp +nagasaki.jp +nara.jp +niigata.jp +oita.jp +okayama.jp +okinawa.jp +osaka.jp +saga.jp +saitama.jp +shiga.jp +shimane.jp +shizuoka.jp +tochigi.jp +tokushima.jp +tokyo.jp +tottori.jp +toyama.jp +wakayama.jp +yamagata.jp +yamaguchi.jp +yamanashi.jp +xn--4pvxs.jp +栃木.jp +xn--vgu402c.jp +愛知.jp +xn--c3s14m.jp +愛媛.jp +xn--f6qx53a.jp +兵庫.jp +xn--8pvr4u.jp +熊本.jp +xn--uist22h.jp +茨城.jp +xn--djrs72d6uy.jp +北海道.jp +xn--mkru45i.jp +千葉.jp +xn--0trq7p7nn.jp +和歌山.jp +xn--8ltr62k.jp +長崎.jp +xn--2m4a15e.jp +長野.jp +xn--efvn9s.jp +新潟.jp +xn--32vp30h.jp +青森.jp +xn--4it797k.jp +静岡.jp +xn--1lqs71d.jp +東京.jp +xn--5rtp49c.jp +石川.jp +xn--5js045d.jp +埼玉.jp +xn--ehqz56n.jp +三重.jp +xn--1lqs03n.jp +京都.jp +xn--qqqt11m.jp +佐賀.jp +xn--kbrq7o.jp +大分.jp +xn--pssu33l.jp +大阪.jp +xn--ntsq17g.jp +奈良.jp +xn--uisz3g.jp +宮城.jp +xn--6btw5a.jp +宮崎.jp +xn--1ctwo.jp +富山.jp +xn--6orx2r.jp +山口.jp +xn--rht61e.jp +山形.jp +xn--rht27z.jp +山梨.jp +xn--djty4k.jp +岩手.jp +xn--nit225k.jp +岐阜.jp +xn--rht3d.jp +岡山.jp +xn--klty5x.jp +島根.jp +xn--kltx9a.jp +広島.jp +xn--kltp7d.jp +徳島.jp +xn--uuwu58a.jp +沖縄.jp +xn--zbx025d.jp +滋賀.jp +xn--ntso0iqx3a.jp +神奈川.jp +xn--elqq16h.jp +福井.jp +xn--4it168d.jp +福岡.jp +xn--klt787d.jp +福島.jp +xn--rny31h.jp +秋田.jp +xn--7t0a264c.jp +群馬.jp +xn--5rtq34k.jp +香川.jp +xn--k7yn95e.jp +高知.jp +xn--tor131o.jp +鳥取.jp +xn--d5qv7z876c.jp +鹿児島.jp +// jp geographic type names +// http://jprs.jp/doc/rule/saisoku-1.html +*.kawasaki.jp +*.kitakyushu.jp +*.kobe.jp +*.nagoya.jp +*.sapporo.jp +*.sendai.jp +*.yokohama.jp +!city.kawasaki.jp +!city.kitakyushu.jp +!city.kobe.jp +!city.nagoya.jp +!city.sapporo.jp +!city.sendai.jp +!city.yokohama.jp +// 4th level registration +aisai.aichi.jp +ama.aichi.jp +anjo.aichi.jp +asuke.aichi.jp +chiryu.aichi.jp +chita.aichi.jp +fuso.aichi.jp +gamagori.aichi.jp +handa.aichi.jp +hazu.aichi.jp +hekinan.aichi.jp +higashiura.aichi.jp +ichinomiya.aichi.jp +inazawa.aichi.jp +inuyama.aichi.jp +isshiki.aichi.jp +iwakura.aichi.jp +kanie.aichi.jp +kariya.aichi.jp +kasugai.aichi.jp +kira.aichi.jp +kiyosu.aichi.jp +komaki.aichi.jp +konan.aichi.jp +kota.aichi.jp +mihama.aichi.jp +miyoshi.aichi.jp +nishio.aichi.jp +nisshin.aichi.jp +obu.aichi.jp +oguchi.aichi.jp +oharu.aichi.jp +okazaki.aichi.jp +owariasahi.aichi.jp +seto.aichi.jp +shikatsu.aichi.jp +shinshiro.aichi.jp +shitara.aichi.jp +tahara.aichi.jp +takahama.aichi.jp +tobishima.aichi.jp +toei.aichi.jp +togo.aichi.jp +tokai.aichi.jp +tokoname.aichi.jp +toyoake.aichi.jp +toyohashi.aichi.jp +toyokawa.aichi.jp +toyone.aichi.jp +toyota.aichi.jp +tsushima.aichi.jp +yatomi.aichi.jp +akita.akita.jp +daisen.akita.jp +fujisato.akita.jp +gojome.akita.jp +hachirogata.akita.jp +happou.akita.jp +higashinaruse.akita.jp +honjo.akita.jp +honjyo.akita.jp +ikawa.akita.jp +kamikoani.akita.jp +kamioka.akita.jp +katagami.akita.jp +kazuno.akita.jp +kitaakita.akita.jp +kosaka.akita.jp +kyowa.akita.jp +misato.akita.jp +mitane.akita.jp +moriyoshi.akita.jp +nikaho.akita.jp +noshiro.akita.jp +odate.akita.jp +oga.akita.jp +ogata.akita.jp +semboku.akita.jp +yokote.akita.jp +yurihonjo.akita.jp +aomori.aomori.jp +gonohe.aomori.jp +hachinohe.aomori.jp +hashikami.aomori.jp +hiranai.aomori.jp +hirosaki.aomori.jp +itayanagi.aomori.jp +kuroishi.aomori.jp +misawa.aomori.jp +mutsu.aomori.jp +nakadomari.aomori.jp +noheji.aomori.jp +oirase.aomori.jp +owani.aomori.jp +rokunohe.aomori.jp +sannohe.aomori.jp +shichinohe.aomori.jp +shingo.aomori.jp +takko.aomori.jp +towada.aomori.jp +tsugaru.aomori.jp +tsuruta.aomori.jp +abiko.chiba.jp +asahi.chiba.jp +chonan.chiba.jp +chosei.chiba.jp +choshi.chiba.jp +chuo.chiba.jp +funabashi.chiba.jp +futtsu.chiba.jp +hanamigawa.chiba.jp +ichihara.chiba.jp +ichikawa.chiba.jp +ichinomiya.chiba.jp +inzai.chiba.jp +isumi.chiba.jp +kamagaya.chiba.jp +kamogawa.chiba.jp +kashiwa.chiba.jp +katori.chiba.jp +katsuura.chiba.jp +kimitsu.chiba.jp +kisarazu.chiba.jp +kozaki.chiba.jp +kujukuri.chiba.jp +kyonan.chiba.jp +matsudo.chiba.jp +midori.chiba.jp +mihama.chiba.jp +minamiboso.chiba.jp +mobara.chiba.jp +mutsuzawa.chiba.jp +nagara.chiba.jp +nagareyama.chiba.jp +narashino.chiba.jp +narita.chiba.jp +noda.chiba.jp +oamishirasato.chiba.jp +omigawa.chiba.jp +onjuku.chiba.jp +otaki.chiba.jp +sakae.chiba.jp +sakura.chiba.jp +shimofusa.chiba.jp +shirako.chiba.jp +shiroi.chiba.jp +shisui.chiba.jp +sodegaura.chiba.jp +sosa.chiba.jp +tako.chiba.jp +tateyama.chiba.jp +togane.chiba.jp +tohnosho.chiba.jp +tomisato.chiba.jp +urayasu.chiba.jp +yachimata.chiba.jp +yachiyo.chiba.jp +yokaichiba.chiba.jp +yokoshibahikari.chiba.jp +yotsukaido.chiba.jp +ainan.ehime.jp +honai.ehime.jp +ikata.ehime.jp +imabari.ehime.jp +iyo.ehime.jp +kamijima.ehime.jp +kihoku.ehime.jp +kumakogen.ehime.jp +masaki.ehime.jp +matsuno.ehime.jp +matsuyama.ehime.jp +namikata.ehime.jp +niihama.ehime.jp +ozu.ehime.jp +saijo.ehime.jp +seiyo.ehime.jp +shikokuchuo.ehime.jp +tobe.ehime.jp +toon.ehime.jp +uchiko.ehime.jp +uwajima.ehime.jp +yawatahama.ehime.jp +echizen.fukui.jp +eiheiji.fukui.jp +fukui.fukui.jp +ikeda.fukui.jp +katsuyama.fukui.jp +mihama.fukui.jp +minamiechizen.fukui.jp +obama.fukui.jp +ohi.fukui.jp +ono.fukui.jp +sabae.fukui.jp +sakai.fukui.jp +takahama.fukui.jp +tsuruga.fukui.jp +wakasa.fukui.jp +ashiya.fukuoka.jp +buzen.fukuoka.jp +chikugo.fukuoka.jp +chikuho.fukuoka.jp +chikujo.fukuoka.jp +chikushino.fukuoka.jp +chikuzen.fukuoka.jp +chuo.fukuoka.jp +dazaifu.fukuoka.jp +fukuchi.fukuoka.jp +hakata.fukuoka.jp +higashi.fukuoka.jp +hirokawa.fukuoka.jp +hisayama.fukuoka.jp +iizuka.fukuoka.jp +inatsuki.fukuoka.jp +kaho.fukuoka.jp +kasuga.fukuoka.jp +kasuya.fukuoka.jp +kawara.fukuoka.jp +keisen.fukuoka.jp +koga.fukuoka.jp +kurate.fukuoka.jp +kurogi.fukuoka.jp +kurume.fukuoka.jp +minami.fukuoka.jp +miyako.fukuoka.jp +miyama.fukuoka.jp +miyawaka.fukuoka.jp +mizumaki.fukuoka.jp +munakata.fukuoka.jp +nakagawa.fukuoka.jp +nakama.fukuoka.jp +nishi.fukuoka.jp +nogata.fukuoka.jp +ogori.fukuoka.jp +okagaki.fukuoka.jp +okawa.fukuoka.jp +oki.fukuoka.jp +omuta.fukuoka.jp +onga.fukuoka.jp +onojo.fukuoka.jp +oto.fukuoka.jp +saigawa.fukuoka.jp +sasaguri.fukuoka.jp +shingu.fukuoka.jp +shinyoshitomi.fukuoka.jp +shonai.fukuoka.jp +soeda.fukuoka.jp +sue.fukuoka.jp +tachiarai.fukuoka.jp +tagawa.fukuoka.jp +takata.fukuoka.jp +toho.fukuoka.jp +toyotsu.fukuoka.jp +tsuiki.fukuoka.jp +ukiha.fukuoka.jp +umi.fukuoka.jp +usui.fukuoka.jp +yamada.fukuoka.jp +yame.fukuoka.jp +yanagawa.fukuoka.jp +yukuhashi.fukuoka.jp +aizubange.fukushima.jp +aizumisato.fukushima.jp +aizuwakamatsu.fukushima.jp +asakawa.fukushima.jp +bandai.fukushima.jp +date.fukushima.jp +fukushima.fukushima.jp +furudono.fukushima.jp +futaba.fukushima.jp +hanawa.fukushima.jp +higashi.fukushima.jp +hirata.fukushima.jp +hirono.fukushima.jp +iitate.fukushima.jp +inawashiro.fukushima.jp +ishikawa.fukushima.jp +iwaki.fukushima.jp +izumizaki.fukushima.jp +kagamiishi.fukushima.jp +kaneyama.fukushima.jp +kawamata.fukushima.jp +kitakata.fukushima.jp +kitashiobara.fukushima.jp +koori.fukushima.jp +koriyama.fukushima.jp +kunimi.fukushima.jp +miharu.fukushima.jp +mishima.fukushima.jp +namie.fukushima.jp +nango.fukushima.jp +nishiaizu.fukushima.jp +nishigo.fukushima.jp +okuma.fukushima.jp +omotego.fukushima.jp +ono.fukushima.jp +otama.fukushima.jp +samegawa.fukushima.jp +shimogo.fukushima.jp +shirakawa.fukushima.jp +showa.fukushima.jp +soma.fukushima.jp +sukagawa.fukushima.jp +taishin.fukushima.jp +tamakawa.fukushima.jp +tanagura.fukushima.jp +tenei.fukushima.jp +yabuki.fukushima.jp +yamato.fukushima.jp +yamatsuri.fukushima.jp +yanaizu.fukushima.jp +yugawa.fukushima.jp +anpachi.gifu.jp +ena.gifu.jp +gifu.gifu.jp +ginan.gifu.jp +godo.gifu.jp +gujo.gifu.jp +hashima.gifu.jp +hichiso.gifu.jp +hida.gifu.jp +higashishirakawa.gifu.jp +ibigawa.gifu.jp +ikeda.gifu.jp +kakamigahara.gifu.jp +kani.gifu.jp +kasahara.gifu.jp +kasamatsu.gifu.jp +kawaue.gifu.jp +kitagata.gifu.jp +mino.gifu.jp +minokamo.gifu.jp +mitake.gifu.jp +mizunami.gifu.jp +motosu.gifu.jp +nakatsugawa.gifu.jp +ogaki.gifu.jp +sakahogi.gifu.jp +seki.gifu.jp +sekigahara.gifu.jp +shirakawa.gifu.jp +tajimi.gifu.jp +takayama.gifu.jp +tarui.gifu.jp +toki.gifu.jp +tomika.gifu.jp +wanouchi.gifu.jp +yamagata.gifu.jp +yaotsu.gifu.jp +yoro.gifu.jp +annaka.gunma.jp +chiyoda.gunma.jp +fujioka.gunma.jp +higashiagatsuma.gunma.jp +isesaki.gunma.jp +itakura.gunma.jp +kanna.gunma.jp +kanra.gunma.jp +katashina.gunma.jp +kawaba.gunma.jp +kiryu.gunma.jp +kusatsu.gunma.jp +maebashi.gunma.jp +meiwa.gunma.jp +midori.gunma.jp +minakami.gunma.jp +naganohara.gunma.jp +nakanojo.gunma.jp +nanmoku.gunma.jp +numata.gunma.jp +oizumi.gunma.jp +ora.gunma.jp +ota.gunma.jp +shibukawa.gunma.jp +shimonita.gunma.jp +shinto.gunma.jp +showa.gunma.jp +takasaki.gunma.jp +takayama.gunma.jp +tamamura.gunma.jp +tatebayashi.gunma.jp +tomioka.gunma.jp +tsukiyono.gunma.jp +tsumagoi.gunma.jp +ueno.gunma.jp +yoshioka.gunma.jp +asaminami.hiroshima.jp +daiwa.hiroshima.jp +etajima.hiroshima.jp +fuchu.hiroshima.jp +fukuyama.hiroshima.jp +hatsukaichi.hiroshima.jp +higashihiroshima.hiroshima.jp +hongo.hiroshima.jp +jinsekikogen.hiroshima.jp +kaita.hiroshima.jp +kui.hiroshima.jp +kumano.hiroshima.jp +kure.hiroshima.jp +mihara.hiroshima.jp +miyoshi.hiroshima.jp +naka.hiroshima.jp +onomichi.hiroshima.jp +osakikamijima.hiroshima.jp +otake.hiroshima.jp +saka.hiroshima.jp +sera.hiroshima.jp +seranishi.hiroshima.jp +shinichi.hiroshima.jp +shobara.hiroshima.jp +takehara.hiroshima.jp +abashiri.hokkaido.jp +abira.hokkaido.jp +aibetsu.hokkaido.jp +akabira.hokkaido.jp +akkeshi.hokkaido.jp +asahikawa.hokkaido.jp +ashibetsu.hokkaido.jp +ashoro.hokkaido.jp +assabu.hokkaido.jp +atsuma.hokkaido.jp +bibai.hokkaido.jp +biei.hokkaido.jp +bifuka.hokkaido.jp +bihoro.hokkaido.jp +biratori.hokkaido.jp +chippubetsu.hokkaido.jp +chitose.hokkaido.jp +date.hokkaido.jp +ebetsu.hokkaido.jp +embetsu.hokkaido.jp +eniwa.hokkaido.jp +erimo.hokkaido.jp +esan.hokkaido.jp +esashi.hokkaido.jp +fukagawa.hokkaido.jp +fukushima.hokkaido.jp +furano.hokkaido.jp +furubira.hokkaido.jp +haboro.hokkaido.jp +hakodate.hokkaido.jp +hamatonbetsu.hokkaido.jp +hidaka.hokkaido.jp +higashikagura.hokkaido.jp +higashikawa.hokkaido.jp +hiroo.hokkaido.jp +hokuryu.hokkaido.jp +hokuto.hokkaido.jp +honbetsu.hokkaido.jp +horokanai.hokkaido.jp +horonobe.hokkaido.jp +ikeda.hokkaido.jp +imakane.hokkaido.jp +ishikari.hokkaido.jp +iwamizawa.hokkaido.jp +iwanai.hokkaido.jp +kamifurano.hokkaido.jp +kamikawa.hokkaido.jp +kamishihoro.hokkaido.jp +kamisunagawa.hokkaido.jp +kamoenai.hokkaido.jp +kayabe.hokkaido.jp +kembuchi.hokkaido.jp +kikonai.hokkaido.jp +kimobetsu.hokkaido.jp +kitahiroshima.hokkaido.jp +kitami.hokkaido.jp +kiyosato.hokkaido.jp +koshimizu.hokkaido.jp +kunneppu.hokkaido.jp +kuriyama.hokkaido.jp +kuromatsunai.hokkaido.jp +kushiro.hokkaido.jp +kutchan.hokkaido.jp +kyowa.hokkaido.jp +mashike.hokkaido.jp +matsumae.hokkaido.jp +mikasa.hokkaido.jp +minamifurano.hokkaido.jp +mombetsu.hokkaido.jp +moseushi.hokkaido.jp +mukawa.hokkaido.jp +muroran.hokkaido.jp +naie.hokkaido.jp +nakagawa.hokkaido.jp +nakasatsunai.hokkaido.jp +nakatombetsu.hokkaido.jp +nanae.hokkaido.jp +nanporo.hokkaido.jp +nayoro.hokkaido.jp +nemuro.hokkaido.jp +niikappu.hokkaido.jp +niki.hokkaido.jp +nishiokoppe.hokkaido.jp +noboribetsu.hokkaido.jp +numata.hokkaido.jp +obihiro.hokkaido.jp +obira.hokkaido.jp +oketo.hokkaido.jp +okoppe.hokkaido.jp +otaru.hokkaido.jp +otobe.hokkaido.jp +otofuke.hokkaido.jp +otoineppu.hokkaido.jp +oumu.hokkaido.jp +ozora.hokkaido.jp +pippu.hokkaido.jp +rankoshi.hokkaido.jp +rebun.hokkaido.jp +rikubetsu.hokkaido.jp +rishiri.hokkaido.jp +rishirifuji.hokkaido.jp +saroma.hokkaido.jp +sarufutsu.hokkaido.jp +shakotan.hokkaido.jp +shari.hokkaido.jp +shibecha.hokkaido.jp +shibetsu.hokkaido.jp +shikabe.hokkaido.jp +shikaoi.hokkaido.jp +shimamaki.hokkaido.jp +shimizu.hokkaido.jp +shimokawa.hokkaido.jp +shinshinotsu.hokkaido.jp +shintoku.hokkaido.jp +shiranuka.hokkaido.jp +shiraoi.hokkaido.jp +shiriuchi.hokkaido.jp +sobetsu.hokkaido.jp +sunagawa.hokkaido.jp +taiki.hokkaido.jp +takasu.hokkaido.jp +takikawa.hokkaido.jp +takinoue.hokkaido.jp +teshikaga.hokkaido.jp +tobetsu.hokkaido.jp +tohma.hokkaido.jp +tomakomai.hokkaido.jp +tomari.hokkaido.jp +toya.hokkaido.jp +toyako.hokkaido.jp +toyotomi.hokkaido.jp +toyoura.hokkaido.jp +tsubetsu.hokkaido.jp +tsukigata.hokkaido.jp +urakawa.hokkaido.jp +urausu.hokkaido.jp +uryu.hokkaido.jp +utashinai.hokkaido.jp +wakkanai.hokkaido.jp +wassamu.hokkaido.jp +yakumo.hokkaido.jp +yoichi.hokkaido.jp +aioi.hyogo.jp +akashi.hyogo.jp +ako.hyogo.jp +amagasaki.hyogo.jp +aogaki.hyogo.jp +asago.hyogo.jp +ashiya.hyogo.jp +awaji.hyogo.jp +fukusaki.hyogo.jp +goshiki.hyogo.jp +harima.hyogo.jp +himeji.hyogo.jp +ichikawa.hyogo.jp +inagawa.hyogo.jp +itami.hyogo.jp +kakogawa.hyogo.jp +kamigori.hyogo.jp +kamikawa.hyogo.jp +kasai.hyogo.jp +kasuga.hyogo.jp +kawanishi.hyogo.jp +miki.hyogo.jp +minamiawaji.hyogo.jp +nishinomiya.hyogo.jp +nishiwaki.hyogo.jp +ono.hyogo.jp +sanda.hyogo.jp +sannan.hyogo.jp +sasayama.hyogo.jp +sayo.hyogo.jp +shingu.hyogo.jp +shinonsen.hyogo.jp +shiso.hyogo.jp +sumoto.hyogo.jp +taishi.hyogo.jp +taka.hyogo.jp +takarazuka.hyogo.jp +takasago.hyogo.jp +takino.hyogo.jp +tamba.hyogo.jp +tatsuno.hyogo.jp +toyooka.hyogo.jp +yabu.hyogo.jp +yashiro.hyogo.jp +yoka.hyogo.jp +yokawa.hyogo.jp +ami.ibaraki.jp +asahi.ibaraki.jp +bando.ibaraki.jp +chikusei.ibaraki.jp +daigo.ibaraki.jp +fujishiro.ibaraki.jp +hitachi.ibaraki.jp +hitachinaka.ibaraki.jp +hitachiomiya.ibaraki.jp +hitachiota.ibaraki.jp +ibaraki.ibaraki.jp +ina.ibaraki.jp +inashiki.ibaraki.jp +itako.ibaraki.jp +iwama.ibaraki.jp +joso.ibaraki.jp +kamisu.ibaraki.jp +kasama.ibaraki.jp +kashima.ibaraki.jp +kasumigaura.ibaraki.jp +koga.ibaraki.jp +miho.ibaraki.jp +mito.ibaraki.jp +moriya.ibaraki.jp +naka.ibaraki.jp +namegata.ibaraki.jp +oarai.ibaraki.jp +ogawa.ibaraki.jp +omitama.ibaraki.jp +ryugasaki.ibaraki.jp +sakai.ibaraki.jp +sakuragawa.ibaraki.jp +shimodate.ibaraki.jp +shimotsuma.ibaraki.jp +shirosato.ibaraki.jp +sowa.ibaraki.jp +suifu.ibaraki.jp +takahagi.ibaraki.jp +tamatsukuri.ibaraki.jp +tokai.ibaraki.jp +tomobe.ibaraki.jp +tone.ibaraki.jp +toride.ibaraki.jp +tsuchiura.ibaraki.jp +tsukuba.ibaraki.jp +uchihara.ibaraki.jp +ushiku.ibaraki.jp +yachiyo.ibaraki.jp +yamagata.ibaraki.jp +yawara.ibaraki.jp +yuki.ibaraki.jp +anamizu.ishikawa.jp +hakui.ishikawa.jp +hakusan.ishikawa.jp +kaga.ishikawa.jp +kahoku.ishikawa.jp +kanazawa.ishikawa.jp +kawakita.ishikawa.jp +komatsu.ishikawa.jp +nakanoto.ishikawa.jp +nanao.ishikawa.jp +nomi.ishikawa.jp +nonoichi.ishikawa.jp +noto.ishikawa.jp +shika.ishikawa.jp +suzu.ishikawa.jp +tsubata.ishikawa.jp +tsurugi.ishikawa.jp +uchinada.ishikawa.jp +wajima.ishikawa.jp +fudai.iwate.jp +fujisawa.iwate.jp +hanamaki.iwate.jp +hiraizumi.iwate.jp +hirono.iwate.jp +ichinohe.iwate.jp +ichinoseki.iwate.jp +iwaizumi.iwate.jp +iwate.iwate.jp +joboji.iwate.jp +kamaishi.iwate.jp +kanegasaki.iwate.jp +karumai.iwate.jp +kawai.iwate.jp +kitakami.iwate.jp +kuji.iwate.jp +kunohe.iwate.jp +kuzumaki.iwate.jp +miyako.iwate.jp +mizusawa.iwate.jp +morioka.iwate.jp +ninohe.iwate.jp +noda.iwate.jp +ofunato.iwate.jp +oshu.iwate.jp +otsuchi.iwate.jp +rikuzentakata.iwate.jp +shiwa.iwate.jp +shizukuishi.iwate.jp +sumita.iwate.jp +tanohata.iwate.jp +tono.iwate.jp +yahaba.iwate.jp +yamada.iwate.jp +ayagawa.kagawa.jp +higashikagawa.kagawa.jp +kanonji.kagawa.jp +kotohira.kagawa.jp +manno.kagawa.jp +marugame.kagawa.jp +mitoyo.kagawa.jp +naoshima.kagawa.jp +sanuki.kagawa.jp +tadotsu.kagawa.jp +takamatsu.kagawa.jp +tonosho.kagawa.jp +uchinomi.kagawa.jp +utazu.kagawa.jp +zentsuji.kagawa.jp +akune.kagoshima.jp +amami.kagoshima.jp +hioki.kagoshima.jp +isa.kagoshima.jp +isen.kagoshima.jp +izumi.kagoshima.jp +kagoshima.kagoshima.jp +kanoya.kagoshima.jp +kawanabe.kagoshima.jp +kinko.kagoshima.jp +kouyama.kagoshima.jp +makurazaki.kagoshima.jp +matsumoto.kagoshima.jp +minamitane.kagoshima.jp +nakatane.kagoshima.jp +nishinoomote.kagoshima.jp +satsumasendai.kagoshima.jp +soo.kagoshima.jp +tarumizu.kagoshima.jp +yusui.kagoshima.jp +aikawa.kanagawa.jp +atsugi.kanagawa.jp +ayase.kanagawa.jp +chigasaki.kanagawa.jp +ebina.kanagawa.jp +fujisawa.kanagawa.jp +hadano.kanagawa.jp +hakone.kanagawa.jp +hiratsuka.kanagawa.jp +isehara.kanagawa.jp +kaisei.kanagawa.jp +kamakura.kanagawa.jp +kiyokawa.kanagawa.jp +matsuda.kanagawa.jp +minamiashigara.kanagawa.jp +miura.kanagawa.jp +nakai.kanagawa.jp +ninomiya.kanagawa.jp +odawara.kanagawa.jp +oi.kanagawa.jp +oiso.kanagawa.jp +sagamihara.kanagawa.jp +samukawa.kanagawa.jp +tsukui.kanagawa.jp +yamakita.kanagawa.jp +yamato.kanagawa.jp +yokosuka.kanagawa.jp +yugawara.kanagawa.jp +zama.kanagawa.jp +zushi.kanagawa.jp +aki.kochi.jp +geisei.kochi.jp +hidaka.kochi.jp +higashitsuno.kochi.jp +ino.kochi.jp +kagami.kochi.jp +kami.kochi.jp +kitagawa.kochi.jp +kochi.kochi.jp +mihara.kochi.jp +motoyama.kochi.jp +muroto.kochi.jp +nahari.kochi.jp +nakamura.kochi.jp +nankoku.kochi.jp +nishitosa.kochi.jp +niyodogawa.kochi.jp +ochi.kochi.jp +okawa.kochi.jp +otoyo.kochi.jp +otsuki.kochi.jp +sakawa.kochi.jp +sukumo.kochi.jp +susaki.kochi.jp +tosa.kochi.jp +tosashimizu.kochi.jp +toyo.kochi.jp +tsuno.kochi.jp +umaji.kochi.jp +yasuda.kochi.jp +yusuhara.kochi.jp +amakusa.kumamoto.jp +arao.kumamoto.jp +aso.kumamoto.jp +choyo.kumamoto.jp +gyokuto.kumamoto.jp +kamiamakusa.kumamoto.jp +kikuchi.kumamoto.jp +kumamoto.kumamoto.jp +mashiki.kumamoto.jp +mifune.kumamoto.jp +minamata.kumamoto.jp +minamioguni.kumamoto.jp +nagasu.kumamoto.jp +nishihara.kumamoto.jp +oguni.kumamoto.jp +ozu.kumamoto.jp +sumoto.kumamoto.jp +takamori.kumamoto.jp +uki.kumamoto.jp +uto.kumamoto.jp +yamaga.kumamoto.jp +yamato.kumamoto.jp +yatsushiro.kumamoto.jp +ayabe.kyoto.jp +fukuchiyama.kyoto.jp +higashiyama.kyoto.jp +ide.kyoto.jp +ine.kyoto.jp +joyo.kyoto.jp +kameoka.kyoto.jp +kamo.kyoto.jp +kita.kyoto.jp +kizu.kyoto.jp +kumiyama.kyoto.jp +kyotamba.kyoto.jp +kyotanabe.kyoto.jp +kyotango.kyoto.jp +maizuru.kyoto.jp +minami.kyoto.jp +minamiyamashiro.kyoto.jp +miyazu.kyoto.jp +muko.kyoto.jp +nagaokakyo.kyoto.jp +nakagyo.kyoto.jp +nantan.kyoto.jp +oyamazaki.kyoto.jp +sakyo.kyoto.jp +seika.kyoto.jp +tanabe.kyoto.jp +uji.kyoto.jp +ujitawara.kyoto.jp +wazuka.kyoto.jp +yamashina.kyoto.jp +yawata.kyoto.jp +asahi.mie.jp +inabe.mie.jp +ise.mie.jp +kameyama.mie.jp +kawagoe.mie.jp +kiho.mie.jp +kisosaki.mie.jp +kiwa.mie.jp +komono.mie.jp +kumano.mie.jp +kuwana.mie.jp +matsusaka.mie.jp +meiwa.mie.jp +mihama.mie.jp +minamiise.mie.jp +misugi.mie.jp +miyama.mie.jp +nabari.mie.jp +shima.mie.jp +suzuka.mie.jp +tado.mie.jp +taiki.mie.jp +taki.mie.jp +tamaki.mie.jp +toba.mie.jp +tsu.mie.jp +udono.mie.jp +ureshino.mie.jp +watarai.mie.jp +yokkaichi.mie.jp +furukawa.miyagi.jp +higashimatsushima.miyagi.jp +ishinomaki.miyagi.jp +iwanuma.miyagi.jp +kakuda.miyagi.jp +kami.miyagi.jp +kawasaki.miyagi.jp +marumori.miyagi.jp +matsushima.miyagi.jp +minamisanriku.miyagi.jp +misato.miyagi.jp +murata.miyagi.jp +natori.miyagi.jp +ogawara.miyagi.jp +ohira.miyagi.jp +onagawa.miyagi.jp +osaki.miyagi.jp +rifu.miyagi.jp +semine.miyagi.jp +shibata.miyagi.jp +shichikashuku.miyagi.jp +shikama.miyagi.jp +shiogama.miyagi.jp +shiroishi.miyagi.jp +tagajo.miyagi.jp +taiwa.miyagi.jp +tome.miyagi.jp +tomiya.miyagi.jp +wakuya.miyagi.jp +watari.miyagi.jp +yamamoto.miyagi.jp +zao.miyagi.jp +aya.miyazaki.jp +ebino.miyazaki.jp +gokase.miyazaki.jp +hyuga.miyazaki.jp +kadogawa.miyazaki.jp +kawaminami.miyazaki.jp +kijo.miyazaki.jp +kitagawa.miyazaki.jp +kitakata.miyazaki.jp +kitaura.miyazaki.jp +kobayashi.miyazaki.jp +kunitomi.miyazaki.jp +kushima.miyazaki.jp +mimata.miyazaki.jp +miyakonojo.miyazaki.jp +miyazaki.miyazaki.jp +morotsuka.miyazaki.jp +nichinan.miyazaki.jp +nishimera.miyazaki.jp +nobeoka.miyazaki.jp +saito.miyazaki.jp +shiiba.miyazaki.jp +shintomi.miyazaki.jp +takaharu.miyazaki.jp +takanabe.miyazaki.jp +takazaki.miyazaki.jp +tsuno.miyazaki.jp +achi.nagano.jp +agematsu.nagano.jp +anan.nagano.jp +aoki.nagano.jp +asahi.nagano.jp +azumino.nagano.jp +chikuhoku.nagano.jp +chikuma.nagano.jp +chino.nagano.jp +fujimi.nagano.jp +hakuba.nagano.jp +hara.nagano.jp +hiraya.nagano.jp +iida.nagano.jp +iijima.nagano.jp +iiyama.nagano.jp +iizuna.nagano.jp +ikeda.nagano.jp +ikusaka.nagano.jp +ina.nagano.jp +karuizawa.nagano.jp +kawakami.nagano.jp +kiso.nagano.jp +kisofukushima.nagano.jp +kitaaiki.nagano.jp +komagane.nagano.jp +komoro.nagano.jp +matsukawa.nagano.jp +matsumoto.nagano.jp +miasa.nagano.jp +minamiaiki.nagano.jp +minamimaki.nagano.jp +minamiminowa.nagano.jp +minowa.nagano.jp +miyada.nagano.jp +miyota.nagano.jp +mochizuki.nagano.jp +nagano.nagano.jp +nagawa.nagano.jp +nagiso.nagano.jp +nakagawa.nagano.jp +nakano.nagano.jp +nozawaonsen.nagano.jp +obuse.nagano.jp +ogawa.nagano.jp +okaya.nagano.jp +omachi.nagano.jp +omi.nagano.jp +ookuwa.nagano.jp +ooshika.nagano.jp +otaki.nagano.jp +otari.nagano.jp +sakae.nagano.jp +sakaki.nagano.jp +saku.nagano.jp +sakuho.nagano.jp +shimosuwa.nagano.jp +shinanomachi.nagano.jp +shiojiri.nagano.jp +suwa.nagano.jp +suzaka.nagano.jp +takagi.nagano.jp +takamori.nagano.jp +takayama.nagano.jp +tateshina.nagano.jp +tatsuno.nagano.jp +togakushi.nagano.jp +togura.nagano.jp +tomi.nagano.jp +ueda.nagano.jp +wada.nagano.jp +yamagata.nagano.jp +yamanouchi.nagano.jp +yasaka.nagano.jp +yasuoka.nagano.jp +chijiwa.nagasaki.jp +futsu.nagasaki.jp +goto.nagasaki.jp +hasami.nagasaki.jp +hirado.nagasaki.jp +iki.nagasaki.jp +isahaya.nagasaki.jp +kawatana.nagasaki.jp +kuchinotsu.nagasaki.jp +matsuura.nagasaki.jp +nagasaki.nagasaki.jp +obama.nagasaki.jp +omura.nagasaki.jp +oseto.nagasaki.jp +saikai.nagasaki.jp +sasebo.nagasaki.jp +seihi.nagasaki.jp +shimabara.nagasaki.jp +shinkamigoto.nagasaki.jp +togitsu.nagasaki.jp +tsushima.nagasaki.jp +unzen.nagasaki.jp +ando.nara.jp +gose.nara.jp +heguri.nara.jp +higashiyoshino.nara.jp +ikaruga.nara.jp +ikoma.nara.jp +kamikitayama.nara.jp +kanmaki.nara.jp +kashiba.nara.jp +kashihara.nara.jp +katsuragi.nara.jp +kawai.nara.jp +kawakami.nara.jp +kawanishi.nara.jp +koryo.nara.jp +kurotaki.nara.jp +mitsue.nara.jp +miyake.nara.jp +nara.nara.jp +nosegawa.nara.jp +oji.nara.jp +ouda.nara.jp +oyodo.nara.jp +sakurai.nara.jp +sango.nara.jp +shimoichi.nara.jp +shimokitayama.nara.jp +shinjo.nara.jp +soni.nara.jp +takatori.nara.jp +tawaramoto.nara.jp +tenkawa.nara.jp +tenri.nara.jp +uda.nara.jp +yamatokoriyama.nara.jp +yamatotakada.nara.jp +yamazoe.nara.jp +yoshino.nara.jp +aga.niigata.jp +agano.niigata.jp +gosen.niigata.jp +itoigawa.niigata.jp +izumozaki.niigata.jp +joetsu.niigata.jp +kamo.niigata.jp +kariwa.niigata.jp +kashiwazaki.niigata.jp +minamiuonuma.niigata.jp +mitsuke.niigata.jp +muika.niigata.jp +murakami.niigata.jp +myoko.niigata.jp +nagaoka.niigata.jp +niigata.niigata.jp +ojiya.niigata.jp +omi.niigata.jp +sado.niigata.jp +sanjo.niigata.jp +seiro.niigata.jp +seirou.niigata.jp +sekikawa.niigata.jp +shibata.niigata.jp +tagami.niigata.jp +tainai.niigata.jp +tochio.niigata.jp +tokamachi.niigata.jp +tsubame.niigata.jp +tsunan.niigata.jp +uonuma.niigata.jp +yahiko.niigata.jp +yoita.niigata.jp +yuzawa.niigata.jp +beppu.oita.jp +bungoono.oita.jp +bungotakada.oita.jp +hasama.oita.jp +hiji.oita.jp +himeshima.oita.jp +hita.oita.jp +kamitsue.oita.jp +kokonoe.oita.jp +kuju.oita.jp +kunisaki.oita.jp +kusu.oita.jp +oita.oita.jp +saiki.oita.jp +taketa.oita.jp +tsukumi.oita.jp +usa.oita.jp +usuki.oita.jp +yufu.oita.jp +akaiwa.okayama.jp +asakuchi.okayama.jp +bizen.okayama.jp +hayashima.okayama.jp +ibara.okayama.jp +kagamino.okayama.jp +kasaoka.okayama.jp +kibichuo.okayama.jp +kumenan.okayama.jp +kurashiki.okayama.jp +maniwa.okayama.jp +misaki.okayama.jp +nagi.okayama.jp +niimi.okayama.jp +nishiawakura.okayama.jp +okayama.okayama.jp +satosho.okayama.jp +setouchi.okayama.jp +shinjo.okayama.jp +shoo.okayama.jp +soja.okayama.jp +takahashi.okayama.jp +tamano.okayama.jp +tsuyama.okayama.jp +wake.okayama.jp +yakage.okayama.jp +aguni.okinawa.jp +ginowan.okinawa.jp +ginoza.okinawa.jp +gushikami.okinawa.jp +haebaru.okinawa.jp +higashi.okinawa.jp +hirara.okinawa.jp +iheya.okinawa.jp +ishigaki.okinawa.jp +ishikawa.okinawa.jp +itoman.okinawa.jp +izena.okinawa.jp +kadena.okinawa.jp +kin.okinawa.jp +kitadaito.okinawa.jp +kitanakagusuku.okinawa.jp +kumejima.okinawa.jp +kunigami.okinawa.jp +minamidaito.okinawa.jp +motobu.okinawa.jp +nago.okinawa.jp +naha.okinawa.jp +nakagusuku.okinawa.jp +nakijin.okinawa.jp +nanjo.okinawa.jp +nishihara.okinawa.jp +ogimi.okinawa.jp +okinawa.okinawa.jp +onna.okinawa.jp +shimoji.okinawa.jp +taketomi.okinawa.jp +tarama.okinawa.jp +tokashiki.okinawa.jp +tomigusuku.okinawa.jp +tonaki.okinawa.jp +urasoe.okinawa.jp +uruma.okinawa.jp +yaese.okinawa.jp +yomitan.okinawa.jp +yonabaru.okinawa.jp +yonaguni.okinawa.jp +zamami.okinawa.jp +abeno.osaka.jp +chihayaakasaka.osaka.jp +chuo.osaka.jp +daito.osaka.jp +fujiidera.osaka.jp +habikino.osaka.jp +hannan.osaka.jp +higashiosaka.osaka.jp +higashisumiyoshi.osaka.jp +higashiyodogawa.osaka.jp +hirakata.osaka.jp +ibaraki.osaka.jp +ikeda.osaka.jp +izumi.osaka.jp +izumiotsu.osaka.jp +izumisano.osaka.jp +kadoma.osaka.jp +kaizuka.osaka.jp +kanan.osaka.jp +kashiwara.osaka.jp +katano.osaka.jp +kawachinagano.osaka.jp +kishiwada.osaka.jp +kita.osaka.jp +kumatori.osaka.jp +matsubara.osaka.jp +minato.osaka.jp +minoh.osaka.jp +misaki.osaka.jp +moriguchi.osaka.jp +neyagawa.osaka.jp +nishi.osaka.jp +nose.osaka.jp +osakasayama.osaka.jp +sakai.osaka.jp +sayama.osaka.jp +sennan.osaka.jp +settsu.osaka.jp +shijonawate.osaka.jp +shimamoto.osaka.jp +suita.osaka.jp +tadaoka.osaka.jp +taishi.osaka.jp +tajiri.osaka.jp +takaishi.osaka.jp +takatsuki.osaka.jp +tondabayashi.osaka.jp +toyonaka.osaka.jp +toyono.osaka.jp +yao.osaka.jp +ariake.saga.jp +arita.saga.jp +fukudomi.saga.jp +genkai.saga.jp +hamatama.saga.jp +hizen.saga.jp +imari.saga.jp +kamimine.saga.jp +kanzaki.saga.jp +karatsu.saga.jp +kashima.saga.jp +kitagata.saga.jp +kitahata.saga.jp +kiyama.saga.jp +kouhoku.saga.jp +kyuragi.saga.jp +nishiarita.saga.jp +ogi.saga.jp +omachi.saga.jp +ouchi.saga.jp +saga.saga.jp +shiroishi.saga.jp +taku.saga.jp +tara.saga.jp +tosu.saga.jp +yoshinogari.saga.jp +arakawa.saitama.jp +asaka.saitama.jp +chichibu.saitama.jp +fujimi.saitama.jp +fujimino.saitama.jp +fukaya.saitama.jp +hanno.saitama.jp +hanyu.saitama.jp +hasuda.saitama.jp +hatogaya.saitama.jp +hatoyama.saitama.jp +hidaka.saitama.jp +higashichichibu.saitama.jp +higashimatsuyama.saitama.jp +honjo.saitama.jp +ina.saitama.jp +iruma.saitama.jp +iwatsuki.saitama.jp +kamiizumi.saitama.jp +kamikawa.saitama.jp +kamisato.saitama.jp +kasukabe.saitama.jp +kawagoe.saitama.jp +kawaguchi.saitama.jp +kawajima.saitama.jp +kazo.saitama.jp +kitamoto.saitama.jp +koshigaya.saitama.jp +kounosu.saitama.jp +kuki.saitama.jp +kumagaya.saitama.jp +matsubushi.saitama.jp +minano.saitama.jp +misato.saitama.jp +miyashiro.saitama.jp +miyoshi.saitama.jp +moroyama.saitama.jp +nagatoro.saitama.jp +namegawa.saitama.jp +niiza.saitama.jp +ogano.saitama.jp +ogawa.saitama.jp +ogose.saitama.jp +okegawa.saitama.jp +omiya.saitama.jp +otaki.saitama.jp +ranzan.saitama.jp +ryokami.saitama.jp +saitama.saitama.jp +sakado.saitama.jp +satte.saitama.jp +sayama.saitama.jp +shiki.saitama.jp +shiraoka.saitama.jp +soka.saitama.jp +sugito.saitama.jp +toda.saitama.jp +tokigawa.saitama.jp +tokorozawa.saitama.jp +tsurugashima.saitama.jp +urawa.saitama.jp +warabi.saitama.jp +yashio.saitama.jp +yokoze.saitama.jp +yono.saitama.jp +yorii.saitama.jp +yoshida.saitama.jp +yoshikawa.saitama.jp +yoshimi.saitama.jp +aisho.shiga.jp +gamo.shiga.jp +higashiomi.shiga.jp +hikone.shiga.jp +koka.shiga.jp +konan.shiga.jp +kosei.shiga.jp +koto.shiga.jp +kusatsu.shiga.jp +maibara.shiga.jp +moriyama.shiga.jp +nagahama.shiga.jp +nishiazai.shiga.jp +notogawa.shiga.jp +omihachiman.shiga.jp +otsu.shiga.jp +ritto.shiga.jp +ryuoh.shiga.jp +takashima.shiga.jp +takatsuki.shiga.jp +torahime.shiga.jp +toyosato.shiga.jp +yasu.shiga.jp +akagi.shimane.jp +ama.shimane.jp +gotsu.shimane.jp +hamada.shimane.jp +higashiizumo.shimane.jp +hikawa.shimane.jp +hikimi.shimane.jp +izumo.shimane.jp +kakinoki.shimane.jp +masuda.shimane.jp +matsue.shimane.jp +misato.shimane.jp +nishinoshima.shimane.jp +ohda.shimane.jp +okinoshima.shimane.jp +okuizumo.shimane.jp +shimane.shimane.jp +tamayu.shimane.jp +tsuwano.shimane.jp +unnan.shimane.jp +yakumo.shimane.jp +yasugi.shimane.jp +yatsuka.shimane.jp +arai.shizuoka.jp +atami.shizuoka.jp +fuji.shizuoka.jp +fujieda.shizuoka.jp +fujikawa.shizuoka.jp +fujinomiya.shizuoka.jp +fukuroi.shizuoka.jp +gotemba.shizuoka.jp +haibara.shizuoka.jp +hamamatsu.shizuoka.jp +higashiizu.shizuoka.jp +ito.shizuoka.jp +iwata.shizuoka.jp +izu.shizuoka.jp +izunokuni.shizuoka.jp +kakegawa.shizuoka.jp +kannami.shizuoka.jp +kawanehon.shizuoka.jp +kawazu.shizuoka.jp +kikugawa.shizuoka.jp +kosai.shizuoka.jp +makinohara.shizuoka.jp +matsuzaki.shizuoka.jp +minamiizu.shizuoka.jp +mishima.shizuoka.jp +morimachi.shizuoka.jp +nishiizu.shizuoka.jp +numazu.shizuoka.jp +omaezaki.shizuoka.jp +shimada.shizuoka.jp +shimizu.shizuoka.jp +shimoda.shizuoka.jp +shizuoka.shizuoka.jp +susono.shizuoka.jp +yaizu.shizuoka.jp +yoshida.shizuoka.jp +ashikaga.tochigi.jp +bato.tochigi.jp +haga.tochigi.jp +ichikai.tochigi.jp +iwafune.tochigi.jp +kaminokawa.tochigi.jp +kanuma.tochigi.jp +karasuyama.tochigi.jp +kuroiso.tochigi.jp +mashiko.tochigi.jp +mibu.tochigi.jp +moka.tochigi.jp +motegi.tochigi.jp +nasu.tochigi.jp +nasushiobara.tochigi.jp +nikko.tochigi.jp +nishikata.tochigi.jp +nogi.tochigi.jp +ohira.tochigi.jp +ohtawara.tochigi.jp +oyama.tochigi.jp +sakura.tochigi.jp +sano.tochigi.jp +shimotsuke.tochigi.jp +shioya.tochigi.jp +takanezawa.tochigi.jp +tochigi.tochigi.jp +tsuga.tochigi.jp +ujiie.tochigi.jp +utsunomiya.tochigi.jp +yaita.tochigi.jp +aizumi.tokushima.jp +anan.tokushima.jp +ichiba.tokushima.jp +itano.tokushima.jp +kainan.tokushima.jp +komatsushima.tokushima.jp +matsushige.tokushima.jp +mima.tokushima.jp +minami.tokushima.jp +miyoshi.tokushima.jp +mugi.tokushima.jp +nakagawa.tokushima.jp +naruto.tokushima.jp +sanagochi.tokushima.jp +shishikui.tokushima.jp +tokushima.tokushima.jp +wajiki.tokushima.jp +adachi.tokyo.jp +akiruno.tokyo.jp +akishima.tokyo.jp +aogashima.tokyo.jp +arakawa.tokyo.jp +bunkyo.tokyo.jp +chiyoda.tokyo.jp +chofu.tokyo.jp +chuo.tokyo.jp +edogawa.tokyo.jp +fuchu.tokyo.jp +fussa.tokyo.jp +hachijo.tokyo.jp +hachioji.tokyo.jp +hamura.tokyo.jp +higashikurume.tokyo.jp +higashimurayama.tokyo.jp +higashiyamato.tokyo.jp +hino.tokyo.jp +hinode.tokyo.jp +hinohara.tokyo.jp +inagi.tokyo.jp +itabashi.tokyo.jp +katsushika.tokyo.jp +kita.tokyo.jp +kiyose.tokyo.jp +kodaira.tokyo.jp +koganei.tokyo.jp +kokubunji.tokyo.jp +komae.tokyo.jp +koto.tokyo.jp +kouzushima.tokyo.jp +kunitachi.tokyo.jp +machida.tokyo.jp +meguro.tokyo.jp +minato.tokyo.jp +mitaka.tokyo.jp +mizuho.tokyo.jp +musashimurayama.tokyo.jp +musashino.tokyo.jp +nakano.tokyo.jp +nerima.tokyo.jp +ogasawara.tokyo.jp +okutama.tokyo.jp +ome.tokyo.jp +oshima.tokyo.jp +ota.tokyo.jp +setagaya.tokyo.jp +shibuya.tokyo.jp +shinagawa.tokyo.jp +shinjuku.tokyo.jp +suginami.tokyo.jp +sumida.tokyo.jp +tachikawa.tokyo.jp +taito.tokyo.jp +tama.tokyo.jp +toshima.tokyo.jp +chizu.tottori.jp +hino.tottori.jp +kawahara.tottori.jp +koge.tottori.jp +kotoura.tottori.jp +misasa.tottori.jp +nanbu.tottori.jp +nichinan.tottori.jp +sakaiminato.tottori.jp +tottori.tottori.jp +wakasa.tottori.jp +yazu.tottori.jp +yonago.tottori.jp +asahi.toyama.jp +fuchu.toyama.jp +fukumitsu.toyama.jp +funahashi.toyama.jp +himi.toyama.jp +imizu.toyama.jp +inami.toyama.jp +johana.toyama.jp +kamiichi.toyama.jp +kurobe.toyama.jp +nakaniikawa.toyama.jp +namerikawa.toyama.jp +nanto.toyama.jp +nyuzen.toyama.jp +oyabe.toyama.jp +taira.toyama.jp +takaoka.toyama.jp +tateyama.toyama.jp +toga.toyama.jp +tonami.toyama.jp +toyama.toyama.jp +unazuki.toyama.jp +uozu.toyama.jp +yamada.toyama.jp +arida.wakayama.jp +aridagawa.wakayama.jp +gobo.wakayama.jp +hashimoto.wakayama.jp +hidaka.wakayama.jp +hirogawa.wakayama.jp +inami.wakayama.jp +iwade.wakayama.jp +kainan.wakayama.jp +kamitonda.wakayama.jp +katsuragi.wakayama.jp +kimino.wakayama.jp +kinokawa.wakayama.jp +kitayama.wakayama.jp +koya.wakayama.jp +koza.wakayama.jp +kozagawa.wakayama.jp +kudoyama.wakayama.jp +kushimoto.wakayama.jp +mihama.wakayama.jp +misato.wakayama.jp +nachikatsuura.wakayama.jp +shingu.wakayama.jp +shirahama.wakayama.jp +taiji.wakayama.jp +tanabe.wakayama.jp +wakayama.wakayama.jp +yuasa.wakayama.jp +yura.wakayama.jp +asahi.yamagata.jp +funagata.yamagata.jp +higashine.yamagata.jp +iide.yamagata.jp +kahoku.yamagata.jp +kaminoyama.yamagata.jp +kaneyama.yamagata.jp +kawanishi.yamagata.jp +mamurogawa.yamagata.jp +mikawa.yamagata.jp +murayama.yamagata.jp +nagai.yamagata.jp +nakayama.yamagata.jp +nanyo.yamagata.jp +nishikawa.yamagata.jp +obanazawa.yamagata.jp +oe.yamagata.jp +oguni.yamagata.jp +ohkura.yamagata.jp +oishida.yamagata.jp +sagae.yamagata.jp +sakata.yamagata.jp +sakegawa.yamagata.jp +shinjo.yamagata.jp +shirataka.yamagata.jp +shonai.yamagata.jp +takahata.yamagata.jp +tendo.yamagata.jp +tozawa.yamagata.jp +tsuruoka.yamagata.jp +yamagata.yamagata.jp +yamanobe.yamagata.jp +yonezawa.yamagata.jp +yuza.yamagata.jp +abu.yamaguchi.jp +hagi.yamaguchi.jp +hikari.yamaguchi.jp +hofu.yamaguchi.jp +iwakuni.yamaguchi.jp +kudamatsu.yamaguchi.jp +mitou.yamaguchi.jp +nagato.yamaguchi.jp +oshima.yamaguchi.jp +shimonoseki.yamaguchi.jp +shunan.yamaguchi.jp +tabuse.yamaguchi.jp +tokuyama.yamaguchi.jp +toyota.yamaguchi.jp +ube.yamaguchi.jp +yuu.yamaguchi.jp +chuo.yamanashi.jp +doshi.yamanashi.jp +fuefuki.yamanashi.jp +fujikawa.yamanashi.jp +fujikawaguchiko.yamanashi.jp +fujiyoshida.yamanashi.jp +hayakawa.yamanashi.jp +hokuto.yamanashi.jp +ichikawamisato.yamanashi.jp +kai.yamanashi.jp +kofu.yamanashi.jp +koshu.yamanashi.jp +kosuge.yamanashi.jp +minami-alps.yamanashi.jp +minobu.yamanashi.jp +nakamichi.yamanashi.jp +nanbu.yamanashi.jp +narusawa.yamanashi.jp +nirasaki.yamanashi.jp +nishikatsura.yamanashi.jp +oshino.yamanashi.jp +otsuki.yamanashi.jp +showa.yamanashi.jp +tabayama.yamanashi.jp +tsuru.yamanashi.jp +uenohara.yamanashi.jp +yamanakako.yamanashi.jp +yamanashi.yamanashi.jp + +// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 +*.ke + +// kg : http://www.domain.kg/dmn_n.html +kg +org.kg +net.kg +com.kg +edu.kg +gov.kg +mil.kg + +// kh : http://www.mptc.gov.kh/dns_registration.htm +*.kh + +// ki : http://www.ki/dns/index.html +ki +edu.ki +biz.ki +net.ki +org.ki +gov.ki +info.ki +com.ki + +// km : https://en.wikipedia.org/wiki/.km +// http://www.domaine.km/documents/charte.doc +km +org.km +nom.km +gov.km +prd.km +tm.km +edu.km +mil.km +ass.km +com.km +// These are only mentioned as proposed suggestions at domaine.km, but +// https://en.wikipedia.org/wiki/.km says they're available for registration: +coop.km +asso.km +presse.km +medecin.km +notaires.km +pharmaciens.km +veterinaire.km +gouv.km + +// kn : https://en.wikipedia.org/wiki/.kn +// http://www.dot.kn/domainRules.html +kn +net.kn +org.kn +edu.kn +gov.kn + +// kp : http://www.kcce.kp/en_index.php +kp +com.kp +edu.kp +gov.kp +org.kp +rep.kp +tra.kp + +// kr : https://en.wikipedia.org/wiki/.kr +// see also: http://domain.nida.or.kr/eng/registration.jsp +kr +ac.kr +co.kr +es.kr +go.kr +hs.kr +kg.kr +mil.kr +ms.kr +ne.kr +or.kr +pe.kr +re.kr +sc.kr +// kr geographical names +busan.kr +chungbuk.kr +chungnam.kr +daegu.kr +daejeon.kr +gangwon.kr +gwangju.kr +gyeongbuk.kr +gyeonggi.kr +gyeongnam.kr +incheon.kr +jeju.kr +jeonbuk.kr +jeonnam.kr +seoul.kr +ulsan.kr + +// kw : https://en.wikipedia.org/wiki/.kw +*.kw + +// ky : http://www.icta.ky/da_ky_reg_dom.php +// Confirmed by registry 2008-06-17 +ky +edu.ky +gov.ky +com.ky +org.ky +net.ky + +// kz : https://en.wikipedia.org/wiki/.kz +// see also: http://www.nic.kz/rules/index.jsp +kz +org.kz +edu.kz +net.kz +gov.kz +mil.kz +com.kz + +// la : https://en.wikipedia.org/wiki/.la +// Submitted by registry +la +int.la +net.la +info.la +edu.la +gov.la +per.la +com.la +org.la + +// lb : https://en.wikipedia.org/wiki/.lb +// Submitted by registry +lb +com.lb +edu.lb +gov.lb +net.lb +org.lb + +// lc : https://en.wikipedia.org/wiki/.lc +// see also: http://www.nic.lc/rules.htm +lc +com.lc +net.lc +co.lc +org.lc +edu.lc +gov.lc + +// li : https://en.wikipedia.org/wiki/.li +li + +// lk : http://www.nic.lk/seclevpr.html +lk +gov.lk +sch.lk +net.lk +int.lk +com.lk +org.lk +edu.lk +ngo.lk +soc.lk +web.lk +ltd.lk +assn.lk +grp.lk +hotel.lk +ac.lk + +// lr : http://psg.com/dns/lr/lr.txt +// Submitted by registry +lr +com.lr +edu.lr +gov.lr +org.lr +net.lr + +// ls : https://en.wikipedia.org/wiki/.ls +ls +co.ls +org.ls + +// lt : https://en.wikipedia.org/wiki/.lt +lt +// gov.lt : http://www.gov.lt/index_en.php +gov.lt + +// lu : http://www.dns.lu/en/ +lu + +// lv : http://www.nic.lv/DNS/En/generic.php +lv +com.lv +edu.lv +gov.lv +org.lv +mil.lv +id.lv +net.lv +asn.lv +conf.lv + +// ly : http://www.nic.ly/regulations.php +ly +com.ly +net.ly +gov.ly +plc.ly +edu.ly +sch.ly +med.ly +org.ly +id.ly + +// ma : https://en.wikipedia.org/wiki/.ma +// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf +ma +co.ma +net.ma +gov.ma +org.ma +ac.ma +press.ma + +// mc : http://www.nic.mc/ +mc +tm.mc +asso.mc + +// md : https://en.wikipedia.org/wiki/.md +md + +// me : https://en.wikipedia.org/wiki/.me +me +co.me +net.me +org.me +edu.me +ac.me +gov.me +its.me +priv.me + +// mg : http://nic.mg/nicmg/?page_id=39 +mg +org.mg +nom.mg +gov.mg +prd.mg +tm.mg +edu.mg +mil.mg +com.mg +co.mg + +// mh : https://en.wikipedia.org/wiki/.mh +mh + +// mil : https://en.wikipedia.org/wiki/.mil +mil + +// mk : https://en.wikipedia.org/wiki/.mk +// see also: http://dns.marnet.net.mk/postapka.php +mk +com.mk +org.mk +net.mk +edu.mk +gov.mk +inf.mk +name.mk + +// ml : http://www.gobin.info/domainname/ml-template.doc +// see also: https://en.wikipedia.org/wiki/.ml +ml +com.ml +edu.ml +gouv.ml +gov.ml +net.ml +org.ml +presse.ml + +// mm : https://en.wikipedia.org/wiki/.mm +*.mm + +// mn : https://en.wikipedia.org/wiki/.mn +mn +gov.mn +edu.mn +org.mn + +// mo : http://www.monic.net.mo/ +mo +com.mo +net.mo +org.mo +edu.mo +gov.mo + +// mobi : https://en.wikipedia.org/wiki/.mobi +mobi + +// mp : http://www.dot.mp/ +// Confirmed by registry 2008-06-17 +mp + +// mq : https://en.wikipedia.org/wiki/.mq +mq + +// mr : https://en.wikipedia.org/wiki/.mr +mr +gov.mr + +// ms : http://www.nic.ms/pdf/MS_Domain_Name_Rules.pdf +ms +com.ms +edu.ms +gov.ms +net.ms +org.ms + +// mt : https://www.nic.org.mt/go/policy +// Submitted by registry +mt +com.mt +edu.mt +net.mt +org.mt + +// mu : https://en.wikipedia.org/wiki/.mu +mu +com.mu +net.mu +org.mu +gov.mu +ac.mu +co.mu +or.mu + +// museum : http://about.museum/naming/ +// http://index.museum/ +museum +academy.museum +agriculture.museum +air.museum +airguard.museum +alabama.museum +alaska.museum +amber.museum +ambulance.museum +american.museum +americana.museum +americanantiques.museum +americanart.museum +amsterdam.museum +and.museum +annefrank.museum +anthro.museum +anthropology.museum +antiques.museum +aquarium.museum +arboretum.museum +archaeological.museum +archaeology.museum +architecture.museum +art.museum +artanddesign.museum +artcenter.museum +artdeco.museum +arteducation.museum +artgallery.museum +arts.museum +artsandcrafts.museum +asmatart.museum +assassination.museum +assisi.museum +association.museum +astronomy.museum +atlanta.museum +austin.museum +australia.museum +automotive.museum +aviation.museum +axis.museum +badajoz.museum +baghdad.museum +bahn.museum +bale.museum +baltimore.museum +barcelona.museum +baseball.museum +basel.museum +baths.museum +bauern.museum +beauxarts.museum +beeldengeluid.museum +bellevue.museum +bergbau.museum +berkeley.museum +berlin.museum +bern.museum +bible.museum +bilbao.museum +bill.museum +birdart.museum +birthplace.museum +bonn.museum +boston.museum +botanical.museum +botanicalgarden.museum +botanicgarden.museum +botany.museum +brandywinevalley.museum +brasil.museum +bristol.museum +british.museum +britishcolumbia.museum +broadcast.museum +brunel.museum +brussel.museum +brussels.museum +bruxelles.museum +building.museum +burghof.museum +bus.museum +bushey.museum +cadaques.museum +california.museum +cambridge.museum +can.museum +canada.museum +capebreton.museum +carrier.museum +cartoonart.museum +casadelamoneda.museum +castle.museum +castres.museum +celtic.museum +center.museum +chattanooga.museum +cheltenham.museum +chesapeakebay.museum +chicago.museum +children.museum +childrens.museum +childrensgarden.museum +chiropractic.museum +chocolate.museum +christiansburg.museum +cincinnati.museum +cinema.museum +circus.museum +civilisation.museum +civilization.museum +civilwar.museum +clinton.museum +clock.museum +coal.museum +coastaldefence.museum +cody.museum +coldwar.museum +collection.museum +colonialwilliamsburg.museum +coloradoplateau.museum +columbia.museum +columbus.museum +communication.museum +communications.museum +community.museum +computer.museum +computerhistory.museum +xn--comunicaes-v6a2o.museum +comunicações.museum +contemporary.museum +contemporaryart.museum +convent.museum +copenhagen.museum +corporation.museum +xn--correios-e-telecomunicaes-ghc29a.museum +correios-e-telecomunicações.museum +corvette.museum +costume.museum +countryestate.museum +county.museum +crafts.museum +cranbrook.museum +creation.museum +cultural.museum +culturalcenter.museum +culture.museum +cyber.museum +cymru.museum +dali.museum +dallas.museum +database.museum +ddr.museum +decorativearts.museum +delaware.museum +delmenhorst.museum +denmark.museum +depot.museum +design.museum +detroit.museum +dinosaur.museum +discovery.museum +dolls.museum +donostia.museum +durham.museum +eastafrica.museum +eastcoast.museum +education.museum +educational.museum +egyptian.museum +eisenbahn.museum +elburg.museum +elvendrell.museum +embroidery.museum +encyclopedic.museum +england.museum +entomology.museum +environment.museum +environmentalconservation.museum +epilepsy.museum +essex.museum +estate.museum +ethnology.museum +exeter.museum +exhibition.museum +family.museum +farm.museum +farmequipment.museum +farmers.museum +farmstead.museum +field.museum +figueres.museum +filatelia.museum +film.museum +fineart.museum +finearts.museum +finland.museum +flanders.museum +florida.museum +force.museum +fortmissoula.museum +fortworth.museum +foundation.museum +francaise.museum +frankfurt.museum +franziskaner.museum +freemasonry.museum +freiburg.museum +fribourg.museum +frog.museum +fundacio.museum +furniture.museum +gallery.museum +garden.museum +gateway.museum +geelvinck.museum +gemological.museum +geology.museum +georgia.museum +giessen.museum +glas.museum +glass.museum +gorge.museum +grandrapids.museum +graz.museum +guernsey.museum +halloffame.museum +hamburg.museum +handson.museum +harvestcelebration.museum +hawaii.museum +health.museum +heimatunduhren.museum +hellas.museum +helsinki.museum +hembygdsforbund.museum +heritage.museum +histoire.museum +historical.museum +historicalsociety.museum +historichouses.museum +historisch.museum +historisches.museum +history.museum +historyofscience.museum +horology.museum +house.museum +humanities.museum +illustration.museum +imageandsound.museum +indian.museum +indiana.museum +indianapolis.museum +indianmarket.museum +intelligence.museum +interactive.museum +iraq.museum +iron.museum +isleofman.museum +jamison.museum +jefferson.museum +jerusalem.museum +jewelry.museum +jewish.museum +jewishart.museum +jfk.museum +journalism.museum +judaica.museum +judygarland.museum +juedisches.museum +juif.museum +karate.museum +karikatur.museum +kids.museum +koebenhavn.museum +koeln.museum +kunst.museum +kunstsammlung.museum +kunstunddesign.museum +labor.museum +labour.museum +lajolla.museum +lancashire.museum +landes.museum +lans.museum +xn--lns-qla.museum +läns.museum +larsson.museum +lewismiller.museum +lincoln.museum +linz.museum +living.museum +livinghistory.museum +localhistory.museum +london.museum +losangeles.museum +louvre.museum +loyalist.museum +lucerne.museum +luxembourg.museum +luzern.museum +mad.museum +madrid.museum +mallorca.museum +manchester.museum +mansion.museum +mansions.museum +manx.museum +marburg.museum +maritime.museum +maritimo.museum +maryland.museum +marylhurst.museum +media.museum +medical.museum +medizinhistorisches.museum +meeres.museum +memorial.museum +mesaverde.museum +michigan.museum +midatlantic.museum +military.museum +mill.museum +miners.museum +mining.museum +minnesota.museum +missile.museum +missoula.museum +modern.museum +moma.museum +money.museum +monmouth.museum +monticello.museum +montreal.museum +moscow.museum +motorcycle.museum +muenchen.museum +muenster.museum +mulhouse.museum +muncie.museum +museet.museum +museumcenter.museum +museumvereniging.museum +music.museum +national.museum +nationalfirearms.museum +nationalheritage.museum +nativeamerican.museum +naturalhistory.museum +naturalhistorymuseum.museum +naturalsciences.museum +nature.museum +naturhistorisches.museum +natuurwetenschappen.museum +naumburg.museum +naval.museum +nebraska.museum +neues.museum +newhampshire.museum +newjersey.museum +newmexico.museum +newport.museum +newspaper.museum +newyork.museum +niepce.museum +norfolk.museum +north.museum +nrw.museum +nuernberg.museum +nuremberg.museum +nyc.museum +nyny.museum +oceanographic.museum +oceanographique.museum +omaha.museum +online.museum +ontario.museum +openair.museum +oregon.museum +oregontrail.museum +otago.museum +oxford.museum +pacific.museum +paderborn.museum +palace.museum +paleo.museum +palmsprings.museum +panama.museum +paris.museum +pasadena.museum +pharmacy.museum +philadelphia.museum +philadelphiaarea.museum +philately.museum +phoenix.museum +photography.museum +pilots.museum +pittsburgh.museum +planetarium.museum +plantation.museum +plants.museum +plaza.museum +portal.museum +portland.museum +portlligat.museum +posts-and-telecommunications.museum +preservation.museum +presidio.museum +press.museum +project.museum +public.museum +pubol.museum +quebec.museum +railroad.museum +railway.museum +research.museum +resistance.museum +riodejaneiro.museum +rochester.museum +rockart.museum +roma.museum +russia.museum +saintlouis.museum +salem.museum +salvadordali.museum +salzburg.museum +sandiego.museum +sanfrancisco.museum +santabarbara.museum +santacruz.museum +santafe.museum +saskatchewan.museum +satx.museum +savannahga.museum +schlesisches.museum +schoenbrunn.museum +schokoladen.museum +school.museum +schweiz.museum +science.museum +scienceandhistory.museum +scienceandindustry.museum +sciencecenter.museum +sciencecenters.museum +science-fiction.museum +sciencehistory.museum +sciences.museum +sciencesnaturelles.museum +scotland.museum +seaport.museum +settlement.museum +settlers.museum +shell.museum +sherbrooke.museum +sibenik.museum +silk.museum +ski.museum +skole.museum +society.museum +sologne.museum +soundandvision.museum +southcarolina.museum +southwest.museum +space.museum +spy.museum +square.museum +stadt.museum +stalbans.museum +starnberg.museum +state.museum +stateofdelaware.museum +station.museum +steam.museum +steiermark.museum +stjohn.museum +stockholm.museum +stpetersburg.museum +stuttgart.museum +suisse.museum +surgeonshall.museum +surrey.museum +svizzera.museum +sweden.museum +sydney.museum +tank.museum +tcm.museum +technology.museum +telekommunikation.museum +television.museum +texas.museum +textile.museum +theater.museum +time.museum +timekeeping.museum +topology.museum +torino.museum +touch.museum +town.museum +transport.museum +tree.museum +trolley.museum +trust.museum +trustee.museum +uhren.museum +ulm.museum +undersea.museum +university.museum +usa.museum +usantiques.museum +usarts.museum +uscountryestate.museum +usculture.museum +usdecorativearts.museum +usgarden.museum +ushistory.museum +ushuaia.museum +uslivinghistory.museum +utah.museum +uvic.museum +valley.museum +vantaa.museum +versailles.museum +viking.museum +village.museum +virginia.museum +virtual.museum +virtuel.museum +vlaanderen.museum +volkenkunde.museum +wales.museum +wallonie.museum +war.museum +washingtondc.museum +watchandclock.museum +watch-and-clock.museum +western.museum +westfalen.museum +whaling.museum +wildlife.museum +williamsburg.museum +windmill.museum +workshop.museum +york.museum +yorkshire.museum +yosemite.museum +youth.museum +zoological.museum +zoology.museum +xn--9dbhblg6di.museum +ירושלים.museum +xn--h1aegh.museum +иком.museum + +// mv : https://en.wikipedia.org/wiki/.mv +// "mv" included because, contra Wikipedia, google.mv exists. +mv +aero.mv +biz.mv +com.mv +coop.mv +edu.mv +gov.mv +info.mv +int.mv +mil.mv +museum.mv +name.mv +net.mv +org.mv +pro.mv + +// mw : http://www.registrar.mw/ +mw +ac.mw +biz.mw +co.mw +com.mw +coop.mw +edu.mw +gov.mw +int.mw +museum.mw +net.mw +org.mw + +// mx : http://www.nic.mx/ +// Submitted by registry +mx +com.mx +org.mx +gob.mx +edu.mx +net.mx + +// my : http://www.mynic.net.my/ +my +com.my +net.my +org.my +gov.my +edu.my +mil.my +name.my + +// mz : http://www.uem.mz/ +// Submitted by registry +mz +ac.mz +adv.mz +co.mz +edu.mz +gov.mz +mil.mz +net.mz +org.mz + +// na : http://www.na-nic.com.na/ +// http://www.info.na/domain/ +na +info.na +pro.na +name.na +school.na +or.na +dr.na +us.na +mx.na +ca.na +in.na +cc.na +tv.na +ws.na +mobi.na +co.na +com.na +org.na + +// name : has 2nd-level tlds, but there's no list of them +name + +// nc : http://www.cctld.nc/ +nc +asso.nc + +// ne : https://en.wikipedia.org/wiki/.ne +ne + +// net : https://en.wikipedia.org/wiki/.net +net + +// nf : https://en.wikipedia.org/wiki/.nf +nf +com.nf +net.nf +per.nf +rec.nf +web.nf +arts.nf +firm.nf +info.nf +other.nf +store.nf + +// ng : http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds +ng +com.ng +edu.ng +gov.ng +i.ng +mil.ng +mobi.ng +name.ng +net.ng +org.ng +sch.ng + +// ni : http://www.nic.ni/ +ni +ac.ni +biz.ni +co.ni +com.ni +edu.ni +gob.ni +in.ni +info.ni +int.ni +mil.ni +net.ni +nom.ni +org.ni +web.ni + +// nl : https://en.wikipedia.org/wiki/.nl +// https://www.sidn.nl/ +// ccTLD for the Netherlands +nl + +// BV.nl will be a registry for dutch BV's (besloten vennootschap) +bv.nl + +// no : http://www.norid.no/regelverk/index.en.html +// The Norwegian registry has declined to notify us of updates. The web pages +// referenced below are the official source of the data. There is also an +// announce mailing list: +// https://postlister.uninett.no/sympa/info/norid-diskusjon +no +// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html +fhs.no +vgs.no +fylkesbibl.no +folkebibl.no +museum.no +idrett.no +priv.no +// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html +mil.no +stat.no +dep.no +kommune.no +herad.no +// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html +// counties +aa.no +ah.no +bu.no +fm.no +hl.no +hm.no +jan-mayen.no +mr.no +nl.no +nt.no +of.no +ol.no +oslo.no +rl.no +sf.no +st.no +svalbard.no +tm.no +tr.no +va.no +vf.no +// primary and lower secondary schools per county +gs.aa.no +gs.ah.no +gs.bu.no +gs.fm.no +gs.hl.no +gs.hm.no +gs.jan-mayen.no +gs.mr.no +gs.nl.no +gs.nt.no +gs.of.no +gs.ol.no +gs.oslo.no +gs.rl.no +gs.sf.no +gs.st.no +gs.svalbard.no +gs.tm.no +gs.tr.no +gs.va.no +gs.vf.no +// cities +akrehamn.no +xn--krehamn-dxa.no +åkrehamn.no +algard.no +xn--lgrd-poac.no +ålgård.no +arna.no +brumunddal.no +bryne.no +bronnoysund.no +xn--brnnysund-m8ac.no +brønnøysund.no +drobak.no +xn--drbak-wua.no +drøbak.no +egersund.no +fetsund.no +floro.no +xn--flor-jra.no +florø.no +fredrikstad.no +hokksund.no +honefoss.no +xn--hnefoss-q1a.no +hønefoss.no +jessheim.no +jorpeland.no +xn--jrpeland-54a.no +jørpeland.no +kirkenes.no +kopervik.no +krokstadelva.no +langevag.no +xn--langevg-jxa.no +langevåg.no +leirvik.no +mjondalen.no +xn--mjndalen-64a.no +mjøndalen.no +mo-i-rana.no +mosjoen.no +xn--mosjen-eya.no +mosjøen.no +nesoddtangen.no +orkanger.no +osoyro.no +xn--osyro-wua.no +osøyro.no +raholt.no +xn--rholt-mra.no +råholt.no +sandnessjoen.no +xn--sandnessjen-ogb.no +sandnessjøen.no +skedsmokorset.no +slattum.no +spjelkavik.no +stathelle.no +stavern.no +stjordalshalsen.no +xn--stjrdalshalsen-sqb.no +stjørdalshalsen.no +tananger.no +tranby.no +vossevangen.no +// communities +afjord.no +xn--fjord-lra.no +åfjord.no +agdenes.no +al.no +xn--l-1fa.no +ål.no +alesund.no +xn--lesund-hua.no +ålesund.no +alstahaug.no +alta.no +xn--lt-liac.no +áltá.no +alaheadju.no +xn--laheadju-7ya.no +álaheadju.no +alvdal.no +amli.no +xn--mli-tla.no +åmli.no +amot.no +xn--mot-tla.no +åmot.no +andebu.no +andoy.no +xn--andy-ira.no +andøy.no +andasuolo.no +ardal.no +xn--rdal-poa.no +årdal.no +aremark.no +arendal.no +xn--s-1fa.no +ås.no +aseral.no +xn--seral-lra.no +åseral.no +asker.no +askim.no +askvoll.no +askoy.no +xn--asky-ira.no +askøy.no +asnes.no +xn--snes-poa.no +åsnes.no +audnedaln.no +aukra.no +aure.no +aurland.no +aurskog-holand.no +xn--aurskog-hland-jnb.no +aurskog-høland.no +austevoll.no +austrheim.no +averoy.no +xn--avery-yua.no +averøy.no +balestrand.no +ballangen.no +balat.no +xn--blt-elab.no +bálát.no +balsfjord.no +bahccavuotna.no +xn--bhccavuotna-k7a.no +báhccavuotna.no +bamble.no +bardu.no +beardu.no +beiarn.no +bajddar.no +xn--bjddar-pta.no +bájddar.no +baidar.no +xn--bidr-5nac.no +báidár.no +berg.no +bergen.no +berlevag.no +xn--berlevg-jxa.no +berlevåg.no +bearalvahki.no +xn--bearalvhki-y4a.no +bearalváhki.no +bindal.no +birkenes.no +bjarkoy.no +xn--bjarky-fya.no +bjarkøy.no +bjerkreim.no +bjugn.no +bodo.no +xn--bod-2na.no +bodø.no +badaddja.no +xn--bdddj-mrabd.no +bådåddjå.no +budejju.no +bokn.no +bremanger.no +bronnoy.no +xn--brnny-wuac.no +brønnøy.no +bygland.no +bykle.no +barum.no +xn--brum-voa.no +bærum.no +bo.telemark.no +xn--b-5ga.telemark.no +bø.telemark.no +bo.nordland.no +xn--b-5ga.nordland.no +bø.nordland.no +bievat.no +xn--bievt-0qa.no +bievát.no +bomlo.no +xn--bmlo-gra.no +bømlo.no +batsfjord.no +xn--btsfjord-9za.no +båtsfjord.no +bahcavuotna.no +xn--bhcavuotna-s4a.no +báhcavuotna.no +dovre.no +drammen.no +drangedal.no +dyroy.no +xn--dyry-ira.no +dyrøy.no +donna.no +xn--dnna-gra.no +dønna.no +eid.no +eidfjord.no +eidsberg.no +eidskog.no +eidsvoll.no +eigersund.no +elverum.no +enebakk.no +engerdal.no +etne.no +etnedal.no +evenes.no +evenassi.no +xn--eveni-0qa01ga.no +evenášši.no +evje-og-hornnes.no +farsund.no +fauske.no +fuossko.no +fuoisku.no +fedje.no +fet.no +finnoy.no +xn--finny-yua.no +finnøy.no +fitjar.no +fjaler.no +fjell.no +flakstad.no +flatanger.no +flekkefjord.no +flesberg.no +flora.no +fla.no +xn--fl-zia.no +flå.no +folldal.no +forsand.no +fosnes.no +frei.no +frogn.no +froland.no +frosta.no +frana.no +xn--frna-woa.no +fræna.no +froya.no +xn--frya-hra.no +frøya.no +fusa.no +fyresdal.no +forde.no +xn--frde-gra.no +førde.no +gamvik.no +gangaviika.no +xn--ggaviika-8ya47h.no +gáŋgaviika.no +gaular.no +gausdal.no +gildeskal.no +xn--gildeskl-g0a.no +gildeskål.no +giske.no +gjemnes.no +gjerdrum.no +gjerstad.no +gjesdal.no +gjovik.no +xn--gjvik-wua.no +gjøvik.no +gloppen.no +gol.no +gran.no +grane.no +granvin.no +gratangen.no +grimstad.no +grong.no +kraanghke.no +xn--kranghke-b0a.no +kråanghke.no +grue.no +gulen.no +hadsel.no +halden.no +halsa.no +hamar.no +hamaroy.no +habmer.no +xn--hbmer-xqa.no +hábmer.no +hapmir.no +xn--hpmir-xqa.no +hápmir.no +hammerfest.no +hammarfeasta.no +xn--hmmrfeasta-s4ac.no +hámmárfeasta.no +haram.no +hareid.no +harstad.no +hasvik.no +aknoluokta.no +xn--koluokta-7ya57h.no +ákŋoluokta.no +hattfjelldal.no +aarborte.no +haugesund.no +hemne.no +hemnes.no +hemsedal.no +heroy.more-og-romsdal.no +xn--hery-ira.xn--mre-og-romsdal-qqb.no +herøy.møre-og-romsdal.no +heroy.nordland.no +xn--hery-ira.nordland.no +herøy.nordland.no +hitra.no +hjartdal.no +hjelmeland.no +hobol.no +xn--hobl-ira.no +hobøl.no +hof.no +hol.no +hole.no +holmestrand.no +holtalen.no +xn--holtlen-hxa.no +holtålen.no +hornindal.no +horten.no +hurdal.no +hurum.no +hvaler.no +hyllestad.no +hagebostad.no +xn--hgebostad-g3a.no +hægebostad.no +hoyanger.no +xn--hyanger-q1a.no +høyanger.no +hoylandet.no +xn--hylandet-54a.no +høylandet.no +ha.no +xn--h-2fa.no +hå.no +ibestad.no +inderoy.no +xn--indery-fya.no +inderøy.no +iveland.no +jevnaker.no +jondal.no +jolster.no +xn--jlster-bya.no +jølster.no +karasjok.no +karasjohka.no +xn--krjohka-hwab49j.no +kárášjohka.no +karlsoy.no +galsa.no +xn--gls-elac.no +gálsá.no +karmoy.no +xn--karmy-yua.no +karmøy.no +kautokeino.no +guovdageaidnu.no +klepp.no +klabu.no +xn--klbu-woa.no +klæbu.no +kongsberg.no +kongsvinger.no +kragero.no +xn--krager-gya.no +kragerø.no +kristiansand.no +kristiansund.no +krodsherad.no +xn--krdsherad-m8a.no +krødsherad.no +kvalsund.no +rahkkeravju.no +xn--rhkkervju-01af.no +ráhkkerávju.no +kvam.no +kvinesdal.no +kvinnherad.no +kviteseid.no +kvitsoy.no +xn--kvitsy-fya.no +kvitsøy.no +kvafjord.no +xn--kvfjord-nxa.no +kvæfjord.no +giehtavuoatna.no +kvanangen.no +xn--kvnangen-k0a.no +kvænangen.no +navuotna.no +xn--nvuotna-hwa.no +návuotna.no +kafjord.no +xn--kfjord-iua.no +kåfjord.no +gaivuotna.no +xn--givuotna-8ya.no +gáivuotna.no +larvik.no +lavangen.no +lavagis.no +loabat.no +xn--loabt-0qa.no +loabát.no +lebesby.no +davvesiida.no +leikanger.no +leirfjord.no +leka.no +leksvik.no +lenvik.no +leangaviika.no +xn--leagaviika-52b.no +leaŋgaviika.no +lesja.no +levanger.no +lier.no +lierne.no +lillehammer.no +lillesand.no +lindesnes.no +lindas.no +xn--linds-pra.no +lindås.no +lom.no +loppa.no +lahppi.no +xn--lhppi-xqa.no +láhppi.no +lund.no +lunner.no +luroy.no +xn--lury-ira.no +lurøy.no +luster.no +lyngdal.no +lyngen.no +ivgu.no +lardal.no +lerdal.no +xn--lrdal-sra.no +lærdal.no +lodingen.no +xn--ldingen-q1a.no +lødingen.no +lorenskog.no +xn--lrenskog-54a.no +lørenskog.no +loten.no +xn--lten-gra.no +løten.no +malvik.no +masoy.no +xn--msy-ula0h.no +måsøy.no +muosat.no +xn--muost-0qa.no +muosát.no +mandal.no +marker.no +marnardal.no +masfjorden.no +meland.no +meldal.no +melhus.no +meloy.no +xn--mely-ira.no +meløy.no +meraker.no +xn--merker-kua.no +meråker.no +moareke.no +xn--moreke-jua.no +moåreke.no +midsund.no +midtre-gauldal.no +modalen.no +modum.no +molde.no +moskenes.no +moss.no +mosvik.no +malselv.no +xn--mlselv-iua.no +målselv.no +malatvuopmi.no +xn--mlatvuopmi-s4a.no +málatvuopmi.no +namdalseid.no +aejrie.no +namsos.no +namsskogan.no +naamesjevuemie.no +xn--nmesjevuemie-tcba.no +nååmesjevuemie.no +laakesvuemie.no +nannestad.no +narvik.no +narviika.no +naustdal.no +nedre-eiker.no +nes.akershus.no +nes.buskerud.no +nesna.no +nesodden.no +nesseby.no +unjarga.no +xn--unjrga-rta.no +unjárga.no +nesset.no +nissedal.no +nittedal.no +nord-aurdal.no +nord-fron.no +nord-odal.no +norddal.no +nordkapp.no +davvenjarga.no +xn--davvenjrga-y4a.no +davvenjárga.no +nordre-land.no +nordreisa.no +raisa.no +xn--risa-5na.no +ráisa.no +nore-og-uvdal.no +notodden.no +naroy.no +xn--nry-yla5g.no +nærøy.no +notteroy.no +xn--nttery-byae.no +nøtterøy.no +odda.no +oksnes.no +xn--ksnes-uua.no +øksnes.no +oppdal.no +oppegard.no +xn--oppegrd-ixa.no +oppegård.no +orkdal.no +orland.no +xn--rland-uua.no +ørland.no +orskog.no +xn--rskog-uua.no +ørskog.no +orsta.no +xn--rsta-fra.no +ørsta.no +os.hedmark.no +os.hordaland.no +osen.no +osteroy.no +xn--ostery-fya.no +osterøy.no +ostre-toten.no +xn--stre-toten-zcb.no +østre-toten.no +overhalla.no +ovre-eiker.no +xn--vre-eiker-k8a.no +øvre-eiker.no +oyer.no +xn--yer-zna.no +øyer.no +oygarden.no +xn--ygarden-p1a.no +øygarden.no +oystre-slidre.no +xn--ystre-slidre-ujb.no +øystre-slidre.no +porsanger.no +porsangu.no +xn--porsgu-sta26f.no +porsáŋgu.no +porsgrunn.no +radoy.no +xn--rady-ira.no +radøy.no +rakkestad.no +rana.no +ruovat.no +randaberg.no +rauma.no +rendalen.no +rennebu.no +rennesoy.no +xn--rennesy-v1a.no +rennesøy.no +rindal.no +ringebu.no +ringerike.no +ringsaker.no +rissa.no +risor.no +xn--risr-ira.no +risør.no +roan.no +rollag.no +rygge.no +ralingen.no +xn--rlingen-mxa.no +rælingen.no +rodoy.no +xn--rdy-0nab.no +rødøy.no +romskog.no +xn--rmskog-bya.no +rømskog.no +roros.no +xn--rros-gra.no +røros.no +rost.no +xn--rst-0na.no +røst.no +royken.no +xn--ryken-vua.no +røyken.no +royrvik.no +xn--ryrvik-bya.no +røyrvik.no +rade.no +xn--rde-ula.no +råde.no +salangen.no +siellak.no +saltdal.no +salat.no +xn--slt-elab.no +sálát.no +xn--slat-5na.no +sálat.no +samnanger.no +sande.more-og-romsdal.no +sande.xn--mre-og-romsdal-qqb.no +sande.møre-og-romsdal.no +sande.vestfold.no +sandefjord.no +sandnes.no +sandoy.no +xn--sandy-yua.no +sandøy.no +sarpsborg.no +sauda.no +sauherad.no +sel.no +selbu.no +selje.no +seljord.no +sigdal.no +siljan.no +sirdal.no +skaun.no +skedsmo.no +ski.no +skien.no +skiptvet.no +skjervoy.no +xn--skjervy-v1a.no +skjervøy.no +skierva.no +xn--skierv-uta.no +skiervá.no +skjak.no +xn--skjk-soa.no +skjåk.no +skodje.no +skanland.no +xn--sknland-fxa.no +skånland.no +skanit.no +xn--sknit-yqa.no +skánit.no +smola.no +xn--smla-hra.no +smøla.no +snillfjord.no +snasa.no +xn--snsa-roa.no +snåsa.no +snoasa.no +snaase.no +xn--snase-nra.no +snåase.no +sogndal.no +sokndal.no +sola.no +solund.no +songdalen.no +sortland.no +spydeberg.no +stange.no +stavanger.no +steigen.no +steinkjer.no +stjordal.no +xn--stjrdal-s1a.no +stjørdal.no +stokke.no +stor-elvdal.no +stord.no +stordal.no +storfjord.no +omasvuotna.no +strand.no +stranda.no +stryn.no +sula.no +suldal.no +sund.no +sunndal.no +surnadal.no +sveio.no +svelvik.no +sykkylven.no +sogne.no +xn--sgne-gra.no +søgne.no +somna.no +xn--smna-gra.no +sømna.no +sondre-land.no +xn--sndre-land-0cb.no +søndre-land.no +sor-aurdal.no +xn--sr-aurdal-l8a.no +sør-aurdal.no +sor-fron.no +xn--sr-fron-q1a.no +sør-fron.no +sor-odal.no +xn--sr-odal-q1a.no +sør-odal.no +sor-varanger.no +xn--sr-varanger-ggb.no +sør-varanger.no +matta-varjjat.no +xn--mtta-vrjjat-k7af.no +mátta-várjjat.no +sorfold.no +xn--srfold-bya.no +sørfold.no +sorreisa.no +xn--srreisa-q1a.no +sørreisa.no +sorum.no +xn--srum-gra.no +sørum.no +tana.no +deatnu.no +time.no +tingvoll.no +tinn.no +tjeldsund.no +dielddanuorri.no +tjome.no +xn--tjme-hra.no +tjøme.no +tokke.no +tolga.no +torsken.no +tranoy.no +xn--trany-yua.no +tranøy.no +tromso.no +xn--troms-zua.no +tromsø.no +tromsa.no +romsa.no +trondheim.no +troandin.no +trysil.no +trana.no +xn--trna-woa.no +træna.no +trogstad.no +xn--trgstad-r1a.no +trøgstad.no +tvedestrand.no +tydal.no +tynset.no +tysfjord.no +divtasvuodna.no +divttasvuotna.no +tysnes.no +tysvar.no +xn--tysvr-vra.no +tysvær.no +tonsberg.no +xn--tnsberg-q1a.no +tønsberg.no +ullensaker.no +ullensvang.no +ulvik.no +utsira.no +vadso.no +xn--vads-jra.no +vadsø.no +cahcesuolo.no +xn--hcesuolo-7ya35b.no +čáhcesuolo.no +vaksdal.no +valle.no +vang.no +vanylven.no +vardo.no +xn--vard-jra.no +vardø.no +varggat.no +xn--vrggt-xqad.no +várggát.no +vefsn.no +vaapste.no +vega.no +vegarshei.no +xn--vegrshei-c0a.no +vegårshei.no +vennesla.no +verdal.no +verran.no +vestby.no +vestnes.no +vestre-slidre.no +vestre-toten.no +vestvagoy.no +xn--vestvgy-ixa6o.no +vestvågøy.no +vevelstad.no +vik.no +vikna.no +vindafjord.no +volda.no +voss.no +varoy.no +xn--vry-yla5g.no +værøy.no +vagan.no +xn--vgan-qoa.no +vågan.no +voagat.no +vagsoy.no +xn--vgsy-qoa0j.no +vågsøy.no +vaga.no +xn--vg-yiab.no +vågå.no +valer.ostfold.no +xn--vler-qoa.xn--stfold-9xa.no +våler.østfold.no +valer.hedmark.no +xn--vler-qoa.hedmark.no +våler.hedmark.no + +// np : http://www.mos.com.np/register.html +*.np + +// nr : http://cenpac.net.nr/dns/index.html +// Submitted by registry +nr +biz.nr +info.nr +gov.nr +edu.nr +org.nr +net.nr +com.nr + +// nu : https://en.wikipedia.org/wiki/.nu +nu + +// nz : https://en.wikipedia.org/wiki/.nz +// Submitted by registry +nz +ac.nz +co.nz +cri.nz +geek.nz +gen.nz +govt.nz +health.nz +iwi.nz +kiwi.nz +maori.nz +mil.nz +xn--mori-qsa.nz +māori.nz +net.nz +org.nz +parliament.nz +school.nz + +// om : https://en.wikipedia.org/wiki/.om +om +co.om +com.om +edu.om +gov.om +med.om +museum.om +net.om +org.om +pro.om + +// onion : https://tools.ietf.org/html/rfc7686 +onion + +// org : https://en.wikipedia.org/wiki/.org +org + +// pa : http://www.nic.pa/ +// Some additional second level "domains" resolve directly as hostnames, such as +// pannet.pa, so we add a rule for "pa". +pa +ac.pa +gob.pa +com.pa +org.pa +sld.pa +edu.pa +net.pa +ing.pa +abo.pa +med.pa +nom.pa + +// pe : https://www.nic.pe/InformeFinalComision.pdf +pe +edu.pe +gob.pe +nom.pe +mil.pe +org.pe +com.pe +net.pe + +// pf : http://www.gobin.info/domainname/formulaire-pf.pdf +pf +com.pf +org.pf +edu.pf + +// pg : https://en.wikipedia.org/wiki/.pg +*.pg + +// ph : http://www.domains.ph/FAQ2.asp +// Submitted by registry +ph +com.ph +net.ph +org.ph +gov.ph +edu.ph +ngo.ph +mil.ph +i.ph + +// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK +pk +com.pk +net.pk +edu.pk +org.pk +fam.pk +biz.pk +web.pk +gov.pk +gob.pk +gok.pk +gon.pk +gop.pk +gos.pk +info.pk + +// pl http://www.dns.pl/english/index.html +// Submitted by registry +pl +com.pl +net.pl +org.pl +// pl functional domains (http://www.dns.pl/english/index.html) +aid.pl +agro.pl +atm.pl +auto.pl +biz.pl +edu.pl +gmina.pl +gsm.pl +info.pl +mail.pl +miasta.pl +media.pl +mil.pl +nieruchomosci.pl +nom.pl +pc.pl +powiat.pl +priv.pl +realestate.pl +rel.pl +sex.pl +shop.pl +sklep.pl +sos.pl +szkola.pl +targi.pl +tm.pl +tourism.pl +travel.pl +turystyka.pl +// Government domains +gov.pl +ap.gov.pl +ic.gov.pl +is.gov.pl +us.gov.pl +kmpsp.gov.pl +kppsp.gov.pl +kwpsp.gov.pl +psp.gov.pl +wskr.gov.pl +kwp.gov.pl +mw.gov.pl +ug.gov.pl +um.gov.pl +umig.gov.pl +ugim.gov.pl +upow.gov.pl +uw.gov.pl +starostwo.gov.pl +pa.gov.pl +po.gov.pl +psse.gov.pl +pup.gov.pl +rzgw.gov.pl +sa.gov.pl +so.gov.pl +sr.gov.pl +wsa.gov.pl +sko.gov.pl +uzs.gov.pl +wiih.gov.pl +winb.gov.pl +pinb.gov.pl +wios.gov.pl +witd.gov.pl +wzmiuw.gov.pl +piw.gov.pl +wiw.gov.pl +griw.gov.pl +wif.gov.pl +oum.gov.pl +sdn.gov.pl +zp.gov.pl +uppo.gov.pl +mup.gov.pl +wuoz.gov.pl +konsulat.gov.pl +oirm.gov.pl +// pl regional domains (http://www.dns.pl/english/index.html) +augustow.pl +babia-gora.pl +bedzin.pl +beskidy.pl +bialowieza.pl +bialystok.pl +bielawa.pl +bieszczady.pl +boleslawiec.pl +bydgoszcz.pl +bytom.pl +cieszyn.pl +czeladz.pl +czest.pl +dlugoleka.pl +elblag.pl +elk.pl +glogow.pl +gniezno.pl +gorlice.pl +grajewo.pl +ilawa.pl +jaworzno.pl +jelenia-gora.pl +jgora.pl +kalisz.pl +kazimierz-dolny.pl +karpacz.pl +kartuzy.pl +kaszuby.pl +katowice.pl +kepno.pl +ketrzyn.pl +klodzko.pl +kobierzyce.pl +kolobrzeg.pl +konin.pl +konskowola.pl +kutno.pl +lapy.pl +lebork.pl +legnica.pl +lezajsk.pl +limanowa.pl +lomza.pl +lowicz.pl +lubin.pl +lukow.pl +malbork.pl +malopolska.pl +mazowsze.pl +mazury.pl +mielec.pl +mielno.pl +mragowo.pl +naklo.pl +nowaruda.pl +nysa.pl +olawa.pl +olecko.pl +olkusz.pl +olsztyn.pl +opoczno.pl +opole.pl +ostroda.pl +ostroleka.pl +ostrowiec.pl +ostrowwlkp.pl +pila.pl +pisz.pl +podhale.pl +podlasie.pl +polkowice.pl +pomorze.pl +pomorskie.pl +prochowice.pl +pruszkow.pl +przeworsk.pl +pulawy.pl +radom.pl +rawa-maz.pl +rybnik.pl +rzeszow.pl +sanok.pl +sejny.pl +slask.pl +slupsk.pl +sosnowiec.pl +stalowa-wola.pl +skoczow.pl +starachowice.pl +stargard.pl +suwalki.pl +swidnica.pl +swiebodzin.pl +swinoujscie.pl +szczecin.pl +szczytno.pl +tarnobrzeg.pl +tgory.pl +turek.pl +tychy.pl +ustka.pl +walbrzych.pl +warmia.pl +warszawa.pl +waw.pl +wegrow.pl +wielun.pl +wlocl.pl +wloclawek.pl +wodzislaw.pl +wolomin.pl +wroclaw.pl +zachpomor.pl +zagan.pl +zarow.pl +zgora.pl +zgorzelec.pl + +// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +pm + +// pn : http://www.government.pn/PnRegistry/policies.htm +pn +gov.pn +co.pn +org.pn +edu.pn +net.pn + +// post : https://en.wikipedia.org/wiki/.post +post + +// pr : http://www.nic.pr/index.asp?f=1 +pr +com.pr +net.pr +org.pr +gov.pr +edu.pr +isla.pr +pro.pr +biz.pr +info.pr +name.pr +// these aren't mentioned on nic.pr, but on https://en.wikipedia.org/wiki/.pr +est.pr +prof.pr +ac.pr + +// pro : http://registry.pro/get-pro +pro +aaa.pro +aca.pro +acct.pro +avocat.pro +bar.pro +cpa.pro +eng.pro +jur.pro +law.pro +med.pro +recht.pro + +// ps : https://en.wikipedia.org/wiki/.ps +// http://www.nic.ps/registration/policy.html#reg +ps +edu.ps +gov.ps +sec.ps +plo.ps +com.ps +org.ps +net.ps + +// pt : http://online.dns.pt/dns/start_dns +pt +net.pt +gov.pt +org.pt +edu.pt +int.pt +publ.pt +com.pt +nome.pt + +// pw : https://en.wikipedia.org/wiki/.pw +pw +co.pw +ne.pw +or.pw +ed.pw +go.pw +belau.pw + +// py : http://www.nic.py/pautas.html#seccion_9 +// Submitted by registry +py +com.py +coop.py +edu.py +gov.py +mil.py +net.py +org.py + +// qa : http://domains.qa/en/ +qa +com.qa +edu.qa +gov.qa +mil.qa +name.qa +net.qa +org.qa +sch.qa + +// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs +re +asso.re +com.re +nom.re + +// ro : http://www.rotld.ro/ +ro +arts.ro +com.ro +firm.ro +info.ro +nom.ro +nt.ro +org.ro +rec.ro +store.ro +tm.ro +www.ro + +// rs : https://www.rnids.rs/en/domains/national-domains +rs +ac.rs +co.rs +edu.rs +gov.rs +in.rs +org.rs + +// ru : https://cctld.ru/en/domains/domens_ru/reserved/ +ru +ac.ru +edu.ru +gov.ru +int.ru +mil.ru +test.ru + +// rw : http://www.nic.rw/cgi-bin/policy.pl +rw +gov.rw +net.rw +edu.rw +ac.rw +com.rw +co.rw +int.rw +mil.rw +gouv.rw + +// sa : http://www.nic.net.sa/ +sa +com.sa +net.sa +org.sa +gov.sa +med.sa +pub.sa +edu.sa +sch.sa + +// sb : http://www.sbnic.net.sb/ +// Submitted by registry +sb +com.sb +edu.sb +gov.sb +net.sb +org.sb + +// sc : http://www.nic.sc/ +sc +com.sc +gov.sc +net.sc +org.sc +edu.sc + +// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm +// Submitted by registry +sd +com.sd +net.sd +org.sd +edu.sd +med.sd +tv.sd +gov.sd +info.sd + +// se : https://en.wikipedia.org/wiki/.se +// Submitted by registry +se +a.se +ac.se +b.se +bd.se +brand.se +c.se +d.se +e.se +f.se +fh.se +fhsk.se +fhv.se +g.se +h.se +i.se +k.se +komforb.se +kommunalforbund.se +komvux.se +l.se +lanbib.se +m.se +n.se +naturbruksgymn.se +o.se +org.se +p.se +parti.se +pp.se +press.se +r.se +s.se +t.se +tm.se +u.se +w.se +x.se +y.se +z.se + +// sg : http://www.nic.net.sg/page/registration-policies-procedures-and-guidelines +sg +com.sg +net.sg +org.sg +gov.sg +edu.sg +per.sg + +// sh : http://www.nic.sh/registrar.html +sh +com.sh +net.sh +gov.sh +org.sh +mil.sh + +// si : https://en.wikipedia.org/wiki/.si +si + +// sj : No registrations at this time. +// Submitted by registry +sj + +// sk : https://en.wikipedia.org/wiki/.sk +// list of 2nd level domains ? +sk + +// sl : http://www.nic.sl +// Submitted by registry +sl +com.sl +net.sl +edu.sl +gov.sl +org.sl + +// sm : https://en.wikipedia.org/wiki/.sm +sm + +// sn : https://en.wikipedia.org/wiki/.sn +sn +art.sn +com.sn +edu.sn +gouv.sn +org.sn +perso.sn +univ.sn + +// so : http://www.soregistry.com/ +so +com.so +net.so +org.so + +// sr : https://en.wikipedia.org/wiki/.sr +sr + +// st : http://www.nic.st/html/policyrules/ +st +co.st +com.st +consulado.st +edu.st +embaixada.st +gov.st +mil.st +net.st +org.st +principe.st +saotome.st +store.st + +// su : https://en.wikipedia.org/wiki/.su +su + +// sv : http://www.svnet.org.sv/niveldos.pdf +sv +com.sv +edu.sv +gob.sv +org.sv +red.sv + +// sx : https://en.wikipedia.org/wiki/.sx +// Submitted by registry +sx +gov.sx + +// sy : https://en.wikipedia.org/wiki/.sy +// see also: http://www.gobin.info/domainname/sy.doc +sy +edu.sy +gov.sy +net.sy +mil.sy +com.sy +org.sy + +// sz : https://en.wikipedia.org/wiki/.sz +// http://www.sispa.org.sz/ +sz +co.sz +ac.sz +org.sz + +// tc : https://en.wikipedia.org/wiki/.tc +tc + +// td : https://en.wikipedia.org/wiki/.td +td + +// tel: https://en.wikipedia.org/wiki/.tel +// http://www.telnic.org/ +tel + +// tf : https://en.wikipedia.org/wiki/.tf +tf + +// tg : https://en.wikipedia.org/wiki/.tg +// http://www.nic.tg/ +tg + +// th : https://en.wikipedia.org/wiki/.th +// Submitted by registry +th +ac.th +co.th +go.th +in.th +mi.th +net.th +or.th + +// tj : http://www.nic.tj/policy.html +tj +ac.tj +biz.tj +co.tj +com.tj +edu.tj +go.tj +gov.tj +int.tj +mil.tj +name.tj +net.tj +nic.tj +org.tj +test.tj +web.tj + +// tk : https://en.wikipedia.org/wiki/.tk +tk + +// tl : https://en.wikipedia.org/wiki/.tl +tl +gov.tl + +// tm : http://www.nic.tm/local.html +tm +com.tm +co.tm +org.tm +net.tm +nom.tm +gov.tm +mil.tm +edu.tm + +// tn : https://en.wikipedia.org/wiki/.tn +// http://whois.ati.tn/ +tn +com.tn +ens.tn +fin.tn +gov.tn +ind.tn +intl.tn +nat.tn +net.tn +org.tn +info.tn +perso.tn +tourism.tn +edunet.tn +rnrt.tn +rns.tn +rnu.tn +mincom.tn +agrinet.tn +defense.tn +turen.tn + +// to : https://en.wikipedia.org/wiki/.to +// Submitted by registry +to +com.to +gov.to +net.to +org.to +edu.to +mil.to + +// subTLDs: https://www.nic.tr/forms/eng/policies.pdf +// and: https://www.nic.tr/forms/politikalar.pdf +// Submitted by +tr +com.tr +info.tr +biz.tr +net.tr +org.tr +web.tr +gen.tr +tv.tr +av.tr +dr.tr +bbs.tr +name.tr +tel.tr +gov.tr +bel.tr +pol.tr +mil.tr +k12.tr +edu.tr +kep.tr + +// Used by Northern Cyprus +nc.tr + +// Used by government agencies of Northern Cyprus +gov.nc.tr + +// travel : https://en.wikipedia.org/wiki/.travel +travel + +// tt : http://www.nic.tt/ +tt +co.tt +com.tt +org.tt +net.tt +biz.tt +info.tt +pro.tt +int.tt +coop.tt +jobs.tt +mobi.tt +travel.tt +museum.tt +aero.tt +name.tt +gov.tt +edu.tt + +// tv : https://en.wikipedia.org/wiki/.tv +// Not listing any 2LDs as reserved since none seem to exist in practice, +// Wikipedia notwithstanding. +tv + +// tw : https://en.wikipedia.org/wiki/.tw +tw +edu.tw +gov.tw +mil.tw +com.tw +net.tw +org.tw +idv.tw +game.tw +ebiz.tw +club.tw +xn--zf0ao64a.tw +網路.tw +xn--uc0atv.tw +組織.tw +xn--czrw28b.tw +商業.tw + +// tz : http://www.tznic.or.tz/index.php/domains +// Submitted by registry +tz +ac.tz +co.tz +go.tz +hotel.tz +info.tz +me.tz +mil.tz +mobi.tz +ne.tz +or.tz +sc.tz +tv.tz + +// ua : https://hostmaster.ua/policy/?ua +// Submitted by registry +ua +// ua 2LD +com.ua +edu.ua +gov.ua +in.ua +net.ua +org.ua +// ua geographic names +// https://hostmaster.ua/2ld/ +cherkassy.ua +cherkasy.ua +chernigov.ua +chernihiv.ua +chernivtsi.ua +chernovtsy.ua +ck.ua +cn.ua +cr.ua +crimea.ua +cv.ua +dn.ua +dnepropetrovsk.ua +dnipropetrovsk.ua +dominic.ua +donetsk.ua +dp.ua +if.ua +ivano-frankivsk.ua +kh.ua +kharkiv.ua +kharkov.ua +kherson.ua +khmelnitskiy.ua +khmelnytskyi.ua +kiev.ua +kirovograd.ua +km.ua +kr.ua +krym.ua +ks.ua +kv.ua +kyiv.ua +lg.ua +lt.ua +lugansk.ua +lutsk.ua +lv.ua +lviv.ua +mk.ua +mykolaiv.ua +nikolaev.ua +od.ua +odesa.ua +odessa.ua +pl.ua +poltava.ua +rivne.ua +rovno.ua +rv.ua +sb.ua +sebastopol.ua +sevastopol.ua +sm.ua +sumy.ua +te.ua +ternopil.ua +uz.ua +uzhgorod.ua +vinnica.ua +vinnytsia.ua +vn.ua +volyn.ua +yalta.ua +zaporizhzhe.ua +zaporizhzhia.ua +zhitomir.ua +zhytomyr.ua +zp.ua +zt.ua + +// ug : https://www.registry.co.ug/ +ug +co.ug +or.ug +ac.ug +sc.ug +go.ug +ne.ug +com.ug +org.ug + +// uk : https://en.wikipedia.org/wiki/.uk +// Submitted by registry +uk +ac.uk +co.uk +gov.uk +ltd.uk +me.uk +net.uk +nhs.uk +org.uk +plc.uk +police.uk +*.sch.uk + +// us : https://en.wikipedia.org/wiki/.us +us +dni.us +fed.us +isa.us +kids.us +nsn.us +// us geographic names +ak.us +al.us +ar.us +as.us +az.us +ca.us +co.us +ct.us +dc.us +de.us +fl.us +ga.us +gu.us +hi.us +ia.us +id.us +il.us +in.us +ks.us +ky.us +la.us +ma.us +md.us +me.us +mi.us +mn.us +mo.us +ms.us +mt.us +nc.us +nd.us +ne.us +nh.us +nj.us +nm.us +nv.us +ny.us +oh.us +ok.us +or.us +pa.us +pr.us +ri.us +sc.us +sd.us +tn.us +tx.us +ut.us +vi.us +vt.us +va.us +wa.us +wi.us +wv.us +wy.us +// The registrar notes several more specific domains available in each state, +// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat +// haphazard; in some states these domains resolve as addresses, while in others +// only subdomains are available, or even nothing at all. We include the +// most common ones where it's clear that different sites are different +// entities. +k12.ak.us +k12.al.us +k12.ar.us +k12.as.us +k12.az.us +k12.ca.us +k12.co.us +k12.ct.us +k12.dc.us +k12.de.us +k12.fl.us +k12.ga.us +k12.gu.us +// k12.hi.us Bug 614565 - Hawaii has a state-wide DOE login +k12.ia.us +k12.id.us +k12.il.us +k12.in.us +k12.ks.us +k12.ky.us +k12.la.us +k12.ma.us +k12.md.us +k12.me.us +k12.mi.us +k12.mn.us +k12.mo.us +k12.ms.us +k12.mt.us +k12.nc.us +// k12.nd.us Bug 1028347 - Removed at request of Travis Rosso +k12.ne.us +k12.nh.us +k12.nj.us +k12.nm.us +k12.nv.us +k12.ny.us +k12.oh.us +k12.ok.us +k12.or.us +k12.pa.us +k12.pr.us +k12.ri.us +k12.sc.us +// k12.sd.us Bug 934131 - Removed at request of James Booze +k12.tn.us +k12.tx.us +k12.ut.us +k12.vi.us +k12.vt.us +k12.va.us +k12.wa.us +k12.wi.us +// k12.wv.us Bug 947705 - Removed at request of Verne Britton +k12.wy.us +cc.ak.us +cc.al.us +cc.ar.us +cc.as.us +cc.az.us +cc.ca.us +cc.co.us +cc.ct.us +cc.dc.us +cc.de.us +cc.fl.us +cc.ga.us +cc.gu.us +cc.hi.us +cc.ia.us +cc.id.us +cc.il.us +cc.in.us +cc.ks.us +cc.ky.us +cc.la.us +cc.ma.us +cc.md.us +cc.me.us +cc.mi.us +cc.mn.us +cc.mo.us +cc.ms.us +cc.mt.us +cc.nc.us +cc.nd.us +cc.ne.us +cc.nh.us +cc.nj.us +cc.nm.us +cc.nv.us +cc.ny.us +cc.oh.us +cc.ok.us +cc.or.us +cc.pa.us +cc.pr.us +cc.ri.us +cc.sc.us +cc.sd.us +cc.tn.us +cc.tx.us +cc.ut.us +cc.vi.us +cc.vt.us +cc.va.us +cc.wa.us +cc.wi.us +cc.wv.us +cc.wy.us +lib.ak.us +lib.al.us +lib.ar.us +lib.as.us +lib.az.us +lib.ca.us +lib.co.us +lib.ct.us +lib.dc.us +// lib.de.us Issue #243 - Moved to Private section at request of Ed Moore +lib.fl.us +lib.ga.us +lib.gu.us +lib.hi.us +lib.ia.us +lib.id.us +lib.il.us +lib.in.us +lib.ks.us +lib.ky.us +lib.la.us +lib.ma.us +lib.md.us +lib.me.us +lib.mi.us +lib.mn.us +lib.mo.us +lib.ms.us +lib.mt.us +lib.nc.us +lib.nd.us +lib.ne.us +lib.nh.us +lib.nj.us +lib.nm.us +lib.nv.us +lib.ny.us +lib.oh.us +lib.ok.us +lib.or.us +lib.pa.us +lib.pr.us +lib.ri.us +lib.sc.us +lib.sd.us +lib.tn.us +lib.tx.us +lib.ut.us +lib.vi.us +lib.vt.us +lib.va.us +lib.wa.us +lib.wi.us +// lib.wv.us Bug 941670 - Removed at request of Larry W Arnold +lib.wy.us +// k12.ma.us contains school districts in Massachusetts. The 4LDs are +// managed independently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated directly to the +// 5LD operators. +pvt.k12.ma.us +chtr.k12.ma.us +paroch.k12.ma.us + +// uy : http://www.nic.org.uy/ +uy +com.uy +edu.uy +gub.uy +mil.uy +net.uy +org.uy + +// uz : http://www.reg.uz/ +uz +co.uz +com.uz +net.uz +org.uz + +// va : https://en.wikipedia.org/wiki/.va +va + +// vc : https://en.wikipedia.org/wiki/.vc +// Submitted by registry +vc +com.vc +net.vc +org.vc +gov.vc +mil.vc +edu.vc + +// ve : https://registro.nic.ve/ +// Submitted by registry +ve +arts.ve +co.ve +com.ve +e12.ve +edu.ve +firm.ve +gob.ve +gov.ve +info.ve +int.ve +mil.ve +net.ve +org.ve +rec.ve +store.ve +tec.ve +web.ve + +// vg : https://en.wikipedia.org/wiki/.vg +vg + +// vi : http://www.nic.vi/newdomainform.htm +// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other +// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they +// are available for registration (which they do not seem to be). +vi +co.vi +com.vi +k12.vi +net.vi +org.vi + +// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp +vn +com.vn +net.vn +org.vn +edu.vn +gov.vn +int.vn +ac.vn +biz.vn +info.vn +name.vn +pro.vn +health.vn + +// vu : https://en.wikipedia.org/wiki/.vu +// http://www.vunic.vu/ +vu +com.vu +edu.vu +net.vu +org.vu + +// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +wf + +// ws : https://en.wikipedia.org/wiki/.ws +// http://samoanic.ws/index.dhtml +ws +com.ws +net.ws +org.ws +gov.ws +edu.ws + +// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +yt + +// IDN ccTLDs +// When submitting patches, please maintain a sort by ISO 3166 ccTLD, then +// U-label, and follow this format: +// // A-Label ("", [, variant info]) : +// // [sponsoring org] +// U-Label + +// xn--mgbaam7a8h ("Emerat", Arabic) : AE +// http://nic.ae/english/arabicdomain/rules.jsp +xn--mgbaam7a8h +امارات + +// xn--y9a3aq ("hye", Armenian) : AM +// ISOC AM (operated by .am Registry) +xn--y9a3aq +հայ + +// xn--54b7fta0cc ("Bangla", Bangla) : BD +xn--54b7fta0cc +বাংলা + +// xn--90ais ("bel", Belarusian/Russian Cyrillic) : BY +// Operated by .by registry +xn--90ais +бел + +// xn--fiqs8s ("Zhongguo/China", Chinese, Simplified) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +xn--fiqs8s +中国 + +// xn--fiqz9s ("Zhongguo/China", Chinese, Traditional) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +xn--fiqz9s +中國 + +// xn--lgbbat1ad8j ("Algeria/Al Jazair", Arabic) : DZ +xn--lgbbat1ad8j +الجزائر + +// xn--wgbh1c ("Egypt/Masr", Arabic) : EG +// http://www.dotmasr.eg/ +xn--wgbh1c +مصر + +// xn--e1a4c ("eu", Cyrillic) : EU +xn--e1a4c +ею + +// xn--node ("ge", Georgian Mkhedruli) : GE +xn--node +გე + +// xn--qxam ("el", Greek) : GR +// Hellenic Ministry of Infrastructure, Transport, and Networks +xn--qxam +ελ + +// xn--j6w193g ("Hong Kong", Chinese) : HK +// https://www2.hkirc.hk/register/rules.jsp +xn--j6w193g +香港 + +// xn--h2brj9c ("Bharat", Devanagari) : IN +// India +xn--h2brj9c +भारत + +// xn--mgbbh1a71e ("Bharat", Arabic) : IN +// India +xn--mgbbh1a71e +بھارت + +// xn--fpcrj9c3d ("Bharat", Telugu) : IN +// India +xn--fpcrj9c3d +భారత్ + +// xn--gecrj9c ("Bharat", Gujarati) : IN +// India +xn--gecrj9c +ભારત + +// xn--s9brj9c ("Bharat", Gurmukhi) : IN +// India +xn--s9brj9c +ਭਾਰਤ + +// xn--45brj9c ("Bharat", Bengali) : IN +// India +xn--45brj9c +ভারত + +// xn--xkc2dl3a5ee0h ("India", Tamil) : IN +// India +xn--xkc2dl3a5ee0h +இந்தியா + +// xn--mgba3a4f16a ("Iran", Persian) : IR +xn--mgba3a4f16a +ایران + +// xn--mgba3a4fra ("Iran", Arabic) : IR +xn--mgba3a4fra +ايران + +// xn--mgbtx2b ("Iraq", Arabic) : IQ +// Communications and Media Commission +xn--mgbtx2b +عراق + +// xn--mgbayh7gpa ("al-Ordon", Arabic) : JO +// National Information Technology Center (NITC) +// Royal Scientific Society, Al-Jubeiha +xn--mgbayh7gpa +الاردن + +// xn--3e0b707e ("Republic of Korea", Hangul) : KR +xn--3e0b707e +한국 + +// xn--80ao21a ("Kaz", Kazakh) : KZ +xn--80ao21a +қаз + +// xn--fzc2c9e2c ("Lanka", Sinhalese-Sinhala) : LK +// http://nic.lk +xn--fzc2c9e2c +ලංකා + +// xn--xkc2al3hye2a ("Ilangai", Tamil) : LK +// http://nic.lk +xn--xkc2al3hye2a +இலங்கை + +// xn--mgbc0a9azcg ("Morocco/al-Maghrib", Arabic) : MA +xn--mgbc0a9azcg +المغرب + +// xn--d1alf ("mkd", Macedonian) : MK +// MARnet +xn--d1alf +мкд + +// xn--l1acc ("mon", Mongolian) : MN +xn--l1acc +мон + +// xn--mix891f ("Macao", Chinese, Traditional) : MO +// MONIC / HNET Asia (Registry Operator for .mo) +xn--mix891f +澳門 + +// xn--mix082f ("Macao", Chinese, Simplified) : MO +xn--mix082f +澳门 + +// xn--mgbx4cd0ab ("Malaysia", Malay) : MY +xn--mgbx4cd0ab +مليسيا + +// xn--mgb9awbf ("Oman", Arabic) : OM +xn--mgb9awbf +عمان + +// xn--mgbai9azgqp6j ("Pakistan", Urdu/Arabic) : PK +xn--mgbai9azgqp6j +پاکستان + +// xn--mgbai9a5eva00b ("Pakistan", Urdu/Arabic, variant) : PK +xn--mgbai9a5eva00b +پاكستان + +// xn--ygbi2ammx ("Falasteen", Arabic) : PS +// The Palestinian National Internet Naming Authority (PNINA) +// http://www.pnina.ps +xn--ygbi2ammx +فلسطين + +// xn--90a3ac ("srb", Cyrillic) : RS +// https://www.rnids.rs/en/domains/national-domains +xn--90a3ac +срб +xn--o1ac.xn--90a3ac +пр.срб +xn--c1avg.xn--90a3ac +орг.срб +xn--90azh.xn--90a3ac +обр.срб +xn--d1at.xn--90a3ac +од.срб +xn--o1ach.xn--90a3ac +упр.срб +xn--80au.xn--90a3ac +ак.срб + +// xn--p1ai ("rf", Russian-Cyrillic) : RU +// http://www.cctld.ru/en/docs/rulesrf.php +xn--p1ai +рф + +// xn--wgbl6a ("Qatar", Arabic) : QA +// http://www.ict.gov.qa/ +xn--wgbl6a +قطر + +// xn--mgberp4a5d4ar ("AlSaudiah", Arabic) : SA +// http://www.nic.net.sa/ +xn--mgberp4a5d4ar +السعودية + +// xn--mgberp4a5d4a87g ("AlSaudiah", Arabic, variant) : SA +xn--mgberp4a5d4a87g +السعودیة + +// xn--mgbqly7c0a67fbc ("AlSaudiah", Arabic, variant) : SA +xn--mgbqly7c0a67fbc +السعودیۃ + +// xn--mgbqly7cvafr ("AlSaudiah", Arabic, variant) : SA +xn--mgbqly7cvafr +السعوديه + +// xn--mgbpl2fh ("sudan", Arabic) : SD +// Operated by .sd registry +xn--mgbpl2fh +سودان + +// xn--yfro4i67o Singapore ("Singapore", Chinese) : SG +xn--yfro4i67o +新加坡 + +// xn--clchc0ea0b2g2a9gcd ("Singapore", Tamil) : SG +xn--clchc0ea0b2g2a9gcd +சிங்கப்பூர் + +// xn--ogbpf8fl ("Syria", Arabic) : SY +xn--ogbpf8fl +سورية + +// xn--mgbtf8fl ("Syria", Arabic, variant) : SY +xn--mgbtf8fl +سوريا + +// xn--o3cw4h ("Thai", Thai) : TH +// http://www.thnic.co.th +xn--o3cw4h +ไทย + +// xn--pgbs0dh ("Tunisia", Arabic) : TN +// http://nic.tn +xn--pgbs0dh +تونس + +// xn--kpry57d ("Taiwan", Chinese, Traditional) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +xn--kpry57d +台灣 + +// xn--kprw13d ("Taiwan", Chinese, Simplified) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +xn--kprw13d +台湾 + +// xn--nnx388a ("Taiwan", Chinese, variant) : TW +xn--nnx388a +臺灣 + +// xn--j1amh ("ukr", Cyrillic) : UA +xn--j1amh +укр + +// xn--mgb2ddes ("AlYemen", Arabic) : YE +xn--mgb2ddes +اليمن + +// xxx : http://icmregistry.com +xxx + +// ye : http://www.y.net.ye/services/domain_name.htm +*.ye + +// za : http://www.zadna.org.za/content/page/domain-information +ac.za +agric.za +alt.za +co.za +edu.za +gov.za +grondar.za +law.za +mil.za +net.za +ngo.za +nis.za +nom.za +org.za +school.za +tm.za +web.za + +// zm : https://zicta.zm/ +// Submitted by registry +zm +ac.zm +biz.zm +co.zm +com.zm +edu.zm +gov.zm +info.zm +mil.zm +net.zm +org.zm +sch.zm + +// zw : https://en.wikipedia.org/wiki/.zw +*.zw + + +// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2016-11-29T01:06:51Z + +// aaa : 2015-02-26 American Automobile Association, Inc. +aaa + +// aarp : 2015-05-21 AARP +aarp + +// abarth : 2015-07-30 Fiat Chrysler Automobiles N.V. +abarth + +// abb : 2014-10-24 ABB Ltd +abb + +// abbott : 2014-07-24 Abbott Laboratories, Inc. +abbott + +// abbvie : 2015-07-30 AbbVie Inc. +abbvie + +// abc : 2015-07-30 Disney Enterprises, Inc. +abc + +// able : 2015-06-25 Able Inc. +able + +// abogado : 2014-04-24 Top Level Domain Holdings Limited +abogado + +// abudhabi : 2015-07-30 Abu Dhabi Systems and Information Centre +abudhabi + +// academy : 2013-11-07 Half Oaks, LLC +academy + +// accenture : 2014-08-15 Accenture plc +accenture + +// accountant : 2014-11-20 dot Accountant Limited +accountant + +// accountants : 2014-03-20 Knob Town, LLC +accountants + +// aco : 2015-01-08 ACO Severin Ahlmann GmbH & Co. KG +aco + +// active : 2014-05-01 The Active Network, Inc +active + +// actor : 2013-12-12 United TLD Holdco Ltd. +actor + +// adac : 2015-07-16 Allgemeiner Deutscher Automobil-Club e.V. (ADAC) +adac + +// ads : 2014-12-04 Charleston Road Registry Inc. +ads + +// adult : 2014-10-16 ICM Registry AD LLC +adult + +// aeg : 2015-03-19 Aktiebolaget Electrolux +aeg + +// aetna : 2015-05-21 Aetna Life Insurance Company +aetna + +// afamilycompany : 2015-07-23 Johnson Shareholdings, Inc. +afamilycompany + +// afl : 2014-10-02 Australian Football League +afl + +// africa : 2014-03-24 ZA Central Registry NPC trading as Registry.Africa +africa + +// agakhan : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) +agakhan + +// agency : 2013-11-14 Steel Falls, LLC +agency + +// aig : 2014-12-18 American International Group, Inc. +aig + +// aigo : 2015-08-06 aigo Digital Technology Co,Ltd. +aigo + +// airbus : 2015-07-30 Airbus S.A.S. +airbus + +// airforce : 2014-03-06 United TLD Holdco Ltd. +airforce + +// airtel : 2014-10-24 Bharti Airtel Limited +airtel + +// akdn : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) +akdn + +// alfaromeo : 2015-07-31 Fiat Chrysler Automobiles N.V. +alfaromeo + +// alibaba : 2015-01-15 Alibaba Group Holding Limited +alibaba + +// alipay : 2015-01-15 Alibaba Group Holding Limited +alipay + +// allfinanz : 2014-07-03 Allfinanz Deutsche Vermögensberatung Aktiengesellschaft +allfinanz + +// allstate : 2015-07-31 Allstate Fire and Casualty Insurance Company +allstate + +// ally : 2015-06-18 Ally Financial Inc. +ally + +// alsace : 2014-07-02 REGION D ALSACE +alsace + +// alstom : 2015-07-30 ALSTOM +alstom + +// americanexpress : 2015-07-31 American Express Travel Related Services Company, Inc. +americanexpress + +// americanfamily : 2015-07-23 AmFam, Inc. +americanfamily + +// amex : 2015-07-31 American Express Travel Related Services Company, Inc. +amex + +// amfam : 2015-07-23 AmFam, Inc. +amfam + +// amica : 2015-05-28 Amica Mutual Insurance Company +amica + +// amsterdam : 2014-07-24 Gemeente Amsterdam +amsterdam + +// analytics : 2014-12-18 Campus IP LLC +analytics + +// android : 2014-08-07 Charleston Road Registry Inc. +android + +// anquan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +anquan + +// anz : 2015-07-31 Australia and New Zealand Banking Group Limited +anz + +// aol : 2015-09-17 AOL Inc. +aol + +// apartments : 2014-12-11 June Maple, LLC +apartments + +// app : 2015-05-14 Charleston Road Registry Inc. +app + +// apple : 2015-05-14 Apple Inc. +apple + +// aquarelle : 2014-07-24 Aquarelle.com +aquarelle + +// arab : 2015-11-12 League of Arab States +arab + +// aramco : 2014-11-20 Aramco Services Company +aramco + +// archi : 2014-02-06 STARTING DOT LIMITED +archi + +// army : 2014-03-06 United TLD Holdco Ltd. +army + +// art : 2016-03-24 UK Creative Ideas Limited +art + +// arte : 2014-12-11 Association Relative à la Télévision Européenne G.E.I.E. +arte + +// asda : 2015-07-31 Wal-Mart Stores, Inc. +asda + +// associates : 2014-03-06 Baxter Hill, LLC +associates + +// athleta : 2015-07-30 The Gap, Inc. +athleta + +// attorney : 2014-03-20 +attorney + +// auction : 2014-03-20 +auction + +// audi : 2015-05-21 AUDI Aktiengesellschaft +audi + +// audible : 2015-06-25 Amazon EU S.à r.l. +audible + +// audio : 2014-03-20 Uniregistry, Corp. +audio + +// auspost : 2015-08-13 Australian Postal Corporation +auspost + +// author : 2014-12-18 Amazon EU S.à r.l. +author + +// auto : 2014-11-13 +auto + +// autos : 2014-01-09 DERAutos, LLC +autos + +// avianca : 2015-01-08 Aerovias del Continente Americano S.A. Avianca +avianca + +// aws : 2015-06-25 Amazon EU S.à r.l. +aws + +// axa : 2013-12-19 AXA SA +axa + +// azure : 2014-12-18 Microsoft Corporation +azure + +// baby : 2015-04-09 Johnson & Johnson Services, Inc. +baby + +// baidu : 2015-01-08 Baidu, Inc. +baidu + +// banamex : 2015-07-30 Citigroup Inc. +banamex + +// bananarepublic : 2015-07-31 The Gap, Inc. +bananarepublic + +// band : 2014-06-12 +band + +// bank : 2014-09-25 fTLD Registry Services LLC +bank + +// bar : 2013-12-12 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable +bar + +// barcelona : 2014-07-24 Municipi de Barcelona +barcelona + +// barclaycard : 2014-11-20 Barclays Bank PLC +barclaycard + +// barclays : 2014-11-20 Barclays Bank PLC +barclays + +// barefoot : 2015-06-11 Gallo Vineyards, Inc. +barefoot + +// bargains : 2013-11-14 Half Hallow, LLC +bargains + +// baseball : 2015-10-29 MLB Advanced Media DH, LLC +baseball + +// basketball : 2015-08-20 Fédération Internationale de Basketball (FIBA) +basketball + +// bauhaus : 2014-04-17 Werkhaus GmbH +bauhaus + +// bayern : 2014-01-23 Bayern Connect GmbH +bayern + +// bbc : 2014-12-18 British Broadcasting Corporation +bbc + +// bbt : 2015-07-23 BB&T Corporation +bbt + +// bbva : 2014-10-02 BANCO BILBAO VIZCAYA ARGENTARIA, S.A. +bbva + +// bcg : 2015-04-02 The Boston Consulting Group, Inc. +bcg + +// bcn : 2014-07-24 Municipi de Barcelona +bcn + +// beats : 2015-05-14 Beats Electronics, LLC +beats + +// beauty : 2015-12-03 L'Oréal +beauty + +// beer : 2014-01-09 Top Level Domain Holdings Limited +beer + +// bentley : 2014-12-18 Bentley Motors Limited +bentley + +// berlin : 2013-10-31 dotBERLIN GmbH & Co. KG +berlin + +// best : 2013-12-19 BestTLD Pty Ltd +best + +// bestbuy : 2015-07-31 BBY Solutions, Inc. +bestbuy + +// bet : 2015-05-07 Afilias plc +bet + +// bharti : 2014-01-09 Bharti Enterprises (Holding) Private Limited +bharti + +// bible : 2014-06-19 American Bible Society +bible + +// bid : 2013-12-19 dot Bid Limited +bid + +// bike : 2013-08-27 Grand Hollow, LLC +bike + +// bing : 2014-12-18 Microsoft Corporation +bing + +// bingo : 2014-12-04 Sand Cedar, LLC +bingo + +// bio : 2014-03-06 STARTING DOT LIMITED +bio + +// black : 2014-01-16 Afilias Limited +black + +// blackfriday : 2014-01-16 Uniregistry, Corp. +blackfriday + +// blanco : 2015-07-16 BLANCO GmbH + Co KG +blanco + +// blockbuster : 2015-07-30 Dish DBS Corporation +blockbuster + +// blog : 2015-05-14 +blog + +// bloomberg : 2014-07-17 Bloomberg IP Holdings LLC +bloomberg + +// blue : 2013-11-07 Afilias Limited +blue + +// bms : 2014-10-30 Bristol-Myers Squibb Company +bms + +// bmw : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft +bmw + +// bnl : 2014-07-24 Banca Nazionale del Lavoro +bnl + +// bnpparibas : 2014-05-29 BNP Paribas +bnpparibas + +// boats : 2014-12-04 DERBoats, LLC +boats + +// boehringer : 2015-07-09 Boehringer Ingelheim International GmbH +boehringer + +// bofa : 2015-07-31 NMS Services, Inc. +bofa + +// bom : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br +bom + +// bond : 2014-06-05 Bond University Limited +bond + +// boo : 2014-01-30 Charleston Road Registry Inc. +boo + +// book : 2015-08-27 Amazon EU S.à r.l. +book + +// booking : 2015-07-16 Booking.com B.V. +booking + +// boots : 2015-01-08 THE BOOTS COMPANY PLC +boots + +// bosch : 2015-06-18 Robert Bosch GMBH +bosch + +// bostik : 2015-05-28 Bostik SA +bostik + +// boston : 2015-12-10 +boston + +// bot : 2014-12-18 Amazon EU S.à r.l. +bot + +// boutique : 2013-11-14 Over Galley, LLC +boutique + +// box : 2015-11-12 NS1 Limited +box + +// bradesco : 2014-12-18 Banco Bradesco S.A. +bradesco + +// bridgestone : 2014-12-18 Bridgestone Corporation +bridgestone + +// broadway : 2014-12-22 Celebrate Broadway, Inc. +broadway + +// broker : 2014-12-11 IG Group Holdings PLC +broker + +// brother : 2015-01-29 Brother Industries, Ltd. +brother + +// brussels : 2014-02-06 DNS.be vzw +brussels + +// budapest : 2013-11-21 Top Level Domain Holdings Limited +budapest + +// bugatti : 2015-07-23 Bugatti International SA +bugatti + +// build : 2013-11-07 Plan Bee LLC +build + +// builders : 2013-11-07 Atomic Madison, LLC +builders + +// business : 2013-11-07 Spring Cross, LLC +business + +// buy : 2014-12-18 Amazon EU S.à r.l. +buy + +// buzz : 2013-10-02 DOTSTRATEGY CO. +buzz + +// bzh : 2014-02-27 Association www.bzh +bzh + +// cab : 2013-10-24 Half Sunset, LLC +cab + +// cafe : 2015-02-11 Pioneer Canyon, LLC +cafe + +// cal : 2014-07-24 Charleston Road Registry Inc. +cal + +// call : 2014-12-18 Amazon EU S.à r.l. +call + +// calvinklein : 2015-07-30 PVH gTLD Holdings LLC +calvinklein + +// cam : 2016-04-21 AC Webconnecting Holding B.V. +cam + +// camera : 2013-08-27 Atomic Maple, LLC +camera + +// camp : 2013-11-07 Delta Dynamite, LLC +camp + +// cancerresearch : 2014-05-15 Australian Cancer Research Foundation +cancerresearch + +// canon : 2014-09-12 Canon Inc. +canon + +// capetown : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +capetown + +// capital : 2014-03-06 Delta Mill, LLC +capital + +// capitalone : 2015-08-06 Capital One Financial Corporation +capitalone + +// car : 2015-01-22 +car + +// caravan : 2013-12-12 Caravan International, Inc. +caravan + +// cards : 2013-12-05 Foggy Hollow, LLC +cards + +// care : 2014-03-06 Goose Cross +care + +// career : 2013-10-09 dotCareer LLC +career + +// careers : 2013-10-02 Wild Corner, LLC +careers + +// cars : 2014-11-13 +cars + +// cartier : 2014-06-23 Richemont DNS Inc. +cartier + +// casa : 2013-11-21 Top Level Domain Holdings Limited +casa + +// case : 2015-09-03 CNH Industrial N.V. +case + +// caseih : 2015-09-03 CNH Industrial N.V. +caseih + +// cash : 2014-03-06 Delta Lake, LLC +cash + +// casino : 2014-12-18 Binky Sky, LLC +casino + +// catering : 2013-12-05 New Falls. LLC +catering + +// catholic : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +catholic + +// cba : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA +cba + +// cbn : 2014-08-22 The Christian Broadcasting Network, Inc. +cbn + +// cbre : 2015-07-02 CBRE, Inc. +cbre + +// cbs : 2015-08-06 CBS Domains Inc. +cbs + +// ceb : 2015-04-09 The Corporate Executive Board Company +ceb + +// center : 2013-11-07 Tin Mill, LLC +center + +// ceo : 2013-11-07 CEOTLD Pty Ltd +ceo + +// cern : 2014-06-05 European Organization for Nuclear Research ("CERN") +cern + +// cfa : 2014-08-28 CFA Institute +cfa + +// cfd : 2014-12-11 IG Group Holdings PLC +cfd + +// chanel : 2015-04-09 Chanel International B.V. +chanel + +// channel : 2014-05-08 Charleston Road Registry Inc. +channel + +// chase : 2015-04-30 JPMorgan Chase & Co. +chase + +// chat : 2014-12-04 Sand Fields, LLC +chat + +// cheap : 2013-11-14 Sand Cover, LLC +cheap + +// chintai : 2015-06-11 CHINTAI Corporation +chintai + +// chloe : 2014-10-16 Richemont DNS Inc. +chloe + +// christmas : 2013-11-21 Uniregistry, Corp. +christmas + +// chrome : 2014-07-24 Charleston Road Registry Inc. +chrome + +// chrysler : 2015-07-30 FCA US LLC. +chrysler + +// church : 2014-02-06 Holly Fields, LLC +church + +// cipriani : 2015-02-19 Hotel Cipriani Srl +cipriani + +// circle : 2014-12-18 Amazon EU S.à r.l. +circle + +// cisco : 2014-12-22 Cisco Technology, Inc. +cisco + +// citadel : 2015-07-23 Citadel Domain LLC +citadel + +// citi : 2015-07-30 Citigroup Inc. +citi + +// citic : 2014-01-09 CITIC Group Corporation +citic + +// city : 2014-05-29 Snow Sky, LLC +city + +// cityeats : 2014-12-11 Lifestyle Domain Holdings, Inc. +cityeats + +// claims : 2014-03-20 Black Corner, LLC +claims + +// cleaning : 2013-12-05 Fox Shadow, LLC +cleaning + +// click : 2014-06-05 Uniregistry, Corp. +click + +// clinic : 2014-03-20 Goose Park, LLC +clinic + +// clinique : 2015-10-01 The Estée Lauder Companies Inc. +clinique + +// clothing : 2013-08-27 Steel Lake, LLC +clothing + +// cloud : 2015-04-16 ARUBA S.p.A. +cloud + +// club : 2013-11-08 .CLUB DOMAINS, LLC +club + +// clubmed : 2015-06-25 Club Méditerranée S.A. +clubmed + +// coach : 2014-10-09 Koko Island, LLC +coach + +// codes : 2013-10-31 Puff Willow, LLC +codes + +// coffee : 2013-10-17 Trixy Cover, LLC +coffee + +// college : 2014-01-16 XYZ.COM LLC +college + +// cologne : 2014-02-05 NetCologne Gesellschaft für Telekommunikation mbH +cologne + +// comcast : 2015-07-23 Comcast IP Holdings I, LLC +comcast + +// commbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA +commbank + +// community : 2013-12-05 Fox Orchard, LLC +community + +// company : 2013-11-07 Silver Avenue, LLC +company + +// compare : 2015-10-08 iSelect Ltd +compare + +// computer : 2013-10-24 Pine Mill, LLC +computer + +// comsec : 2015-01-08 VeriSign, Inc. +comsec + +// condos : 2013-12-05 Pine House, LLC +condos + +// construction : 2013-09-16 Fox Dynamite, LLC +construction + +// consulting : 2013-12-05 +consulting + +// contact : 2015-01-08 Top Level Spectrum, Inc. +contact + +// contractors : 2013-09-10 Magic Woods, LLC +contractors + +// cooking : 2013-11-21 Top Level Domain Holdings Limited +cooking + +// cookingchannel : 2015-07-02 Lifestyle Domain Holdings, Inc. +cookingchannel + +// cool : 2013-11-14 Koko Lake, LLC +cool + +// corsica : 2014-09-25 Collectivité Territoriale de Corse +corsica + +// country : 2013-12-19 Top Level Domain Holdings Limited +country + +// coupon : 2015-02-26 Amazon EU S.à r.l. +coupon + +// coupons : 2015-03-26 Black Island, LLC +coupons + +// courses : 2014-12-04 OPEN UNIVERSITIES AUSTRALIA PTY LTD +courses + +// credit : 2014-03-20 Snow Shadow, LLC +credit + +// creditcard : 2014-03-20 Binky Frostbite, LLC +creditcard + +// creditunion : 2015-01-22 CUNA Performance Resources, LLC +creditunion + +// cricket : 2014-10-09 dot Cricket Limited +cricket + +// crown : 2014-10-24 Crown Equipment Corporation +crown + +// crs : 2014-04-03 Federated Co-operatives Limited +crs + +// cruise : 2015-12-10 Viking River Cruises (Bermuda) Ltd. +cruise + +// cruises : 2013-12-05 Spring Way, LLC +cruises + +// csc : 2014-09-25 Alliance-One Services, Inc. +csc + +// cuisinella : 2014-04-03 SALM S.A.S. +cuisinella + +// cymru : 2014-05-08 Nominet UK +cymru + +// cyou : 2015-01-22 Beijing Gamease Age Digital Technology Co., Ltd. +cyou + +// dabur : 2014-02-06 Dabur India Limited +dabur + +// dad : 2014-01-23 Charleston Road Registry Inc. +dad + +// dance : 2013-10-24 United TLD Holdco Ltd. +dance + +// data : 2016-06-02 Dish DBS Corporation +data + +// date : 2014-11-20 dot Date Limited +date + +// dating : 2013-12-05 Pine Fest, LLC +dating + +// datsun : 2014-03-27 NISSAN MOTOR CO., LTD. +datsun + +// day : 2014-01-30 Charleston Road Registry Inc. +day + +// dclk : 2014-11-20 Charleston Road Registry Inc. +dclk + +// dds : 2015-05-07 Top Level Domain Holdings Limited +dds + +// deal : 2015-06-25 Amazon EU S.à r.l. +deal + +// dealer : 2014-12-22 Dealer Dot Com, Inc. +dealer + +// deals : 2014-05-22 Sand Sunset, LLC +deals + +// degree : 2014-03-06 +degree + +// delivery : 2014-09-11 Steel Station, LLC +delivery + +// dell : 2014-10-24 Dell Inc. +dell + +// deloitte : 2015-07-31 Deloitte Touche Tohmatsu +deloitte + +// delta : 2015-02-19 Delta Air Lines, Inc. +delta + +// democrat : 2013-10-24 United TLD Holdco Ltd. +democrat + +// dental : 2014-03-20 Tin Birch, LLC +dental + +// dentist : 2014-03-20 +dentist + +// desi : 2013-11-14 Desi Networks LLC +desi + +// design : 2014-11-07 Top Level Design, LLC +design + +// dev : 2014-10-16 Charleston Road Registry Inc. +dev + +// dhl : 2015-07-23 Deutsche Post AG +dhl + +// diamonds : 2013-09-22 John Edge, LLC +diamonds + +// diet : 2014-06-26 Uniregistry, Corp. +diet + +// digital : 2014-03-06 Dash Park, LLC +digital + +// direct : 2014-04-10 Half Trail, LLC +direct + +// directory : 2013-09-20 Extra Madison, LLC +directory + +// discount : 2014-03-06 Holly Hill, LLC +discount + +// discover : 2015-07-23 Discover Financial Services +discover + +// dish : 2015-07-30 Dish DBS Corporation +dish + +// diy : 2015-11-05 Lifestyle Domain Holdings, Inc. +diy + +// dnp : 2013-12-13 Dai Nippon Printing Co., Ltd. +dnp + +// docs : 2014-10-16 Charleston Road Registry Inc. +docs + +// doctor : 2016-06-02 Brice Trail, LLC +doctor + +// dodge : 2015-07-30 FCA US LLC. +dodge + +// dog : 2014-12-04 Koko Mill, LLC +dog + +// doha : 2014-09-18 Communications Regulatory Authority (CRA) +doha + +// domains : 2013-10-17 Sugar Cross, LLC +domains + +// dot : 2015-05-21 Dish DBS Corporation +dot + +// download : 2014-11-20 dot Support Limited +download + +// drive : 2015-03-05 Charleston Road Registry Inc. +drive + +// dtv : 2015-06-04 Dish DBS Corporation +dtv + +// dubai : 2015-01-01 Dubai Smart Government Department +dubai + +// duck : 2015-07-23 Johnson Shareholdings, Inc. +duck + +// dunlop : 2015-07-02 The Goodyear Tire & Rubber Company +dunlop + +// duns : 2015-08-06 The Dun & Bradstreet Corporation +duns + +// dupont : 2015-06-25 E. I. du Pont de Nemours and Company +dupont + +// durban : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +durban + +// dvag : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +dvag + +// dvr : 2016-05-26 Hughes Satellite Systems Corporation +dvr + +// dwg : 2015-07-23 Autodesk, Inc. +dwg + +// earth : 2014-12-04 Interlink Co., Ltd. +earth + +// eat : 2014-01-23 Charleston Road Registry Inc. +eat + +// eco : 2016-07-08 Big Room Inc. +eco + +// edeka : 2014-12-18 EDEKA Verband kaufmännischer Genossenschaften e.V. +edeka + +// education : 2013-11-07 Brice Way, LLC +education + +// email : 2013-10-31 Spring Madison, LLC +email + +// emerck : 2014-04-03 Merck KGaA +emerck + +// energy : 2014-09-11 Binky Birch, LLC +energy + +// engineer : 2014-03-06 United TLD Holdco Ltd. +engineer + +// engineering : 2014-03-06 Romeo Canyon +engineering + +// enterprises : 2013-09-20 Snow Oaks, LLC +enterprises + +// epost : 2015-07-23 Deutsche Post AG +epost + +// epson : 2014-12-04 Seiko Epson Corporation +epson + +// equipment : 2013-08-27 Corn Station, LLC +equipment + +// ericsson : 2015-07-09 Telefonaktiebolaget L M Ericsson +ericsson + +// erni : 2014-04-03 ERNI Group Holding AG +erni + +// esq : 2014-05-08 Charleston Road Registry Inc. +esq + +// estate : 2013-08-27 Trixy Park, LLC +estate + +// esurance : 2015-07-23 Esurance Insurance Company +esurance + +// etisalat : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +etisalat + +// eurovision : 2014-04-24 European Broadcasting Union (EBU) +eurovision + +// eus : 2013-12-12 Puntueus Fundazioa +eus + +// events : 2013-12-05 Pioneer Maple, LLC +events + +// everbank : 2014-05-15 EverBank +everbank + +// exchange : 2014-03-06 Spring Falls, LLC +exchange + +// expert : 2013-11-21 Magic Pass, LLC +expert + +// exposed : 2013-12-05 Victor Beach, LLC +exposed + +// express : 2015-02-11 Sea Sunset, LLC +express + +// extraspace : 2015-05-14 Extra Space Storage LLC +extraspace + +// fage : 2014-12-18 Fage International S.A. +fage + +// fail : 2014-03-06 Atomic Pipe, LLC +fail + +// fairwinds : 2014-11-13 FairWinds Partners, LLC +fairwinds + +// faith : 2014-11-20 dot Faith Limited +faith + +// family : 2015-04-02 +family + +// fan : 2014-03-06 +fan + +// fans : 2014-11-07 Asiamix Digital Limited +fans + +// farm : 2013-11-07 Just Maple, LLC +farm + +// farmers : 2015-07-09 Farmers Insurance Exchange +farmers + +// fashion : 2014-07-03 Top Level Domain Holdings Limited +fashion + +// fast : 2014-12-18 Amazon EU S.à r.l. +fast + +// fedex : 2015-08-06 Federal Express Corporation +fedex + +// feedback : 2013-12-19 Top Level Spectrum, Inc. +feedback + +// ferrari : 2015-07-31 Fiat Chrysler Automobiles N.V. +ferrari + +// ferrero : 2014-12-18 Ferrero Trading Lux S.A. +ferrero + +// fiat : 2015-07-31 Fiat Chrysler Automobiles N.V. +fiat + +// fidelity : 2015-07-30 Fidelity Brokerage Services LLC +fidelity + +// fido : 2015-08-06 Rogers Communications Partnership +fido + +// film : 2015-01-08 Motion Picture Domain Registry Pty Ltd +film + +// final : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br +final + +// finance : 2014-03-20 Cotton Cypress, LLC +finance + +// financial : 2014-03-06 Just Cover, LLC +financial + +// fire : 2015-06-25 Amazon EU S.à r.l. +fire + +// firestone : 2014-12-18 Bridgestone Corporation +firestone + +// firmdale : 2014-03-27 Firmdale Holdings Limited +firmdale + +// fish : 2013-12-12 Fox Woods, LLC +fish + +// fishing : 2013-11-21 Top Level Domain Holdings Limited +fishing + +// fit : 2014-11-07 Top Level Domain Holdings Limited +fit + +// fitness : 2014-03-06 Brice Orchard, LLC +fitness + +// flickr : 2015-04-02 Yahoo! Domain Services Inc. +flickr + +// flights : 2013-12-05 Fox Station, LLC +flights + +// flir : 2015-07-23 FLIR Systems, Inc. +flir + +// florist : 2013-11-07 Half Cypress, LLC +florist + +// flowers : 2014-10-09 Uniregistry, Corp. +flowers + +// fly : 2014-05-08 Charleston Road Registry Inc. +fly + +// foo : 2014-01-23 Charleston Road Registry Inc. +foo + +// food : 2016-04-21 Lifestyle Domain Holdings, Inc. +food + +// foodnetwork : 2015-07-02 Lifestyle Domain Holdings, Inc. +foodnetwork + +// football : 2014-12-18 Foggy Farms, LLC +football + +// ford : 2014-11-13 Ford Motor Company +ford + +// forex : 2014-12-11 IG Group Holdings PLC +forex + +// forsale : 2014-05-22 +forsale + +// forum : 2015-04-02 Fegistry, LLC +forum + +// foundation : 2013-12-05 John Dale, LLC +foundation + +// fox : 2015-09-11 FOX Registry, LLC +fox + +// free : 2015-12-10 Amazon EU S.à r.l. +free + +// fresenius : 2015-07-30 Fresenius Immobilien-Verwaltungs-GmbH +fresenius + +// frl : 2014-05-15 FRLregistry B.V. +frl + +// frogans : 2013-12-19 OP3FT +frogans + +// frontdoor : 2015-07-02 Lifestyle Domain Holdings, Inc. +frontdoor + +// frontier : 2015-02-05 Frontier Communications Corporation +frontier + +// ftr : 2015-07-16 Frontier Communications Corporation +ftr + +// fujitsu : 2015-07-30 Fujitsu Limited +fujitsu + +// fujixerox : 2015-07-23 Xerox DNHC LLC +fujixerox + +// fun : 2016-01-14 +fun + +// fund : 2014-03-20 John Castle, LLC +fund + +// furniture : 2014-03-20 Lone Fields, LLC +furniture + +// futbol : 2013-09-20 +futbol + +// fyi : 2015-04-02 Silver Tigers, LLC +fyi + +// gal : 2013-11-07 Asociación puntoGAL +gal + +// gallery : 2013-09-13 Sugar House, LLC +gallery + +// gallo : 2015-06-11 Gallo Vineyards, Inc. +gallo + +// gallup : 2015-02-19 Gallup, Inc. +gallup + +// game : 2015-05-28 Uniregistry, Corp. +game + +// games : 2015-05-28 +games + +// gap : 2015-07-31 The Gap, Inc. +gap + +// garden : 2014-06-26 Top Level Domain Holdings Limited +garden + +// gbiz : 2014-07-17 Charleston Road Registry Inc. +gbiz + +// gdn : 2014-07-31 Joint Stock Company "Navigation-information systems" +gdn + +// gea : 2014-12-04 GEA Group Aktiengesellschaft +gea + +// gent : 2014-01-23 COMBELL GROUP NV/SA +gent + +// genting : 2015-03-12 Resorts World Inc Pte. Ltd. +genting + +// george : 2015-07-31 Wal-Mart Stores, Inc. +george + +// ggee : 2014-01-09 GMO Internet, Inc. +ggee + +// gift : 2013-10-17 Uniregistry, Corp. +gift + +// gifts : 2014-07-03 Goose Sky, LLC +gifts + +// gives : 2014-03-06 United TLD Holdco Ltd. +gives + +// giving : 2014-11-13 Giving Limited +giving + +// glade : 2015-07-23 Johnson Shareholdings, Inc. +glade + +// glass : 2013-11-07 Black Cover, LLC +glass + +// gle : 2014-07-24 Charleston Road Registry Inc. +gle + +// global : 2014-04-17 Dot GLOBAL AS +global + +// globo : 2013-12-19 Globo Comunicação e Participações S.A +globo + +// gmail : 2014-05-01 Charleston Road Registry Inc. +gmail + +// gmbh : 2016-01-29 Extra Dynamite, LLC +gmbh + +// gmo : 2014-01-09 GMO Internet, Inc. +gmo + +// gmx : 2014-04-24 1&1 Mail & Media GmbH +gmx + +// godaddy : 2015-07-23 Go Daddy East, LLC +godaddy + +// gold : 2015-01-22 June Edge, LLC +gold + +// goldpoint : 2014-11-20 YODOBASHI CAMERA CO.,LTD. +goldpoint + +// golf : 2014-12-18 Lone falls, LLC +golf + +// goo : 2014-12-18 NTT Resonant Inc. +goo + +// goodhands : 2015-07-31 Allstate Fire and Casualty Insurance Company +goodhands + +// goodyear : 2015-07-02 The Goodyear Tire & Rubber Company +goodyear + +// goog : 2014-11-20 Charleston Road Registry Inc. +goog + +// google : 2014-07-24 Charleston Road Registry Inc. +google + +// gop : 2014-01-16 Republican State Leadership Committee, Inc. +gop + +// got : 2014-12-18 Amazon EU S.à r.l. +got + +// grainger : 2015-05-07 Grainger Registry Services, LLC +grainger + +// graphics : 2013-09-13 Over Madison, LLC +graphics + +// gratis : 2014-03-20 Pioneer Tigers, LLC +gratis + +// green : 2014-05-08 Afilias Limited +green + +// gripe : 2014-03-06 Corn Sunset, LLC +gripe + +// grocery : 2016-06-16 Wal-Mart Stores, Inc. +grocery + +// group : 2014-08-15 Romeo Town, LLC +group + +// guardian : 2015-07-30 The Guardian Life Insurance Company of America +guardian + +// gucci : 2014-11-13 Guccio Gucci S.p.a. +gucci + +// guge : 2014-08-28 Charleston Road Registry Inc. +guge + +// guide : 2013-09-13 Snow Moon, LLC +guide + +// guitars : 2013-11-14 Uniregistry, Corp. +guitars + +// guru : 2013-08-27 Pioneer Cypress, LLC +guru + +// hair : 2015-12-03 L'Oréal +hair + +// hamburg : 2014-02-20 Hamburg Top-Level-Domain GmbH +hamburg + +// hangout : 2014-11-13 Charleston Road Registry Inc. +hangout + +// haus : 2013-12-05 +haus + +// hbo : 2015-07-30 HBO Registry Services, Inc. +hbo + +// hdfc : 2015-07-30 HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED +hdfc + +// hdfcbank : 2015-02-12 HDFC Bank Limited +hdfcbank + +// health : 2015-02-11 DotHealth, LLC +health + +// healthcare : 2014-06-12 Silver Glen, LLC +healthcare + +// help : 2014-06-26 Uniregistry, Corp. +help + +// helsinki : 2015-02-05 City of Helsinki +helsinki + +// here : 2014-02-06 Charleston Road Registry Inc. +here + +// hermes : 2014-07-10 HERMES INTERNATIONAL +hermes + +// hgtv : 2015-07-02 Lifestyle Domain Holdings, Inc. +hgtv + +// hiphop : 2014-03-06 Uniregistry, Corp. +hiphop + +// hisamitsu : 2015-07-16 Hisamitsu Pharmaceutical Co.,Inc. +hisamitsu + +// hitachi : 2014-10-31 Hitachi, Ltd. +hitachi + +// hiv : 2014-03-13 +hiv + +// hkt : 2015-05-14 PCCW-HKT DataCom Services Limited +hkt + +// hockey : 2015-03-19 Half Willow, LLC +hockey + +// holdings : 2013-08-27 John Madison, LLC +holdings + +// holiday : 2013-11-07 Goose Woods, LLC +holiday + +// homedepot : 2015-04-02 Homer TLC, Inc. +homedepot + +// homegoods : 2015-07-16 The TJX Companies, Inc. +homegoods + +// homes : 2014-01-09 DERHomes, LLC +homes + +// homesense : 2015-07-16 The TJX Companies, Inc. +homesense + +// honda : 2014-12-18 Honda Motor Co., Ltd. +honda + +// honeywell : 2015-07-23 Honeywell GTLD LLC +honeywell + +// horse : 2013-11-21 Top Level Domain Holdings Limited +horse + +// hospital : 2016-10-20 Ruby Pike, LLC +hospital + +// host : 2014-04-17 DotHost Inc. +host + +// hosting : 2014-05-29 Uniregistry, Corp. +hosting + +// hot : 2015-08-27 Amazon EU S.à r.l. +hot + +// hoteles : 2015-03-05 Travel Reservations SRL +hoteles + +// hotels : 2016-04-07 Booking.com B.V. +hotels + +// hotmail : 2014-12-18 Microsoft Corporation +hotmail + +// house : 2013-11-07 Sugar Park, LLC +house + +// how : 2014-01-23 Charleston Road Registry Inc. +how + +// hsbc : 2014-10-24 HSBC Holdings PLC +hsbc + +// htc : 2015-04-02 HTC corporation +htc + +// hughes : 2015-07-30 Hughes Satellite Systems Corporation +hughes + +// hyatt : 2015-07-30 Hyatt GTLD, L.L.C. +hyatt + +// hyundai : 2015-07-09 Hyundai Motor Company +hyundai + +// ibm : 2014-07-31 International Business Machines Corporation +ibm + +// icbc : 2015-02-19 Industrial and Commercial Bank of China Limited +icbc + +// ice : 2014-10-30 IntercontinentalExchange, Inc. +ice + +// icu : 2015-01-08 One.com A/S +icu + +// ieee : 2015-07-23 IEEE Global LLC +ieee + +// ifm : 2014-01-30 ifm electronic gmbh +ifm + +// iinet : 2014-07-03 Connect West Pty. Ltd. +iinet + +// ikano : 2015-07-09 Ikano S.A. +ikano + +// imamat : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation) +imamat + +// imdb : 2015-06-25 Amazon EU S.à r.l. +imdb + +// immo : 2014-07-10 Auburn Bloom, LLC +immo + +// immobilien : 2013-11-07 United TLD Holdco Ltd. +immobilien + +// industries : 2013-12-05 Outer House, LLC +industries + +// infiniti : 2014-03-27 NISSAN MOTOR CO., LTD. +infiniti + +// ing : 2014-01-23 Charleston Road Registry Inc. +ing + +// ink : 2013-12-05 Top Level Design, LLC +ink + +// institute : 2013-11-07 Outer Maple, LLC +institute + +// insurance : 2015-02-19 fTLD Registry Services LLC +insurance + +// insure : 2014-03-20 Pioneer Willow, LLC +insure + +// intel : 2015-08-06 Intel Corporation +intel + +// international : 2013-11-07 Wild Way, LLC +international + +// intuit : 2015-07-30 Intuit Administrative Services, Inc. +intuit + +// investments : 2014-03-20 Holly Glen, LLC +investments + +// ipiranga : 2014-08-28 Ipiranga Produtos de Petroleo S.A. +ipiranga + +// irish : 2014-08-07 Dot-Irish LLC +irish + +// iselect : 2015-02-11 iSelect Ltd +iselect + +// ismaili : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation) +ismaili + +// ist : 2014-08-28 Istanbul Metropolitan Municipality +ist + +// istanbul : 2014-08-28 Istanbul Metropolitan Municipality +istanbul + +// itau : 2014-10-02 Itau Unibanco Holding S.A. +itau + +// itv : 2015-07-09 ITV Services Limited +itv + +// iveco : 2015-09-03 CNH Industrial N.V. +iveco + +// iwc : 2014-06-23 Richemont DNS Inc. +iwc + +// jaguar : 2014-11-13 Jaguar Land Rover Ltd +jaguar + +// java : 2014-06-19 Oracle Corporation +java + +// jcb : 2014-11-20 JCB Co., Ltd. +jcb + +// jcp : 2015-04-23 JCP Media, Inc. +jcp + +// jeep : 2015-07-30 FCA US LLC. +jeep + +// jetzt : 2014-01-09 +jetzt + +// jewelry : 2015-03-05 Wild Bloom, LLC +jewelry + +// jio : 2015-04-02 Affinity Names, Inc. +jio + +// jlc : 2014-12-04 Richemont DNS Inc. +jlc + +// jll : 2015-04-02 Jones Lang LaSalle Incorporated +jll + +// jmp : 2015-03-26 Matrix IP LLC +jmp + +// jnj : 2015-06-18 Johnson & Johnson Services, Inc. +jnj + +// joburg : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry +joburg + +// jot : 2014-12-18 Amazon EU S.à r.l. +jot + +// joy : 2014-12-18 Amazon EU S.à r.l. +joy + +// jpmorgan : 2015-04-30 JPMorgan Chase & Co. +jpmorgan + +// jprs : 2014-09-18 Japan Registry Services Co., Ltd. +jprs + +// juegos : 2014-03-20 Uniregistry, Corp. +juegos + +// juniper : 2015-07-30 JUNIPER NETWORKS, INC. +juniper + +// kaufen : 2013-11-07 United TLD Holdco Ltd. +kaufen + +// kddi : 2014-09-12 KDDI CORPORATION +kddi + +// kerryhotels : 2015-04-30 Kerry Trading Co. Limited +kerryhotels + +// kerrylogistics : 2015-04-09 Kerry Trading Co. Limited +kerrylogistics + +// kerryproperties : 2015-04-09 Kerry Trading Co. Limited +kerryproperties + +// kfh : 2014-12-04 Kuwait Finance House +kfh + +// kia : 2015-07-09 KIA MOTORS CORPORATION +kia + +// kim : 2013-09-23 Afilias Limited +kim + +// kinder : 2014-11-07 Ferrero Trading Lux S.A. +kinder + +// kindle : 2015-06-25 Amazon EU S.à r.l. +kindle + +// kitchen : 2013-09-20 Just Goodbye, LLC +kitchen + +// kiwi : 2013-09-20 DOT KIWI LIMITED +kiwi + +// koeln : 2014-01-09 NetCologne Gesellschaft für Telekommunikation mbH +koeln + +// komatsu : 2015-01-08 Komatsu Ltd. +komatsu + +// kosher : 2015-08-20 Kosher Marketing Assets LLC +kosher + +// kpmg : 2015-04-23 KPMG International Cooperative (KPMG International Genossenschaft) +kpmg + +// kpn : 2015-01-08 Koninklijke KPN N.V. +kpn + +// krd : 2013-12-05 KRG Department of Information Technology +krd + +// kred : 2013-12-19 KredTLD Pty Ltd +kred + +// kuokgroup : 2015-04-09 Kerry Trading Co. Limited +kuokgroup + +// kyoto : 2014-11-07 Academic Institution: Kyoto Jyoho Gakuen +kyoto + +// lacaixa : 2014-01-09 CAIXA D'ESTALVIS I PENSIONS DE BARCELONA +lacaixa + +// ladbrokes : 2015-08-06 LADBROKES INTERNATIONAL PLC +ladbrokes + +// lamborghini : 2015-06-04 Automobili Lamborghini S.p.A. +lamborghini + +// lamer : 2015-10-01 The Estée Lauder Companies Inc. +lamer + +// lancaster : 2015-02-12 LANCASTER +lancaster + +// lancia : 2015-07-31 Fiat Chrysler Automobiles N.V. +lancia + +// lancome : 2015-07-23 L'Oréal +lancome + +// land : 2013-09-10 Pine Moon, LLC +land + +// landrover : 2014-11-13 Jaguar Land Rover Ltd +landrover + +// lanxess : 2015-07-30 LANXESS Corporation +lanxess + +// lasalle : 2015-04-02 Jones Lang LaSalle Incorporated +lasalle + +// lat : 2014-10-16 ECOM-LAC Federaciòn de Latinoamèrica y el Caribe para Internet y el Comercio Electrònico +lat + +// latino : 2015-07-30 Dish DBS Corporation +latino + +// latrobe : 2014-06-16 La Trobe University +latrobe + +// law : 2015-01-22 Minds + Machines Group Limited +law + +// lawyer : 2014-03-20 +lawyer + +// lds : 2014-03-20 IRI Domain Management, LLC ("Applicant") +lds + +// lease : 2014-03-06 Victor Trail, LLC +lease + +// leclerc : 2014-08-07 A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc +leclerc + +// lefrak : 2015-07-16 LeFrak Organization, Inc. +lefrak + +// legal : 2014-10-16 Blue Falls, LLC +legal + +// lego : 2015-07-16 LEGO Juris A/S +lego + +// lexus : 2015-04-23 TOYOTA MOTOR CORPORATION +lexus + +// lgbt : 2014-05-08 Afilias Limited +lgbt + +// liaison : 2014-10-02 Liaison Technologies, Incorporated +liaison + +// lidl : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG +lidl + +// life : 2014-02-06 Trixy Oaks, LLC +life + +// lifeinsurance : 2015-01-15 American Council of Life Insurers +lifeinsurance + +// lifestyle : 2014-12-11 Lifestyle Domain Holdings, Inc. +lifestyle + +// lighting : 2013-08-27 John McCook, LLC +lighting + +// like : 2014-12-18 Amazon EU S.à r.l. +like + +// lilly : 2015-07-31 Eli Lilly and Company +lilly + +// limited : 2014-03-06 Big Fest, LLC +limited + +// limo : 2013-10-17 Hidden Frostbite, LLC +limo + +// lincoln : 2014-11-13 Ford Motor Company +lincoln + +// linde : 2014-12-04 Linde Aktiengesellschaft +linde + +// link : 2013-11-14 Uniregistry, Corp. +link + +// lipsy : 2015-06-25 Lipsy Ltd +lipsy + +// live : 2014-12-04 +live + +// living : 2015-07-30 Lifestyle Domain Holdings, Inc. +living + +// lixil : 2015-03-19 LIXIL Group Corporation +lixil + +// loan : 2014-11-20 dot Loan Limited +loan + +// loans : 2014-03-20 June Woods, LLC +loans + +// locker : 2015-06-04 Dish DBS Corporation +locker + +// locus : 2015-06-25 Locus Analytics LLC +locus + +// loft : 2015-07-30 Annco, Inc. +loft + +// lol : 2015-01-30 Uniregistry, Corp. +lol + +// london : 2013-11-14 Dot London Domains Limited +london + +// lotte : 2014-11-07 Lotte Holdings Co., Ltd. +lotte + +// lotto : 2014-04-10 Afilias Limited +lotto + +// love : 2014-12-22 Merchant Law Group LLP +love + +// lpl : 2015-07-30 LPL Holdings, Inc. +lpl + +// lplfinancial : 2015-07-30 LPL Holdings, Inc. +lplfinancial + +// ltd : 2014-09-25 Over Corner, LLC +ltd + +// ltda : 2014-04-17 DOMAIN ROBOT SERVICOS DE HOSPEDAGEM NA INTERNET LTDA +ltda + +// lundbeck : 2015-08-06 H. Lundbeck A/S +lundbeck + +// lupin : 2014-11-07 LUPIN LIMITED +lupin + +// luxe : 2014-01-09 Top Level Domain Holdings Limited +luxe + +// luxury : 2013-10-17 Luxury Partners, LLC +luxury + +// macys : 2015-07-31 Macys, Inc. +macys + +// madrid : 2014-05-01 Comunidad de Madrid +madrid + +// maif : 2014-10-02 Mutuelle Assurance Instituteur France (MAIF) +maif + +// maison : 2013-12-05 Victor Frostbite, LLC +maison + +// makeup : 2015-01-15 L'Oréal +makeup + +// man : 2014-12-04 MAN SE +man + +// management : 2013-11-07 John Goodbye, LLC +management + +// mango : 2013-10-24 PUNTO FA S.L. +mango + +// map : 2016-06-09 Charleston Road Registry Inc. +map + +// market : 2014-03-06 +market + +// marketing : 2013-11-07 Fern Pass, LLC +marketing + +// markets : 2014-12-11 IG Group Holdings PLC +markets + +// marriott : 2014-10-09 Marriott Worldwide Corporation +marriott + +// marshalls : 2015-07-16 The TJX Companies, Inc. +marshalls + +// maserati : 2015-07-31 Fiat Chrysler Automobiles N.V. +maserati + +// mattel : 2015-08-06 Mattel Sites, Inc. +mattel + +// mba : 2015-04-02 Lone Hollow, LLC +mba + +// mcd : 2015-07-30 McDonald’s Corporation +mcd + +// mcdonalds : 2015-07-30 McDonald’s Corporation +mcdonalds + +// mckinsey : 2015-07-31 McKinsey Holdings, Inc. +mckinsey + +// med : 2015-08-06 Medistry LLC +med + +// media : 2014-03-06 Grand Glen, LLC +media + +// meet : 2014-01-16 +meet + +// melbourne : 2014-05-29 The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation +melbourne + +// meme : 2014-01-30 Charleston Road Registry Inc. +meme + +// memorial : 2014-10-16 Dog Beach, LLC +memorial + +// men : 2015-02-26 Exclusive Registry Limited +men + +// menu : 2013-09-11 Wedding TLD2, LLC +menu + +// meo : 2014-11-07 PT Comunicacoes S.A. +meo + +// merckmsd : 2016-07-14 MSD Registry Holdings, Inc. +merckmsd + +// metlife : 2015-05-07 MetLife Services and Solutions, LLC +metlife + +// miami : 2013-12-19 Top Level Domain Holdings Limited +miami + +// microsoft : 2014-12-18 Microsoft Corporation +microsoft + +// mini : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft +mini + +// mint : 2015-07-30 Intuit Administrative Services, Inc. +mint + +// mit : 2015-07-02 Massachusetts Institute of Technology +mit + +// mitsubishi : 2015-07-23 Mitsubishi Corporation +mitsubishi + +// mlb : 2015-05-21 MLB Advanced Media DH, LLC +mlb + +// mls : 2015-04-23 The Canadian Real Estate Association +mls + +// mma : 2014-11-07 MMA IARD +mma + +// mobile : 2016-06-02 Dish DBS Corporation +mobile + +// mobily : 2014-12-18 GreenTech Consultancy Company W.L.L. +mobily + +// moda : 2013-11-07 United TLD Holdco Ltd. +moda + +// moe : 2013-11-13 Interlink Co., Ltd. +moe + +// moi : 2014-12-18 Amazon EU S.à r.l. +moi + +// mom : 2015-04-16 Uniregistry, Corp. +mom + +// monash : 2013-09-30 Monash University +monash + +// money : 2014-10-16 Outer McCook, LLC +money + +// monster : 2015-09-11 Monster Worldwide, Inc. +monster + +// montblanc : 2014-06-23 Richemont DNS Inc. +montblanc + +// mopar : 2015-07-30 FCA US LLC. +mopar + +// mormon : 2013-12-05 IRI Domain Management, LLC ("Applicant") +mormon + +// mortgage : 2014-03-20 +mortgage + +// moscow : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) +moscow + +// moto : 2015-06-04 +moto + +// motorcycles : 2014-01-09 DERMotorcycles, LLC +motorcycles + +// mov : 2014-01-30 Charleston Road Registry Inc. +mov + +// movie : 2015-02-05 New Frostbite, LLC +movie + +// movistar : 2014-10-16 Telefónica S.A. +movistar + +// msd : 2015-07-23 MSD Registry Holdings, Inc. +msd + +// mtn : 2014-12-04 MTN Dubai Limited +mtn + +// mtpc : 2014-11-20 Mitsubishi Tanabe Pharma Corporation +mtpc + +// mtr : 2015-03-12 MTR Corporation Limited +mtr + +// mutual : 2015-04-02 Northwestern Mutual MU TLD Registry, LLC +mutual + +// mutuelle : 2015-06-18 Fédération Nationale de la Mutualité Française +mutuelle + +// nab : 2015-08-20 National Australia Bank Limited +nab + +// nadex : 2014-12-11 IG Group Holdings PLC +nadex + +// nagoya : 2013-10-24 GMO Registry, Inc. +nagoya + +// nationwide : 2015-07-23 Nationwide Mutual Insurance Company +nationwide + +// natura : 2015-03-12 NATURA COSMÉTICOS S.A. +natura + +// navy : 2014-03-06 United TLD Holdco Ltd. +navy + +// nba : 2015-07-31 NBA REGISTRY, LLC +nba + +// nec : 2015-01-08 NEC Corporation +nec + +// netbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA +netbank + +// netflix : 2015-06-18 Netflix, Inc. +netflix + +// network : 2013-11-14 Trixy Manor, LLC +network + +// neustar : 2013-12-05 NeuStar, Inc. +neustar + +// new : 2014-01-30 Charleston Road Registry Inc. +new + +// newholland : 2015-09-03 CNH Industrial N.V. +newholland + +// news : 2014-12-18 +news + +// next : 2015-06-18 Next plc +next + +// nextdirect : 2015-06-18 Next plc +nextdirect + +// nexus : 2014-07-24 Charleston Road Registry Inc. +nexus + +// nfl : 2015-07-23 NFL Reg Ops LLC +nfl + +// ngo : 2014-03-06 Public Interest Registry +ngo + +// nhk : 2014-02-13 Japan Broadcasting Corporation (NHK) +nhk + +// nico : 2014-12-04 DWANGO Co., Ltd. +nico + +// nike : 2015-07-23 NIKE, Inc. +nike + +// nikon : 2015-05-21 NIKON CORPORATION +nikon + +// ninja : 2013-11-07 United TLD Holdco Ltd. +ninja + +// nissan : 2014-03-27 NISSAN MOTOR CO., LTD. +nissan + +// nissay : 2015-10-29 Nippon Life Insurance Company +nissay + +// nokia : 2015-01-08 Nokia Corporation +nokia + +// northwesternmutual : 2015-06-18 Northwestern Mutual Registry, LLC +northwesternmutual + +// norton : 2014-12-04 Symantec Corporation +norton + +// now : 2015-06-25 Amazon EU S.à r.l. +now + +// nowruz : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +nowruz + +// nowtv : 2015-05-14 Starbucks (HK) Limited +nowtv + +// nra : 2014-05-22 NRA Holdings Company, INC. +nra + +// nrw : 2013-11-21 Minds + Machines GmbH +nrw + +// ntt : 2014-10-31 NIPPON TELEGRAPH AND TELEPHONE CORPORATION +ntt + +// nyc : 2014-01-23 The City of New York by and through the New York City Department of Information Technology & Telecommunications +nyc + +// obi : 2014-09-25 OBI Group Holding SE & Co. KGaA +obi + +// observer : 2015-04-30 +observer + +// off : 2015-07-23 Johnson Shareholdings, Inc. +off + +// office : 2015-03-12 Microsoft Corporation +office + +// okinawa : 2013-12-05 BusinessRalliart Inc. +okinawa + +// olayan : 2015-05-14 Crescent Holding GmbH +olayan + +// olayangroup : 2015-05-14 Crescent Holding GmbH +olayangroup + +// oldnavy : 2015-07-31 The Gap, Inc. +oldnavy + +// ollo : 2015-06-04 Dish DBS Corporation +ollo + +// omega : 2015-01-08 The Swatch Group Ltd +omega + +// one : 2014-11-07 One.com A/S +one + +// ong : 2014-03-06 Public Interest Registry +ong + +// onl : 2013-09-16 I-Registry Ltd. +onl + +// online : 2015-01-15 DotOnline Inc. +online + +// onyourside : 2015-07-23 Nationwide Mutual Insurance Company +onyourside + +// ooo : 2014-01-09 INFIBEAM INCORPORATION LIMITED +ooo + +// open : 2015-07-31 American Express Travel Related Services Company, Inc. +open + +// oracle : 2014-06-19 Oracle Corporation +oracle + +// orange : 2015-03-12 Orange Brand Services Limited +orange + +// organic : 2014-03-27 Afilias Limited +organic + +// orientexpress : 2015-02-05 +orientexpress + +// origins : 2015-10-01 The Estée Lauder Companies Inc. +origins + +// osaka : 2014-09-04 Interlink Co., Ltd. +osaka + +// otsuka : 2013-10-11 Otsuka Holdings Co., Ltd. +otsuka + +// ott : 2015-06-04 Dish DBS Corporation +ott + +// ovh : 2014-01-16 OVH SAS +ovh + +// page : 2014-12-04 Charleston Road Registry Inc. +page + +// pamperedchef : 2015-02-05 The Pampered Chef, Ltd. +pamperedchef + +// panasonic : 2015-07-30 Panasonic Corporation +panasonic + +// panerai : 2014-11-07 Richemont DNS Inc. +panerai + +// paris : 2014-01-30 City of Paris +paris + +// pars : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +pars + +// partners : 2013-12-05 Magic Glen, LLC +partners + +// parts : 2013-12-05 Sea Goodbye, LLC +parts + +// party : 2014-09-11 Blue Sky Registry Limited +party + +// passagens : 2015-03-05 Travel Reservations SRL +passagens + +// pay : 2015-08-27 Amazon EU S.à r.l. +pay + +// pccw : 2015-05-14 PCCW Enterprises Limited +pccw + +// pet : 2015-05-07 Afilias plc +pet + +// pfizer : 2015-09-11 Pfizer Inc. +pfizer + +// pharmacy : 2014-06-19 National Association of Boards of Pharmacy +pharmacy + +// phd : 2016-07-28 Charleston Road Registry Inc. +phd + +// philips : 2014-11-07 Koninklijke Philips N.V. +philips + +// phone : 2016-06-02 Dish DBS Corporation +phone + +// photo : 2013-11-14 Uniregistry, Corp. +photo + +// photography : 2013-09-20 Sugar Glen, LLC +photography + +// photos : 2013-10-17 Sea Corner, LLC +photos + +// physio : 2014-05-01 PhysBiz Pty Ltd +physio + +// piaget : 2014-10-16 Richemont DNS Inc. +piaget + +// pics : 2013-11-14 Uniregistry, Corp. +pics + +// pictet : 2014-06-26 Pictet Europe S.A. +pictet + +// pictures : 2014-03-06 Foggy Sky, LLC +pictures + +// pid : 2015-01-08 Top Level Spectrum, Inc. +pid + +// pin : 2014-12-18 Amazon EU S.à r.l. +pin + +// ping : 2015-06-11 Ping Registry Provider, Inc. +ping + +// pink : 2013-10-01 Afilias Limited +pink + +// pioneer : 2015-07-16 Pioneer Corporation +pioneer + +// pizza : 2014-06-26 Foggy Moon, LLC +pizza + +// place : 2014-04-24 Snow Galley, LLC +place + +// play : 2015-03-05 Charleston Road Registry Inc. +play + +// playstation : 2015-07-02 Sony Computer Entertainment Inc. +playstation + +// plumbing : 2013-09-10 Spring Tigers, LLC +plumbing + +// plus : 2015-02-05 Sugar Mill, LLC +plus + +// pnc : 2015-07-02 PNC Domain Co., LLC +pnc + +// pohl : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +pohl + +// poker : 2014-07-03 Afilias Domains No. 5 Limited +poker + +// politie : 2015-08-20 Politie Nederland +politie + +// porn : 2014-10-16 ICM Registry PN LLC +porn + +// pramerica : 2015-07-30 Prudential Financial, Inc. +pramerica + +// praxi : 2013-12-05 Praxi S.p.A. +praxi + +// press : 2014-04-03 DotPress Inc. +press + +// prime : 2015-06-25 Amazon EU S.à r.l. +prime + +// prod : 2014-01-23 Charleston Road Registry Inc. +prod + +// productions : 2013-12-05 Magic Birch, LLC +productions + +// prof : 2014-07-24 Charleston Road Registry Inc. +prof + +// progressive : 2015-07-23 Progressive Casualty Insurance Company +progressive + +// promo : 2014-12-18 +promo + +// properties : 2013-12-05 Big Pass, LLC +properties + +// property : 2014-05-22 Uniregistry, Corp. +property + +// protection : 2015-04-23 +protection + +// pru : 2015-07-30 Prudential Financial, Inc. +pru + +// prudential : 2015-07-30 Prudential Financial, Inc. +prudential + +// pub : 2013-12-12 United TLD Holdco Ltd. +pub + +// pwc : 2015-10-29 PricewaterhouseCoopers LLP +pwc + +// qpon : 2013-11-14 dotCOOL, Inc. +qpon + +// quebec : 2013-12-19 PointQuébec Inc +quebec + +// quest : 2015-03-26 Quest ION Limited +quest + +// qvc : 2015-07-30 QVC, Inc. +qvc + +// racing : 2014-12-04 Premier Registry Limited +racing + +// radio : 2016-07-21 European Broadcasting Union (EBU) +radio + +// raid : 2015-07-23 Johnson Shareholdings, Inc. +raid + +// read : 2014-12-18 Amazon EU S.à r.l. +read + +// realestate : 2015-09-11 dotRealEstate LLC +realestate + +// realtor : 2014-05-29 Real Estate Domains LLC +realtor + +// realty : 2015-03-19 Fegistry, LLC +realty + +// recipes : 2013-10-17 Grand Island, LLC +recipes + +// red : 2013-11-07 Afilias Limited +red + +// redstone : 2014-10-31 Redstone Haute Couture Co., Ltd. +redstone + +// redumbrella : 2015-03-26 Travelers TLD, LLC +redumbrella + +// rehab : 2014-03-06 United TLD Holdco Ltd. +rehab + +// reise : 2014-03-13 +reise + +// reisen : 2014-03-06 New Cypress, LLC +reisen + +// reit : 2014-09-04 National Association of Real Estate Investment Trusts, Inc. +reit + +// reliance : 2015-04-02 Reliance Industries Limited +reliance + +// ren : 2013-12-12 Beijing Qianxiang Wangjing Technology Development Co., Ltd. +ren + +// rent : 2014-12-04 DERRent, LLC +rent + +// rentals : 2013-12-05 Big Hollow,LLC +rentals + +// repair : 2013-11-07 Lone Sunset, LLC +repair + +// report : 2013-12-05 Binky Glen, LLC +report + +// republican : 2014-03-20 United TLD Holdco Ltd. +republican + +// rest : 2013-12-19 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable +rest + +// restaurant : 2014-07-03 Snow Avenue, LLC +restaurant + +// review : 2014-11-20 dot Review Limited +review + +// reviews : 2013-09-13 +reviews + +// rexroth : 2015-06-18 Robert Bosch GMBH +rexroth + +// rich : 2013-11-21 I-Registry Ltd. +rich + +// richardli : 2015-05-14 Pacific Century Asset Management (HK) Limited +richardli + +// ricoh : 2014-11-20 Ricoh Company, Ltd. +ricoh + +// rightathome : 2015-07-23 Johnson Shareholdings, Inc. +rightathome + +// ril : 2015-04-02 Reliance Industries Limited +ril + +// rio : 2014-02-27 Empresa Municipal de Informática SA - IPLANRIO +rio + +// rip : 2014-07-10 United TLD Holdco Ltd. +rip + +// rmit : 2015-11-19 Royal Melbourne Institute of Technology +rmit + +// rocher : 2014-12-18 Ferrero Trading Lux S.A. +rocher + +// rocks : 2013-11-14 +rocks + +// rodeo : 2013-12-19 Top Level Domain Holdings Limited +rodeo + +// rogers : 2015-08-06 Rogers Communications Partnership +rogers + +// room : 2014-12-18 Amazon EU S.à r.l. +room + +// rsvp : 2014-05-08 Charleston Road Registry Inc. +rsvp + +// ruhr : 2013-10-02 regiodot GmbH & Co. KG +ruhr + +// run : 2015-03-19 Snow Park, LLC +run + +// rwe : 2015-04-02 RWE AG +rwe + +// ryukyu : 2014-01-09 BusinessRalliart Inc. +ryukyu + +// saarland : 2013-12-12 dotSaarland GmbH +saarland + +// safe : 2014-12-18 Amazon EU S.à r.l. +safe + +// safety : 2015-01-08 Safety Registry Services, LLC. +safety + +// sakura : 2014-12-18 SAKURA Internet Inc. +sakura + +// sale : 2014-10-16 +sale + +// salon : 2014-12-11 Outer Orchard, LLC +salon + +// samsclub : 2015-07-31 Wal-Mart Stores, Inc. +samsclub + +// samsung : 2014-04-03 SAMSUNG SDS CO., LTD +samsung + +// sandvik : 2014-11-13 Sandvik AB +sandvik + +// sandvikcoromant : 2014-11-07 Sandvik AB +sandvikcoromant + +// sanofi : 2014-10-09 Sanofi +sanofi + +// sap : 2014-03-27 SAP AG +sap + +// sapo : 2014-11-07 PT Comunicacoes S.A. +sapo + +// sarl : 2014-07-03 Delta Orchard, LLC +sarl + +// sas : 2015-04-02 Research IP LLC +sas + +// save : 2015-06-25 Amazon EU S.à r.l. +save + +// saxo : 2014-10-31 Saxo Bank A/S +saxo + +// sbi : 2015-03-12 STATE BANK OF INDIA +sbi + +// sbs : 2014-11-07 SPECIAL BROADCASTING SERVICE CORPORATION +sbs + +// sca : 2014-03-13 SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ) +sca + +// scb : 2014-02-20 The Siam Commercial Bank Public Company Limited ("SCB") +scb + +// schaeffler : 2015-08-06 Schaeffler Technologies AG & Co. KG +schaeffler + +// schmidt : 2014-04-03 SALM S.A.S. +schmidt + +// scholarships : 2014-04-24 Scholarships.com, LLC +scholarships + +// school : 2014-12-18 Little Galley, LLC +school + +// schule : 2014-03-06 Outer Moon, LLC +schule + +// schwarz : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG +schwarz + +// science : 2014-09-11 dot Science Limited +science + +// scjohnson : 2015-07-23 Johnson Shareholdings, Inc. +scjohnson + +// scor : 2014-10-31 SCOR SE +scor + +// scot : 2014-01-23 Dot Scot Registry Limited +scot + +// search : 2016-06-09 Charleston Road Registry Inc. +search + +// seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal) +seat + +// secure : 2015-08-27 Amazon EU S.à r.l. +secure + +// security : 2015-05-14 +security + +// seek : 2014-12-04 Seek Limited +seek + +// select : 2015-10-08 iSelect Ltd +select + +// sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A. +sener + +// services : 2014-02-27 Fox Castle, LLC +services + +// ses : 2015-07-23 SES +ses + +// seven : 2015-08-06 Seven West Media Ltd +seven + +// sew : 2014-07-17 SEW-EURODRIVE GmbH & Co KG +sew + +// sex : 2014-11-13 ICM Registry SX LLC +sex + +// sexy : 2013-09-11 Uniregistry, Corp. +sexy + +// sfr : 2015-08-13 Societe Francaise du Radiotelephone - SFR +sfr + +// shangrila : 2015-09-03 Shangri‐La International Hotel Management Limited +shangrila + +// sharp : 2014-05-01 Sharp Corporation +sharp + +// shaw : 2015-04-23 Shaw Cablesystems G.P. +shaw + +// shell : 2015-07-30 Shell Information Technology International Inc +shell + +// shia : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +shia + +// shiksha : 2013-11-14 Afilias Limited +shiksha + +// shoes : 2013-10-02 Binky Galley, LLC +shoes + +// shop : 2016-04-08 GMO Registry, Inc. +shop + +// shopping : 2016-03-31 +shopping + +// shouji : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +shouji + +// show : 2015-03-05 Snow Beach, LLC +show + +// showtime : 2015-08-06 CBS Domains Inc. +showtime + +// shriram : 2014-01-23 Shriram Capital Ltd. +shriram + +// silk : 2015-06-25 Amazon EU S.à r.l. +silk + +// sina : 2015-03-12 Sina Corporation +sina + +// singles : 2013-08-27 Fern Madison, LLC +singles + +// site : 2015-01-15 DotSite Inc. +site + +// ski : 2015-04-09 STARTING DOT LIMITED +ski + +// skin : 2015-01-15 L'Oréal +skin + +// sky : 2014-06-19 Sky IP International Ltd, a company incorporated in England and Wales, operating via its registered Swiss branch +sky + +// skype : 2014-12-18 Microsoft Corporation +skype + +// sling : 2015-07-30 Hughes Satellite Systems Corporation +sling + +// smart : 2015-07-09 Smart Communications, Inc. (SMART) +smart + +// smile : 2014-12-18 Amazon EU S.à r.l. +smile + +// sncf : 2015-02-19 Société Nationale des Chemins de fer Francais S N C F +sncf + +// soccer : 2015-03-26 Foggy Shadow, LLC +soccer + +// social : 2013-11-07 United TLD Holdco Ltd. +social + +// softbank : 2015-07-02 SoftBank Corp. +softbank + +// software : 2014-03-20 +software + +// sohu : 2013-12-19 Sohu.com Limited +sohu + +// solar : 2013-11-07 Ruby Town, LLC +solar + +// solutions : 2013-11-07 Silver Cover, LLC +solutions + +// song : 2015-02-26 Amazon EU S.à r.l. +song + +// sony : 2015-01-08 Sony Corporation +sony + +// soy : 2014-01-23 Charleston Road Registry Inc. +soy + +// space : 2014-04-03 DotSpace Inc. +space + +// spiegel : 2014-02-05 SPIEGEL-Verlag Rudolf Augstein GmbH & Co. KG +spiegel + +// spot : 2015-02-26 Amazon EU S.à r.l. +spot + +// spreadbetting : 2014-12-11 IG Group Holdings PLC +spreadbetting + +// srl : 2015-05-07 mySRL GmbH +srl + +// srt : 2015-07-30 FCA US LLC. +srt + +// stada : 2014-11-13 STADA Arzneimittel AG +stada + +// staples : 2015-07-30 Staples, Inc. +staples + +// star : 2015-01-08 Star India Private Limited +star + +// starhub : 2015-02-05 StarHub Ltd +starhub + +// statebank : 2015-03-12 STATE BANK OF INDIA +statebank + +// statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company +statefarm + +// statoil : 2014-12-04 Statoil ASA +statoil + +// stc : 2014-10-09 Saudi Telecom Company +stc + +// stcgroup : 2014-10-09 Saudi Telecom Company +stcgroup + +// stockholm : 2014-12-18 Stockholms kommun +stockholm + +// storage : 2014-12-22 Self Storage Company LLC +storage + +// store : 2015-04-09 DotStore Inc. +store + +// stream : 2016-01-08 dot Stream Limited +stream + +// studio : 2015-02-11 +studio + +// study : 2014-12-11 OPEN UNIVERSITIES AUSTRALIA PTY LTD +study + +// style : 2014-12-04 Binky Moon, LLC +style + +// sucks : 2014-12-22 Vox Populi Registry Inc. +sucks + +// supplies : 2013-12-19 Atomic Fields, LLC +supplies + +// supply : 2013-12-19 Half Falls, LLC +supply + +// support : 2013-10-24 Grand Orchard, LLC +support + +// surf : 2014-01-09 Top Level Domain Holdings Limited +surf + +// surgery : 2014-03-20 Tin Avenue, LLC +surgery + +// suzuki : 2014-02-20 SUZUKI MOTOR CORPORATION +suzuki + +// swatch : 2015-01-08 The Swatch Group Ltd +swatch + +// swiftcover : 2015-07-23 Swiftcover Insurance Services Limited +swiftcover + +// swiss : 2014-10-16 Swiss Confederation +swiss + +// sydney : 2014-09-18 State of New South Wales, Department of Premier and Cabinet +sydney + +// symantec : 2014-12-04 Symantec Corporation +symantec + +// systems : 2013-11-07 Dash Cypress, LLC +systems + +// tab : 2014-12-04 Tabcorp Holdings Limited +tab + +// taipei : 2014-07-10 Taipei City Government +taipei + +// talk : 2015-04-09 Amazon EU S.à r.l. +talk + +// taobao : 2015-01-15 Alibaba Group Holding Limited +taobao + +// target : 2015-07-31 Target Domain Holdings, LLC +target + +// tatamotors : 2015-03-12 Tata Motors Ltd +tatamotors + +// tatar : 2014-04-24 Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic" +tatar + +// tattoo : 2013-08-30 Uniregistry, Corp. +tattoo + +// tax : 2014-03-20 Storm Orchard, LLC +tax + +// taxi : 2015-03-19 Pine Falls, LLC +taxi + +// tci : 2014-09-12 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +tci + +// tdk : 2015-06-11 TDK Corporation +tdk + +// team : 2015-03-05 Atomic Lake, LLC +team + +// tech : 2015-01-30 Dot Tech LLC +tech + +// technology : 2013-09-13 Auburn Falls +technology + +// telecity : 2015-02-19 TelecityGroup International Limited +telecity + +// telefonica : 2014-10-16 Telefónica S.A. +telefonica + +// temasek : 2014-08-07 Temasek Holdings (Private) Limited +temasek + +// tennis : 2014-12-04 Cotton Bloom, LLC +tennis + +// teva : 2015-07-02 Teva Pharmaceutical Industries Limited +teva + +// thd : 2015-04-02 Homer TLC, Inc. +thd + +// theater : 2015-03-19 Blue Tigers, LLC +theater + +// theatre : 2015-05-07 +theatre + +// theguardian : 2015-04-30 Guardian News and Media Limited +theguardian + +// tiaa : 2015-07-23 Teachers Insurance and Annuity Association of America +tiaa + +// tickets : 2015-02-05 Accent Media Limited +tickets + +// tienda : 2013-11-14 Victor Manor, LLC +tienda + +// tiffany : 2015-01-30 Tiffany and Company +tiffany + +// tips : 2013-09-20 Corn Willow, LLC +tips + +// tires : 2014-11-07 Dog Edge, LLC +tires + +// tirol : 2014-04-24 punkt Tirol GmbH +tirol + +// tjmaxx : 2015-07-16 The TJX Companies, Inc. +tjmaxx + +// tjx : 2015-07-16 The TJX Companies, Inc. +tjx + +// tkmaxx : 2015-07-16 The TJX Companies, Inc. +tkmaxx + +// tmall : 2015-01-15 Alibaba Group Holding Limited +tmall + +// today : 2013-09-20 Pearl Woods, LLC +today + +// tokyo : 2013-11-13 GMO Registry, Inc. +tokyo + +// tools : 2013-11-21 Pioneer North, LLC +tools + +// top : 2014-03-20 Jiangsu Bangning Science & Technology Co.,Ltd. +top + +// toray : 2014-12-18 Toray Industries, Inc. +toray + +// toshiba : 2014-04-10 TOSHIBA Corporation +toshiba + +// total : 2015-08-06 Total SA +total + +// tours : 2015-01-22 Sugar Station, LLC +tours + +// town : 2014-03-06 Koko Moon, LLC +town + +// toyota : 2015-04-23 TOYOTA MOTOR CORPORATION +toyota + +// toys : 2014-03-06 Pioneer Orchard, LLC +toys + +// trade : 2014-01-23 Elite Registry Limited +trade + +// trading : 2014-12-11 IG Group Holdings PLC +trading + +// training : 2013-11-07 Wild Willow, LLC +training + +// travelchannel : 2015-07-02 Lifestyle Domain Holdings, Inc. +travelchannel + +// travelers : 2015-03-26 Travelers TLD, LLC +travelers + +// travelersinsurance : 2015-03-26 Travelers TLD, LLC +travelersinsurance + +// trust : 2014-10-16 +trust + +// trv : 2015-03-26 Travelers TLD, LLC +trv + +// tube : 2015-06-11 Latin American Telecom LLC +tube + +// tui : 2014-07-03 TUI AG +tui + +// tunes : 2015-02-26 Amazon EU S.à r.l. +tunes + +// tushu : 2014-12-18 Amazon EU S.à r.l. +tushu + +// tvs : 2015-02-19 T V SUNDRAM IYENGAR & SONS LIMITED +tvs + +// ubank : 2015-08-20 National Australia Bank Limited +ubank + +// ubs : 2014-12-11 UBS AG +ubs + +// uconnect : 2015-07-30 FCA US LLC. +uconnect + +// unicom : 2015-10-15 China United Network Communications Corporation Limited +unicom + +// university : 2014-03-06 Little Station, LLC +university + +// uno : 2013-09-11 Dot Latin LLC +uno + +// uol : 2014-05-01 UBN INTERNET LTDA. +uol + +// ups : 2015-06-25 UPS Market Driver, Inc. +ups + +// vacations : 2013-12-05 Atomic Tigers, LLC +vacations + +// vana : 2014-12-11 Lifestyle Domain Holdings, Inc. +vana + +// vanguard : 2015-09-03 The Vanguard Group, Inc. +vanguard + +// vegas : 2014-01-16 Dot Vegas, Inc. +vegas + +// ventures : 2013-08-27 Binky Lake, LLC +ventures + +// verisign : 2015-08-13 VeriSign, Inc. +verisign + +// versicherung : 2014-03-20 dotversicherung-registry GmbH +versicherung + +// vet : 2014-03-06 +vet + +// viajes : 2013-10-17 Black Madison, LLC +viajes + +// video : 2014-10-16 +video + +// vig : 2015-05-14 VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe +vig + +// viking : 2015-04-02 Viking River Cruises (Bermuda) Ltd. +viking + +// villas : 2013-12-05 New Sky, LLC +villas + +// vin : 2015-06-18 Holly Shadow, LLC +vin + +// vip : 2015-01-22 Minds + Machines Group Limited +vip + +// virgin : 2014-09-25 Virgin Enterprises Limited +virgin + +// visa : 2015-07-30 Visa Worldwide Pte. Limited +visa + +// vision : 2013-12-05 Koko Station, LLC +vision + +// vista : 2014-09-18 Vistaprint Limited +vista + +// vistaprint : 2014-09-18 Vistaprint Limited +vistaprint + +// viva : 2014-11-07 Saudi Telecom Company +viva + +// vivo : 2015-07-31 Telefonica Brasil S.A. +vivo + +// vlaanderen : 2014-02-06 DNS.be vzw +vlaanderen + +// vodka : 2013-12-19 Top Level Domain Holdings Limited +vodka + +// volkswagen : 2015-05-14 Volkswagen Group of America Inc. +volkswagen + +// volvo : 2015-11-12 Volvo Holding Sverige Aktiebolag +volvo + +// vote : 2013-11-21 Monolith Registry LLC +vote + +// voting : 2013-11-13 Valuetainment Corp. +voting + +// voto : 2013-11-21 Monolith Registry LLC +voto + +// voyage : 2013-08-27 Ruby House, LLC +voyage + +// vuelos : 2015-03-05 Travel Reservations SRL +vuelos + +// wales : 2014-05-08 Nominet UK +wales + +// walmart : 2015-07-31 Wal-Mart Stores, Inc. +walmart + +// walter : 2014-11-13 Sandvik AB +walter + +// wang : 2013-10-24 Zodiac Leo Limited +wang + +// wanggou : 2014-12-18 Amazon EU S.à r.l. +wanggou + +// warman : 2015-06-18 Weir Group IP Limited +warman + +// watch : 2013-11-14 Sand Shadow, LLC +watch + +// watches : 2014-12-22 Richemont DNS Inc. +watches + +// weather : 2015-01-08 The Weather Channel, LLC +weather + +// weatherchannel : 2015-03-12 The Weather Channel, LLC +weatherchannel + +// webcam : 2014-01-23 dot Webcam Limited +webcam + +// weber : 2015-06-04 Saint-Gobain Weber SA +weber + +// website : 2014-04-03 DotWebsite Inc. +website + +// wed : 2013-10-01 Atgron, Inc. +wed + +// wedding : 2014-04-24 Top Level Domain Holdings Limited +wedding + +// weibo : 2015-03-05 Sina Corporation +weibo + +// weir : 2015-01-29 Weir Group IP Limited +weir + +// whoswho : 2014-02-20 Who's Who Registry +whoswho + +// wien : 2013-10-28 punkt.wien GmbH +wien + +// wiki : 2013-11-07 Top Level Design, LLC +wiki + +// williamhill : 2014-03-13 William Hill Organization Limited +williamhill + +// win : 2014-11-20 First Registry Limited +win + +// windows : 2014-12-18 Microsoft Corporation +windows + +// wine : 2015-06-18 June Station, LLC +wine + +// winners : 2015-07-16 The TJX Companies, Inc. +winners + +// wme : 2014-02-13 William Morris Endeavor Entertainment, LLC +wme + +// wolterskluwer : 2015-08-06 Wolters Kluwer N.V. +wolterskluwer + +// woodside : 2015-07-09 Woodside Petroleum Limited +woodside + +// work : 2013-12-19 Top Level Domain Holdings Limited +work + +// works : 2013-11-14 Little Dynamite, LLC +works + +// world : 2014-06-12 Bitter Fields, LLC +world + +// wow : 2015-10-08 Amazon EU S.à r.l. +wow + +// wtc : 2013-12-19 World Trade Centers Association, Inc. +wtc + +// wtf : 2014-03-06 Hidden Way, LLC +wtf + +// xbox : 2014-12-18 Microsoft Corporation +xbox + +// xerox : 2014-10-24 Xerox DNHC LLC +xerox + +// xfinity : 2015-07-09 Comcast IP Holdings I, LLC +xfinity + +// xihuan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +xihuan + +// xin : 2014-12-11 Elegant Leader Limited +xin + +// xn--11b4c3d : 2015-01-15 VeriSign Sarl +xn--11b4c3d +कॉम + +// xn--1ck2e1b : 2015-02-26 Amazon EU S.à r.l. +xn--1ck2e1b +セール + +// xn--1qqw23a : 2014-01-09 Guangzhou YU Wei Information Technology Co., Ltd. +xn--1qqw23a +佛山 + +// xn--30rr7y : 2014-06-12 Excellent First Limited +xn--30rr7y +慈善 + +// xn--3bst00m : 2013-09-13 Eagle Horizon Limited +xn--3bst00m +集团 + +// xn--3ds443g : 2013-09-08 TLD REGISTRY LIMITED +xn--3ds443g +在线 + +// xn--3oq18vl8pn36a : 2015-07-02 Volkswagen (China) Investment Co., Ltd. +xn--3oq18vl8pn36a +大众汽车 + +// xn--3pxu8k : 2015-01-15 VeriSign Sarl +xn--3pxu8k +点看 + +// xn--42c2d9a : 2015-01-15 VeriSign Sarl +xn--42c2d9a +คอม + +// xn--45q11c : 2013-11-21 Zodiac Scorpio Limited +xn--45q11c +八卦 + +// xn--4gbrim : 2013-10-04 Suhub Electronic Establishment +xn--4gbrim +موقع + +// xn--4gq48lf9j : 2015-07-31 Wal-Mart Stores, Inc. +xn--4gq48lf9j +一号店 + +// xn--55qw42g : 2013-11-08 China Organizational Name Administration Center +xn--55qw42g +公益 + +// xn--55qx5d : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) +xn--55qx5d +公司 + +// xn--5su34j936bgsg : 2015-09-03 Shangri‐La International Hotel Management Limited +xn--5su34j936bgsg +香格里拉 + +// xn--5tzm5g : 2014-12-22 Global Website TLD Asia Limited +xn--5tzm5g +网站 + +// xn--6frz82g : 2013-09-23 Afilias Limited +xn--6frz82g +移动 + +// xn--6qq986b3xl : 2013-09-13 Tycoon Treasure Limited +xn--6qq986b3xl +我爱你 + +// xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) +xn--80adxhks +москва + +// xn--80aqecdr1a : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +xn--80aqecdr1a +католик + +// xn--80asehdb : 2013-07-14 CORE Association +xn--80asehdb +онлайн + +// xn--80aswg : 2013-07-14 CORE Association +xn--80aswg +сайт + +// xn--8y0a063a : 2015-03-26 China United Network Communications Corporation Limited +xn--8y0a063a +联通 + +// xn--9dbq2a : 2015-01-15 VeriSign Sarl +xn--9dbq2a +קום + +// xn--9et52u : 2014-06-12 RISE VICTORY LIMITED +xn--9et52u +时尚 + +// xn--9krt00a : 2015-03-12 Sina Corporation +xn--9krt00a +微博 + +// xn--b4w605ferd : 2014-08-07 Temasek Holdings (Private) Limited +xn--b4w605ferd +淡马锡 + +// xn--bck1b9a5dre4c : 2015-02-26 Amazon EU S.à r.l. +xn--bck1b9a5dre4c +ファッション + +// xn--c1avg : 2013-11-14 Public Interest Registry +xn--c1avg +орг + +// xn--c2br7g : 2015-01-15 VeriSign Sarl +xn--c2br7g +नेट + +// xn--cck2b3b : 2015-02-26 Amazon EU S.à r.l. +xn--cck2b3b +ストア + +// xn--cg4bki : 2013-09-27 SAMSUNG SDS CO., LTD +xn--cg4bki +삼성 + +// xn--czr694b : 2014-01-16 Dot Trademark TLD Holding Company Limted +xn--czr694b +商标 + +// xn--czrs0t : 2013-12-19 Wild Island, LLC +xn--czrs0t +商店 + +// xn--czru2d : 2013-11-21 Zodiac Capricorn Limited +xn--czru2d +商城 + +// xn--d1acj3b : 2013-11-20 The Foundation for Network Initiatives “The Smart Internet” +xn--d1acj3b +дети + +// xn--eckvdtc9d : 2014-12-18 Amazon EU S.à r.l. +xn--eckvdtc9d +ポイント + +// xn--efvy88h : 2014-08-22 Xinhua News Agency Guangdong Branch 新华通讯社广东分社 +xn--efvy88h +新闻 + +// xn--estv75g : 2015-02-19 Industrial and Commercial Bank of China Limited +xn--estv75g +工行 + +// xn--fct429k : 2015-04-09 Amazon EU S.à r.l. +xn--fct429k +家電 + +// xn--fhbei : 2015-01-15 VeriSign Sarl +xn--fhbei +كوم + +// xn--fiq228c5hs : 2013-09-08 TLD REGISTRY LIMITED +xn--fiq228c5hs +中文网 + +// xn--fiq64b : 2013-10-14 CITIC Group Corporation +xn--fiq64b +中信 + +// xn--fjq720a : 2014-05-22 Will Bloom, LLC +xn--fjq720a +娱乐 + +// xn--flw351e : 2014-07-31 Charleston Road Registry Inc. +xn--flw351e +谷歌 + +// xn--fzys8d69uvgm : 2015-05-14 PCCW Enterprises Limited +xn--fzys8d69uvgm +電訊盈科 + +// xn--g2xx48c : 2015-01-30 Minds + Machines Group Limited +xn--g2xx48c +购物 + +// xn--gckr3f0f : 2015-02-26 Amazon EU S.à r.l. +xn--gckr3f0f +クラウド + +// xn--gk3at1e : 2015-10-08 Amazon EU S.à r.l. +xn--gk3at1e +通販 + +// xn--hxt814e : 2014-05-15 Zodiac Libra Limited +xn--hxt814e +网店 + +// xn--i1b6b1a6a2e : 2013-11-14 Public Interest Registry +xn--i1b6b1a6a2e +संगठन + +// xn--imr513n : 2014-12-11 Dot Trademark TLD Holding Company Limted +xn--imr513n +餐厅 + +// xn--io0a7i : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) +xn--io0a7i +网络 + +// xn--j1aef : 2015-01-15 VeriSign Sarl +xn--j1aef +ком + +// xn--jlq61u9w7b : 2015-01-08 Nokia Corporation +xn--jlq61u9w7b +诺基亚 + +// xn--jvr189m : 2015-02-26 Amazon EU S.à r.l. +xn--jvr189m +食品 + +// xn--kcrx77d1x4a : 2014-11-07 Koninklijke Philips N.V. +xn--kcrx77d1x4a +飞利浦 + +// xn--kpu716f : 2014-12-22 Richemont DNS Inc. +xn--kpu716f +手表 + +// xn--kput3i : 2014-02-13 Beijing RITT-Net Technology Development Co., Ltd +xn--kput3i +手机 + +// xn--mgba3a3ejt : 2014-11-20 Aramco Services Company +xn--mgba3a3ejt +ارامكو + +// xn--mgba7c0bbn0a : 2015-05-14 Crescent Holding GmbH +xn--mgba7c0bbn0a +العليان + +// xn--mgbaakc7dvf : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +xn--mgbaakc7dvf +اتصالات + +// xn--mgbab2bd : 2013-10-31 CORE Association +xn--mgbab2bd +بازار + +// xn--mgbb9fbpob : 2014-12-18 GreenTech Consultancy Company W.L.L. +xn--mgbb9fbpob +موبايلي + +// xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre +xn--mgbca7dzdo +ابوظبي + +// xn--mgbi4ecexp : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +xn--mgbi4ecexp +كاثوليك + +// xn--mgbt3dhd : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. +xn--mgbt3dhd +همراه + +// xn--mk1bu44c : 2015-01-15 VeriSign Sarl +xn--mk1bu44c +닷컴 + +// xn--mxtq1m : 2014-03-06 Net-Chinese Co., Ltd. +xn--mxtq1m +政府 + +// xn--ngbc5azd : 2013-07-13 International Domain Registry Pty. Ltd. +xn--ngbc5azd +شبكة + +// xn--ngbe9e0a : 2014-12-04 Kuwait Finance House +xn--ngbe9e0a +بيتك + +// xn--ngbrx : 2015-11-12 League of Arab States +xn--ngbrx +عرب + +// xn--nqv7f : 2013-11-14 Public Interest Registry +xn--nqv7f +机构 + +// xn--nqv7fs00ema : 2013-11-14 Public Interest Registry +xn--nqv7fs00ema +组织机构 + +// xn--nyqy26a : 2014-11-07 Stable Tone Limited +xn--nyqy26a +健康 + +// xn--p1acf : 2013-12-12 Rusnames Limited +xn--p1acf +рус + +// xn--pbt977c : 2014-12-22 Richemont DNS Inc. +xn--pbt977c +珠宝 + +// xn--pssy2u : 2015-01-15 VeriSign Sarl +xn--pssy2u +大拿 + +// xn--q9jyb4c : 2013-09-17 Charleston Road Registry Inc. +xn--q9jyb4c +みんな + +// xn--qcka1pmc : 2014-07-31 Charleston Road Registry Inc. +xn--qcka1pmc +グーグル + +// xn--rhqv96g : 2013-09-11 Stable Tone Limited +xn--rhqv96g +世界 + +// xn--rovu88b : 2015-02-26 Amazon EU S.à r.l. +xn--rovu88b +書籍 + +// xn--ses554g : 2014-01-16 +xn--ses554g +网址 + +// xn--t60b56a : 2015-01-15 VeriSign Sarl +xn--t60b56a +닷넷 + +// xn--tckwe : 2015-01-15 VeriSign Sarl +xn--tckwe +コム + +// xn--tiq49xqyj : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +xn--tiq49xqyj +天主教 + +// xn--unup4y : 2013-07-14 Spring Fields, LLC +xn--unup4y +游戏 + +// xn--vermgensberater-ctb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +xn--vermgensberater-ctb +vermögensberater + +// xn--vermgensberatung-pwb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG +xn--vermgensberatung-pwb +vermögensberatung + +// xn--vhquv : 2013-08-27 Dash McCook, LLC +xn--vhquv +企业 + +// xn--vuq861b : 2014-10-16 Beijing Tele-info Network Technology Co., Ltd. +xn--vuq861b +信息 + +// xn--w4r85el8fhu5dnra : 2015-04-30 Kerry Trading Co. Limited +xn--w4r85el8fhu5dnra +嘉里大酒店 + +// xn--w4rs40l : 2015-07-30 Kerry Trading Co. Limited +xn--w4rs40l +嘉里 + +// xn--xhq521b : 2013-11-14 Guangzhou YU Wei Information Technology Co., Ltd. +xn--xhq521b +广东 + +// xn--zfr164b : 2013-11-08 China Organizational Name Administration Center +xn--zfr164b +政务 + +// xperia : 2015-05-14 Sony Mobile Communications AB +xperia + +// xyz : 2013-12-05 XYZ.COM LLC +xyz + +// yachts : 2014-01-09 DERYachts, LLC +yachts + +// yahoo : 2015-04-02 Yahoo! Domain Services Inc. +yahoo + +// yamaxun : 2014-12-18 Amazon EU S.à r.l. +yamaxun + +// yandex : 2014-04-10 YANDEX, LLC +yandex + +// yodobashi : 2014-11-20 YODOBASHI CAMERA CO.,LTD. +yodobashi + +// yoga : 2014-05-29 Top Level Domain Holdings Limited +yoga + +// yokohama : 2013-12-12 GMO Registry, Inc. +yokohama + +// you : 2015-04-09 Amazon EU S.à r.l. +you + +// youtube : 2014-05-01 Charleston Road Registry Inc. +youtube + +// yun : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. +yun + +// zappos : 2015-06-25 Amazon EU S.à r.l. +zappos + +// zara : 2014-11-07 Industria de Diseño Textil, S.A. (INDITEX, S.A.) +zara + +// zero : 2014-12-18 Amazon EU S.à r.l. +zero + +// zip : 2014-05-08 Charleston Road Registry Inc. +zip + +// zippo : 2015-07-02 Zadco Company +zippo + +// zone : 2013-11-14 Outer Falls, LLC +zone + +// zuerich : 2014-11-07 Kanton Zürich (Canton of Zurich) +zuerich + + +// ===END ICANN DOMAINS=== +// ===BEGIN PRIVATE DOMAINS=== +// (Note: these are in alphabetical order by company name) + +// Agnat sp. z o.o. : https://domena.pl +// Submitted by Przemyslaw Plewa +beep.pl + +// Alces Software Ltd : http://alces-software.com +// Submitted by Mark J. Titorenko +*.compute.estate +*.alces.network + +// alwaysdata : https://www.alwaysdata.com +// Submitted by Cyril +*.alwaysdata.net + +// Amazon CloudFront : https://aws.amazon.com/cloudfront/ +// Submitted by Donavan Miller +cloudfront.net + +// Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/ +// Submitted by Luke Wells +*.compute.amazonaws.com +*.compute-1.amazonaws.com +*.compute.amazonaws.com.cn +us-east-1.amazonaws.com + +// Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/ +// Submitted by Luke Wells +elasticbeanstalk.cn-north-1.amazonaws.com.cn +*.elasticbeanstalk.com + +// Amazon Elastic Load Balancing : https://aws.amazon.com/elasticloadbalancing/ +// Submitted by Luke Wells +*.elb.amazonaws.com +*.elb.amazonaws.com.cn + +// Amazon S3 : https://aws.amazon.com/s3/ +// Submitted by Luke Wells +s3.amazonaws.com +s3-ap-northeast-1.amazonaws.com +s3-ap-northeast-2.amazonaws.com +s3-ap-south-1.amazonaws.com +s3-ap-southeast-1.amazonaws.com +s3-ap-southeast-2.amazonaws.com +s3-ca-central-1.amazonaws.com +s3-eu-central-1.amazonaws.com +s3-eu-west-1.amazonaws.com +s3-eu-west-2.amazonaws.com +s3-external-1.amazonaws.com +s3-fips-us-gov-west-1.amazonaws.com +s3-sa-east-1.amazonaws.com +s3-us-gov-west-1.amazonaws.com +s3-us-east-2.amazonaws.com +s3-us-west-1.amazonaws.com +s3-us-west-2.amazonaws.com +s3.ap-northeast-2.amazonaws.com +s3.ap-south-1.amazonaws.com +s3.cn-north-1.amazonaws.com.cn +s3.ca-central-1.amazonaws.com +s3.eu-central-1.amazonaws.com +s3.eu-west-2.amazonaws.com +s3.us-east-2.amazonaws.com +s3.dualstack.ap-northeast-1.amazonaws.com +s3.dualstack.ap-northeast-2.amazonaws.com +s3.dualstack.ap-south-1.amazonaws.com +s3.dualstack.ap-southeast-1.amazonaws.com +s3.dualstack.ap-southeast-2.amazonaws.com +s3.dualstack.ca-central-1.amazonaws.com +s3.dualstack.eu-central-1.amazonaws.com +s3.dualstack.eu-west-1.amazonaws.com +s3.dualstack.eu-west-2.amazonaws.com +s3.dualstack.sa-east-1.amazonaws.com +s3.dualstack.us-east-1.amazonaws.com +s3.dualstack.us-east-2.amazonaws.com +s3-website-us-east-1.amazonaws.com +s3-website-us-west-1.amazonaws.com +s3-website-us-west-2.amazonaws.com +s3-website-ap-northeast-1.amazonaws.com +s3-website-ap-southeast-1.amazonaws.com +s3-website-ap-southeast-2.amazonaws.com +s3-website-eu-west-1.amazonaws.com +s3-website-sa-east-1.amazonaws.com +s3-website.ap-northeast-2.amazonaws.com +s3-website.ap-south-1.amazonaws.com +s3-website.ca-central-1.amazonaws.com +s3-website.eu-central-1.amazonaws.com +s3-website.eu-west-2.amazonaws.com +s3-website.us-east-2.amazonaws.com + +// Amune : https://amune.org/ +// Submitted by Team Amune +t3l3p0rt.net +tele.amune.org + +// Aptible : https://www.aptible.com/ +// Submitted by Thomas Orozco +on-aptible.com + +// Asociación Amigos de la Informática "Euskalamiga" : http://encounter.eus/ +// Submitted by Hector Martin +user.party.eus + +// Association potager.org : https://potager.org/ +// Submitted by Lunar +pimienta.org +poivron.org +potager.org +sweetpepper.org + +// ASUSTOR Inc. : http://www.asustor.com +// Submitted by Vincent Tseng +myasustor.com + +// AVM : https://avm.de +// Submitted by Andreas Weise +myfritz.net + +// backplane : https://www.backplane.io +// Submitted by Anthony Voutas +backplaneapp.io + +// BetaInABox +// Submitted by Adrian +betainabox.com + +// BinaryLane : http://www.binarylane.com +// Submitted by Nathan O'Sullivan +bnr.la + +// Boxfuse : https://boxfuse.com +// Submitted by Axel Fontaine +boxfuse.io + +// BrowserSafetyMark +// Submitted by Dave Tharp +browsersafetymark.io + +// callidomus: https://www.callidomus.com/ +// Submitted by Marcus Popp +mycd.eu + +// CentralNic : http://www.centralnic.com/names/domains +// Submitted by registry +ae.org +ar.com +br.com +cn.com +com.de +com.se +de.com +eu.com +gb.com +gb.net +hu.com +hu.net +jp.net +jpn.com +kr.com +mex.com +no.com +qc.com +ru.com +sa.com +se.com +se.net +uk.com +uk.net +us.com +uy.com +za.bz +za.com + +// Africa.com Web Solutions Ltd : https://registry.africa.com +// Submitted by Gavin Brown +africa.com + +// iDOT Services Limited : http://www.domain.gr.com +// Submitted by Gavin Brown +gr.com + +// Radix FZC : http://domains.in.net +// Submitted by Gavin Brown +in.net + +// US REGISTRY LLC : http://us.org +// Submitted by Gavin Brown +us.org + +// co.com Registry, LLC : https://registry.co.com +// Submitted by Gavin Brown +co.com + +// c.la : http://www.c.la/ +c.la + +// certmgr.org : https://certmgr.org +// Submitted by B. Blechschmidt +certmgr.org + +// Citrix : https://citrix.com +// Submitted by Alex Stoddard +xenapponazure.com + +// ClearVox : http://www.clearvox.nl/ +// Submitted by Leon Rowland +virtueeldomein.nl + +// cloudControl : https://www.cloudcontrol.com/ +// Submitted by Tobias Wilken +cloudcontrolled.com +cloudcontrolapp.com + +// co.ca : http://registry.co.ca/ +co.ca + +// i-registry s.r.o. : http://www.i-registry.cz/ +// Submitted by Martin Semrad +co.cz + +// CDN77.com : http://www.cdn77.com +// Submitted by Jan Krpes +c.cdn77.org +cdn77-ssl.net +r.cdn77.net +rsc.cdn77.org +ssl.origin.cdn77-secure.org + +// Cloud DNS Ltd : http://www.cloudns.net +// Submitted by Aleksander Hristov +cloudns.asia +cloudns.biz +cloudns.club +cloudns.cc +cloudns.eu +cloudns.in +cloudns.info +cloudns.org +cloudns.pro +cloudns.pw +cloudns.us + +// CoDNS B.V. +co.nl +co.no + +// Commerce Guys, SAS +// Submitted by Damien Tournoud +*.platform.sh + +// COSIMO GmbH http://www.cosimo.de +// Submitted by Rene Marticke +dyn.cosidns.de +dynamisches-dns.de +dnsupdater.de +internet-dns.de +l-o-g-i-n.de +dynamic-dns.info +feste-ip.net +knx-server.net +static-access.net + +// Craynic, s.r.o. : http://www.craynic.com/ +// Submitted by Ales Krajnik +realm.cz + +// Cryptonomic : https://cryptonomic.net/ +// Submitted by Andrew Cady +*.cryptonomic.net + +// Cupcake : https://cupcake.io/ +// Submitted by Jonathan Rudenberg +cupcake.is + +// cyon GmbH : https://www.cyon.ch/ +// Submitted by Dominic Luechinger +cyon.link +cyon.site + +// Daplie, Inc : https://daplie.com +// Submitted by AJ ONeal +daplie.me + +// Dansk.net : http://www.dansk.net/ +// Submitted by Anani Voule +biz.dk +co.dk +firm.dk +reg.dk +store.dk + +// deSEC : https://desec.io/ +// Submitted by Peter Thomassen +dedyn.io + +// DNShome : https://www.dnshome.de/ +// Submitted by Norbert Auler +dnshome.de + +// DreamHost : http://www.dreamhost.com/ +// Submitted by Andrew Farmer +dreamhosters.com + +// Drobo : http://www.drobo.com/ +// Submitted by Ricardo Padilha +mydrobo.com + +// Drud Holdings, LLC. : https://www.drud.com/ +// Submitted by Kevin Bridges +drud.io +drud.us + +// DuckDNS : http://www.duckdns.org/ +// Submitted by Richard Harper +duckdns.org + +// dy.fi : http://dy.fi/ +// Submitted by Heikki Hannikainen +dy.fi +tunk.org + +// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ +dyndns-at-home.com +dyndns-at-work.com +dyndns-blog.com +dyndns-free.com +dyndns-home.com +dyndns-ip.com +dyndns-mail.com +dyndns-office.com +dyndns-pics.com +dyndns-remote.com +dyndns-server.com +dyndns-web.com +dyndns-wiki.com +dyndns-work.com +dyndns.biz +dyndns.info +dyndns.org +dyndns.tv +at-band-camp.net +ath.cx +barrel-of-knowledge.info +barrell-of-knowledge.info +better-than.tv +blogdns.com +blogdns.net +blogdns.org +blogsite.org +boldlygoingnowhere.org +broke-it.net +buyshouses.net +cechire.com +dnsalias.com +dnsalias.net +dnsalias.org +dnsdojo.com +dnsdojo.net +dnsdojo.org +does-it.net +doesntexist.com +doesntexist.org +dontexist.com +dontexist.net +dontexist.org +doomdns.com +doomdns.org +dvrdns.org +dyn-o-saur.com +dynalias.com +dynalias.net +dynalias.org +dynathome.net +dyndns.ws +endofinternet.net +endofinternet.org +endoftheinternet.org +est-a-la-maison.com +est-a-la-masion.com +est-le-patron.com +est-mon-blogueur.com +for-better.biz +for-more.biz +for-our.info +for-some.biz +for-the.biz +forgot.her.name +forgot.his.name +from-ak.com +from-al.com +from-ar.com +from-az.net +from-ca.com +from-co.net +from-ct.com +from-dc.com +from-de.com +from-fl.com +from-ga.com +from-hi.com +from-ia.com +from-id.com +from-il.com +from-in.com +from-ks.com +from-ky.com +from-la.net +from-ma.com +from-md.com +from-me.org +from-mi.com +from-mn.com +from-mo.com +from-ms.com +from-mt.com +from-nc.com +from-nd.com +from-ne.com +from-nh.com +from-nj.com +from-nm.com +from-nv.com +from-ny.net +from-oh.com +from-ok.com +from-or.com +from-pa.com +from-pr.com +from-ri.com +from-sc.com +from-sd.com +from-tn.com +from-tx.com +from-ut.com +from-va.com +from-vt.com +from-wa.com +from-wi.com +from-wv.com +from-wy.com +ftpaccess.cc +fuettertdasnetz.de +game-host.org +game-server.cc +getmyip.com +gets-it.net +go.dyndns.org +gotdns.com +gotdns.org +groks-the.info +groks-this.info +ham-radio-op.net +here-for-more.info +hobby-site.com +hobby-site.org +home.dyndns.org +homedns.org +homeftp.net +homeftp.org +homeip.net +homelinux.com +homelinux.net +homelinux.org +homeunix.com +homeunix.net +homeunix.org +iamallama.com +in-the-band.net +is-a-anarchist.com +is-a-blogger.com +is-a-bookkeeper.com +is-a-bruinsfan.org +is-a-bulls-fan.com +is-a-candidate.org +is-a-caterer.com +is-a-celticsfan.org +is-a-chef.com +is-a-chef.net +is-a-chef.org +is-a-conservative.com +is-a-cpa.com +is-a-cubicle-slave.com +is-a-democrat.com +is-a-designer.com +is-a-doctor.com +is-a-financialadvisor.com +is-a-geek.com +is-a-geek.net +is-a-geek.org +is-a-green.com +is-a-guru.com +is-a-hard-worker.com +is-a-hunter.com +is-a-knight.org +is-a-landscaper.com +is-a-lawyer.com +is-a-liberal.com +is-a-libertarian.com +is-a-linux-user.org +is-a-llama.com +is-a-musician.com +is-a-nascarfan.com +is-a-nurse.com +is-a-painter.com +is-a-patsfan.org +is-a-personaltrainer.com +is-a-photographer.com +is-a-player.com +is-a-republican.com +is-a-rockstar.com +is-a-socialist.com +is-a-soxfan.org +is-a-student.com +is-a-teacher.com +is-a-techie.com +is-a-therapist.com +is-an-accountant.com +is-an-actor.com +is-an-actress.com +is-an-anarchist.com +is-an-artist.com +is-an-engineer.com +is-an-entertainer.com +is-by.us +is-certified.com +is-found.org +is-gone.com +is-into-anime.com +is-into-cars.com +is-into-cartoons.com +is-into-games.com +is-leet.com +is-lost.org +is-not-certified.com +is-saved.org +is-slick.com +is-uberleet.com +is-very-bad.org +is-very-evil.org +is-very-good.org +is-very-nice.org +is-very-sweet.org +is-with-theband.com +isa-geek.com +isa-geek.net +isa-geek.org +isa-hockeynut.com +issmarterthanyou.com +isteingeek.de +istmein.de +kicks-ass.net +kicks-ass.org +knowsitall.info +land-4-sale.us +lebtimnetz.de +leitungsen.de +likes-pie.com +likescandy.com +merseine.nu +mine.nu +misconfused.org +mypets.ws +myphotos.cc +neat-url.com +office-on-the.net +on-the-web.tv +podzone.net +podzone.org +readmyblog.org +saves-the-whales.com +scrapper-site.net +scrapping.cc +selfip.biz +selfip.com +selfip.info +selfip.net +selfip.org +sells-for-less.com +sells-for-u.com +sells-it.net +sellsyourhome.org +servebbs.com +servebbs.net +servebbs.org +serveftp.net +serveftp.org +servegame.org +shacknet.nu +simple-url.com +space-to-rent.com +stuff-4-sale.org +stuff-4-sale.us +teaches-yoga.com +thruhere.net +traeumtgerade.de +webhop.biz +webhop.info +webhop.net +webhop.org +worse-than.tv +writesthisblog.com + +// ddnss.de : https://www.ddnss.de/ +// Submitted by Robert Niedziela +ddnss.de +dyn.ddnss.de +dyndns.ddnss.de +dyndns1.de +dyn-ip24.de +home-webserver.de +dyn.home-webserver.de +myhome-server.de +ddnss.org + +// dynv6 : https://dynv6.com +// Submitted by Dominik Menke 2016-01-18 +dynv6.net + +// E4YOU spol. s.r.o. : https://e4you.cz/ +// Submitted by Vladimir Dudr +e4.cz + +// Enonic : http://enonic.com/ +// Submitted by Erik Kaareng-Sunde +enonic.io +customer.enonic.io + +// EU.org https://eu.org/ +// Submitted by Pierre Beyssac +eu.org +al.eu.org +asso.eu.org +at.eu.org +au.eu.org +be.eu.org +bg.eu.org +ca.eu.org +cd.eu.org +ch.eu.org +cn.eu.org +cy.eu.org +cz.eu.org +de.eu.org +dk.eu.org +edu.eu.org +ee.eu.org +es.eu.org +fi.eu.org +fr.eu.org +gr.eu.org +hr.eu.org +hu.eu.org +ie.eu.org +il.eu.org +in.eu.org +int.eu.org +is.eu.org +it.eu.org +jp.eu.org +kr.eu.org +lt.eu.org +lu.eu.org +lv.eu.org +mc.eu.org +me.eu.org +mk.eu.org +mt.eu.org +my.eu.org +net.eu.org +ng.eu.org +nl.eu.org +no.eu.org +nz.eu.org +paris.eu.org +pl.eu.org +pt.eu.org +q-a.eu.org +ro.eu.org +ru.eu.org +se.eu.org +si.eu.org +sk.eu.org +tr.eu.org +uk.eu.org +us.eu.org + +// Evennode : http://www.evennode.com/ +// Submitted by Michal Kralik +eu-1.evennode.com +eu-2.evennode.com +us-1.evennode.com +us-2.evennode.com + +// Facebook, Inc. +// Submitted by Peter Ruibal +apps.fbsbx.com + +// FAITID : https://faitid.org/ +// Submitted by Maxim Alzoba +// https://www.flexireg.net/stat_info +ru.net +adygeya.ru +bashkiria.ru +bir.ru +cbg.ru +com.ru +dagestan.ru +grozny.ru +kalmykia.ru +kustanai.ru +marine.ru +mordovia.ru +msk.ru +mytis.ru +nalchik.ru +nov.ru +pyatigorsk.ru +spb.ru +vladikavkaz.ru +vladimir.ru +abkhazia.su +adygeya.su +aktyubinsk.su +arkhangelsk.su +armenia.su +ashgabad.su +azerbaijan.su +balashov.su +bashkiria.su +bryansk.su +bukhara.su +chimkent.su +dagestan.su +east-kazakhstan.su +exnet.su +georgia.su +grozny.su +ivanovo.su +jambyl.su +kalmykia.su +kaluga.su +karacol.su +karaganda.su +karelia.su +khakassia.su +krasnodar.su +kurgan.su +kustanai.su +lenug.su +mangyshlak.su +mordovia.su +msk.su +murmansk.su +nalchik.su +navoi.su +north-kazakhstan.su +nov.su +obninsk.su +penza.su +pokrovsk.su +sochi.su +spb.su +tashkent.su +termez.su +togliatti.su +troitsk.su +tselinograd.su +tula.su +tuva.su +vladikavkaz.su +vladimir.su +vologda.su + +// Fastly Inc. : http://www.fastly.com/ +// Submitted by Fastly Security +map.fastly.net +a.prod.fastly.net +global.prod.fastly.net +a.ssl.fastly.net +b.ssl.fastly.net +global.ssl.fastly.net +fastlylb.net +map.fastlylb.net + +// Featherhead : https://featherhead.xyz/ +// Submitted by Simon Menke +fhapp.xyz + +// Firebase, Inc. +// Submitted by Chris Raynor +firebaseapp.com + +// Flynn : https://flynn.io +// Submitted by Jonathan Rudenberg +flynnhub.com + +// Freebox : http://www.freebox.fr +// Submitted by Romain Fliedel +freebox-os.com +freeboxos.com +fbx-os.fr +fbxos.fr +freebox-os.fr +freeboxos.fr + +// Fusion Intranet : https://www.fusion-intranet.com +// Submitted by Matthias Burtscher +myfusion.cloud + +// Futureweb OG : http://www.futureweb.at +// Submitted by Andreas Schnederle-Wagner +futurehosting.at +futuremailing.at +*.ex.ortsinfo.at +*.kunden.ortsinfo.at +*.statics.cloud + +// GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains +// Submitted by David Illsley +service.gov.uk + +// GitHub, Inc. +// Submitted by Patrick Toomey +github.io +githubusercontent.com +githubcloud.com +*.api.githubcloud.com +*.ext.githubcloud.com +gist.githubcloud.com +*.githubcloudusercontent.com + +// GitLab, Inc. +// Submitted by Alex Hanselka +gitlab.io + +// UKHomeOffice : https://www.gov.uk/government/organisations/home-office +// Submitted by Jon Shanks +homeoffice.gov.uk + +// GlobeHosting, Inc. +// Submitted by Zoltan Egresi +ro.im +shop.ro + +// GoIP DNS Services : http://www.goip.de +// Submitted by Christian Poulter +goip.de + +// Google, Inc. +// Submitted by Eduardo Vela +*.0emm.com +appspot.com +blogspot.ae +blogspot.al +blogspot.am +blogspot.ba +blogspot.be +blogspot.bg +blogspot.bj +blogspot.ca +blogspot.cf +blogspot.ch +blogspot.cl +blogspot.co.at +blogspot.co.id +blogspot.co.il +blogspot.co.ke +blogspot.co.nz +blogspot.co.uk +blogspot.co.za +blogspot.com +blogspot.com.ar +blogspot.com.au +blogspot.com.br +blogspot.com.by +blogspot.com.co +blogspot.com.cy +blogspot.com.ee +blogspot.com.eg +blogspot.com.es +blogspot.com.mt +blogspot.com.ng +blogspot.com.tr +blogspot.com.uy +blogspot.cv +blogspot.cz +blogspot.de +blogspot.dk +blogspot.fi +blogspot.fr +blogspot.gr +blogspot.hk +blogspot.hr +blogspot.hu +blogspot.ie +blogspot.in +blogspot.is +blogspot.it +blogspot.jp +blogspot.kr +blogspot.li +blogspot.lt +blogspot.lu +blogspot.md +blogspot.mk +blogspot.mr +blogspot.mx +blogspot.my +blogspot.nl +blogspot.no +blogspot.pe +blogspot.pt +blogspot.qa +blogspot.re +blogspot.ro +blogspot.rs +blogspot.ru +blogspot.se +blogspot.sg +blogspot.si +blogspot.sk +blogspot.sn +blogspot.td +blogspot.tw +blogspot.ug +blogspot.vn +cloudfunctions.net +codespot.com +googleapis.com +googlecode.com +pagespeedmobilizer.com +publishproxy.com +withgoogle.com +withyoutube.com + +// Hashbang : https://hashbang.sh +hashbang.sh + +// Hasura : https://hasura.io +// Submitted by Shahidh K Muhammed +hasura-app.io + +// Hepforge : https://www.hepforge.org +// Submitted by David Grellscheid +hepforge.org + +// Heroku : https://www.heroku.com/ +// Submitted by Tom Maher +herokuapp.com +herokussl.com + +// iki.fi +// Submitted by Hannu Aronsson +iki.fi + +// info.at : http://www.info.at/ +biz.at +info.at + +// Interlegis : http://www.interlegis.leg.br +// Submitted by Gabriel Ferreira +ac.leg.br +al.leg.br +am.leg.br +ap.leg.br +ba.leg.br +ce.leg.br +df.leg.br +es.leg.br +go.leg.br +ma.leg.br +mg.leg.br +ms.leg.br +mt.leg.br +pa.leg.br +pb.leg.br +pe.leg.br +pi.leg.br +pr.leg.br +rj.leg.br +rn.leg.br +ro.leg.br +rr.leg.br +rs.leg.br +sc.leg.br +se.leg.br +sp.leg.br +to.leg.br + +// Joyent : https://www.joyent.com/ +// Submitted by Brian Bennett +*.triton.zone +*.cns.joyent.com + +// JS.ORG : http://dns.js.org +// Submitted by Stefan Keim +js.org + +// Keyweb AG : https://www.keyweb.de +// Submitted by Martin Dannehl +keymachine.de + +// KnightPoint Systems, LLC : http://www.knightpoint.com/ +// Submitted by Roy Keene +knightpoint.systems + +// .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf +co.krd +edu.krd + +// Magento Commerce +// Submitted by Damien Tournoud +*.magentosite.cloud + +// Meteor Development Group : https://www.meteor.com/hosting +// Submitted by Pierre Carrier +meteorapp.com +eu.meteorapp.com + +// Michau Enterprises Limited : http://www.co.pl/ +co.pl + +// Microsoft : http://microsoft.com +// Submitted by Barry Dorrans +azurewebsites.net +azure-mobile.net +cloudapp.net + +// Mozilla Foundation : https://mozilla.org/ +// Submitted by glob +bmoattachments.org + +// Neustar Inc. +// Submitted by Trung Tran +4u.com + +// ngrok : https://ngrok.com/ +// Submitted by Alan Shreve +ngrok.io + +// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/ +// Submitted by Jeff Wheelhouse +nfshost.com + +// nsupdate.info : https://www.nsupdate.info/ +// Submitted by Thomas Waldmann +nsupdate.info +nerdpol.ovh + +// No-IP.com : https://noip.com/ +// Submitted by Deven Reza +blogsyte.com +brasilia.me +cable-modem.org +ciscofreak.com +collegefan.org +couchpotatofries.org +damnserver.com +ddns.me +ditchyourip.com +dnsfor.me +dnsiskinky.com +dvrcam.info +dynns.com +eating-organic.net +fantasyleague.cc +geekgalaxy.com +golffan.us +health-carereform.com +homesecuritymac.com +homesecuritypc.com +hopto.me +ilovecollege.info +loginto.me +mlbfan.org +mmafan.biz +myactivedirectory.com +mydissent.net +myeffect.net +mymediapc.net +mypsx.net +mysecuritycamera.com +mysecuritycamera.net +mysecuritycamera.org +net-freaks.com +nflfan.org +nhlfan.net +no-ip.ca +no-ip.co.uk +no-ip.net +noip.us +onthewifi.com +pgafan.net +point2this.com +pointto.us +privatizehealthinsurance.net +quicksytes.com +read-books.org +securitytactics.com +serveexchange.com +servehumour.com +servep2p.com +servesarcasm.com +stufftoread.com +ufcfan.org +unusualperson.com +workisboring.com +3utilities.com +bounceme.net +ddns.net +ddnsking.com +gotdns.ch +hopto.org +myftp.biz +myftp.org +myvnc.com +no-ip.biz +no-ip.info +no-ip.org +noip.me +redirectme.net +servebeer.com +serveblog.net +servecounterstrike.com +serveftp.com +servegame.com +servehalflife.com +servehttp.com +serveirc.com +serveminecraft.net +servemp3.com +servepics.com +servequake.com +sytes.net +webhop.me +zapto.org + +// NYC.mn : http://www.information.nyc.mn +// Submitted by Matthew Brown +nyc.mn + +// One Fold Media : http://www.onefoldmedia.com/ +// Submitted by Eddie Jones +nid.io + +// OpenCraft GmbH : http://opencraft.com/ +// Submitted by Sven Marnach +opencraft.hosting + +// Opera Software, A.S.A. +// Submitted by Yngve Pettersen +operaunite.com + +// OutSystems +// Submitted by Duarte Santos +outsystemscloud.com + +// OwnProvider : http://www.ownprovider.com +// Submitted by Jan Moennich +ownprovider.com + +// oy.lc +// Submitted by Charly Coste +oy.lc + +// Pagefog : https://pagefog.com/ +// Submitted by Derek Myers +pgfog.com + +// Pagefront : https://www.pagefronthq.com/ +// Submitted by Jason Kriss +pagefrontapp.com + +// .pl domains (grandfathered) +art.pl +gliwice.pl +krakow.pl +poznan.pl +wroc.pl +zakopane.pl + +// Pantheon Systems, Inc. : https://pantheon.io/ +// Submitted by Gary Dylina +pantheonsite.io +gotpantheon.com + +// Peplink | Pepwave : http://peplink.com/ +// Submitted by Steve Leung +mypep.link + +// Planet-Work : https://www.planet-work.com/ +// Submitted by Frédéric VANNIÈRE +on-web.fr + +// prgmr.com : https://prgmr.com/ +// Submitted by Sarah Newman +xen.prgmr.com + +// priv.at : http://www.nic.priv.at/ +// Submitted by registry +priv.at + +// Protonet GmbH : http://protonet.io +// Submitted by Martin Meier +protonet.io + +// Publication Presse Communication SARL : https://ppcom.fr +// Submitted by Yaacov Akiba Slama +chirurgiens-dentistes-en-france.fr + +// QA2 +// Submitted by Daniel Dent (https://www.danieldent.com/) +qa2.com + +// QNAP System Inc : https://www.qnap.com +// Submitted by Nick Chang +dev-myqnapcloud.com +alpha-myqnapcloud.com +myqnapcloud.com + +// Rackmaze LLC : https://www.rackmaze.com +// Submitted by Kirill Pertsev +rackmaze.com +rackmaze.net + +// Red Hat, Inc. OpenShift : https://openshift.redhat.com/ +// Submitted by Tim Kramer +rhcloud.com + +// RethinkDB : https://www.rethinkdb.com/ +// Submitted by Chris Kastorff +hzc.io + +// Revitalised Limited : http://www.revitalised.co.uk +// Submitted by Jack Price +wellbeingzone.eu +ptplus.fit +wellbeingzone.co.uk + +// Sandstorm Development Group, Inc. : https://sandcats.io/ +// Submitted by Asheesh Laroia +sandcats.io + +// SBE network solutions GmbH : https://www.sbe.de/ +// Submitted by Norman Meilick +logoip.de +logoip.com + +// Securepoint GmbH : https://www.securepoint.de +// Submitted by Erik Anders +firewall-gateway.com +firewall-gateway.de +my-gateway.de +my-router.de +spdns.de +spdns.eu +firewall-gateway.net +my-firewall.org +myfirewall.org +spdns.org + +// Service Online LLC : http://drs.ua/ +// Submitted by Serhii Bulakh +biz.ua +co.ua +pp.ua + +// ShiftEdit : https://shiftedit.net/ +// Submitted by Adam Jimenez +shiftedit.io + +// Shopblocks : http://www.shopblocks.com/ +// Submitted by Alex Bowers +myshopblocks.com + +// SinaAppEngine : http://sae.sina.com.cn/ +// Submitted by SinaAppEngine +1kapp.com +appchizi.com +applinzi.com +sinaapp.com +vipsinaapp.com + +// Skyhat : http://www.skyhat.io +// Submitted by Shante Adam +bounty-full.com +alpha.bounty-full.com +beta.bounty-full.com + +// staticland : https://static.land +// Submitted by Seth Vincent +static.land +dev.static.land +sites.static.land + +// SourceLair PC : https://www.sourcelair.com +// Submitted by Antonis Kalipetis +apps.lair.io +*.stolos.io + +// SpaceKit : https://www.spacekit.io/ +// Submitted by Reza Akhavan +spacekit.io + +// Stackspace : https://www.stackspace.io/ +// Submitted by Lina He +stackspace.space + +// Synology, Inc. : https://www.synology.com/ +// Submitted by Rony Weng +diskstation.me +dscloud.biz +dscloud.me +dscloud.mobi +dsmynas.com +dsmynas.net +dsmynas.org +familyds.com +familyds.net +familyds.org +i234.me +myds.me +synology.me + +// TAIFUN Software AG : http://taifun-software.de +// Submitted by Bjoern Henke +taifun-dns.de + +// TASK geographical domains (www.task.gda.pl/uslugi/dns) +gda.pl +gdansk.pl +gdynia.pl +med.pl +sopot.pl + +// TownNews.com : http://www.townnews.com +// Submitted by Dustin Ward +bloxcms.com +townnews-staging.com + +// TransIP : htts://www.transip.nl +// Submitted by Rory Breuk +*.transurl.be +*.transurl.eu +*.transurl.nl + +// TuxFamily : http://tuxfamily.org +// Submitted by TuxFamily administrators +tuxfamily.org + +// TwoDNS : https://www.twodns.de/ +// Submitted by TwoDNS-Support +dd-dns.de +diskstation.eu +diskstation.org +dray-dns.de +draydns.de +dyn-vpn.de +dynvpn.de +mein-vigor.de +my-vigor.de +my-wan.de +syno-ds.de +synology-diskstation.de +synology-ds.de + +// UDR Limited : http://www.udr.hk.com +// Submitted by registry +hk.com +hk.org +ltd.hk +inc.hk + +// .US +// Submitted by Ed Moore +lib.de.us + +// Viprinet Europe GmbH : http://www.viprinet.com +// Submitted by Simon Kissel +router.management + +// Western Digital Technologies, Inc : https://www.wdc.com +// Submitted by Jung Jin +remotewd.com + +// Wikimedia Labs : https://wikitech.wikimedia.org +// Submitted by Yuvi Panda +wmflabs.org + +// Yola : https://www.yola.com/ +// Submitted by Stefano Rivera +yolasite.com + +// Yombo : https://yombo.net +// Submitted by Mitch Schwenk +ybo.faith +yombo.me +homelink.one +ybo.party +ybo.review +ybo.science +ybo.trade + +// ZaNiC : http://www.za.net/ +// Submitted by registry +za.net +za.org + +// Zeit, Inc. : https://zeit.domains/ +// Submitted by Olli Vanhoja +now.sh + +// 1GB LLC : https://www.1gb.ua/ +// Submitted by 1GB LLC +cc.ua +inf.ua +ltd.ua + +// ===END PRIVATE DOMAINS=== diff --git a/net/ddns-scripts/files/services b/net/ddns-scripts/files/services index fd70b07..78b3456 100644 --- a/net/ddns-scripts/files/services +++ b/net/ddns-scripts/files/services @@ -42,7 +42,7 @@ "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-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]" "all-inkl.com" "http://[USERNAME]:[PASSWORD]@dyndns.kasserver.com/?myip=[IP]" @@ -84,7 +84,7 @@ "duckdns.org" "http://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ip=[IP]" "OK" -"duiadns.net" "http://[USERNAME]:[PASSWORD]@ipv4.duia.ro/dynamic.duia?host=[DOMAIN]&ip4=[IP]" +"duiadns.net" "http://ip.duiadns.net/dynamic.duia?host=[DOMAIN]&password=[PASSWORD]&ip4=[IP]" "dy.fi" "http://[USERNAME]:[PASSWORD]@www.dy.fi/nic/update?hostname=[DOMAIN]" "good|nochg" diff --git a/net/ddns-scripts/files/services_ipv6 b/net/ddns-scripts/files/services_ipv6 index f2409d6..5b2cc23 100644 --- a/net/ddns-scripts/files/services_ipv6 +++ b/net/ddns-scripts/files/services_ipv6 @@ -38,7 +38,7 @@ #.godaddy.com-v1 !!! Please install additional package "ddns-scripts_godaddy.com-v1" #.no-ip.com / noip.com !!! Please install additional package "ddns-scripts_no-ip_com" -"afraid.org-basicauth" "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP] +"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]" "all-inkl.com" "http://[USERNAME]:[PASSWORD]@dyndns.kasserver.com/?myip=[IP]" @@ -58,7 +58,7 @@ "duckdns.org" "http://www.duckdns.org/update?domains=[DOMAIN]&token=[PASSWORD]&ipv6=[IP]" "OK" -"duiadns.net" "http://[USERNAME]:[PASSWORD]@ipv6.duia.ro/dynamic.duia?host=[DOMAIN]&ip6=[IP]" +"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" diff --git a/net/ddns-scripts/files/update_cloudflare_com_v1.sh b/net/ddns-scripts/files/update_cloudflare_com_v1.sh index 6e89723..9fa9431 100755 --- a/net/ddns-scripts/files/update_cloudflare_com_v1.sh +++ b/net/ddns-scripts/files/update_cloudflare_com_v1.sh @@ -2,7 +2,7 @@ #.Distributed under the terms of the GNU General Public License (GPL) version 2.0 # # script for sending updates to cloudflare.com -#.2014-2015 Christian Schoenebeck +#.2014-2017 Christian Schoenebeck # many thanks to Paul for testing and feedback during development # # This script is parsed by dynamic_dns_functions.sh inside send_update() function @@ -19,15 +19,26 @@ [ -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 __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __TLD - -# split given Host/Domain into TLD, registrable domain, and subdomain -split_FQDN $domain __TLD __DOMAIN __SUBDOM -[ $? -ne 0 -o -z "$__DOMAIN" ] && \ - write_log 14 "Wrong Host/Domain configuration ($domain). Please correct configuration!" - -# put together what we need -__DOMAIN="$__DOMAIN.$__TLD" +local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __FQDN + +# split __SUBDOM __DOMAIN from $domain +# given data: +# @example.com for "domain record" +# host.sub@example.com for a "host record" +__SUBDOM=$(printf %s "$domain" | cut -d@ -f1) +__DOMAIN=$(printf %s "$domain" | cut -d@ -f2) + +# Cloudflare v1 needs: +# __DOMAIN = the base domain i.e. example.com +# __SUBDOM = the host.sub to change if a "host record" or blank if domain record +# __FQDN = the FQDN to detect record_id to change +# i.e. example.com for the "domain record" or host.sub.example.com for "host record" +if [ -z "$__SUBDOM" -o "$__SUBDOM" = "$__DOMAIN" ]; then + __SUBDOM="" + __FQDN="$__DOMAIN" +else + __FQDN="${__SUBDOM}.${__DOMAIN}" +fi # parse OpenWrt script with # functions for parsing and generating json @@ -90,7 +101,7 @@ cleanup() { # json_get_var __DISPLAY "display_name" # for debugging json_get_var __NAME "name" json_get_var __TYPE "type" - if [ "$__NAME" = "$domain" ]; then + if [ "$__NAME" = "$__FQDN" ]; then # we must verify IPv4 and IPv6 because there might be both for the same host [ \( $use_ipv6 -eq 0 -a "$__TYPE" = "A" \) -o \( $use_ipv6 -eq 1 -a "$__TYPE" = "AAAA" \) ] && { __FOUND=1 # mark found @@ -106,7 +117,7 @@ cleanup() { } json_get_var __RECID "rec_id" # last thing to do get rec_id json_cleanup # cleanup - write_log 7 "rec_id '$__RECID' detected for host/domain '$domain'" + write_log 7 "rec_id '$__RECID' detected for host/domain '$__FQDN'" } # build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html diff --git a/net/ddns-scripts/files/update_cloudflare_com_v4.sh b/net/ddns-scripts/files/update_cloudflare_com_v4.sh index 621203c..aef3b73 100755 --- a/net/ddns-scripts/files/update_cloudflare_com_v4.sh +++ b/net/ddns-scripts/files/update_cloudflare_com_v4.sh @@ -5,7 +5,7 @@ # 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 Christian Schoenebeck +#.2016-2017 Christian Schoenebeck # CloudFlare API documentation at https://api.cloudflare.com/ # # This script is parsed by dynamic_dns_functions.sh inside send_update() function @@ -29,11 +29,21 @@ local __HOST __DOMAIN __TYPE __URLBASE __PRGBASE __RUNPROG __DATA __IPV6 __ZONEI local __URLBASE="https://api.cloudflare.com/client/v4" # 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) -# __HOST != __DOMAIN then host@domain.tld => host.domain.tld -[ "$__HOST" = "$__DOMAIN" ] || __HOST=$(printf %s "$domain" | tr "@" ".") +# 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" @@ -118,23 +128,23 @@ __PRGBASE="$__PRGBASE --header 'Content-Type: application/json' " # __PRGBASE="$__PRGBASE --header 'Accept: application/json' " # read zone id for registered domain.TLD -__RUNPROG="$__PRGBASE --request GET $__URLBASE/zones?name=$__DOMAIN" +__RUNPROG="$__PRGBASE --request GET '$__URLBASE/zones?name=$__DOMAIN'" cloudflare_transfer || return 1 # extract zone id __ZONEID=$(grep -o '"id":"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) [ -z "$__ZONEID" ] && { write_log 4 "Could not detect 'zone id' for domain.tld: '$__DOMAIN'" - return 1 + 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" +__RUNPROG="$__PRGBASE --request GET '$__URLBASE/zones/$__ZONEID/dns_records?name=$__HOST&type=$__TYPE'" cloudflare_transfer || return 1 # extract record id __RECID=$(grep -o '"id":"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) [ -z "$__RECID" ] && { write_log 4 "Could not detect 'record id' for host.domain.tld: '$__HOST'" - return 1 + return 127 } # extract current stored IP @@ -153,12 +163,12 @@ __DATA=$(grep -o '"content":"[^"]*' $DATFILE | grep -o '[^"]*$' | head -1) expand_ipv6 $__DATA __DATA [ "$__DATA" = "$__IPV6" ] && { # IPv6 no update needed write_log 7 "IPv6 at CloudFlare.com already up to date" - return 127 + return 0 } else [ "$__DATA" = "$__IP" ] && { # IPv4 no update needed write_log 7 "IPv4 at CloudFlare.com already up to date" - return 127 + return 0 } fi } @@ -171,7 +181,7 @@ cat > $DATFILE << EOF EOF # let's complete transfer command -__RUNPROG="$__PRGBASE --request PUT --data @$DATFILE $__URLBASE/zones/$__ZONEID/dns_records/$__RECID" +__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_godaddy_com_v1.sh b/net/ddns-scripts/files/update_godaddy_com_v1.sh index 45fc0cc..9633b4e 100755 --- a/net/ddns-scripts/files/update_godaddy_com_v1.sh +++ b/net/ddns-scripts/files/update_godaddy_com_v1.sh @@ -4,7 +4,7 @@ # # script for sending updates to godaddy.com #.based on GoDaddy.sh v1.0 by Nazar78 @ TeaNazaR.com -#.2016 Christian Schoenebeck +#.2017 Christian Schoenebeck # GoDaddy Documentation at https://developer.godaddy.com/doc # # This script is parsed by dynamic_dns_functions.sh inside send_update() function @@ -27,9 +27,17 @@ local __HOST __DOMAIN __TYPE __URL __PRGBASE __RUNPROG __DATA __IPV6 # 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) -[ -z "$__HOST" -o "$__HOST" = "$__DOMAIN" ] && __HOST="%40" # no expizit host given so set to default "@" => urlencode "%40" + +# GoDaddy needs: +# __DOMAIN = the base domain i.e. example.com +# __HOST = host.sub if updating a host record or +# __HOST = "@" urlencoded "%40" for a domain record +[ -z "$__HOST" -o "$__HOST" = "$__DOMAIN" ] && __HOST="%40" # set record type [ $use_ipv6 -eq 0 ] && __TYPE="A" || __TYPE="AAAA" @@ -136,12 +144,12 @@ __DATA=$(sed -r 's/.+data":"(.+)","t.+/\1/g' $DATFILE) expand_ipv6 $__DATA __DATA [ "$__DATA" = "$__IPV6" ] && { # IPv6 no update needed write_log 7 "IPv6 at GoDaddy.com already up to date" - return 127 + return 0 } else [ "$__DATA" = "$__IP" ] && { # IPv4 no update needed write_log 7 "IPv4 at GoDaddy.com already up to date" - return 127 + return 0 } fi } diff --git a/net/dnscrypt-proxy/Makefile b/net/dnscrypt-proxy/Makefile index ee6c52b..c4b36f1 100644 --- a/net/dnscrypt-proxy/Makefile +++ b/net/dnscrypt-proxy/Makefile @@ -10,13 +10,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnscrypt-proxy -PKG_VERSION:=1.7.0 +PKG_VERSION:=1.9.4 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy -PKG_MD5SUM:=95df7262964dc22da62f7f6f0466c50e - +PKG_MD5SUM:=fdf4a708e7922e13b14555f315ca8d5361aec89b0595b06fdbbcaacfa4e6f11e PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/net/dnscrypt-proxy/files/dnscrypt-proxy.config b/net/dnscrypt-proxy/files/dnscrypt-proxy.config index 2c281ee..117e849 100644 --- a/net/dnscrypt-proxy/files/dnscrypt-proxy.config +++ b/net/dnscrypt-proxy/files/dnscrypt-proxy.config @@ -6,7 +6,17 @@ config dnscrypt-proxy ns1 # ephemeral keys option requires extra CPU cycles and can cause huge system load # option ephemeral_keys '0' # more details at https://github.com/jedisct1/dnscrypt-proxy#public-key-client-authentication - # option client_key '' + # option client_key '/path/to/client_key' + # option syslog '1' + # option syslog_prefix 'dnscrypt-proxy' + # option query_log_file '/path/to/logfile' + # enable cache may speed up dnscrypt-proxy, see https://github.com/jedisct1/dnscrypt-proxy/wiki/Go-faster + # option local_cache '0' + # disable IPv6 may also speed up dnscrypt-proxy, see https://github.com/jedisct1/dnscrypt-proxy/wiki/Go-faster + # option block_ipv6 '0' + # Blacklists allow you to block domains, ip, ... see https://github.com/jedisct1/dnscrypt-proxy/wiki/Filtering + # list blacklist 'domains:/path/to/domains-blacklist-file.txt' + # list blacklist 'domains:/path/to/domains-blacklist2-file.txt' # config dnscrypt-proxy ns2 # option address '127.0.0.1' diff --git a/net/dnscrypt-proxy/files/dnscrypt-proxy.init b/net/dnscrypt-proxy/files/dnscrypt-proxy.init index cc06ca6..ac7109a 100644 --- a/net/dnscrypt-proxy/files/dnscrypt-proxy.init +++ b/net/dnscrypt-proxy/files/dnscrypt-proxy.init @@ -3,32 +3,114 @@ START=50 USE_PROCD=1 PROG=/usr/sbin/dnscrypt-proxy +CONFIG_DIR=/var/etc +USER=nobody -dnscrypt_instance() { - local address port resolver resolvers_list ephemeral_keys client_key +dnscrypt_instance() { + local config_path="$CONFIG_DIR/dnscrypt-proxy-$1.conf" + create_config_file $1 "$config_path" - config_get address $1 'address' - config_get port $1 'port' - config_get resolver $1 'resolver' '' - config_get resolvers_list $1 'resolvers_list' '/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv' - config_get_bool ephemeral_keys $1 'ephemeral_keys' '0' - config_get client_key $1 'client_key' '' + procd_open_instance + procd_set_param command $PROG "$config_path" + procd_close_instance +} + +create_config_file() { + local address port resolver resolvers_list ephemeral_keys client_key syslog syslog_prefix local_cache query_log_file block_ipv6 + local config_path="$2" + + [ ! -d "$CONFIG_DIR" ] && mkdir -p "$CONFIG_DIR" + [ -f "$config_path" ] && rm "$config_path" + + config_get address $1 'address' '127.0.0.1' + config_get port $1 'port' '5353' + config_get resolver $1 'resolver' '' + config_get resolvers_list $1 'resolvers_list' '/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv' + config_get client_key $1 'client_key' '' + config_get syslog_prefix $1 'syslog_prefix' 'dnscrypt-proxy' + config_get query_log_file $1 'query_log_file' '' + config_get_bool syslog $1 'syslog' '1' + config_get_bool ephemeral_keys $1 'ephemeral_keys' '0' + config_get_bool local_cache $1 'local_cache' '0' + config_get_bool block_ipv6 $1 'block_ipv6' '0' + + append_param_not_empty "ResolverName" "$resolver" $config_path + append_param "ResolversList" "$resolvers_list" $config_path + append_param "User" "$USER" $config_path + append_param "LocalAddress" "$address:$port" $config_path + append_param_not_empty "ClientKey" "$client_key" $config_path + append_on_off "EphemeralKeys" $ephemeral_keys $config_path + append_on_off "Syslog" $syslog $config_path + append_param "SyslogPrefix" "$syslog_prefix" $config_path + append_on_off "LocalCache" $local_cache $config_path + append_param_not_empty "QueryLogFile" "$query_log_file" $config_path + append_yes_no "BlockIPv6" $block_ipv6 $config_path + + config_list_foreach $1 'blacklist' append_blacklists $config_path +} + +append_on_off() { + local param_name=$1 + local param_value=$2 + local config_path=$3 + local value + + if [ $param_value -eq 1 ] + then + value="on" + else + value="off" + fi + + echo "$param_name $value" >> $config_path +} + +append_yes_no() { + local param_name=$1 + local param_value=$2 + local config_path=$3 + local value + + if [ $param_value -eq 1 ] + then + value="yes" + else + value="no" + fi + + echo "$param_name $value" >> $config_path +} + +append_param() { + local param_name=$1 + local param_value=$2 + local config_path=$3 + + echo "$param_name $param_value" >> $config_path +} + +append_param_not_empty() { + local param_name=$1 + local param_value=$2 + local config_path=$3 + + if [ ! -z "$param_value" -a "$param_value" != " " ] + then + append_param "$param_name" "$param_value" "$config_path" + fi +} - procd_open_instance - procd_set_param command $PROG -u nobody -S - procd_append_param command -a "$address:$port" - procd_append_param command -L $resolvers_list - [ -n "$resolver" ] && procd_append_param command -R $resolver - [ $ephemeral_keys -eq 1 ] && procd_append_param command -E - [ -n "$client_key" ] && procd_append_param command -K $client_key - procd_close_instance +append_blacklists() { + local value="$1" + local config_path="$2" + append_param_not_empty "BlackList" "$value" $config_path } start_service() { - config_load dnscrypt-proxy - config_foreach dnscrypt_instance dnscrypt-proxy + config_load dnscrypt-proxy + config_foreach dnscrypt_instance dnscrypt-proxy } service_triggers() { - procd_add_reload_trigger 'dnscrypt-proxy' + procd_add_reload_trigger 'dnscrypt-proxy' } diff --git a/net/dynapoint/Makefile b/net/dynapoint/Makefile new file mode 100644 index 0000000..ca32cd1 --- /dev/null +++ b/net/dynapoint/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2016 Tobias Ilte +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dynapoint +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Tobias Ilte +PKG_LICENSE:=GPL-3.0+ + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=net + CATEGORY:=Network + SUBMENU:=wireless + DEPENDS:=+lua +libubus-lua +libuci-lua +libubox-lua +luci-lib-nixio + TITLE:=Dynamic access point manager +endef + +define Package/$(PKG_NAME)/description + Dynapoint uses LUA scripts to allow dynamic access point creation + and deletion depending on changes of certain network conditions. +endef + +define Package/$(PKG_NAME)/conffiles +/etc/config/dynapoint +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) ./src/dynapoint.lua $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./src/dynapoint.init $(1)/etc/init.d/dynapoint + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./src/dynapoint.config $(1)/etc/config/dynapoint +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/net/dynapoint/src/dynapoint.config b/net/dynapoint/src/dynapoint.config new file mode 100644 index 0000000..0578cf0 --- /dev/null +++ b/net/dynapoint/src/dynapoint.config @@ -0,0 +1,9 @@ +config rule 'internet' + list hosts 'http://www.example.com' + list hosts 'http://www.google.com' + option interval '60' + option timeout '5' + option offline_threshold '3' + option add_hostname_to_ssid '0' + option use_curl '0' + option curl_interface 'eth0' diff --git a/net/dynapoint/src/dynapoint.init b/net/dynapoint/src/dynapoint.init new file mode 100644 index 0000000..ff105d3 --- /dev/null +++ b/net/dynapoint/src/dynapoint.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common + +START=99 + +USE_PROCD=1 +PROG=/usr/sbin/dynapoint.lua +CONFFILE=/etc/config/dynapoint + +start_service() { + procd_open_instance + procd_set_param command $PROG + procd_set_param file $CONFFILE + procd_set_param respawn + procd_close_instance +} diff --git a/net/dynapoint/src/dynapoint.lua b/net/dynapoint/src/dynapoint.lua new file mode 100644 index 0000000..4d2e456 --- /dev/null +++ b/net/dynapoint/src/dynapoint.lua @@ -0,0 +1,203 @@ +#!/usr/bin/lua + +--[[ + +Copyright (C) 2016 Tobias Ilte + +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. + +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 . + +--]] + + +require "uci" +require "ubus" +require "uloop" +log = require "nixio" + +--open sys-logging +log.openlog("DynaPoint", "ndelay", "cons", "nowait"); + +local uci_cursor = uci.cursor() + +-- get all config sections with the given type +function getConfType(conf_file,type) + local ifce={} + uci_cursor:foreach(conf_file,type,function(s) ifce[s[".index"]]=s end) + return ifce +end + +ubus = ubus.connect() +if not ubus then + error("Failed to connect to ubusd") +end +ubus:call("network", "reload", {}) + +local interval = uci_cursor:get("dynapoint", "internet", "interval") +local timeout = uci_cursor:get("dynapoint", "internet", "timeout") +local offline_threshold = tonumber(uci_cursor:get("dynapoint", "internet", "offline_threshold")) +local hosts = uci_cursor:get("dynapoint", "internet", "hosts") +local numhosts = #hosts +local curl = tonumber(uci_cursor:get("dynapoint", "internet", "use_curl")) +if (curl == 1) then + curl_interface = uci_cursor:get("dynapoint", "internet", "curl_interface") +end +if (tonumber(uci_cursor:get("dynapoint", "internet", "add_hostname_to_ssid")) == 1 ) then + localhostname = uci_cursor:get("system", "system", "hostname") +end + +local table_names_rule = {} +local table_names_not_rule = {} +local ssids_with_hostname = {} +local ssids_not_rule = {} + +function get_dynapoint_sections(t) + for pos,val in pairs(t) do + if (type(val)=="table") then + get_dynapoint_sections(val); + elseif (type(val)=="string") then + if (pos == "dynapoint_rule") then + if (val == "internet") then + table_names_rule[#table_names_rule+1] = t[".name"] + elseif (val == "!internet") then + table_names_not_rule[#table_names_not_rule+1] = t[".name"] + if (localhostname) then + ssids_not_rule[#ssids_not_rule+1] = t[".ssid"] + ssids_with_hostname[#ssids_with_hostname+1] = t[".ssid"].."_"..localhostname + end + end + end + end + end +end + + +--print(table.getn(hosts)) + +get_dynapoint_sections(getConfType("wireless","wifi-iface")) + +-- revert all non-persistent ssid uci-changes regarding sections affecting dynapoint +for i = 1, #table_names_not_rule do + uci_cursor:revert("wireless", table_names_not_rule[i], "ssid") +end + + +local online = true + +if (#table_names_rule > 0) then + if (tonumber(uci_cursor:get("wireless", table_names_rule[1], "disabled")) == 1) then + online = false + end +else + log.syslog("info","Not properly configured. Please add BCP 38.")) + "BCP 38. " .. + "For IPv6, only source specific default routes are installed, so " .. + "no BCP38 firewall routes are needed.")) s = m:section(TypedSection, "bcp38", translate("BCP38 config")) s.anonymous = true diff --git a/net/memcached/Makefile b/net/memcached/Makefile index bd5267a..98904eb 100644 --- a/net/memcached/Makefile +++ b/net/memcached/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=memcached -PKG_VERSION:=1.4.31 +PKG_VERSION:=1.4.36 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://memcached.org/files -PKG_MD5SUM:=c19bb0e77e720f64f33ecb43de28a1b4 +PKG_MD5SUM:=1e028fbab7288911fcaa5ed2a21817fe PKG_MAINTAINER:=Thomas Heil diff --git a/net/mwan3-luci/Makefile b/net/mwan3-luci/Makefile index b4b49ce..8c77394 100644 --- a/net/mwan3-luci/Makefile +++ b/net/mwan3-luci/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-mwan3 PKG_VERSION:=1.4 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_MAINTAINER:=Aedan Renner PKG_LICENSE:=GPLv2 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua b/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua index bd34360..3d5a23d 100644 --- a/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua +++ b/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua @@ -51,6 +51,8 @@ function index() form("mwan/advanced_mwanconfig")) entry({"admin", "network", "mwan", "advanced", "networkconfig"}, form("mwan/advanced_networkconfig")) + entry({"admin", "network", "mwan", "advanced", "wirelessconfig"}, + form("mwan/advanced_wirelessconfig")) entry({"admin", "network", "mwan", "advanced", "diagnostics"}, template("mwan/advanced_diagnostics")) entry({"admin", "network", "mwan", "advanced", "diagnostics_display"}, @@ -270,6 +272,13 @@ function troubleshootingData() end mArray.netconfig = { networkConfig } + -- wireless config + local wirelessConfig = ut.trim(sys.exec("cat /etc/config/wireless | sed -e 's/.*username.*/ USERNAME HIDDEN/' -e 's/.*password.*/ PASSWORD HIDDEN/' -e 's/.*key.*/ KEY HIDDEN/'")) + if wirelessConfig == "" then + wirelessConfig = "No data found" + end + mArray.wificonfig = { wirelessConfig } + -- ifconfig local ifconfig = ut.trim(sys.exec("ifconfig")) if ifconfig == "" then diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_wirelessconfig.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_wirelessconfig.lua new file mode 100644 index 0000000..95e9f7c --- /dev/null +++ b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_wirelessconfig.lua @@ -0,0 +1,32 @@ +-- ------ wireless configuration ------ -- + +ut = require "luci.util" + +wirelessConfig = "/etc/config/wireless" + + +m5 = SimpleForm("wirelessconf", nil) + m5:append(Template("mwan/advanced_wirelessconfig")) -- highlight current tab + + +f = m5:section(SimpleSection, nil, + translate("This section allows you to modify the contents of /etc/config/wireless")) + +t = f:option(TextValue, "lines") + t.rmempty = true + t.rows = 20 + + function t.cfgvalue() + return nixio.fs.readfile(wirelessConfig) or "" + end + + function t.write(self, section, data) -- format and write new data to script + return nixio.fs.writefile(wirelessConfig, "\n" .. ut.trim(data:gsub("\r\n", "\n")) .. "\n") + end + + function f.handle(self, state, data) + return true + end + + +return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_diagnostics.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_diagnostics.htm index 1961569..14d404b 100644 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_diagnostics.htm +++ b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_diagnostics.htm @@ -4,6 +4,7 @@
  • "><%:Hotplug Script%>
  • "><%:MWAN Config%>
  • "><%:Network Config%>
  • +
  • "><%:Wireless Config%>
  • "><%:Diagnostics%>
  • "><%:Troubleshooting%>
  • diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_hotplugscript.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_hotplugscript.htm index cbef94b..4c2a0dc 100644 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_hotplugscript.htm +++ b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_hotplugscript.htm @@ -2,6 +2,7 @@
  • "><%:Hotplug Script%>
  • "><%:MWAN Config%>
  • "><%:Network Config%>
  • +
  • "><%:Wireless Config%>
  • "><%:Diagnostics%>
  • "><%:Troubleshooting%>
  • diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_mwanconfig.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_mwanconfig.htm index 5d83bdd..fba3fa6 100644 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_mwanconfig.htm +++ b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_mwanconfig.htm @@ -2,6 +2,7 @@
  • "><%:Hotplug Script%>
  • "><%:MWAN Config%>
  • "><%:Network Config%>
  • +
  • "><%:Wireless Config%>
  • "><%:Diagnostics%>
  • "><%:Troubleshooting%>
  • diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_networkconfig.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_networkconfig.htm index 5c06d36..cf90112 100644 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_networkconfig.htm +++ b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_networkconfig.htm @@ -2,6 +2,7 @@
  • "><%:Hotplug Script%>
  • "><%:MWAN Config%>
  • "><%:Network Config%>
  • +
  • "><%:Wireless Config%>
  • "><%:Diagnostics%>
  • "><%:Troubleshooting%>
  • diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_troubleshooting.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_troubleshooting.htm index 514d91f..0a12496 100644 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_troubleshooting.htm +++ b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_troubleshooting.htm @@ -4,6 +4,7 @@
  • "><%:Hotplug Script%>
  • "><%:MWAN Config%>
  • "><%:Network Config%>
  • +
  • "><%:Wireless Config%>
  • "><%:Diagnostics%>
  • "><%:Troubleshooting%>
  • @@ -19,6 +20,7 @@ var versions = 'Software versions :

    '; var mwanConfig = '

    Output of "cat /etc/config/mwan3" :

    '; var netConfig = '

    Output of "cat /etc/config/network" :

    '; + var wifiConfig = '

    Output of "cat /etc/config/wireless" :

    '; var ifconfig = '

    Output of "ifconfig" :

    '; var ipRoute = '

    Output of "route -n" :

    '; var ipRuleShow = '

    Output of "ip rule show" :

    '; @@ -26,10 +28,11 @@ var firewallOut = '

    Firewall default output policy (must be ACCEPT) :

    '; var iptables = '

    Output of "iptables -L -t mangle -v -n" :

    '; tshoot.innerHTML = String.format( - '
    %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s
    ', + '
    %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s
    ', versions, mArray.versions[0], mwanConfig, mArray.mwanconfig[0], netConfig, mArray.netconfig[0], - ifconfig, mArray.ifconfig[0], ipRoute, mArray.routeshow[0], ipRuleShow, mArray.iprule[0], - routeListTable, mArray.routelist[0], firewallOut, mArray.firewallout[0], iptables, mArray.iptables[0] + wifiConfig, mArray.wificonfig[0], ifconfig, mArray.ifconfig[0], ipRoute, mArray.routeshow[0], + ipRuleShow, mArray.iprule[0], routeListTable, mArray.routelist[0], firewallOut, mArray.firewallout[0], + iptables, mArray.iptables[0] ); } else diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_wirelessconfig.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_wirelessconfig.htm new file mode 100644 index 0000000..5077674 --- /dev/null +++ b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_wirelessconfig.htm @@ -0,0 +1,24 @@ + + + diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile index ddd2da4..3446d15 100644 --- a/net/net-snmp/Makefile +++ b/net/net-snmp/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2015 OpenWrt.org +# Copyright (C) 2006-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=net-snmp -PKG_VERSION:=5.4.4 -PKG_RELEASE:=2 +PKG_VERSION:=5.7.3 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/net-snmp -PKG_MD5SUM:=95aa054f3c99a1ce242807d7eaf98619 -PKG_MAINTAINER:=Jo-Philipp Wich +PKG_MD5SUM:=d4a3459e1577d0efa8d96ca70a885e53 +PKG_MAINTAINER:=Stijn Tintel PKG_LICENSE:=MIT BSD-3-Clause-Clear -PKG_FIXUP = patch-libtool +PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk @@ -40,6 +40,7 @@ define Package/libnetsnmp $(call Package/net-snmp/Default) SECTION:=libs CATEGORY:=Libraries + DEPENDS:=+libnl-tiny TITLE:=Open source SNMP implementation (libraries) endef @@ -50,6 +51,18 @@ $(call Package/net-snmp/Default/description) endef +define Package/snmp-mibs +$(call Package/net-snmp/Default) + TITLE:=Open source SNMP implementation (MIB-files) +endef + +define Package/snmp-mibs/description +$(call Package/net-snmp/Default/description) + . + This package contains SNMP MIB-Files. +endef + + define Package/snmp-utils $(call Package/net-snmp/Default) DEPENDS:=+libnetsnmp @@ -78,17 +91,14 @@ endef define Package/snmpd-static $(call Package/net-snmp/Default) + DEPENDS:=+snmpd TITLE:=Open source SNMP implementation (daemon) endef -define Package/snmpd-static/description -$(call Package/net-snmp/Default/description) - . - This package contains the SNMP agent, statically linked. -endef SNMP_MIB_MODULES_INCLUDED = \ + agentx \ host/hr_device \ host/hr_disk \ host/hr_filesys \ @@ -130,7 +140,6 @@ SNMP_MIB_MODULES_INCLUDED = \ SNMP_MIB_MODULES_EXCLUDED = \ agent_mibs \ - agentx \ disman/event \ disman/schedule \ hardware \ @@ -146,11 +155,12 @@ SNMP_MIB_MODULES_EXCLUDED = \ udp-mib \ utilities \ -SNMP_TRANSPORTS_INCLUDED = Callback UDP +SNMP_TRANSPORTS_INCLUDED = Callback UDP Unix -SNMP_TRANSPORTS_EXCLUDED = TCP TCPIPv6 Unix +SNMP_TRANSPORTS_EXCLUDED = TCP TCPIPv6 TARGET_CFLAGS += $(FPIC) +TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny CONFIGURE_ARGS += \ --enable-mfd-rewrites \ @@ -165,7 +175,6 @@ CONFIGURE_ARGS += \ --enable-applications \ --disable-debugging \ --disable-manuals \ - --disable-mibs \ --disable-scripts \ --with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \ --with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \ @@ -175,29 +184,24 @@ CONFIGURE_ARGS += \ --without-libwrap \ --without-rpm \ --without-zlib \ + --with-nl \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \ +CONFIGURE_VARS += \ + ac_cv_header_netlink_netlink_h=yes \ + netsnmp_cv_func_nl_connect_LIBS=-lnl-tiny \ + ifeq ($(CONFIG_IPV6),y) SNMP_TRANSPORTS_INCLUDED+= UDPIPv6 endif TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/usr/lib -ifdef CONFIG_PACKAGE_snmpd-static - define Build/Compile/static - $(MAKE) -C $(PKG_BUILD_DIR)/agent \ - LDFLAGS="$(TARGET_LDFLAGS) -lm -static" \ - EXEEXT="-static" \ - snmpd-static - endef -endif - define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ LDFLAGS="$(TARGET_LDFLAGS) -lm -lc" \ all install - $(Build/Compile/static) endef define Build/InstallDev @@ -216,26 +220,21 @@ define Package/libnetsnmp/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(1)/usr/lib/ endef -define Package/snmpd/conffiles -/etc/config/snmpd +define Package/snmp-mibs/install + $(INSTALL_DIR) $(1)/usr/share/snmp/mibs + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/* $(1)/usr/share/snmp/mibs/ endef -define Package/snmpd/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd - $(INSTALL_DIR) $(1)/etc/snmp - ln -sf /var/run/snmpd.conf $(1)/etc/snmp/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(1)/usr/sbin/snmpd +define Package/snmp-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(1)/usr/bin/ endef -define Package/snmpd-static/conffiles +define Package/snmpd/conffiles /etc/config/snmpd endef -define Package/snmpd-static/install +define Package/snmpd/install $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd $(INSTALL_DIR) $(1)/etc/snmp @@ -243,15 +242,11 @@ define Package/snmpd-static/install $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/agent/snmpd-static $(1)/usr/sbin/snmpd -endef - -define Package/snmp-utils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(1)/usr/sbin/snmpd endef $(eval $(call BuildPackage,libnetsnmp)) +$(eval $(call BuildPackage,snmp-mibs)) $(eval $(call BuildPackage,snmp-utils)) $(eval $(call BuildPackage,snmpd)) $(eval $(call BuildPackage,snmpd-static)) diff --git a/net/net-snmp/files/snmpd.conf b/net/net-snmp/files/snmpd.conf index 4bdc3d4..ac152d8 100644 --- a/net/net-snmp/files/snmpd.conf +++ b/net/net-snmp/files/snmpd.conf @@ -1,6 +1,9 @@ config agent option agentaddress UDP:161 +config agentx + option agentxsocket /var/run/agentx.sock + config com2sec public option secname ro option source default @@ -80,3 +83,7 @@ config exec option args /proc/sys/fs/file-nr # option miboid 1.2.3.4 +config engineid +# option engineid 'LEDE' + option engineidtype '3' + option engineidnic 'eth0' diff --git a/net/net-snmp/files/snmpd.init b/net/net-snmp/files/snmpd.init index ff78097..7df67de 100644 --- a/net/net-snmp/files/snmpd.init +++ b/net/net-snmp/files/snmpd.init @@ -15,6 +15,13 @@ snmpd_agent_add() { echo "agentaddress $agentaddress" >> $CONFIGFILE } +snmpd_agentx_add() { + local cfg="$1" + echo "master agentx" >> $CONFIGFILE + config_get agentxsocket "$cfg" agentxsocket + [ -n "$agentxsocket" ] && echo "agentXSocket $agentxsocket" >> $CONFIGFILE +} + snmpd_system_add() { local cfg="$1" config_get syslocation "$cfg" sysLocation @@ -191,6 +198,18 @@ snmpd_disk_add() { echo "$disk $partition $size" >> $CONFIGFILE } +snmpd_engineid_add() { + local cfg="$1" + + config_get engineid "$cfg" engineid + [ -n "$engineid" ] && echo "engineID $engineid" >> $CONFIGFILE + config_get engineidtype "$cfg" engineidtype + [ "$engineidtype" -ge 1 -a "$engineidtype" -le 3 ] && \ + echo "engineIDType $engineidtype" >> $CONFIGFILE + config_get engineidnic "$cfg" engineidnic + [ -n "$engineidnic" ] && echo "engineIDNic $engineidnic" >> $CONFIGFILE +} + start_service() { [ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE" @@ -199,6 +218,7 @@ start_service() { config_load snmpd config_foreach snmpd_agent_add agent + config_foreach snmpd_agentx_add agentx config_foreach snmpd_system_add system config_foreach snmpd_com2sec_add com2sec config_foreach snmpd_com2sec6_add com2sec6 @@ -213,6 +233,7 @@ start_service() { config_foreach snmpd_pass_add pass config_foreach snmpd_exec_add exec config_foreach snmpd_disk_add disk + config_foreach snmpd_engineid_add engineid procd_set_param command $PROG -Lf /dev/null -f procd_set_param file $CONFIGFILE diff --git a/net/net-snmp/patches/000-cross-compile.patch b/net/net-snmp/patches/000-cross-compile.patch new file mode 100644 index 0000000..2906220 --- /dev/null +++ b/net/net-snmp/patches/000-cross-compile.patch @@ -0,0 +1,47 @@ +From: Jo-Philipp Wich +Date: Fri, 6 Jan 2017 13:41:00 +0100 +Subject: [PATCH] configure: allow overriding hardcoded /usr/include/libnl3 + +In a cross-compile setting we do not want to probe the host systems +/usr/include path, therfore allow to disable this include path by passing +ac_cv_header_netlink_netlink_h=yes to configure. + +Also disable the testing for libraries providing nl_connect when +netsnmp_cv_func_nl_connect_LIBS is predefined since the proprietary +NETSNMP_SEARCH_LIBS() macro will clobber the internal link flags upon +encountering predefined cache variables, causing all subsequent configure +link tests to fail due to a stray "no" word getting passed to the linker. + +Signed-off-by: Jo-Philipp Wich +--- a/configure.d/config_os_libs2 ++++ b/configure.d/config_os_libs2 +@@ -226,14 +226,22 @@ if test "x$with_nl" != "xno"; then + case $target_os in + linux*) # Check for libnl (linux) + netsnmp_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS" +- NETSNMP_SEARCH_LIBS(nl_connect, nl-3, +- [AC_CHECK_HEADERS(netlink/netlink.h) +- EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES -I/usr/include/libnl3"], +- [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [], [LMIBLIBS]) ++ netsnmp_netlink_include_flags="" + if test "x$ac_cv_header_netlink_netlink_h" != xyes; then +- NETSNMP_SEARCH_LIBS(nl_connect, nl, [ +- AC_CHECK_HEADERS(netlink/netlink.h)], [], [], LMIBLIBS) ++ netsnmp_netlink_include_flags="-I/usr/include/libnl3" ++ fi ++ CPPFLAGS="$netsnmp_netlink_include_flags $CPPFLAGS" ++ if test "x$netsnmp_cv_func_nl_connect_LIBS" = x; then ++ NETSNMP_SEARCH_LIBS(nl_connect, nl-3, ++ [AC_CHECK_HEADERS(netlink/netlink.h) ++ EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES $netsnmp_netlink_include_flags"], ++ [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [], [LMIBLIBS]) ++ if test "x$ac_cv_header_netlink_netlink_h" != xyes; then ++ NETSNMP_SEARCH_LIBS(nl_connect, nl, [ ++ AC_CHECK_HEADERS(netlink/netlink.h)], [], [], LMIBLIBS) ++ fi ++ else ++ LMIBLIBS="$LMIBLIBS $netsnmp_cv_func_nl_connect_LIBS" + fi + if test "x$ac_cv_header_netlink_netlink_h" = xyes; then + AC_EGREP_HEADER([nl_socket_free], [netlink/socket.h], diff --git a/net/net-snmp/patches/100-debian-statistics.patch b/net/net-snmp/patches/100-debian-statistics.patch index c937fca..c6e1db4 100644 --- a/net/net-snmp/patches/100-debian-statistics.patch +++ b/net/net-snmp/patches/100-debian-statistics.patch @@ -1,6 +1,6 @@ --- a/agent/mibgroup/mibII/interfaces.c +++ b/agent/mibgroup/mibII/interfaces.c -@@ -1561,6 +1561,10 @@ Interface_Scan_Init(void) +@@ -1590,6 +1590,10 @@ Interface_Scan_Init(void) struct ifnet *nnew; char *stats, *ifstart = line; @@ -11,7 +11,7 @@ if (line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = '\0'; -@@ -1594,7 +1598,7 @@ Interface_Scan_Init(void) +@@ -1622,7 +1622,7 @@ Interface_Scan_Init(void) &coll) != 5)) { if ((scan_line_to_use == scan_line_2_2) && !strstr(line, "No statistics available")) diff --git a/net/net-snmp/patches/110-debian-makefiles.patch b/net/net-snmp/patches/110-debian-makefiles.patch index 5ce771c..5ace743 100644 --- a/net/net-snmp/patches/110-debian-makefiles.patch +++ b/net/net-snmp/patches/110-debian-makefiles.patch @@ -1,6 +1,7 @@ ---- a/local/Makefile.in -+++ b/local/Makefile.in -@@ -100,7 +100,7 @@ tkmib.made: $(srcdir)/tkmib +diff -uNr a/local/Makefile.in b/local/Makefile.in +--- a/local/Makefile.in 2014-02-20 08:36:42.000000000 +0800 ++++ b/local/Makefile.in 2014-05-27 13:21:34.245223503 +0800 +@@ -103,7 +103,7 @@ mib2c.made: $(srcdir)/mib2c if test "x$(PERL)" != "x" ; then \ @@ -9,9 +10,21 @@ else \ touch mib2c.made; \ fi ---- a/mibs/Makefile.in -+++ b/mibs/Makefile.in -@@ -48,11 +48,15 @@ NETSNMPMIBS = NET-SNMP-TC.txt NET-SNMP-M +diff -uNr a/Makefile.top b/Makefile.top +--- a/Makefile.top 2014-02-20 08:36:42.000000000 +0800 ++++ b/Makefile.top 2014-05-27 13:26:53.023737120 +0800 +@@ -27,6 +27,7 @@ + snmplibdir = $(datadir)/snmp + mibdir = $(snmplibdir)/mibs + persistentdir = @PERSISTENT_DIRECTORY@ ++sysconfdir = @sysconfdir@ + DESTDIR = @INSTALL_PREFIX@ + INSTALL_PREFIX = $(DESTDIR) + +diff -uNr a/mibs/Makefile.in b/mibs/Makefile.in +--- a/mibs/Makefile.in 2014-02-20 08:36:42.000000000 +0800 ++++ b/mibs/Makefile.in 2014-05-27 13:25:07.151988585 +0800 +@@ -49,11 +49,15 @@ UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \ UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt @@ -28,13 +41,3 @@ all: standardall ---- a/Makefile.top -+++ b/Makefile.top -@@ -26,6 +26,7 @@ man8dir = $(mandir)/man8 - snmplibdir = $(datadir)/snmp - mibdir = $(snmplibdir)/mibs - persistentdir = @PERSISTENT_DIRECTORY@ -+sysconfdir = @sysconfdir@ - DESTDIR = @INSTALL_PREFIX@ - INSTALL_PREFIX = $(DESTDIR) - diff --git a/net/net-snmp/patches/120-debian-searchdirs.patch b/net/net-snmp/patches/120-debian-searchdirs.patch index d8c88f3..b5e377f 100644 --- a/net/net-snmp/patches/120-debian-searchdirs.patch +++ b/net/net-snmp/patches/120-debian-searchdirs.patch @@ -1,6 +1,6 @@ --- a/local/mib2c +++ b/local/mib2c -@@ -60,8 +60,9 @@ $currentlevel = -1; +@@ -61,8 +61,9 @@ $currentlevel = -1; if($ENV{MIB2C_DIR}) { push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR}); } diff --git a/net/net-snmp/patches/130-debian-extramibs.patch b/net/net-snmp/patches/130-debian-extramibs.patch index e741ee7..48fb907 100644 --- a/net/net-snmp/patches/130-debian-extramibs.patch +++ b/net/net-snmp/patches/130-debian-extramibs.patch @@ -931,1084 +931,6 @@ + + END --- /dev/null -+++ b/mibs/BRIDGE-MIB.txt -@@ -0,0 +1,1075 @@ -+BRIDGE-MIB DEFINITIONS ::= BEGIN -+ -+IMPORTS -+ Counter, TimeTicks -+ FROM RFC1155-SMI -+ mib-2 -+ FROM RFC1213-MIB -+ OBJECT-TYPE -+ FROM RFC-1212 -+ TRAP-TYPE -+ FROM RFC-1215; -+ -+-- All representations of MAC addresses in this MIB Module -+-- use, as a textual convention (i.e. this convention does -+-- not affect their encoding), the data type: -+MacAddress ::= OCTET STRING (SIZE (6)) -- a 6 octet address -+ -- in the -+ -- "canonical" -+ -- order -+-- defined by IEEE 802.1a, i.e., as if it were transmitted -+-- least significant bit first, even though 802.5 (in -+-- contrast to other n802.x protocols) requires MAC -+-- addresses to be transmitted most significant bit first. -+-- -+-- 16-bit addresses, if needed, are represented by setting -+-- their upper 4 octets to all 0's, i.e., AAFF would be -+-- represented as 00000000AAFF. -+ -+-- Similarly, all representations of Bridge-Id in this MIB -+-- Module use, as a textual convention (i.e. this -+-- convention does not affect their encoding), the data -+-- type: -+BridgeId ::= OCTET STRING (SIZE (8)) -- the -+ -- Bridge-Identifier -+ -- as used in the -+ -- Spanning Tree -+-- Protocol to uniquely identify a bridge. Its first two -+-- octets (in network byte order) contain a priority -+-- value and its last 6 octets contain the MAC address -+-- used to refer to a bridge in a unique fashion -+-- (typically, the numerically smallest MAC address -+-- of all ports on the bridge). -+ -+-- Several objects in this MIB module represent values of -+-- timers used by the Spanning Tree Protocol. In this -+-- MIB, these timers have values in units of hundreths of -+-- a second (i.e. 1/100 secs). -+-- These timers, when stored in a Spanning Tree Protocol's -+-- BPDU, are in units of 1/256 seconds. Note, however, -+-- that 802.1D-1990 specifies a settable granularity of -+-- no more than 1 second for these timers. To avoid -+-- ambiguity, a data type is defined here as a textual -+-- convention and all representation of these timers -+-- in this MIB module are defined using this data type. An -+-- algorithm is also defined for converting between the -+-- different units, to ensure a timer's value is not -+-- distorted by multiple conversions. -+-- The data type is: -+ -+Timeout ::= INTEGER -- a STP timer in units of 1/100 seconds -+ -+-- To convert a Timeout value into a value in units of -+-- 1/256 seconds, the following algorithm should be used: -+-- -+-- b = floor( (n * 256) / 100) -+-- -+-- where: -+-- floor = quotient [ignore remainder] -+-- n is the value in 1/100 second units -+-- b is the value in 1/256 second units -+-- -+-- To convert the value from 1/256 second units back to -+-- 1/100 seconds, the following algorithm should be used: -+-- -+-- n = ceiling( (b * 100) / 256) -+-- -+-- where: -+-- ceiling = quotient [if remainder is 0], or -+-- quotient + 1 [if remainder is non-zero] -+-- n is the value in 1/100 second units -+-- b is the value in 1/256 second units -+-- -+-- Note: it is important that the arithmetic operations are -+-- done in the order specified (i.e., multiply first, divide -+-- second). -+ -+ dot1dBridge OBJECT IDENTIFIER ::= { mib-2 17 } -+ -+-- groups in the Bridge MIB -+ -+dot1dBase OBJECT IDENTIFIER ::= { dot1dBridge 1 } -+ -+dot1dStp OBJECT IDENTIFIER ::= { dot1dBridge 2 } -+ -+dot1dSr OBJECT IDENTIFIER ::= { dot1dBridge 3 } -+-- separately documented -+ -+dot1dTp OBJECT IDENTIFIER ::= { dot1dBridge 4 } -+ -+dot1dStatic OBJECT IDENTIFIER ::= { dot1dBridge 5 } -+ -+-- the dot1dBase group -+ -+-- Implementation of the dot1dBase group is mandatory for all -+-- bridges. -+ -+dot1dBaseBridgeAddress OBJECT-TYPE -+ SYNTAX MacAddress -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The MAC address used by this bridge when it must -+ be referred to in a unique fashion. It is -+ recommended that this be the numerically smallest -+ MAC address of all ports that belong to this -+ bridge. However it is only required to be unique. -+ When concatenated with dot1dStpPriority a unique -+ BridgeIdentifier is formed which is used in the -+ Spanning Tree Protocol." -+ REFERENCE -+ "IEEE 802.1D-1990: Sections 6.4.1.1.3 and 3.12.5" -+ ::= { dot1dBase 1 } -+ -+dot1dBaseNumPorts OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of ports controlled by this bridging -+ entity." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.4.1.1.3" -+ ::= { dot1dBase 2 } -+ -+dot1dBaseType OBJECT-TYPE -+ SYNTAX INTEGER { -+ unknown(1), -+ transparent-only(2), -+ sourceroute-only(3), -+ srt(4) -+ } -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "Indicates what type of bridging this bridge can -+ perform. If a bridge is actually performing a -+ certain type of bridging this will be indicated by -+ entries in the port table for the given type." -+ ::= { dot1dBase 3 } -+ -+-- The Generic Bridge Port Table -+ -+dot1dBasePortTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dBasePortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains generic information about -+ every port that is associated with this bridge. -+ Transparent, source-route, and srt ports are -+ included." -+ ::= { dot1dBase 4 } -+ -+dot1dBasePortEntry OBJECT-TYPE -+ SYNTAX Dot1dBasePortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information for each port of the -+ bridge." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.4.2, 6.6.1" -+ INDEX { dot1dBasePort } -+ ::= { dot1dBasePortTable 1 } -+ -+Dot1dBasePortEntry ::= -+ SEQUENCE { -+ dot1dBasePort -+ INTEGER, -+ dot1dBasePortIfIndex -+ INTEGER, -+ dot1dBasePortCircuit -+ -+ OBJECT IDENTIFIER, -+ dot1dBasePortDelayExceededDiscards -+ Counter, -+ dot1dBasePortMtuExceededDiscards -+ Counter -+ } -+ -+dot1dBasePort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port for which this entry -+ contains bridge management information." -+ ::= { dot1dBasePortEntry 1 } -+ -+dot1dBasePortIfIndex OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The value of the instance of the ifIndex object, -+ defined in MIB-II, for the interface corresponding -+ to this port." -+ ::= { dot1dBasePortEntry 2 } -+ -+dot1dBasePortCircuit OBJECT-TYPE -+ SYNTAX OBJECT IDENTIFIER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "For a port which (potentially) has the same value -+ of dot1dBasePortIfIndex as another port on the -+ same bridge, this object contains the name of an -+ object instance unique to this port. For example, -+ in the case where multiple ports correspond one- -+ to-one with multiple X.25 virtual circuits, this -+ value might identify an (e.g., the first) object -+ instance associated with the X.25 virtual circuit -+ corresponding to this port. -+ -+ For a port which has a unique value of -+ dot1dBasePortIfIndex, this object can have the -+ value { 0 0 }." -+ ::= { dot1dBasePortEntry 3 } -+ -+dot1dBasePortDelayExceededDiscards OBJECT-TYPE -+ SYNTAX Counter -+ -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames discarded by this port due -+ to excessive transit delay through the bridge. It -+ is incremented by both transparent and source -+ route bridges." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dBasePortEntry 4 } -+ -+dot1dBasePortMtuExceededDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames discarded by this port due -+ to an excessive size. It is incremented by both -+ transparent and source route bridges." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dBasePortEntry 5 } -+ -+-- the dot1dStp group -+ -+-- Implementation of the dot1dStp group is optional. It is -+-- implemented by those bridges that support the Spanning Tree -+-- Protocol. -+ -+dot1dStpProtocolSpecification OBJECT-TYPE -+ SYNTAX INTEGER { -+ unknown(1), -+ decLb100(2), -+ ieee8021d(3) -+ } -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "An indication of what version of the Spanning -+ Tree Protocol is being run. The value -+ 'decLb100(2)' indicates the DEC LANbridge 100 -+ Spanning Tree protocol. IEEE 802.1d -+ implementations will return 'ieee8021d(3)'. If -+ future versions of the IEEE Spanning Tree Protocol -+ are released that are incompatible with the -+ current version a new value will be defined." -+ -+ ::= { dot1dStp 1 } -+ -+dot1dStpPriority OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value of the write-able portion of the Bridge -+ ID, i.e., the first two octets of the (8 octet -+ long) Bridge ID. The other (last) 6 octets of the -+ Bridge ID are given by the value of -+ dot1dBaseBridgeAddress." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.7" -+ ::= { dot1dStp 2 } -+ -+dot1dStpTimeSinceTopologyChange OBJECT-TYPE -+ SYNTAX TimeTicks -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The time (in hundredths of a second) since the -+ last time a topology change was detected by the -+ bridge entity." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.8.1.1.3" -+ ::= { dot1dStp 3 } -+ -+dot1dStpTopChanges OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The total number of topology changes detected by -+ this bridge since the management entity was last -+ reset or initialized." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.8.1.1.3" -+ ::= { dot1dStp 4 } -+ -+dot1dStpDesignatedRoot OBJECT-TYPE -+ SYNTAX BridgeId -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The bridge identifier of the root of the spanning -+ tree as determined by the Spanning Tree Protocol -+ as executed by this node. This value is used as -+ -+ the Root Identifier parameter in all Configuration -+ Bridge PDUs originated by this node." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.1" -+ ::= { dot1dStp 5 } -+ -+dot1dStpRootCost OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The cost of the path to the root as seen from -+ this bridge." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.2" -+ ::= { dot1dStp 6 } -+ -+dot1dStpRootPort OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port which offers the -+ lowest cost path from this bridge to the root -+ bridge." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.3" -+ ::= { dot1dStp 7 } -+ -+dot1dStpMaxAge OBJECT-TYPE -+ SYNTAX Timeout -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The maximum age of Spanning Tree Protocol -+ information learned from the network on any port -+ before it is discarded, in units of hundredths of -+ a second. This is the actual value that this -+ bridge is currently using." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.4" -+ ::= { dot1dStp 8 } -+ -+dot1dStpHelloTime OBJECT-TYPE -+ SYNTAX Timeout -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ -+ "The amount of time between the transmission of -+ Configuration bridge PDUs by this node on any port -+ when it is the root of the spanning tree or trying -+ to become so, in units of hundredths of a second. -+ This is the actual value that this bridge is -+ currently using." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.5" -+ ::= { dot1dStp 9 } -+ -+dot1dStpHoldTime OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "This time value determines the interval length -+ during which no more than two Configuration bridge -+ PDUs shall be transmitted by this node, in units -+ of hundredths of a second." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.14" -+ ::= { dot1dStp 10 } -+ -+dot1dStpForwardDelay OBJECT-TYPE -+ SYNTAX Timeout -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "This time value, measured in units of hundredths -+ of a second, controls how fast a port changes its -+ spanning state when moving towards the Forwarding -+ state. The value determines how long the port -+ stays in each of the Listening and Learning -+ states, which precede the Forwarding state. This -+ value is also used, when a topology change has -+ been detected and is underway, to age all dynamic -+ entries in the Forwarding Database. [Note that -+ this value is the one that this bridge is -+ currently using, in contrast to -+ dot1dStpBridgeForwardDelay which is the value that -+ this bridge and all others would start using -+ if/when this bridge were to become the root.]" -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.6" -+ ::= { dot1dStp 11 } -+ -+dot1dStpBridgeMaxAge OBJECT-TYPE -+ SYNTAX Timeout (600..4000) -+ -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value that all bridges use for MaxAge when -+ this bridge is acting as the root. Note that -+ 802.1D-1990 specifies that the range for this -+ parameter is related to the value of -+ dot1dStpBridgeHelloTime. The granularity of this -+ timer is specified by 802.1D-1990 to be 1 second. -+ An agent may return a badValue error if a set is -+ attempted to a value which is not a whole number -+ of seconds." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.8" -+ ::= { dot1dStp 12 } -+ -+dot1dStpBridgeHelloTime OBJECT-TYPE -+ SYNTAX Timeout (100..1000) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value that all bridges use for HelloTime when -+ this bridge is acting as the root. The -+ granularity of this timer is specified by 802.1D- -+ 1990 to be 1 second. An agent may return a -+ badValue error if a set is attempted to a value -+ which is not a whole number of seconds." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.9" -+ ::= { dot1dStp 13 } -+ -+dot1dStpBridgeForwardDelay OBJECT-TYPE -+ SYNTAX Timeout (400..3000) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value that all bridges use for ForwardDelay -+ when this bridge is acting as the root. Note that -+ 802.1D-1990 specifies that the range for this -+ parameter is related to the value of -+ dot1dStpBridgeMaxAge. The granularity of this -+ timer is specified by 802.1D-1990 to be 1 second. -+ An agent may return a badValue error if a set is -+ attempted to a value which is not a whole number -+ of seconds." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.3.10" -+ ::= { dot1dStp 14 } -+ -+-- The Spanning Tree Port Table -+ -+dot1dStpPortTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dStpPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains port-specific information -+ for the Spanning Tree Protocol." -+ ::= { dot1dStp 15 } -+ -+dot1dStpPortEntry OBJECT-TYPE -+ SYNTAX Dot1dStpPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information maintained by every port -+ about the Spanning Tree Protocol state for that -+ port." -+ INDEX { dot1dStpPort } -+ ::= { dot1dStpPortTable 1 } -+ -+Dot1dStpPortEntry ::= -+ SEQUENCE { -+ dot1dStpPort -+ INTEGER, -+ dot1dStpPortPriority -+ INTEGER, -+ dot1dStpPortState -+ INTEGER, -+ dot1dStpPortEnable -+ INTEGER, -+ dot1dStpPortPathCost -+ INTEGER, -+ dot1dStpPortDesignatedRoot -+ BridgeId, -+ dot1dStpPortDesignatedCost -+ INTEGER, -+ dot1dStpPortDesignatedBridge -+ BridgeId, -+ dot1dStpPortDesignatedPort -+ OCTET STRING, -+ dot1dStpPortForwardTransitions -+ Counter -+ } -+ -+dot1dStpPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port for which this entry -+ contains Spanning Tree Protocol management -+ information." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.8.2.1.2" -+ ::= { dot1dStpPortEntry 1 } -+ -+dot1dStpPortPriority OBJECT-TYPE -+ SYNTAX INTEGER (0..255) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The value of the priority field which is -+ contained in the first (in network byte order) -+ octet of the (2 octet long) Port ID. The other -+ octet of the Port ID is given by the value of -+ dot1dStpPort." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.1" -+ ::= { dot1dStpPortEntry 2 } -+ -+dot1dStpPortState OBJECT-TYPE -+ SYNTAX INTEGER { -+ disabled(1), -+ blocking(2), -+ listening(3), -+ learning(4), -+ forwarding(5), -+ broken(6) -+ } -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port's current state as defined by -+ application of the Spanning Tree Protocol. This -+ state controls what action a port takes on -+ reception of a frame. If the bridge has detected -+ a port that is malfunctioning it will place that -+ port into the broken(6) state. For ports which -+ are disabled (see dot1dStpPortEnable), this object -+ will have a value of disabled(1)." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.2" -+ ::= { dot1dStpPortEntry 3 } -+ -+dot1dStpPortEnable OBJECT-TYPE -+ SYNTAX INTEGER { -+ enabled(1), -+ disabled(2) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The enabled/disabled status of the port." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.2" -+ ::= { dot1dStpPortEntry 4 } -+ -+dot1dStpPortPathCost OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The contribution of this port to the path cost of -+ paths towards the spanning tree root which include -+ this port. 802.1D-1990 recommends that the -+ default value of this parameter be in inverse -+ proportion to the speed of the attached LAN." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.3" -+ ::= { dot1dStpPortEntry 5 } -+ -+dot1dStpPortDesignatedRoot OBJECT-TYPE -+ SYNTAX BridgeId -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The unique Bridge Identifier of the Bridge -+ recorded as the Root in the Configuration BPDUs -+ transmitted by the Designated Bridge for the -+ segment to which the port is attached." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.4" -+ ::= { dot1dStpPortEntry 6 } -+ -+dot1dStpPortDesignatedCost OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The path cost of the Designated Port of the -+ segment connected to this port. This value is -+ compared to the Root Path Cost field in received -+ -+ bridge PDUs." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.5" -+ ::= { dot1dStpPortEntry 7 } -+ -+dot1dStpPortDesignatedBridge OBJECT-TYPE -+ SYNTAX BridgeId -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The Bridge Identifier of the bridge which this -+ port considers to be the Designated Bridge for -+ this port's segment." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.6" -+ ::= { dot1dStpPortEntry 8 } -+ -+dot1dStpPortDesignatedPort OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (2)) -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The Port Identifier of the port on the Designated -+ Bridge for this port's segment." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 4.5.5.7" -+ ::= { dot1dStpPortEntry 9 } -+ -+dot1dStpPortForwardTransitions OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of times this port has transitioned -+ from the Learning state to the Forwarding state." -+ ::= { dot1dStpPortEntry 10 } -+ -+-- the dot1dTp group -+ -+-- Implementation of the dot1dTp group is optional. It is -+-- implemented by those bridges that support the transparent -+-- bridging mode. A transparent or SRT bridge will implement -+-- this group. -+ -+dot1dTpLearnedEntryDiscards OBJECT-TYPE -+ SYNTAX Counter -+ -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The total number of Forwarding Database entries, -+ which have been or would have been learnt, but -+ have been discarded due to a lack of space to -+ store them in the Forwarding Database. If this -+ counter is increasing, it indicates that the -+ Forwarding Database is regularly becoming full (a -+ condition which has unpleasant performance effects -+ on the subnetwork). If this counter has a -+ significant value but is not presently increasing, -+ it indicates that the problem has been occurring -+ but is not persistent." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.7.1.1.3" -+ ::= { dot1dTp 1 } -+ -+dot1dTpAgingTime OBJECT-TYPE -+ SYNTAX INTEGER (10..1000000) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The timeout period in seconds for aging out -+ dynamically learned forwarding information. -+ 802.1D-1990 recommends a default of 300 seconds." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.7.1.1.3" -+ ::= { dot1dTp 2 } -+ -+-- The Forwarding Database for Transparent Bridges -+ -+dot1dTpFdbTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dTpFdbEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains information about unicast -+ entries for which the bridge has forwarding and/or -+ filtering information. This information is used -+ by the transparent bridging function in -+ determining how to propagate a received frame." -+ ::= { dot1dTp 3 } -+ -+dot1dTpFdbEntry OBJECT-TYPE -+ SYNTAX Dot1dTpFdbEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "Information about a specific unicast MAC address -+ for which the bridge has some forwarding and/or -+ filtering information." -+ INDEX { dot1dTpFdbAddress } -+ ::= { dot1dTpFdbTable 1 } -+ -+Dot1dTpFdbEntry ::= -+ SEQUENCE { -+ dot1dTpFdbAddress -+ MacAddress, -+ dot1dTpFdbPort -+ INTEGER, -+ dot1dTpFdbStatus -+ INTEGER -+ } -+ -+dot1dTpFdbAddress OBJECT-TYPE -+ SYNTAX MacAddress -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "A unicast MAC address for which the bridge has -+ forwarding and/or filtering information." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 3.9.1, 3.9.2" -+ ::= { dot1dTpFdbEntry 1 } -+ -+dot1dTpFdbPort OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "Either the value '0', or the port number of the -+ port on which a frame having a source address -+ equal to the value of the corresponding instance -+ of dot1dTpFdbAddress has been seen. A value of -+ '0' indicates that the port number has not been -+ learned but that the bridge does have some -+ forwarding/filtering information about this -+ address (e.g. in the dot1dStaticTable). -+ Implementors are encouraged to assign the port -+ value to this object whenever it is learned even -+ for addresses for which the corresponding value of -+ dot1dTpFdbStatus is not learned(3)." -+ ::= { dot1dTpFdbEntry 2 } -+ -+dot1dTpFdbStatus OBJECT-TYPE -+ SYNTAX INTEGER { -+ other(1), -+ invalid(2), -+ learned(3), -+ self(4), -+ mgmt(5) -+ } -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The status of this entry. The meanings of the -+ values are: -+ other(1) : none of the following. This would -+ include the case where some other -+ MIB object (not the corresponding -+ instance of dot1dTpFdbPort, nor an -+ entry in the dot1dStaticTable) is -+ being used to determine if and how -+ frames addressed to the value of -+ the corresponding instance of -+ dot1dTpFdbAddress are being -+ forwarded. -+ invalid(2) : this entry is not longer valid -+ (e.g., it was learned but has since -+ aged-out), but has not yet been -+ flushed from the table. -+ learned(3) : the value of the corresponding -+ instance of dot1dTpFdbPort was -+ learned, and is being used. -+ self(4) : the value of the corresponding -+ instance of dot1dTpFdbAddress -+ represents one of the bridge's -+ addresses. The corresponding -+ instance of dot1dTpFdbPort -+ indicates which of the bridge's -+ ports has this address. -+ mgmt(5) : the value of the corresponding -+ instance of dot1dTpFdbAddress is -+ also the value of an existing -+ instance of dot1dStaticAddress." -+ ::= { dot1dTpFdbEntry 3 } -+ -+-- Port Table for Transparent Bridges -+ -+dot1dTpPortTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dTpPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains information about every -+ port that is associated with this transparent -+ bridge." -+ ::= { dot1dTp 4 } -+ -+dot1dTpPortEntry OBJECT-TYPE -+ SYNTAX Dot1dTpPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information for each port of a -+ transparent bridge." -+ INDEX { dot1dTpPort } -+ ::= { dot1dTpPortTable 1 } -+ -+Dot1dTpPortEntry ::= -+ SEQUENCE { -+ dot1dTpPort -+ INTEGER, -+ dot1dTpPortMaxInfo -+ INTEGER, -+ dot1dTpPortInFrames -+ Counter, -+ dot1dTpPortOutFrames -+ Counter, -+ dot1dTpPortInDiscards -+ Counter -+ } -+ -+dot1dTpPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port for which this entry -+ contains Transparent bridging management -+ information." -+ ::= { dot1dTpPortEntry 1 } -+ -+-- It would be nice if we could use ifMtu as the size of the -+-- largest INFO field, but we can't because ifMtu is defined -+-- to be the size that the (inter-)network layer can use which -+-- can differ from the MAC layer (especially if several layers -+-- of encapsulation are used). -+ -+dot1dTpPortMaxInfo OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The maximum size of the INFO (non-MAC) field that -+ this port will receive or transmit." -+ ::= { dot1dTpPortEntry 2 } -+ -+dot1dTpPortInFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames that have been received by -+ this port from its segment. Note that a frame -+ received on the interface corresponding to this -+ port is only counted by this object if and only if -+ it is for a protocol being processed by the local -+ bridging function, including bridge management -+ frames." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dTpPortEntry 3 } -+ -+dot1dTpPortOutFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames that have been transmitted -+ by this port to its segment. Note that a frame -+ transmitted on the interface corresponding to this -+ port is only counted by this object if and only if -+ it is for a protocol being processed by the local -+ bridging function, including bridge management -+ frames." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dTpPortEntry 4 } -+ -+dot1dTpPortInDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "Count of valid frames received which were -+ discarded (i.e., filtered) by the Forwarding -+ Process." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.6.1.1.3" -+ ::= { dot1dTpPortEntry 5 } -+-- The Static (Destination-Address Filtering) Database -+ -+-- Implementation of this group is optional. -+ -+dot1dStaticTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dStaticEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table containing filtering information -+ configured into the bridge by (local or network) -+ management specifying the set of ports to which -+ frames received from specific ports and containing -+ specific destination addresses are allowed to be -+ forwarded. The value of zero in this table as the -+ port number from which frames with a specific -+ destination address are received, is used to -+ specify all ports for which there is no specific -+ entry in this table for that particular -+ destination address. Entries are valid for -+ unicast and for group/broadcast addresses." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.7.2" -+ ::= { dot1dStatic 1 } -+ -+dot1dStaticEntry OBJECT-TYPE -+ SYNTAX Dot1dStaticEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "Filtering information configured into the bridge -+ by (local or network) management specifying the -+ set of ports to which frames received from a -+ specific port and containing a specific -+ destination address are allowed to be forwarded." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 6.7.2" -+ INDEX { dot1dStaticAddress, dot1dStaticReceivePort } -+ ::= { dot1dStaticTable 1 } -+ -+Dot1dStaticEntry ::= -+ SEQUENCE { -+ dot1dStaticAddress -+ MacAddress, -+ dot1dStaticReceivePort -+ INTEGER, -+ dot1dStaticAllowedToGoTo -+ OCTET STRING, -+ dot1dStaticStatus -+ INTEGER -+ } -+ -+dot1dStaticAddress OBJECT-TYPE -+ SYNTAX MacAddress -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The destination MAC address in a frame to which -+ this entry's filtering information applies. This -+ object can take the value of a unicast address, a -+ group address or the broadcast address." -+ REFERENCE -+ "IEEE 802.1D-1990: Section 3.9.1, 3.9.2" -+ ::= { dot1dStaticEntry 1 } -+ -+dot1dStaticReceivePort OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "Either the value '0', or the port number of the -+ port from which a frame must be received in order -+ for this entry's filtering information to apply. -+ A value of zero indicates that this entry applies -+ on all ports of the bridge for which there is no -+ other applicable entry." -+ ::= { dot1dStaticEntry 2 } -+ -+dot1dStaticAllowedToGoTo OBJECT-TYPE -+ SYNTAX OCTET STRING -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The set of ports to which frames received from a -+ specific port and destined for a specific MAC -+ -+ address, are allowed to be forwarded. Each octet -+ within the value of this object specifies a set of -+ eight ports, with the first octet specifying ports -+ 1 through 8, the second octet specifying ports 9 -+ through 16, etc. Within each octet, the most -+ significant bit represents the lowest numbered -+ port, and the least significant bit represents the -+ highest numbered port. Thus, each port of the -+ bridge is represented by a single bit within the -+ value of this object. If that bit has a value of -+ '1' then that port is included in the set of -+ ports; the port is not included if its bit has a -+ value of '0'. (Note that the setting of the bit -+ corresponding to the port from which a frame is -+ received is irrelevant.) The default value of -+ this object is a string of ones of appropriate -+ length." -+ ::= { dot1dStaticEntry 3 } -+ -+dot1dStaticStatus OBJECT-TYPE -+ SYNTAX INTEGER { -+ other(1), -+ invalid(2), -+ permanent(3), -+ deleteOnReset(4), -+ deleteOnTimeout(5) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "This object indicates the status of this entry. -+ The default value is permanent(3). -+ other(1) - this entry is currently in use but -+ the conditions under which it will -+ remain so are different from each of the -+ following values. -+ invalid(2) - writing this value to the object -+ removes the corresponding entry. -+ permanent(3) - this entry is currently in use -+ and will remain so after the next reset -+ of the bridge. -+ deleteOnReset(4) - this entry is currently in -+ use and will remain so until the next -+ reset of the bridge. -+ deleteOnTimeout(5) - this entry is currently -+ in use and will remain so until it is -+ aged out." -+ -+ ::= { dot1dStaticEntry 4 } -+ -+-- Traps for use by Bridges -+ -+-- Traps for the Spanning Tree Protocol -+ -+newRoot TRAP-TYPE -+ ENTERPRISE dot1dBridge -+ DESCRIPTION -+ "The newRoot trap indicates that the sending agent -+ has become the new root of the Spanning Tree; the -+ trap is sent by a bridge soon after its election -+ as the new root, e.g., upon expiration of the -+ Topology Change Timer immediately subsequent to -+ its election. Implementation of this trap is -+ optional." -+ ::= 1 -+ -+topologyChange TRAP-TYPE -+ ENTERPRISE dot1dBridge -+ DESCRIPTION -+ "A topologyChange trap is sent by a bridge when -+ any of its configured ports transitions from the -+ Learning state to the Forwarding state, or from -+ the Forwarding state to the Blocking state. The -+ trap is not sent if a newRoot trap is sent for the -+ same transition. Implementation of this trap is -+ optional." -+ ::= 2 -+ -+END ---- /dev/null +++ b/mibs/GNOME-SMI.txt @@ -0,0 +1,88 @@ +GNOME-SMI DEFINITIONS ::= BEGIN diff --git a/net/net-snmp/patches/160-no_ldconfig.patch b/net/net-snmp/patches/160-no_ldconfig.patch index 6a28ea0..7b65c18 100644 --- a/net/net-snmp/patches/160-no_ldconfig.patch +++ b/net/net-snmp/patches/160-no_ldconfig.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -10216,7 +10216,7 @@ linux* | k*bsd*-gnu) +@@ -14197,7 +14197,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -8,4 +8,4 @@ + finish_cmds='' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. + diff --git a/net/net-snmp/patches/170-ldflags.patch b/net/net-snmp/patches/170-ldflags.patch index fa32544..2d572c0 100644 --- a/net/net-snmp/patches/170-ldflags.patch +++ b/net/net-snmp/patches/170-ldflags.patch @@ -1,11 +1,11 @@ --- a/Makefile.top +++ b/Makefile.top -@@ -81,7 +81,7 @@ LIBCURRENT = 16 - LIBAGE = 1 +@@ -85,7 +85,7 @@ LIBCURRENT = 30 + LIBAGE = 0 LIBREVISION = 3 -LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o +LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) $(LDFLAGS) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o LIB_EXTENSION = la LIB_VERSION = - LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir) + LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir) diff --git a/net/net-snmp/patches/800-format-security.patch b/net/net-snmp/patches/800-format-security.patch deleted file mode 100644 index 87a3e92..0000000 --- a/net/net-snmp/patches/800-format-security.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/agent/mibgroup/host/hr_filesys.c -+++ b/agent/mibgroup/host/hr_filesys.c -@@ -322,13 +322,13 @@ var_hrfilesys(struct variable *vp, - long_return = fsys_idx; - return (u_char *) & long_return; - case HRFSYS_MOUNT: -- snprintf(string, sizeof(string), HRFS_entry->HRFS_mount); -+ snprintf(string, sizeof(string), "%s", HRFS_entry->HRFS_mount); - string[ sizeof(string)-1 ] = 0; - *var_len = strlen(string); - return (u_char *) string; - case HRFSYS_RMOUNT: - if (Check_HR_FileSys_NFS()) { -- snprintf(string, sizeof(string), HRFS_entry->HRFS_name); -+ snprintf(string, sizeof(string), "%s", HRFS_entry->HRFS_name); - string[ sizeof(string)-1 ] = 0; - } else - string[0] = '\0'; ---- a/agent/mibgroup/ucd-snmp/extensible.c -+++ b/agent/mibgroup/ucd-snmp/extensible.c -@@ -513,7 +513,7 @@ fixExecError(int action, - } - tmp = *((long *) var_val); - if ((tmp == 1) && (action == COMMIT) && (exten->fixcmd[0] != 0)) { -- sprintf(ex.command, exten->fixcmd); -+ sprintf(ex.command, "%s", exten->fixcmd); - if ((fd = get_exec_output(&ex)) != -1) { - file = fdopen(fd, "r"); - while (fgets(ex.output, sizeof(ex.output), file) != NULL); diff --git a/net/nfs-kernel-server/Makefile b/net/nfs-kernel-server/Makefile index 26ff4bd..e58c6eb 100644 --- a/net/nfs-kernel-server/Makefile +++ b/net/nfs-kernel-server/Makefile @@ -7,9 +7,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nfs-kernel-server -PKG_VERSION:=1.3.4 +PKG_VERSION:=2.1.1 PKG_RELEASE:=1 -PKG_MD5SUM:=2fabdadb8ff415a1eafcfb12ab1bf781 +PKG_MD5SUM:=1157abcfaa8670f990f408cf280426b4 PKG_SOURCE_URL:=@SF/nfs PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2 @@ -93,8 +93,8 @@ MAKE_FLAGS += \ OPT="$(TARGET_CFLAGS)" \ INSTALLSUID="install -m 4755" \ DESTDIR="$(PKG_INSTALL_DIR)" \ - RPCGEN_PATH=$(STAGING_DIR)/host/bin/rpcgen \ - RPCGEN=$(STAGING_DIR)/host/bin/rpcgen + RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \ + RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen HOST_CFLAGS += -Dlinux @@ -125,8 +125,8 @@ define Host/Compile endef define Host/Install - $(INSTALL_DIR) $(STAGING_DIR)/host/bin - $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR)/host/bin/rpcgen + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin + $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOSTPKG)/bin/rpcgen endef define Package/nfs-kernel-server/install diff --git a/net/nginx/Makefile b/net/nginx/Makefile index fa1e873..5ebdaa5 100644 --- a/net/nginx/Makefile +++ b/net/nginx/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nginx -PKG_VERSION:=1.10.1 -PKG_RELEASE:=2 +PKG_VERSION:=1.10.2 +PKG_RELEASE:=1 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://nginx.org/download/ -PKG_MD5SUM:=088292d9caf6059ef328aa7dda332e44 +PKG_MD5SUM:=e8f5f4beed041e63eb97f9f4f55f3085 PKG_MAINTAINER:=Thomas Heil PKG_LICENSE:=2-clause BSD-like license @@ -241,7 +241,7 @@ define Build/Prepare endef define Download/nginx-naxsi - VERSION:=7a6ff365f6be736c826b2d69b967a250ac07197d + VERSION:=cf73f9c8664127252c2a4958d2e169516d3845a1 SUBDIR:=nginx-naxsi FILE:=nginx-naxsi-module-$(PKG_VERSION)-$$(VERSION).tar.gz URL:=https://github.com/nbs-system/naxsi.git diff --git a/net/ntpd/Makefile b/net/ntpd/Makefile index 2e97575..f1e57ad 100644 --- a/net/ntpd/Makefile +++ b/net/ntpd/Makefile @@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ntp PKG_VERSION:=4.2.8p9 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ -PKG_MD5SUM:=857452b05f5f2e033786f77ade1974ed +PKG_HASH:=b724287778e1bac625b447327c9851eedef020517a3545625e9f652a90f30b72 PKG_LICENSE:=Unique PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html @@ -115,6 +115,9 @@ CONFIGURE_ARGS += \ define Package/ntpd/install $(INSTALL_DIR) $(1)/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/ntpd.hotplug-helper $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc $(INSTALL_CONF) ./files/ntp.conf $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d @@ -145,7 +148,6 @@ endef define Package/ntp-utils/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/ endef diff --git a/net/ntpd/files/ntpd.hotplug-helper b/net/ntpd/files/ntpd.hotplug-helper new file mode 100644 index 0000000..555825c --- /dev/null +++ b/net/ntpd/files/ntpd.hotplug-helper @@ -0,0 +1,13 @@ +#!/bin/sh + +while true +do + STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')" + + if [ -n "$STATUS" ] && [ "$STATUS" -lt "16" ] + then + ACTION="stratum" /sbin/hotplug-call ntp + exit 0 + fi + sleep 10 +done diff --git a/net/ntpd/files/ntpd.init b/net/ntpd/files/ntpd.init index e626e24..55dd3e8 100644 --- a/net/ntpd/files/ntpd.init +++ b/net/ntpd/files/ntpd.init @@ -5,14 +5,18 @@ START=65 STOP=65 USE_PROCD=1 +PROG=/sbin/ntpd +HOTPLUG_HELPER=/usr/sbin/ntpd.hotplug-helper start_service() { -# ln -sf /dev/ttyS0 /dev/gps0 -# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf mkdir -p /var/lib/ntp chown -R ntp:ntp /var/lib/ntp procd_open_instance - procd_set_param command /sbin/ntpd -g -u ntp:ntp -p /var/run/ntpd.pid -n + procd_set_param command $PROG -g -u ntp:ntp -p /var/run/ntpd.pid -n + procd_close_instance + + procd_open_instance + procd_set_param command $HOTPLUG_HELPER procd_close_instance } diff --git a/net/ocserv/Makefile b/net/ocserv/Makefile index 8fe0576..a5767f7 100644 --- a/net/ocserv/Makefile +++ b/net/ocserv/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ocserv -PKG_VERSION:=0.11.6 -PKG_RELEASE:=2 +PKG_VERSION:=0.11.8 +PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/ -PKG_MD5SUM:=0e4f82d267d27f2f9d3fcba58ac6cf5a +PKG_HASH:=735b9b88a004d5bc8a91d4093d07ea0e2c9fac370a35d84beccc394ed24420c7 PKG_LICENSE:=GPLv2+ PKG_LICENSE_FILES:=COPYING diff --git a/net/ocserv/files/ocserv.conf.template b/net/ocserv/files/ocserv.conf.template index a46c21c..a3b7692 100644 --- a/net/ocserv/files/ocserv.conf.template +++ b/net/ocserv/files/ocserv.conf.template @@ -1,3 +1,10 @@ +############################################################################ +# NOTE: Do not modify this file to configure ocserv. Add new directives # +# in /etc/ocserv/ocserv.conf.local and these will be included in ocserv's # +# configuration # +############################################################################ + + # User authentication method. Could be set multiple times and in that case # all should succeed. # Options: certificate, pam. @@ -51,6 +58,12 @@ tcp-port = |PORT| # radius is in use. #stats-report-time = 360 +# Stats reset time. The period of time statistics kept by main/sec-mod +# processes will be reset. These are the statistics shown by cmd +# 'occtl show stats'. For daily: 86400, weekly: 604800 +# This is unrelated to stats-report-time. +server-stats-reset-time = 604800 + # Keepalive in seconds keepalive = 32400 @@ -136,7 +149,7 @@ tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0" # The time (in seconds) that a client is allowed to stay connected prior # to authentication -auth-timeout = 40 +auth-timeout = 240 # The time (in seconds) that a client is allowed to stay idle (no traffic) # before being disconnected. Unset to disable. @@ -161,10 +174,10 @@ min-reauth-time = 360 # locally from an HTTP server (i.e., when listen-clear-file is used). # # Set to zero to disable. -max-ban-score = 50 +max-ban-score = 80 # The time (in seconds) that all score kept for a client is reset. -ban-reset-time = 300 +ban-reset-time = 1200 # In case you'd like to change the default points. #ban-points-wrong-password = 10 @@ -172,13 +185,19 @@ ban-reset-time = 300 #ban-points-kkdcp = 1 # Cookie timeout (in seconds) -# which he can reconnect. That cookie will be invalided if not -# used within this timeout value. On a user disconnection, that -# cookie will also be active for this time amount prior to be -# invalid. That should allow a reasonable amount of time for roaming -# between different networks. +# Once a client is authenticated he's provided a cookie with +# which he can reconnect. That cookie will be invalidated if not +# used within this timeout value. This cookie remains valid, during +# the user's connected time, and after user disconnection it +# remains active for this amount of time. That setting should allow a +# reasonable amount of time for roaming between different networks. cookie-timeout = 300 +# If this is enabled (not recommended) the cookies will stay +# valid even after a user manually disconnects, and until they +# expire. This may improve roaming with some broken clients. +#persistent-cookies = true + # Whether roaming is allowed, i.e., if true a cookie is # restricted to a single IP address and cannot be re-used # from a different IP. @@ -186,7 +205,8 @@ deny-roaming = false # ReKey time (in seconds) # ocserv will ask the client to refresh keys periodically once -# this amount of seconds is elapsed. Set to zero to disable. +# this amount of seconds is elapsed. Set to zero to disable (note +# that, some clients fail if rekey is disabled). rekey-time = 172800 # ReKey method @@ -285,6 +305,10 @@ ipv4-netmask = |NETMASK| # it is not in use by another (unrelated to this server) host. ping-leases = |PING_LEASES| +# Whether to tunnel all DNS queries via the VPN. This is the default +# when a default route is set. +#tunnel-all-dns = true + # Unset to assign the default MTU of the device # mtu = diff --git a/net/ocserv/patches/001-makefile-fix.patch b/net/ocserv/patches/001-makefile-fix.patch deleted file mode 100644 index 0d48282..0000000 --- a/net/ocserv/patches/001-makefile-fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/src/Makefile.am b/src/Makefile.am -index 5943a50..4b2c77c 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -23,18 +23,7 @@ noinst_LIBRARIES = libcmd-ocserv.a libipc.a - libcmd_ocserv_a_SOURCES = ocserv-args.def ocserv-args.c ocserv-args.h - - ocserv-args.c: $(srcdir)/ocserv-args.def $(builddir)/version.inc -- if test "$(AUTOGEN)" = ":";then \ -- rm -f $(builddir)/ocserv-args.c; \ -- rm -f $(builddir)/ocserv-args.h; \ -- cp $(srcdir)/autogen/ocserv-args.c $(builddir)/; \ -- cp $(srcdir)/autogen/ocserv-args.h $(builddir)/; \ -- else \ -- $(AUTOGEN) $<; \ -- if test -d $(srcdir)/autogen;then \ -- cp $(builddir)/ocserv-args.c $(srcdir)/autogen; \ -- cp $(builddir)/ocserv-args.h $(srcdir)/autogen; \ -- fi; \ -- fi -+ $(AUTOGEN) $< - ocserv-args.h: ocserv-args.c - - # Authentication module sources -diff --git a/src/ocpasswd/Makefile.am b/src/ocpasswd/Makefile.am -index 97e2491..6304607 100644 ---- a/src/ocpasswd/Makefile.am -+++ b/src/ocpasswd/Makefile.am -@@ -21,17 +21,6 @@ ocpasswd_LDADD += $(LIBGNUTLS_LIBS) $(LIBCRYPT) $(CODE_COVERAGE_LDFLAGS) \ - $(LIBNETTLE_LIBS) - - args.c: $(srcdir)/args.def $(builddir)/../version.inc -- if test "$(AUTOGEN)" = ":";then \ -- rm -f $(builddir)/args.c; \ -- rm -f $(builddir)/args.h; \ -- cp $(srcdir)/../autogen/ocpasswd-args.c $(builddir)/args.c; \ -- cp $(srcdir)/../autogen/ocpasswd-args.h $(builddir)/args.h; \ -- else \ -- $(AUTOGEN) $<; \ -- if test -d $(srcdir)/autogen;then \ -- cp $(builddir)/args.c $(srcdir)/../autogen/ocpasswd-args.c; \ -- cp $(builddir)/args.h $(srcdir)/../autogen/ocpasswd-args.h; \ -- fi; \ -- fi -+ $(AUTOGEN) $< - args.h: args.c - diff --git a/net/openssh/Makefile b/net/openssh/Makefile index 73e7e67..b6881c2 100644 --- a/net/openssh/Makefile +++ b/net/openssh/Makefile @@ -8,13 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssh -PKG_VERSION:=7.3p1 -PKG_RELEASE:=3 +PKG_VERSION:=7.4p1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ - http://ftp.belnet.be/pub/OpenBSD/OpenSSH/portable/ -PKG_MD5SUM:=dfadd9f035d38ce5d58a3bf130b86d08 +PKG_SOURCE_URL:=https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \ + https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/ \ + https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ +PKG_MD5SUM:=b2db2a83caf66a208bb78d6d287cdaa3 PKG_LICENSE:=BSD ISC PKG_LICENSE_FILES:=LICENCE diff --git a/net/openssh/patches/100-openssh-7.3_p1-NEWKEYS_null_deref.patch b/net/openssh/patches/100-openssh-7.3_p1-NEWKEYS_null_deref.patch deleted file mode 100644 index 27e99b2..0000000 --- a/net/openssh/patches/100-openssh-7.3_p1-NEWKEYS_null_deref.patch +++ /dev/null @@ -1,27 +0,0 @@ -Backport of -https://anongit.mindrot.org/openssh.git/patch/?id=28652bca29046f62c7045e933e6b931de1d16737 - ---- openssh-7.3p1/kex.c -+++ openssh-7.3p1/kex.c -@@ -419,6 +419,8 @@ - ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_protocol_error); - if ((r = sshpkt_get_end(ssh)) != 0) - return r; -+ if ((r = ssh_set_newkeys(ssh, MODE_IN)) != 0) -+ return r; - kex->done = 1; - sshbuf_reset(kex->peer); - /* sshbuf_reset(kex->my); */ ---- openssh-7.3p1/packet.c -+++ openssh-7.3p1/packet.c -@@ -1919,9 +1919,7 @@ - return r; - return SSH_ERR_PROTOCOL_ERROR; - } -- if (*typep == SSH2_MSG_NEWKEYS) -- r = ssh_set_newkeys(ssh, MODE_IN); -- else if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side) -+ if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side) - r = ssh_packet_enable_delayed_compress(ssh); - else - r = 0; diff --git a/net/openssh/patches/101-Unregister-the-KEXINIT-handler-after-receive.patch b/net/openssh/patches/101-Unregister-the-KEXINIT-handler-after-receive.patch deleted file mode 100644 index f7b41dc..0000000 --- a/net/openssh/patches/101-Unregister-the-KEXINIT-handler-after-receive.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/kex.c b/kex.c -index 50c7a0f..d09c27b 100644 ---- a/kex.c -+++ b/kex.c -@@ -1,4 +1,4 @@ --/* $OpenBSD: kex.c,v 1.118 2016/05/02 10:26:04 djm Exp $ */ -+/* $OpenBSD: kex.c,v 1.127 2016/10/10 19:28:48 markus Exp $ */ - /* - * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. - * -@@ -472,6 +472,7 @@ kex_input_kexinit(int type, u_int32_t seq, void *ctxt) - if (kex == NULL) - return SSH_ERR_INVALID_ARGUMENT; - -+ ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL); - ptr = sshpkt_ptr(ssh, &dlen); - if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0) - return r; diff --git a/net/openvswitch/Makefile b/net/openvswitch/Makefile index cb7170f..2a0fcf6 100644 --- a/net/openvswitch/Makefile +++ b/net/openvswitch/Makefile @@ -35,6 +35,21 @@ PKG_INSTALL:=1 # Support for kernel 4.4 is backported SUPPORTED_KERNELS:=LINUX_3_18||LINUX_4_1||LINUX_4_3||LINUX_4_4 +# If only kmod-openvswitch is enabled, then override default make path to only +# build and install the datapath/linux subdirectory which cuts down compilation +# time dramatically. +ifeq ($(CONFIG_PACKAGE_openvswitch-base),) + ifneq ($(CONFIG_PACKAGE_kmod-openvswitch),) + MAKE_PATH := datapath/linux + endif +endif + +# Additionally register PKG_CONFIG_DEPENDS to trigger a rebuild of the code +# base if the package selection changes. +PKG_CONFIG_DEPENDS := \ + CONFIG_PACKAGE_openvswitch-base \ + CONFIG_PACKAGE_kmod-openvswitch + include $(INCLUDE_DIR)/package.mk $(call include_mk, python-package.mk) @@ -71,7 +86,7 @@ endef define Package/openvswitch-python $(call Package/openvswitch/Default) TITLE:=Open vSwitch Python Support - DEPENDS:=+openvswitch +python + DEPENDS:=+openvswitch +PACKAGE_openvswitch-python:python endef define Package/openvswitch-python/description diff --git a/net/pen/Makefile b/net/pen/Makefile new file mode 100644 index 0000000..48d622c --- /dev/null +++ b/net/pen/Makefile @@ -0,0 +1,58 @@ +# +# 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:=pen +PKG_VERSION:=0.34.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://siag.nu/pub/pen/ +PKG_HASH:=a3306bfb02619b103ff431002bb91079048bf2dd24f739bf38e373860558cd27 + +PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Nicolas Thill + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pen + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl + TITLE:=Simple TCP load balancer + URL:=http://morestuff.siag.nu/category/pen/ +endef + +define Package/pen/description + This is pen, a load balancer for "simple" TCP based protocols + such as HTTP or SMTP. It allows several servers to appear as + one to the outside and automatically detects servers that are + down and distributes clients among the available servers. + This gives high availability and scalable performance. +endef + +CONFIGURE_ARGS += \ + --with-poll \ + --with-ssl="$(STAGING_DIR)/usr" \ + --without-geoip \ + +define Package/pen/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/mergelogs $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/pen $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/penctl $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/penlog $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/penlogd $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/penctl.cgi $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/penstats $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pen)) diff --git a/net/pptpd/files/pptpd.init b/net/pptpd/files/pptpd.init index 0d18aa1..294b00f 100644 --- a/net/pptpd/files/pptpd.init +++ b/net/pptpd/files/pptpd.init @@ -67,6 +67,6 @@ start_service() { ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets procd_open_instance - procd_set_param command $BIN -c $CONFIG -o $OPTIONS_PPTP + procd_set_param command $BIN -c $CONFIG --fg -o $OPTIONS_PPTP procd_close_instance } diff --git a/net/prosody/Makefile b/net/prosody/Makefile index 0942a62..b35fd03 100644 --- a/net/prosody/Makefile +++ b/net/prosody/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=prosody -PKG_VERSION:=0.9.10 +PKG_VERSION:=0.9.12 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://prosody.im/downloads/source -PKG_MD5SUM:=ef6d4a9e6dcae577eb52f7277d7beac5 +PKG_MD5SUM:=d743adea6cfbaacc3a24cc0c3928bb1b PKG_MAINTAINER:=Thomas Heil PKG_LICENSE:=MIT/X11 @@ -50,7 +50,7 @@ define Build/Configure # this is *NOT* GNU autoconf stuff (cd $(PKG_BUILD_DIR); ./configure \ --prefix=/usr \ - --with-lua="$(STAGING_DIR)/host/bin" \ + --with-lua="$(STAGING_DIR_HOSTPKG)/bin" \ --with-lua-include="$(STAGING_DIR)/usr/include" \ --with-lua-lib="$(STAGING_DIR)/usr/lib" \ --cflags="$(TARGET_CFLAGS)" \ diff --git a/net/rsync/Makefile b/net/rsync/Makefile index f9fa047..aa4f00a 100644 --- a/net/rsync/Makefile +++ b/net/rsync/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=3.1.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://rsync.samba.org/ftp/rsync/src +PKG_SOURCE_URL:=https://download.samba.org/pub/rsync/src PKG_MD5SUM:=0f758d7e000c0f7f7d3792610fad70cb PKG_MAINTAINER:=Maxim Storchak PKG_LICENSE:=GPL-3.0 diff --git a/net/seafile-ccnet/patches/010-Makefile.patch b/net/seafile-ccnet/patches/010-Makefile.patch index d8b1ae8..a30abbd 100644 --- a/net/seafile-ccnet/patches/010-Makefile.patch +++ b/net/seafile-ccnet/patches/010-Makefile.patch @@ -11,12 +11,12 @@ diff -rupN seafile-ccnet-5.1.1.orig/lib/Makefile.am seafile-ccnet-5.1.1/lib/Make ccnet-object.h: ${ccnet_object_define} rm -f $@ - valac --pkg posix ${ccnet_object_define} -C -H ccnet-object.h -+ "$(STAGING_DIR)/host/bin/valac" --pkg posix ${ccnet_object_define} -C -H ccnet-object.h ++ "$(STAGING_DIR_HOSTPKG)/bin/valac" --pkg posix ${ccnet_object_define} -C -H ccnet-object.h ccnetobj.c: ${ccnet_object_define} rm -f $@ - valac -C --pkg posix ${ccnet_object_define} -+ "$(STAGING_DIR)/host/bin/valac" -C --pkg posix ${ccnet_object_define} ++ "$(STAGING_DIR_HOSTPKG)/bin/valac" -C --pkg posix ${ccnet_object_define} searpc_gen = searpc-signature.h searpc-marshal.h diff --git a/net/seafile-server/Config.in b/net/seafile-server/Config.in deleted file mode 100644 index d83f795..0000000 --- a/net/seafile-server/Config.in +++ /dev/null @@ -1,16 +0,0 @@ -menu "Configuration" - depends on PACKAGE_seafile-server - -config SEAFILE_FUSE_SUPPORT - bool "Enable FUSE support" - select PACKAGE_libfuse - default n - -config SEAFILE_CONSOLE_SUPPORT - bool "Enable seafile server console" - default n - -config SEAFILE_RIAK_SUPPORT - bool "Enable support for riak backend" - default n -endmenu diff --git a/net/seafile-server/Makefile b/net/seafile-server/Makefile deleted file mode 100644 index 3855221..0000000 --- a/net/seafile-server/Makefile +++ /dev/null @@ -1,150 +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:=seafile-server -PKG_VERSION:=5.1.4 -PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 -PKG_LICENSE:=GPL-3.0 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/haiwen/seafile.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=b9dc96ee845bb0148d9075aec597e6e07652cbdc -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -$(call include_mk, python-package.mk) - -define Package/seafile-server - SECTION:=net - CATEGORY:=Network - TITLE:=Seafile server - MAINTAINER:=Gergely Kiss - URL:=http://seafile.com/ - DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \ - +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \ - +libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS) - EXTRA_DEPENDS:=seafile-ccnet (=5.1.4-44f74fdc5160c1bf16a92e71d79b856763ddbc15-1), seafile-seahub (=5.1.4-1e1c02aa4f2a0256ffa29a28224aad2d678f43a0-1) - MENU:=1 -endef - -define Package/seafile-server/config - source "$(SOURCE)/Config.in" -endef - -define Package/seafile-server/description - Open source cloud storage with advanced features on privacy protection and teamwork. -endef - -CONFIGURE_ARGS += --disable-client \ - --enable-server \ - --enable-python \ - --disable-static-build \ - --disable-server-pkg - -ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y) - CONFIGURE_ARGS += --enable-fuse - TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/fuse -else - CONFIGURE_ARGS += --disable-fuse -endif - -ifeq ($(CONFIG_SEAFILE_CONSOLE_SUPPORT),y) - CONFIGURE_ARGS += --enable-console -else - CONFIGURE_ARGS += --disable-console -endif - -ifeq ($(CONFIG_SEAFILE_RIAK_SUPPORT),y) - CONFIGURE_ARGS += --enable-riak -else - CONFIGURE_ARGS += --disable-riak -endif - -PKG_BUILD_DEPENDS:=vala/host libevhtp - -# This is required as python-package.mk overrides the default setting of having interlinking enabled -ifdef CONFIG_USE_MIPS16 - TARGET_CFLAGS += -minterlink-mips16 -endif -TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \ - -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz -levent_openssl -levent - -define Package/seafile-server/conffiles -/etc/config/seafile -endef - -define Package/seafile-server/install - $(INSTALL_DIR) $(1)/usr/{bin,lib} - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server - $(INSTALL_DIR) $(1)/usr/share/seafile/conf - $(INSTALL_DIR) $(1)/etc/{config,init.d} - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seafile/ $(1)$(PYTHON_PKG_DIR)/ - $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seaserv/ $(1)$(PYTHON_PKG_DIR)/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseafile.so* $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/scripts/seaf-gc.sh $(1)/usr/share/seafile/seafile-server/ - $(CP) $(PKG_BUILD_DIR)/scripts/seaf-fsck.sh $(1)/usr/share/seafile/seafile-server/ -ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y) - $(CP) $(PKG_BUILD_DIR)/scripts/seaf-fuse.sh $(1)/usr/share/seafile/seafile-server/ -endif - $(CP) $(PKG_BUILD_DIR)/scripts/setup-seafile-mysql.py $(1)/usr/share/seafile/seafile-server/ - $(CP) $(PKG_BUILD_DIR)/scripts/setup-seafile-mysql.sh $(1)/usr/share/seafile/seafile-server/ - $(CP) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.py $(1)/usr/share/seafile/seafile-server/ - $(CP) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.sh $(1)/usr/share/seafile/seafile-server/ - $(CP) $(PKG_BUILD_DIR)/scripts/check_init_admin.py $(1)/usr/share/seafile/seafile-server/ - $(CP) $(PKG_BUILD_DIR)/scripts/upgrade/ $(1)/usr/share/seafile/seafile-server/ - $(CP) ./files/seafile.conf $(1)/etc/config/seafile - $(INSTALL_BIN) ./files/seafile.init $(1)/etc/init.d/seafile - $(INSTALL_BIN) ./files/seahub.init $(1)/etc/init.d/seahub - find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) $(PKG_INSTALL_DIR)/usr/include/seafile/ $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseafile.pc $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseafile.so* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seafile/ $(1)$(PYTHON_PKG_DIR)/ - $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seaserv/ $(1)$(PYTHON_PKG_DIR)/ -endef - -define Package/seafile-server/postinst -#!/bin/sh -[ ! -f /etc/init.d/seafile ] && exit 0 - -if [ ! -d /usr/share/seafile/seafile-data ] -then - echo "*** Installation completed, running configuration script..." - /etc/init.d/seafile setup - - if [ $$? -ne 0 ] - then - echo - echo "*** ERROR: Configuration failed. Please fix the issues if any and re-run the script using the command below:" - echo "*** \"/etc/init.d/seafile setup\"" - fi -else - echo "*** seafile-data directory already exists." - echo - echo "*** In case you are upgrading seafile, please run the appropriate upgrade script" - echo "*** manually before using the new version." - echo "*** Upgrade scripts are located at \"/usr/share/seafile/seafile-server/upgrade\"" - echo - echo "*** For more information, please read http://manual.seafile.com/deploy/upgrade.html" -fi -endef - -$(eval $(call BuildPackage,seafile-server)) diff --git a/net/seafile-server/files/seafile.conf b/net/seafile-server/files/seafile.conf deleted file mode 100644 index f4c0ea9..0000000 --- a/net/seafile-server/files/seafile.conf +++ /dev/null @@ -1,12 +0,0 @@ -# Start Seahub in fastcgi mode - 1 = enable, 0 = disable -SEAHUB_FASTCGI=0 -# Listen on the port specified below (defaults to 8000) -SEAHUB_PORT=8000 -# Method of serving requests (fastcgi mode only) - threaded or prefork -# Using threaded mode is recommended as it consumes less resources -SEAHUB_METHOD=threaded -# The maximum number of worker processes/threads (fastcgi mode only) -# General formula: (2 x $num_cores) + 1 -# To set the number of workers in WSGI mode (which is the default) -# please edit /usr/share/seafile/seafile-server/runtime/seahub.conf -SEAHUB_WORKERS=3 diff --git a/net/seafile-server/files/seafile.init b/net/seafile-server/files/seafile.init deleted file mode 100755 index 1c6553a..0000000 --- a/net/seafile-server/files/seafile.init +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/bash /etc/rc.common - -START=98 -APP=seafile -EXTRA_HELP=" setup Runs the setup script - create_admin Creates the administrative login - reset_admin Alias to create_admin" -EXTRA_COMMANDS="setup create_admin reset_admin" - -TOPDIR=/usr/share/seafile -default_ccnet_conf_dir=${TOPDIR}/ccnet -central_config_dir=${TOPDIR}/conf -seaf_controller=/usr/bin/seafile-controller - -function validate_ccnet_conf_dir () { - if [[ ! -d ${default_ccnet_conf_dir} ]]; then - echo "Error: there is no ccnet config directory." - echo "Have you run \"/etc/init.d/seafile setup\"?" - echo "" - exit 1 - fi -} - -function validate_central_conf_dir () { - if [[ ! -d ${central_config_dir} ]]; then - echo "Error: there is no conf/ directory." - echo "Have you run \"/etc/init.d/seafile setup\"?" - echo "" - exit 1 - fi -} - -function read_seafile_data_dir () { - seafile_ini=${default_ccnet_conf_dir}/seafile.ini - if [[ ! -f ${seafile_ini} ]]; then - echo "Error: ${seafile_ini} not found." - exit 1 - fi - seafile_data_dir=$(cat "${seafile_ini}") - if [[ ! -d ${seafile_data_dir} ]]; then - echo "Your seafile server data directory \"${seafile_data_dir}\" is invalid or doesn't exits." - echo "Please check it first, or create this directory yourself." - echo "" - exit 1 - fi -} - -function test_config() { - if ! ${seaf_controller} --test \ - -c "${default_ccnet_conf_dir}" \ - -d "${seafile_data_dir}" \ - -F "${central_config_dir}" ; then - exit 1 - fi -} - -function check_component_running() { - name=$1 - cmd=$2 - if pid=$(pgrep -f "$cmd" 2>/dev/null); then - return 1 - fi -} - -function validate_already_running () { - check_component_running "seafile-controller" "seafile-controller -F ${central_config_dir}" || return 1 - check_component_running "ccnet-server" "ccnet-server -F ${central_config_dir}" || return 1 - check_component_running "seaf-server" "seaf-server -F ${central_config_dir}" || return 1 - check_component_running "fileserver" "fileserver -F ${central_config_dir}" || return 1 - check_component_running "seafdav" "wsgidav.server.run_server" || return 1 -} - -function start_seafile_server () { - if ! validate_already_running; then - if [[ "$name" == "seafile-controller" ]]; then - echo "Seafile already running." - else - echo "Error: component [$name] is already running. Please try stopping it manually by running \"kill $pid\"." - echo "To force killing the process, use \"kill -9 $pid\"." - fi - exit 1 - fi - validate_central_conf_dir - validate_ccnet_conf_dir - read_seafile_data_dir - test_config - - echo "Starting seafile server, please wait ..." - - ${seaf_controller} \ - -F "${central_config_dir}" \ - -c "${default_ccnet_conf_dir}" \ - -d "${seafile_data_dir}" - - sleep 3 - - # check if seafile server started successfully - if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then - echo "Failed to start seafile server" - exit 1 - fi - - echo "Seafile server started" - echo -} - -function stop_seafile_server () { - if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then - echo "Seafile server not running" - else - echo "Stopping seafile server ..." - pkill -SIGTERM -f "seafile-controller -F ${central_config_dir}" - pkill -f "ccnet-server -F ${central_config_dir}" - pkill -f "seaf-server -F ${central_config_dir}" - pkill -f "fileserver -F ${central_config_dir}" - pkill -f "soffice.*--invisible --nocrashreport" - pkill -f "wsgidav.server.run_server" - retry=1 - while ! validate_already_running && [ $retry -lt 60 ]; do sleep 1; ((retry++)); done - if ! validate_already_running; then - echo "Error: [$name] component is still running. Please try stopping it manually by running \"kill $pid\"." - echo "To force killing the process, use \"kill -9 $pid\"." - fi - - fi -} - -function restart_seafile_server () { - stop_seafile_server - start_seafile_server -} - -function start() { - start_seafile_server -} - -function stop() { - stop_seafile_server -} - -function restart() { - restart_seafile_server -} - -function setup() { - cd "$TOPDIR" && \ - /usr/bin/seafile-admin setup -} - -function create_admin() { - cd "$TOPDIR" && \ - /usr/bin/seafile-admin create-admin -} - -function reset_admin() { - create_admin -} diff --git a/net/seafile-server/files/seahub.init b/net/seafile-server/files/seahub.init deleted file mode 100755 index da3a1d1..0000000 --- a/net/seafile-server/files/seahub.init +++ /dev/null @@ -1,226 +0,0 @@ -#!/bin/bash /etc/rc.common - -START=99 -APP=seahub -EXTRA_HELP=" clearsessions Clears expired sessions from database" -EXTRA_COMMANDS="clearsessions" - -SEAHUB_FASTCGI=0 -SEAHUB_PORT=8000 -SEAHUB_METHOD=threaded -SEAHUB_WORKERS=3 - -[ -f /etc/config/seafile ] && \ - . /etc/config/seafile - -INSTALLPATH=/usr/share/seafile/seafile-server -TOPDIR=$(dirname "${INSTALLPATH}") -default_ccnet_conf_dir=${TOPDIR}/ccnet -central_config_dir=${TOPDIR}/conf - -manage_py=${INSTALLPATH}/seahub/manage.py -gunicorn_conf=${INSTALLPATH}/runtime/seahub.conf -pidfile=/var/run/seafile/seahub.pid -errorlog=${INSTALLPATH}/runtime/error.log -accesslog=${INSTALLPATH}/runtime/access.log -gunicorn_exe=/usr/bin/gunicorn - -function check_python_executable() { - if [[ "$PYTHON" != "" && -x $PYTHON ]]; then - return 0 - fi - - if which python2.7 2>/dev/null 1>&2; then - PYTHON=python2.7 - elif which python27 2>/dev/null 1>&2; then - PYTHON=python27 - else - echo - echo "Can't find a python executable of version 2.7 or above in PATH" - echo "Install python 2.7+ before continue." - echo "Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it" - echo - exit 1 - fi -} - -function validate_ccnet_conf_dir() { - if [[ ! -d ${default_ccnet_conf_dir} ]]; then - echo "Error: there is no ccnet config directory." - echo "Have you run '/etc/init.d/seafile setup'?" - echo "" - exit 1 - fi -} - -function read_seafile_data_dir() { - seafile_ini=${default_ccnet_conf_dir}/seafile.ini - if [[ ! -f ${seafile_ini} ]]; then - echo "Error: ${seafile_ini} not found." - exit 1 - fi - seafile_data_dir=$(cat "${seafile_ini}") - if [[ ! -d ${seafile_data_dir} ]]; then - echo "Your seafile server data directory \"${seafile_data_dir}\" is invalid or doesn't exits." - echo "Please check it first, or create this directory yourself." - echo "" - exit 1 - fi -} - -function validate_seahub_running() { - if pid=$(pgrep -f "${manage_py}" 2>/dev/null); then - return 1 - elif pid=$(pgrep -f "seahub.wsgi:application" 2>/dev/null); then - return 1 - fi -} - -function validate_port() { - if ! [[ ${SEAHUB_PORT} =~ ^[1-9][0-9]{1,4}$ ]] ; then - printf "\033[033m${SEAHUB_PORT}\033[m is not a valid port number\n" - exit 1 - fi -} - -function warning_if_seafile_not_running() { - if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then - echo - echo "Error: seafile-controller not running. Have you run \"/etc/init.d/seafile start\"?" - echo - exit 1 - fi -} - -function prepare_seahub_log_dir() { - logdir="${TOPDIR}/logs" - if ! [[ -d "${logsdir}" ]]; then - if ! mkdir -p "${logdir}"; then - echo "Error: failed to create log dir \"${logdir}\"" - exit 1 - fi - fi - export SEAHUB_LOG_DIR="${logdir}" -} - -function before_start() { - prepare_env - warning_if_seafile_not_running - if ! validate_seahub_running; then - echo "Seahub is already running." - exit 1 - fi - prepare_seahub_log_dir - validate_port -} - -function start_seahub() { - before_start - echo "Starting seahub at port ${SEAHUB_PORT} ..." - check_init_admin - $PYTHON $gunicorn_exe seahub.wsgi:application -c "${gunicorn_conf}" -b "0.0.0.0:${SEAHUB_PORT}" --preload - - # Ensure seahub is started successfully - retry=1 - while ! validate_seahub_running && [[ ! -f "${pidfile}" ]] && [[ $retry -lt 120 ]]; do sleep 1; ((retry++)); done - if ! validate_seahub_running && [[ -f "${pidfile}" ]]; then - echo - echo "Seahub is started" - echo - else - printf "\033[33mError: Seahub failed to start.\033[m\n" - exit 1 - fi -} - -function start_seahub_fastcgi() { - before_start - - # Returns 127.0.0.1 if SEAFILE_FASTCGI_HOST is unset or hasn't got any value, - # otherwise returns value of SEAFILE_FASTCGI_HOST environment variable - address=`(test -z "$SEAFILE_FASTCGI_HOST" && echo "127.0.0.1") || echo $SEAFILE_FASTCGI_HOST` - - echo "Starting seahub (fastcgi) at ${address}:${SEAHUB_PORT} ..." - check_init_admin - $PYTHON "${manage_py}" runfcgi host=${address} port=${SEAHUB_PORT} pidfile=${pidfile} \ - outlog=${accesslog} errlog=${errorlog} maxchildren=${SEAHUB_WORKERS} method=${SEAHUB_METHOD} - - # Ensure seahub is started successfully - retry=1 - while ! validate_seahub_running && [[ ! -f "${pidfile}" ]] && [[ $retry -lt 120 ]]; do sleep 1; ((retry++)); done - if ! validate_seahub_running && [[ -f "${pidfile}" ]]; then - echo - echo "Seahub is started" - echo - else - printf "\033[33mError: Seahub failed to start.\033[m\n" - exit 1 - fi -} - -function prepare_env() { - check_python_executable - validate_ccnet_conf_dir - read_seafile_data_dir - - export CCNET_CONF_DIR=${default_ccnet_conf_dir} - export SEAFILE_CONF_DIR=${seafile_data_dir} - export SEAFILE_CENTRAL_CONF_DIR=${central_config_dir} - export PYTHONPATH="${INSTALLPATH}/seahub:${INSTALLPATH}/seahub/thirdpart:${PYTHONPATH}" -} - -function clear_sessions() { - prepare_env - - echo "Start clear expired session records ..." - $PYTHON "${manage_py}" clearsessions - - echo - echo "Done" - echo -} - -function stop_seahub() { - if [[ -f ${pidfile} ]]; then - pid=$(cat "${pidfile}") - echo "Stopping seahub ..." - kill ${pid} - rm -f ${pidfile} - retry=1 - while ! validate_seahub_running && [ $retry -lt 60 ]; do sleep 1; ((retry++)); done - if ! validate_seahub_running; then - echo "Error: seahub cannot be stopped. Please try stopping it manually by running \"kill $(echo "$pid" | tr '\n' ' ')\"." - echo "To force killing the processes, use \"kill -9 $(echo "$pid" | tr '\n' ' ')\"." - fi - else - echo "Seahub is not running" - fi -} - -function check_init_admin() { - check_init_admin_script=${INSTALLPATH}/check_init_admin.py - if ! $PYTHON $check_init_admin_script; then - exit 1 - fi -} - -function start() { - if [ "$SEAHUB_FASTCGI" == "1" ]; then - start_seahub_fastcgi - else - start_seahub - fi -} - -function stop() { - stop_seahub -} - -function restart() { - stop - start -} - -function clearsessions() { - clear_sessions -} diff --git a/net/seafile-server/patches/020-script-patches.patch b/net/seafile-server/patches/020-script-patches.patch deleted file mode 100644 index 585784d..0000000 --- a/net/seafile-server/patches/020-script-patches.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fsck.sh seafile-server-5.1.1/scripts/seaf-fsck.sh ---- seafile-server-5.1.1.orig/scripts/seaf-fsck.sh 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/scripts/seaf-fsck.sh 2016-04-22 09:10:13.075581325 +0200 -@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_conf_dir=${TOPDIR}/conf --seaf_fsck=${INSTALLPATH}/seafile/bin/seaf-fsck -+seaf_fsck=/usr/bin/seaf-fsck - - export PATH=${INSTALLPATH}/seafile/bin:$PATH - export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} -diff -rupN seafile-server-5.1.1.orig/scripts/seaf-gc.sh seafile-server-5.1.1/scripts/seaf-gc.sh ---- seafile-server-5.1.1.orig/scripts/seaf-gc.sh 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/scripts/seaf-gc.sh 2016-04-22 09:10:27.211581999 +0200 -@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_conf_dir=${TOPDIR}/conf --seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc -+seaf_gc=/usr/bin/seafserv-gc - seaf_gc_opts="" - - export PATH=${INSTALLPATH}/seafile/bin:$PATH -diff -rupN seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh seafile-server-5.1.1/scripts/setup-seafile-mysql.sh ---- seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/scripts/setup-seafile-mysql.sh 2016-04-22 09:11:50.083585953 +0200 -@@ -40,15 +40,10 @@ function check_python_executable() { - function check_python_module () { - module=$1 - name=$2 -- hint=$3 - printf " Checking python module: ${name} ... " - if ! $PYTHON -c "import ${module}" 2>/dev/null 1>&2; then - echo - printf "\033[33m ${name} \033[m is not installed, Please install it first.\n" -- if [[ "${hint}" != "" ]]; then -- printf "${hint}" -- echo -- fi - err_and_quit; - fi - echo -e "Done." -@@ -70,14 +65,10 @@ function check_python () { - if [[ $PYTHON == "python2.6" ]]; then - py26="2.6" - fi -- hint="\nOn Debian/Ubntu: apt-get install python-setuptools\nOn CentOS/RHEL: yum install python${py26}-distribute" -- check_python_module pkg_resources setuptools "${hint}" -- -- hint="\nOn Debian/Ubntu: apt-get install python-imaging\nOn CentOS/RHEL: yum install python${py26}-imaging" -- check_python_module PIL python-imaging "${hint}" - -- hint='\nOn Debian/Ubuntu:\n\nsudo apt-get install python-mysqldb\n\nOn CentOS/RHEL:\n\nsudo yum install MySQL-python' -- check_python_module MySQLdb python-mysqldb "${hint}" -+ check_python_module pkg_resources setuptools -+ check_python_module PIL python-imaging -+ check_python_module MySQLdb python-mysqldb - fi - echo - } -@@ -85,5 +76,6 @@ function check_python () { - check_python; - - export PYTHON=$PYTHON -+export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH" - - exec $PYTHON "$python_script" -diff -rupN seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh seafile-server-5.1.1/scripts/sqlite2mysql.sh ---- seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/scripts/sqlite2mysql.sh 2016-04-22 09:02:22.047558854 +0200 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - # - # This shell script and corresponding sqlite2mysql.py are used to - # migrate Seafile data from SQLite to MySQL. diff --git a/net/seafile-server/patches/030-pidfiles-in-same-directory.patch b/net/seafile-server/patches/030-pidfiles-in-same-directory.patch deleted file mode 100644 index bb3f86c..0000000 --- a/net/seafile-server/patches/030-pidfiles-in-same-directory.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -rupN seafile-server-5.1.1.orig/controller/seafile-controller.c seafile-server-5.1.1/controller/seafile-controller.c ---- seafile-server-5.1.1.orig/controller/seafile-controller.c 2016-04-19 15:44:32.000000000 +0200 -+++ seafile-server-5.1.1/controller/seafile-controller.c 2016-04-19 16:23:05.785000218 +0200 -@@ -21,7 +21,7 @@ - - SeafileController *ctl; - --static char *controller_pidfile = NULL; -+static char *controller_pidfile = "/var/run/seafile/seafile-controller.pid"; - - char *bin_dir = NULL; - char *installpath = NULL; -@@ -575,9 +575,9 @@ stop_ccnet_server () - static void - init_pidfile_path (SeafileController *ctl) - { -- char *pid_dir = g_build_filename (topdir, "pids", NULL); -+ char *pid_dir = g_path_get_dirname (controller_pidfile); - if (!g_file_test(pid_dir, G_FILE_TEST_EXISTS)) { -- if (g_mkdir(pid_dir, 0777) < 0) { -+ if (g_mkdir(pid_dir, 0755) < 0) { - seaf_warning("failed to create pid dir %s: %s", pid_dir, strerror(errno)); - controller_exit(1); - } diff --git a/net/seafile-server/patches/040-seafile-admin.patch b/net/seafile-server/patches/040-seafile-admin.patch deleted file mode 100644 index 667cdad..0000000 --- a/net/seafile-server/patches/040-seafile-admin.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -rupN seafile-server-5.1.1.orig/tools/seafile-admin seafile-server-5.1.1/tools/seafile-admin ---- seafile-server-5.1.1.orig/tools/seafile-admin 2016-04-19 15:44:33.000000000 +0200 -+++ seafile-server-5.1.1/tools/seafile-admin 2016-04-26 10:55:11.826798430 +0200 -@@ -449,9 +449,12 @@ workers = 3 - - # Logging - runtime_dir = os.path.dirname(__file__) --pidfile = os.path.join(runtime_dir, 'seahub.pid') -+pidfile = '/var/run/seafile/seahub.pid' - errorlog = os.path.join(runtime_dir, 'error.log') - accesslog = os.path.join(runtime_dir, 'access.log') -+ -+# for file upload, we need a longer timeout value (default is only 30s, too short) -+timeout = 1200 - ''' - - try: -@@ -526,6 +529,7 @@ def check_django_version(): - - - def check_python_module(import_name, package_name=None, silent=False): -+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "seahub.settings") - package_name = package_name or import_name - if not silent: - info('checking %s' % package_name) -@@ -785,7 +789,7 @@ def check_layout(args): - conf[CONF_SEAFILE_DIR] = seafile_data_dir - conf[CONF_SEAHUB_DIR] = seahub_dir - conf[CONF_SEAHUB_CONF] = seahub_conf -- conf[CONF_SEAHUB_PIDFILE] = os.path.join(runtime_dir, 'seahub.pid') -+ conf[CONF_SEAHUB_PIDFILE] = '/var/run/seafile/seahub.pid' - conf[CONF_SEAHUB_OUTLOG] = os.path.join(runtime_dir, 'access.log') - conf[CONF_SEAHUB_ERRLOG] = os.path.join(runtime_dir, 'error.log') - -@@ -836,10 +840,13 @@ def setup_seafile(args): - print '-----------------------------------------------------------------' - print '-----------------------------------------------------------------' - print -- print 'To start/stop seafile server:' -+ print 'To start, stop or restart seafile:' -+ print -+ print highlight(' # /etc/init.d/seafile { start | stop | restart }') - print -- print highlight(' $ cd %s' % cwd) -- print highlight(' $ %s { start | stop }' % SCRIPT_NAME) -+ print 'To start, stop or restart seahub:' -+ print -+ print highlight(' # /etc/init.d/seahub { start | stop | restart }') - print - print 'If you have any problem, refer to\n' - print -@@ -903,8 +910,7 @@ def start_seafile(args): - def stop_seafile(dummy): - info('Stopping seafile server') - pkill('seafile-controller') -- runtime_dir = os.path.join(cwd, 'seafile-server', 'runtime') -- pidfile = os.path.join(runtime_dir, 'seahub.pid') -+ pidfile = '/var/run/seafile/seahub.pid' - try: - with open(pidfile, 'r') as fp: - pid = fp.read().strip('\n ') diff --git a/net/seafile-server/patches/050-libseafile-makefile-fixes.patch b/net/seafile-server/patches/050-libseafile-makefile-fixes.patch deleted file mode 100644 index d83a097..0000000 --- a/net/seafile-server/patches/050-libseafile-makefile-fixes.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -rupN seafile-server-5.1.1.orig/lib/Makefile.am seafile-server-5.1.1/lib/Makefile.am ---- seafile-server-5.1.1.orig/lib/Makefile.am 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/lib/Makefile.am 2016-04-22 10:09:41.567751561 +0200 -@@ -1,3 +1,5 @@ -+include $(TOPDIR)/rules.mk -+ - pcfiles = libseafile.pc - pkgconfig_DATA = $(pcfiles) - pkgconfigdir = $(libdir)/pkgconfig -@@ -35,7 +37,7 @@ seafile-rpc-wrapper.c: seafile-object.h - - seafile-object.h: ${seafile_object_define} - rm -f $@ -- valac --pkg posix ${seafile_object_define} -C -H seafile-object.h -+ "$(STAGING_DIR)/host/bin/valac" --pkg posix ${seafile_object_define} -C -H seafile-object.h - - DISTCLEANFILES = ${searpc_gen} - -@@ -64,7 +66,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t - @rm -f rpc_table.tmp - @touch rpc_table.tmp - @echo "[libsearpc]: generating rpc header files" -- @PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py -+ @PYTHON@ "$(STAGING_DIR)/usr/bin/searpc-codegen.py" ${top_srcdir}/lib/rpc_table.py - @echo "[libsearpc]: done" - @mv -f rpc_table.tmp $@ - -@@ -74,7 +76,7 @@ vala.stamp: ${seafile_object_define} - rm -f ${seafile_object_gen} - @rm -f vala.tmp - @touch vala.tmp -- valac -C --pkg posix $^ -+ "$(STAGING_DIR)/host/bin/valac" -C --pkg posix $^ - @mv -f vala.tmp $@ - - ${seafile_object_gen}: vala.stamp -@@ -90,5 +92,5 @@ install-data-local: - if MACOS - sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) - else -- ${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) -+ ${SED} "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) - endif diff --git a/net/seafile-server/patches/060-timestamps-as-int64.patch b/net/seafile-server/patches/060-timestamps-as-int64.patch deleted file mode 100644 index 5e655d8..0000000 --- a/net/seafile-server/patches/060-timestamps-as-int64.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -rupN seafile-server-5.1.1.orig/lib/repo.vala seafile-server-5.1.1/lib/repo.vala ---- seafile-server-5.1.1.orig/lib/repo.vala 2016-04-19 15:44:32.000000000 +0200 -+++ seafile-server-5.1.1/lib/repo.vala 2016-04-25 21:29:33.327962235 +0200 -@@ -30,7 +30,7 @@ public class Repo : Object { - // data format version - public int version { get; set; } - -- public int last_modify { get; set; } -+ public int64 last_modify { get; set; } - public int64 size { get; set; } - public int64 file_count { get; set; } - public string head_cmmt_id { get; set; } -@@ -40,7 +40,7 @@ public class Repo : Object { - public string repo_id { get; set; } - public string repo_name { get; set; } - public string repo_desc { get; set; } -- public int last_modified { get; set; } -+ public int64 last_modified { get; set; } - - // Section 2: Encryption related - // Members in this section should be set for every Repo object -@@ -63,7 +63,7 @@ public class Repo : Object { - get { return _relay_id; } - set { _relay_id = value; } - } -- public int last_sync_time { get; set; } -+ public int64 last_sync_time { get; set; } - public bool auto_sync { get; set; } - public bool worktree_invalid { get; set; } - -@@ -155,7 +155,7 @@ public class DeletedEntry : Object { - public string obj_name { get; set; } - public string basedir { get; set; } - public int mode { get; set; } -- public int delete_time { get; set; } -+ public int64 delete_time { get; set; } - public int64 file_size { get; set; } - public string scan_stat { get; set; } - } diff --git a/net/seafile-server/patches/070-fuse-mount.patch b/net/seafile-server/patches/070-fuse-mount.patch deleted file mode 100644 index 827e7f3..0000000 --- a/net/seafile-server/patches/070-fuse-mount.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fuse.sh seafile-server-5.1.1/scripts/seaf-fuse.sh ---- seafile-server-5.1.1.orig/scripts/seaf-fuse.sh 2016-05-29 08:43:19.000000000 +0200 -+++ seafile-server-5.1.1/scripts/seaf-fuse.sh 2016-05-29 09:13:06.286680653 +0200 -@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_conf_dir=${TOPDIR}/conf --seaf_fuse=${INSTALLPATH}/seafile/bin/seaf-fuse -+seaf_fuse=/usr/bin/seaf-fuse - - export PATH=${INSTALLPATH}/seafile/bin:$PATH - export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} -@@ -68,7 +68,7 @@ function validate_already_running () { - } - - function warning_if_seafile_not_running () { -- if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then -+ if ! pgrep -f "seafile-controller -F ${default_conf_dir}" 2>/dev/null 1>&2; then - echo - echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?" - echo diff --git a/net/ser2net/Makefile b/net/ser2net/Makefile index 7436bbb..61def0e 100644 --- a/net/ser2net/Makefile +++ b/net/ser2net/Makefile @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ser2net -PKG_VERSION:=3.2 +PKG_VERSION:=3.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/ser2net -PKG_MD5SUM:=85adca01e963ec80ec96f1dfd23aeaec +PKG_MD5SUM:=8daf1cfd70d2b220b184c412c64faf2c +PKG_HASH:=3d1cef5f48df8291e57d4d7d4eac2fc809ae644a5524ffca4aebef0f4e4153dc PKG_LICENSE:=GPL-2.0+ PKG_LICENSE_FILES:=COPYING diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile index 415c2df..5287ec6 100644 --- a/net/shadowsocks-libev/Makefile +++ b/net/shadowsocks-libev/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shadowsocks-libev -PKG_VERSION:=2.2.3 +PKG_VERSION:=2.6.1 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) -PKG_SOURCE_VERSION:=2b1eef11973de3f7380401fd20f937e84bc2b756 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_SOURCE_VERSION:=a3bf80cf11e0a88589abdd87266b5351f270197c +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz PKG_MAINTAINER:=Jian Chang +PKG_MIRROR_MD5SUM:=fc60936d8b990fdecd69b908bc6b770b1c1e54598da6622cc9669750c76fa2d1 PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:=LICENSE @@ -36,23 +37,26 @@ define Package/shadowsocks-libev/Default TITLE:=Lightweight Secured Socks5 Proxy $(2) URL:=https://github.com/shadowsocks/shadowsocks-libev VARIANT:=$(1) - DEPENDS:=$(3) +libpthread +ipset +ip +iptables-mod-tproxy + DEPENDS:=$(3) +libpthread +ipset +ip +iptables-mod-tproxy +libpcre +zlib endef +CONFIGURE_ARGS += \ + --disable-documentation \ + Package/shadowsocks-libev = $(call Package/shadowsocks-libev/Default,openssl,(OpenSSL),+libopenssl) -Package/shadowsocks-libev-polarssl = $(call Package/shadowsocks-libev/Default,polarssl,(PolarSSL),+libpolarssl) +Package/shadowsocks-libev-mbedtls = $(call Package/shadowsocks-libev/Default,mbedtls,(mbed TLS),+libmbedtls) define Package/shadowsocks-libev/description Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes. endef -Package/shadowsocks-libev-polarssl/description = $(Package/shadowsocks-libev/description) +Package/shadowsocks-libev-mbedtls/description = $(Package/shadowsocks-libev/description) define Package/shadowsocks-libev/conffiles /etc/config/shadowsocks-libev endef -Package/shadowsocks-libev-polarssl/conffiles = $(Package/shadowsocks-libev/conffiles) +Package/shadowsocks-libev-mbedtls/conffiles = $(Package/shadowsocks-libev/conffiles) define Package/shadowsocks-libev/postinst #!/bin/sh @@ -67,10 +71,10 @@ EOF exit 0 endef -Package/shadowsocks-libev-polarssl/postinst = $(Package/shadowsocks-libev/postinst) +Package/shadowsocks-libev-mbedtls/postinst = $(Package/shadowsocks-libev/postinst) -ifeq ($(BUILD_VARIANT),polarssl) - CONFIGURE_ARGS += --with-crypto-library=polarssl +ifeq ($(BUILD_VARIANT),mbedtls) + CONFIGURE_ARGS += --with-crypto-library=mbedtls endif define Package/shadowsocks-libev/install @@ -85,7 +89,7 @@ define Package/shadowsocks-libev/install $(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/shadowsocks-libev/firewall.include endef -Package/shadowsocks-libev-polarssl/install = $(Package/shadowsocks-libev/install) +Package/shadowsocks-libev-mbedtls/install = $(Package/shadowsocks-libev/install) $(eval $(call BuildPackage,shadowsocks-libev)) -$(eval $(call BuildPackage,shadowsocks-libev-polarssl)) +$(eval $(call BuildPackage,shadowsocks-libev-mbedtls)) diff --git a/net/sngrep/Makefile b/net/sngrep/Makefile index 06a6834..e1b2c9a 100644 --- a/net/sngrep/Makefile +++ b/net/sngrep/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sngrep -PKG_VERSION=1.4.1 +PKG_VERSION=1.4.2 PKG_RELEASE:=1 PKG_MAINTAINER:=Daniel Engberg PKG_LICENSE:=GPL-3.0 @@ -17,9 +17,9 @@ PKG_LICENSE_FILES:=COPYING PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/irontec/sngrep PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=57baa4b16d0021cf0a70889c15aee708db378fed +PKG_SOURCE_VERSION:=da791185cabeea5a6fcc7372157340b2d1369df7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_MD5SUM:=5b2cb01d34fcc6d631f8f6efe01ec556fe1325aa300590bec5aa6a078486f9c3 +PKG_MIRROR_MD5SUM:=2cc640e065f33cae4a3a8e14bdc740e49269cd850eee2ffa9eb821427caaa371 PKG_FIXUP:=autoreconf diff --git a/net/socat/Makefile b/net/socat/Makefile index b89ffca..ede942c 100644 --- a/net/socat/Makefile +++ b/net/socat/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=socat -PKG_VERSION:=1.7.3.0 -PKG_RELEASE:=2 +PKG_VERSION:=1.7.3.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download -PKG_MD5SUM:=b607edb65bc6c57f4a43f06247504274 +PKG_MD5SUM:=d2da659540c38139f388e9437bfaae16bb458d174d056cb3228432a8f489fbaa PKG_MAINTAINER:= Ted Hess @@ -69,6 +69,9 @@ CONFIGURE_VARS += \ sc_cv_sys_tabdly_shift=11 \ sc_cv_sys_csize_shift=4 +TARGET_CFLAGS += \ + -include stddef.h + define Package/socat/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/ diff --git a/net/socat/patches/110-drop_egd_sslv3_support.patch b/net/socat/patches/110-drop_egd_sslv3_support.patch new file mode 100644 index 0000000..f81f2eb --- /dev/null +++ b/net/socat/patches/110-drop_egd_sslv3_support.patch @@ -0,0 +1,184 @@ +--- a/sslcls.c ++++ b/sslcls.c +@@ -55,6 +55,7 @@ const SSL_METHOD *sycSSLv2_server_method + } + #endif + ++#ifdef HAVE_SSLv3_client_method + const SSL_METHOD *sycSSLv3_client_method(void) { + const SSL_METHOD *result; + Debug("SSLv3_client_method()"); +@@ -62,7 +63,9 @@ const SSL_METHOD *sycSSLv3_client_method + Debug1("SSLv3_client_method() -> %p", result); + return result; + } ++#endif + ++#ifdef HAVE_SSLv3_server_method + const SSL_METHOD *sycSSLv3_server_method(void) { + const SSL_METHOD *result; + Debug("SSLv3_server_method()"); +@@ -70,6 +73,7 @@ const SSL_METHOD *sycSSLv3_server_method + Debug1("SSLv3_server_method() -> %p", result); + return result; + } ++#endif + + const SSL_METHOD *sycSSLv23_client_method(void) { + const SSL_METHOD *result; +@@ -331,14 +335,6 @@ void sycSSL_free(SSL *ssl) { + return; + } + +-int sycRAND_egd(const char *path) { +- int result; +- Debug1("RAND_egd(\"%s\")", path); +- result = RAND_egd(path); +- Debug1("RAND_egd() -> %d", result); +- return result; +-} +- + DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) { + DH *result; + Debug4("PEM_read_bio_DHparams(%p, %p, %p, %p)", +@@ -375,7 +371,7 @@ int sycFIPS_mode_set(int onoff) { + } + #endif /* WITH_FIPS */ + +-#if OPENSSL_VERSION_NUMBER >= 0x00908000L ++#if (OPENSSL_VERSION_NUMBER >= 0x00908000L) && !defined(OPENSSL_NO_COMP) + const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl) { + const COMP_METHOD *result; + Debug1("SSL_get_current_compression(%p)", ssl); +--- a/sslcls.h ++++ b/sslcls.h +@@ -47,7 +47,6 @@ X509 *sycSSL_get_peer_certificate(SSL *s + int sycSSL_shutdown(SSL *ssl); + void sycSSL_CTX_free(SSL_CTX *ctx); + void sycSSL_free(SSL *ssl); +-int sycRAND_egd(const char *path); + + DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u); + +@@ -55,7 +54,7 @@ BIO *sycBIO_new_file(const char *filenam + + int sycFIPS_mode_set(int onoff); + +-#if OPENSSL_VERSION_NUMBER >= 0x00908000L ++#if (OPENSSL_VERSION_NUMBER >= 0x00908000L) && !defined(OPENSSL_NO_COMP) + const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl); + const COMP_METHOD *sycSSL_get_current_expansion(SSL *ssl); + const char *sycSSL_COMP_get_name(const COMP_METHOD *comp); +@@ -98,7 +97,6 @@ const char *sycSSL_COMP_get_name(const C + #define sycSSL_shutdown(s) SSL_shutdown(s) + #define sycSSL_CTX_free(c) SSL_CTX_free(c) + #define sycSSL_free(s) SSL_free(s) +-#define sycRAND_egd(p) RAND_egd(p) + + #define sycPEM_read_bio_DHparams(b,x,p,u) PEM_read_bio_DHparams(b,x,p,u) + +--- a/test.sh ++++ b/test.sh +@@ -576,9 +576,6 @@ filloptionvalues() { + *,dh,*) OPTS=$(echo "$OPTS" |sed "s/,dh,/,dh=/tmp/hugo,/g");; + esac + case "$OPTS" in +- *,egd,*) OPTS=$(echo "$OPTS" |sed "s/,egd,/,egd=/tmp/hugo,/g");; +- esac +- case "$OPTS" in + *,compress,*) OPTS=$(echo "$OPTS" |sed "s/,compress,/,compress=none,/g");; + esac + # PROXY +--- a/xio-openssl.c ++++ b/xio-openssl.c +@@ -108,7 +108,6 @@ const struct optdesc opt_openssl_key + const struct optdesc opt_openssl_dhparam = { "openssl-dhparam", "dh", OPT_OPENSSL_DHPARAM, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC }; + const struct optdesc opt_openssl_cafile = { "openssl-cafile", "cafile", OPT_OPENSSL_CAFILE, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC }; + const struct optdesc opt_openssl_capath = { "openssl-capath", "capath", OPT_OPENSSL_CAPATH, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC }; +-const struct optdesc opt_openssl_egd = { "openssl-egd", "egd", OPT_OPENSSL_EGD, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC }; + const struct optdesc opt_openssl_pseudo = { "openssl-pseudo", "pseudo", OPT_OPENSSL_PSEUDO, GROUP_OPENSSL, PH_SPEC, TYPE_BOOL, OFUNC_SPEC }; + #if OPENSSL_VERSION_NUMBER >= 0x00908000L + const struct optdesc opt_openssl_compress = { "openssl-compress", "compress", OPT_OPENSSL_COMPRESS, GROUP_OPENSSL, PH_SPEC, TYPE_STRING, OFUNC_SPEC }; +@@ -147,7 +146,7 @@ int xio_reset_fips_mode(void) { + static void openssl_conn_loginfo(SSL *ssl) { + Notice1("SSL connection using %s", SSL_get_cipher(ssl)); + +-#if OPENSSL_VERSION_NUMBER >= 0x00908000L ++#if (OPENSSL_VERSION_NUMBER >= 0x00908000L) && !defined(OPENSSL_NO_COMP) + { + const COMP_METHOD *comp, *expansion; + +@@ -722,7 +721,6 @@ int + char *opt_dhparam = NULL; /* file name of DH params */ + char *opt_cafile = NULL; /* certificate authority file */ + char *opt_capath = NULL; /* certificate authority directory */ +- char *opt_egd = NULL; /* entropy gathering daemon socket path */ + #if OPENSSL_VERSION_NUMBER >= 0x00908000L + char *opt_compress = NULL; /* compression method */ + #endif +@@ -741,7 +739,6 @@ int + retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath); + retropt_string(opts, OPT_OPENSSL_KEY, &opt_key); + retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam); +- retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd); + retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo); + #if OPENSSL_VERSION_NUMBER >= 0x00908000L + retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress); +@@ -877,10 +874,6 @@ int + } + } + +- if (opt_egd) { +- sycRAND_egd(opt_egd); +- } +- + if (opt_pseudo) { + long int randdata; + /* initialize libc random from actual microseconds */ +@@ -1105,7 +1098,7 @@ static int openssl_SSL_ERROR_SSL(int lev + if (e == ((ERR_LIB_RAND<<24)| + (RAND_F_SSLEAY_RAND_BYTES<<12)| + (RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) { +- Error("too few entropy; use options \"egd\" or \"pseudo\""); ++ Error("too few entropy; use option \"pseudo\""); + stat = STAT_NORETRY; + } else { + Msg2(level, "%s(): %s", funcname, ERR_error_string(e, buf)); +--- a/xio-openssl.h ++++ b/xio-openssl.h +@@ -21,7 +21,6 @@ extern const struct optdesc opt_openssl_ + extern const struct optdesc opt_openssl_dhparam; + extern const struct optdesc opt_openssl_cafile; + extern const struct optdesc opt_openssl_capath; +-extern const struct optdesc opt_openssl_egd; + extern const struct optdesc opt_openssl_pseudo; + #if OPENSSL_VERSION_NUMBER >= 0x00908000L + extern const struct optdesc opt_openssl_compress; +--- a/xioopts.c ++++ b/xioopts.c +@@ -412,7 +412,6 @@ const struct optname optionnames[] = { + #ifdef ECHOPRT + IF_TERMIOS("echoprt", &opt_echoprt) + #endif +- IF_OPENSSL("egd", &opt_openssl_egd) + IF_ANY ("end-close", &opt_end_close) + IF_TERMIOS("eof", &opt_veof) + IF_TERMIOS("eol", &opt_veol) +@@ -1102,7 +1101,6 @@ const struct optname optionnames[] = { + IF_OPENSSL("openssl-compress", &opt_openssl_compress) + #endif + IF_OPENSSL("openssl-dhparam", &opt_openssl_dhparam) +- IF_OPENSSL("openssl-egd", &opt_openssl_egd) + #if WITH_FIPS + IF_OPENSSL("openssl-fips", &opt_openssl_fips) + #endif +--- a/xioopts.h ++++ b/xioopts.h +@@ -478,7 +478,6 @@ enum e_optcode { + OPT_OPENSSL_COMPRESS, + #endif + OPT_OPENSSL_DHPARAM, +- OPT_OPENSSL_EGD, + OPT_OPENSSL_FIPS, + OPT_OPENSSL_KEY, + OPT_OPENSSL_METHOD, diff --git a/net/softethervpn/Makefile b/net/softethervpn/Makefile new file mode 100644 index 0000000..189f1f5 --- /dev/null +++ b/net/softethervpn/Makefile @@ -0,0 +1,152 @@ +# +# Copyright (C) 2008-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# Based on the initial porting done by el1n + +include $(TOPDIR)/rules.mk + +PKG_NAME:=softethervpn +PKG_VERSION:=4.22-9634 +PKG_VERREL:=beta +PKG_VERDATE:=2016.11.27 +PKG_RELEASE:=1 + +PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz +PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/ +PKG_MD5SUM:=703d41b34ff49d008ddd329340a5a75e + +PKG_BUILD_DIR:=$(BUILD_DIR)/v$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/v$(PKG_VERSION) + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_DEPENDS:=softethervpn/host + +HAMCORE_SE2:=$(STAGING_DIR_HOST)/share/softethervpn/hamcore.se2 + +include $(INCLUDE_DIR)/nls.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + + +# Override CC to add fake libreadline to linker search path +HOSTCC += -L./src/readline + +# Add defines to turn add_history() and readline() calls into no-ops +HOSTCC += -D'add_history(x)' -D'readline(x)=\"\"' + +# Execute in host build directory +HOST_MAKE_FLAGS += -C $(HOST_BUILD_DIR) + +# Select 32 or 64 bit Makefile for host build depending on host architecture +HOST_MAKE_FLAGS += -f src/makefiles/linux_$(if $(shell uname -m | grep 64),64,32)bit.mak + +# Prevent calling upstream configure +define Host/Configure +endef + +define Host/Compile + # Prepare fake readline headers and library + mkdir -p $(HOST_BUILD_DIR)/src/readline + touch $(HOST_BUILD_DIR)/src/readline/readline.h + touch $(HOST_BUILD_DIR)/src/readline/history.h + ar rcs $(HOST_BUILD_DIR)/src/readline/libreadline.a + + # Build hamcorebuilder using host compiler and let it generate + # the hamcore.se2 archive file + CC="$(HOSTCC)" $(MAKE) $(HOST_MAKE_FLAGS) \ + src/bin/BuiltHamcoreFiles/unix/hamcore.se2 +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR_HOST)/share/softethervpn + $(INSTALL_DATA) $(HOST_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2 $(HAMCORE_SE2) +endef + + +# Tune CFLAGS for target +TARGET_CFLAGS += \ + $(if $(CONFIG_OPENSSL_WITH_SSL3),,-DSSL_OP_NO_SSLv3) \ + $(if $(filter mips mipsel,$(ARCH)),-minterlink-mips16) + +# Select 32 or 64 bit Makefile for target build depending on 64bit config symbol +MAKE_FLAGS += \ + -f src/makefiles/linux_$(if $(CONFIG_ARCH_64BIT),64,32)bit.mak + +# Map nonstandard CCFLAGS variable to standard TARGET_CFLAGS +MAKE_VARS += \ + CCFLAGS="$(TARGET_CFLAGS)" + +define Build/Configure + # Fetch prebuilt hamcore.se2 from staging dir + $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix + $(CP) $(HAMCORE_SE2) $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2 + + # Portably set hamcore.se2 modtime to one day in the future + # to prevent rebuilding it + perl -e 'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \ + $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2 +endef + + +define Package/softethervpn + SECTION:=net + CATEGORY:=Network + SUBMENU:=VPN + DEPENDS:=+libpthread +librt +libreadline +libopenssl +libncurses +kmod-tun +zlib $(ICONV_DEPENDS) + TITLE:=Free Cross-platform Multi-protocol VPN server and client + URL:=http://www.softether.org/ + MAINTAINER:=Federico Di Marco +endef + +define Package/softethervpn/description +SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most powerful and easy-to-use multi-protocol VPN software developed as an academic +project from University of Tsukuba, Japan. SoftEther VPN has strong compatibility to today's most popular VPN products among the world. It has the interoperability +with OpenVPN, L2TP, IPsec, EtherIP, L2TPv3, Cisco VPN Routers and MS-SSTP VPN Clients. SoftEther VPN is the world's only VPN software which supports SSL-VPN, +OpenVPN, L2TP, EtherIP, L2TPv3 and IPsec as a single VPN software. SoftEther VPN is not only an alternative VPN server to existing VPN products (OpenVPN, +IPsec and MS-SSTP), but has also original strong SSL-VPN protocol to penetrate any kinds of firewalls. Ultra-optimized SSL-VPN Protocol of SoftEther VPN +has very fast throughput, low latency and firewall resistance. +endef + + +define Package/softethervpn/conffiles +/usr/libexec/softethervpn/vpn_server.config +/usr/libexec/softethervpn/vpn_client.config +/usr/libexec/softethervpn/vpn_bridge.config +/usr/libexec/softethervpn/lang.config +endef + +define Package/softethervpn/install + $(INSTALL_DIR) $(1)/usr/libexec/softethervpn + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnserver/vpnserver $(1)/usr/libexec/softethervpn + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnserver/hamcore.se2 $(1)/usr/libexec/softethervpn + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnclient/vpnclient $(1)/usr/libexec/softethervpn + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnbridge/vpnbridge $(1)/usr/libexec/softethervpn + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpncmd/vpncmd $(1)/usr/libexec/softethervpn + $(INSTALL_BIN) files/launcher.sh $(1)/usr/libexec/softethervpn + + $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_server.config + $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_bridge.config + $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_client.config + $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/lang.config + + $(INSTALL_DIR) $(1)/usr/bin + + #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnserver + #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnclient + #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnbridge + $(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpncmd + + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) files/vpnserver.init $(1)/etc/init.d/softethervpnserver + $(INSTALL_BIN) files/vpnbridge.init $(1)/etc/init.d/softethervpnbridge + $(INSTALL_BIN) files/vpnclient.init $(1)/etc/init.d/softethervpnclient +endef + +$(eval $(call BuildPackage,softethervpn)) +$(eval $(call HostBuild)) diff --git a/net/softethervpn/files/dummy b/net/softethervpn/files/dummy new file mode 100644 index 0000000..e69de29 diff --git a/net/softethervpn/files/launcher.sh b/net/softethervpn/files/launcher.sh new file mode 100755 index 0000000..7970792 --- /dev/null +++ b/net/softethervpn/files/launcher.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec "/usr/libexec/softethervpn/${0##*/}" "$@" diff --git a/net/softethervpn/files/vpnbridge.init b/net/softethervpn/files/vpnbridge.init new file mode 100644 index 0000000..9e5c44f --- /dev/null +++ b/net/softethervpn/files/vpnbridge.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +START=60 + +start(){ + logger -t 'softethervpn' "Starting softether vpnbridge service." + /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnbridge start +} + +stop(){ + logger -t 'softethervpn' "Stopping softether vpnbridge service." + /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnbridge stop +} diff --git a/net/softethervpn/files/vpnclient.init b/net/softethervpn/files/vpnclient.init new file mode 100644 index 0000000..1a3296d --- /dev/null +++ b/net/softethervpn/files/vpnclient.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +START=60 + +start(){ + logger -t 'softethervpn' "Starting softether vpnclient service." + /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnclient start +} + +stop(){ + logger -t 'softethervpn' "Stopping softether vpnclient service." + /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnclient stop +} diff --git a/net/softethervpn/files/vpnserver.init b/net/softethervpn/files/vpnserver.init new file mode 100644 index 0000000..6dc180a --- /dev/null +++ b/net/softethervpn/files/vpnserver.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +START=60 + +start(){ + logger -t 'softethervpn' "Starting softether vpnserver service." + /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnserver start +} + +stop(){ + logger -t 'softethervpn' "Stopping softether vpnserver service." + /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnserver stop +} diff --git a/net/softethervpn/patches/103-noeucjp.patch b/net/softethervpn/patches/103-noeucjp.patch new file mode 100644 index 0000000..f403dfb --- /dev/null +++ b/net/softethervpn/patches/103-noeucjp.patch @@ -0,0 +1,29 @@ +--- a/src/Mayaqua/Internat.c ++++ b/src/Mayaqua/Internat.c +@@ -123,7 +123,7 @@ + #include + + extern LOCK *token_lock; +-static char charset[MAX_SIZE] = "EUCJP"; ++static char charset[MAX_SIZE] = "utf-8"; + static LOCK *iconv_lock = NULL; + void *iconv_cache_wide_to_str = 0; + void *iconv_cache_str_to_wide = 0; +@@ -938,7 +938,7 @@ void InitInternational() + #ifdef UNIX_MACOS + StrCpy(charset, sizeof(charset), "utf-8"); + #else // UNIX_MACOS +- StrCpy(charset, sizeof(charset), "EUCJP"); ++ StrCpy(charset, sizeof(charset), "utf-8"); + #endif // UNIX_MACOS + d = IconvWideToStrInternal(); + if (d == (void *)-1) +@@ -1198,7 +1198,7 @@ void GetCurrentCharSet(char *name, UINT + } + else + { +- StrCpy(name, size, "eucJP"); ++ StrCpy(name, size, "utf-8"); + } + } + FreeToken(t); diff --git a/net/softethervpn/patches/105-nossl3.patch b/net/softethervpn/patches/105-nossl3.patch new file mode 100644 index 0000000..00e0fea --- /dev/null +++ b/net/softethervpn/patches/105-nossl3.patch @@ -0,0 +1,33 @@ +Index: v4.22-9634/src/Mayaqua/Network.c +=================================================================== +--- v4.22-9634.orig/src/Mayaqua/Network.c ++++ v4.22-9634/src/Mayaqua/Network.c +@@ -13013,20 +13013,28 @@ bool StartSSLEx(SOCK *sock, X *x, K *pri + } + else + { ++#ifndef SSL_OP_NO_SSLv3 + if (client_tls == false) + { + SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_method()); + } + else + { ++#endif // SSL_OP_NO_SSLv3 + SSL_CTX_set_ssl_version(ssl_ctx, SSLv23_client_method()); ++#ifndef SSL_OP_NO_SSLv3 + } ++#endif // SSL_OP_NO_SSLv3 + } + sock->ssl = SSL_new(ssl_ctx); + SSL_set_fd(sock->ssl, (int)sock->socket); + + #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME ++#ifndef SSL_OP_NO_SSLv3 + if (sock->ServerMode == false && client_tls) ++#else ++ if (sock->ServerMode == false) ++#endif // SSL_OP_NO_SSLv3 + { + if (IsEmptyStr(sni_hostname) == false) + { diff --git a/net/sqm-scripts/Makefile b/net/sqm-scripts/Makefile index ce0e957..3aa81b1 100644 --- a/net/sqm-scripts/Makefile +++ b/net/sqm-scripts/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sqm-scripts -PKG_SOURCE_VERSION:=951118f79a3fea7081f89fee49c77895624c59a1 -PKG_VERSION:=1.0.9 +PKG_SOURCE_VERSION:=8217081f7e52af342c362b29480461575c496387 +PKG_VERSION:=1.1.3 PKG_RELEASE:=1 PKG_LICENSE:=GPLv2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz -PKG_SOURCE_URL:=git://github.com/tohojo/sqm-scripts.git +PKG_SOURCE_URL:=https://github.com/tohojo/sqm-scripts.git PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) @@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk define Package/sqm-scripts SECTION:=net CATEGORY:=Base system - DEPENDS:=+tc +kmod-sched +kmod-ifb +iptables \ + DEPENDS:=+tc +kmod-sched-core +kmod-sched-cake +kmod-ifb +iptables \ +iptables-mod-ipopt +iptables-mod-conntrack-extra TITLE:=SQM Scripts (QoS) PKGARCH:=all @@ -55,7 +55,7 @@ define Package/luci-app-sqm endef define Package/luci-app-sqm/description - Control the simple_qos SQM script + Luci interface for the SQM scripts queue management configuration package. endef define Package/luci-app-sqm/install diff --git a/net/sstp-client/Makefile b/net/sstp-client/Makefile index 32791dc..081c324 100644 --- a/net/sstp-client/Makefile +++ b/net/sstp-client/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sstp-client -PKG_VERSION:=1.0.10 -PKG_RELEASE:=2 +PKG_VERSION:=1.0.11 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/sstp-client/$(PKG_VERSION) -PKG_MD5SUM:=5f290355187e5ce0423fb7e388e65b9d +PKG_MD5SUM:=4ddbc2fe33eb27d5a4f38d2241005970 PKG_LICENSE=GPLv2 include $(INCLUDE_DIR)/package.mk @@ -23,15 +23,23 @@ TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include define Package/sstp-client SECTION:=net CATEGORY:=Network + SUBMENU:=VPN DEPENDS=+libevent2 +libopenssl +ppp - TITLE:=SSTP is Microsofts Remote Access Solution for PPP over SSL + TITLE:=SSTP-Client is a SSTP client for Linux. URL:=http://sstp-client.sourceforge.net/ MAINTAINER:=Federico Di Marco endef define Package/sstp-client/description - It can be used instead of PPTP or L2TP, and is only available with Windows Vista/7 connecting to a Windows 2008 Server. The advantage of SSTP compared to PPTP and L2TP is that it cannot be easily blocked by firewalls since the traffic is transmitted over HTTPS on port 443. - Windows Vista/7 uses SSTP whenever PPTP or L2TP cannot be established. For further information on SSTP check out wikipedia's article on Secure Socket Tunneling Protocol. +The advantage of SSTP compared to other vpn protocols like PPTP and L2TP is that it cannot be easily blocked by firewalls since the traffic is transmitted over HTTPS on port 443. +This software has a similar commandline and configuration to the standard linux pptp-client software. + +Features: +- Connect to Microsoft RAS network using SSTP +- Use HTTPS with strong encryption over port 443 +- Asynchronous HDLC frame support +- Integration with pon/poff + endef define Package/sstp-client/conffiles @@ -41,13 +49,13 @@ define Package/sstp-client/conffiles endef define Package/sstp-client/install - $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/{bin,lib} $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/sstpc $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_BUILD_DIR)/src/libsstp-api/.libs/*.so* $(1)/usr/lib/ $(CP) $(PKG_BUILD_DIR)/src/pppd-plugin/.libs/*.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/etc/ppp - $(INSTALL_DIR) $(1)/etc/peers + + $(INSTALL_DIR) $(1)/etc + $(CP) files/etc $(1) endef $(eval $(call BuildPackage,sstp-client)) diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile index 029b8bf..5289d3f 100644 --- a/net/strongswan/Makefile +++ b/net/strongswan/Makefile @@ -374,6 +374,7 @@ CONFIGURE_ARGS+= \ --disable-scripts \ --disable-static \ --disable-fast \ + --enable-mediation \ --with-systemdsystemunitdir=no \ $(if $(CONFIG_PACKAGE_strongswan-utils),--enable-pki --enable-scepclient,--disable-pki --disable-scepclient) \ --with-random-device=/dev/random \ diff --git a/net/stunnel/Makefile b/net/stunnel/Makefile index 30bb958..0c4ec19 100644 --- a/net/stunnel/Makefile +++ b/net/stunnel/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=stunnel -PKG_VERSION:=5.38 +PKG_VERSION:=5.40 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0+ @@ -19,7 +19,7 @@ PKG_SOURCE_URL:= \ http://ftp.nluug.nl/pub/networking/stunnel/ \ http://www.usenix.org.uk/mirrors/stunnel/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=09ada29ba1683ab1fd1f31d7bed8305127a0876537e836a40cb83851da034fd5 +PKG_MD5SUM:=23acdb390326ffd507d90f8984ecc90e0d9993f6bd6eac1d0a642456565c45ff PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/net/subversion/Makefile b/net/subversion/Makefile new file mode 100644 index 0000000..561322a --- /dev/null +++ b/net/subversion/Makefile @@ -0,0 +1,142 @@ +# +# 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:=subversion +PKG_RELEASE:=2 +PKG_VERSION:=1.9.5 +PKG_SOURCE_URL:=@APACHE/subversion +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=9fcbae352a5efe73d46a88c97c6bba14 +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Val Kulkov + +PKG_FIXUP:=autoreconf +PKG_MACRO_PATHS:=build/ac-macros + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + + +define Package/subversion/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Version Control Systems + TITLE:=A compelling replacement for CVS + DEPENDS:=+zlib +libsqlite3 +PACKAGE_unixodbc:unixodbc +libapr +libaprutil +libmagic \ + $(ICONV_DEPENDS) $(INTL_DEPENDS) + URL:=http://subversion.apache.org/ +endef + +define Package/subversion/Default/description + Subversion is a free/open-source version control system. That is, + Subversion manages files and directories, and the changes made to them, + over time. This allows you to recover older versions of your data, or + examine the history of how your data changed. In this regard, many + people think of a version control system as a sort of time machine. +endef + +define Package/subversion-libs + $(call Package/subversion/Default) + TITLE:=subversion libs +endef + +define Package/subversion-libs/description + $(call Package/subversion/Default/description) + This package contains the Subversion libraries. +endef + +define Package/subversion-client + $(call Package/subversion/Default) + DEPENDS:=+subversion-libs + TITLE:=subversion client tools +endef + +define Package/subversion-client/description + $(call Package/subversion/Default/description) + This package contains the Subversion client tools. +endef + +define Package/subversion-server + $(call Package/subversion/Default) + DEPENDS:=+subversion-libs + TITLE:=subversion server +endef + +define Package/subversion-server/description + $(call Package/subversion/Default/description) + This package contains the Subversion server. +endef + +define Package/subversion-server/conffiles +/etc/config/subversion +endef + +TARGET_CFLAGS += $(FPIC) +TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE +APU_LIBS=$(shell $(STAGING_DIR)/usr/bin/apu-1-config --link-libtool --libs) + +CONFIGURE_ARGS += \ + --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \ + --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \ + --with-libmagic="$(STAGING_DIR)/usr" \ + --disable-mod-activation \ + --without-ruby-sitedir \ + --without-swig \ + --without-jikes \ + --without-junit \ + --without-berkeley-db \ + --without-apxs \ + --without-sasl + +ifdef $(INTL_FULL) + CONFIGURE_ARGS += --enable-nls +else + CONFIGURE_ARGS += --disable-nls +endif + +CONFIGURE_VARS += \ + LDFLAGS="$(TARGET_LDFLAGS) $(APU_LIBS) -lcrypt -lm \ + -lz -lpthread $(if $(INTL_FULL),-lintl)" + CPPFLAGS="$(TARGET_CPPFLAGS)" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all local-install +endef + +define Package/subversion-libs/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/ +endef + +define Package/subversion-client/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/ +endef + +define Package/subversion-server/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion +endef + +define Package/subversion-server/prerm +#!/bin/sh + ps | grep '\(/svnserve$\| svnserve\)' | grep -cvq grep >/dev/null && /etc/init.d/subversion stop + /etc/init.d/subversion disable +endef + +$(eval $(call BuildPackage,subversion-libs)) +$(eval $(call BuildPackage,subversion-client)) +$(eval $(call BuildPackage,subversion-server)) diff --git a/net/subversion/files/subversion.config b/net/subversion/files/subversion.config new file mode 100644 index 0000000..3297c8d --- /dev/null +++ b/net/subversion/files/subversion.config @@ -0,0 +1,3 @@ +config subversion + option path '/var/local/svn' + option port '3690' diff --git a/net/subversion/files/subversion.init b/net/subversion/files/subversion.init new file mode 100644 index 0000000..660a297 --- /dev/null +++ b/net/subversion/files/subversion.init @@ -0,0 +1,37 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2016 OpenWrt.org + +START=50 + +start_instance () { + local section="$1" + config_get path "$section" 'path' + config_get port "$section" 'port' + + if [ ! -d "$path" ]; then + echo "The subversion repository (${path}) does not exist." + echo "Create a new repository and/or change the path in /etc/config/subversion" + echo + echo "Create a new subversion repository with:" + echo " mkdir -p ${path}" + echo " svnadmin create --fs-type fsfs ${path}" + echo + echo "Changing the path using UCI (default path is: /var/local/svn):" + echo " uci set subversion.@[0].path="/srv/svn"" + echo " uci commit" + echo " /etc/init.d/subversion restart" + return 1 + fi + + service_start /usr/bin/svnserve -d --listen-port ${port} -r ${path} +} + +start() { + config_load 'subversion' + config_foreach start_instance 'subversion' +} + +stop() { + SERVICE_SIG_STOP="INT" \ + service_stop /usr/bin/svnserve +} diff --git a/net/subversion/patches/301-cross-compilation-macos.patch b/net/subversion/patches/301-cross-compilation-macos.patch new file mode 100644 index 0000000..b964949 --- /dev/null +++ b/net/subversion/patches/301-cross-compilation-macos.patch @@ -0,0 +1,97 @@ +--- a/build/ac-macros/macosx.m4 2016-02-09 01:24:13.181409245 -0500 ++++ b/build/ac-macros/macosx.m4 2016-02-09 01:25:15.873408288 -0500 +@@ -17,94 +17,4 @@ dnl specific language governing permis + dnl under the License. + dnl =================================================================== + dnl +-dnl Mac OS X specific checks + +-dnl SVN_LIB_MACHO_ITERATE +-dnl Check for _dyld_image_name and _dyld_image_header availability +-AC_DEFUN(SVN_LIB_MACHO_ITERATE, +-[ +- AC_MSG_CHECKING([for Mach-O dynamic module iteration functions]) +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +- #include +- #include +- ]],[[ +- const struct mach_header *header = _dyld_get_image_header(0); +- const char *name = _dyld_get_image_name(0); +- if (name && header) return 0; +- return 1; +- ]])],[ +- AC_DEFINE([SVN_HAVE_MACHO_ITERATE], [1], +- [Is Mach-O low-level _dyld API available?]) +- AC_MSG_RESULT([yes]) +- ],[ +- AC_MSG_RESULT([no]) +- ]) +-]) +- +-dnl SVN_LIB_MACOS_PLIST +-dnl Assign variables for Mac OS property list support +-AC_DEFUN(SVN_LIB_MACOS_PLIST, +-[ +- AC_MSG_CHECKING([for Mac OS property list utilities]) +- +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #include +- #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \ +- || !defined(MAC_OS_X_VERSION_10_0) \ +- || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_0) +- #error ProperyList API unavailable. +- #endif +- ]],[[]])],[ +- dnl ### Hack. We should only need to pass the -framework options when +- dnl linking libsvn_subr, since it is the only library that uses Keychain. +- dnl +- dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for +- dnl OS X frameworks like it does for normal libraries, so we need to +- dnl explicitly pass the option to all the users of libsvn_subr to allow +- dnl static builds to link successfully. +- dnl +- dnl This does mean that all executables we link will be linked directly +- dnl to these frameworks - even when building shared libraries - but that +- dnl shouldn't cause any problems. +- +- LIBS="$LIBS -framework CoreFoundation" +- AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1], +- [Is Mac OS property list API available?]) +- AC_MSG_RESULT([yes]) +- ],[ +- AC_MSG_RESULT([no]) +- ]) +-]) +- +-dnl SVN_LIB_MACOS_KEYCHAIN +-dnl Check configure options and assign variables related to Keychain support +- +-AC_DEFUN(SVN_LIB_MACOS_KEYCHAIN, +-[ +- AC_ARG_ENABLE(keychain, +- AS_HELP_STRING([--disable-keychain], +- [Disable use of Mac OS KeyChain for auth credentials]), +- [enable_keychain=$enableval],[enable_keychain=yes]) +- +- AC_MSG_CHECKING([for Mac OS KeyChain Services]) +- +- if test "$enable_keychain" = "yes"; then +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #include +- #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \ +- || !defined(MAC_OS_X_VERSION_10_2) \ +- || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2) +- #error KeyChain API unavailable. +- #endif +- ]],[[]])],[ +- dnl ### Hack, see SVN_LIB_MACOS_PLIST +- LIBS="$LIBS -framework Security" +- LIBS="$LIBS -framework CoreServices" +- AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?]) +- AC_MSG_RESULT([yes]) +- ],[ +- enable_keychain=no +- AC_MSG_RESULT([no]) +- ]) +- fi +-]) diff --git a/net/tor/Makefile b/net/tor/Makefile index ccdd47b..b6ab886 100644 --- a/net/tor/Makefile +++ b/net/tor/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tor -PKG_VERSION:=0.2.8.9 +PKG_VERSION:=0.2.9.9 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://dist.torproject.org/ \ https://archive.torproject.org/tor-package-archive -PKG_MD5SUM:=3f5c273bb887be4aff11f4d99b9e2e52d293b81ff4f6302b730161ff16dc5316 +PKG_MD5SUM:=33325d2b250fd047ba2ddc5d11c2190c4e2951f4b03ec48ebd8bf0666e990d43 PKG_MAINTAINER:=Hauke Mehrtens PKG_LICENSE_FILES:=LICENSE @@ -48,6 +48,28 @@ $(call Package/tor/Default/description) This package contains the tor daemon. endef +define Package/tor-gencert +$(call Package/tor/Default) + TITLE:=Tor certificate generation + DEPENDS:=+tor +endef + +define Package/tor-gencert/description +$(call Package/tor/Default/description) + Generate certs and keys for Tor directory authorities +endef + +define Package/tor-resolve +$(call Package/tor/Default) + TITLE:=tor hostname resolve + DEPENDS:=+tor +endef + +define Package/tor-resolve/description +$(call Package/tor/Default/description) + Resolve a hostname to an IP address via tor +endef + define Package/tor-geoip $(call Package/tor/Default) TITLE:=GeoIP db for tor @@ -61,22 +83,30 @@ endef define Package/tor/conffiles /etc/tor/torrc +/var/lib/tor/fingerprint +/var/lib/tor/keys/* endef CONFIGURE_ARGS += \ --with-libevent-dir="$(STAGING_DIR)/usr" \ --with-ssl-dir="$(STAGING_DIR)/usr" \ + --with-openssl-dir="$(STAGING_DIR)/usr" \ + --with-zlib-dir="$(STAGING_DIR)/usr" \ --disable-asciidoc \ - --disable-seccomp + --disable-seccomp \ + --disable-libscrypt \ + --disable-unittests \ + --disable-largefile \ + --with-tor-user=tor \ + --with-tor-group=tor + +EXTRA_CFLAGS += -std=gnu99 ifneq ($(CONFIG_SSP_SUPPORT),y) CONFIGURE_ARGS += \ --disable-gcc-hardening - MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -std=gnu99" else - MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -fPIC -std=gnu99" + EXTRA_CFLAGS += -fPIC endif CONFIGURE_VARS += \ @@ -85,16 +115,30 @@ CONFIGURE_VARS += \ define Package/tor/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/torify $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/tor.init $(1)/etc/init.d/tor $(INSTALL_DIR) $(1)/etc/tor $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/tor/torrc.sample $(1)/etc/tor/torrc endef +define Package/tor-gencert/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor-gencert $(1)/usr/sbin/ +endef + +define Package/tor-resolve/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor-resolve $(1)/usr/sbin/ +endef + define Package/tor-geoip/install $(INSTALL_DIR) $(1)/usr/share/tor $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip $(1)/usr/share/tor/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip6 $(1)/usr/share/tor/ endef $(eval $(call BuildPackage,tor)) +$(eval $(call BuildPackage,tor-gencert)) +$(eval $(call BuildPackage,tor-resolve)) $(eval $(call BuildPackage,tor-geoip)) diff --git a/net/tor/patches/001-torrc.patch b/net/tor/patches/001-torrc.patch index e295219..1a784d2 100644 --- a/net/tor/patches/001-torrc.patch +++ b/net/tor/patches/001-torrc.patch @@ -1,11 +1,15 @@ --- a/src/config/torrc.sample.in +++ b/src/config/torrc.sample.in -@@ -45,11 +45,11 @@ - ## Uncomment this to start the process in the background... or use - ## --runasdaemon 1 on the command line. This is ignored on Windows; - ## see the FAQ entry if you want Tor to run as an NT service. --#RunAsDaemon 1 -+RunAsDaemon 1 +@@ -39,7 +39,7 @@ + ## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log + #Log debug file @LOCALSTATEDIR@/log/tor/debug.log + ## Use the system log instead of Tor's logfiles +-#Log notice syslog ++Log notice syslog + ## To send all messages to stderr: + #Log debug stderr + +@@ -50,7 +50,7 @@ ## The directory for keeping all the keys/etc. By default, we store ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows. @@ -14,7 +18,7 @@ ## The port on which Tor will listen for local connections from Tor ## controller applications, as documented in control-spec.txt. -@@ -190,3 +190,4 @@ +@@ -204,3 +204,4 @@ ## address manually to your friends, uncomment this line: #PublishServerDescriptor 0 diff --git a/net/transmission/Makefile b/net/transmission/Makefile index 5a8a6be..596b71e 100644 --- a/net/transmission/Makefile +++ b/net/transmission/Makefile @@ -8,12 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=transmission -PKG_VERSION:=2.92 -PKG_RELEASE:=3 +PKG_VERSION:=2.92+git +PKG_RELEASE:=4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/transmission/transmission-releases/raw/master -PKG_MD5SUM:=3fce404a436e3cd7fde80fb6ed61c264 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/transmission/transmission.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=35fea28d1a37875ef7480ac061754df617805b19 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz +PKG_MIRROR_MD5SUM:=aeeb8dfd918bd2cf4fb6fbdf58bd822e9b509df1ba5ec408888edd161123ef8e PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -45,11 +48,11 @@ define Package/transmission-daemon-openssl VARIANT:=openssl endef -define Package/transmission-daemon-polarssl +define Package/transmission-daemon-mbedtls $(call Package/transmission-daemon/Default) - TITLE+= (with PolarSSL) - DEPENDS+=+libpolarssl - VARIANT:=polarssl + TITLE+= (with mbed TLS) + DEPENDS+=+libmbedtls + VARIANT:=mbedtls endef define Package/transmission-cli/Default @@ -64,11 +67,11 @@ define Package/transmission-cli-openssl VARIANT:=openssl endef -define Package/transmission-cli-polarssl +define Package/transmission-cli-mbedtls $(call Package/transmission-cli/Default) - TITLE+= (with PolarSSL) - DEPENDS+=+libpolarssl - VARIANT:=polarssl + TITLE+= (with mbed TLS) + DEPENDS+=+libmbedtls + VARIANT:=mbedtls endef define Package/transmission-remote/Default @@ -83,17 +86,17 @@ define Package/transmission-remote-openssl VARIANT:=openssl endef -define Package/transmission-remote-polarssl +define Package/transmission-remote-mbedtls $(call Package/transmission-remote/Default) - TITLE+= (with PolarSSL) - DEPENDS+=+libpolarssl - VARIANT:=polarssl + TITLE+= (with mbed TLS) + DEPENDS+=+libmbedtls + VARIANT:=mbedtls endef define Package/transmission-web $(call Package/transmission/template) TITLE+= (webinterface) - DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-polarssl) + DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls) endef @@ -104,19 +107,19 @@ define Package/transmission-daemon/Default/description This package contains the daemon itself. endef Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description) -Package/transmission-daemon-polarssl/description = $(Package/transmission-daemon/Default/description) +Package/transmission-daemon-mbedtls/description = $(Package/transmission-daemon/Default/description) define Package/transmission-cli/Default/description CLI utilities for transmission. endef Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description) -Package/transmission-cli-polarssl/description = $(Package/transmission-cli/Default/description) +Package/transmission-cli-mbedtls/description = $(Package/transmission-cli/Default/description) define Package/transmission-remote/Default/description CLI remote interface for transmission. endef Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description) -Package/transmission-remote-polarssl/description = $(Package/transmission-remote/Default/description) +Package/transmission-remote-mbedtls/description = $(Package/transmission-remote/Default/description) define Package/transmission-web/description Webinterface resources for transmission. @@ -125,7 +128,7 @@ endef define Package/transmission-daemon-openssl/conffiles /etc/config/transmission endef -Package/transmission-daemon-polarssl/conffiles = $(Package/transmission-daemon-openssl/conffiles) +Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles) CONFIGURE_VARS += \ @@ -143,9 +146,12 @@ ifeq ($(BUILD_VARIANT),openssl) --with-crypto=openssl endif -ifeq ($(BUILD_VARIANT),polarssl) +ifeq ($(BUILD_VARIANT),mbedtls) CONFIGURE_ARGS += \ --with-crypto=polarssl + CONFIGURE_VARS += \ + MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \ + MBEDTLS_LIBS="-lmbedtls -lmbedcrypto" endif MAKE_FLAGS += \ @@ -153,6 +159,11 @@ MAKE_FLAGS += \ TARGET_CFLAGS += -std=gnu99 +define Build/Configure + ( cd $(PKG_BUILD_DIR); ./autogen.sh $(CONFIGURE_ARGS)) + $(call Build/Configure/Default,$CONFIGURE_ARGS) +endef + define Package/transmission-daemon-openssl/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/ @@ -161,7 +172,7 @@ define Package/transmission-daemon-openssl/install $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission endef -Package/transmission-daemon-polarssl/install = $(Package/transmission-daemon-openssl/install) +Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install) define Package/transmission-cli-openssl/install $(INSTALL_DIR) $(1)/usr/bin @@ -171,13 +182,13 @@ define Package/transmission-cli-openssl/install $(PKG_INSTALL_DIR)/usr/bin/transmission-show \ $(1)/usr/bin/ endef -Package/transmission-cli-polarssl/install = $(Package/transmission-cli-openssl/install) +Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install) define Package/transmission-remote-openssl/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/ endef -Package/transmission-remote-polarssl/install = $(Package/transmission-remote-openssl/install) +Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install) define Package/transmission-web/install $(INSTALL_DIR) $(1)/usr/share/transmission @@ -185,9 +196,9 @@ define Package/transmission-web/install endef $(eval $(call BuildPackage,transmission-daemon-openssl)) -$(eval $(call BuildPackage,transmission-daemon-polarssl)) +$(eval $(call BuildPackage,transmission-daemon-mbedtls)) $(eval $(call BuildPackage,transmission-cli-openssl)) -$(eval $(call BuildPackage,transmission-cli-polarssl)) +$(eval $(call BuildPackage,transmission-cli-mbedtls)) $(eval $(call BuildPackage,transmission-remote-openssl)) -$(eval $(call BuildPackage,transmission-remote-polarssl)) +$(eval $(call BuildPackage,transmission-remote-mbedtls)) $(eval $(call BuildPackage,transmission-web)) diff --git a/net/transmission/patches/020-use-internal-miniupnp.patch b/net/transmission/patches/020-use-internal-miniupnp.patch index 9a99fe8..d3a2c8e 100644 --- a/net/transmission/patches/020-use-internal-miniupnp.patch +++ b/net/transmission/patches/020-use-internal-miniupnp.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -378,7 +378,7 @@ dnl See if ANY version of miniupnpc is i +@@ -386,7 +386,7 @@ dnl See if ANY version of miniupnpc is i AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [struct UPNPDev dev;])], diff --git a/net/transmission/patches/030-fix-musl-build.patch b/net/transmission/patches/030-fix-musl-build.patch index 1747402..f03aebc 100644 --- a/net/transmission/patches/030-fix-musl-build.patch +++ b/net/transmission/patches/030-fix-musl-build.patch @@ -1,7 +1,7 @@ --- a/libtransmission/bitfield.c +++ b/libtransmission/bitfield.c -@@ -7,6 +7,8 @@ - * $Id: bitfield.c 14646 2015-12-31 05:22:42Z mikedld $ +@@ -6,6 +6,8 @@ + * */ +#define __NEED_ssize_t @@ -9,7 +9,7 @@ #include #include /* memset */ -@@ -14,6 +16,7 @@ +@@ -13,6 +15,7 @@ #include "bitfield.h" #include "utils.h" /* tr_new0 () */ @@ -19,7 +19,7 @@ /**** --- a/libtransmission/fdlimit.h +++ b/libtransmission/fdlimit.h -@@ -11,6 +11,8 @@ +@@ -10,6 +10,8 @@ #error only libtransmission should #include this header. #endif diff --git a/net/transmission/patches/040-fix-for-mbedtls.patch b/net/transmission/patches/040-fix-for-mbedtls.patch new file mode 100644 index 0000000..c766786 --- /dev/null +++ b/net/transmission/patches/040-fix-for-mbedtls.patch @@ -0,0 +1,29 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -154,24 +154,8 @@ AS_IF([test "x$want_crypto" = "xauto" -o + AS_IF([test "x$want_crypto" = "xauto" -o "x$want_crypto" = "xpolarssl"], [ + PKG_CHECK_MODULES(MBEDTLS, [mbedtls >= $POLARSSL_MINIMUM], + [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS="$MBEDTLS_CFLAGS"; CRYPTO_LIBS="$MBEDTLS_LIBS"; POLARSSL_IS_MBEDTLS=yes], +- [AC_CHECK_HEADER([polarssl/version.h], +- [AC_EGREP_CPP([version_ok], [#include +- #if defined (POLARSSL_VERSION_NUMBER) && POLARSSL_VERSION_NUMBER >= $POLARSSL_MINIMUM +- version_ok +- #endif], +- [AC_CHECK_LIB([polarssl], [dhm_calc_secret], +- [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS=""; CRYPTO_LIBS="-lpolarssl"], +- [AS_IF([test "x$want_crypto" = "xpolarssl"], +- [AC_MSG_ERROR([PolarSSL support requested, but library not found.])] +- )] +- )], +- [AS_IF([test "x$want_crypto" = "xpolarssl"], +- [AC_MSG_ERROR([PolarSSL support requested, but version not suitable.])] +- )] +- )], +- [AS_IF([test "x$want_crypto" = "xpolarssl"], +- [AC_MSG_ERROR([PolarSSL support requested, but headers not found.])] +- )] ++ [AS_IF([test "x$want_crypto" = "xpolarssl"], ++ [AC_MSG_ERROR([PolarSSL support requested, but library not found.])] + )] + ) + ]) diff --git a/net/transmission/patches/050-mask-as-release.patch b/net/transmission/patches/050-mask-as-release.patch new file mode 100644 index 0000000..7f25535 --- /dev/null +++ b/net/transmission/patches/050-mask-as-release.patch @@ -0,0 +1,26 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,8 +42,8 @@ set(TR_NAME ${PROJECT_NAME}) + # "Z" for unsupported trunk builds, + # "0" for stable, supported releases + # these should be the only two lines you need to change +-set(TR_USER_AGENT_PREFIX "2.92+") +-set(TR_PEER_ID_PREFIX "-TR292Z-") ++set(TR_USER_AGENT_PREFIX "2.92") ++set(TR_PEER_ID_PREFIX "-TR2920-") + + string(REGEX MATCH "^([0-9]+)\\.([0-9]+).*" TR_VERSION "${TR_USER_AGENT_PREFIX}") + set(TR_VERSION_MAJOR "${CMAKE_MATCH_1}") +--- a/configure.ac ++++ b/configure.ac +@@ -3,8 +3,8 @@ dnl STATUS: "X" for prerelease beta buil + dnl "Z" for unsupported trunk builds, + dnl "0" for stable, supported releases + dnl these should be the only two lines you need to change +-m4_define([user_agent_prefix],[2.92+]) +-m4_define([peer_id_prefix],[-TR292Z-]) ++m4_define([user_agent_prefix],[2.92]) ++m4_define([peer_id_prefix],[-TR2920-]) + + AC_INIT([transmission],[user_agent_prefix],[https://trac.transmissionbt.com/newticket]) + AC_SUBST(USERAGENT_PREFIX,[user_agent_prefix]) diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index ec41e09..6f2d2a0 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -1,12 +1,12 @@ # -# Copyright (c) 2016 Dirk Brenken (dev@brenken.org) +# Copyright (c) 2016-2017 Dirk Brenken (dev@brenken.org) # This is free software, licensed under the GNU General Public License v3. # include $(TOPDIR)/rules.mk PKG_NAME:=travelmate -PKG_VERSION:=0.2.7 +PKG_VERSION:=0.3.2 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken diff --git a/net/travelmate/files/README.md b/net/travelmate/files/README.md index 2f8084a..4cd39d6 100644 --- a/net/travelmate/files/README.md +++ b/net/travelmate/files/README.md @@ -3,15 +3,15 @@ ## Description If you’re planning an upcoming vacation or a business trip, taking your laptop, tablet or smartphone give you the ability to connect with friends or complete work on the go. But many hotels don’t have a secure wireless network setup or you’re limited on using a single device at once. Investing in a portable, mini travel router is a great way to connect all of your devices at once while having total control over your own personalized wireless network. A logical combination of AP+STA mode on one physical radio allows most of OpenWrt/LEDE supported router devices to connect to a wireless hotspot/station (STA) and provide a wireless access point (AP) from that hotspot at the same time. Downside of this solution: whenever the STA interface looses the connection it will go into an active scan cycle which renders the radio unusable for AP mode operation, therefore the AP is taken down if the STA looses its association. -To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode, connects automatically to available hotspots and monitor & change these uplink connections automatically if required. +To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode and connects automatically to available/configured hotspots. ## Main Features * STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible -* fast uplink connections -* reliable connection tracking * easy setup within normal OpenWrt/LEDE environment -* status & debug logging to syslog +* fast uplink connections * procd init system support +* procd based hotplug support, the travelmate start will be triggered by interface triggers +* status & debug logging to syslog ## Prerequisites * [OpenWrt](https://openwrt.org) or [LEDE](https://www.lede-project.org) trunk @@ -22,7 +22,7 @@ To avoid these kind of deadlocks, travelmate set all station interfaces in an "a * install 'travelmate' (_opkg install travelmate_) * configure your network to support (multiple) wlan uplinks and set travelmate config options (details see below) * set 'trm\_enabled' option in travelmate config to '1' -* travelmate starts automatically during boot, triggered by procd as soon as the wireless subsystem is up & running +* travelmate starts automatically during boot and will be triggered by procd interface triggers ## LuCI travelmate companion package * download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci) @@ -37,14 +37,13 @@ To avoid these kind of deadlocks, travelmate set all station interfaces in an "a * install the packages as described above ## Travelmate config options -* mandatory config options: +* travelmate config options: * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled) - * trm\_loop => loop timeout in seconds for wlan monitoring (default: '30') - * trm\_maxretry => how many times should travelmate try to connect to a certain uplink, to disable this check at all set it to '0' (default: '3') -* optional config options: * trm\_debug => enable/disable debug logging (default: '0', disabled) - * trm\_device => limit travelmate to a dedicated radio, i.e 'radio0' (default: use all radios) + * trm\_maxwait => how long (in seconds) should travelmate wait for wlan interface reload action (default: '20') + * trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3') * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw) + * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: not set, disabled) ## Setup **1. configure a wwan interface in /etc/config/network:** @@ -117,16 +116,6 @@ config wifi-iface /etc/init.d/travelmate start -**Common runtime outputs (visible via logread)** - -**Success:** Sun Oct 9 17:02:21 2016 user.notice root: travelmate-0.2.1[712] info : wlan interface "wwan06" connected to uplink "blackhole.nl" - -**Disabled service:** Sun Oct 9 18:06:32 2016 user.notice root: travelmate-0.2.1[2379] info : travelmate is currently disabled, please set 'trm_enabled' to use this service - -**Misconfigured/broken uplink:** Sun Oct 9 18:56:42 2016 user.notice root: travelmate-0.2.1[2435] info : uplink "blackhole.nl" disabled due to permanent connection failures - -**Uplink disappeared:** Sun Oct 9 19:00:28 2016 user.notice root: travelmate-0.2.1[3876] info : uplink "Neffos C5L" get lost - ## Support Please join the travelmate discussion in this [forum thread](https://forum.openwrt.org/viewtopic.php?id=67697) or contact me by [mail](mailto:dev@brenken.org) diff --git a/net/travelmate/files/travelmate.conf b/net/travelmate/files/travelmate.conf index e413a8c..c63000f 100644 --- a/net/travelmate/files/travelmate.conf +++ b/net/travelmate/files/travelmate.conf @@ -3,5 +3,7 @@ config travelmate 'global' option trm_enabled '0' - option trm_loop '30' + option trm_debug '0' + option trm_maxwait '20' option trm_maxretry '3' + option trm_iw '1' diff --git a/net/travelmate/files/travelmate.init b/net/travelmate/files/travelmate.init index fc3e9ed..255a641 100755 --- a/net/travelmate/files/travelmate.init +++ b/net/travelmate/files/travelmate.init @@ -3,23 +3,37 @@ START=85 USE_PROCD=1 -exec 2>/dev/null trm_script="/usr/bin/travelmate.sh" +boot() +{ + ubus -t 30 wait_for network.interface + rc_procd start_service +} + start_service() { - ubus -t 30 wait_for network.wireless - if [ $(($?)) -eq 0 ] - then - procd_open_instance - procd_set_param command "${trm_script}" - procd_close_instance - else - logger -s "travelmate [procd]:" "no wlan devices found, travelmate startup canceled" - fi + procd_open_instance "travelmate" + procd_set_param env trm_procd="true" + procd_set_param command "${trm_script}" "${@}" + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance } service_triggers() { - procd_add_reload_trigger "travelmate" + local iface="$(uci -q get travelmate.global.trm_iface)" + + if [ -z "${iface}" ] + then + procd_add_raw_trigger "interface.*.down" 1000 /etc/init.d/travelmate start + else + for name in ${iface} + do + procd_add_interface_trigger "interface.*.down" "${name}" /etc/init.d/travelmate start + done + fi + + procd_add_config_trigger "config.change" "travelmate" /etc/init.d/travelmate start } diff --git a/net/travelmate/files/travelmate.sh b/net/travelmate/files/travelmate.sh index fa0d7ae..f626f39 100755 --- a/net/travelmate/files/travelmate.sh +++ b/net/travelmate/files/travelmate.sh @@ -10,144 +10,99 @@ # LC_ALL=C PATH="/usr/sbin:/usr/bin:/sbin:/bin" -trm_pid="${$}" -trm_ver="0.2.7" +trm_ver="0.3.2" +trm_enabled=1 trm_debug=0 -trm_loop=30 +trm_maxwait=20 trm_maxretry=3 trm_iw=1 -trm_device="" -# function to prepare all relevant AP and STA interfaces -# -f_prepare() +f_envload() { - local config="${1}" - local mode="$(uci -q get wireless."${config}".mode)" - local device="$(uci -q get wireless."${config}".device)" - local network="$(uci -q get wireless."${config}".network)" - local disabled="$(uci -q get wireless."${config}".disabled)" - - if [ "${mode}" = "ap" ] && [ -n "${network}" ] && - ([ -z "${trm_device}" ] || [ "${trm_device}" = "${device}" ]) - then - f_ifname "${device}" - if [ -z "${disabled}" ] || [ "${disabled}" = "1" ] - then - f_set "none" "${config}" "${network}" "up" - fi - elif [ "${mode}" = "sta" ] && [ -n "${network}" ] + # source required system libraries + # + if [ -r "/lib/functions.sh" ] then - trm_stalist="${trm_stalist} ${config}_${network}" - if [ -z "${disabled}" ] || [ "${disabled}" = "0" ] - then - f_set "none" "${config}" "${network}" "down" - fi + . "/lib/functions.sh" + else + f_log "error" "status ::: required system library not found" fi -} -# function to set different wlan interface status -# -f_set() -{ - local change="${1}" - local config="${2}" - local interface="${3}" - local command="${4}" - - if [ "${command}" = "up" ] - then - uci -q set wireless."${config}".disabled=0 - ubus call network.interface."${interface}" "${command}" - trm_checklist="${trm_checklist} ${interface}" - elif [ "${command}" = "down" ] + # load uci config and check 'enabled' option + # + option_cb() + { + local option="${1}" + local value="${2}" + eval "${option}=\"${value}\"" + } + config_load travelmate + + if [ ${trm_enabled} -ne 1 ] then - uci -q set wireless."${config}".disabled=1 - ubus call network.interface."${interface}" "${command}" + f_log "info " "status ::: travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service" + exit 0 fi - f_log "debug" "set ::: change: ${change}, config: ${config}, interface: ${interface}, command: ${command}, checklist: ${trm_checklist}, uci-changes: $(uci -q changes wireless)" - if [ -n "$(uci -q changes wireless)" ] + # check for preferred wireless tool + # + if [ ${trm_iw} -eq 1 ] then - if [ "${change}" = "commit" ] - then - uci -q commit wireless - ubus call network reload - f_check - elif [ "${change}" = "partial" ] - then - ubus call network reload - f_check - elif [ "${change}" = "defer" ] - then - uci -q revert wireless - elif [ "${change}" = "revert" ] - then - uci -q revert wireless - ubus call network reload - f_check - fi + trm_scanner="$(which iw)" + else + trm_scanner="$(which iwinfo)" + fi + if [ -z "${trm_scanner}" ] + then + f_log "error" "status ::: no wireless tool for wlan scanning found, please install 'iw' or 'iwinfo'" fi } -# function to get ap ifnames by ubus call +# function to bring down all STA interfaces # -f_ifname() +f_prepare() { - local device="${1}" - local name cfg + local config="${1}" + local mode="$(uci -q get wireless."${config}".mode)" + local network="$(uci -q get wireless."${config}".network)" + local disabled="$(uci -q get wireless."${config}".disabled)" - json_load "$(ubus -S call network.wireless status)" - json_select "${device}" - json_get_keys if_list interfaces - json_select interfaces - for iface in ${if_list} - do - json_select "${iface}" - json_get_var name ifname - json_select "config" - json_get_var cfg mode - if [ -n "${name}" ] && [ "${cfg}" = "ap" ] + if [ "${mode}" = "sta" ] && [ -n "${network}" ] + then + trm_stalist="${trm_stalist} ${config}_${network}" + if [ -z "${disabled}" ] || [ "${disabled}" = "0" ] then - trm_aplist="${trm_aplist} ${name}" + uci -q set wireless."${config}".disabled=1 + f_log "debug" "prepare ::: config: ${config}, interface: ${network}" fi - done + fi } -# function to check interface status on "up" event -# f_check() { - local interface value - local cnt=0 + local ifname cnt=1 mode="${1}" + trm_ifstatus="false" - for interface in ${trm_checklist} + while [ ${cnt} -le ${trm_maxwait} ] do - while [ $((cnt)) -lt 15 ] - do - json_load "$(ubus -S call network.interface."${interface}" status)" - json_get_var trm_status up - if [ "${trm_status}" = "1" ] || [ -n "${trm_uplink}" ] + if [ "${mode}" = "ap" ] + then + trm_ifstatus="$(ubus -S call network.wireless status | jsonfilter -l1 -e '@.*.up')" + else + ifname="$(ubus -S call network.wireless status | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')" + if [ -n "${ifname}" ] then - f_log "debug" "check::: interface: ${interface}, status: ${trm_status}, uplink-cfg: ${trm_uplink}, uplink-ssid: ${trm_ssid}, loop-cnt: ${cnt}, error-cnt: $((trm_count_${trm_config}))" - json_cleanup - break + trm_ifstatus="$(ubus -S call network.interface dump | jsonfilter -e "@.interface[@.device=\"${ifname}\"].up")" fi - cnt=$((cnt+1)) - sleep 1 - done + fi + if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ] + then + break + fi + cnt=$((cnt+1)) + sleep 1 done - if [ -n "${trm_uplink}" ] && [ "${trm_status}" = "0" ] - then - ubus call network reload - eval "trm_count_${trm_uplink}=\$((trm_count_${trm_uplink}+1))" - trm_checklist="" - trm_uplink="" - f_log "info" "uplink ${trm_ssid} get lost" - elif [ -z "${trm_uplink}" ] && [ -n "${trm_checklist}" ] - then - trm_checklist="" - fi + f_log "debug" "check ::: mode: ${mode}, name: ${ifname}, status: ${trm_ifstatus}, count: ${cnt}, max-wait: ${trm_maxwait}" } # function to write to syslog @@ -157,125 +112,93 @@ f_log() local class="${1}" local log_msg="${2}" - if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || ([ "${class}" = "debug" ] && [ $((trm_debug)) -eq 1 ])) + if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ]) then - logger -t "travelmate-${trm_ver}[${trm_pid}] ${class}" "${log_msg}" 2>&1 + logger -t "travelmate-[${trm_ver}] ${class}" "${log_msg}" + if [ "${class}" = "error" ] + then + exit 255 + fi fi } -# source required system libraries -# -if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ] -then - . "/lib/functions.sh" - . "/usr/share/libubox/jshn.sh" - json_init -else - f_log "error" "required system libraries not found" - exit 255 -fi - -# load uci config and check 'enabled' option -# -option_cb() +f_main() { - local option="${1}" - local value="${2}" - eval "${option}=\"${value}\"" -} - -config_load travelmate - -if [ "${trm_enabled}" != "1" ] -then - f_log "info" "travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service" - exit 0 -fi - -# check for preferred wireless tool -# -if [ $((trm_iw)) -eq 1 ] -then - trm_scanner="$(which iw)" -else - trm_scanner="$(which iwinfo)" -fi - -if [ -z "${trm_scanner}" ] -then - f_log "error" "no wireless tool for wlan scanning found, please install 'iw' or 'iwinfo'" - exit 1 -fi + local ap_list ssid_list config network ssid cnt=1 + local sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')" -# infinitive loop to establish and track STA uplink connections -# -while true -do - if [ -z "${trm_uplink}" ] || [ "${trm_status}" = "0" ] + f_check "initial" + if [ "${trm_ifstatus}" != "true" ] then - trm_aplist="" - trm_stalist="" config_load wireless config_foreach f_prepare wifi-iface - f_set "commit" - if [ -z "${trm_aplist}" ] + if [ -n "$(uci -q changes wireless)" ] then - f_log "error" "no usable AP configuration found, please check '/etc/config/wireless'" - exit 1 + uci -q commit wireless + ubus call network reload fi - for ap in ${trm_aplist} + f_check "ap" + ap_list="$(ubus -S call network.wireless status | jsonfilter -e '@.*.interfaces[@.config.mode="ap"].ifname')" + f_log "debug" "main ::: ap-list: ${ap_list}, sta-list: ${trm_stalist}" + if [ -z "${ap_list}" ] || [ -z "${trm_stalist}" ] + then + f_log "error" "status ::: no usable AP/STA configuration found" + fi + for ap in ${ap_list} do - ubus -t 10 wait_for hostapd."${ap}" - if [ $((trm_iw)) -eq 1 ] - then - trm_ssidlist="$(${trm_scanner} dev "${ap}" scan 2>/dev/null | awk '/SSID: /{if(!seen[$0]++){printf "\"";for(i=2; i<=NF; i++)if(i==2)printf $i;else printf " "$i;printf "\" "}}')" - else - trm_ssidlist="$(${trm_scanner} "${ap}" scan | awk '/ESSID: ".*"/{ORS=" ";if (!seen[$0]++) for(i=2; i<=NF; i++) print $i}')" - fi - f_log "debug" "main ::: scan-tool: ${trm_scanner}, aplist: ${trm_aplist}, ssidlist: ${trm_ssidlist}" - if [ -n "${trm_ssidlist}" ] - then - if [ -z "${trm_stalist}" ] + while [ ${cnt} -le ${trm_maxretry} ] + do + if [ ${trm_iw} -eq 1 ] then - f_log "error" "no usable STA configuration found, please check '/etc/config/wireless'" - exit 1 + ssid_list="$(${trm_scanner} dev "${ap}" scan 2>/dev/null | \ + awk '/SSID: /{if(!seen[$0]++){printf "\"";for(i=2; i<=NF; i++)if(i==2)printf $i;else printf " "$i;printf "\" "}}')" + else + ssid_list="$(${trm_scanner} "${ap}" scan | \ + awk '/ESSID: ".*"/{ORS=" ";if (!seen[$0]++) for(i=2; i<=NF; i++) print $i}')" fi - for sta in ${trm_stalist} - do - trm_config="${sta%%_*}" - trm_network="${sta##*_}" - trm_ssid="\"$(uci -q get wireless."${trm_config}".ssid)\"" - if [ $((trm_count_${trm_config})) -lt $((trm_maxretry)) ] || [ $((trm_maxretry)) -eq 0 ] - then - if [ -n "$(printf "${trm_ssidlist}" | grep -Fo "${trm_ssid}")" ] + f_log "debug" "main ::: scan-tool: ${trm_scanner}, ssidlist: ${ssid_list}" + if [ -n "${ssid_list}" ] + then + for sta in ${trm_stalist} + do + config="${sta%%_*}" + network="${sta##*_}" + ssid="\"$(uci -q get wireless."${config}".ssid)\"" + if [ -n "$(printf "${ssid_list}" | grep -Fo "${ssid}")" ] then - f_set "partial" "${trm_config}" "${trm_network}" "up" - if [ "${trm_status}" = "1" ] + uci -q set wireless."${config}".disabled=0 + uci -q commit wireless + ubus call network reload + f_check "sta" + if [ "${trm_ifstatus}" = "true" ] then - trm_checklist="${trm_network}" - trm_uplink="${trm_config}" - f_set "defer" - f_log "info" "wwan interface connected to uplink ${trm_ssid}" - break 2 + f_log "info " "status ::: wwan interface connected to uplink ${ssid} (${cnt}/${trm_maxretry}, ${sysver})" + sleep 5 + return 0 else - f_set "revert" - eval "trm_count_${trm_config}=\$((trm_count_${trm_config}+1))" + uci -q set wireless."${config}".disabled=1 + uci -q commit wireless + ubus call network reload + f_log "info " "status ::: wwan interface can't connect to uplink ${ssid} (${cnt}/${trm_maxretry}, ${sysver})" fi fi - elif [ $((trm_count_${trm_config})) -eq $((trm_maxretry)) ] && [ $((trm_maxretry)) -ne 0 ] - then - eval "trm_count_${trm_config}=\$((trm_count_${trm_config}+1))" - f_log "info" "uplink ${trm_ssid} disabled due to permanent connection failures" - fi - done - fi - sleep 5 + done + else + f_log "info " "status ::: empty uplink list (${cnt}/${trm_maxretry}, ${sysver})" + fi + cnt=$((cnt+1)) + sleep 5 + done done + f_log "info " "status ::: no wwan uplink found (${sysver})" else - f_check - if [ -n "${trm_uplink}" ] - then - sleep ${trm_loop} - fi + f_log "info " "status ::: wwan uplink still connected (${sysver})" fi -done +} + +if [ "${trm_procd}" = "true" ] +then + f_envload + f_main +fi +exit 0 \ No newline at end of file diff --git a/net/umurmur/Makefile b/net/umurmur/Makefile index 2725423..1dc5dc2 100644 --- a/net/umurmur/Makefile +++ b/net/umurmur/Makefile @@ -1,20 +1,20 @@ # -# Copyright (C) 2009-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:=umurmur -PKG_VERSION:=0.2.16 +PKG_VERSION:=0.2.16-20161126 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=git://github.com/umurmur/umurmur.git +PKG_SOURCE_URL:=https://github.com/umurmur/umurmur.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=0.2.16 +PKG_SOURCE_VERSION:=fac630135664fda26338d403041b6b6e558a2d6b +PKG_MIRROR_MD5SUM:=0e031baa5cebcdb4eb39a0cde572014f +PKG_MIRROR_HASH:=6773aebea9aea355a41425e946291bb47bc399f85483bd6532cf26dfc7c801e5 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf @@ -32,8 +32,7 @@ define Package/umurmur/Default SUBMENU:=Instant Messaging TITLE:=uMurmur DEPENDS:=+libconfig +libprotobuf-c - URL:=http://code.google.com/p/umurmur - MAINTAINER:=Martin Johansson + URL:=http://umurmur.net endef define Package/umurmur/Default/description @@ -52,16 +51,16 @@ define Package/umurmur-openssl/description Uses OpenSSL library for SSL and crypto. endef -define Package/umurmur-polarssl +define Package/umurmur-mbedtls $(call Package/umurmur/Default) - TITLE+= (with PolarSSL support) - DEPENDS+= +libpolarssl - VARIANT:=polarssl + TITLE+= (with mbed TLS support) + DEPENDS+= +libmbedtls + VARIANT:=mbedtls endef -define Package/umurmur-polarssl/description +define Package/umurmur-mbedtls/description $(call Package/umurmur/Default/description) - Uses the PolarSSL library for SSL and crypto. + Uses the mbed TLS library for SSL and crypto. endef define Build/Compile @@ -75,7 +74,7 @@ define Package/umurmur-openssl/conffiles /etc/umurmur.conf endef -Package/umurmur-polarssl/conffiles = $(Package/umurmur-openssl/conffiles) +Package/umurmur-mbedtls/conffiles = $(Package/umurmur-openssl/conffiles) define Package/umurmur-openssl/install $(INSTALL_DIR) $(1)/usr/bin @@ -87,17 +86,17 @@ define Package/umurmur-openssl/install $(INSTALL_DIR) $(1)/etc/umurmur endef -Package/umurmur-polarssl/install = $(Package/umurmur-openssl/install) +Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install) ifeq ($(BUILD_VARIANT),openssl) CONFIGURE_ARGS += \ --with-ssl=openssl endif -ifeq ($(BUILD_VARIANT),polarssl) +ifeq ($(BUILD_VARIANT),mbedtls) CONFIGURE_ARGS += \ - --with-ssl=polarssl + --with-ssl=mbedtls endif $(eval $(call BuildPackage,umurmur-openssl)) -$(eval $(call BuildPackage,umurmur-polarssl)) +$(eval $(call BuildPackage,umurmur-mbedtls)) diff --git a/net/umurmur/patches/010-mbedtls_fix_includes.patch b/net/umurmur/patches/010-mbedtls_fix_includes.patch new file mode 100644 index 0000000..619517f --- /dev/null +++ b/net/umurmur/patches/010-mbedtls_fix_includes.patch @@ -0,0 +1,11 @@ +--- a/src/ssl.h ++++ b/src/ssl.h +@@ -90,7 +90,7 @@ typedef ssl_context SSL_handle_t; + + #elif defined(USE_MBEDTLS) + #include +-#include ++#include + #include + + #if defined(MBEDTLS_VERSION_MAJOR) diff --git a/net/umurmur/patches/10-Add-compile-time-check-for-POLARSSL_VERSION_FEATURES.patch b/net/umurmur/patches/10-Add-compile-time-check-for-POLARSSL_VERSION_FEATURES.patch deleted file mode 100644 index c8fcdc8..0000000 --- a/net/umurmur/patches/10-Add-compile-time-check-for-POLARSSL_VERSION_FEATURES.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/ssli_polarssl.c b/src/ssli_polarssl.c -index a36ccb6..167637b 100644 ---- a/src/ssli_polarssl.c -+++ b/src/ssli_polarssl.c -@@ -225,8 +225,12 @@ void SSLi_init(void) - Log_fatal("Cannot open /dev/urandom"); - #endif - -+#ifdef POLARSSL_VERSION_FEATURES - version_get_string(verstring); - Log_info("PolarSSL library version %s initialized", verstring); -+#else -+ Log_info("PolarSSL library initialized"); -+#endif - } - - void SSLi_deinit(void) diff --git a/net/unbound/Makefile b/net/unbound/Makefile index 17f3065..d8db017 100644 --- a/net/unbound/Makefile +++ b/net/unbound/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unbound -PKG_VERSION:=1.5.10 -PKG_RELEASE:=5 +PKG_VERSION:=1.6.1 +PKG_RELEASE:=6 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE @@ -17,7 +17,7 @@ PKG_MAINTAINER:=Eric Luehrsen PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.unbound.net/downloads -PKG_MD5SUM:=0a3a236811f1ab5c1dc31974fa74e047 +PKG_HASH:=42df63f743c0fe8424aeafcf003ad4b880b46c14149d696057313f5c1ef51400 PKG_BUILD_DEPENDS:=libexpat PKG_BUILD_PARALLEL:=1 @@ -27,7 +27,7 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/unbound/Default - TITLE:=Unbound is a validating, recursive, and caching DNS resolver. + TITLE:=Validating Recursive DNS Server URL:=http://www.unbound.net/ DEPENDS:=+libopenssl endef @@ -51,7 +51,7 @@ define Package/unbound-anchor SECTION:=net CATEGORY:=Network SUBMENU:=IP Addresses and Names - TITLE+= (anchor utility) + TITLE+= (DSKEY utility) DEPENDS+= +unbound +libexpat endef @@ -77,7 +77,7 @@ define Package/unbound-control-setup SECTION:=net CATEGORY:=Network SUBMENU:=IP Addresses and Names - TITLE+= (control setup utility) + TITLE+= (control setup) DEPENDS+= +unbound-control +openssl-util endef @@ -90,7 +90,7 @@ define Package/unbound-host SECTION:=net CATEGORY:=Network SUBMENU:=IP Addresses and Names - TITLE+= (DNS lookup utility) + TITLE+= (lookup utility) DEPENDS+= +libunbound endef @@ -122,6 +122,8 @@ CONFIGURE_ARGS += \ define Package/unbound/conffiles /etc/config/unbound /etc/unbound/unbound.conf +/etc/unbound/unbound_ext.conf +/etc/unbound/unbound_srv.conf endef define Build/InstallDev @@ -142,15 +144,17 @@ define Package/unbound/install $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \ $(1)/etc/unbound/unbound.conf $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key + $(INSTALL_DATA) ./files/unbound_ext.conf $(1)/etc/unbound/unbound_ext.conf + $(INSTALL_DATA) ./files/unbound_srv.conf $(1)/etc/unbound/unbound_srv.conf $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/unbound.iface $(1)/etc/hotplug.d/iface/25-unbound $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp - $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound + $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound + $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound $(INSTALL_DIR) $(1)/usr/lib/unbound + $(INSTALL_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh + $(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk $(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh $(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh $(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh @@ -188,3 +192,4 @@ $(eval $(call BuildPackage,unbound-control)) $(eval $(call BuildPackage,unbound-control-setup)) $(eval $(call BuildPackage,unbound-host)) $(eval $(call BuildPackage,libunbound)) + diff --git a/net/unbound/files/README.md b/net/unbound/files/README.md index a66ac74..d8bdf95 100644 --- a/net/unbound/files/README.md +++ b/net/unbound/files/README.md @@ -1,128 +1,279 @@ # Unbound Recursive DNS Server with UCI ## Unbound Description -Unbound is a validating, recursive, and caching DNS resolver. The C implementation of Unbound is developed and maintained by [NLnet Labs](https://www.unbound.net/). It is based on ideas and algorithms taken from a java prototype developed by Verisign labs, Nominet, Kirei and ep.net. Unbound is designed as a set of modular components, so that also DNSSEC (secure DNS) validation and stub-resolvers (that do not run as a server, but are linked into an application) are easily possible. +[Unbound](https://www.unbound.net/) is a validating, recursive, and caching DNS resolver. The C implementation of Unbound is developed and maintained by [NLnet Labs](https://www.nlnetlabs.nl/). It is based on ideas and algorithms taken from a java prototype developed by Verisign labs, Nominet, Kirei and ep.net. Unbound is designed as a set of modular components, so that also DNSSEC (secure DNS) validation and stub-resolvers (that do not run as a server, but are linked into an application) are easily possible. ## Package Overview -Unbound may be useful on consumer grade embedded hardware. It is *intended* to be a recursive resolver only. [NLnet Labs NSD](https://www.nlnetlabs.nl/projects/nsd/) is *intended* for the authoritative task. This is different than [ISC Bind](https://www.isc.org/downloads/bind/) and its inclusive functions. Unbound configuration effort and memory consumption may be easier to control. A consumer could have their own recursive resolver, and remove potential issues from forwarding resolvers outside of their control. +Unbound may be useful on consumer grade embedded hardware. It is _intended_ to be a recursive resolver only. [NLnet Labs NSD](https://www.nlnetlabs.nl/projects/nsd/) is _intended_ for the authoritative task. This is different than [ISC Bind](https://www.isc.org/downloads/bind/) and its inclusive functions. Unbound configuration effort and memory consumption may be easier to control. A consumer could have their own recursive resolver with 8/64 MB router, and remove potential issues from forwarding resolvers outside of their control. This package builds on Unbounds capabilities with OpenWrt UCI. Not every Unbound option is in UCI, but rather, UCI simplifies the combination of related options. Unbounds native options are bundled and balanced within a smaller set of choices. Options include resources, DNSSEC, access control, and some TTL tweaking. The UCI also provides an escape option and work at the raw "unbound.conf" level. -## Work with dnsmasq -Some UCI options will help Unbound and dnsmasq work together in **parallel**. The default DHCP and DNS stub resolver in OpenWrt is dnsmasq, and it will continue to serve this purpose. The following actions will make Unbound the primary DNS server, and make dnsmasq only provide DNS to local DHCP. +## HOW TO Adblocking +The UCI scripts will work with [net/adblock 2.3+](https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md), if it is installed and enabled. Its all detected and integrated automatically. In brief, the adblock scripts create distinct local-zone files that are simply included in the unbound conf file during UCI generation. If you don't want this, then disable adblock or reconfigure adblock to not send these files to Unbound. -- Set `unbound` UCI `option dnsmasq_link_dns` to true. -- Set other `unbound` UCI options how you wish. -- Set `dnsmasq` UCI `option noresolv` to true. -- Set `dnsmasq` UCI `option resolvfile` to blank single-quotes. -- Set `dnsmasq` UCI `option port` to 1053 or 5353. -- Add to each `dhcp` UCI `list dhcp_option option:dns-server,0.0.0.0` +## HOW TO Integrate with DHCP +Some UCI options and scripts help Unbound to work with DHCP servers to load the local DNS. The examples provided here are serial dnsmasq-unbound, parallel dnsmasq-unbound, and unbound scripted with odhcpd. -Alternatives are mentioned here for completeness. DHCP event scripts which write host records are difficult to formulate for Unbound, NSD, or Bind. These programs sometimes need to be forcefully reloaded with host configuration, and reloads can bust cache. **Serial** configuration between dnsmasq and Unbound can be made on 127.0.0.1 with an off-port like #1053. This may double cache storage and incur unnecessary transfer delay. +### Serial dnsmasq +In this case, dnsmasq is not changed *much* with respect to the default OpenWRT/LEDE configuration. Here dnsmasq is forced to use the local Unbound instance as the lone upstream DNS server, instead of your ISP. This may be the easiest implementation, but performance degradation can occur in high volume networks. dnsmasq and Unbound effectively have the same information in memory, and all transfers are double handled. -## Back to Manual Configuration -You don't want UCI, but don't worry. We have UCI for that. However, OpenWrt or LEDE are targeted at embedded machines with flash ROM. The initialization scripts do a few things to protect flash ROM. +**/etc/config/unbound**: + +``` +config unbound + option add_local_fqdn '0' + option add_wan_fqdn '0' + option dhcp_link 'none' + # dnsmasq should not forward your domain to unbound, but if... + option domain 'yourdomain' + option domain_type 'refuse' + option listen_port '1053' + ... +``` + +**/etc/config/dhcp**: + +``` +config dnsmasq + option domain 'yourdomain' + option noresolv '1' + option resolvfile '/tmp/resolv.conf.auto' + option port '53' + list server '127.0.0.1#1053' + list server '::1#1053' + ... +``` + +### Parallel dnsmasq +In this case, Unbound serves your local network directly for all purposes. It will look over to dnsmasq for DHCP-DNS resolution. Unbound is generally accessible on port 53, and dnsmasq is only accessed at 127.0.0.1:1053 by Unbound. Although you can dig/drill/nslookup remotely with the proper directives. + +**/etc/config/unbound**: + +``` +config unbound + option dhcp_link 'dnsmasq' + option listen_port '53' + ... +``` + +**/etc/config/dhcp**: + +``` +config dnsmasq + option domain 'yourdomain' + option noresolv '1' + option resolvfile '/tmp/resolv.conf.auto' + option port '1053' + ... + +config dhcp 'lan' + # dnsmasq may not issue DNS option if not std. configuration + list dhcp_option 'option:dns-server,0.0.0.0' + ... +``` + +### Unbound and odhcpd +You may ask can Unbound replace dnsmasq? You can have DHCP-DNS records with Unbound and odhcpd only. The UCI scripts will allow Unbound to act like dnsmasq. When odhcpd configures each DHCP lease, it will call a script. The script provided with Unbound will read the lease file for DHCP-DNS records. You **must install** `unbound-control`, because the lease records are added and removed without starting, stopping, flushing cache, or re-writing conf files. (_restart overhead can be excessive with even a few mobile devices._) + +Don't forget to disable or uninstall dnsmasq when you don't intend to use it. Strange results may occur. If you want to use default dnsmasq+odhcpd and add Unbound on top, then use the dnsmasq-serial or dnsmasq-parallel methods above. -All of `/etc/unbound` (persistent, ROM) is copied to `/var/lib/unbound` (tmpfs, RAM). Edit your manual `/etc/unbound/unbound.conf` to reference this `/var/lib/unbound` location for included files. Note in preparation for a jail, `/var/lib/unbound` is `chown unbound`. Configure for security in`/etc/unbound/unbound.conf` with options `username:unbound` and `chroot:/var/lib/unbound`. +**/etc/config/unbound**: + +``` +config unbound + # name your router in DNS + option add_local_fqdn '1' + option add_wan_fqdn '1' + option dhcp_link 'odhcpd' + # add SLAAC inferred from DHCPv4 + option dhcp4_slaac6 '1' + option domain 'lan' + option domain_type 'static' + option listen_port '53' + option rebind_protection '1' + # install unbound-control and set this + option unbound_control '1' + ... +``` + +**/etc/config/dhcp**: + +``` +config dhcp 'lan' + option dhcpv4 'server' + option dhcpv6 'server' + option interface 'lan' + option leasetime '12h' + option ra 'server' + option ra_management '1' + # issue your ULA and avoid default [fe80::] + list dns 'fdxx:xxxx:xxxx::1' + ... -Finally, `root.key` maintenance for DNSKEY RFC5011 would be hard on flash. Unbound natively updates frequently. It also creates and destroys working files in the process. In `/var/lib/unbound` this is no problem, but it would be gone at the next reboot. If you have DNSSEC (validator) active, then you should consider this UCI option. Choose how many days to copy from `/var/lib/unbound/root.key` (tmpfs) to `/etc/unbound/root.key` (flash). Keep the DNSKEY updated with your choice of flash activity. +config odhcpd 'odhcpd' + option maindhcp '1' + option leasefile '/var/lib/odhcpd/dhcp.leases' + # this is where the magic happens + option leasetrigger '/usr/lib/unbound/odhcpd.sh' +``` - config unbound - option manual_conf '1' - option root_age '30' +## HOW TO Manual Override +Yes, there is a UCI to disable the rest of Unbound UCI. However, OpenWrt or LEDE are targeted at embedded machines with flash ROM. The initialization scripts do a few things to protect flash ROM. + +### Completely Manual (almost) +All of `/etc/unbound` (persistent, ROM) is copied to `/var/lib/unbound` (tmpfs, RAM). Edit your manual `/etc/unbound/unbound.conf` to reference this `/var/lib/unbound` location for included files. Note in preparation for a jail, `/var/lib/unbound` is `chown unbound`. Configure for security in`/etc/unbound/unbound.conf` with options `username:unbound` and `chroot:/var/lib/unbound`. + +Keep the DNSKEY updated with your choice of flash activity. `root.key` maintenance for DNSKEY RFC5011 would be hard on flash. Unbound natively updates frequently. It also creates and destroys working files in the process. In `/var/lib/unbound` this is no problem, but it would be gone at the next reboot. If you have DNSSEC (validator) active, then you should consider the age UCI option. Choose how many days to copy from `/var/lib/unbound/root.key` (tmpfs) to `/etc/unbound/root.key` (flash). + +**/etc/config/unbound**: + +``` +config unbound + option manual_conf '1' + option root_age '9' + # end +``` + +### Hybrid Manual/UCI +You like the UCI. Yet, you need to add some difficult to standardize options, or just are not ready to make a UCI request yet. The files `/etc/unbound/unbound_srv.conf` and `/etc/unbound/unbound_ext.conf` will be copied to Unbounds chroot directory and included during auto generation. + +The former will be added to the end of the `server:` clause. The later will be added to the end of the file for extended `forward:` and `view:` clauses. You can also disable unbound-control in the UCI which only allows "localhost" connections unencrypted, and then add an encrypted remote `control:` clause. ## Complete List of UCI Options **/etc/config/unbound**: - config unbound - Currently only one instance is supported. - - option dnsmasq_gate_name '0' - Boolean. Forward PTR records for interfaces not serving DHCP. - Assume these are WAN. Example dnsmasq option here to provide - logs with a name when your ISP won't link DHCP-DNS. - "dnsmasq.conf: interface-name=way-out.myrouter.lan,eth0.1" - - option dnsmasq_link_dns '0' - Boolean. Master link to dnsmasq. Parse /etc/config/dhcp for dnsmasq - options. Forward domain such as "lan" and PTR records for DHCP - interfaces and their deligated subnets, IP4 and IP6. - - option dnsmasq_only_local '0' - TODO: not yet implemented - Boolean. Restrict link to dnsmasq. DNS only to local host. Obscure - names of other connected hosts on the network. Example: - "drill -x 198.51.100.17 ~ IN PTR way-out.myrouter.lan" - "drill -x 192.168.10.1 ~ IN PTR guest-wifi.myrouter.lan" - "drill -x 192.168.10.201 ~ NODATA" (insted of james-laptop.lan) - - option edns_size '1280' - Extended DNS is necessary for DNSSEC. However, it can run into MTU - issues. Use this size in bytes to manage drop outs. - - option listen_port '53' - Port. Incoming. Where Unbound will listen for queries. - - option localservice '1' - Boolean. Prevent DNS amplification attacks. Only provide access to - Unbound from subnets this machine has interfaces on. - - option manual_conf '0' - Boolean. Skip all this UCI nonsense. Manually edit the - configuration. Make changes to /etc/unbound/unbound.conf. - - option query_minimize '0' - Boolean. Enable a minor privacy option. Query only one name piece - at a time. Don't let each server know the next recursion. - - option rebind_localhost '0' - Boolean. Prevent loopback "127.0.0.0/8" or "::1/128" responses. - These may used by black hole servers for good purposes like - ad-blocking or parental access control. Obviously these responses - also can be used to for bad purposes. - - option rebind_protection '1' - Boolean. Prevent RFC 1918 Reponses from global DNS. Example a - poisoned reponse within "192.168.0.0/24" could be used to turn a - local browser into an external attack proxy server. - - option recursion 'passive' - Unbound has numerous options for how it recurses. This UCI combines - them into "passive," "aggressive," or Unbound's own "default." - Passive is easy on resources, but slower until cache fills. - - option resource 'small' - Unbound has numerous options for resources. This UCI gives "tiny," - "small," "medium," and "large." Medium is most like the compiled - defaults with a bit of balancing. Tiny is close to the published - memory restricted configuration. Small 1/2 medium, and large 2x. - - option root_age '30' - Days. >90 Disables. Age limit for Unbound root data like root - DNSSEC key. Unbound uses RFC 5011 to manage root key. This could - harm flash ROM. This activity is mapped to "tmpfs," but every so - often it needs to be copied back to flash for the next reboot. - - option ttl_min '120' - Seconds. Minimum TTL in cache. Recursion can be expensive without - cache. A low TTL is normal for server migration. A low TTL can be - abused for snoop-vertising (DNS hit counts; recording query IP). - Typical to configure maybe 0~300, but 1800 is the maximum accepted. - - option unbound_control '0' - Boolean. Enables unbound-control application access ports. Enabling - this without the unbound-control package installed is robust. - - option validator '0' - Boolean. Enable DNSSEC. Unbound names this the "validator" module. - - option validator_ntp '1' - Boolean. Disable DNSSEC time checks at boot. Once NTP confirms - global real time, then DNSSEC is restarted at full strength. Many - embedded devices don't have a real time power off clock. NTP needs - DNS to resolve servers. This works around the chicken-and-egg. - - list domain_insecure - List. Domains or pointers that you wish to skip DNSSEC. Your DHCP - domains and pointers in dnsmasq will get this automatically. +``` +config unbound + Currently only one instance is supported. + + option add_local_fqdn '0' + Level. This puts your routers host name in the LAN (local) DNS. + Each level is more detailed and comprehensive. + 0 - Disabled + 1 - Host Name on only the primary address + 2 - Host Name on all addresses found (except link) + 3 - FQDN and host name on all addresses (except link) + 4 - Above and interfaces named .. + + option add_wan_fqdn '0' + Level. Same as previous option only this applies to the WAN. WAN + are inferred by a UCI `config dhcp` entry that contains the line + option ignore '1'. + + option dns64 '0' + Boolean. Enable DNS64 through Unbound in order to bridge networks + that are IPV6 only and IPV4 only (see RFC6052). + + option dns64_prefix '64:ff9b::/96' + IPV6 Prefix. The IPV6 prefix wrapped on the IPV4 address for DNS64. + You should use RFC6052 "well known" address, unless you also + redirect to a proxy or gateway for your NAT64. + + option dhcp_link 'none' + Program Name. Link to one of the supported programs we have scripts + for. You may also need to install a trigger script in the DHCP + servers configuration. See HOW TO above. + + option dhcp4_slaac6 '0' + Boolean. Some DHCP servers do this natively (dnsmasq). Otherwise + the script provided with this package will try to fabricate SLAAC + IP6 addresses from DHCPv4 MAC records. + + option domain 'lan' + Unbound local-zone: . This is used to suffix all + host records, and maintain a local zone. When dnsmasq is dhcp_link + however, then this option is ignored (dnsmasq does it all). + + option domain_type 'static' + Unbound local-zone: . This allows you to lock + down or allow forwarding of your domain, your router host name + without suffix, and leakage of RFC6762 "local." + + option edns_size '1280' + Bytes. Extended DNS is necessary for DNSSEC. However, it can run + into MTU issues. Use this size in bytes to manage drop outs. + + option hide_binddata '1' + Boolean. If enabled version.server, version.bind, id.server, and + hostname.bind queries are refused. + + option listen_port '53' + Port. Incoming. Where Unbound will listen for queries. + + option localservice '1' + Boolean. Prevent DNS amplification attacks. Only provide access to + Unbound from subnets this machine has interfaces on. + + option manual_conf '0' + Boolean. Skip all this UCI nonsense. Manually edit the + configuration. Make changes to /etc/unbound/unbound.conf. + + option protocol 'mixed' + Unbound can limit its protocol used for recursive queries. + Set 'ip4_only' to avoid issues if you do not have native IP6. + Set 'ip6_prefer' to possibly improve performance as well as + not consume NAT paths for the client computers. + Do not use 'ip6_only' unless testing. + + option query_minimize '0' + Boolean. Enable a minor privacy option. Don't let each server know + the next recursion. Query one piece at a time. + + option query_min_strict '0' + Boolean. Query minimize is best effort and will fall back to normal + when it must. This option prevents the fall back, but less than + standard name servers will fail to resolve their domains. + + option rebind_localhost '0' + Boolean. Prevent loopback "127.0.0.0/8" or "::1/128" responses. + These may used by black hole servers for good purposes like + ad-blocking or parental access control. Obviously these responses + also can be used to for bad purposes. + + option rebind_protection '1' + Boolean. Prevent RFC 1918 Reponses from global DNS. Example a + poisoned reponse within "192.168.0.0/24" could be used to turn a + local browser into an external attack proxy server. + + option recursion 'passive' + Unbound has numerous options for how it recurses. This UCI combines + them into "passive," "aggressive," or Unbound's own "default." + Passive is easy on resources, but slower until cache fills. + + option resource 'small' + Unbound has numerous options for resources. This UCI gives "tiny," + "small," "medium," and "large." Medium is most like the compiled + defaults with a bit of balancing. Tiny is close to the published + memory restricted configuration. Small 1/2 medium, and large 2x. + + option root_age '9' + Days. >90 Disables. Age limit for Unbound root data like root + DNSSEC key. Unbound uses RFC 5011 to manage root key. This could + harm flash ROM. This activity is mapped to "tmpfs," but every so + often it needs to be copied back to flash for the next reboot. + + option ttl_min '120' + Seconds. Minimum TTL in cache. Recursion can be expensive without + cache. A low TTL is normal for server migration. A low TTL can be + abused for snoop-vertising (DNS hit counts; recording query IP). + Typical to configure maybe 0~300, but 1800 is the maximum accepted. + + option unbound_control '0' + Boolean. Enables unbound-control application access ports. Enabling + this without the unbound-control package installed is robust. + + option validator '0' + Boolean. Enable DNSSEC. Unbound names this the "validator" module. + + option validator_ntp '1' + Boolean. Disable DNSSEC time checks at boot. Once NTP confirms + global real time, then DNSSEC is restarted at full strength. Many + embedded devices don't have a real time power off clock. NTP needs + DNS to resolve servers. This works around the chicken-and-egg. + + list domain_insecure + List. Domains or pointers that you wish to skip DNSSEC. Your DHCP + domains and pointers in dnsmasq will get this automatically. +``` + diff --git a/net/unbound/files/dnsmasq.sh b/net/unbound/files/dnsmasq.sh index f9eec7d..0792086 100644 --- a/net/unbound/files/dnsmasq.sh +++ b/net/unbound/files/dnsmasq.sh @@ -23,12 +23,19 @@ # ############################################################################## -create_local_zone() { +dnsmasq_local_zone() { local cfg="$1" - local fwd_port fwd_domain + local fwd_port fwd_domain wan_fqdn + # dnsmasq domain and interface assignment settings will control config config_get fwd_domain "$cfg" domain - config_get fwd_port "$cfg" port + config_get fwd_port "$cfg" port + config_get wan_fqdn "$cfg" add_wan_fqdn + + + if [ -n "$wan_fqdn" ] ; then + UNBOUND_D_WAN_FQDN=$wan_fqdn + fi if [ -n "$fwd_domain" -a -n "$fwd_port" -a ! "$fwd_port" -eq 53 ] ; then @@ -48,7 +55,7 @@ create_local_zone() { ############################################################################## -create_local_arpa() { +dnsmasq_local_arpa() { local cfg="$1" local logint dhcpv4 dhcpv6 ignore local subnets subnets4 subnets6 @@ -78,7 +85,7 @@ create_local_arpa() { forward="" elif [ "$ignore" -gt 0 ] ; then - if [ "$UNBOUND_B_GATE_NAME" -gt 0 ] ; then + if [ "$UNBOUND_D_WAN_FQDN" -gt 0 ] ; then # Only forward the one gateway host. forward="host" @@ -137,11 +144,11 @@ create_local_arpa() { ############################################################################## -forward_local_zone() { +dnsmasq_forward_zone() { if [ -n "$UNBOUND_N_FWD_PORTS" -a -n "$UNBOUND_TXT_FWD_ZONE" ] ; then for fwd_domain in $UNBOUND_TXT_FWD_ZONE ; do { - # This is derived of create_local_zone/arpa + # This is derived of dnsmasq_local_zone/arpa # but forward: clauses need to be seperate echo "forward-zone:" echo " name: \"$fwd_domain.\"" @@ -159,23 +166,16 @@ forward_local_zone() { ############################################################################## dnsmasq_link() { - #################### - # UCI @ dhcp # - #################### - - - if [ "$UNBOUND_B_DNSMASQ" -gt 0 ] ; then - # Forward to dnsmasq on same host for DHCP lease hosts - echo " do-not-query-localhost: no" >> $UNBOUND_CONFFILE - # Look at dnsmasq settings - config_load dhcp - # Zone for DHCP / SLAAC-PING DOMAIN - config_foreach create_local_zone dnsmasq - # Zone for DHCP / SLAAC-PING ARPA - config_foreach create_local_arpa dhcp - # Now create ALL seperate forward: clauses - forward_local_zone - fi + # Forward to dnsmasq on same host for DHCP lease hosts + echo " do-not-query-localhost: no" >> $UNBOUND_CONFFILE + # Look at dnsmasq settings + config_load dhcp + # Zone for DHCP / SLAAC-PING DOMAIN + config_foreach dnsmasq_local_zone dnsmasq + # Zone for DHCP / SLAAC-PING ARPA + config_foreach dnsmasq_local_arpa dhcp + # Now create ALL seperate forward: clauses + dnsmasq_forward_zone } ############################################################################## diff --git a/net/unbound/files/odhcpd.awk b/net/unbound/files/odhcpd.awk new file mode 100644 index 0000000..1609508 --- /dev/null +++ b/net/unbound/files/odhcpd.awk @@ -0,0 +1,207 @@ +#!/usr/bin/awk +############################################################################## +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# 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. +# +# Copyright (C) 2016 Eric Luehrsen +# +############################################################################## +# +# Turn DHCP records into meaningful A, AAAA, and PTR records. Also lift a +# function from dnsmasq and use DHCPv4 MAC to find IPV6 SLAAC hosts. +# +# External Parameters +# "hostfile" = where this script will cache host DNS data +# "domain" = text domain suffix +# "bslaac" = boolean, use DHCPv4 MAC to find GA and ULA IPV6 SLAAC +# "bisolt" = boolean, format ... so you can isolate +# "bconf" = boolean, write conf file format rather than pipe records +# +############################################################################## + +/^#/ { + # We need to pick out DHCP v4 or v6 records + net = $2 ; id = $3 ; cls = $4 ; hst = $5 ; adr = $9 ; adr2 = $10 + cdr = adr ; + cdr2 = adr2 ; + sub( /\/.*/, "", adr ) ; + sub( /.*\//, "", cdr ) ; + sub( /\/.*/, "", adr2 ) ; + sub( /.*\//, "", cdr2 ) ; + + + if ( bisolt == 1 ) { + # TODO: this might be better with a substituion option, + # or per DHCP pool do-not-DNS option, but its getting busy here. + fqdn = net + fqdn = sub( /\./, "-", fqdn ) ; + fqdn = tolower( hst "." fqdn "." domain ) ; + } + + else { + fqdn = tolower( hst "." domain ) ; + } + + + if ( cls == "ipv4" ) { + if ( NF == 8 ) { + # odhcpd errata in field format without host name + adr = $8 ; hst = "-" ; cdr = adr ; + sub( /\/.*/, "", adr ) ; + sub( /.*\//, "", cdr ) ; + } + + + if (( cdr == 32 ) && ( hst != "-" )) { + # only for provided hostnames and full /32 assignments + ptr = adr ; qpr = "" ; split( ptr, ptr, "." ) ; + slaac = slaac_eui64( id ) ; + + + if ( bconf == 1 ) { + x = ( "local-data: \"" fqdn ". 120 IN A " adr "\"" ) ; + y = ( "local-data-ptr: \"" adr " 120 " fqdn "\"" ) ; + print ( x "\n" y ) > hostfile ; + } + + else { + for( i=1; i<=4; i++ ) { qpr = ( ptr[i] "." qpr) ; } + x = ( fqdn ". 120 IN A " adr ) ; + y = ( qpr "in-addr.arpa. 120 IN PTR " fqdn ) ; + print ( x "\n" y ) > hostfile ; + } + + + if (( bslaac == 1 ) && ( slaac != 0 )) { + # UCI option to discover IPV6 routed SLAAC addresses + # NOT TODO - ping probe take too long when added in awk-rule loop + cmd = ( "ip -6 --oneline route show dev " net ) ; + + + while ( ( cmd | getline adr ) > 0 ) { + if (( substr( adr, 1, 5 ) <= "fd00:" ) \ + && ( index( adr, "via" ) == 0 )) { + # GA or ULA routed addresses only (not LL or MC) + sub( /\/.*/, "", adr ) ; + adr = ( adr slaac ) ; + + + if ( split( adr, tmp0, ":" ) >= 8 ) { + sub( "::", ":", adr ) ; + } + + + if ( bconf == 1 ) { + x = ( "local-data: \"" fqdn ". 120 IN AAAA " adr "\"" ) ; + y = ( "local-data-ptr: \"" adr " 120 " fqdn "\"" ) ; + print ( x "\n" y ) > hostfile ; + } + + else { + qpr = ipv6_ptr( adr ) ; + x = ( fqdn ". 120 IN AAAA " adr ) ; + y = ( qpr ". 120 IN PTR " fqdn ) ; + print ( x "\n" y ) > hostfile ; + } + } + } + + + close( cmd ) ; + } + } + } + + else { + if (( cdr == 128 ) && ( hst != "-" )) { + if ( bconf == 1 ) { + x = ( "local-data: \"" fqdn ". 120 IN AAAA " adr "\"" ) ; + y = ( "local-data-ptr: \"" adr " 120 " fqdn "\"" ) ; + print ( x "\n" y ) > hostfile ; + } + + else { + # only for provided hostnames and full /128 assignments + qpr = ipv6_ptr( adr ) ; + x = ( fqdn ". 120 IN AAAA " adr ) ; + y = ( qpr ". 120 IN PTR " fqdn ) ; + print ( x "\n" y ) > hostfile ; + } + } + + if (( cdr2 == 128 ) && ( hst != "-" )) { + if ( bconf == 1 ) { + x = ( "local-data: \"" fqdn ". 120 IN AAAA " adr2 "\"" ) ; + y = ( "local-data-ptr: \"" adr2 " 120 " fqdn "\"" ) ; + print ( x "\n" y ) > hostfile ; + } + + else { + # odhcp puts GA and ULA on the same line (position 9 and 10) + qpr2 = ipv6_ptr( adr2 ) ; + x = ( fqdn ". 120 IN AAAA " adr2 ) ; + y = ( qpr2 ". 120 IN PTR " fqdn ) ; + print ( x "\n" y ) > hostfile ; + } + } + } +} + +############################################################################## + +function ipv6_ptr( ipv6, arpa, ary, end, i, j, new6, sz, start ) { + # IPV6 colon flexibility is a challenge when creating [ptr].ip6.arpa. + sz = split( ipv6, ary, ":" ) ; end = 9 - sz ; + + + for( i=1; i<=sz; i++ ) { + if( length(ary[i]) == 0 ) { + for( j=1; j<=end; j++ ) { ary[i] = ( ary[i] "0000" ) ; } + } + + else { + ary[i] = substr( ( "0000" ary[i] ), length( ary[i] )+5-4 ) ; + } + } + + + new6 = ary[1] ; + for( i = 2; i <= sz; i++ ) { new6 = ( new6 ary[i] ) ; } + start = length( new6 ) ; + for( i=start; i>0; i-- ) { arpa = ( arpa substr( new6, i, 1 ) ) ; } ; + gsub( /./, "&\.", arpa ) ; arpa = ( arpa "ip6.arpa" ) ; + + return arpa ; +} + +############################################################################## + +function slaac_eui64( mac, ary, glbit, eui64 ) { + if ( length(mac) >= 12 ) { + # RFC2373 and use DHCPv4 registered MAC to find SLAAC addresses + split( mac , ary , "" ) ; + glbit = ( "0x" ary[2] ) ; + glbit = sprintf( "%d", glbit ) ; + glbit = or( glbit, 2 ) ; + ary[2] = sprintf( "%x", glbit ) ; + eui64 = ( ary[1] ary[2] ary[3] ary[4] ":" ary[5] ary[6] "ff:fe" ) ; + eui64 = ( eui64 ary[7] ary[8] ":" ary[9] ary[10] ary[11] ary[12] ) ; + } + + else { + eui64 = 0 ; + } + + + return eui64 ; +} + +############################################################################## + diff --git a/net/unbound/files/odhcpd.sh b/net/unbound/files/odhcpd.sh new file mode 100644 index 0000000..22a470b --- /dev/null +++ b/net/unbound/files/odhcpd.sh @@ -0,0 +1,99 @@ +#!/bin/sh +############################################################################## +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# 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. +# +# Copyright (C) 2016 Eric Luehrsen +# +############################################################################## +# +# This script facilitates alternate installation of Unbound+odhcpd and no +# need for dnsmasq. There are some limitations, but it works and is small. +# The lease file is parsed to make "zone-data:" and "local-data:" entries. +# +# config odhcpd 'odhcpd' +# option leasetrigger '/usr/lib/unbound/odhcpd.sh' +# +############################################################################## + +# Common file location definitions +. /usr/lib/unbound/unbound.sh + +############################################################################## + +odhcpd_settings() { + # This trigger is out of normal init context, so we need to read some UCI. + local cfg="$1" + config_get UNBOUND_D_DHCP_LINK "$cfg" dhcp_link none + config_get_bool UNBOUND_B_SLAAC6_MAC "$cfg" dhcp4_slaac6 0 + config_get UNBOUND_TXT_DOMAIN "$cfg" domain lan +} + +############################################################################## + +odhcpd_zonedata() { + local dns_ls_add=$UNBOUND_VARDIR/dhcp_dns.add + local dns_ls_del=$UNBOUND_VARDIR/dhcp_dns.del + local dhcp_ls_new=$UNBOUND_VARDIR/dhcp_lease.new + local dhcp_ls_old=$UNBOUND_VARDIR/dhcp_lease.old + local dhcp_ls_add=$UNBOUND_VARDIR/dhcp_lease.add + local dhcp_ls_del=$UNBOUND_VARDIR/dhcp_lease.del + local dhcp_origin=$( uci get dhcp.@odhcpd[0].leasefile ) + + config_load unbound + config_foreach odhcpd_settings unbound + + + if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" -a -f "$dhcp_origin" ] ; then + # Capture the lease file which could be changing often + cat $dhcp_origin | sort > $dhcp_ls_new + touch $dhcp_ls_old + sort $dhcp_ls_new $dhcp_ls_old $dhcp_ls_old | uniq -u > $dhcp_ls_add + sort $dhcp_ls_old $dhcp_ls_new $dhcp_ls_new | uniq -u > $dhcp_ls_del + + # Go through the messy business of coding up A, AAAA, and PTR records + # This static conf will be available if Unbound restarts asynchronously + awk -v hostfile=$UNBOUND_DHCP_CONF -v domain=$UNBOUND_TXT_DOMAIN \ + -v bslaac=$UNBOUND_B_SLAAC6_MAC -v bisolt=0 -v bconf=1 \ + -f /usr/lib/unbound/odhcpd.awk $dhcp_ls_new + + # Deleting and adding all records into Unbound can be a burden in a + # high density environment. Use unbound-control incrementally. + awk -v hostfile=$dns_ls_del -v domain=$UNBOUND_TXT_DOMAIN \ + -v bslaac=$UNBOUND_B_SLAAC6_MAC -v bisolt=0 -v bconf=0 \ + -f /usr/lib/unbound/odhcpd.awk $dhcp_ls_del + + awk -v hostfile=$dns_ls_add -v domain=$UNBOUND_TXT_DOMAIN \ + -v bslaac=$UNBOUND_B_SLAAC6_MAC -v bisolt=0 -v bconf=0 \ + -f /usr/lib/unbound/odhcpd.awk $dhcp_ls_add + + + if [ -f "$dns_ls_del" ] ; then + cat $dns_ls_del | $UNBOUND_CONTROL_CFG local_datas_remove + fi + + + if [ -f "$dns_ls_add" ] ; then + cat $dns_ls_add | $UNBOUND_CONTROL_CFG local_datas + fi + + + # prepare next round + mv $dhcp_ls_new $dhcp_ls_old + rm -f $dns_ls_del $dns_ls_add $dhcp_ls_del $dhcp_ls_add + fi +} + +############################################################################## + +odhcpd_zonedata + +############################################################################## + diff --git a/net/unbound/files/root.key b/net/unbound/files/root.key index 2ad6641..2de0b62 100644 --- a/net/unbound/files/root.key +++ b/net/unbound/files/root.key @@ -1 +1,3 @@ . IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5 +. IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D + diff --git a/net/unbound/files/rootzone.sh b/net/unbound/files/rootzone.sh index 143c056..d085fed 100644 --- a/net/unbound/files/rootzone.sh +++ b/net/unbound/files/rootzone.sh @@ -26,7 +26,7 @@ rootzone_uci() { # This will likely be called outside of "start_service()" context config_get_bool UNBOUND_B_DNSSEC "$cfg" validator 0 config_get_bool UNBOUND_B_NTP_BOOT "$cfg" validator_ntp 1 - config_get UNBOUND_N_ROOT_AGE "$cfg" root_age 30 + config_get UNBOUND_N_ROOT_AGE "$cfg" root_age 9 } ############################################################################## diff --git a/net/unbound/files/unbound.iface b/net/unbound/files/unbound.iface deleted file mode 100755 index 172bcae..0000000 --- a/net/unbound/files/unbound.iface +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -############################################################################## -# -# Copyright (C) 2016 Eric Luehrsen -# -############################################################################## -# -# "Restart" Unbound on hotplug interface up: -# - Clean rebind of unbound to new interfaces -# - Some of Unbound conf options to not reload run time -# - Unbound can grow a bit so this will shrink it back -# -############################################################################## - -if [ "$ACTION" = ifup ] && /etc/init.d/unbound enabled ; then - /etc/init.d/unbound restart -fi - -############################################################################## - diff --git a/net/unbound/files/unbound.init b/net/unbound/files/unbound.init index 0f5049d..1edf9ef 100755 --- a/net/unbound/files/unbound.init +++ b/net/unbound/files/unbound.init @@ -9,7 +9,8 @@ # ############################################################################## -START=60 +START=19 +STOP=50 USE_PROCD=1 PROG=/usr/sbin/unbound @@ -19,9 +20,23 @@ PROG=/usr/sbin/unbound ############################################################################## +boot() { + UNBOUND_BOOT=1 + start "$@" +} + +############################################################################## + start_service() { - unbound_prepare + if [ -n "$UNBOUND_BOOT" ] ; then + # Load procd triggers (rc) and use event IFUP to really start + return 0 + fi + + # complex UCI work + unbound_start + # standard procd clause procd_open_instance procd_set_param command $PROG -d -c $UNBOUND_CONFFILE procd_set_param respawn @@ -31,15 +46,18 @@ start_service() { ############################################################################## stop_service() { - rootzone_update + unbound_stop + + # Wait! on restart Unbound may take time writing closure stats to syslog + pidof $PROG && sleep 1 } ############################################################################## service_triggers() { - procd_add_reload_trigger "dhcp" - procd_add_reload_trigger "network" + # use soft reload to prevent continuous stop-start and cache flush procd_add_reload_trigger "unbound" + procd_add_raw_trigger "interface.*.up" 2000 /etc/init.d/unbound reload } ############################################################################## diff --git a/net/unbound/files/unbound.ntpd b/net/unbound/files/unbound.ntpd index 9244284..d744cb0 100755 --- a/net/unbound/files/unbound.ntpd +++ b/net/unbound/files/unbound.ntpd @@ -17,11 +17,10 @@ ############################################################################## -if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] \ - && /etc/init.d/dnsmasq enabled ; then - # +if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] ; then echo "ntpd: $( date )" > $UNBOUND_TIMEFILE - /etc/init.d/unbound restart + /etc/init.d/unbound enabled && /etc/init.d/unbound restart + # Yes, hard RESTART. We need to be absolutely sure to enable DNSSEC. fi ############################################################################## diff --git a/net/unbound/files/unbound.sh b/net/unbound/files/unbound.sh index 568c627..4daefda 100644 --- a/net/unbound/files/unbound.sh +++ b/net/unbound/files/unbound.sh @@ -21,43 +21,61 @@ ############################################################################## UNBOUND_B_CONTROL=0 -UNBOUND_B_DNSMASQ=0 +UNBOUND_B_SLAAC6_MAC=0 UNBOUND_B_DNSSEC=0 +UNBOUND_B_DNS64=0 UNBOUND_B_GATE_NAME=0 +UNBOUND_B_HIDE_BIND=1 UNBOUND_B_LOCL_BLCK=0 -UNBOUND_B_LOCL_NAME=0 UNBOUND_B_LOCL_SERV=1 UNBOUND_B_MAN_CONF=0 UNBOUND_B_NTP_BOOT=1 UNBOUND_B_PRIV_BLCK=1 UNBOUND_B_QUERY_MIN=0 +UNBOUND_B_QRY_MINST=0 +UNBOUND_D_DOMAIN_TYPE=static +UNBOUND_D_DHCP_LINK=none +UNBOUND_D_LAN_FQDN=0 +UNBOUND_D_PROTOCOL=mixed UNBOUND_D_RESOURCE=small UNBOUND_D_RECURSION=passive +UNBOUND_D_WAN_FQDN=0 -UNBOUND_TXT_FWD_ZONE="" -UNBOUND_TTL_MIN=120 +UNBOUND_IP_DNS64="64:ff9b::/96" UNBOUND_N_EDNS_SIZE=1280 UNBOUND_N_FWD_PORTS="" UNBOUND_N_RX_PORT=53 -UNBOUND_N_ROOT_AGE=28 +UNBOUND_N_ROOT_AGE=9 -############################################################################## +UNBOUND_TTL_MIN=120 -UNBOUND_ANCHOR=/usr/bin/unbound-anchor -UNBOUND_CONTROL=/usr/bin/unbound-control +UNBOUND_TXT_DOMAIN=lan +UNBOUND_TXT_FWD_ZONE="" +UNBOUND_TXT_HOSTNAME=thisrouter + +############################################################################## UNBOUND_LIBDIR=/usr/lib/unbound +UNBOUND_VARDIR=/var/lib/unbound UNBOUND_PIDFILE=/var/run/unbound.pid -UNBOUND_VARDIR=/var/lib/unbound +UNBOUND_SRV_CONF=$UNBOUND_VARDIR/unbound_srv.conf +UNBOUND_EXT_CONF=$UNBOUND_VARDIR/unbound_ext.conf +UNBOUND_DHCP_CONF=$UNBOUND_VARDIR/unbound_dhcp.conf UNBOUND_CONFFILE=$UNBOUND_VARDIR/unbound.conf + UNBOUND_KEYFILE=$UNBOUND_VARDIR/root.key UNBOUND_HINTFILE=$UNBOUND_VARDIR/root.hints UNBOUND_TIMEFILE=$UNBOUND_VARDIR/unbound.time -UNBOUND_CHECKFILE=$UNBOUND_VARDIR/unbound.check + +############################################################################## + +UNBOUND_ANCHOR=/usr/sbin/unbound-anchor +UNBOUND_CONTROL=/usr/sbin/unbound-control +UNBOUND_CONTROL_CFG="$UNBOUND_CONTROL -c $UNBOUND_CONFFILE" ############################################################################## @@ -70,6 +88,141 @@ UNBOUND_CHECKFILE=$UNBOUND_VARDIR/unbound.check ############################################################################## +copy_dash_update() { + # TODO: remove this function and use builtins when this issues is resovled. + # Due to OpenWrt/LEDE divergence "cp -u" isn't yet universally available. + local filetime keeptime + + + if [ -f $UNBOUND_KEYFILE.keep ] ; then + # root.key.keep is reused if newest + filetime=$( date -r $UNBOUND_KEYFILE +%s ) + keeptime=$( date -r $UNBOUND_KEYFILE.keep +%s ) + + + if [ $keeptime -gt $filetime ] ; then + cp $UNBOUND_KEYFILE.keep $UNBOUND_KEYFILE + fi + + + rm -f $UNBOUND_KEYFILE.keep + fi +} + +############################################################################## + +create_interface_dns() { + local cfg="$1" + local ipcommand logint ignore ifname ifdashname + local name names address addresses + local ulaprefix if_fqdn host_fqdn mode mode_ptr + + # Create local-data: references for this hosts interfaces (router). + config_get logint "$cfg" interface + config_get_bool ignore "$cfg" ignore 0 + network_get_device ifname "$cfg" + + ifdashname="${ifname//./-}" + ipcommand="ip -o address show $ifname" + addresses="$($ipcommand | awk '/inet/{sub(/\/.*/,"",$4); print $4}')" + ulaprefix="$(uci_get network @globals[0] ula_prefix)" + host_fqdn="$UNBOUND_TXT_HOSTNAME.$UNBOUND_TXT_DOMAIN" + if_fqdn="$ifdashname.$host_fqdn" + + + if [ -z "${ulaprefix%%:/*}" ] ; then + # Nonsense so this option isn't globbed below + ulaprefix="fdno:such:addr::/48" + fi + + + if [ "$ignore" -gt 0 ] ; then + mode="$UNBOUND_D_WAN_FQDN" + else + mode="$UNBOUND_D_LAN_FQDN" + fi + + + case "$mode" in + 3) + mode_ptr="$host_fqdn" + names="$host_fqdn $UNBOUND_TXT_HOSTNAME" + ;; + + 4) + if [ -z "$ifdashname" ] ; then + # race conditions at init can rarely cause a blank device return + # the record format is invalid and Unbound won't load the conf file + mode_ptr="$host_fqdn" + names="$host_fqdn $UNBOUND_TXT_HOSTNAME" + else + mode_ptr="$if_fqdn" + names="$if_fqdn $host_fqdn $UNBOUND_TXT_HOSTNAME" + fi + ;; + + *) + mode_ptr="$UNBOUND_TXT_HOSTNAME" + names="$UNBOUND_TXT_HOSTNAME" + ;; + esac + + + if [ "$mode" -gt 1 ] ; then + { + for address in $addresses ; do + case $address in + fe80:*|169.254.*) + echo " # note link address $address" + ;; + + [1-9a-f]*:*[0-9a-f]) + # GA and ULA IP6 for HOST IN AAA records (ip command is robust) + for name in $names ; do + echo " local-data: \"$name. 120 IN AAAA $address\"" + done + echo " local-data-ptr: \"$address 120 $mode_ptr\"" + ;; + + [1-9]*.*[0-9]) + # Old fashioned HOST IN A records + for name in $names ; do + echo " local-data: \"$name. 120 IN A $address\"" + done + echo " local-data-ptr: \"$address 120 $mode_ptr\"" + ;; + esac + done + echo + } >> $UNBOUND_CONFFILE + + elif [ "$mode" -gt 0 ] ; then + { + for address in $addresses ; do + case $address in + fe80:*|169.254.*) + echo " # note link address $address" + ;; + + "${ulaprefix%%:/*}"*) + # Only this networks ULA and only hostname + echo " local-data: \"$UNBOUND_TXT_HOSTNAME. 120 IN AAAA $address\"" + echo " local-data-ptr: \"$address 120 $UNBOUND_TXT_HOSTNAME\"" + ;; + + [1-9]*.*[0-9]) + echo " local-data: \"$UNBOUND_TXT_HOSTNAME. 120 IN A $address\"" + echo " local-data-ptr: \"$address 120 $UNBOUND_TXT_HOSTNAME\"" + ;; + esac + done + echo + } >> $UNBOUND_CONFFILE + fi +} + +############################################################################## + create_access_control() { local cfg="$1" local subnets subnets4 subnets6 @@ -103,55 +256,101 @@ create_domain_insecure() { ############################################################################## unbound_mkdir() { - mkdir -p $UNBOUND_VARDIR - touch $UNBOUND_CONFFILE + local resolvsym=0 + local dhcp_origin=$( uci get dhcp.@odhcpd[0].leasefile ) + local dhcp_dir=$( dirname "$dhcp_origin" ) + local filestuff - if [ -f /etc/unbound/root.hints ] ; then - # Your own local copy of root.hints - cp -p /etc/unbound/root.hints $UNBOUND_HINTFILE + if [ ! -x /usr/sbin/dnsmasq -o ! -x /etc/init.d/dnsmasq ] ; then + resolvsym=1 + else + /etc/init.d/dnsmasq enabled || resolvsym=1 + fi - elif [ -f /usr/share/dns/root.hints ] ; then - # Debian-like package dns-root-data - cp -p /usr/share/dns/root.hints $UNBOUND_HINTFILE - else - logger -t unbound -s "iterator will use built-in root hints" + if [ "$resolvsym" -gt 0 ] ; then + rm -f /tmp/resolv.conf + + + { + # Set resolver file to local but not if /etc/init.d/dnsmasq will do it. + echo "nameserver 127.0.0.1" + echo "nameserver ::1" + echo "search $UNBOUND_TXT_DOMAIN" + } > /tmp/resolv.conf fi - if [ -f /etc/unbound/root.key ] ; then - # Your own local copy of a root.key - cp -p /etc/unbound/root.key $UNBOUND_KEYFILE + if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" -a ! -d "$dhcp_dir" ] ; then + # make sure odhcpd has a directory to write (not done itself, yet) + mkdir -p "$dhcp_dir" + fi - elif [ -f /usr/share/dns/root.key ] ; then - # Debian-like package dns-root-data - cp -p /usr/share/dns/root.key $UNBOUND_KEYFILE - elif [ -x "$UNBOUND_ANCHOR" ] ; then - $UNBOUND_ANCHOR -a $UNBOUND_KEYFILE + if [ -f $UNBOUND_KEYFILE ] ; then + filestuff=$( cat $UNBOUND_KEYFILE ) - else - logger -t unbound -s "validator will use built-in trust anchor" + + case "$filestuff" in + *"state=2 [ VALID ]"*) + # Lets not lose RFC 5011 tracking if we don't have to + cp -p $UNBOUND_KEYFILE $UNBOUND_KEYFILE.keep + ;; + esac fi -} -############################################################################## -unbound_conf() { - local cfg=$1 - local rt_mem rt_conn + # Blind copy /etc/ to /var/lib/ + mkdir -p $UNBOUND_VARDIR + rm -f $UNBOUND_VARDIR/dhcp_* + touch $UNBOUND_CONFFILE + touch $UNBOUND_SRV_CONF + touch $UNBOUND_EXT_CONF + cp -p /etc/unbound/* $UNBOUND_VARDIR/ - { - # Make fresh conf file - echo "# $UNBOUND_CONFFILE generated by UCI $( date )" - echo - } > $UNBOUND_CONFFILE + if [ ! -f $UNBOUND_HINTFILE ] ; then + if [ -f /usr/share/dns/root.hints ] ; then + # Debian-like package dns-root-data + cp -p /usr/share/dns/root.hints $UNBOUND_HINTFILE + elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then + logger -t unbound -s "iterator will use built-in root hints" + fi + fi + + + if [ ! -f $UNBOUND_KEYFILE ] ; then + if [ -f /usr/share/dns/root.key ] ; then + # Debian-like package dns-root-data + cp -p /usr/share/dns/root.key $UNBOUND_KEYFILE + + elif [ -x $UNBOUND_ANCHOR ] ; then + $UNBOUND_ANCHOR -a $UNBOUND_KEYFILE + + elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then + logger -t unbound -s "validator will use built-in trust anchor" + fi + fi + + + copy_dash_update + + + # Ensure access and prepare to jail + chown -R unbound:unbound $UNBOUND_VARDIR + chmod 775 $UNBOUND_VARDIR + chmod 664 $UNBOUND_VARDIR/* +} + +############################################################################## + +unbound_control() { if [ "$UNBOUND_B_CONTROL" -gt 0 ] ; then { # Enable remote control tool, but only at local host for security + # You can hand write fancier encrypted access with /etc/..._ext.conf echo "remote-control:" echo " control-enable: yes" echo " control-use-cert: no" @@ -159,18 +358,32 @@ unbound_conf() { echo " control-interface: ::1" echo } >> $UNBOUND_CONFFILE - - else - { - # "control:" clause is seperate before "server:" so we can append - # dnsmasq "server:" parts and "forward:" cluases towards the end. - echo "remote-control:" - echo " control-enable: no" - echo - } >> $UNBOUND_CONFFILE fi + { + # Amend your own extended clauses here like forward zones or disable + # above (local, no encryption) and amend your own remote encrypted control + echo + echo "include: $UNBOUND_EXT_CONF" >> $UNBOUND_CONFFILE + echo + } >> $UNBOUND_CONFFILE +} + +############################################################################## + +unbound_conf() { + local cfg="$1" + local rt_mem rt_conn modulestring + + + { + # Make fresh conf file + echo "# $UNBOUND_CONFFILE generated by UCI $( date )" + echo + } > $UNBOUND_CONFFILE + + { # No threading echo "server:" @@ -204,6 +417,38 @@ unbound_conf() { } >> $UNBOUND_CONFFILE + case "$UNBOUND_D_PROTOCOL" in + ip4_only) + { + echo " do-ip4: yes" + echo " do-ip6: no" + } >> $UNBOUND_CONFFILE + ;; + + ip6_only) + { + echo " do-ip4: no" + echo " do-ip6: yes" + } >> $UNBOUND_CONFFILE + ;; + + ip6_prefer) + { + echo " do-ip4: yes" + echo " do-ip6: yes" + echo " prefer-ip6: yes" + } >> $UNBOUND_CONFFILE + ;; + + *) + { + echo " do-ip4: yes" + echo " do-ip6: yes" + } >> $UNBOUND_CONFFILE + ;; + esac + + { # protocol level tuning echo " edns-buffer-size: $UNBOUND_N_EDNS_SIZE" @@ -281,10 +526,13 @@ unbound_conf() { echo } >> $UNBOUND_CONFFILE - else + elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then logger -t unbound -s "default memory resource consumption" fi + # Assembly of module-config: options is tricky; order matters + modulestring="iterator" + if [ "$UNBOUND_B_DNSSEC" -gt 0 ] ; then if [ ! -f "$UNBOUND_TIMEFILE" -a "$UNBOUND_B_NTP_BOOT" -gt 0 ] ; then @@ -294,24 +542,38 @@ unbound_conf() { { - # Validation of DNSSEC - echo " module-config: \"validator iterator\"" echo " harden-dnssec-stripped: yes" echo " val-clean-additional: yes" echo " ignore-cd-flag: yes" - echo } >> $UNBOUND_CONFFILE - else - { - # Just iteration without DNSSEC - echo " module-config: \"iterator\"" - echo - } >> $UNBOUND_CONFFILE + + modulestring="validator $modulestring" + fi + + + if [ "$UNBOUND_B_DNS64" -gt 0 ] ; then + echo " dns64-prefix: $UNBOUND_IP_DNS64" >> $UNBOUND_CONFFILE + + modulestring="dns64 $modulestring" fi - if [ "$UNBOUND_B_QUERY_MIN" -gt 0 ] ; then + { + # Print final module string + echo " module-config: \"$modulestring\"" + echo + } >> $UNBOUND_CONFFILE + + + if [ "$UNBOUND_B_QRY_MINST" -gt 0 -a "$UNBOUND_B_QUERY_MIN" -gt 0 ] ; then + { + # Some query privacy but "strict" will break some name servers + echo " qname-minimisation: yes" + echo " qname-minimisation-strict: yes" + } >> $UNBOUND_CONFFILE + + elif [ "$UNBOUND_B_QUERY_MIN" -gt 0 ] ; then # Minor improvement on query privacy echo " qname-minimisation: yes" >> $UNBOUND_CONFFILE @@ -340,7 +602,9 @@ unbound_conf() { ;; *) - logger -t unbound -s "default recursion configuration" + if [ ! -f "$UNBOUND_TIMEFILE" ] ; then + logger -t unbound -s "default recursion configuration" + fi ;; esac @@ -357,10 +621,23 @@ unbound_conf() { } >> $UNBOUND_CONFFILE + if [ "$UNBOUND_B_HIDE_BIND" -gt 0 ] ; then + { + # Block server id and version DNS TXT records + echo " hide-identity: yes" + echo " hide-version: yes" + echo + } >> $UNBOUND_CONFFILE + fi + + if [ "$UNBOUND_B_PRIV_BLCK" -gt 0 ] ; then { - # Remove DNS reponses from upstream with private IP + # Remove _upstream_ or global reponses with private addresses. + # Unbounds own "local zone" and "forward zone" may still use these. + # RFC1918, RFC3927, RFC4291, RFC6598, RFC6890 echo " private-address: 10.0.0.0/8" + echo " private-address: 100.64.0.0/10" echo " private-address: 169.254.0.0/16" echo " private-address: 172.16.0.0/12" echo " private-address: 192.168.0.0/16" @@ -385,14 +662,18 @@ unbound_conf() { fi - # Domain Exceptions + # Except and accept domains as insecure (DNSSEC); work around broken domains config_list_foreach "$cfg" "domain_insecure" create_domain_insecure echo >> $UNBOUND_CONFFILE +} +############################################################################## - #################### - # UCI @ network # - #################### +unbound_access() { + # TODO: Unbound 1.6.0 added "tags" and "views", so we can add tags to + # each access-control IP block, and then divert access. + # -- "guest" WIFI will not be allowed to see local zone data + # -- "child" LAN can black whole a list of domains to http~deadpixel if [ "$UNBOUND_B_LOCL_SERV" -gt 0 ] ; then @@ -401,6 +682,7 @@ unbound_conf() { config_load network config_foreach create_access_control interface + { echo " access-control: 127.0.0.0/8 allow" echo " access-control: ::1/128 allow" @@ -415,45 +697,166 @@ unbound_conf() { echo } >> $UNBOUND_CONFFILE fi + + + { + # Amend your own "server:" stuff here + echo " include: $UNBOUND_SRV_CONF" + echo + } >> $UNBOUND_CONFFILE +} + +############################################################################## + +unbound_adblock() { + # TODO: Unbound 1.6.0 added "tags" and "views"; lets work with adblock team + local adb_enabled adb_file + + if [ ! -x /usr/bin/adblock.sh -o ! -x /etc/init.d/adblock ] ; then + adb_enabled=0 + else + /etc/init.d/adblock enabled && adb_enabled=1 || adb_enabled=0 + fi + + + if [ "$adb_enabled" -gt 0 ] ; then + { + # Pull in your selected openwrt/pacakges/net/adblock generated lists + for adb_file in $UNBOUND_VARDIR/adb_list.* ; do + echo " include: $adb_file" + done + echo + } >> $UNBOUND_CONFFILE + fi +} + +############################################################################## + +unbound_hostname() { + if [ -n "$UNBOUND_TXT_DOMAIN" ] ; then + { + # TODO: Unbound 1.6.0 added "tags" and "views" and we could make + # domains by interface to prevent DNS from "guest" to "home" + echo " local-zone: $UNBOUND_TXT_DOMAIN. $UNBOUND_D_DOMAIN_TYPE" + echo " domain-insecure: $UNBOUND_TXT_DOMAIN" + echo " private-domain: $UNBOUND_TXT_DOMAIN" + echo + echo " local-zone: $UNBOUND_TXT_HOSTNAME. $UNBOUND_D_DOMAIN_TYPE" + echo " domain-insecure: $UNBOUND_TXT_HOSTNAME" + echo " private-domain: $UNBOUND_TXT_HOSTNAME" + echo + } >> $UNBOUND_CONFFILE + + + case "$UNBOUND_D_DOMAIN_TYPE" in + deny|inform_deny|refuse|static) + { + # avoid upstream involvement in RFC6762 like responses (link only) + echo " local-zone: local. $UNBOUND_D_DOMAIN_TYPE" + echo " domain-insecure: local" + echo " private-domain: local" + echo + } >> $UNBOUND_CONFFILE + ;; + esac + + + if [ "$UNBOUND_D_LAN_FQDN" -gt 0 -o "$UNBOUND_D_WAN_FQDN" -gt 0 ] ; then + config_load dhcp + config_foreach create_interface_dns dhcp + fi + + + if [ -f "$UNBOUND_DHCP_CONF" ] ; then + { + # Seed DHCP records because dhcp scripts trigger externally + # Incremental Unbound restarts may drop unbound-control add records + echo " include: $UNBOUND_DHCP_CONF" + echo + } >> $UNBOUND_CONFFILE + fi + fi } ############################################################################## unbound_uci() { - local cfg=$1 - local dnsmasqpath - - #################### - # UCI @ unbound # - #################### - - config_get_bool UNBOUND_B_GATE_NAME "$cfg" dnsmsaq_gate_name 0 - config_get_bool UNBOUND_B_DNSMASQ "$cfg" dnsmasq_link_dns 0 - config_get_bool UNBOUND_B_LOCL_NAME "$cfg" dnsmasq_only_local 0 - config_get_bool UNBOUND_B_LOCL_SERV "$cfg" localservice 1 - config_get_bool UNBOUND_B_MAN_CONF "$cfg" manual_conf 0 - config_get_bool UNBOUND_B_QUERY_MIN "$cfg" query_minimize 0 - config_get_bool UNBOUND_B_PRIV_BLCK "$cfg" rebind_protection 1 - config_get_bool UNBOUND_B_LOCL_BLCK "$cfg" rebind_localhost 0 - config_get_bool UNBOUND_B_CONTROL "$cfg" unbound_control 0 - config_get_bool UNBOUND_B_DNSSEC "$cfg" validator 0 - config_get_bool UNBOUND_B_NTP_BOOT "$cfg" validator_ntp 1 + local cfg="$1" + local dnsmasqpath hostnm + + hostnm="$(uci_get system.@system[0].hostname | awk '{print tolower($0)}')" + UNBOUND_TXT_HOSTNAME=${hostnm:-thisrouter} + + config_get_bool UNBOUND_B_SLAAC6_MAC "$cfg" dhcp4_slaac6 0 + config_get_bool UNBOUND_B_DNS64 "$cfg" dns64 0 + config_get_bool UNBOUND_B_HIDE_BIND "$cfg" hide_binddata 1 + config_get_bool UNBOUND_B_LOCL_SERV "$cfg" localservice 1 + config_get_bool UNBOUND_B_MAN_CONF "$cfg" manual_conf 0 + config_get_bool UNBOUND_B_QUERY_MIN "$cfg" query_minimize 0 + config_get_bool UNBOUND_B_QRY_MINST "$cfg" query_min_strict 0 + config_get_bool UNBOUND_B_PRIV_BLCK "$cfg" rebind_protection 1 + config_get_bool UNBOUND_B_LOCL_BLCK "$cfg" rebind_localhost 0 + config_get_bool UNBOUND_B_CONTROL "$cfg" unbound_control 0 + config_get_bool UNBOUND_B_DNSSEC "$cfg" validator 0 + config_get_bool UNBOUND_B_NTP_BOOT "$cfg" validator_ntp 1 + + config_get UNBOUND_IP_DNS64 "$cfg" dns64_prefix "64:ff9b::/96" config_get UNBOUND_N_EDNS_SIZE "$cfg" edns_size 1280 config_get UNBOUND_N_RX_PORT "$cfg" listen_port 53 - config_get UNBOUND_D_RECURSION "$cfg" recursion passive - config_get UNBOUND_D_RESOURCE "$cfg" resource small - config_get UNBOUND_N_ROOT_AGE "$cfg" root_age 7 + config_get UNBOUND_N_ROOT_AGE "$cfg" root_age 9 + + config_get UNBOUND_D_DOMAIN_TYPE "$cfg" domain_type static + config_get UNBOUND_D_DHCP_LINK "$cfg" dhcp_link none + config_get UNBOUND_D_LAN_FQDN "$cfg" add_local_fqdn 0 + config_get UNBOUND_D_PROTOCOL "$cfg" protocol mixed + config_get UNBOUND_D_RECURSION "$cfg" recursion passive + config_get UNBOUND_D_RESOURCE "$cfg" resource small + config_get UNBOUND_D_WAN_FQDN "$cfg" add_wan_fqdn 0 + config_get UNBOUND_TTL_MIN "$cfg" ttl_min 120 + config_get UNBOUND_TXT_DOMAIN "$cfg" domain lan - if [ "$UNBOUND_B_DNSMASQ" -gt 0 ] ; then - dnsmasqpath=$( which dnsmasq ) + if [ "$UNBOUND_D_DHCP_LINK" = "none" ] ; then + config_get_bool UNBOUND_B_DNSMASQ "$cfg" dnsmasq_link_dns 0 - if [ ! -x "$dnsmasqpath" ] ; then + if [ "$UNBOUND_B_DNSMASQ" -gt 0 ] ; then + UNBOUND_D_DHCP_LINK=dnsmasq + + + if [ ! -f "$UNBOUND_TIMEFILE" ] ; then + logger -t unbound -s "Please use 'dhcp_link' selector instead" + fi + fi + fi + + + if [ "$UNBOUND_D_DHCP_LINK" = "dnsmasq" ] ; then + if [ ! -x /usr/sbin/dnsmasq -o ! -x /etc/init.d/dnsmasq ] ; then + UNBOUND_D_DHCP_LINK=none + else + /etc/init.d/dnsmasq enabled || UNBOUND_D_DHCP_LINK=none + fi + + + if [ "$UNBOUND_D_DHCP_LINK" = "none" -a ! -f "$UNBOUND_TIMEFILE" ] ; then logger -t unbound -s "cannot forward to dnsmasq" - UNBOUND_B_DNSMASQ=0 + fi + fi + + + if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" ] ; then + if [ ! -x /usr/sbin/odhcpd -o ! -x /etc/init.d/odhcpd ] ; then + UNBOUND_D_DHCP_LINK=none + else + /etc/init.d/odhcpd enabled || UNBOUND_D_DHCP_LINK=none + fi + + + if [ "$UNBOUND_D_DHCP_LINK" = "none" -a ! -f "$UNBOUND_TIMEFILE" ] ; then + logger -t unbound -s "cannot receive records from odhcpd" fi fi @@ -476,56 +879,51 @@ unbound_uci() { # that could have had awful side effects UNBOUND_TTL_MIN=300 fi - - - if [ "$UNBOUND_B_MAN_CONF" -gt 0 ] ; then - # Don't want this being triggered. Maybe we could, but then the - # base conf you provide would need to be just right. - UNBOUND_B_DNSMASQ=0 - - else - unbound_conf $cfg - fi } ############################################################################## -unbound_own () { - # Debug UCI - { - echo "# $UNBOUND_CHECKFILE generated by UCI $( date )" - echo - set | grep ^UNBOUND_ - } > $UNBOUND_CHECKFILE +unbound_start() { + config_load unbound + config_foreach unbound_uci unbound + unbound_mkdir - if [ "$UNBOUND_B_MAN_CONF" -gt 0 ] ; then - # You are doing your own thing, so just copy /etc/ to /var/ - cp -p /etc/unbound/* $UNBOUND_VARDIR/ - fi + if [ "$UNBOUND_B_MAN_CONF" -eq 0 ] ; then + unbound_conf + unbound_access + unbound_adblock + if [ "$UNBOUND_D_DHCP_LINK" = "dnsmasq" ] ; then + dnsmasq_link + else + unbound_hostname + fi - # Ensure access and prepare to jail - chown -R unbound:unbound $UNBOUND_VARDIR - chmod 775 $UNBOUND_VARDIR - chmod 664 $UNBOUND_VARDIR/* + unbound_control + fi } ############################################################################## -unbound_prepare() { - # Make a home for Unbound in /var/lib/unbound - unbound_mkdir +unbound_stop() { + local resolvsym=0 - # Load up the chunks of UCI - config_load unbound - config_foreach unbound_uci unbound + rootzone_update - # Unbound primary DNS, and dnsmasq side service DHCP-DNS (dnsmasq.sh) - dnsmasq_link - # Unbound needs chroot ownership - unbound_own + if [ ! -x /usr/sbin/dnsmasq -o ! -x /etc/init.d/dnsmasq ] ; then + resolvsym=1 + else + /etc/init.d/dnsmasq enabled || resolvsym=1 + fi + + + if [ "$resolvsym" -gt 0 ] ; then + # set resolver file to normal, but don't stomp on dnsmasq + rm -f /tmp/resolv.conf + ln -s /tmp/resolv.conf.auto /tmp/resolv.conf + fi } ############################################################################## diff --git a/net/unbound/files/unbound.uci b/net/unbound/files/unbound.uci index 02854a8..9e58ac7 100644 --- a/net/unbound/files/unbound.uci +++ b/net/unbound/files/unbound.uci @@ -1,17 +1,25 @@ config unbound - option dnsmsaq_gate_name '0' - option dnsmasq_link_dns '0' - option dnsmasq_only_local '0' + option add_local_fqdn '1' + option add_wan_fqdn '0' + option dhcp_link 'none' + option dhcp4_slaac6 '0' + option dns64 '0' + option dns64_prefix '64:ff9b::/96' + option domain 'lan' + option domain_type 'static' option edns_size '1280' + option hide_binddata '1' option listen_port '53' option localservice '1' option manual_conf '0' + option protocol 'mixed' option query_minimize '0' + option query_min_strict '0' option rebind_localhost '0' option rebind_protection '1' option recursion 'passive' option resource 'small' - option root_age '28' + option root_age '9' option ttl_min '120' option unbound_control '0' option validator '0' diff --git a/net/unbound/files/unbound_ext.conf b/net/unbound/files/unbound_ext.conf new file mode 100644 index 0000000..5a4398b --- /dev/null +++ b/net/unbound/files/unbound_ext.conf @@ -0,0 +1,8 @@ +############################################################################## +# UNBOUND UCI USER ADDED CLAUSES +# +# Put your own forward:, view:, stub:, and control: clauses here. This file is +# appended to the end of UCI auto generated 'unbound.conf'. This is done with +# include: statement. Notice, it is outside of the server: clause. +############################################################################## + diff --git a/net/unbound/files/unbound_srv.conf b/net/unbound/files/unbound_srv.conf new file mode 100644 index 0000000..01ba544 --- /dev/null +++ b/net/unbound/files/unbound_srv.conf @@ -0,0 +1,8 @@ +############################################################################## +# UNBOUND UCI USER ADDED SERVER OPTIONS +# +# Put your own choice options here when not covered by UCI. These are all part +# of the server: clause only. Most likely are hardening options or local-zone: +# This is in an include: statement towards the end of the server: cluase. +############################################################################## + diff --git a/net/unbound/patches/001-conf.patch b/net/unbound/patches/001-conf.patch index 5f6b4c5..8aa0502 100644 --- a/net/unbound/patches/001-conf.patch +++ b/net/unbound/patches/001-conf.patch @@ -1,12 +1,12 @@ diff --git a/doc/example.conf.in b/doc/example.conf.in -index c520c88..98a148a 100644 +index 83e7c5c..3ea2b28 100644 --- a/doc/example.conf.in +++ b/doc/example.conf.in -@@ -1,20 +1,82 @@ +@@ -1,9 +1,10 @@ -# -# Example configuration file. -# --# See unbound.conf(5) man page, version 1.5.10. +-# See unbound.conf(5) man page, version 1.6.1. -# -# this is a comment. +############################################################################## @@ -19,10 +19,9 @@ index c520c88..98a148a 100644 #Use this to include other text into the file. #include: "otherfile.conf" - - # The server clause sets the main parameters. +@@ -12,9 +13,71 @@ server: -- # whitespace is not necessary, but looks cleaner. + # whitespace is not necessary, but looks cleaner. - # verbosity number, 0 is least verbose. 1 is default. + # verbosity 1 is default @@ -51,7 +50,7 @@ index c520c88..98a148a 100644 + access-control: ::0/0 allow + + # this limits TCP service but uses less buffers -+ outgoing-num-tcp: 1 ++ outgoing-num-tcp: 1 + incoming-num-tcp: 1 + + # use somewhat higher port numbers versus possible NAT issue diff --git a/net/vsftpd/Makefile b/net/vsftpd/Makefile index da50698..e41cf22 100644 --- a/net/vsftpd/Makefile +++ b/net/vsftpd/Makefile @@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vsftpd PKG_VERSION:=3.0.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://security.appspot.com/downloads/ -PKG_MD5SUM:=da119d084bd3f98664636ea05b5bb398 +PKG_HASH:=9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7 PKG_LICENSE:=GPLv2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) @@ -24,8 +24,8 @@ define Package/vsftpd/Default SUBMENU:=File Transfer SECTION:=net CATEGORY:=Network - TITLE:=A fast and secure FTP server - URL:=http://vsftpd.beasts.org/ + TITLE:=Fast and secure FTP server + URL:=https://security.appspot.com/vsftpd.html MAINTAINER:=Cezary Jackiewicz endef @@ -45,6 +45,7 @@ endef define Package/vsftpd/conffiles /etc/vsftpd.conf +/etc/vsftpd endef Package/vsftpd-tls/conffiles=$(Package/vsftpd/conffiles) @@ -55,6 +56,8 @@ else NLSSTRING:=-lcrypt -lnsl endif +TARGET_CFLAGS += -D_GNU_SOURCE -include fcntl.h + ifeq ($(BUILD_VARIANT),notls) define Build/Compile $(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile @@ -86,6 +89,7 @@ define Package/vsftpd/install $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/vsftpd endef Package/vsftpd-tls/install=$(Package/vsftpd/install) diff --git a/net/vsftpd/files/vsftpd.conf b/net/vsftpd/files/vsftpd.conf index 7d46506..e06ac35 100644 --- a/net/vsftpd/files/vsftpd.conf +++ b/net/vsftpd/files/vsftpd.conf @@ -11,13 +11,13 @@ session_support=NO #syslog_enable=YES #userlist_enable=YES #userlist_deny=NO -#userlist_file=/etc/vsftpd.users +#userlist_file=/etc/vsftpd/vsftpd.users #xferlog_enable=YES #xferlog_file=/var/log/vsftpd.log #xferlog_std_format=YES ### ### TLS/SSL options -### example key generation: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/config/vsftpd_privkey.pem -out /etc/config/vsftpd_cert.pem -subj /C="DE"/ST="Saxony"/L="Leipzig"/CN="OpenWrt" +### example key generation: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/vsftpd/vsftpd_privkey.pem -out /etc/vsftpd/vsftpd_cert.pem -subj /C="DE"/ST="Saxony"/L="Leipzig"/CN="OpenWrt" #ssl_enable=YES #allow_anon_ssl=NO #force_local_data_ssl=NO @@ -25,6 +25,6 @@ session_support=NO #ssl_tlsv1=YES #ssl_sslv2=NO #ssl_sslv3=NO -#rsa_cert_file=/etc/config/vsftpd_cert.pem -#rsa_private_key_file=/etc/config/vsftpd_privkey.pem +#rsa_cert_file=/etc/vsftpd/vsftpd_cert.pem +#rsa_private_key_file=/etc/vsftpd/vsftpd_privkey.pem diff --git a/net/wireguard/Makefile b/net/wireguard/Makefile index fa3acc7..8dacfeb 100644 --- a/net/wireguard/Makefile +++ b/net/wireguard/Makefile @@ -1,5 +1,7 @@ # +# Copyright (C) 2016 Jason A. Donenfeld # Copyright (C) 2016 Baptiste Jonglez +# Copyright (C) 2016-2017 Dan Luedtke # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,20 +11,19 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=wireguard -PKG_VERSION:=0.0.20161129 +PKG_VERSION:=0.0.20170115 PKG_RELEASE:=1 -PKG_SOURCE:=WireGuard-experimental-$(PKG_VERSION).tar.xz -# This is actually SHA256, but OpenWRT/LEDE will figure it out based on the length -PKG_MD5SUM:=7bdce3e56aaae91b195b8bbf7afc8d07f68632c997aa702c1ab84745c099d1b7 +PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/ -PKG_BUILD_DIR:=$(BUILD_DIR)/WireGuard-experimental-$(PKG_VERSION) +PKG_MD5SUM:=7e5f9f4699a2d4ace90d0df5d81bf0f67205ee08c45b95e0acc379bedef5ffe8 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_USE_MIPS16:=0 +PKG_BUILD_DIR:=$(BUILD_DIR)/WireGuard-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 # Wireguard's makefile needs this to know where to build the kernel module export KERNELDIR:=$(LINUX_DIR) @@ -33,7 +34,8 @@ define Package/wireguard/Default SECTION:=net CATEGORY:=Network URL:=https://www.wireguard.io - MAINTAINER:=Baptiste Jonglez + MAINTAINER:=Baptiste Jonglez , \ + Dan Luedtke endef define Package/wireguard/Default/description @@ -70,7 +72,7 @@ endef define Package/wireguard-tools $(call Package/wireguard/Default) TITLE:=Wireguard userspace control program (wg) - DEPENDS:=+libmnl +resolveip + DEPENDS:=+libmnl endef define Package/wireguard-tools/description @@ -92,9 +94,9 @@ define KernelPackage/wireguard CATEGORY:=Kernel modules SUBMENU:=Network Support TITLE:=Wireguard kernel module - DEPENDS:=@IPV6 +kmod-udptunnel4 +kmod-udptunnel6 +kmod-ipt-hashlimit + DEPENDS:=+IPV6:kmod-udptunnel6 +kmod-udptunnel4 +kmod-ipt-hashlimit FILES:= $(PKG_BUILD_DIR)/src/wireguard.$(LINUX_KMOD_SUFFIX) - AUTOLOAD:=$(call AutoLoad,33,wireguard) + AUTOLOAD:=$(call AutoProbe,wireguard) endef define KernelPackage/wireguard/description diff --git a/net/wireguard/files/wireguard.sh b/net/wireguard/files/wireguard.sh index 67fd1d1..2eb3024 100644 --- a/net/wireguard/files/wireguard.sh +++ b/net/wireguard/files/wireguard.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2016 Dan Luedtke +# Copyright 2016-2017 Dan Luedtke # Licensed to the public under the Apache License 2.0. @@ -83,27 +83,6 @@ proto_wireguard_setup_peer() { esac done fi - - #### FEATURE DISABLED - # proto_add_host_dependency() has failed with IPv6 addresses during tests. - # Endpoint dependency feature is disabled until the issue is fixed. - #### - # # endpoint dependency - # if [ "${endpoint_host}" ]; then - # endpoint_dependency=0 - # for ip in $(resolveip -t 10 "${endpoint_host}"); do - # echo "adding host depedency for ${ip} at ${config}" - # proto_add_host_dependency "${config}" "${ip}" - # endpoint_dependency=1 - # done - # if [ ${endpoint_dependency} -eq 0 ]; then - # echo "error resolving ${endpoint_host}!" - # sleep 5 - # proto_setup_failed "${config}" - # exit 1 - # fi - # fi - #### } @@ -121,6 +100,7 @@ proto_wireguard_setup() { config_load network config_get private_key "${config}" "private_key" config_get listen_port "${config}" "listen_port" + config_get addresses "${config}" "addresses" config_get mtu "${config}" "mtu" config_get preshared_key "${config}" "preshared_key" @@ -161,6 +141,33 @@ proto_wireguard_setup() { exit 1 fi + # add ip addresses + for address in ${addresses}; do + case "${address}" in + *:*/*) + proto_add_ipv6_address "${address%%/*}" "${address##*/}" + ;; + *.*/*) + proto_add_ipv4_address "${address%%/*}" "${address##*/}" + ;; + *:*) + proto_add_ipv6_address "${address%%/*}" "128" + ;; + *.*) + proto_add_ipv4_address "${address%%/*}" "32" + ;; + esac + done + + # endpoint dependency + wg show "${config}" endpoints | \ + sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \ + while IFS=$'\t ' read -r key address port; do + [ -n "${port}" ] || continue + echo "adding host depedency for ${address} at ${config}" + proto_add_host_dependency "${config}" "${address}" + done + proto_send_update "${config}" } diff --git a/net/xl2tpd/Makefile b/net/xl2tpd/Makefile index ae5a41b..50be12e 100644 --- a/net/xl2tpd/Makefile +++ b/net/xl2tpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xl2tpd PKG_VERSION:=devel-20151125 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=Yousong Zhou PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE diff --git a/net/xl2tpd/patches/200-xl2tpd-control-fix-xl2tpd-hanged-up-in-fopen.patch b/net/xl2tpd/patches/200-xl2tpd-control-fix-xl2tpd-hanged-up-in-fopen.patch new file mode 100644 index 0000000..8fa0fd3 --- /dev/null +++ b/net/xl2tpd/patches/200-xl2tpd-control-fix-xl2tpd-hanged-up-in-fopen.patch @@ -0,0 +1,92 @@ +From 97adf987cf230e47a4800c2f0a0940a1d0d98109 Mon Sep 17 00:00:00 2001 +From: wendy2001011 +Date: Thu, 9 Feb 2017 17:32:14 +0800 +Subject: [PATCH] xl2tpd-control: fix xl2tpd hanged up in "fopen" + +This is a fix for xl2tpd hanged up in "fopen" result fifo while working +on xl2tpd with OpenWrt. + +Root cause is as followings, +1. xl2tpd-control open result fifo ##fifo readers=1 +2. xl2tpd-control read result fifo +3. xl2tpd-control close result fifo ##fifo readers=0 +4. xl2tpd fopen result fifo ##xl2tpd is hanged up here to wait readers +5. xl2tpd-control unlink result fifo + +The fix replaces the order of "unlink" and "close" when cleaning up to +avoid hang up issue in fopen, and add the retry waiting when reading +result fifo. + +[Yousong Zhou: 2s as the timeout and 10ms as the check interval] +--- + xl2tpd-control.c | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/xl2tpd-control.c b/xl2tpd-control.c +index 9fcab76..b8bf822 100644 +--- a/xl2tpd-control.c ++++ b/xl2tpd-control.c +@@ -35,6 +35,7 @@ + + #define TUNNEL_REQUIRED 1 + #define TUNNEL_NOT_REQUIRED 0 ++#define TIMEOUT 2000000 //timeout is 2s + + char result_filename[128]; + int result_fd = -1; +@@ -149,9 +150,9 @@ void help() + void cleanup(void) + { + /* cleaning up */ +- if (result_fd >= 0) +- close (result_fd); + unlink (result_filename); ++ if (result_fd >= 0) ++ close (result_fd); + } + + int main (int argc, char *argv[]) +@@ -340,6 +341,7 @@ void print_error (int level, const char *fmt, ...) + va_end (args); + } + ++ + int read_result(int result_fd, char* buf, ssize_t size) + { + /* read result from result_fd */ +@@ -348,6 +350,11 @@ int read_result(int result_fd, char* buf, ssize_t size) + */ + ssize_t readed = 0; + ssize_t len; ++ int write_pipe = 0; ++ struct timeval tvs; ++ struct timeval tve; ++ unsigned long diff; ++ gettimeofday(&tvs, NULL); + + do + { +@@ -360,8 +367,20 @@ int read_result(int result_fd, char* buf, ssize_t size) + "error: can't read command result: %s\n", strerror (errno)); + break; + } else if (len == 0) { ++ if(!write_pipe) { ++ gettimeofday(&tve, NULL); ++ diff = (tve.tv_sec - tvs.tv_sec) * 1000000 + (tve.tv_usec - tvs.tv_usec); ++ if (diff >= TIMEOUT) { ++ print_error (DEBUG_LEVEL, "error: read timout\n"); ++ break; ++ } else { ++ usleep(10000); ++ continue; ++ } ++ } + break; + } else { ++ write_pipe = 1; + readed += len; + if ((size - readed) <= 0) + break; +-- +2.6.4 + diff --git a/net/zerotier/Config.in b/net/zerotier/Config.in new file mode 100644 index 0000000..dd6f2ca --- /dev/null +++ b/net/zerotier/Config.in @@ -0,0 +1,24 @@ +menu "Configuration" + depends on PACKAGE_zerotier + +config ZEROTIER_ENABLE_DEBUG + bool "Build in debug mode" + depends on PACKAGE_zerotier + default n + +config ZEROTIER_USE_MINIUPNPC + bool "Build with MiniUPnPc" + depends on PACKAGE_zerotier + default n + +config ZEROTIER_ENABLE_NETWORK_CONTROLLER + bool "Build with network controller" + depends on PACKAGE_zerotier + default n + +config ZEROTIER_ENABLE_SELFTEST + bool "Build a self test program" + depends on PACKAGE_zerotier + default n + +endmenu diff --git a/net/zerotier/Makefile b/net/zerotier/Makefile new file mode 100644 index 0000000..f838ffc --- /dev/null +++ b/net/zerotier/Makefile @@ -0,0 +1,87 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=zerotier +PKG_VERSION:=1.1.14 +PKG_RELEASE:=4 + +PKG_LICENSE:=GPL-3.0 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne +PKG_SOURCE_SUBDIR:=ZeroTierOne-$(PKG_VERSION) +PKG_SOURCE_VERSION:=ae491c277e6f35d1acbdcbf700e2b834957295ae +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MIRROR_MD5SUM:=c8c3219c995a59161832d580a194f6280de7a4eef75cebece6f38400b64f003e +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) + +PKG_BUILD_DEPENDS:=uclibcxx +PKG_BUILD_PARALLEL:=1 +include $(INCLUDE_DIR)/package.mk + +define Package/zerotier + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread +kmod-tun +ip +ZEROTIER_ENABLE_NETWORK_CONTROLLER:libsqlite3 +ZEROTIER_USE_MINIUPNPC:libminiupnpc +ZEROTIER_USE_MINIUPNPC:libnatpmp + TITLE:=Create flat virtual Ethernet networks of almost unlimited size + URL:=https://www.zerotier.com + SUBMENU:=VPN + MAINTAINER:=Moritz Warning +endef + +define Package/zerotier/description + ZeroTier creates a global provider-independent virtual private cloud network. +endef + +define Package/zerotier/config + source "$(SOURCE)/Config.in" +endef + +ifeq ($(CONFIG_ZEROTIER_ENABLE_NETWORK_CONTROLLER),y) +MAKE_FLAGS += ZT_ENABLE_NETWORK_CONTROLLER=1 +MAKE_FLAGS += LDLIBS+=" -lsqlite3 " +endif + +ifeq ($(CONFIG_ZEROTIER_USE_MINIUPNPC),y) +MAKE_FLAGS += ZT_USE_MINIUPNPC=1 +endif + +ifeq ($(CONFIG_ZEROTIER_ENABLE_DEBUG),y) +TARGET_CXXFLAGS += -DZT_TRACE -ggdb3 +endif + +MAKE_FLAGS += \ + DEFS="" \ + LDFLAGS+=" -L$(STAGING_DIR)/usr/lib/uClibc++ -pthread " \ + LDLIBS+=" -fno-builtin -nodefaultlibs -Wl,-Bstatic -luClibc++ -Wl,-Bdynamic -lpthread -lm -lc -lsupc++ -lc -lgcc -lgcc_eh -lgcc_s -lssp_nonshared " \ + CXXFLAGS+=" -fno-builtin -nostdinc++ -I$(STAGING_DIR)/usr/include/uClibc++ -DGCC_HASCLASSVISIBILITY -Wall -fPIE -fvisibility=hidden " + +define Build/Compile + $(call Build/Compile/Default,one) +ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y) + $(call Build/Compile/Default,selftest) +endif +endef + +define Package/zerotier/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/ + $(LN) zerotier-one $(1)/usr/bin/zerotier-cli + $(LN) zerotier-one $(1)/usr/bin//zerotier-idtool + +ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y) + $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/ +endif + + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) files/zerotier.init $(1)/etc/init.d/zerotier + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) files/zerotier.config $(1)/etc/config/zerotier +endef + +$(eval $(call BuildPackage,zerotier)) + diff --git a/net/zerotier/files/zerotier.config b/net/zerotier/files/zerotier.config new file mode 100644 index 0000000..d9c33de --- /dev/null +++ b/net/zerotier/files/zerotier.config @@ -0,0 +1,7 @@ + +config zerotier sample_config + option enabled 1 + option interface 'wan' # restart ZT when wan status changed + #option port '9993' + option secret 'generate' # generate secret on first start + list join '8056c2e21c000001' # a public network called Earth diff --git a/net/zerotier/files/zerotier.init b/net/zerotier/files/zerotier.init new file mode 100644 index 0000000..dd18327 --- /dev/null +++ b/net/zerotier/files/zerotier.init @@ -0,0 +1,71 @@ +#!/bin/sh /etc/rc.common + +START=90 + +USE_PROCD=1 + +LIST_SEP=" +" +ZT_COMMAND=/usr/bin/zerotier-one + +section_enabled() { + config_get_bool enabled "$1" 'enabled' 0 + [ $enabled -gt 0 ] +} + +start_instance() { + local cfg="$1" + local port secret interface + local ARGS="" + + section_enabled "$cfg" || return 1 + + mkdir -p /var/lib/zerotier-one/networks.d/ + + config_get_bool port $cfg 'port' + config_get secret $cfg 'secret' + config_get interface $cfg 'interface' + + if [ -n "$port" ]; then + ARGS="$ARGS -p$port" + fi + + if [ "$secret" = "generate" ]; then + echo "Generate secret - please wait..." + local tmp="/tmp/zt.$cfg.secret" + zerotier-idtool generate "$tmp" > /dev/null + secret="$(cat $tmp)" + rm "$tmp" + + uci set zerotier.$cfg.secret="$secret" + uci commit zerotier + fi + + if [ -n "$secret" ]; then + echo "$secret" > /var/lib/zerotier-one/identity.secret + #make sure there is not previous dentity.public + rm -f /var/lib/zerotier-one/identity.public + fi + + add_join() { + #an (empty) config file will cause ZT to join a network + touch /var/lib/zerotier-one/networks.d/$1.conf + } + + config_list_foreach $cfg 'join' add_join + + procd_open_instance + procd_add_reload_interface_trigger "$interface" + procd_set_param command $ZT_COMMAND $ARGS + procd_set_param nice -10 + procd_close_instance +} + +service_triggers() { + procd_add_reload_trigger zerotier +} + +start_service() { + config_load 'zerotier' + config_foreach start_instance 'zerotier' +} diff --git a/net/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch b/net/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch new file mode 100644 index 0000000..119491f --- /dev/null +++ b/net/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch @@ -0,0 +1,44 @@ +From 830250759cd4c14ca2ae5ddf24f0a0427f258622 Mon Sep 17 00:00:00 2001 +From: Adam Ierymenko +Date: Tue, 26 Jul 2016 16:36:20 -0700 +Subject: [PATCH 1/2] Fix for running under MUSL libc (e.g. Alpine Linux) + +--- + osdep/Thread.hpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/osdep/Thread.hpp b/osdep/Thread.hpp +index 7fb38d8..4f90dc0 100644 +--- a/osdep/Thread.hpp ++++ b/osdep/Thread.hpp +@@ -125,6 +125,10 @@ public: + throw() + { + memset(&_tid,0,sizeof(_tid)); ++ pthread_attr_init(&_tattr); ++#ifdef __LINUX__ ++ pthread_attr_setstacksize(&_tattr,8388608); // for MUSL libc and others, has no effect in normal glibc environments ++#endif + _started = false; + } + +@@ -157,7 +161,7 @@ public: + { + Thread t; + t._started = true; +- if (pthread_create(&t._tid,(const pthread_attr_t *)0,&___zt_threadMain,instance)) ++ if (pthread_create(&t._tid,&t._tattr,&___zt_threadMain,instance)) + throw std::runtime_error("pthread_create() failed, unable to create thread"); + return t; + } +@@ -184,6 +188,7 @@ public: + + private: + pthread_t _tid; ++ pthread_attr_t _tattr; + volatile bool _started; + }; + +-- +2.9.0 + diff --git a/net/zerotier/patches/0002-fix-build.patch b/net/zerotier/patches/0002-fix-build.patch new file mode 100644 index 0000000..34088c8 --- /dev/null +++ b/net/zerotier/patches/0002-fix-build.patch @@ -0,0 +1,51 @@ +From 333bbabc6dfad0553fb63d560ab6442a50cc9e52 Mon Sep 17 00:00:00 2001 +From: Moritz Warning +Date: Fri, 22 Jul 2016 23:27:31 +0200 +Subject: [PATCH 2/2] fix build + +--- + make-linux.mk | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -39,24 +39,24 @@ include objects.mk + + # On Linux we auto-detect the presence of some libraries and if present we + # link against the system version. This works with our package build images. +-ifeq ($(wildcard /usr/include/lz4.h),) ++#ifeq ($(wildcard $(STAGING_DIR)/usr/include/lz4.h),) + OBJS+=ext/lz4/lz4.o +-else +- LDLIBS+=-llz4 +- DEFS+=-DZT_USE_SYSTEM_LZ4 +-endif +-ifeq ($(wildcard /usr/include/http_parser.h),) ++#else ++# LDLIBS+=-llz4 ++# DEFS+=-DZT_USE_SYSTEM_LZ4 ++#endif ++#ifeq ($(wildcard $(STAGING_DIR)/usr/include/http_parser.h),) + OBJS+=ext/http-parser/http_parser.o +-else +- LDLIBS+=-lhttp_parser +- DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER +-endif +-ifeq ($(wildcard /usr/include/json-parser/json.h),) ++#else ++# LDLIBS+=-lhttp_parser ++# DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER ++#endif ++#ifeq ($(wildcard $(STAGING_DIR)/usr/include/json-parser/json.h),) + OBJS+=ext/json-parser/json.o +-else +- LDLIBS+=-ljsonparser +- DEFS+=-DZT_USE_SYSTEM_JSON_PARSER +-endif ++#else ++# LDLIBS+=-ljsonparser ++# DEFS+=-DZT_USE_SYSTEM_JSON_PARSER ++#endif + + ifeq ($(ZT_USE_MINIUPNPC),1) + OBJS+=osdep/PortMapper.o diff --git a/net/zerotier/patches/0003-workaround_to_avoid_seg_faults.patch b/net/zerotier/patches/0003-workaround_to_avoid_seg_faults.patch new file mode 100644 index 0000000..e27f872 --- /dev/null +++ b/net/zerotier/patches/0003-workaround_to_avoid_seg_faults.patch @@ -0,0 +1,27 @@ +From 21f4958bd48cae59b478b1b3445e00fa4fb18991 Mon Sep 17 00:00:00 2001 +From: muebau +Date: Fri, 5 Aug 2016 19:22:45 +0200 +Subject: [PATCH] OpenWRT workaround to avoid seg faults + +--- + service/OneService.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/service/OneService.cpp b/service/OneService.cpp +index 13820f5..9ba3238 100644 +--- a/service/OneService.cpp ++++ b/service/OneService.cpp +@@ -862,8 +862,8 @@ public: + } + + // Start two background threads to handle expensive ops out of line +- Thread::start(_node); +- Thread::start(_node); ++ //Thread::start(_node); ++ //Thread::start(_node); + + _nextBackgroundTaskDeadline = 0; + uint64_t clockShouldBe = OSUtils::now(); +-- +2.7.4 + diff --git a/net/zerotier/patches/0005-use-external-miniupnpc-and-natpmp.patch b/net/zerotier/patches/0005-use-external-miniupnpc-and-natpmp.patch new file mode 100644 index 0000000..377abef --- /dev/null +++ b/net/zerotier/patches/0005-use-external-miniupnpc-and-natpmp.patch @@ -0,0 +1,32 @@ +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -64,7 +64,8 @@ ifeq ($(ZT_USE_MINIUPNPC),1) + DEFS+=-DZT_USE_MINIUPNPC + + # Auto-detect libminiupnpc at least v2.0 +- MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1) ++ #MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1) ++ MINIUPNPC_IS_NEW_ENOUGH=1 + ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1) + DEFS+=-DZT_USE_SYSTEM_MINIUPNPC + LDLIBS+=-lminiupnpc +@@ -74,7 +75,7 @@ ifeq ($(ZT_USE_MINIUPNPC),1) + endif + + # Auto-detect libnatpmp +- ifeq ($(wildcard /usr/include/natpmp.h),) ++ ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),) + OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o + else + LDLIBS+=-lnatpmp +--- a/osdep/PortMapper.cpp ++++ b/osdep/PortMapper.cpp +@@ -180,7 +180,7 @@ public: + struct IGDdatas data; + + int upnpError = 0; +- UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,2,&upnpError); ++ UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,&upnpError); + if (devlist) { + + #ifdef ZT_PORTMAPPER_TRACE diff --git a/sound/mocp/Makefile b/sound/mocp/Makefile index 0c446fc..93f9c6f 100644 --- a/sound/mocp/Makefile +++ b/sound/mocp/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2011-2015 OpenWrt.org +# Copyright (C) 2011-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=moc -PKG_VERSION:=2.5.0 -PKG_RELEASE:=2 +PKG_VERSION:=2.5.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://ftp.daper.net/pub/soft/moc/stable/ -PKG_MD5SUM:=18e3a979b67091bfee4b62217908c473 +PKG_MD5SUM:=f3a68115602a4788b7cfa9bbe9397a9d5e24c68cb61a57695d1c2c3ecf49db08 PKG_MAINTAINER:=Ted Hess diff --git a/sound/pianod/Makefile b/sound/pianod/Makefile index 7fb48a9..e92ae64 100644 --- a/sound/pianod/Makefile +++ b/sound/pianod/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015-2017 Ted Hess # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pianod -PKG_VERSION:=174 -PKG_RELEASE:=2 +PKG_VERSION:=174.05 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://deviousfish.com/Downloads/pianod/ -PKG_MD5SUM:=cca2143e4a5301dea8c0cb9fcbd20881 +PKG_SOURCE_URL:=https://github.com/thess/pianod-sc/releases/download/$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MD5SUM:=0bae19b0c1e309343bc1b351e521173fe439431542a949dd2bacf4165cce5200 PKG_MAINTAINER:=Ted Hess @@ -28,10 +28,10 @@ include $(INCLUDE_DIR)/package.mk define Package/pianod SECTION:=sound CATEGORY:=Sound - DEPENDS:=+libao +libfaad2 +libmad +libpolarssl +libjson-c +libgcrypt +libpthread + DEPENDS:=+libao +libfaad2 +libmad +libmbedtls +libjson-c +libgcrypt +libpthread TITLE:=Pandora radio daemon USERID:=pianod=88:pianod=88 - URL:=http://deviousfish.com/pianod/ + URL:=http://deviousfish.com/pianod1/ endef define Package/pianod/description @@ -39,7 +39,7 @@ define Package/pianod/description A simple protocol makes for easy clients, mix scripting, integration with a home automation system, use as multiple-user music system for home or office. Documentation and configuration information can be found at: - http://deviousfish.com/pianod/ + http://deviousfish.com/pianod1/ endef define Package/pianod-client @@ -47,7 +47,7 @@ define Package/pianod-client CATEGORY:=Sound DEPENDS:=+pianod TITLE:=Pandora radio daemon WebUI - URL:=http://deviousfish.com/pianod/ + URL:=http://deviousfish.com/pianod1/ endef define Package/pianod-client/description @@ -58,12 +58,12 @@ define Package/pianod-client/description http://pianod-host:4446/pianod/viewer.html?server=pianod-host:4446 endef -CONFIGURE_ARGS+= --with-polarssl +CONFIGURE_ARGS+= --with-mbedtls PIANOD_CLIENT:=pianod-client-compiled-51.tar.gz define Download/pianod-client - URL:=$(PKG_SOURCE_URL) + URL:=http://deviousfish.com/Downloads/pianod/ FILE:=$(PIANOD_CLIENT) MD5SUM:=abbdee5627bcee6a00c8304da8b4e2e7 endef diff --git a/sound/pianod/patches/005-Remove_svn_version_query.patch b/sound/pianod/patches/005-Remove_svn_version_query.patch deleted file mode 100644 index 0ffd3a6..0000000 --- a/sound/pianod/patches/005-Remove_svn_version_query.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -3,7 +3,7 @@ - - AC_PREREQ([2.69]) - AC_INIT([pianod], -- m4_esyscmd([svn info http://svn.deviousfish.com/pianod | grep Revision: | awk '{print $2}' | tr -d '\n']), -+ 174-OpenWrt, - [pianod@lists.deviousfish.com], - ,[http://deviousfish.com/pianod]) - AM_INIT_AUTOMAKE([foreign -Wall -Werror]) diff --git a/sound/pianod/patches/010-Configure_add_SSL_options.patch b/sound/pianod/patches/010-Configure_add_SSL_options.patch deleted file mode 100644 index 2c26779..0000000 --- a/sound/pianod/patches/010-Configure_add_SSL_options.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -31,8 +31,6 @@ AC_CHECK_LIB([pthread], [pthread_create] - # with it, but don't consider it an error. - # PKG_CHECK_MODULES only validates that pkg-config returns stuff; it doesn't - # validate that these are correct, so check lib to make sure they're right. --PKG_CHECK_MODULES([gnutls], [gnutls],, -- [AC_MSG_WARN([No pkg-config for libgnutls])]) - PKG_CHECK_MODULES([ao], [ao],, - [AC_MSG_WARN([No pkg-config for libao])]) - PKG_CHECK_MODULES([mad], [mad],, -@@ -42,12 +40,28 @@ PKG_CHECK_MODULES([json], [json-c],, - [PKG_CHECK_MODULES([json], [json0],, - [AC_MSG_WARN([No pkg-config for json-c (aka libjson0, libjson)])])])]) - -+ - # Network communication stuff: - AC_CHECK_LIB([gcrypt], [gcry_cipher_open],, - [AC_MSG_ERROR([Cannot find required library: libgcrypt],1)]) --AC_CHECK_LIB([gnutls], [gnutls_record_recv],, -+# Check for SSL option -+AC_ARG_WITH(polarssl, [ --with-polarssl Build waitress with PolarSSL (default GNUTLS)], [ -+ AC_MSG_RESULT(>>Using PolarSSL) -+ HAS_POLARSSL=1 -+ AC_DEFINE([USE_POLARSSL], 1, [Build for PolarSSL]) -+ PKG_CHECK_MODULES([polarssl], [polarssl],, -+ [AC_MSG_WARN([No pkg-config for libpolarssl])]) -+ AC_CHECK_LIB([polarssl], [ssl_set_session],, -+ [AC_MSG_ERROR([Cannot find required library: libpolarssl (aka polarssl)],1)])] ) -+AM_CONDITIONAL([USE_POLARSSL],[test "x$HAS_POLARSSL" = "x1"]) -+ -+if test "x$HAS_POLARSSL" != x1 ; then -+ PKG_CHECK_MODULES([gnutls], [gnutls],, -+ [AC_MSG_WARN([No pkg-config for libgnutls])]) -+ AC_CHECK_LIB([gnutls], [gnutls_record_recv],, - [AC_MSG_ERROR([Cannot find required library: libgnutls (aka gnutls)],1)]) --AC_CHECK_FUNCS(gnutls_transport_set_int2 gnutls_sec_param_to_pk_bits) -+ AC_CHECK_FUNCS(gnutls_transport_set_int2 gnutls_sec_param_to_pk_bits) -+fi - - # Bloody json library may be linked via -ljson, or -ljson-c depending on - # the platform. Try both. diff --git a/sound/pianod/patches/020-Use_package_config_h_for_all_modules.patch b/sound/pianod/patches/020-Use_package_config_h_for_all_modules.patch deleted file mode 100644 index 25569cc..0000000 --- a/sound/pianod/patches/020-Use_package_config_h_for_all_modules.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- a/src/libpiano/config.h -+++ /dev/null -@@ -1 +0,0 @@ --#define PACKAGE "libpiano" ---- a/src/libwaitress/config.h -+++ /dev/null -@@ -1 +0,0 @@ --#define PACKAGE "libwaitress" ---- a/src/libpiano/piano.h -+++ b/src/libpiano/piano.h -@@ -39,6 +39,8 @@ THE SOFTWARE. - * http://pan-do-ra-api.wikia.com - */ - -+#define LIBPIANO_NAME "libpiano" -+ - #define PIANO_RPC_HOST "tuner.pandora.com" - #define PIANO_RPC_PATH "/services/json/?" - ---- a/src/libwaitress/waitress.c -+++ b/src/libwaitress/waitress.c -@@ -922,14 +922,14 @@ static WaitressReturn_t WaitressSendRequ - if (WaitressProxyEnabled (waith) && !waith->url.tls) { - snprintf (buf, WAITRESS_BUFFER_SIZE, - "%s http://%s:%s/%s HTTP/" WAITRESS_HTTP_VERSION "\r\n" -- "Host: %s\r\nUser-Agent: " PACKAGE "\r\nConnection: Close\r\n", -+ "Host: %s\r\nUser-Agent: " LIBWAITRESS_NAME "\r\nConnection: Close\r\n", - (waith->method == WAITRESS_METHOD_GET ? "GET" : "POST"), - waith->url.host, - WaitressDefaultPort (&waith->url), path, waith->url.host); - } else { - snprintf (buf, WAITRESS_BUFFER_SIZE, - "%s /%s HTTP/" WAITRESS_HTTP_VERSION "\r\n" -- "Host: %s\r\nUser-Agent: " PACKAGE "\r\nConnection: Close\r\n", -+ "Host: %s\r\nUser-Agent: " LIBWAITRESS_NAME "\r\nConnection: Close\r\n", - (waith->method == WAITRESS_METHOD_GET ? "GET" : "POST"), - path, waith->url.host); - } ---- a/src/libwaitress/waitress.h -+++ b/src/libwaitress/waitress.h -@@ -29,6 +29,8 @@ THE SOFTWARE. - #include - #include - -+#define LIBWAITRESS_NAME "libwaitress" -+ - #define WAITRESS_BUFFER_SIZE 10*1024 - - typedef enum { ---- a/src/libpiano/request.c -+++ b/src/libpiano/request.c -@@ -40,6 +40,7 @@ THE SOFTWARE. - #include - #include - /* needed for urlencode */ -+#include - #include - - #include "piano.h" diff --git a/sound/pianod/patches/030-Waitress_add_polarssl_variant.patch b/sound/pianod/patches/030-Waitress_add_polarssl_variant.patch deleted file mode 100644 index ad27e9b..0000000 --- a/sound/pianod/patches/030-Waitress_add_polarssl_variant.patch +++ /dev/null @@ -1,333 +0,0 @@ ---- a/src/libwaitress/waitress.h -+++ b/src/libwaitress/waitress.h -@@ -27,7 +27,12 @@ THE SOFTWARE. - #include - #include - #include -+ -+#if defined(USE_POLARSSL) -+typedef struct _polarssl_ctx polarssl_ctx; -+#else - #include -+#endif - - #define LIBWAITRESS_NAME "libwaitress" - -@@ -102,8 +107,9 @@ typedef struct { - WaitressUrl_t url; - WaitressUrl_t proxy; - -+#if !defined(USE_POLARSSL) - gnutls_certificate_credentials_t tlsCred; -- -+#endif - /* per-request data */ - struct { - int sockfd; -@@ -121,7 +127,11 @@ typedef struct { - WaitressReturn_t (*read) (void *, char *, const size_t, size_t *); - WaitressReturn_t (*write) (void *, const char *, const size_t); - -+#if defined(USE_POLARSSL) -+ polarssl_ctx* sslCtx; -+#else - gnutls_session_t tlsSession; -+#endif - } request; - } WaitressHandle_t; - ---- a/src/pianod.c -+++ b/src/pianod.c -@@ -531,8 +531,11 @@ static bool initialize_libraries (APPSTA - gcry_check_version (NULL); - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); -+ -+#if !defined(USE_POLARSSL) - int crystatus = gnutls_global_init (); - if (crystatus == GNUTLS_E_SUCCESS) { -+#endif - PianoReturn_t status = PianoInit (&app->ph, app->settings.partnerUser, app->settings.partnerPassword, - app->settings.device, app->settings.inkey, app->settings.outkey); - if (status == PIANO_RET_OK) { -@@ -545,11 +548,13 @@ static bool initialize_libraries (APPSTA - } else { - flog (LOG_ERROR, "initialize_libraries: PianoInit: %s", PianoErrorToStr (status)); - } -+#if !defined(USE_POLARSSL) - gnutls_global_deinit (); - } else { - flog (LOG_ERROR, "initialize_libraries: gnutls_global_init: %s", gcry_strerror (crystatus)); - - } -+#endif - return false; - } - -@@ -728,7 +733,9 @@ int main (int argc, char **argv) { - PianoDestroyPlaylist (app.song_history); - PianoDestroyPlaylist (app.playlist); - WaitressFree (&app.waith); -+#if !defined(USE_POLARSSL) - gnutls_global_deinit (); -+#endif - settings_destroy (&app.settings); - } - ---- a/src/libwaitress/waitress.c -+++ b/src/libwaitress/waitress.c -@@ -41,11 +41,33 @@ THE SOFTWARE. - #include - #include - --#include - - #include "config.h" - #include "waitress.h" - -+#if defined(USE_POLARSSL) -+ -+#include -+#include -+#include -+#include -+#include -+ -+struct _polarssl_ctx -+{ -+ ssl_context ssl; -+ ssl_session session; -+ entropy_context entrophy; -+ ctr_drbg_context rnd; -+}; -+ -+#else -+ -+// Use gnutls by default (USE_POLARSSL not defined) -+#include -+ -+#endif -+ - #define strcaseeq(a,b) (strcasecmp(a,b) == 0) - #define WAITRESS_HTTP_VERSION "1.1" - -@@ -56,6 +78,13 @@ typedef struct { - - static WaitressReturn_t WaitressReceiveHeaders (WaitressHandle_t *, size_t *); - -+// gnutls wants (void *) and polarssl want (unsigned char *) -+#if defined(USE_POLARSSL) -+#define BUFFER_CAST unsigned char -+#else -+#define BUFFER_CAST void -+#endif -+ - #define READ_RET(buf, count, size) \ - if ((wRet = waith->request.read (waith, buf, count, size)) != \ - WAITRESS_RET_OK) { \ -@@ -444,7 +473,7 @@ static int WaitressPollLoop (int fd, sho - * @param write count bytes - * @return number of written bytes or -1 on error - */ --static ssize_t WaitressPollWrite (void *data, const void *buf, size_t count) { -+static ssize_t WaitressPollWrite (void *data, const BUFFER_CAST *buf, size_t count) { - int pollres = -1; - ssize_t retSize; - WaitressHandle_t *waith = data; -@@ -478,13 +507,20 @@ static WaitressReturn_t WaitressOrdinary - return waith->request.readWriteRet; - } - --static WaitressReturn_t WaitressGnutlsWrite (void *data, const char *buf, -+static WaitressReturn_t WaitressTlsWrite (void *data, const char *buf, - const size_t size) { - WaitressHandle_t *waith = data; -+#if defined(USE_POLARSSL) -+ -+ if (ssl_write (&waith->request.sslCtx->ssl, buf, size) < 0) { -+ return WAITRESS_RET_TLS_WRITE_ERR; -+ } -+#else - - if (gnutls_record_send (waith->request.tlsSession, buf, size) < 0) { - return WAITRESS_RET_TLS_WRITE_ERR; - } -+#endif - return waith->request.readWriteRet; - } - -@@ -494,7 +530,7 @@ static WaitressReturn_t WaitressGnutlsWr - * @param buffer size - * @return number of read bytes or -1 on error - */ --static ssize_t WaitressPollRead (void *data, void *buf, size_t count) { -+static ssize_t WaitressPollRead (void *data, BUFFER_CAST *buf, size_t count) { - int pollres = -1; - ssize_t retSize; - WaitressHandle_t *waith = data; -@@ -531,16 +567,34 @@ static WaitressReturn_t WaitressOrdinary - return waith->request.readWriteRet; - } - --static WaitressReturn_t WaitressGnutlsRead (void *data, char *buf, -+static WaitressReturn_t WaitressTlsRead (void *data, char *buf, - const size_t size, size_t *retSize) { - WaitressHandle_t *waith = data; - -+#if defined(USE_POLARSSL) -+ int ret; -+ -+ *retSize = 0; -+ waith->request.readWriteRet = WAITRESS_RET_OK; -+ ret = ssl_read (&waith->request.sslCtx->ssl, buf, size); -+ -+ if (ret < 0) { -+ if (ret != POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY) { -+ waith->request.readWriteRet = WAITRESS_RET_TLS_READ_ERR; -+ } -+ -+ return waith->request.readWriteRet; -+ } -+ -+ *retSize = ret; -+#else - ssize_t ret = gnutls_record_recv (waith->request.tlsSession, buf, size); - if (ret < 0) { - return WAITRESS_RET_TLS_READ_ERR; - } else { - *retSize = ret; - } -+#endif - return waith->request.readWriteRet; - } - -@@ -727,10 +781,28 @@ static int WaitressParseStatusline (cons - /* verify server certificate - */ - static WaitressReturn_t WaitressTlsVerify (const WaitressHandle_t *waith) { -+ -+#if defined(USE_POLARSSL) -+ unsigned char fingerprint[20]; -+ -+ const x509_crt* cert = ssl_get_peer_cert (&waith->request.sslCtx->ssl); -+ -+ if (NULL == cert) { -+ return WAITRESS_RET_TLS_HANDSHAKE_ERR; -+ } -+ -+ sha1 (cert->raw.p, cert->raw.len, fingerprint); -+ -+ if (memcmp (fingerprint, waith->tlsFingerprint, sizeof (fingerprint)) != 0) { -+ return WAITRESS_RET_TLS_FINGERPRINT_MISMATCH; -+ } -+ -+#else - gnutls_session_t session = waith->request.tlsSession; - unsigned int certListSize; - const gnutls_datum_t *certList; - gnutls_x509_crt_t cert; -+ char fingerprint[20]; - - if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) { - return WAITRESS_RET_TLS_HANDSHAKE_ERR; -@@ -750,7 +822,6 @@ static WaitressReturn_t WaitressTlsVerif - return WAITRESS_RET_TLS_HANDSHAKE_ERR; - } - -- char fingerprint[20]; - size_t fingerprintSize = sizeof (fingerprint); - if (gnutls_x509_crt_get_fingerprint (cert, GNUTLS_DIG_SHA1, fingerprint, - &fingerprintSize) != 0) { -@@ -763,7 +834,7 @@ static WaitressReturn_t WaitressTlsVerif - } - - gnutls_x509_crt_deinit (cert); -- -+#endif - return WAITRESS_RET_OK; - } - -@@ -880,6 +951,12 @@ static WaitressReturn_t WaitressConnect - } - } - -+#if defined(USE_POLARSSL) -+ ssl_set_hostname (&waith->request.sslCtx->ssl, waith->url.host); -+ if (ssl_handshake (&waith->request.sslCtx->ssl) != 0) { -+ return WAITRESS_RET_TLS_HANDSHAKE_ERR; -+ } -+#else - /* Ignore return code as connection will likely still succeed */ - gnutls_server_name_set (waith->request.tlsSession, GNUTLS_NAME_DNS, - waith->url.host, strlen (waith->url.host)); -@@ -887,14 +964,15 @@ static WaitressReturn_t WaitressConnect - if (gnutls_handshake (waith->request.tlsSession) != GNUTLS_E_SUCCESS) { - return WAITRESS_RET_TLS_HANDSHAKE_ERR; - } -+#endif - - if ((wRet = WaitressTlsVerify (waith)) != WAITRESS_RET_OK) { - return wRet; - } - - /* now we can talk encrypted */ -- waith->request.read = WaitressGnutlsRead; -- waith->request.write = WaitressGnutlsWrite; -+ waith->request.read = WaitressTlsRead; -+ waith->request.write = WaitressTlsWrite; - } - - return WAITRESS_RET_OK; -@@ -1120,6 +1198,21 @@ WaitressReturn_t WaitressFetchCall (Wait - waith->request.contentLengthKnown = false; - - if (waith->url.tls) { -+#if defined(USE_POLARSSL) -+ waith->request.sslCtx = calloc (1, sizeof(polarssl_ctx)); -+ -+ entropy_init (&waith->request.sslCtx->entrophy); -+ ctr_drbg_init (&waith->request.sslCtx->rnd, entropy_func, &waith->request.sslCtx->entrophy, "libwaitress", 11); -+ ssl_init (&waith->request.sslCtx->ssl); -+ -+ ssl_set_endpoint (&waith->request.sslCtx->ssl, SSL_IS_CLIENT); -+ ssl_set_authmode (&waith->request.sslCtx->ssl, SSL_VERIFY_NONE); -+ ssl_set_rng (&waith->request.sslCtx->ssl, ctr_drbg_random, &waith->request.sslCtx->rnd); -+ ssl_set_session (&waith->request.sslCtx->ssl, &waith->request.sslCtx->session); -+ ssl_set_bio (&waith->request.sslCtx->ssl, -+ WaitressPollRead, waith, -+ WaitressPollWrite, waith); -+#else - gnutls_init (&waith->request.tlsSession, GNUTLS_CLIENT); - gnutls_set_default_priority (waith->request.tlsSession); - -@@ -1137,6 +1230,7 @@ WaitressReturn_t WaitressFetchCall (Wait - WaitressPollRead); - gnutls_transport_set_push_function (waith->request.tlsSession, - WaitressPollWrite); -+#endif - } - - /* buffer is required for connect already */ -@@ -1148,15 +1242,22 @@ WaitressReturn_t WaitressFetchCall (Wait - if ((wRet = WaitressSendRequest (waith)) == WAITRESS_RET_OK) { - wRet = WaitressReceiveResponse (waith); - } -+#if !defined(USE_POLARSSL) - if (waith->url.tls) { - gnutls_bye (waith->request.tlsSession, GNUTLS_SHUT_RDWR); - } -+#endif - } - - /* cleanup */ - if (waith->url.tls) { -+#if defined(USE_POLARSSL) -+ ssl_free (&waith->request.sslCtx->ssl); -+ free (waith->request.sslCtx); -+#else - gnutls_deinit (waith->request.tlsSession); - gnutls_certificate_free_credentials (waith->tlsCred); -+#endif - } - if (waith->request.sockfd != -1) { - close (waith->request.sockfd); diff --git a/sound/shairport-sync/Makefile b/sound/shairport-sync/Makefile index 40e357b..abec421 100644 --- a/sound/shairport-sync/Makefile +++ b/sound/shairport-sync/Makefile @@ -1,6 +1,4 @@ # -# Copyright (C) 2015-2016 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # updated to work with latest source from abrasive @@ -10,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shairport-sync PKG_VERSION:=2.8.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=git://github.com/mikebrady/shairport-sync.git PKG_SOURCE_VERSION:=$(PKG_VERSION) PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_VERSION).tar.gz PKG_MAINTAINER:=Ted Hess , \ Mike Brady @@ -46,18 +44,18 @@ define Package/shairport-sync-openssl VARIANT:=openssl endef -define Package/shairport-sync-polarssl +define Package/shairport-sync-mbedtls $(Package/shairport-sync/default) - TITLE+= (polarssl) - DEPENDS+= +libpolarssl +libavahi-client +libsoxr - VARIANT:=polarssl + TITLE+= (mbed TLS) + DEPENDS+= +libmbedtls +libavahi-client +libsoxr + VARIANT:=mbedtls DEFAULT_VARIANT:=1 endef define Package/shairport-sync-mini $(Package/shairport-sync/default) TITLE+= (minimal) - DEPENDS+= +libpolarssl + DEPENDS+= +libmbedtls VARIANT:=mini endef @@ -72,12 +70,12 @@ define Package/shairport-sync/default/description Also select kmod-usb-audio if you want to use USB-connected sound cards. endef Package/shairport-sync-openssl/description = $(Package/shairport-sync/default/description) -Package/shairport-sync-polarssl/description = $(Package/shairport-sync/default/description) +Package/shairport-sync-mbedtls/description = $(Package/shairport-sync/default/description) define Package/shairport-sync-mini/description $(Package/shairport-sync/default/description) - Minimal version uses PolarSSL and does not include libsoxr and avahi support. + Minimal version uses mbed TLS and does not include libsoxr and avahi support. endef CONFIGURE_ARGS+= \ @@ -88,12 +86,12 @@ ifeq ($(BUILD_VARIANT),openssl) CONFIGURE_ARGS+= --with-ssl=openssl endif -ifeq ($(BUILD_VARIANT),polarssl) - CONFIGURE_ARGS+= --with-ssl=polarssl +ifeq ($(BUILD_VARIANT),mbedtls) + CONFIGURE_ARGS+= --with-ssl=mbedtls endif ifeq ($(BUILD_VARIANT),mini) - CONFIGURE_ARGS+= --with-ssl=polarssl --with-tinysvcmdns + CONFIGURE_ARGS+= --with-ssl=mbedtls --with-tinysvcmdns else CONFIGURE_ARGS+= --with-avahi --with-soxr endif @@ -103,7 +101,7 @@ define Package/shairport-sync/default/conffiles endef Package/shairport-sync-openssl/conffiles = $(Package/shairport-sync/default/conffiles) -Package/shairport-sync-polarssl/conffiles = $(Package/shairport-sync/default/conffiles) +Package/shairport-sync-mbedtls/conffiles = $(Package/shairport-sync/default/conffiles) Package/shairport-sync-mini/conffiles = $(Package/shairport-sync/default/conffiles) define Package/shairport-sync/default/install @@ -118,9 +116,9 @@ define Package/shairport-sync/default/install endef Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install) -Package/shairport-sync-polarssl/install = $(Package/shairport-sync/default/install) +Package/shairport-sync-mbedtls/install = $(Package/shairport-sync/default/install) Package/shairport-sync-mini/install = $(Package/shairport-sync/default/install) $(eval $(call BuildPackage,shairport-sync-openssl)) -$(eval $(call BuildPackage,shairport-sync-polarssl)) +$(eval $(call BuildPackage,shairport-sync-mbedtls)) $(eval $(call BuildPackage,shairport-sync-mini)) diff --git a/sound/shairport-sync/patches/100-replace_polarssl_with_mbedtls.patch b/sound/shairport-sync/patches/100-replace_polarssl_with_mbedtls.patch new file mode 100644 index 0000000..984eb4c --- /dev/null +++ b/sound/shairport-sync/patches/100-replace_polarssl_with_mbedtls.patch @@ -0,0 +1,395 @@ +diff --git a/common.c b/common.c +index bf72127..2d4739e 100644 +--- a/common.c ++++ b/common.c +@@ -54,17 +54,14 @@ + #include + #endif + +-#ifdef HAVE_LIBPOLARSSL +-#include +-#include +-#include +-#include +-#include "polarssl/entropy.h" +-#include "polarssl/ctr_drbg.h" +- +-#if POLARSSL_VERSION_NUMBER >= 0x01030000 +-#include "polarssl/compat-1.2.h" +-#endif ++#ifdef HAVE_LIBMBEDTLS ++#include ++#include ++#include ++#include ++#include "mbedtls/entropy.h" ++#include "mbedtls/ctr_drbg.h" ++ + #endif + + #include "common.h" +@@ -126,16 +123,16 @@ void inform(char *format, ...) { + daemon_log(LOG_INFO, "%s", s); + } + +-#ifdef HAVE_LIBPOLARSSL ++#ifdef HAVE_LIBMBEDTLS + char *base64_enc(uint8_t *input, int length) { + char *buf = NULL; + size_t dlen = 0; +- int rc = base64_encode(NULL, &dlen, input, length); +- if (rc && (rc != POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL)) ++ int rc = mbedtls_base64_encode(NULL, 0, &dlen, input, length); ++ if (rc && (rc != MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL)) + debug(1, "Error %d getting length of base64 encode.", rc); + else { + buf = (char *)malloc(dlen); +- rc = base64_encode((unsigned char *)buf, &dlen, input, length); ++ rc = mbedtls_base64_encode((unsigned char *)buf, dlen, &dlen, input, length); + if (rc != 0) + debug(1, "Error %d encoding base64.", rc); + } +@@ -156,10 +153,10 @@ uint8_t *base64_dec(char *input, int *outlen) { + else { + strcpy(inbuf, input); + strcat(inbuf, "==="); +- // debug(1,"base64_dec called with string \"%s\", length %d, filled string: \"%s\", length +- // %d.",input,strlen(input),inbuf,inbufsize); +- int rc = base64_decode(buf, &dlen, (unsigned char *)inbuf, inbufsize); +- if (rc && (rc != POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL)) ++ // debug(1,"base64_dec called with string \"%s\", length %d, filled string: \"%s\", length %d.", ++ // input,strlen(input),inbuf,inbufsize); ++ int rc = mbedtls_base64_decode(NULL, 0, &dlen, (unsigned char *)inbuf, inbufsize); ++ if (rc && (rc != MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL)) + debug(1, "Error %d getting decode length, result is %d.", rc, dlen); + else { + // debug(1,"Decode size is %d.",dlen); +@@ -167,7 +164,7 @@ uint8_t *base64_dec(char *input, int *outlen) { + if (buf == 0) + debug(1, "Can't allocate memory in base64_dec."); + else { +- rc = base64_decode(buf, &dlen, (unsigned char *)inbuf, inbufsize); ++ rc = mbedtls_base64_decode(buf, dlen, &dlen, (unsigned char *)inbuf, inbufsize); + if (rc != 0) + debug(1, "Error %d in base64_dec.", rc); + } +@@ -280,58 +277,59 @@ uint8_t *rsa_apply(uint8_t *input, int inlen, int *outlen, int mode) { + } + #endif + +-#ifdef HAVE_LIBPOLARSSL ++#ifdef HAVE_LIBMBEDTLS + uint8_t *rsa_apply(uint8_t *input, int inlen, int *outlen, int mode) { +- rsa_context trsa; ++ mbedtls_pk_context pkctx; ++ mbedtls_rsa_context *trsa; + const char *pers = "rsa_encrypt"; ++ size_t olen = *outlen; + int rc; + +- entropy_context entropy; +- ctr_drbg_context ctr_drbg; +- entropy_init(&entropy); +- if ((rc = ctr_drbg_init(&ctr_drbg, entropy_func, &entropy, (const unsigned char *)pers, +- strlen(pers))) != 0) +- debug(1, "ctr_drbg_init returned %d\n", rc); ++ mbedtls_entropy_context entropy; ++ mbedtls_ctr_drbg_context ctr_drbg; ++ ++ mbedtls_entropy_init(&entropy); ++ ++ mbedtls_ctr_drbg_init(&ctr_drbg); ++ mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, ++ (const unsigned char *)pers, strlen(pers)); + +- rsa_init(&trsa, RSA_PKCS_V21, POLARSSL_MD_SHA1); // padding and hash id get overwritten +- // BTW, this seems to reset a lot of parameters in the rsa_context +- rc = x509parse_key(&trsa, (unsigned char *)super_secret_key, strlen(super_secret_key), NULL, 0); ++ mbedtls_pk_init(&pkctx); ++ ++ rc = mbedtls_pk_parse_key(&pkctx, (unsigned char *)super_secret_key, sizeof(super_secret_key), NULL, 0); + if (rc != 0) +- debug(1, "Error %d reading the private key."); ++ debug(1, "Error %d reading the private key.", rc); + +- uint8_t *out = NULL; ++ uint8_t *outbuf = NULL; ++ trsa = mbedtls_pk_rsa(pkctx); + + switch (mode) { + case RSA_MODE_AUTH: +- trsa.padding = RSA_PKCS_V15; +- trsa.hash_id = POLARSSL_MD_NONE; +- debug(2, "rsa_apply encrypt"); +- out = malloc(trsa.len); +- rc = rsa_pkcs1_encrypt(&trsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, inlen, input, out); ++ mbedtls_rsa_set_padding(trsa, MBEDTLS_RSA_PKCS_V15, MBEDTLS_MD_NONE); ++ outbuf = malloc(trsa->len); ++ rc = mbedtls_rsa_pkcs1_encrypt(trsa, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PRIVATE, ++ inlen, input, outbuf); + if (rc != 0) +- debug(1, "rsa_pkcs1_encrypt error %d.", rc); +- *outlen = trsa.len; ++ debug(1, "mbedtls_pk_encrypt error %d.", rc); ++ *outlen = trsa->len; + break; + case RSA_MODE_KEY: +- debug(2, "rsa_apply decrypt"); +- trsa.padding = RSA_PKCS_V21; +- trsa.hash_id = POLARSSL_MD_SHA1; +- out = malloc(trsa.len); +-#if POLARSSL_VERSION_NUMBER >= 0x01020900 +- rc = rsa_pkcs1_decrypt(&trsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, (size_t *)outlen, input, +- out, trsa.len); +-#else +- rc = rsa_pkcs1_decrypt(&trsa, RSA_PRIVATE, outlen, input, out, trsa.len); +-#endif ++ mbedtls_rsa_set_padding(trsa, MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA1); ++ outbuf = malloc(trsa->len); ++ rc = mbedtls_rsa_pkcs1_decrypt(trsa, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PRIVATE, ++ &olen, input, outbuf, trsa->len); + if (rc != 0) +- debug(1, "decrypt error %d.", rc); ++ debug(1, "mbedtls_pk_decrypt error %d.", rc); ++ *outlen = olen; + break; + default: + die("bad rsa mode"); + } +- rsa_free(&trsa); +- debug(2, "rsa_apply exit"); +- return out; ++ ++ mbedtls_ctr_drbg_free(&ctr_drbg); ++ mbedtls_entropy_free(&entropy); ++ mbedtls_pk_free(&pkctx); ++ return outbuf; + } + #endif + +@@ -517,7 +515,7 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) { + void *ibuf = (void *)buf; + size_t bytes_remaining = count; + int rc = 0; +- struct pollfd ufds[1]; ++ struct pollfd ufds[1]; + while ((bytes_remaining>0) && (rc==0)) { + // check that we can do some writing + ufds[0].fd = fd; +diff --git a/configure.ac b/configure.ac +index 8d82da4..a2d1e4f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -108,11 +108,11 @@ AC_ARG_WITH(piddir, [ --with-piddir= Specify a pathname to a directory + AM_CONDITIONAL([USE_CUSTOMPIDDIR], [test "x$HAS_CUSTOMPIDDIR" = "x1"]) + + # Check --with-ssl=argument +-AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=polarssl for encryption services], [ ++AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=mbedtls for encryption services], [ + AC_MSG_CHECKING(encryption libraries chosen) + if test "x${with_ssl}" = x -o "x${with_ssl}" = xyes ; then + AC_MSG_RESULT(not found) +- AC_MSG_ERROR(choose either "openssl" or "polarssl" encryption) ++ AC_MSG_ERROR(choose either "openssl" or "mbedtls" encryption) + fi + if test "x${with_ssl}" = xopenssl ; then + if test "x${with_pkg_config}" = xyes ; then +@@ -127,10 +127,15 @@ AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=polarssl for encrypti + AC_DEFINE([HAVE_LIBCRYPTO],[1],[Define to 1 if you have libcrypto]) + AC_DEFINE([HAVE_LIBSSL],[1],[Define to 1 if you have libssl]) + fi +- elif test "x${with_ssl}" = xpolarssl ; then +- AC_CHECK_LIB([polarssl],[ssl_init], , AC_MSG_ERROR(PolarSSL selected but the library cannot be found!)) ++ elif test "x${with_ssl}" = xmbedtls ; then ++ AC_CHECK_LIB([mbedtls],[mbedtls_ssl_init],, ++ [AC_MSG_ERROR([Cannot find required libray: libmbedtls],1)]) ++ AC_CHECK_LIB([mbedcrypto], [mbedtls_entropy_func],, ++ [AC_MSG_ERROR([Cannot find required library: libmbedcrypto],1)]) ++ AC_CHECK_LIB([mbedx509], [mbedtls_pk_init],, ++ [AC_MSG_ERROR([Cannot find required library: libmbedx509],1)]) + else +- AC_MSG_ERROR(unknown option "${with_ssl}"." Please choose with "openssl" or "polarssl") ++ AC_MSG_ERROR(unknown option "${with_ssl}"." Please choose with "openssl" or "mbedtls") + fi + ], ) + +diff --git a/player.c b/player.c +index 97eccfb..da2d735 100644 +--- a/player.c ++++ b/player.c +@@ -47,9 +47,9 @@ + + #include "config.h" + +-#ifdef HAVE_LIBPOLARSSL +-#include +-#include ++#ifdef HAVE_LIBMBEDTLS ++#include ++#include + #endif + + #ifdef HAVE_LIBSSL +@@ -82,8 +82,8 @@ static int max_frame_size_change = 1; + // maximal resampling shift - conservative + //#define OUTFRAME_BYTES(frame_size) (4 * (frame_size + 3)) + +-#ifdef HAVE_LIBPOLARSSL +-static aes_context dctx; ++#ifdef HAVE_LIBMBEDTLS ++static mbedtls_aes_context dctx; + #endif + + //static pthread_t player_thread = NULL; +@@ -247,8 +247,8 @@ static int alac_decode(short *dest, int *destlen, uint8_t *buf, int len) { + unsigned char iv[16]; + int aeslen = len & ~0xf; + memcpy(iv, aesiv, sizeof(iv)); +-#ifdef HAVE_LIBPOLARSSL +- aes_crypt_cbc(&dctx, AES_DECRYPT, aeslen, iv, buf, packet); ++#ifdef HAVE_LIBMBEDTLS ++ mbedtls_aes_crypt_cbc(&dctx, MBEDTLS_AES_DECRYPT, aeslen, iv, buf, packet); + #endif + #ifdef HAVE_LIBSSL + AES_cbc_encrypt(buf, packet, aeslen, &aes, iv, AES_DECRYPT); +@@ -1685,9 +1685,9 @@ int player_play(stream_cfg *stream, pthread_t *player_thread) { + die("specified buffer starting fill %d > buffer size %d", config.buffer_start_fill, + BUFFER_FRAMES); + if (encrypted) { +-#ifdef HAVE_LIBPOLARSSL +- memset(&dctx, 0, sizeof(aes_context)); +- aes_setkey_dec(&dctx, stream->aeskey, 128); ++#ifdef HAVE_LIBMBEDTLS ++ memset(&dctx, 0, sizeof(mbedtls_aes_context)); ++ mbedtls_aes_setkey_dec(&dctx, stream->aeskey, 128); + #endif + + #ifdef HAVE_LIBSSL +diff --git a/rtsp.c b/rtsp.c +index 38b0745..8003803 100644 +--- a/rtsp.c ++++ b/rtsp.c +@@ -50,8 +50,8 @@ + #include + #endif + +-#ifdef HAVE_LIBPOLARSSL +-#include ++#ifdef HAVE_LIBMBEDTLS ++#include + #endif + + #include "common.h" +@@ -979,7 +979,7 @@ static void handle_set_parameter_parameter(rtsp_conn_info *conn, + // more significant changes make it not malloc memory + // needs to initialise the docoding table first + +-// add _so to end of name to avoid confusion with polarssl's implementation ++// add _so to end of name to avoid confusion with SSL library implementation + + static char encoding_table[] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', +@@ -1651,21 +1651,21 @@ static int rtsp_auth(char **nonce, rtsp_message *req, rtsp_message *resp) { + MD5_Final(digest_mu, &ctx); + #endif + +-#ifdef HAVE_LIBPOLARSSL +- md5_context tctx; +- md5_starts(&tctx); +- md5_update(&tctx, (const unsigned char *)username, strlen(username)); +- md5_update(&tctx, (unsigned char *)":", 1); +- md5_update(&tctx, (const unsigned char *)realm, strlen(realm)); +- md5_update(&tctx, (unsigned char *)":", 1); +- md5_update(&tctx, (const unsigned char *)config.password, ++#ifdef HAVE_LIBMBEDTLS ++ mbedtls_md5_context tctx; ++ mbedtls_md5_starts(&tctx); ++ mbedtls_md5_update(&tctx, (const unsigned char *)username, strlen(username)); ++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); ++ mbedtls_md5_update(&tctx, (const unsigned char *)realm, strlen(realm)); ++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); ++ mbedtls_md5_update(&tctx, (const unsigned char *)config.password, + strlen(config.password)); +- md5_finish(&tctx, digest_urp); +- md5_starts(&tctx); +- md5_update(&tctx, (const unsigned char *)req->method, strlen(req->method)); +- md5_update(&tctx, (unsigned char *)":", 1); +- md5_update(&tctx, (const unsigned char *)uri, strlen(uri)); +- md5_finish(&tctx, digest_mu); ++ mbedtls_md5_finish(&tctx, digest_urp); ++ mbedtls_md5_starts(&tctx); ++ mbedtls_md5_update(&tctx, (const unsigned char *)req->method, strlen(req->method)); ++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); ++ mbedtls_md5_update(&tctx, (const unsigned char *)uri, strlen(uri)); ++ mbedtls_md5_finish(&tctx, digest_mu); + #endif + + int i; +@@ -1685,16 +1685,16 @@ static int rtsp_auth(char **nonce, rtsp_message *req, rtsp_message *resp) { + MD5_Final(digest_total, &ctx); + #endif + +-#ifdef HAVE_LIBPOLARSSL +- md5_starts(&tctx); +- md5_update(&tctx, buf, 32); +- md5_update(&tctx, (unsigned char *)":", 1); +- md5_update(&tctx, (const unsigned char *)*nonce, strlen(*nonce)); +- md5_update(&tctx, (unsigned char *)":", 1); ++#ifdef HAVE_LIBMBEDTLS ++ mbedtls_md5_starts(&tctx); ++ mbedtls_md5_update(&tctx, buf, 32); ++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); ++ mbedtls_md5_update(&tctx, (const unsigned char *)*nonce, strlen(*nonce)); ++ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); + for (i = 0; i < 16; i++) + sprintf((char *)buf + 2 * i, "%02x", digest_mu[i]); +- md5_update(&tctx, buf, 32); +- md5_finish(&tctx, digest_total); ++ mbedtls_md5_update(&tctx, buf, 32); ++ mbedtls_md5_finish(&tctx, digest_total); + #endif + + for (i = 0; i < 16; i++) +diff --git a/shairport.c b/shairport.c +index f725d60..2349447 100644 +--- a/shairport.c ++++ b/shairport.c +@@ -42,8 +42,8 @@ + + #include "config.h" + +-#ifdef HAVE_LIBPOLARSSL +-#include ++#ifdef HAVE_LIBMBEDTLS ++#include + #endif + + #ifdef HAVE_LIBSSL +@@ -109,8 +109,8 @@ char* get_version_string() { + char* version_string = malloc(200); + if (version_string) { + strcpy(version_string, PACKAGE_VERSION); +- #ifdef HAVE_LIBPOLARSSL +- strcat(version_string, "-PolarSSL"); ++ #ifdef HAVE_LIBMBEDTLS ++ strcat(version_string, "-mbedTLS"); + #endif + #ifdef HAVE_LIBSSL + strcat(version_string, "-OpenSSL"); +@@ -1046,11 +1046,11 @@ int main(int argc, char **argv) { + MD5_Final(ap_md5, &ctx); + #endif + +-#ifdef HAVE_LIBPOLARSSL +- md5_context tctx; +- md5_starts(&tctx); +- md5_update(&tctx, (unsigned char *)config.service_name, strlen(config.service_name)); +- md5_finish(&tctx, ap_md5); ++#ifdef HAVE_LIBMBEDTLS ++ mbedtls_md5_context tctx; ++ mbedtls_md5_starts(&tctx); ++ mbedtls_md5_update(&tctx, (unsigned char *)config.service_name, strlen(config.service_name)); ++ mbedtls_md5_finish(&tctx, ap_md5); + #endif + memcpy(config.hw_addr, ap_md5, sizeof(config.hw_addr)); + #ifdef CONFIG_METADATA diff --git a/sound/shine/Makefile b/sound/shine/Makefile index d13cff6..7b1dda0 100644 --- a/sound/shine/Makefile +++ b/sound/shine/Makefile @@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shine PKG_VERSION:=3.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/savonet/shine/releases/download/$(PKG_VERSION)/ +PKG_SOURCE_URL:=https://github.com/toots/shine/releases/download/$(PKG_VERSION)/ PKG_MD5SUM:=fcad8108335f4b051b303fbdf3fca3fe PKG_LICENSE:=GPL-2.0 @@ -29,7 +29,7 @@ define Package/shine SECTION:=sound CATEGORY:=Sound TITLE:=Super fast fixed-point MP3 encoder - URL:=https://github.com/savonet/shine + URL:=https://github.com/toots/shine endef define Package/shine/description diff --git a/sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch b/sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch new file mode 100644 index 0000000..83ddb5e --- /dev/null +++ b/sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch @@ -0,0 +1,64 @@ +From 3695118267be9b7a9412c86c7c5424ab47efe7ec Mon Sep 17 00:00:00 2001 +From: Romain Beauxis +Date: Thu, 7 Apr 2016 13:20:46 -0500 +Subject: [PATCH] Rename slen{1,2}_table to avoid name collision with ffmpeg. + +--- + src/lib/l3bitstream.c | 4 ++-- + src/lib/l3loop.c | 4 ++-- + src/lib/tables.c | 4 ++-- + src/lib/tables.h | 4 ++-- + 4 files changed, 8 insertions(+), 8 deletions(-) + +--- a/src/lib/l3bitstream.c ++++ b/src/lib/l3bitstream.c +@@ -127,8 +127,8 @@ static void encodeMainData(shine_global_ + { + BF_PartHolder **pph = &config->l3stream.scaleFactorsPH[gr][ch]; + gr_info *gi = &(si.gr[gr].ch[ch].tt); +- unsigned slen1 = slen1_tab[ gi->scalefac_compress ]; +- unsigned slen2 = slen2_tab[ gi->scalefac_compress ]; ++ unsigned slen1 = shine_slen1_tab[ gi->scalefac_compress ]; ++ unsigned slen2 = shine_slen2_tab[ gi->scalefac_compress ]; + int *ix = &config->l3_enc[ch][gr][0]; + + if ( (gr == 0) || (si.scfsi[ch][0] == 0) ) +--- a/src/lib/l3loop.c ++++ b/src/lib/l3loop.c +@@ -287,8 +287,8 @@ int part2_length(int gr, int ch, shine_g + bits = 0; + + { +- slen1 = slen1_tab[ gi->scalefac_compress ]; +- slen2 = slen2_tab[ gi->scalefac_compress ]; ++ slen1 = shine_slen1_tab[ gi->scalefac_compress ]; ++ slen2 = shine_slen2_tab[ gi->scalefac_compress ]; + + if ( !gr || !(config->side_info.scfsi[ch][0]) ) + bits += (6 * slen1); +--- a/src/lib/tables.c ++++ b/src/lib/tables.c +@@ -7,8 +7,8 @@ + + #include "tables.h" + +-const int slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }; +-const int slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }; ++const int shine_slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }; ++const int shine_slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }; + + /* Valid samplerates and bitrates. */ + const int samplerates[9] = { +--- a/src/lib/tables.h ++++ b/src/lib/tables.h +@@ -3,8 +3,8 @@ + + #include "types.h" + +-extern const int slen1_tab[16]; +-extern const int slen2_tab[16]; ++extern const int shine_slen1_tab[16]; ++extern const int shine_slen2_tab[16]; + + extern const int samplerates[9]; + extern const int bitrates[16][4]; diff --git a/sound/sox/Makefile b/sound/sox/Makefile index eda080f..11402f8 100644 --- a/sound/sox/Makefile +++ b/sound/sox/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2008 David Cooper -# Copyright (C) 2006-2014 OpenWrt.org +# Copyright (C) 2006-2017 OpenWrt # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sox -PKG_VERSION:=14.4.1 -PKG_RELEASE:=3 +PKG_VERSION:=14.4.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/sox -PKG_MD5SUM:=ff9ca6aca972549de0e80e8e30ed379c +PKG_MD5SUM:=81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=LGPL-2.1 GPL-2.0 @@ -33,7 +33,7 @@ define Package/sox CATEGORY:=Sound DEPENDS:=+BUILD_PATENTED:lame-lib +BUILD_PATENTED:libmad +BUILD_PATENTED:libid3tag \ +libvorbis +libvorbisidec +alsa-lib +libsndfile +libflac \ - +libmagic +libpng +libffmpeg + +libmagic +libpng TITLE:=Sox is a general purpose sound converter/player/recorder URL:=http://sox.sourceforge.net/ endef @@ -54,7 +54,6 @@ define Build/Configure --without-libltdl \ --with-ogg \ --with-flac \ - --with-ffmpeg \ --without-amr-wb \ --without-amr-nb \ --without-samplerate \ diff --git a/sound/sox/patches/001-cross_compile.patch b/sound/sox/patches/001-cross_compile.patch index 7996ece..badd531 100644 --- a/sound/sox/patches/001-cross_compile.patch +++ b/sound/sox/patches/001-cross_compile.patch @@ -1,22 +1,22 @@ --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -144,7 +144,7 @@ EXTRA_DIST = monkey.wav optional-fmts.am +@@ -145,7 +145,7 @@ EXTRA_DIST = monkey.wav optional-fmts.am CMakeLists.txt soxconfig.h.cmake \ tests.sh testall.sh tests.bat testall.bat test-comments --all: sox$(EXEEXT) play rec soxi sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) -+all: sox$(EXEEXT) play rec +-all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT) sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) example6$(EXEEXT) ++all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) - play rec: sox$(EXEEXT) + play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT): sox$(EXEEXT) if test "$(PLAYRECLINKS)" = "yes"; then \ ---- sox-14.4.1/src/Makefile.in -+++ sox-14.4.1/src/Makefile.in -@@ -2904,7 +2904,7 @@ - uninstall-libLTLIBRARIES uninstall-pkglibLTLIBRARIES +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -3020,7 +3020,7 @@ uninstall-am: uninstall-binPROGRAMS unin + uninstall-pkglibLTLIBRARIES --all: sox$(EXEEXT) play rec soxi sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) -+all: sox$(EXEEXT) play rec +-all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT) sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) example6$(EXEEXT) ++all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) - play rec: sox$(EXEEXT) + play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT): sox$(EXEEXT) if test "$(PLAYRECLINKS)" = "yes"; then \ diff --git a/sound/sox/patches/010-fix_uclibc_build_issue.patch b/sound/sox/patches/010-fix_uclibc_build_issue.patch index 06454cd..6a06301 100644 --- a/sound/sox/patches/010-fix_uclibc_build_issue.patch +++ b/sound/sox/patches/010-fix_uclibc_build_issue.patch @@ -1,15 +1,15 @@ ---- sox-14.4.1.orig/src/formats.c -+++ sox-14.4.1/src/formats.c -@@ -409,7 +409,7 @@ static void UNUSED rewind_pipe(FILE * fp +--- a/src/formats.c ++++ b/src/formats.c +@@ -413,7 +413,7 @@ static void UNUSED rewind_pipe(FILE * fp #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__ fp->_p -= PIPE_AUTO_DETECT_SIZE; fp->_r += PIPE_AUTO_DETECT_SIZE; -#elif defined __GLIBC__ +#elif defined __GLIBC__ && ! defined __UCLIBC__ fp->_IO_read_ptr = fp->_IO_read_base; - #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H - fp->_ptr = fp->_base; -@@ -417,7 +417,6 @@ static void UNUSED rewind_pipe(FILE * fp + #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || \ + defined _ISO_STDIO_ISO_H || defined __sgi +@@ -422,7 +422,6 @@ static void UNUSED rewind_pipe(FILE * fp /* To fix this #error, either simply remove the #error line and live without * file-type detection with pipes, or add support for your compiler in the * lines above. Test with cat monkey.wav | ./sox --info - */ diff --git a/sound/sox/patches/020-ffmpeg-0.11.patch b/sound/sox/patches/020-ffmpeg-0.11.patch deleted file mode 100644 index 61f6e23..0000000 --- a/sound/sox/patches/020-ffmpeg-0.11.patch +++ /dev/null @@ -1,129 +0,0 @@ ---- a/configure -+++ b/configure -@@ -15825,9 +15825,9 @@ - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_open_input_file in -lavformat" >&5 --$as_echo_n "checking for av_open_input_file in -lavformat... " >&6; } --if ${ac_cv_lib_avformat_av_open_input_file+:} false; then : -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avformat_open_input in -lavformat" >&5 -+$as_echo_n "checking for avformat_open_input in -lavformat... " >&6; } -+if ${ac_cv_lib_avformat_avformat_open_input+:} false; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS -@@ -15841,27 +15841,27 @@ - #ifdef __cplusplus - extern "C" - #endif --char av_open_input_file (); -+char avformat_open_input (); - int - main () - { --return av_open_input_file (); -+return avformat_open_input (); - ; - return 0; - } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_avformat_av_open_input_file=yes -+ ac_cv_lib_avformat_avformat_open_input=yes - else -- ac_cv_lib_avformat_av_open_input_file=no -+ ac_cv_lib_avformat_avformat_open_input=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_avformat_av_open_input_file" >&5 --$as_echo "$ac_cv_lib_avformat_av_open_input_file" >&6; } --if test "x$ac_cv_lib_avformat_av_open_input_file" = xyes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avformat_avformat_open_input" >&5 -+$as_echo "$ac_cv_lib_avformat_avformat_open_input" >&6; } -+if test "x$ac_cv_lib_avformat_avformat_open_input" = xyes; then : - for ac_header in libavcodec/avcodec.h ffmpeg/avcodec.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -diff -Naur sox-14.4.0-orig/src/ffmpeg.c sox-14.4.0/src/ffmpeg.c ---- sox-14.4.0-orig/src/ffmpeg.c 2012-06-12 00:35:53.459027469 -0400 -+++ sox-14.4.0/src/ffmpeg.c 2012-06-12 00:36:26.539028545 -0400 -@@ -93,7 +93,7 @@ - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - enc->error_resilience = 1; - #else -- enc->error_recognition = 1; -+ enc->err_recognition = 1; - #endif - - if (!codec || avcodec_open(enc, codec) < 0) -@@ -157,7 +157,7 @@ - static int startread(sox_format_t * ft) - { - priv_t * ffmpeg = (priv_t *)ft->priv; -- AVFormatParameters params; -+ AVDictionary *params; - int ret; - int i; - -@@ -172,7 +172,7 @@ - - /* Open file and get format */ - memset(¶ms, 0, sizeof(params)); -- if ((ret = av_open_input_file(&ffmpeg->ctxt, ft->filename, NULL, 0, ¶ms)) < 0) { -+ if ((ret = avformat_open_input(&ffmpeg->ctxt, ft->filename, NULL, ¶ms)) < 0) { - lsx_fail("ffmpeg cannot open file for reading: %s (code %d)", ft->filename, ret); - return SOX_EOF; - } -@@ -231,7 +231,7 @@ - /* If input buffer empty, read more data */ - if (ffmpeg->audio_buf_index * 2 >= ffmpeg->audio_buf_size) { - if ((ret = av_read_frame(ffmpeg->ctxt, pkt)) < 0 && -- (ret == AVERROR_EOF || url_ferror(ffmpeg->ctxt->pb))) -+ (ret == AVERROR_EOF || ffmpeg->ctxt->pb->error)) - break; - ffmpeg->audio_buf_size = audio_decode_frame(ffmpeg, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE); - ffmpeg->audio_buf_index = 0; -@@ -373,13 +373,6 @@ - return SOX_EOF; - } - -- /* set the output parameters (must be done even if no -- parameters). */ -- if (av_set_parameters(ffmpeg->ctxt, NULL) < 0) { -- lsx_fail("ffmpeg invalid output format parameters"); -- return SOX_EOF; -- } -- - /* Next line for debugging */ - /* dump_format(ffmpeg->ctxt, 0, ft->filename, 1); */ - -@@ -391,14 +384,14 @@ - - /* open the output file, if needed */ - if (!(ffmpeg->fmt->flags & AVFMT_NOFILE)) { -- if (url_fopen(&ffmpeg->ctxt->pb, ft->filename, URL_WRONLY) < 0) { -+ if (avio_open(&ffmpeg->ctxt->pb, ft->filename, AVIO_FLAG_WRITE) < 0) { - lsx_fail("ffmpeg could not open `%s'", ft->filename); - return SOX_EOF; - } - } - - /* write the stream header, if any */ -- av_write_header(ffmpeg->ctxt); -+ avformat_write_header(ffmpeg->ctxt, NULL); - - return SOX_SUCCESS; - } -@@ -478,7 +471,7 @@ - #if (LIBAVFORMAT_VERSION_INT < 0x340000) - url_fclose(&ffmpeg->ctxt->pb); - #else -- url_fclose(ffmpeg->ctxt->pb); -+ avio_close(ffmpeg->ctxt->pb); - #endif - } - diff --git a/sound/sox/patches/020-ffmpeg-2.x.patch b/sound/sox/patches/020-ffmpeg-2.x.patch deleted file mode 100644 index 44e7ebb..0000000 --- a/sound/sox/patches/020-ffmpeg-2.x.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- a/src/ffmpeg.c -+++ b/src/ffmpeg.c -@@ -50,6 +50,10 @@ - #include - #include "ffmpeg.h" - -+#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE -+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 -+#endif -+ - #ifndef CODEC_TYPE_AUDIO - #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO - #endif -@@ -96,7 +100,7 @@ static int stream_component_open(priv_t - enc->err_recognition = 1; - #endif - -- if (!codec || avcodec_open(enc, codec) < 0) -+ if (!codec || avcodec_open2(enc, codec, NULL) < 0) - return -1; - if (enc->codec_type != AVMEDIA_TYPE_AUDIO) { - lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type); -@@ -178,7 +182,7 @@ static int startread(sox_format_t * ft) - } - - /* Get CODEC parameters */ -- if ((ret = av_find_stream_info(ffmpeg->ctxt)) < 0) { -+ if ((ret = avformat_find_stream_info(ffmpeg->ctxt, NULL)) < 0) { - lsx_fail("ffmpeg could not find CODEC parameters for %s", ft->filename); - return SOX_EOF; - } -@@ -256,7 +260,7 @@ static int stopread(sox_format_t * ft) - if (ffmpeg->audio_stream >= 0) - stream_component_close(ffmpeg, ffmpeg->audio_stream); - if (ffmpeg->ctxt) { -- av_close_input_file(ffmpeg->ctxt); -+ avformat_close_input(&ffmpeg->ctxt); - ffmpeg->ctxt = NULL; /* safety */ - } - -@@ -267,16 +271,21 @@ static int stopread(sox_format_t * ft) - /* - * add an audio output stream - */ -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0) -+static AVStream *add_audio_stream(sox_format_t * ft, AVFormatContext *oc, enum AVCodecID codec_id) -+#else - static AVStream *add_audio_stream(sox_format_t * ft, AVFormatContext *oc, enum CodecID codec_id) -+#endif - { - AVCodecContext *c; - AVStream *st; - -- st = av_new_stream(oc, 1); -+ st = avformat_new_stream(oc, NULL); - if (!st) { - lsx_fail("ffmpeg could not alloc stream"); - return NULL; - } -+ st->id = 1; - - c = st->codec; - c->codec_id = codec_id; -@@ -306,7 +315,7 @@ static int open_audio(priv_t * ffmpeg, A - } - - /* open it */ -- if (avcodec_open(c, codec) < 0) { -+ if (avcodec_open2(c, codec, NULL) < 0) { - lsx_fail("ffmpeg could not open CODEC"); - return SOX_EOF; - } diff --git a/utils/bandwidthd-php/Makefile b/utils/bandwidthd-php/Makefile deleted file mode 100644 index c71d798..0000000 --- a/utils/bandwidthd-php/Makefile +++ /dev/null @@ -1,51 +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 - -PKG_NAME:=bandwidthd-php -PKG_VERSION:=2.0.1 -PKG_RELEASE:=2 - -PKG_MAINTAINER:=Jean-Michel Lacroix - -PKG_LICENSE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/bandwidthd-php - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libpcre +libxml2 +php7 +php7-cgi +php7-mod-pgsql +php7-mod-gd - TITLE:=PHP files to graph bandwidthd data in a postgresql database - URL:=http://bandwidthd.sourceforge.net/ -endef - -define Package/bandwidthd-php/description - PHP files to graph bandwidthd data in a postgresql database -endef - -define Build/Compile -endef - -define Package/bandwidthd-php/install - $(INSTALL_DIR) $(1)/www/phphtdocs - $(INSTALL_DATA) ./files/legend.gif $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/logo.gif $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/details.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/footer.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/graph.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/include.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/index.php $(1)/www/phphtdocs/ - ln -s /var/etc/bandwidthd-php.conf $(1)/www/phphtdocs/config.conf - $(INSTALL_DIR) $(1)//etc/config - $(INSTALL_CONF) ./files/bandwidthd-php.config $(1)/etc/config/bandwidthd-php - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/bandwidthd-php.init $(1)/etc/init.d/bandwidthd-php -endef - -$(eval $(call BuildPackage,bandwidthd-php)) diff --git a/utils/bandwidthd-php/files/legend.gif b/utils/bandwidthd-php/files/legend.gif deleted file mode 100644 index 3df909037fadf8df608efdb3cdc389aea779053c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1649 zcmb_bi&NB96uyEXiesiyK0tC1k>w$JO&1*(4`lzIb3Nn=lgTcVzcaFI9fG7L~0l)o!fe|7IQG}S-1R2H%6ND+k3}G&c z1S3Kap@=XPjVSOXZ4hDo3WJYX?k12h*W65UXS9D>8e zz(~*sYawIOOD24k?k$Sa35CtlRYb33v~XSWPK-)+h$Bb}1(HNs+(hCbfF)>n9pFk} z9%zD9UgB*Q{|m^TBNuz8^;N|`r`S)IDUDU9ucuFSRjAijpZPU=CXVeiR%@Gb-u2IN z3alwH9b5RRUTLa1+j7D;s#zUad#<%W{>@;gsaAJWvnFMdv!br_mUjIyS!i=zS(|Q) zR#B*^*WW4syf(J0xxV~f<-&0p&KvT-YN?57D%zC2-+Ozl*TeiHp26OKUQT#E*yW%~ zdU#Fs+D3l4xXOGzbwbl_Lqm1cZ&|@MTh?5v+1Z@C)kfuChNI=htD>hA6xR*3on7}d zw6(GR%aTOfmY~FGsJp`0To@?2TGc~XGbWiBJty!euH(Fb~bxuyt z-ukg9VZ`r+a-YtzK@-_OvfO$9jG&l#;T>;Wn44%DU^J({nHwAyX%{f_eviauyxDNc@sxUDDYip)4zG`h;6{LqCo&*6r}<`o4={Y0;?40*f3vwA4RQcyb(7wb~1 zv5BpuC09M%-R`!Bd|c$;XdOIKnpghpm&qw#RHTjgY@4bbTCFEHvYQo}pZ3Yh_GU8K z(aPg4AF)TKukD-$3>_;L?y9ja^LoyfE}z{K-k7YYPQGTdp)%dlZCZR~+5#`vtMAM) zhMVjZ @@ -21,6 +21,8 @@ PKG_LICENSE:=GPL-2.0 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_FIXUP:=autoreconf + include $(INCLUDE_DIR)/package.mk define Package/bandwidthd/Default @@ -32,8 +34,8 @@ endef define Package/bandwidthd $(call Package/bandwidthd/Default) - TITLE += (without postgresql) - VARIANT:=no-pgsql + TITLE += (without database) + VARIANT:=no-db DEPENDS:=+libgd +libpcap endef @@ -44,6 +46,20 @@ $(call Package/bandwidthd/Default) DEPENDS:=+libgd +libpcap +libpq endef +define Package/bandwidthd-sqlite +$(call Package/bandwidthd/Default) + TITLE += (with sqlite enabled) + VARIANT:=sqlite + DEPENDS:=+libgd +libpcap +libsqlite3 +php7 +php7-cgi +php7-mod-gd +php7-mod-pdo +php7-mod-pdo-sqlite +endef + +define Package/bandwidthd-php +$(call Package/bandwidthd/Default) + TITLE = PHP files to graph bandwidthd data from postgresql + VARIANT:=php + DEPENDS:=+libpcre +libxml2 +php7 +php7-cgi +php7-mod-pgsql +php7-mod-gd +endef + define Package/bandwidthd/description A bandwidthd tracking utility. endef @@ -53,15 +69,32 @@ $(call Package/bandwidthd/description) With the ability to store in a postgresql database. endef +define Package/bandwidthd-sqlite/description +$(call Package/bandwidthd/description) +With the ability to store in a sqlite database. +endef + +define Package/bandwidthd-php/description + PHP files to graph bandwidthd data from pgsql. +endef + define Package/bandwidthd/daemon - This package contains bandwidthd a bandwidth tracking utility. + This package contains bandwidthd, a bandwidth tracking utility. endef define Package/bandwidthd-pgsql/daemon - This package contains bandwidthd a bandwidth tracking utility. + This package contains bandwidthd, a bandwidth tracking utility. +endef + +define Package/bandwidthd-sqlite/daemon + This package contains bandwidthd, a bandwidth tracking utility. +endef + +define Package/bandwidthd-php/daemon + This package contains the PHP files to graph the data from a pgsql database. endef -ifeq ($(BUILD_VARIANT),no-pgsql) +ifeq ($(BUILD_VARIANT),no-db) CONFIGURE_ARGS += \ ac_cv_file__sw_lib=no \ ac_cv_file__sw_include=no \ @@ -69,20 +102,45 @@ CONFIGURE_ARGS += \ ac_cv_file__usr_pkg_include=no \ ac_cv_file__usr_local_pgsql_lib=no \ ac_cv_file__usr_local_pgsql_include=no \ - ac_cv_lib_pq_PQconnectdb=no + ac_cv_lib_pq_PQconnectdb=no \ + ac_cv_lib_sqlite3_sqlite3_open=no endif ifeq ($(BUILD_VARIANT),pgsql) CONFIGURE_ARGS += \ - ac_cv_file__sw_lib=no \ - ac_cv_file__sw_include=no \ - ac_cv_file__usr_pkg_lib=no \ - ac_cv_file__usr_pkg_include=no \ - ac_cv_file__usr_local_pgsql_lib=no \ - ac_cv_file__usr_local_pgsql_include=no + ac_cv_file__sw_lib=no \ + ac_cv_file__sw_include=no \ + ac_cv_file__usr_pkg_lib=no \ + ac_cv_file__usr_pkg_include=no \ + ac_cv_file__usr_local_pgsql_lib=no \ + ac_cv_file__usr_local_pgsql_include=no \ + ac_cv_lib_sqlite3_sqlite3_open=no endif -EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -std=gnu89 +ifeq ($(BUILD_VARIANT),sqlite) +CONFIGURE_ARGS += \ + ac_cv_file__sw_lib=no \ + ac_cv_file__sw_include=no \ + ac_cv_file__usr_pkg_lib=no \ + ac_cv_file__usr_pkg_include=no \ + ac_cv_file__usr_local_pgsql_lib=no \ + ac_cv_file__usr_local_pgsql_include=no \ + ac_cv_lib_pq_PQconnectdb=no +endif + +ifeq ($(BUILD_VARIANT),php) +CONFIGURE_ARGS += \ + ac_cv_file__sw_lib=no \ + ac_cv_file__sw_include=no \ + ac_cv_file__usr_pkg_lib=no \ + ac_cv_file__usr_pkg_include=no \ + ac_cv_file__usr_local_pgsql_lib=no \ + ac_cv_file__usr_local_pgsql_include=no \ + ac_cv_lib_pq_PQconnectdb=no \ + ac_cv_lib_sqlite3_sqlite3_open=no +endif + +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib define Package/bandwidthd/install @@ -93,8 +151,8 @@ define Package/bandwidthd/install $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/bandwidthd.init $(1)/etc/init.d/bandwidthd $(INSTALL_DIR) $(1)/www - $(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/legend.gif $(1)/www/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/logo.gif $(1)/www/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/ + $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/logo.gif endef define Package/bandwidthd-pgsql/install @@ -103,15 +161,50 @@ define Package/bandwidthd-pgsql/install $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) ./files/bandwidthd-pgsql.config $(1)/etc/config/bandwidthd $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/bandwidthd-pgsql.init $(1)/etc/init.d/bandwidthd - $(INSTALL_DIR) $(1)/www/phphtdocs - $(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/legend.gif $(1)/www/ - $(INSTALL_DATA) ./files/logo.gif $(1)/www/ + $(INSTALL_BIN) ./files/bandwidthd.init $(1)/etc/init.d/bandwidthd + $(INSTALL_DIR) $(1)/www + $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/ + $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/logo.gif $(INSTALL_DIR) $(1)/usr/share/postgresql - $(INSTALL_DATA) $(PKG_BUILD_DIR)/schema.postgresql $(1)/usr/share/postgresql $(INSTALL_BIN) $(PKG_BUILD_DIR)/phphtdocs/bd_pgsql_purge.sh $(1)/usr/share/postgresql endef +define Package/bandwidthd-sqlite/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bandwidthd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/bandwidthd-sqlite.config $(1)/etc/config/bandwidthd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/bandwidthd-sqlite.init $(1)/etc/init.d/bandwidthd + $(INSTALL_DIR) $(1)/www/phphtdocs + $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs-sqlite/details.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs-sqlite/footer.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs-sqlite/graph.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs-sqlite/include.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs-sqlite/index.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/phphtdocs/logo.gif + ln -s /var/etc/bandwidthd-php.conf $(1)/www/phphtdocs/config.conf.php + $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/ + $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/logo.gif +endef + +define Package/bandwidthd-php/install + $(INSTALL_DIR) $(1)/www/phphtdocs + $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs/details.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs/footer.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs/graph.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs/include.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/phphtdocs/index.php $(1)/www/phphtdocs/ + $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/phphtdocs/logo.gif + ln -s /var/etc/bandwidthd-php.conf $(1)/www/phphtdocs/config.conf + $(INSTALL_DIR) $(1)//etc/config + $(INSTALL_CONF) ./files/bandwidthd-php.config $(1)/etc/config/bandwidthd-php + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/bandwidthd-php.init $(1)/etc/init.d/bandwidthd-php +endef + define Package/bandwidthd/conffiles /etc/config/bandwidthd endef @@ -120,5 +213,15 @@ define Package/bandwidthd-pgsql/conffiles /etc/config/bandwidthd endef +define Package/bandwidthd-sqlite/conffiles +/etc/config/bandwidthd +endef + +define Package/bandwidthd-php/conffiles +/etc/config/bandwidthd-php +endef + $(eval $(call BuildPackage,bandwidthd)) $(eval $(call BuildPackage,bandwidthd-pgsql)) +$(eval $(call BuildPackage,bandwidthd-sqlite)) +$(eval $(call BuildPackage,bandwidthd-php)) diff --git a/utils/bandwidthd/files/bandwidthd-pgsql.config b/utils/bandwidthd/files/bandwidthd-pgsql.config index 0f87687..f94c737 100644 --- a/utils/bandwidthd/files/bandwidthd-pgsql.config +++ b/utils/bandwidthd/files/bandwidthd-pgsql.config @@ -1,5 +1,5 @@ config bandwidthd - option dev br-lan + option dev br-lan option subnets "192.168.1.0/24" option skip_intervals 0 option graph_cutoff 1024 @@ -9,5 +9,5 @@ config bandwidthd option filter ip option graph true option meta_refresh 150 - option disabled_pgsql_connect_string "user = postgres dbname = bandwidthd host = 192.168.1.1" - option disabled_sensor_id "openwrt.mydomain.domain" + option pgsql_connect_string "user = postgres dbname = bandwidthd host = 192.168.1.1" + option sensor_id "openwrt" diff --git a/utils/bandwidthd-php/files/bandwidthd-php.config b/utils/bandwidthd/files/bandwidthd-php.config similarity index 100% rename from utils/bandwidthd-php/files/bandwidthd-php.config rename to utils/bandwidthd/files/bandwidthd-php.config diff --git a/utils/bandwidthd-php/files/bandwidthd-php.init b/utils/bandwidthd/files/bandwidthd-php.init similarity index 97% rename from utils/bandwidthd-php/files/bandwidthd-php.init rename to utils/bandwidthd/files/bandwidthd-php.init index f3a7c67..b7b6434 100755 --- a/utils/bandwidthd-php/files/bandwidthd-php.init +++ b/utils/bandwidthd/files/bandwidthd-php.init @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2006-2017 OpenWrt.org START=99 diff --git a/utils/bandwidthd/files/bandwidthd-sqlite.config b/utils/bandwidthd/files/bandwidthd-sqlite.config new file mode 100644 index 0000000..bc4154a --- /dev/null +++ b/utils/bandwidthd/files/bandwidthd-sqlite.config @@ -0,0 +1,13 @@ +config bandwidthd + option dev br-lan + option subnets "192.168.1.0/24" + option skip_intervals 0 + option graph_cutoff 1024 + option promiscuous true + option output_cdf false + option recover_cdf false + option filter ip + option graph true + option meta_refresh 150 + option sqlite_filename "/www/bandwidthd/stats.db" + option sensor_id "default" diff --git a/utils/bandwidthd/files/bandwidthd-pgsql.init b/utils/bandwidthd/files/bandwidthd-sqlite.init old mode 100644 new mode 100755 similarity index 50% rename from utils/bandwidthd/files/bandwidthd-pgsql.init rename to utils/bandwidthd/files/bandwidthd-sqlite.init index 232fa0c..c456974 --- a/utils/bandwidthd/files/bandwidthd-pgsql.init +++ b/utils/bandwidthd/files/bandwidthd-sqlite.init @@ -1,8 +1,15 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2008-2015 OpenWrt.org +# Copyright (C) 2008-2017 OpenWrt.org START=99 +USE_PROCD=1 + +CONFIGNAME="bandwidthd" +CONFIGPHPNAME="bandwidthd-php" +CONFIGFILE="/tmp/etc/bandwidthd.conf" +CONFIGPHPFILE="/tmp/etc/bandwidthd-php.conf" + config_cb() { local cfg_type="$1" local cfg_name="$2" @@ -50,18 +57,17 @@ export_string() { fi } -start() { - local subnet conffile +set_conf_file() { + local subnet conffile="# auto-generated config file from /etc/config/${CONFIGNAME}\n" [ -d /tmp/bandwidthd ] || mkdir -p /tmp/bandwidthd && cp /www/legend.gif /www/logo.gif /tmp/bandwidthd/ [ -e /htdocs ] || ln -s /tmp/bandwidthd /htdocs [ -e /www/bandwidthd ] || ln -s /tmp/bandwidthd /www/bandwidthd - rm -f /tmp/bandwidthd.conf - touch /tmp/bandwidthd.conf - [ -e /etc/bandwidthd.conf ] || ln -s /tmp/bandwidthd.conf /etc/bandwidthd.conf - - - config_load bandwidthd + rm -f $CONFIGFILE + touch $CONFIGFILE + [ -e /etc/bandwidthd.conf ] || ln -s $CONFIGFILE /etc/bandwidthd.conf + + config_load $CONFIGNAME for cfg in $cfgs; do config_get subnets $cfg subnets for subnet in $subnets; do @@ -77,14 +83,51 @@ start() { export_bool graph $cfg export_number meta_refresh $cfg export_string pgsql_connect_string $cfg + export_string sqlite_filename $cfg export_string sensor_id $cfg - [ -n "$conffile" ] && echo -e "$conffile" >>/tmp/bandwidthd.conf + [ -n "$conffile" ] && echo -e "$conffile" >>$CONFIGFILE unset conffile done cd / - service_start /usr/sbin/bandwidthd } -stop() { +set_php_conf_file() { + local subnet conffile="" + [ -n "$conffile" ] && echo -e "$conffile" >>$CONFIGPHPFILE + done + cd / +} + +service_triggers() { + procd_add_reload_trigger $CONFIGNAME + procd_add_reload_trigger $CONFIGPHPNAME +} + +start_service() { + set_conf_file + set_php_conf_file + procd_open_instance + procd_set_param command /usr/sbin/bandwidthd + procd_close_instance +} + +stop_service() { service_stop /usr/sbin/bandwidthd } diff --git a/utils/bandwidthd/files/bandwidthd.config b/utils/bandwidthd/files/bandwidthd.config index 0769b1c..ac1669e 100644 --- a/utils/bandwidthd/files/bandwidthd.config +++ b/utils/bandwidthd/files/bandwidthd.config @@ -1,5 +1,5 @@ config bandwidthd - option dev br-lan + option dev br-lan option subnets "192.168.1.0/24" option skip_intervals 0 option graph_cutoff 1024 diff --git a/utils/bandwidthd/files/bandwidthd.init b/utils/bandwidthd/files/bandwidthd.init old mode 100644 new mode 100755 index 38d9cb1..ac9d01d --- a/utils/bandwidthd/files/bandwidthd.init +++ b/utils/bandwidthd/files/bandwidthd.init @@ -1,8 +1,13 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2008-2015 OpenWrt.org +# Copyright (C) 2008-2017 OpenWrt.org START=99 +USE_PROCD=1 + +CONFIGNAME="bandwidthd" +CONFIGFILE="/tmp/etc/bandwidthd.conf" + config_cb() { local cfg_type="$1" local cfg_name="$2" @@ -50,18 +55,17 @@ export_string() { fi } -start() { +set_conf_file() { local subnet conffile [ -d /tmp/bandwidthd ] || mkdir -p /tmp/bandwidthd && cp /www/legend.gif /www/logo.gif /tmp/bandwidthd/ [ -e /htdocs ] || ln -s /tmp/bandwidthd /htdocs [ -e /www/bandwidthd ] || ln -s /tmp/bandwidthd /www/bandwidthd - rm -f /tmp/bandwidthd.conf - touch /tmp/bandwidthd.conf - [ -e /etc/bandwidthd.conf ] || ln -s /tmp/bandwidthd.conf /etc/bandwidthd.conf + rm -f $CONFIGFILE + touch $CONFIGFILE + [ -e /etc/bandwidthd.conf ] || ln -s $CONFIGFILE /etc/bandwidthd.conf - - config_load bandwidthd + config_load $CONFIGNAME for cfg in $cfgs; do config_get subnets $cfg subnets for subnet in $subnets; do @@ -76,13 +80,27 @@ start() { export_string filter $cfg export_bool graph $cfg export_number meta_refresh $cfg - [ -n "$conffile" ] && echo -e "$conffile" >>/tmp/bandwidthd.conf + export_string pgsql_connect_string $cfg + export_string sqlite_filename $cfg + export_string sensor_id $cfg + [ -n "$conffile" ] && echo -e "$conffile" >>$CONFIGFILE unset conffile done cd / - service_start /usr/sbin/bandwidthd } -stop() { +service_triggers() +{ + procd_add_reload_trigger $CONFIGNAME +} + +start_service() { + set_conf_file + procd_open_instance + procd_set_param command /usr/sbin/bandwidthd + procd_close_instance +} + +stop_service() { service_stop /usr/sbin/bandwidthd } diff --git a/utils/bandwidthd-php/files/logo.gif b/utils/bandwidthd/files/logo-openwrt.gif similarity index 100% rename from utils/bandwidthd-php/files/logo.gif rename to utils/bandwidthd/files/logo-openwrt.gif diff --git a/utils/bandwidthd/files/logo.gif b/utils/bandwidthd/files/logo.gif deleted file mode 100644 index 2ffec5605b72c48f49d8ee3dc069e80baccd6aa7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9431 zcmYLO2{=^Y*S|9cV+`($oz&RMp0yB~u`iR5iXuZ2qGYGkShHtm?E5Zb4avSQ8KLY; zA!}%($b9<$zwi0p=Q;PBbIZ}eRcG-6_u=!P!g~Y{2Np%K=X@1&W`jv zt99rkxKO=l4=TTS`Dd&Oj|rtpSPl^(L+2u z>E+F>BMYBgT=rU8>>_KpsoXdmZYwM6VzuMW&JL9-=R$Q+bxJ?l*=cO;8Jb*?lcSmk zK9!@&^-q1G+hP?K7G7CdSs)OGNF>edpvaPLr^s@1Vqs0s)CdSlyS&8IT)RcRH9tRJ z*gQ5w9hzL)ETxtPZoS<7{)?3&x3cwZl}P+KG9uqh7?P6<2ncvwlP^jYjW2Bcy|6%~ z@__5S{T5H;w=jT=ZL(lfqNIWnZOvT~KWx>H$+b;)9y zI(sWLp|hu-R5Jvp!Zo&x2sLr$f#o7Kx7pdLBr1uY%D?jb`TEP3f<1bZ)X5V{Vs=pODp^ebKmT;t_=mC9UOMry|FMC^zt7bH9AF4& z{)h8lPWnlb?g{r{mktqFLa@a50215Z!%(-7U0$){5P)yVwc zm>WeC_~%RfgZ+CK05}yu!B6Ruv)cpVtYQ{@Qgf!9Mue}~O?!DY#> z0>dOfWb)w~%AkULMxymLS~84|=I%*^_6FI{eHdkF?dv33yLU+yWN9=?GfAvim-Ei> ztx{CCHd`$K$<<<{uQa~y|KOT`;-pheq_&ZO2Sa_g9_N1i%E2wu*fVx|RcH1-Ed5*FmE)*W|@oF%0;cGle$sAh?kCrZJHq|7#ndOBrLCFhk9$ zGn3oquV|YY8~I(%@0l_CDJp%1{!7k#3QOhnYaM1J^K*-#Lhnr%{E?!V9QDh!yH@I# zoBNC+FyJ!1*d%+AKsdAxu%usQ(!_+w-Ra|nON5$zio+Lbo{ptWBxrJ+pFiky=d&f< zW7jqvgD~=$qUN4AT+g{jKgK0<=EYd;l$}D1WkW$IJ35~jAhCPX$Zi5P-jO`s@O#zQ z`j0hCK?1J+20IUv-o3Te$8e-I!*? z^c0SPW(-mX z)j{8e*fgYO+&|mmjZ&dJ7~;v_?Yv3C(u_!O9}v9Nr~hEYc1j|Q0y#Er#n5c?=KISPb=l5bSBYGKdo2@2@hCdgh z-e4Ns5dF30O#PixHUmur?ln*B+7)LNC+ue8Bnq}nbf1&_@_TwT!b(r9q}{5BYddV?$q$w+D072NYR`e^x;2$?&fUED z=X!4a>7pM$@L}_SG=PoSb;Kw)F+*>~XoKo&5iML&7?q&7EvI*Ig+J|4>Y-defQJEmwPzHlzu58w zcu)3_;_Fy5!ktRoGLQT&T{*fbft%Zod@`3VsNW1n7+qdR0n9s@Cv zLfm`~sDO^tMP~faHTpx~gYwRYz z#aNgM-P6|5%L_%t#cvg8TJ-jBmdCl;nOuc&PM+d*v~%|xi-J1JCC~1L2A)3ccse?`)O(=RU$ zTuy^qSnXVzLg`h())zns$Fh5n(EQAD1MW-z_j5ZzLfkFh#g}=6lvBa*ZI4=%2Vqv)>cB82H@@F5#F&qMsAq6 z`bd5C)abF=vxS_bkdn*ffHTp3?Qi!q;!y*B^2dcu;a`Bcgg5 zUsn9iR~1Cn7iEMuWn6#91-$xE z&;vIe*hRfd?tq>B-C=fa;qOlJxd4%+)8UqN63ll?k$iM_Dyaoyio?IMKg;^f8C>*y z1+|s`e!9wa%Y=fvl5YIDVq9odwFJlX2C2E0WLRRRyZJ69aKnabcuQcdF}bkO_H|bz zodTU}4RlwOcjIZ8DaFAdiOoIroR^rv7sr?3zpgnR9<`a2X^%IyxaY_@YL`0VXcZpT z&fu4}-m5TtkBI#nGd;OFRlgTs>hZLMHn3lvccrHzqG5^wiWwCv)GK|iGB2-uDx8}?#SF?TEE7d+5 za6cbAw{!fndGpDxUsnGDBS?#mwBHR%KG#}=^%>~o`WBYl|B2BE)=LBb7W=4Z0)qTA z)NA`aegCN^_KdG}v|4ldMOD0!6_F?VtwQ-Dzw=gEpyYuqy-EMuEi3iI>4g^Q#*eDP zJ}<$A{bi)F-tn%b$iBer; zy}FA!yGSRwM5Iq)MKlm?bNr|1{hiOD*ri!|g$pi)S@B0$(uXCUMV;D3H^B8u6<;LM zMWFV=pJaQ%_abUV(DiHV1H}&w5!*%U-mDtGPKY{n$tyqQVeQAR}Uuw<|~3`2Y>{G zF1U|=do7y59|Fq`c%%5z)Eli4LxrzQp#1u-%DD&7SXCI#J-M}}(fd1x?$UF^t zV?e=D*6pcmdPGiaamup;6gM$P+V>exQ`jjnw6J6L?{!evH%~Dq`zLn}3r{XBB$GP_ zCgYp`#V2CjhlB4AO65=Tr6yLDCe$1$j}Dj5wFKqjp;gDgqzE~j%6U2VAR9JAS&t5e zrLisn*|KSPU4WxHh=X$ILqt)mP!Sg;pVheV5l@lBpM3Qu(72TK+CbsBLs5)S(Ue&M zmg-xe$_?|_D5~fK31aCA*$@~GiX`T!^Yi}gOXTp6lP4BSX#+;*Q1aN6#2#8@X^@Q! zA@h_~iho&A; z!3)5c_R8cgdOR}^9pNdSfo&$kQM&Y0gEQ3YXlP%+r)FK~))3FEiHS4QdHRfK`kaYLWDc!BcjZw6I~7=2M$k zn3nvz)}V~u&gX19W`S;bINf3k#Op1|hRGUN`tSVr{4~NG$8hD1id7d+4RTKfX&sYh+$-OgW zBd|%9ooWnb^rV-r_DQayH*P-iXilW7cJ^xWPkYlT4*sQvl^~2us9~9JFOl#0wER`h zZHlI&W!Ft&QSs!Ah^T)86bv0P2KHg*H%B zJl&?W<*qMynfMkxYqRyFeX;2(M|u04BCXGtfI#KkS^IdzXx-n5@K*bXs4LMWW6^nhyX(lK)caEAr3P?)pmTMzo7o&3j_A>_=ysB*dN9;8NY^#Pm;ps) z*kfCLZjxa+G=%-=Rye(*MDI~u_i^{zAPH3{b@Ww-UIHV8q-dPD46n5X=m?8+MowL{ z?XAHL^huHZj%n?#60g#bwV6md>6m^ll~(81jX16##h7l%!q#YIx63u@t=_PL@|q&# z0QNy&$7YW`ejvgrGrAm%abk6iHOVS6Ld+!VMB zMS-8wP^c!+A@w0|ee!QwrQ4xaSWa0=C6fzDIJ-uBrt)?frxoR$WFe=yW$0~ZlI2{b zM{M2gNlvEh`kQ5(54UX`=IT?;Iqzq9c~x*ea8C2csnvRtM(~^Pkon+rh0|FyU22!q zu9WFJ!-+BW*>y}ltAv^vYGS}uC0;18m25&(jm(_{LF*0ZyQt+=DW+>9)_Z7T~( z^85?n$y}x1#c>+4dkg&-EOt7!cA9>4I%;65Y$)F6<}^K|TFZF|nKLd|HFVed4QJKx z4=3>PZ0^UoR+HuyP5dwe)qlo05}4YynXm+}MJBBwJ#8?c@BvNa;oHxAdK}{5w{$P0 zD7d$6wG!n%>zCy}JuG!&m=-eMXFnd*PlP&Ws-DuDiUeCSim3=srf1-i!~o&u7!Cj6 zEHXE^7|Lk8#6Rcx00Tk~rjZ8Vr!O82>0Woq6=x2Y`1NO#dUECVJE1vCOMly1NS%yT zo#4|R(`K;4(t%s@v$4c7+W8g2dYSj#a-8jS`*ybCR~U3OBE7t3=MCkU{i@DE#2IPO zkQtAZS^l=RK<~Iz*0j9i)0wossU((oJBNs5blI7IDuYw!1#x=1kQD-%&boinY}MS9)}+NY0us!a3Bh} z_0{HLBN%AtHpk>y5)G<&ZAjMB`|E+5N?=*bk`2jA{RRCO%c^3FSimsP_c(I~Nrw~zX$O{W zAm(8~^s*283G|%!p z2>9|2)cm+BnM{A2>9?*3s_}fim$~G8Kg=8Ro{fB~LUBCJ0Ng)r{jJu1_^=>RDn}Br z$xL-zj1q03GtQ|wWUa@=B}<~1E`u!3_hhWT=Dp3Ae4Y7aK7tlfOrN?*V?+WMB^06*Xo1&yOz#1dPxkTp)yGSPJQ*xAX63 zER*j1lh+I;{j3gBD*;!Roacl|cT|rL@014$?TfB_eraw|Y96=nQ<80oN;3s)4+&tR4KOaI1ZliLDX_Jr7=PA|=2LZy-jT63-smUG3uN45p z8`_%hE)JwX_nXTdr1^(aK%I^upP0^$bST53UMQQWdbWawjmSXUkO@q|M|m8DTE8C7 z0J;{eeZyQ2GZqYxF+e+MWC^78AkCLQTQr@yHs76gv$DUA_F~F7%A*Z;(U_W~dE3<5 zD!^Hz<(?=TZYh_yPwYyHqJ5WW0AE1PfZ~0yLetGx*oljOYRKU>XF+y-G4*q3jA%%+ z+0EBq-@f&uN{QaWaK_7+3Q{cMz4f54?!P*nwGmeTcibltU8 ze<&F~?K`?Mt>wCKq+G->rR0#jeOjjT;jyPbm7aWY2^JoezZ35I8N&k;cgd$om#Zi| zM900#2{bXYX)kWl6+!NUzS5V2BWWHru%L=}YhyxqcIkrTgSIg&8VH#d&b-uJ@wI0G z()^8oW{N}RphDGs@pPv!ba4Togg9H8g$cRa(_OscoQZA~MgVOC_2)(rs(S;o#U2x3 zt>vXdkh5^T0Qg<8Kv5ACmsqZ}mWs%r{}8W3+o|tt-!bTCuxg?JwVvy}t`=$l2Z22^ z!up>&*7yd*^+lB6+9miH#`-*Szg5+`kOhZx$+~a`Sd&WM*o^u{IiBan6?=c#FNE!E z#Jnv-bP(*bTyTsPjwAZOZ;vjJCN$?sci1 z05qEj?xn8ZD~8SNf_Ehw@m4M$@&xX9Ke_mN$4=Q+$IZU|mcFWBU~SN%xTB3Ugo@+u z*eh=s_$uVW`6<0mSA|w+)?&6Nu$HSv^V}N?#7lG)qxT|&NxP4}t=s67%Fg(yMRJeU zTQecyAObN@K$c6uc42S&!h5Gi+Lw$_X=z9#PsFE$*-ablo!{u9+DCI=O+*q2Ne!Xa zQ3`5iY88B-E2qDisyO(g$_N-?Qi(w0deH|cCx_uJhKaI#}RnZ9C z_gPn`e>_H1BL;#SVSz9PhDd$eSCCISZU~qS$ojF3SN5uqtoWxQcT?3MZ=(REFe@&z zU_j{XDE|Zw`gS7-IOpBNAnR+j)|6ezAr*XGqw2ch0QNkrxRm*Zdw2%nX7*_{nP^;> zAo!w)lfL7f1uW=uS&~RjkQ2&C%NTLp$xM?a*jn2P8gQQ|og{7YUhbl3UZgD>QU1d+ z-Laf^6C*1&Tbpf+ahvw`sq=E3^+%ITS_( zdfQ@~QJ&X@?)~M7XA9n~K5K0ob!oyju$b+;rZ=VNy82DM?L~hxCUYE)J$%HWP$!i( z_{(t0gpT=u8z#CxkY&frFuD+C5~q&MLw}=n?^y<}0R*2(B{W1+{v5BFt!SsiP|&2@ z*#k}8qg$nCWi`>Utv^;?%oh#kt`V|_x;h0mjfVCi3X$WsVG4|?eWDGuXKi;^wb^B9 zpDe-C8}PcP#QY7u{k?|jyLlerbNMd5ubY;P!YmJ2;Rw4 zzE;qDxan4`BGLA&LFk!X4*6Q+WrWC^HaN^}W=ea5(Qw8&fAU6rre%d=XH?kCvrUqC z8?sTtSnA2{joV2n+YiSJLZ@%k&(10DKfoVCVeYpRsxpQf@K2<)eBa#pRnPe-;#1nf z`*2Y3R1o63co-bjrk0d0UqsLs)%r!j_-5XhINRr>K@dCF6FgA)H>jM@IT;M&w1rp_ z7p(bQrwT(xYnUFZ3o9L|vG>4kw$yIj6Ss&Nxbs1k?b&+Q4_|?I6atH-v+fg#KQYXD zc7dO5o%M=A&82n@ei21#DBsp%SD-XEgx~%%E|(kSl(dS$QQEIJkRg0@?4*(+OLN)SBVQmf=A z^RJ=OlS*{3J5hGxF(DY}K_F%;S?$G<1{HpOQSvN0sVxWyvL0|g zmX%hrOvQLBU2=TqUL@moPhMQ?W^3k8*-I*G_P>5ti<|l9usA#2yZD5Hy!R_KZ`;Z4 z?zNE}Ms@Xje^;b+rrS){YxQLRI?GTW&iV}9(Ydr61ZLj~G+G7dQx^NM;-;fBccM~@ z%I$b|rd5v$MeV3ZmO>YFea=HR8+schABu{@>iF(K&=l$KIekyA{|Nb2t#f)Z9Xd8${i>QE$mFEO zsrngCvhgr6*(G=#W}#pBju)tTlpd0%_NB>G zNQg{pDwhcLn!Pz!AT2U8iFxi6F6i_qXJ2(w>qS=I)%-yP`r`#_I;AnuJ03k3=l5Qo zk@@geayOQ7ezWP0Tp}mppejojW? zs;eWfUicmIf2p+{zVt&*rR$t(q#_ecy}N^k1`FU$sh^y*5m`IF z)pX)4M20Y$XWd_Fm3IzScj`B5(6n{okzM#@O~a>WXy9rp;~H1kx(#Q$uCjGs`_W}0 z)UDsub!AKQ8dB3NsQad^)^(xoeG>MnX1Dorr>4YNJqwMtCtdzxB2}yx3dk3<6Y3Pk zy9FdPb~LoBL$hq~YL;$Y&saN3Ts!!YIlNthKxp@4puTEj)V3?s zNrxJ$(i@!K`xvhqEKdVd^k=oF;X}5>3iZdy_s47YCz$pp+V&^8_a_JSrzG@~^7~V3 z`_sDm)5rTWmise*^e5LsIo62G@ZLbhws=MTd^WWNUHy3bfjDpdxX^*v6#dxZfzSs1 zatr+ed|0_Dyb=#5Yr?DK2P%T}Yg7hbX&RJR7?e60lsz4c!59eG4m6DG*L4lL-qNp5 zA8e@|tUMYdBZsO^4OI^r6iMKl$_G0&@jdv#?q&VH$f15Ge1AE9z}BF52tR01@Kyrf zI*xyhywY&$O5@Q`7wpQrS^SX2@ZeMY2evB{kyj>#u1v`fzi&2}feDO^56|WgH_vQc zY3sVObaZ9GefXowyAPW0R?>%;oeWo>8m=U~TPq*_BxJaG#5dn%*m26RearAG(r{*B|@sYpFBhjTJ$1n=OPJswh zp!X`M@)X#03hg}#od< + +
    + +Please provide a sensor_name"; + exit(1); + } + +if (isset($_GET['ip'])) + $ip = $_GET['ip']; +else + { + echo "
    Please provide an ip address"; + exit(1); + } + +echo "

    "; +if (strpos($ip, "/") === FALSE) + echo "$ip - ".gethostbyaddr($ip)."

    "; +else + echo "Total - $ip"; + +$db = ConnectDb(); + +if ($ip == "0.0.0.0/0") + { + $rxtable = "bd_rx_total_log"; + $txtable = "bd_tx_total_log"; + } +else + { + $rxtable = "bd_rx_log"; + $txtable = "bd_tx_log"; + } + +$sql = "select rx.scale as rxscale, tx.scale as txscale, tx.total+rx.total as total, tx.total as sent, +rx.total as received, tx.tcp+rx.tcp as tcp, tx.udp+rx.udp as udp, +tx.icmp+rx.icmp as icmp, tx.http+rx.http as http, +tx.p2p+rx.p2p as p2p, tx.ftp+rx.ftp as ftp +from + +(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, +sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp +from sensors, $txtable +where sensor_name = '$sensor_name' +and sensors.sensor_id = ".$txtable.".sensor_id +$sql_subnet +group by ip) as tx, + +(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, +sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp +from sensors, $rxtable +where sensor_name = '$sensor_name' +and sensors.sensor_id = ".$rxtable.".sensor_id +$sql_subnet +group by ip) as rx + +where tx.ip = rx.ip;"; +//error_log($sql); printf('
    %s
    ', $sql); +$db = ConnectDb(); +$result = $db->query($sql); +echo "
    IpNameTotalSentReceivedtcpudpicmphttpsmtpftp"; +$r = $result->fetch(); +$db = NULL; +echo "
    "; +if (strpos($ip, "/") === FALSE) + echo "$ip".gethostbyaddr($ip); +else + echo "Total$ip"; +echo fmtb($r['total']).fmtb($r['sent']).fmtb($r['received']). + fmtb($r['tcp']).fmtb($r['udp']).fmtb($r['icmp']).fmtb($r['http']). + fmtb($r['p2p']).fmtb($r['ftp']); +echo "
    "; + +echo "

    Daily

    "; +echo "Send:

    "; +echo "
    "; +echo "Receive:

    "; +echo "
    "; + +echo "

    Weekly

    "; +echo "Send:

    "; +echo "
    "; +echo "Receive:

    "; +echo "
    "; + +echo "

    Monthly

    "; +echo "Send:

    "; +echo "
    "; +echo "Receive:

    "; +echo "
    "; + +echo "

    Yearly

    "; +echo "Send:

    "; +echo "
    "; +echo "Receive:

    "; +echo "
    "; diff --git a/utils/bandwidthd-php/files/footer.php b/utils/bandwidthd/files/phphtdocs-sqlite/footer.php similarity index 100% rename from utils/bandwidthd-php/files/footer.php rename to utils/bandwidthd/files/phphtdocs-sqlite/footer.php diff --git a/utils/bandwidthd/files/phphtdocs-sqlite/graph.php b/utils/bandwidthd/files/phphtdocs-sqlite/graph.php new file mode 100644 index 0000000..82df317 --- /dev/null +++ b/utils/bandwidthd/files/phphtdocs-sqlite/graph.php @@ -0,0 +1,455 @@ + $number) + { + $total[$key] /= $number; + $icmp[$key] /= $number; + $udp[$key] /= $number; + $tcp[$key] /= $number; + $ftp[$key] /= $number; + $http[$key] /= $number; + $p2p[$key] /= $number; + } + + foreach ($Count as $key => $number) + { + $a_total[$key] += $total[$key]; + $a_icmp[$key] += $icmp[$key]; + $a_udp[$key] += $udp[$key]; + $a_tcp[$key] += $tcp[$key]; + $a_ftp[$key] += $ftp[$key]; + $a_http[$key] += $http[$key]; + $a_p2p[$key] += $p2p[$key]; + + if ($a_total[$key] > $YMax) + $YMax = $a_total[$key]; + } + + unset($GLOBALS['total'], $GLOBALS['icmp'], $GLOBALS['udp'], $GLOBALS['tcp'], $GLOBALS['ftp'], $GLOBALS['http'], $GLOBALS['p2p'], $GLOBALS['Count']); + + $total = array(); + $icmp = array(); + $udp = array(); + $tcp = array(); + $ftp = array(); + $http = array(); + $p2p = array(); + $Count = array(); + } + +$db = ConnectDb(); + +// Get parameters + +if (isset($_GET['width'])) + $width = $_GET['width']; +else + $width = DFLT_WIDTH; + +if (isset($_GET['height'])) + $height = $_GET['height']; +else + $height = DFLT_HEIGHT; + +if (isset($_GET['interval'])) + $interval = $_GET['interval']; +else + $interval = DFLT_INTERVAL; + +if (isset($_GET['ip'])) + $ip = $_GET['ip']; +else + exit(1); + +if (isset($_GET['sensor_name'])) + $sensor_name = $_GET['sensor_name']; +else + exit(1); + +if (isset($_GET['timestamp'])) + $timestamp = $_GET['timestamp']; +else + $timestamp = time() - $interval + (0.05*$interval); + +if (isset($_GET['table'])) + $table = $_GET['table']; +else + $table = "bd_rx_log"; + +if (isset($_GET['yscale'])) + $yscale = $_GET['yscale']; + +$total = array(); +$icmp = array(); +$udp = array(); +$tcp = array(); +$ftp = array(); +$http = array(); +$p2p = array(); +$Count = array(); + +// Accumulator +$a_total = array(); +$a_icmp = array(); +$a_udp = array(); +$a_tcp = array(); +$a_ftp = array(); +$a_http = array(); +$a_p2p = array(); + +$sql_subnet = prepare_sql_subnet($ip); +$sql = "select *, timestamp as ts from sensors, $table where sensors.sensor_id = ".$table.".sensor_id $sql_subnet and sensor_name = '$sensor_name' and timestamp > $timestamp and timestamp < ".($timestamp+$interval)." order by ip;"; +//error_log($sql); +$result = $db->query($sql); + +// The SQL statement pulls the data out of the database ordered by IP address, that way we can average each +// datapoint for each IP address to provide smoothing and then toss the smoothed value into the accumulator +// to provide accurate total traffic rate. + +while ($row = $result->fetch()) + { + if ($row['ip'] != $last_ip) + { + AverageAndAccumulate(); + $last_ip = $row['ip']; + } + + $x = ($row['ts']-$timestamp)*(($width-XOFFSET)/$interval)+XOFFSET; + $xint = (int) $x; + + //echo "xint: ".$xint."
    "; + $Count[$xint]++; + + if ($row['total']/$row['sample_duration'] > $SentPeak) + $SentPeak = $row['total']/$row['sample_duration']; + $TotalSent += $row['total']; + $total[$xint] += $row['total']/$row['sample_duration']; + $icmp[$xint] += $row['icmp']/$row['sample_duration']; + $udp[$xint] += $row['udp']/$row['sample_duration']; + $tcp[$xint] += $row['tcp']/$row['sample_duration']; + $ftp[$xint] += $row['ftp']/$row['sample_duration']; + $http[$xint] += $row['http']/$row['sample_duration']; + $p2p[$xint] += $row['p2p']/$row['sample_duration']; + } + +// One more time for the last IP +AverageAndAccumulate(); + +// Pull the data out of Accumulator +$total = $a_total; +$icmp = $a_icmp; +$udp = $a_udp; +$tcp = $a_tcp; +$ftp = $a_ftp; +$http = $a_http; +$p2p = $a_p2p; + +$YMax += $YMax*0.05; // Add an extra 5% + +// if a y scale was specified override YMax +if (isset($yscale)&& $yscale > 0) + $YMax = $yscale/8; + +// Plot the data + +header("Content-type: image/png"); + +$im = imagecreate($width, $height); +$white = imagecolorallocate($im, 255, 255, 255); +$purple = ImageColorAllocate($im, 255, 0, 255); +$green = ImageColorAllocate($im, 0, 255, 0); +$blue = ImageColorAllocate($im, 0, 0, 255); +$lblue = ImageColorAllocate($im, 128, 128, 255); +$brown = ImageColorAllocate($im, 128, 0, 0); +$red = ImageColorAllocate($im, 255, 0, 0); +$black = ImageColorAllocate($im, 0, 0, 0); + +for($Counter=XOFFSET+1; $Counter < $width; $Counter++) + { + if (isset($total[$Counter])) + { + // Convert the bytes/sec to y coords + $total[$Counter] = ($total[$Counter]*($height-YOFFSET))/$YMax; + $tcp[$Counter] = ($tcp[$Counter]*($height-YOFFSET))/$YMax; + $ftp[$Counter] = ($ftp[$Counter]*($height-YOFFSET))/$YMax; + $http[$Counter] = ($http[$Counter]*($height-YOFFSET))/$YMax; + $p2p[$Counter] = ($p2p[$Counter]*($height-YOFFSET))/$YMax; + $udp[$Counter] = ($udp[$Counter]*($height-YOFFSET))/$YMax; + $icmp[$Counter] = ($icmp[$Counter]*($height-YOFFSET))/$YMax; + + // Stack 'em up! + // Total is stacked from the bottom + // Icmp is on the bottom too + // Udp is stacked on top of icmp + $udp[$Counter] += $icmp[$Counter]; + // TCP and p2p are stacked on top of Udp + $tcp[$Counter] += $udp[$Counter]; + $p2p[$Counter] += $udp[$Counter]; + // Http is stacked on top of p2p + $http[$Counter] += $p2p[$Counter]; + // Ftp is stacked on top of http + $ftp[$Counter] += $http[$Counter]; + + // Plot them! + //echo "$Counter:".$Counter." (h-y)-t:".($height-YOFFSET) - $total[$Counter]." h-YO-1:".$height-YOFFSET-1; + ImageLine($im, $Counter, ($height-YOFFSET) - $icmp[$Counter], $Counter, $height-YOFFSET-1, $red); + ImageLine($im, $Counter, ($height-YOFFSET) - $udp[$Counter], $Counter, ($height-YOFFSET) - $icmp[$Counter] - 1, $brown); + ImageLine($im, $Counter, ($height-YOFFSET) - $tcp[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $green); + ImageLine($im, $Counter, ($height-YOFFSET) - $p2p[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $purple); + ImageLine($im, $Counter, ($height-YOFFSET) - $http[$Counter], $Counter, ($height-YOFFSET) - $p2p[$Counter] - 1, $blue); + ImageLine($im, $Counter, ($height-YOFFSET) - $ftp[$Counter], $Counter, ($height-YOFFSET) - $http[$Counter] - 1, $lblue); + } +// else +// echo $Counter." not set
    "; + } + +// Margin Text +if ($SentPeak < 1024/8) + $txtPeakSendRate = sprintf("Peak Send Rate: %.1f KBits/sec", $SentPeak*8); +else if ($SentPeak < (1024*1024)/8) + $txtPeakSendRate = sprintf("Peak Send Rate: %.1f MBits/sec", ($SentPeak*8.0)/1024.0); +else + $txtPeakSendRate = sprintf("Peak Send Rate: %.1f GBits/sec", ($SentPeak*8.0)/(1024.0*1024.0)); + +if ($TotalSent < 1024) + $txtTotalSent = sprintf("Sent %.1f KBytes", $TotalSent); +else if ($TotalSent < 1024*1024) + $txtTotalSent = sprintf("Sent %.1f MBytes", $TotalSent/1024.0); +else + $txtTotalSent = sprintf("Sent %.1f GBytes", $TotalSent/(1024.0*1024.0)); + +ImageString($im, 2, XOFFSET+5, $height-20, $txtTotalSent, $black); +ImageString($im, 2, $width/2+XOFFSET/2, $height-20, $txtPeakSendRate, $black); + +// Draw X Axis + +ImageLine($im, 0, $height-YOFFSET, $width, $height-YOFFSET, $black); + +// Day/Month Seperator bars + +if ((24*60*60*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) + { + $ts = getdate($timestamp); + $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); + + $x = ts2x($MarkTime); + while ($x < XOFFSET) + { + $MarkTime += (24*60*60); + $x = ts2x($MarkTime); + } + + while ($x < ($width-10)) + { + // Day Lines + ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); + ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); + + $txtDate = strftime("%a, %b %d", $MarkTime); + ImageString($im, 2, $x-30, $height-YOFFSET+10, $txtDate, $black); + + // Calculate Next x + $MarkTime += (24*60*60); + $x = ts2x($MarkTime); + } + } +else if ((24*60*60*30*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) + { + // Monthly Bars + $ts = getdate($timestamp); + $month = $ts['mon']; + $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); + + $x = ts2x($MarkTime); + while ($x < XOFFSET) + { + $month++; + $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); + $x = ts2x($MarkTime); + } + + while ($x < ($width-10)) + { + // Day Lines + ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); + ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); + + $txtDate = strftime("%b, %Y", $MarkTime); + ImageString($im, 2, $x-25, $height-YOFFSET+10, $txtDate, $black); + + // Calculate Next x + $month++; + $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); + $x = ts2x($MarkTime); + } + } +else + { + // Year Bars + $ts = getdate($timestamp); + $year = $ts['year']; + $MarkTime = mktime(0, 0, 0, 1, 1, $year); + + $x = ts2x($MarkTime); + while ($x < XOFFSET) + { + $year++; + $MarkTime = mktime(0, 0, 0, 1, 1, $year); + $x = ts2x($MarkTime); + } + + while ($x < ($width-10)) + { + // Day Lines + ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); + ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); + + $txtDate = strftime("%b, %Y", $MarkTime); + ImageString($im, 2, $x-25, $height-YOFFSET+10, $txtDate, $black); + + // Calculate Next x + $year++; + $MarkTime = mktime(0, 0, 0, 1, 1, $year); + $x = ts2x($MarkTime); + } + } + +// Draw Major Tick Marks +if ((6*60*60*($width-XOFFSET))/$interval > 10) // pixels per 6 hours is more than 2 + $MarkTimeStep = 6*60*60; // Major ticks are 6 hours +else if ((24*60*60*($width-XOFFSET))/$interval > 10) + $MarkTimeStep = 24*60*60; // Major ticks are 24 hours; +else if ((24*60*60*30*($width-XOFFSET))/$interval > 10) + { + // Major tick marks are months + $MarkTimeStep = 0; // Skip the standard way of drawing major tick marks below + + $ts = getdate($timestamp); + $month = $ts['mon']; + $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); + + $x = ts2x($MarkTime); + while ($x < XOFFSET) + { + $month++; + $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); + $x = ts2x($MarkTime); + } + + while ($x < ($width-10)) + { + // Day Lines + $date = getdate($MarkTime); + if ($date['mon'] != 1) + { + ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); + $txtDate = strftime("%b", $MarkTime); + ImageString($im, 2, $x-5, $height-YOFFSET+10, $txtDate, $black); + } + + // Calculate Next x + $month++; + $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); + $x = ts2x($MarkTime); + } + } +else + $MarkTimeStep = 0; // Skip Major Tick Marks + +if ($MarkTimeStep) + { + $ts = getdate($timestamp); + $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); + $x = ts2x($MarkTime); + + while ($x < ($width-10)) + { + if ($x > XOFFSET) + { + ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); + } + $MarkTime += $MarkTimeStep; + $x = ts2x($MarkTime); + } + } + +// Draw Minor Tick marks +if ((60*60*($width-XOFFSET))/$interval > 4) // pixels per hour is more than 2 + $MarkTimeStep = 60*60; // Minor ticks are 1 hour +else if ((6*60*60*($width-XOFFSET))/$interval > 4) + $MarkTimeStep = 6*60*60; // Minor ticks are 6 hours +else if ((24*60*60*($width-XOFFSET))/$interval > 4) + $MarkTimeStep = 24*60*60; +else + $MarkTimeStep = 0; // Skip minor tick marks + +if ($MarkTimeStep) + { + $ts = getdate($timestamp); + $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); + $x = ts2x($MarkTime); + + while ($x < ($width-10)) + { + if ($x > XOFFSET) + { + ImageLine($im, $x, $height-YOFFSET, $x, $height-YOFFSET+5, $black); + } + $MarkTime += $MarkTimeStep; + $x = ts2x($MarkTime); + } + } + +// Draw Y Axis +ImageLine($im, XOFFSET, 0, XOFFSET, $height, $black); + +$YLegend = 'k'; +$Divisor = 1; +if ($YMax*8 > 1024*2) + { + $Divisor = 1024; // Display in m + $YLegend = 'm'; + } + +if ($YMax*8 > 1024*1024*2) + { + $Divisor = 1024*1024; // Display in g + $YLegend = 'g'; + } + +if ($YMax*8 > 1024*1024*1024*2) + { + $Divisor = 1024*1024*1024; // Display in t + $YLegend = 't'; + } + +$YStep = $YMax/10; +if ($YStep < 1) + $YStep=1; +$YTic=$YStep; + +while ($YTic <= ($YMax - $YMax/10)) + { + $y = ($height-YOFFSET)-(($YTic*($height-YOFFSET))/$YMax); + ImageLine($im, XOFFSET, $y, $width, $y, $black); + $txtYLegend = sprintf("%4.1f %sbits/s", (8.0*$YTic)/$Divisor, $YLegend); + ImageString($im, 2, 3, $y-7, $txtYLegend, $black); + $YTic += $YStep; + } + +imagepng($im); +imagedestroy($im); diff --git a/utils/bandwidthd/files/phphtdocs-sqlite/include.php b/utils/bandwidthd/files/phphtdocs-sqlite/include.php new file mode 100644 index 0000000..5195098 --- /dev/null +++ b/utils/bandwidthd/files/phphtdocs-sqlite/include.php @@ -0,0 +1,69 @@ +getMessage()); + } + return $db; +} + +function fmtb($kbytes) + { + $Max = 1024; + $Output = $kbytes; + $Suffix = 'K'; + + if ($Output > $Max) + { + $Output /= 1024; + $Suffix = 'M'; + } + + if ($Output > $Max) + { + $Output /= 1024; + $Suffix = 'G'; + } + + if ($Output > $Max) + { + $Output /= 1024; + $Suffix = 'T'; + } + + return(sprintf("%.1f%s", $Output, $Suffix)); + } + +function ip2s32($ip) { + $i = ip2long($ip); + return ($i & 0x80000000 ? '-' . ((~$i & 0x7fffffff)+1) : ''. ($i & 0x7fffffff)); +} + +function prepare_sql_subnet($subnet) { + list($snet, $smask) = explode('/', $subnet); + $inet = ip2s32($snet); + if($smask > 0 && $smask < 32) { + $mask = -1 << (32 - (int)$smask); + return "and (ip & $mask = $inet)"; + } elseif ($inet) { + return "and ip = " . $inet; + } + return ""; +} + +$starttime = time(); +set_time_limit(300); +?> diff --git a/utils/bandwidthd/files/phphtdocs-sqlite/index.php b/utils/bandwidthd/files/phphtdocs-sqlite/index.php new file mode 100644 index 0000000..c8b8598 --- /dev/null +++ b/utils/bandwidthd/files/phphtdocs-sqlite/index.php @@ -0,0 +1,190 @@ + + +
    + + +
    + + +
    + + + +Subnet Filter:"> + +
    +
    +Top $limit - $sensor_name"; +else + echo "

    All Records - $sensor_name

    "; + +// Sqlize the incomming variables +if (isset($subnet)) { + $sql_subnet = prepare_sql_subnet($subnet); +} + +// Sql Statement +$sql = "select tx.ip, rx.scale as rxscale, tx.scale as txscale, tx.total+rx.total as total, tx.total as sent, +rx.total as received, tx.tcp+rx.tcp as tcp, tx.udp+rx.udp as udp, +tx.icmp+rx.icmp as icmp, tx.http+rx.http as http, +tx.p2p+rx.p2p as p2p, tx.ftp+rx.ftp as ftp +from + +(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, +sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp +from sensors, bd_tx_log +where sensor_name = '$sensor_name' +and sensors.sensor_id = bd_tx_log.sensor_id +$sql_subnet +and timestamp > $timestamp and timestamp < ".($timestamp+$interval)." +group by ip) as tx, + +(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, +sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp +from sensors, bd_rx_log +where sensor_name = '$sensor_name' +and sensors.sensor_id = bd_rx_log.sensor_id +$sql_subnet +and timestamp > $timestamp and timestamp < ".($timestamp+$interval)." +group by ip) as rx + +where tx.ip = rx.ip +order by total desc;"; + +//echo "
    $sql
    "; error_log($sql); +$pdoResult = $db->query($sql); +$result = $pdoResult->fetchAll(); +$db = NULL; +$num_rows = count($result); +if ($limit == "all") + $limit = $num_rows; + +echo "
    IpNameTotalSentReceivedtcpudpicmphttpsmtpftp"; + +if (!isset($subnet)) // Set this now for total graphs + $subnet = "0.0.0.0/0"; + +// Output Total Line +echo "
    Total$subnet"; +foreach (array("total", "sent", "received", "tcp", "udp", "icmp", "http", "p2p", "ftp") as $key) + { + for($Counter=0, $Total = 0; $Counter < $num_rows; $Counter++) + { + $r = $result[$Counter]; + $Total += $r[$key]; + } + echo fmtb($Total); + } +echo "\n"; + +// Output Other Lines +for($Counter=0; $Counter < $num_rows && $Counter < $limit; $Counter++) + { + $r = $result[$Counter]; + $r['ip'] = long2ip($r['ip']); + echo "
    "; + echo $r['ip']."".gethostbyaddr($r['ip']); + echo ""; + echo fmtb($r['total']).fmtb($r['sent']).fmtb($r['received']). + fmtb($r['tcp']).fmtb($r['udp']).fmtb($r['icmp']).fmtb($r['http']). + fmtb($r['p2p']).fmtb($r['ftp'])."\n"; + } +echo "
    "; + +// Output Total Graph +for($Counter=0, $Total = 0; $Counter < $num_rows; $Counter++) + { + $r = $result[$Counter]; + $scale = max($r['txscale'], $scale); + $scale = max($r['rxscale'], $scale); + } + +if ($subnet == "0.0.0.0/0") + $total_table = "bd_tx_total_log"; +else + $total_table = "bd_tx_log"; +echo "

    "; +echo "Total - Total of $subnet

    "; +echo ""; +echo "Send:

    "; +echo "
    \n"; +if ($subnet == "0.0.0.0/0") + $total_table = "bd_rx_total_log"; +else + $total_table = "bd_rx_log"; +echo "Receive:

    "; +echo "
    \n"; + + +// Output Other Graphs +for($Counter=0; $Counter < $num_rows && $Counter < $limit; $Counter++) + { + $r = $result[$Counter]; + $r['ip'] = long2ip($r['ip']); + echo "

    "; + if ($r['ip'] == "0.0.0.0") + echo "Total - Total of all subnets

    "; + else + echo $r['ip']." - ".gethostbyaddr($r['ip']).""; + echo ""; + echo "Send:

    "; + echo "
    \n"; + echo "Receive:

    "; + echo "
    \n"; + } + +include('footer.php'); diff --git a/utils/bandwidthd-php/files/details.php b/utils/bandwidthd/files/phphtdocs/details.php similarity index 99% rename from utils/bandwidthd-php/files/details.php rename to utils/bandwidthd/files/phphtdocs/details.php index d2f0786..cb52f43 100644 --- a/utils/bandwidthd-php/files/details.php +++ b/utils/bandwidthd/files/phphtdocs/details.php @@ -65,7 +65,7 @@ group by ip) as rx where tx.ip = rx.ip;"; //echo "
    $sql
    ";exit(0); $result = pg_query($sql); -echo "
    IpNameTotalSentReceivedtcpudpicmphttpp2pftp"; +echo "
    IpNameTotalSentReceivedtcpudpicmphttpsmtpftp"; $r = pg_fetch_array($result); echo "
    "; if (strpos($ip, "/") === FALSE) diff --git a/utils/bandwidthd/files/phphtdocs/footer.php b/utils/bandwidthd/files/phphtdocs/footer.php new file mode 100644 index 0000000..b342825 --- /dev/null +++ b/utils/bandwidthd/files/phphtdocs/footer.php @@ -0,0 +1,3 @@ + diff --git a/utils/bandwidthd-php/files/graph.php b/utils/bandwidthd/files/phphtdocs/graph.php similarity index 80% rename from utils/bandwidthd-php/files/graph.php rename to utils/bandwidthd/files/phphtdocs/graph.php index b978177..323d659 100644 --- a/utils/bandwidthd-php/files/graph.php +++ b/utils/bandwidthd/files/phphtdocs/graph.php @@ -13,7 +13,7 @@ function AverageAndAccumulate() { global $Count, $total, $icmp, $udp, $tcp, $ftp, $http, $p2p, $YMax; global $a_total, $a_icmp, $a_udp, $a_tcp, $a_ftp, $a_http, $a_p2p; - + foreach ($Count as $key => $number) { $total[$key] /= $number; @@ -25,7 +25,7 @@ function AverageAndAccumulate() $p2p[$key] /= $number; } - foreach ($Count as $key => $number) + foreach ($Count as $key => $number) { $a_total[$key] += $total[$key]; $a_icmp[$key] += $icmp[$key]; @@ -38,7 +38,7 @@ function AverageAndAccumulate() if ($a_total[$key] > $YMax) $YMax = $a_total[$key]; } - + unset($GLOBALS['total'], $GLOBALS['icmp'], $GLOBALS['udp'], $GLOBALS['tcp'], $GLOBALS['ftp'], $GLOBALS['http'], $GLOBALS['p2p'], $GLOBALS['Count']); $total = array(); @@ -50,7 +50,6 @@ function AverageAndAccumulate() $p2p = array(); $Count = array(); } - $db = ConnectDb(); @@ -133,7 +132,7 @@ while ($row = pg_fetch_array($result)) //echo "xint: ".$xint."
    "; $Count[$xint]++; - + if ($row['total']/$row['sample_duration'] > $SentPeak) $SentPeak = $row['total']/$row['sample_duration']; $TotalSent += $row['total']; @@ -143,7 +142,7 @@ while ($row = pg_fetch_array($result)) $tcp[$xint] += $row['tcp']/$row['sample_duration']; $ftp[$xint] += $row['ftp']/$row['sample_duration']; $http[$xint] += $row['http']/$row['sample_duration']; - $p2p[$xint] += $row['p2p']/$row['sample_duration']; + $p2p[$xint] += $row['p2p']/$row['sample_duration']; } // One more time for the last IP @@ -170,7 +169,6 @@ header("Content-type: image/png"); $im = imagecreate($width, $height); $white = imagecolorallocate($im, 255, 255, 255); -$yellow = ImageColorAllocate($im, 255, 255, 0); $purple = ImageColorAllocate($im, 255, 0, 255); $green = ImageColorAllocate($im, 0, 255, 0); $blue = ImageColorAllocate($im, 0, 0, 255); @@ -207,7 +205,6 @@ for($Counter=XOFFSET+1; $Counter < $width; $Counter++) // Plot them! //echo "$Counter:".$Counter." (h-y)-t:".($height-YOFFSET) - $total[$Counter]." h-YO-1:".$height-YOFFSET-1; - ImageLine($im, $Counter, ($height-YOFFSET) - $total[$Counter], $Counter, $height-YOFFSET-1, $yellow); ImageLine($im, $Counter, ($height-YOFFSET) - $icmp[$Counter], $Counter, $height-YOFFSET-1, $red); ImageLine($im, $Counter, ($height-YOFFSET) - $udp[$Counter], $Counter, ($height-YOFFSET) - $icmp[$Counter] - 1, $brown); ImageLine($im, $Counter, ($height-YOFFSET) - $tcp[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $green); @@ -217,23 +214,23 @@ for($Counter=XOFFSET+1; $Counter < $width; $Counter++) } // else // echo $Counter." not set
    "; - } + } // Margin Text if ($SentPeak < 1024/8) $txtPeakSendRate = sprintf("Peak Send Rate: %.1f KBits/sec", $SentPeak*8); else if ($SentPeak < (1024*1024)/8) $txtPeakSendRate = sprintf("Peak Send Rate: %.1f MBits/sec", ($SentPeak*8.0)/1024.0); -else +else $txtPeakSendRate = sprintf("Peak Send Rate: %.1f GBits/sec", ($SentPeak*8.0)/(1024.0*1024.0)); - + if ($TotalSent < 1024) $txtTotalSent = sprintf("Sent %.1f KBytes", $TotalSent); else if ($TotalSent < 1024*1024) $txtTotalSent = sprintf("Sent %.1f MBytes", $TotalSent/1024.0); -else +else $txtTotalSent = sprintf("Sent %.1f GBytes", $TotalSent/(1024.0*1024.0)); - + ImageString($im, 2, XOFFSET+5, $height-20, $txtTotalSent, $black); ImageString($im, 2, $width/2+XOFFSET/2, $height-20, $txtPeakSendRate, $black); @@ -247,23 +244,23 @@ if ((24*60*60*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) { $ts = getdate($timestamp); $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); - + $x = ts2x($MarkTime); while ($x < XOFFSET) { $MarkTime += (24*60*60); $x = ts2x($MarkTime); } - + while ($x < ($width-10)) { // Day Lines ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - + $txtDate = strftime("%a, %b %d", $MarkTime); ImageString($im, 2, $x-30, $height-YOFFSET+10, $txtDate, $black); - + // Calculate Next x $MarkTime += (24*60*60); $x = ts2x($MarkTime); @@ -275,7 +272,7 @@ else if ((24*60*60*30*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) $ts = getdate($timestamp); $month = $ts['mon']; $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - + $x = ts2x($MarkTime); while ($x < XOFFSET) { @@ -283,16 +280,16 @@ else if ((24*60*60*30*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); $x = ts2x($MarkTime); } - + while ($x < ($width-10)) { // Day Lines ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - + $txtDate = strftime("%b, %Y", $MarkTime); ImageString($im, 2, $x-25, $height-YOFFSET+10, $txtDate, $black); - + // Calculate Next x $month++; $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); @@ -305,7 +302,7 @@ else $ts = getdate($timestamp); $year = $ts['year']; $MarkTime = mktime(0, 0, 0, 1, 1, $year); - + $x = ts2x($MarkTime); while ($x < XOFFSET) { @@ -313,21 +310,21 @@ else $MarkTime = mktime(0, 0, 0, 1, 1, $year); $x = ts2x($MarkTime); } - + while ($x < ($width-10)) { // Day Lines ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - + $txtDate = strftime("%b, %Y", $MarkTime); ImageString($im, 2, $x-25, $height-YOFFSET+10, $txtDate, $black); - + // Calculate Next x $year++; $MarkTime = mktime(0, 0, 0, 1, 1, $year); $x = ts2x($MarkTime); - } + } } // Draw Major Tick Marks @@ -343,7 +340,7 @@ else if ((24*60*60*30*($width-XOFFSET))/$interval > 10) $ts = getdate($timestamp); $month = $ts['mon']; $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - + $x = ts2x($MarkTime); while ($x < XOFFSET) { @@ -351,18 +348,18 @@ else if ((24*60*60*30*($width-XOFFSET))/$interval > 10) $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); $x = ts2x($MarkTime); } - + while ($x < ($width-10)) { // Day Lines $date = getdate($MarkTime); if ($date['mon'] != 1) { - ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); + ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); $txtDate = strftime("%b", $MarkTime); ImageString($im, 2, $x-5, $height-YOFFSET+10, $txtDate, $black); } - + // Calculate Next x $month++; $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); @@ -380,13 +377,13 @@ if ($MarkTimeStep) while ($x < ($width-10)) { - if ($x > XOFFSET) + if ($x > XOFFSET) { ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); } $MarkTime += $MarkTimeStep; $x = ts2x($MarkTime); - } + } } // Draw Minor Tick marks @@ -407,7 +404,7 @@ if ($MarkTimeStep) while ($x < ($width-10)) { - if ($x > XOFFSET) + if ($x > XOFFSET) { ImageLine($im, $x, $height-YOFFSET, $x, $height-YOFFSET+5, $black); } @@ -438,12 +435,12 @@ if ($YMax*8 > 1024*1024*1024*2) $Divisor = 1024*1024*1024; // Display in t $YLegend = 't'; } - + $YStep = $YMax/10; if ($YStep < 1) $YStep=1; $YTic=$YStep; - + while ($YTic <= ($YMax - $YMax/10)) { $y = ($height-YOFFSET)-(($YTic*($height-YOFFSET))/$YMax); @@ -453,5 +450,5 @@ while ($YTic <= ($YMax - $YMax/10)) $YTic += $YStep; } -imagepng($im); +imagepng($im); imagedestroy($im); diff --git a/utils/bandwidthd-php/files/include.php b/utils/bandwidthd/files/phphtdocs/include.php similarity index 100% rename from utils/bandwidthd-php/files/include.php rename to utils/bandwidthd/files/phphtdocs/include.php diff --git a/utils/bandwidthd-php/files/index.php b/utils/bandwidthd/files/phphtdocs/index.php similarity index 99% rename from utils/bandwidthd-php/files/index.php rename to utils/bandwidthd/files/phphtdocs/index.php index 5159f85..b3602af 100644 --- a/utils/bandwidthd-php/files/index.php +++ b/utils/bandwidthd/files/phphtdocs/index.php @@ -122,7 +122,7 @@ pg_query("set sort_mem to default;"); if ($limit == "all") $limit = pg_num_rows($result); -echo "
    IpNameTotalSentReceivedtcpudpicmphttpp2pftp"; +echo "
    IpNameTotalSentReceivedtcpudpicmphttpsmtpftp"; if (!isset($subnet)) // Set this now for total graphs $subnet = "0.0.0.0/0"; diff --git a/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch b/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch new file mode 100644 index 0000000..cfaba70 --- /dev/null +++ b/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch @@ -0,0 +1,24 @@ +--- a/configure.in ++++ b/configure.in +@@ -24,11 +24,6 @@ if test -n "$x_libraries" && test "x$x_l + LDFLAGS="$LDFLAGS -L$x_libraries" + fi + +-# May be equired for BSD +-LDFLAGS="$LDFLAGS -L/usr/local/lib" +- +-CPPFLAGS="$CPPFLAGS -I/usr/local/include" +- + #Check for Darwin sw directory + AC_CHECK_FILE(/sw/lib, LDFLAGS="$LDFLAGS -L/sw/lib") + AC_CHECK_FILE(/sw/include, CPPFLAGS="$CPPFLAGS -I/sw/include") +@@ -55,8 +50,7 @@ AC_CHECK_LIB(pcap, pcap_open_live, , + [AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libpcap])])]) + + # Optional Library +-AC_CHECK_FILE(/usr/lib, LDFLAGS="$LDFLAGS -L/usr/lib") +-AC_CHECK_FILE(/usr/include/pgsql, CPPFLAGS="$CPPFLAGS -I/usr/include/pgsql") ++AC_CHECK_FILE(/usr/local/pgsql/include, CPPFLAGS="$CPPFLAGS -I/usr/local/pgsql/include") + AC_CHECK_LIB(pq, PQconnectdb, + [AC_CHECK_LIB(pq,PQexecParams, ,AC_MSG_WARN([libpq exists but is too old... bandwidthd requires support for PQexecParams]))]) + AC_CHECK_LIB(sqlite3, sqlite3_open, ,AC_MSG_WARN([sqlite3 is recommended for storage of data but cannot be found])) diff --git a/utils/bandwidthd/patches/010-dont-add-host-paths.patch b/utils/bandwidthd/patches/010-dont-add-host-paths.patch deleted file mode 100644 index 59a5737..0000000 --- a/utils/bandwidthd/patches/010-dont-add-host-paths.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/configure b/configure -index 4c2546e..e516137 100755 ---- a/configure -+++ b/configure -@@ -2439,11 +2439,6 @@ if test -n "$x_libraries" && test "x$x_libraries" != xNONE ; then - LDFLAGS="$LDFLAGS -L$x_libraries" - fi - --# May be equired for BSD --LDFLAGS="$LDFLAGS -L/usr/local/lib" -- --CPPFLAGS="$CPPFLAGS -I/usr/local/include" -- - #Check for Darwin sw directory - echo "$as_me:2448: checking for /sw/lib" >&5 - echo $ECHO_N "checking for /sw/lib... $ECHO_C" >&6 -@@ -2505,9 +2500,6 @@ fi - fi - echo "$as_me:2506: result: $ac_cv_file__usr_pkg_lib" >&5 - echo "${ECHO_T}$ac_cv_file__usr_pkg_lib" >&6 --if test $ac_cv_file__usr_pkg_lib = yes; then -- LDFLAGS="$LDFLAGS -L/usr/pkg/lib" --fi - - echo "$as_me:2512: checking for /usr/pkg/include" >&5 - echo $ECHO_N "checking for /usr/pkg/include... $ECHO_C" >&6 -@@ -3092,9 +3084,6 @@ fi - fi - echo "$as_me:3093: result: $ac_cv_file__usr_local_pgsql_lib" >&5 - echo "${ECHO_T}$ac_cv_file__usr_local_pgsql_lib" >&6 --if test $ac_cv_file__usr_local_pgsql_lib = yes; then -- LDFLAGS="$LDFLAGS -L/usr/local/pgsql/lib" --fi - - echo "$as_me:3099: checking for /usr/local/pgsql/include" >&5 - echo $ECHO_N "checking for /usr/local/pgsql/include... $ECHO_C" >&6 diff --git a/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch b/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch new file mode 100644 index 0000000..d0e6144 --- /dev/null +++ b/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch @@ -0,0 +1,20 @@ +--- a/graph.c ++++ b/graph.c +@@ -274,7 +274,7 @@ void MakeIndexPages(int NumIps, struct S + + // PASS 1: Write out the table + +- fprintf(file, "
    Ip and NameTotalTotal SentTotal ReceivedFTPHTTPP2PTCPUDPICMP\n"); ++ fprintf(file, "
    Ip and NameTotalTotal SentTotal ReceivedFTPHTTPSMTPTCPUDPICMP\n"); + for (Counter=0; Counter < 21 && Counter < NumIps; Counter++) + PrintTableLine(file, SummaryData[Counter], Counter); + +@@ -341,7 +341,7 @@ void MakeIndexPages(int NumIps, struct S + + // PASS 1: Write out the table + +- fprintf(file, "
    Ip and NameTotalTotal SentTotal ReceivedFTPHTTPP2PTCPUDPICMP\n"); ++ fprintf(file, "
    Ip and NameTotalTotal SentTotal ReceivedFTPHTTPSMTPTCPUDPICMP\n"); + for (tCounter=0, Counter=0; Counter < NumIps; Counter++) + { + if (SubnetTable[SubnetCounter].ip == (SummaryData[Counter]->IP & SubnetTable[SubnetCounter].mask)) diff --git a/utils/bandwidthd/patches/100-fix_config_file_location b/utils/bandwidthd/patches/100-fix_config_file_location deleted file mode 100644 index ae44cd2..0000000 --- a/utils/bandwidthd/patches/100-fix_config_file_location +++ /dev/null @@ -1,31 +0,0 @@ ---- bandwidthd-2.0.1/bandwidthd.c.orig 2008-05-09 10:06:37.000000000 -0500 -+++ bandwidthd-2.0.1/bandwidthd.c 2008-05-09 10:32:54.000000000 -0500 -@@ -255,22 +255,22 @@ - - openlog("bandwidthd", LOG_CONS, LOG_DAEMON); - -- if (stat("./etc/bandwidthd.conf", &StatBuf)) -+ if (stat("/etc/bandwidthd.conf", &StatBuf)) - { - chdir(INSTALL_DIR); -- if (stat("./etc/bandwidthd.conf", &StatBuf)) -+ if (stat("/etc/bandwidthd.conf", &StatBuf)) - { -- printf("Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR); -- syslog(LOG_ERR, "Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR); -+ printf("Cannot find /etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR); -+ syslog(LOG_ERR, "Cannot find /etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR); - exit(1); - } - } - -- bdconfig_in = fopen("./etc/bandwidthd.conf", "rt"); -+ bdconfig_in = fopen("/etc/bandwidthd.conf", "rt"); - if (!bdconfig_in) - { - syslog(LOG_ERR, "Cannot open bandwidthd.conf"); -- printf("Cannot open ./etc/bandwidthd.conf\n"); -+ printf("Cannot open /etc/bandwidthd.conf\n"); - exit(1); - } - bdconfig_parse(); diff --git a/utils/ccid/Makefile b/utils/ccid/Makefile index c73809a..8b3b09d 100644 --- a/utils/ccid/Makefile +++ b/utils/ccid/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ccid -PKG_VERSION:=1.4.24 +PKG_VERSION:=1.4.26 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4171 -PKG_MD5SUM:=62cb73c6c009c9799c526f05a05e25f00f0ad86d50f82a714dedcfbf4a7e4176 +PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4205 +PKG_MD5SUM:=3267bf708ab780c02f01f6241b7c7277cb892d30fd1179a9926a8cc0ca40be2f PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=LGPL-2.1+ PKG_LICENSE_FILES:=COPYING diff --git a/utils/ccrypt/Makefile b/utils/ccrypt/Makefile index 1e25305..15c0cc2 100644 --- a/utils/ccrypt/Makefile +++ b/utils/ccrypt/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/ccrypt -PKG_MD5SUM:=44ddd763465c254df83f5d38851d04d7 +PKG_MD5SUM:=87d66da2170facabf6f2fc073586ae2c7320d4689980cfca415c74688e499ba0 PKG_MAINTAINER:=Hannu Nyman PKG_LICENSE:=GPLv2+ diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile index 70c055a..27491c6 100644 --- a/utils/collectd/Makefile +++ b/utils/collectd/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=collectd -PKG_VERSION:=5.5.2 -PKG_RELEASE:=4 +PKG_VERSION:=5.5.3 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://collectd.org/files/ -PKG_MD5SUM:=40b83343f72089e0330f53965f1140bd +PKG_MD5SUM:=6f10633d0f73f99ef61472a8e377d4a058de161e80f3353b4b17d394c68f2f44 PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4 -PKG_MAINTAINER:=Jo-Philipp Wich +PKG_MAINTAINER:=Jo-Philipp Wich , Hannu Nyman PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -199,7 +199,7 @@ CONFIGURE_ARGS+= \ ifneq ($(CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK),) CONFIGURE_ARGS+= \ - --with-libgcrypt=$(STAGING_DIR)/include + --with-libgcrypt=$(STAGING_DIR)/usr/include else CONFIGURE_ARGS+= \ --without-libgcrypt @@ -312,7 +312,7 @@ $(eval $(call BuildPlugin,bind,BIND server/zone input,bind,+PACKAGE_collectd-mod $(eval $(call BuildPlugin,conntrack,connection tracking table size input,conntrack,)) $(eval $(call BuildPlugin,contextswitch,context switch input,contextswitch,)) $(eval $(call BuildPlugin,cpu,CPU input,cpu,)) -$(eval $(call BuildPlugin,cpufreq,CPU Freq input,cpufreq,@(TARGET_x86||TARGET_x86_64||TARGET_mvebu||TARGET_ipq806x))) # Only enable on x86 mvebu and ipq806x +$(eval $(call BuildPlugin,cpufreq,CPU Freq input,cpufreq,@(TARGET_x86||TARGET_x86_64||TARGET_mvebu||TARGET_ipq806x||TARGET_armvirt))) # Only enable on x86 mvebu ipq806x armvirt $(eval $(call BuildPlugin,csv,CSV output,csv,)) $(eval $(call BuildPlugin,curl,cURL input,curl,+PACKAGE_collectd-mod-curl:libcurl)) #$(eval $(call BuildPlugin,dbi,relational database input,dbi,+PACKAGE_collectd-mod-dbi:libdbi)) diff --git a/utils/collectd/patches/050-upstream-fix-for-network-plugin-ddos.patch b/utils/collectd/patches/050-upstream-fix-for-network-plugin-ddos.patch new file mode 100644 index 0000000..d4d333e --- /dev/null +++ b/utils/collectd/patches/050-upstream-fix-for-network-plugin-ddos.patch @@ -0,0 +1,50 @@ +From f6be4f9b49b949b379326c3d7002476e6ce4f211 Mon Sep 17 00:00:00 2001 +From: Pavel Rochnyack +Date: Mon, 3 Apr 2017 11:57:09 +0600 +Subject: [PATCH] network plugin: Fix endless loop DOS in parse_packet() + +When correct 'Signature part' is received by Collectd, configured without +AuthFile option, condition for endless loop occurs due to missing increase +of pointer to next unprocessed part. + +Fixes: CVE-2017-7401 + +Signed-off-by: Florian Forster + + +--- a/src/network.c ++++ b/src/network.c +@@ -1066,14 +1066,6 @@ static int parse_part_sign_sha256 (socke + buffer_len = *ret_buffer_len; + buffer_offset = 0; + +- if (se->data.server.userdb == NULL) +- { +- c_complain (LOG_NOTICE, &complain_no_users, +- "network plugin: Received signed network packet but can't verify it " +- "because no user DB has been configured. Will accept it."); +- return (0); +- } +- + /* Check if the buffer has enough data for this structure. */ + if (buffer_len <= PART_SIGNATURE_SHA256_SIZE) + return (-ENOMEM); +@@ -1091,6 +1083,18 @@ static int parse_part_sign_sha256 (socke + return (-1); + } + ++ if (se->data.server.userdb == NULL) { ++ c_complain( ++ LOG_NOTICE, &complain_no_users, ++ "network plugin: Received signed network packet but can't verify it " ++ "because no user DB has been configured. Will accept it."); ++ ++ *ret_buffer = buffer + pss_head_length; ++ *ret_buffer_len -= pss_head_length; ++ ++ return (0); ++ } ++ + /* Copy the hash. */ + BUFFER_READ (pss.hash, sizeof (pss.hash)); + diff --git a/utils/collectd/patches/200-fix-git-describe-error.patch b/utils/collectd/patches/200-fix-git-describe-error.patch index 8f570cb..71f2036 100644 --- a/utils/collectd/patches/200-fix-git-describe-error.patch +++ b/utils/collectd/patches/200-fix-git-describe-error.patch @@ -2,7 +2,7 @@ +++ b/version-gen.sh @@ -2,7 +2,7 @@ - DEFAULT_VERSION="5.5.2.git" + DEFAULT_VERSION="5.5.3.git" -VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`" +#VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`" diff --git a/utils/collectd/patches/600-fix-libmodbus-detection.patch b/utils/collectd/patches/600-fix-libmodbus-detection.patch index dd0198a..aacf182 100644 --- a/utils/collectd/patches/600-fix-libmodbus-detection.patch +++ b/utils/collectd/patches/600-fix-libmodbus-detection.patch @@ -18,7 +18,7 @@ Reversed patch to be applied: --- a/configure.ac +++ b/configure.ac -@@ -2626,7 +2626,7 @@ then +@@ -2627,7 +2627,7 @@ then SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags" @@ -29,12 +29,12 @@ Reversed patch to be applied: fi --- a/src/modbus.c +++ b/src/modbus.c -@@ -27,7 +27,7 @@ - - #include +@@ -26,7 +26,7 @@ + #include "configfile.h" + #include "plugin.h" -#include +#include + #include + #include - #ifndef LIBMODBUS_VERSION_CHECK - /* Assume version 2.0.3 */ diff --git a/utils/collectd/patches/900-add-iwinfo-plugin.patch b/utils/collectd/patches/900-add-iwinfo-plugin.patch index 7f8c1e1..d23b09e 100644 --- a/utils/collectd/patches/900-add-iwinfo-plugin.patch +++ b/utils/collectd/patches/900-add-iwinfo-plugin.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -704,6 +704,9 @@ AC_CHECK_HEADERS(net/pfvar.h, +@@ -705,6 +705,9 @@ AC_CHECK_HEADERS(net/pfvar.h, have_termios_h="no" AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"]) @@ -67,7 +67,7 @@ # JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar" --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod -@@ -2606,6 +2606,27 @@ and all other interrupts are collected. +@@ -2612,6 +2612,27 @@ and all other interrupts are collected. =back diff --git a/utils/collectd/patches/920-fix-ping-droprate.patch b/utils/collectd/patches/920-fix-ping-droprate.patch index 96a5c22..947dc54 100644 --- a/utils/collectd/patches/920-fix-ping-droprate.patch +++ b/utils/collectd/patches/920-fix-ping-droprate.patch @@ -1,6 +1,6 @@ --- a/src/ping.c +++ b/src/ping.c -@@ -658,7 +658,7 @@ static int ping_read (void) /* {{{ */ +@@ -655,7 +655,7 @@ static int ping_read (void) /* {{{ */ / ((double) (pkg_recv * (pkg_recv - 1)))); /* Calculate drop rate. */ diff --git a/utils/coreutils/Makefile b/utils/coreutils/Makefile index 73b1a85..0d52b60 100644 --- a/utils/coreutils/Makefile +++ b/utils/coreutils/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=coreutils PKG_VERSION:=8.23 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/coreutils @@ -37,11 +37,11 @@ DEPENDS_timeout = +librt DEPENDS_expr = +libgmp DEPENDS_factor = +libgmp DEPENDS_cp = +libacl -DEPENDS_dir = +libacl +DEPENDS_dir = +libacl +libcap DEPENDS_install = +libacl -DEPENDS_ls = +libacl +DEPENDS_ls = +libacl +libcap DEPENDS_mv = +libacl -DEPENDS_vdir = +libacl +DEPENDS_vdir = +libacl +libcap define Package/coreutils/Default SECTION:=utils diff --git a/utils/dbus/Makefile b/utils/dbus/Makefile index 16ed227..0560fc6 100644 --- a/utils/dbus/Makefile +++ b/utils/dbus/Makefile @@ -122,11 +122,11 @@ HOST_CONFIGURE_ARGS+= \ --disable-verbose-mode \ --disable-xml-docs \ --with-dbus-user=root \ - --with-dbus-daemondir="$(STAGIND_DIR)/host/bin" \ - --with-system-socket="$(STAGING_DIR)/host/var/run/dbus/system_bus_socket" \ - --with-system-pid-file="$(STAGING_DIR)/host/var/run/dbus.pid" \ + --with-dbus-daemondir="$(STAGING_DIR_HOSTPKG)/bin" \ + --with-system-socket="$(STAGING_DIR_HOSTPKG)/var/run/dbus/system_bus_socket" \ + --with-system-pid-file="$(STAGING_DIR_HOSTPKG)/var/run/dbus.pid" \ --without-x \ - --libexecdir="$(STAGING_DIR)/host/lib/dbus-1" + --libexecdir="$(STAGING_DIR_HOSTPKG)/lib/dbus-1" HOST_CONFIGURE_VARS+= \ ac_cv_have_abstract_sockets="yes" \ diff --git a/utils/dump1090/Makefile b/utils/dump1090/Makefile index 25dfa3d..2ca4abf 100644 --- a/utils/dump1090/Makefile +++ b/utils/dump1090/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dump1090 -PKG_VERSION:=2016-10-02 +PKG_VERSION:=2016-11-26 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/mutability/dump1090.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=344415b91f018e7fd3719fe639888505c54792ad +PKG_SOURCE_VERSION:=fb63bdc2a61f0169b3c21b33bcdc99f202685b78 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz PKG_MAINTAINER:=Álvaro Fernández Rojas diff --git a/utils/ecdsautils/Makefile b/utils/ecdsautils/Makefile new file mode 100644 index 0000000..e5f3567 --- /dev/null +++ b/utils/ecdsautils/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2012-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:=ecdsautils +PKG_VERSION:=0.3.2.20160630 +PKG_RELEASE:=1 +PKG_REV:=07538893fb6c2a9539678c45f9dbbf1e4f222b46 +PKG_MAINTAINER:=Matthias Schiffer +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=git://github.com/tcatm/$(PKG_NAME).git +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_PROTO:=git + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libecdsautil + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libuecc + TITLE:=ECDSA library + URL:=https://github.com/tcatm/ecdsautils +endef + +define Package/ecdsautils + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libecdsautil +libuecc + TITLE:=ECDSA Utilities + URL:=https://github.com/tcatm/ecdsautils +endef + +CMAKE_OPTIONS += \ + -DCMAKE_BUILD_TYPE:String="MINSIZEREL" \ + + +define Package/libecdsautil/description + Library to sign and verify checksums using ECDSA. +endef + +define Package/ecdsautils/description + Utilities to sign and verify checksums using ECDSA. +endef + +define Package/libecdsautil/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libecdsautil.so* $(1)/usr/lib/ +endef + +define Package/ecdsautils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ecdsautil $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsakeygen $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsasign $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsaverify $(1)/usr/bin/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/ + $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr/ +endef + +$(eval $(call BuildPackage,libecdsautil)) +$(eval $(call BuildPackage,ecdsautils)) diff --git a/utils/flent-tools/Makefile b/utils/flent-tools/Makefile index fc8fadc..b4ef022 100644 --- a/utils/flent-tools/Makefile +++ b/utils/flent-tools/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=flent-tools -PKG_VERSION:=0.15.0 +PKG_VERSION:=1.0.1 PKG_LICENSE:=GPLv3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/tohojo/flent -PKG_REV:=fd4c41cf4667fb5203e41e7eaa805ae54820218b +PKG_REV:=03c72cc340def354024351b6500774b11170d5ba PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=$(PKG_REV) diff --git a/utils/gnupg/Makefile b/utils/gnupg/Makefile index cd1a691..62b52d6 100644 --- a/utils/gnupg/Makefile +++ b/utils/gnupg/Makefile @@ -8,17 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnupg -PKG_VERSION:=1.4.20 -PKG_RELEASE:=2 +PKG_VERSION:=1.4.21 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg \ ftp://ftp.gnupg.org/gcrypt/gnupg -PKG_MD5SUM:=b7af897a041c03c8ad1c7c466b54d10d +PKG_MD5SUM:=9bdeabf3c0f87ff21cb3f9216efdd01d +PKG_HASH:=6b47a3100c857dcab3c60e6152e56a997f2c7862c1b8b2b25adf3884a1ae2276 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_MAINTAINER:=Daniel Dickinson PKG_INSTALL:=1 @@ -38,6 +39,11 @@ define Package/gnupg MENU:=1 endef +define Package/gpgv + $(call Package/gnupg/Default) + TITLE:=GnuPG signature verification only +endef + define Package/gnupg-utils $(call Package/gnupg/Default) DEPENDS:=gnupg +libcurl @@ -54,6 +60,13 @@ define Package/gnupg/description with PGP2 because it uses IDEA (which is patented worldwide). endef +define Package/gpgv/description + GPGv is a stripped down version of GnuPG that only checks signatures. + . + GnuPG does not use any patented algorithms so it cannot be compatible + with PGP2 because it uses IDEA (which is patented worldwide). +endef + define Package/gnupg-utils/description Key management utilies for GnuPG. This package is needed to import keys from a keyserver. @@ -79,6 +92,11 @@ define Package/gnupg/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg $(1)/usr/bin/ endef +define Package/gpgv/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgv $(1)/usr/bin/ +endef + define Package/gnupg-utils/install $(INSTALL_DIR) $(1)/usr/lib/gnupg for file in gpgkeys_curl gpgkeys_hkp; do \ @@ -88,4 +106,5 @@ define Package/gnupg-utils/install endef $(eval $(call BuildPackage,gnupg)) +$(eval $(call BuildPackage,gpgv)) $(eval $(call BuildPackage,gnupg-utils)) diff --git a/utils/gpsd/Makefile b/utils/gpsd/Makefile index 4adb531..ee72b95 100644 --- a/utils/gpsd/Makefile +++ b/utils/gpsd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gpsd -PKG_VERSION:=3.15 -PKG_RELEASE:=2 +PKG_VERSION:=3.16 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd/ -PKG_MD5SUM:=afd79b87337fadf38ee2a7c4314dac79 +PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) +PKG_MD5SUM:=68691b5de4c94f82ec4062b042b5eb63 PKG_MAINTAINER:=Pushpal Sidhu PKG_LICENSE:=BSD-3-Clause @@ -122,8 +122,6 @@ define Package/gpsd/install $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd - $(INSTALL_DIR) $(1)/etc/hotplug.d/usb - $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/ endef diff --git a/utils/gpsd/files/gpsd.config b/utils/gpsd/files/gpsd.config index 1a5ddaa..c0c88e0 100644 --- a/utils/gpsd/files/gpsd.config +++ b/utils/gpsd/files/gpsd.config @@ -1,5 +1,5 @@ -config gpsd core - option device "/dev/ttyUSB0" - option port "2947" - option listen_globally "false" - option enabled "false" +config gpsd 'core' + option enabled '0' + option device '/dev/ttyUSB0' + option port '2947' + option listen_globally '0' diff --git a/utils/gpsd/files/gpsd.hotplug b/utils/gpsd/files/gpsd.hotplug deleted file mode 100644 index fc15dda..0000000 --- a/utils/gpsd/files/gpsd.hotplug +++ /dev/null @@ -1,16 +0,0 @@ -case "$ACTION" in - add) - # start process - # only pl2303 devices are handled - if [ "$PRODUCT" = "67b/2303/300" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then - sleep 3 && /etc/init.d/gpsd start - fi - ;; - remove) - # stop process - # only pl2303 devices are handled - if [ "$PRODUCT" = "67b/2303/300" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then - /etc/init.d/gpsd stop - fi - ;; -esac diff --git a/utils/gpsd/patches/0001-Remove-a-BSD-ism.patch b/utils/gpsd/patches/0001-Remove-a-BSD-ism.patch deleted file mode 100644 index 55004ab..0000000 --- a/utils/gpsd/patches/0001-Remove-a-BSD-ism.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 95c99f69e026e8c57aecba545e51c97f3b284e75 Mon Sep 17 00:00:00 2001 -From: "Gary E. Miller" -Date: Tue, 23 Jun 2015 14:36:26 -0700 -Subject: [PATCH] Remove a BSD-ism. - -CTRL('L') is a BSD-ism. CTRL() is defined in sys/ttydefaults.h -which does not always exist. Instead of adding scons tests for -needing CTRL() and its include files just replace with a simple -constant. - -Needed for musl and found by Baruch Siach ---- - gpsmon.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/gpsmon.c b/gpsmon.c -index c3001c8..58c8300 100644 ---- a/gpsmon.c -+++ b/gpsmon.c -@@ -583,6 +583,9 @@ static void select_packet_monitor(struct gps_device_t *device) - (void)wnoutrefresh(devicewin); - } - -+/* Control-L character */ -+#define CTRL_L 0x0C -+ - static char *curses_get_command(void) - /* char-by-char nonblocking input, return accumulated command line on \n */ - { -@@ -591,7 +594,8 @@ static char *curses_get_command(void) - int c; - - c = wgetch(cmdwin); -- if (c == CTRL('L')) { -+ if (CTRL_L == c) { -+ /* ^L is to repaint the screen */ - (void)clearok(stdscr, true); - if (active != NULL && (*active)->initialize != NULL) - (void)(*active)->initialize(); --- -2.6.0 - diff --git a/utils/gpsd/patches/0002-ncurses6_detection.patch b/utils/gpsd/patches/0002-ncurses6_detection.patch new file mode 100644 index 0000000..7a1f409 --- /dev/null +++ b/utils/gpsd/patches/0002-ncurses6_detection.patch @@ -0,0 +1,15 @@ +Index: gpsd-3.16/SConstruct +=================================================================== +--- gpsd-3.16.orig/SConstruct ++++ gpsd-3.16/SConstruct +@@ -543,6 +543,10 @@ else: + ncurseslibs = pkg_config('ncurses') + if config.CheckPKG('tinfo'): + ncurseslibs += pkg_config('tinfo') ++ elif WhereIs('ncurses6-config'): ++ ncurseslibs = ['!ncurses6-config --libs --cflags'] ++ elif WhereIs('ncursesw6-config'): ++ ncurseslibs = ['!ncursesw6-config --libs --cflags'] + elif WhereIs('ncurses5-config'): + ncurseslibs = ['!ncurses5-config --libs --cflags'] + elif WhereIs('ncursesw5-config'): diff --git a/utils/grep/Makefile b/utils/grep/Makefile index 5273231..6ee0697 100644 --- a/utils/grep/Makefile +++ b/utils/grep/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=grep -PKG_VERSION:=2.25 +PKG_VERSION:=2.26 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/grep -PKG_MD5SUM:=04e96b0e6f0fe6a180ae62c88fcd0af6 +PKG_MD5SUM:=afdd61c7221434722671baf002ac9267 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING diff --git a/utils/hamlib/Makefile b/utils/hamlib/Makefile new file mode 100644 index 0000000..3787bce --- /dev/null +++ b/utils/hamlib/Makefile @@ -0,0 +1,100 @@ +# +# Copyright (C) 2014-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:=hamlib +PKG_VERSION:=3.0.1 +PKG_RELEASE:=1 +PKG_MD5SUM:=451acb9f727ed706ae2f59ee3f0e03c7 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/hamlib +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +PKG_LICENSE:=GPLv2 +PKG_LICENSE_FILES:=COPYING + +PKG_MAINTAINER:=Vasilis Tsiligiannis + +include $(INCLUDE_DIR)/package.mk + +define Package/hamlib/Default + TITLE:=Ham Radio Control + URL:=http://hamlib.sourceforge.net +endef + +define Package/hamlib/Default/description + Ham Radio Control Libraries is a development effort to provide a consistent + interface for programmers wanting to incorporate radio control in their + programs. +endef + +define Package/hamlib + $(call Package/hamlib/Default) + TITLE+= utilities + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libhamlib +endef + +define Package/hamlib/description + $(call Package/hamlib/Default/description) + + This package contains the utilities and daemons. +endef + +define Package/libhamlib/Default + $(call Package/hamlib/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE+= shared library +endef + +define Package/libhamlib + $(call Package/libhamlib/Default) + DEPENDS:=+libusb-1.0 + MENU:=1 +endef + +define Package/libhamlib/description + $(call Package/hamlib/Default/description) + + This package contains the hamlib shared library. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/hamlib + $(CP) $(PKG_INSTALL_DIR)/usr/include/hamlib/*.h $(1)/usr/include/hamlib + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhamlib.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/hamlib.pc $(1)/usr/lib/pkgconfig/ +endef + +CONFIGURE_ARGS+= \ + --disable-html-matrix \ + --disable-winradio \ + --without-readline \ + --without-cxx-binding \ + --with-pic \ + +CONFIGURE_VARS+= \ + LIBUSB_LIBS="-lusb-1.0" \ + +define Package/hamlib/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/{rig,rot}* $(1)/usr/bin/ +endef + +define Package/libhamlib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhamlib.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,hamlib)) +$(eval $(call BuildPackage,libhamlib)) diff --git a/utils/haveged/Makefile b/utils/haveged/Makefile index 78a8552..c5adad7 100644 --- a/utils/haveged/Makefile +++ b/utils/haveged/Makefile @@ -12,9 +12,9 @@ PKG_VERSION:=1.9.1 PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.issihosts.com/$(PKG_NAME) \ - http://pkgs.fedoraproject.org/repo/pkgs/haveged/haveged-1.9.1.tar.gz/015ff58cd10607db0e0de60aeca2f5f8/ -PKG_MD5SUM:=015ff58cd10607db0e0de60aeca2f5f8 +PKG_SOURCE_URL:=@SF/haveged \ + http://www.issihosts.com/$(PKG_NAME) +PKG_MD5SUM:=9c2363ed9542a6784ff08e247182137e71f2ddb79e8e6c1ac4ad50d21ced3715 PKG_LICENSE:=GPLv3 PKG_MAINTAINER:=Hannu Nyman diff --git a/utils/hfsprogs/Makefile b/utils/hfsprogs/Makefile deleted file mode 100644 index 9c44a35..0000000 --- a/utils/hfsprogs/Makefile +++ /dev/null @@ -1,81 +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:=hfsprogs -PKG_VERSION:=332.25 -PKG_RELEASE:=1 - -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Florian Fainelli - -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_SOURCE_URL:=http://archive.ubuntu.com/ubuntu/pool/universe/h/$(PKG_NAME) -PKG_BUILD_DIR:=$(BUILD_DIR)/diskdev_cmds-$(PKG_VERSION) -PKG_MD5SUM:=261c3de5ec0dcf5244e3f60d79c1d6f1 -PKG_LICENSE:=APSL 2.0 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/hfsprogs/Default - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Filesystem - DEPENDS:=+libopenssl -endef - -define Package/hfsfsck - $(call Package/hfsprogs/Default) - TITLE:=fsck (fsck.hfs) utility from hfsprogs -endef - -define Package/mkhfs - $(call Package/hfsprogs/Default) - TITLE:=mkfs (mkfs.hfs) utility from hfsprogs -endef - -define Package/hfsfsck/description - Utilities to create and check HFS/HFS+ filesystems. - (fsck.hfs and fsck.hfsplus for checking integrity of HFS/HFS+ volumes) -endef - -define Package/mkhfs/description - Utilities to create and check HFS/HFS+ filesystems. - (mkfs.hfs and mkfs.hfsplus for creating HFS/HFS+ volumes) -endef - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - -f Makefile.lnx \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS+="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1" \ - all -endef - -define Package/hfsfsck/install - $(INSTALL_DIR) $(1)/lib/functions/fsck - $(INSTALL_DATA) ./files/hfsfsck.sh $(1)/lib/functions/fsck/ - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/fsck_hfs.tproj/fsck_hfs $(1)/usr/sbin/fsck.hfsplus - (cd $(1)/usr/sbin; ln -sf fsck.hfsplus fsck.hfs;) -endef - -define Package/mkhfs/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/newfs_hfs.tproj/newfs_hfs $(1)/usr/sbin/mkfs.hfsplus - (cd $(1)/usr/sbin; ln -sf mkfs.hfsplus mkfs.hfs;) -endef - -$(eval $(call BuildPackage,hfsfsck)) -$(eval $(call BuildPackage,mkhfs)) diff --git a/utils/hfsprogs/files/hfsfsck.sh b/utils/hfsprogs/files/hfsfsck.sh deleted file mode 100644 index 8bcd2c1..0000000 --- a/utils/hfsprogs/files/hfsfsck.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Copyright 2015 OpenWrt.org -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -fsck_hfsfsck() { - hfsfsck "$device" 2>&1 | logger -t "fstab: hfsfsck ($device)" - local status="$?" - case "$status" in - 0) ;; #success - 4) reboot;; - 8) echo "hfsfsck ($device): Warning! Uncorrected errors."| logger -t fstab - return 1 - ;; - *) echo "hfsfsck ($device): Error $status. Check not complete."| logger -t fstab;; - esac - return 0 -} - -fsck_hfs() { - fsck_hfsfsck "$@" -} - -fsck_hfsplus() { - fsck_hfsfsck "$@" -} - -append libmount_known_fsck "hfs" -append libmount_known_fsck "hfsplus" diff --git a/utils/hfsprogs/patches/0001-Create-short-Makefiles-for-Debian.patch b/utils/hfsprogs/patches/0001-Create-short-Makefiles-for-Debian.patch deleted file mode 100644 index a8c4193..0000000 --- a/utils/hfsprogs/patches/0001-Create-short-Makefiles-for-Debian.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Create short Makefiles for Debian - -Create short Makefiles for compiling just the necessary parts for a -Debian-based (and possibly other distributions) HFS+ filesystem -utilities. ---- - Makefile.lnx | 8 ++++++++ - fsck_hfs.tproj/Makefile.lnx | 16 ++++++++++++++++ - fsck_hfs.tproj/dfalib/Makefile.lnx | 15 +++++++++++++++ - newfs_hfs.tproj/Makefile.lnx | 12 ++++++++++++ - 4 files changed, 51 insertions(+) - create mode 100644 Makefile.lnx - create mode 100644 fsck_hfs.tproj/Makefile.lnx - create mode 100644 fsck_hfs.tproj/dfalib/Makefile.lnx - create mode 100644 newfs_hfs.tproj/Makefile.lnx - -diff --git a/Makefile.lnx b/Makefile.lnx -new file mode 100644 -index 0000000..687d1e7 ---- /dev/null -+++ b/Makefile.lnx -@@ -0,0 +1,8 @@ -+CC := gcc -+CFLAGS += -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1 -+SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj -+ -+all clean: -+ for d in $(SUBDIRS); do $(MAKE) -C $$d -f Makefile.lnx $@; done -+ -+export CC CFLAGS -diff --git a/fsck_hfs.tproj/Makefile.lnx b/fsck_hfs.tproj/Makefile.lnx -new file mode 100644 -index 0000000..977d7e8 ---- /dev/null -+++ b/fsck_hfs.tproj/Makefile.lnx -@@ -0,0 +1,16 @@ -+CFILES = fsck_hfs.c strings.c utilities.c cache.c fsck_debug.c -+OFILES = $(CFILES:.c=.o) -+ -+all: fsck_hfs -+ -+fsck_hfs: $(OFILES) dfalib/libdfa.a -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) dfalib/libdfa.a -+ -+dfalib/libdfa.a: FORCE -+ $(MAKE) -C dfalib -f Makefile.lnx CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libdfa.a -+ -+clean: -+ $(RM) fsck_hfs $(OFILES) -+ $(MAKE) -C dfalib -f Makefile.lnx clean -+ -+.PHONY : FORCE clean -diff --git a/fsck_hfs.tproj/dfalib/Makefile.lnx b/fsck_hfs.tproj/dfalib/Makefile.lnx -new file mode 100644 -index 0000000..8c07196 ---- /dev/null -+++ b/fsck_hfs.tproj/dfalib/Makefile.lnx -@@ -0,0 +1,15 @@ -+CFILES = hfs_endian.c BlockCache.c\ -+ BTree.c BTreeAllocate.c BTreeMiscOps.c \ -+ BTreeNodeOps.c BTreeScanner.c BTreeTreeOps.c\ -+ CatalogCheck.c HardLinkCheck.c\ -+ SBTree.c SControl.c SVerify1.c SVerify2.c\ -+ SRepair.c SRebuildCatalogBTree.c\ -+ SUtils.c SKeyCompare.c SDevice.c SExtents.c SAllocate.c\ -+ SCatalog.c SStubs.c VolumeBitmapCheck.c -+OFILES = $(CFILES:.c=.o) -+ -+libdfa.a: $(OFILES) -+ ar rc $@ $? -+ -+clean: -+ $(RM) $(OFILES) libdfa.a -diff --git a/newfs_hfs.tproj/Makefile.lnx b/newfs_hfs.tproj/Makefile.lnx -new file mode 100644 -index 0000000..58e6700 ---- /dev/null -+++ b/newfs_hfs.tproj/Makefile.lnx -@@ -0,0 +1,12 @@ -+CFILES = hfs_endian.c makehfs.c newfs_hfs.c -+OFILES = $(CFILES:.c=.o) -+ -+all: newfs_hfs -+ -+newfs_hfs: $(OFILES) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) -lcrypto -+ -+clean: -+ $(RM) newfs_hfs $(OFILES) -+ -+.PHONY : FORCE clean diff --git a/utils/hfsprogs/patches/0002-Add-exclude-Darwin-specific-code.patch b/utils/hfsprogs/patches/0002-Add-exclude-Darwin-specific-code.patch deleted file mode 100644 index 0046c36..0000000 --- a/utils/hfsprogs/patches/0002-Add-exclude-Darwin-specific-code.patch +++ /dev/null @@ -1,1407 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Add/exclude Darwin-specific code - -Modify some of the files so that they can be compiled without the -Apple owned frameworks in a Debian system (and possibly others). ---- - fsck_hfs.tproj/cache.c | 4 ++ - fsck_hfs.tproj/dfalib/BTree.c | 2 + - fsck_hfs.tproj/dfalib/BlockCache.c | 3 + - fsck_hfs.tproj/dfalib/SBTree.c | 2 + - fsck_hfs.tproj/dfalib/SDevice.c | 92 ++++++++++++++++++++--------- - fsck_hfs.tproj/dfalib/SKeyCompare.c | 2 + - fsck_hfs.tproj/dfalib/SRepair.c | 2 + - fsck_hfs.tproj/dfalib/SRuntime.h | 7 ++- - fsck_hfs.tproj/dfalib/SUtils.c | 5 +- - fsck_hfs.tproj/dfalib/SVerify2.c | 7 +++ - fsck_hfs.tproj/dfalib/Scavenger.h | 11 +++- - fsck_hfs.tproj/dfalib/hfs_endian.c | 4 ++ - fsck_hfs.tproj/dfalib/hfs_endian.h | 7 ++- - fsck_hfs.tproj/fsck_hfs.c | 61 +++++++++++++++---- - fsck_hfs.tproj/utilities.c | 8 ++- - include/missing.h | 115 ++++++++++++++++++++++++++++++++++++ - newfs_hfs.tproj/hfs_endian.c | 5 ++ - newfs_hfs.tproj/hfs_endian.h | 5 ++ - newfs_hfs.tproj/makehfs.c | 72 ++++++++++++++++------ - newfs_hfs.tproj/newfs_hfs.c | 74 ++++++++++++++++++++--- - newfs_hfs.tproj/newfs_hfs.h | 26 ++++---- - 21 files changed, 429 insertions(+), 85 deletions(-) - create mode 100644 include/missing.h - -diff --git a/fsck_hfs.tproj/cache.c b/fsck_hfs.tproj/cache.c -index be46195..527088a 100644 ---- a/fsck_hfs.tproj/cache.c -+++ b/fsck_hfs.tproj/cache.c -@@ -26,7 +26,11 @@ - #include - #include - #include -+#if LINUX -+#include "missing.h" -+#else - #include -+#endif /* __LINUX__ */ - #include - #include - #include -diff --git a/fsck_hfs.tproj/dfalib/BTree.c b/fsck_hfs.tproj/dfalib/BTree.c -index edd8301..7ad9fe0 100644 ---- a/fsck_hfs.tproj/dfalib/BTree.c -+++ b/fsck_hfs.tproj/dfalib/BTree.c -@@ -1705,7 +1705,9 @@ OSStatus BTGetInformation (SFCB *filePtr, - UInt16 version, - BTreeInfoRec *info ) - { -+#if !LINUX - #pragma unused (version) -+#endif - - BTreeControlBlockPtr btreePtr; - -diff --git a/fsck_hfs.tproj/dfalib/BlockCache.c b/fsck_hfs.tproj/dfalib/BlockCache.c -index 1bb952f..e3a28a2 100644 ---- a/fsck_hfs.tproj/dfalib/BlockCache.c -+++ b/fsck_hfs.tproj/dfalib/BlockCache.c -@@ -20,6 +20,9 @@ - * @APPLE_LICENSE_HEADER_END@ - */ - -+#if LINUX -+#include "missing.h" -+#endif - #include "SRuntime.h" - #include "Scavenger.h" - #include "../cache.h" -diff --git a/fsck_hfs.tproj/dfalib/SBTree.c b/fsck_hfs.tproj/dfalib/SBTree.c -index 2fbcd1d..cd81b13 100644 ---- a/fsck_hfs.tproj/dfalib/SBTree.c -+++ b/fsck_hfs.tproj/dfalib/SBTree.c -@@ -322,7 +322,9 @@ ErrorExit: - OSStatus - SetEndOfForkProc ( SFCB *filePtr, FSSize minEOF, FSSize maxEOF ) - { -+#if !LINUX - #pragma unused (maxEOF) -+#endif - - OSStatus result; - UInt32 actualSectorsAdded; -diff --git a/fsck_hfs.tproj/dfalib/SDevice.c b/fsck_hfs.tproj/dfalib/SDevice.c -index bf6f61c..9a46023 100644 ---- a/fsck_hfs.tproj/dfalib/SDevice.c -+++ b/fsck_hfs.tproj/dfalib/SDevice.c -@@ -2,7 +2,7 @@ - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ -- * -+ * - * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public -@@ -10,7 +10,7 @@ - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. -- * -+ * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -@@ -18,7 +18,7 @@ - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License." -- * -+ * - * @APPLE_LICENSE_HEADER_END@ - */ - #include "SRuntime.h" -@@ -28,33 +28,71 @@ - #include - #include - #include -- -+#if LINUX -+#include -+#include -+#else - #include -- -+#endif /* LINUX */ - #else -- - #include - #include - #include - - #endif - -- - OSErr GetDeviceSize(int driveRefNum, UInt64 *numBlocks, UInt32 *blockSize) - { - #if BSD - UInt64 devBlockCount = 0; - int devBlockSize = 0; -+#if LINUX -+ struct stat stbuf; -+ -+ devBlockSize = 512; - -+#ifndef BLKGETSIZE -+#define BLKGETSIZE _IO(0x12,96) -+#endif -+#ifndef BLKGETSIZE64 -+#define BLKGETSIZE64 _IOR(0x12,114,size_t) -+#endif -+ if (fstat(driveRefNum, &stbuf) < 0){ -+ printf("Error: %s\n", strerror(errno)); -+ return(-1); -+ } -+ -+ if (S_ISREG(stbuf.st_mode)) { -+ devBlockCount = stbuf.st_size / 512; -+ } -+ else if (S_ISBLK(stbuf.st_mode)) { -+ unsigned long size; -+ u_int64_t size64; -+ if (!ioctl(driveRefNum, BLKGETSIZE64, &size64)) -+ devBlockCount = size64 / 512; -+ else if (!ioctl(driveRefNum, BLKGETSIZE, &size)) -+ devBlockCount = size; -+ else{ -+ printf("Error: %s\n", strerror(errno)); -+ return(-1); -+ } -+ -+ } -+ else{ -+ printf("Device is not a block device"); -+ return(-1); -+ } -+#elif BSD - if (ioctl(driveRefNum, DKIOCGETBLOCKCOUNT, &devBlockCount) < 0) { - printf("ioctl(DKIOCGETBLOCKCOUNT) for fd %d: %s\n", driveRefNum, strerror(errno)); - return (-1); - } -- -+ - if (ioctl(driveRefNum, DKIOCGETBLOCKSIZE, &devBlockSize) < 0) { - printf("ioctl(DKIOCGETBLOCKSIZE) for fd %d: %s\n", driveRefNum, strerror(errno)); - return (-1); - } -+#endif /* BSD */ - - if (devBlockSize != 512) { - *numBlocks = (devBlockCount * (UInt64)devBlockSize) / 512; -@@ -70,24 +108,24 @@ OSErr GetDeviceSize(int driveRefNum, UInt64 *numBlocks, UInt32 *blockSize) - { - /* return format list status code */ - kFmtLstCode = 6, -- -+ - /* reference number of .SONY driver */ - kSonyRefNum = 0xfffb, -- -+ - /* values returned by DriveStatus in DrvSts.twoSideFmt */ - kSingleSided = 0, - kDoubleSided = -1, - kSingleSidedSize = 800, /* 400K */ - kDoubleSidedSize = 1600, /* 800K */ -- -+ - /* values in DrvQEl.qType */ - kWordDrvSiz = 0, - kLongDrvSiz = 1, -- -+ - /* more than enough formatListRecords */ - kMaxFormatListRecs = 16 - }; -- -+ - ParamBlockRec pb; - FormatListRec formatListRecords[kMaxFormatListRecs]; - DrvSts status; -@@ -95,22 +133,22 @@ OSErr GetDeviceSize(int driveRefNum, UInt64 *numBlocks, UInt32 *blockSize) - OSErr result; - unsigned long blocks = 0; - -- -+ - /* Attempt to get the drive's format list. */ - /* (see the Technical Note "What Your Sony Drives For You") */ -- -+ - pb.cntrlParam.ioVRefNum = driveQElementPtr->dQDrive; - pb.cntrlParam.ioCRefNum = driveQElementPtr->dQRefNum; - pb.cntrlParam.csCode = kFmtLstCode; - pb.cntrlParam.csParam[0] = kMaxFormatListRecs; - *(long *)&pb.cntrlParam.csParam[1] = (long)&formatListRecords[0]; -- -+ - result = PBStatusSync(&pb); -- -+ - if ( result == noErr ) - { - /* The drive supports ReturnFormatList status call. */ -- -+ - /* Get the current disk's size. */ - for( formatListRecIndex = 0; - formatListRecIndex < pb.cntrlParam.csParam[0]; -@@ -131,7 +169,7 @@ OSErr GetDeviceSize(int driveRefNum, UInt64 *numBlocks, UInt32 *blockSize) - else if ( driveQElementPtr->dQRefNum == (short)kSonyRefNum ) - { - /* The drive is a non-SuperDrive floppy which only supports 400K and 800K disks */ -- -+ - result = DriveStatus(driveQElementPtr->dQDrive, &status); - if ( result == noErr ) - { -@@ -140,11 +178,11 @@ OSErr GetDeviceSize(int driveRefNum, UInt64 *numBlocks, UInt32 *blockSize) - case kSingleSided: - blocks = kSingleSidedSize; - break; -- -+ - case kDoubleSided: - blocks = kDoubleSidedSize; - break; -- -+ - default: // This should never happen - result = paramErr; - break; -@@ -155,20 +193,20 @@ OSErr GetDeviceSize(int driveRefNum, UInt64 *numBlocks, UInt32 *blockSize) - { - /* The drive is not a floppy and it doesn't support ReturnFormatList */ - /* so use the dQDrvSz field(s) */ -- -+ - result = noErr; /* reset result */ -- -+ - switch ( driveQElementPtr->qType ) - { - case kWordDrvSiz: - blocks = driveQElementPtr->dQDrvSz; - break; -- -+ - case kLongDrvSiz: - blocks = ((unsigned long)driveQElementPtr->dQDrvSz2 << 16) + - driveQElementPtr->dQDrvSz; - break; -- -+ - default: // This should never happen - result = paramErr; - break; -@@ -177,7 +215,7 @@ OSErr GetDeviceSize(int driveRefNum, UInt64 *numBlocks, UInt32 *blockSize) - - *numBlocks = blocks; - *blockSize = 512; -- -+ - return( result ); - #endif - } -@@ -188,7 +226,7 @@ OSErr DeviceRead(int device, int drive, void* buffer, SInt64 offset, UInt32 reqB - #if BSD - off_t seek_off; - ssize_t nbytes; -- -+ - *actBytes = 0; - - seek_off = lseek(device, offset, SEEK_SET); -diff --git a/fsck_hfs.tproj/dfalib/SKeyCompare.c b/fsck_hfs.tproj/dfalib/SKeyCompare.c -index 46e145f..18d99c5 100644 ---- a/fsck_hfs.tproj/dfalib/SKeyCompare.c -+++ b/fsck_hfs.tproj/dfalib/SKeyCompare.c -@@ -454,7 +454,9 @@ SInt32 CompareExtentKeysPlus( const HFSPlusExtentKey *searchKey, const HFSPlusEx - * The name portion of the key is compared using a 16-bit binary comparison. - * This is called from the b-tree code. - */ -+#if !LINUX - __private_extern__ -+#endif - SInt32 - CompareAttributeKeys(const AttributeKey *searchKey, const AttributeKey *trialKey) - { -diff --git a/fsck_hfs.tproj/dfalib/SRepair.c b/fsck_hfs.tproj/dfalib/SRepair.c -index 01c1a10..8eb759c 100644 ---- a/fsck_hfs.tproj/dfalib/SRepair.c -+++ b/fsck_hfs.tproj/dfalib/SRepair.c -@@ -1617,7 +1617,9 @@ Output: - - static OSErr FixWrapperExtents( SGlobPtr GPtr, RepairOrderPtr p ) - { -+#if !LINUX - #pragma unused (p) -+#endif - - OSErr err; - HFSMasterDirectoryBlock *mdb; -diff --git a/fsck_hfs.tproj/dfalib/SRuntime.h b/fsck_hfs.tproj/dfalib/SRuntime.h -index 646917b..770e3ef 100644 ---- a/fsck_hfs.tproj/dfalib/SRuntime.h -+++ b/fsck_hfs.tproj/dfalib/SRuntime.h -@@ -27,8 +27,11 @@ - #define __SRUNTIME__ - - #if BSD -- -+#if LINUX -+#include "missing.h" -+#else - #include -+#endif - #include - #include - #include -@@ -91,10 +94,12 @@ typedef const unsigned char * ConstStr255Param; - - typedef u_int32_t HFSCatalogNodeID; - -+#if !LINUX - enum { - false = 0, - true = 1 - }; -+#endif - - /* OS error codes */ - enum { -diff --git a/fsck_hfs.tproj/dfalib/SUtils.c b/fsck_hfs.tproj/dfalib/SUtils.c -index 72035f0..6e9253e 100644 ---- a/fsck_hfs.tproj/dfalib/SUtils.c -+++ b/fsck_hfs.tproj/dfalib/SUtils.c -@@ -380,7 +380,8 @@ void InvalidateCalculatedVolumeBitMap( SGlobPtr GPtr ) - // GPtr->realVCB Real in-memory vcb - //------------------------------------------------------------------------------ - --#if !BSD -+#if BSD -+#if !LINUX - OSErr GetVolumeFeatures( SGlobPtr GPtr ) - { - OSErr err; -@@ -418,7 +419,7 @@ OSErr GetVolumeFeatures( SGlobPtr GPtr ) - return( noErr ); - } - #endif -- -+#endif - - - /*------------------------------------------------------------------------------- -diff --git a/fsck_hfs.tproj/dfalib/SVerify2.c b/fsck_hfs.tproj/dfalib/SVerify2.c -index 6a47935..c68f3d8 100644 ---- a/fsck_hfs.tproj/dfalib/SVerify2.c -+++ b/fsck_hfs.tproj/dfalib/SVerify2.c -@@ -32,7 +32,9 @@ - */ - - #include -+#if !LINUX - #include -+#endif - - #include "BTree.h" - #include "BTreePrivate.h" -@@ -1354,8 +1356,13 @@ OSErr CompareVolumeHeader( SGlobPtr GPtr, HFSPlusVolumeHeader *volumeHeader ) - * clump size for read-only media is irrelevant we skip the clump size - * check to avoid non useful warnings. - */ -+#if LINUX -+ // FIXME -+ isWriteable = 1; -+#else - isWriteable = 0; - ioctl( GPtr->DrvNum, DKIOCISWRITABLE, &isWriteable ); -+#endif - if ( isWriteable != 0 && - volumeHeader->catalogFile.clumpSize != vcb->vcbCatalogFile->fcbClumpSize ) { - PrintError(GPtr, E_InvalidClumpSize, 0); -diff --git a/fsck_hfs.tproj/dfalib/Scavenger.h b/fsck_hfs.tproj/dfalib/Scavenger.h -index cf53970..edb3a80 100644 ---- a/fsck_hfs.tproj/dfalib/Scavenger.h -+++ b/fsck_hfs.tproj/dfalib/Scavenger.h -@@ -37,11 +37,16 @@ - #include "../fsck_debug.h" - - #include -+#if LINUX -+#define XATTR_MAXNAMELEN 127 -+#include -+#else - #include - #include - #include --#include - #include -+#endif -+#include - - #ifdef __cplusplus - extern "C" { -@@ -1465,4 +1470,8 @@ extern int AllocateContigBitmapBits (SVCB *vcb, UInt32 numBlocks, UInt32 *actua - }; - #endif - -+/* #if LINUX -+#undef XATTR_MAXNAMELEN -+#endif */ -+ - #endif /* __SCAVENGER__ */ -diff --git a/fsck_hfs.tproj/dfalib/hfs_endian.c b/fsck_hfs.tproj/dfalib/hfs_endian.c -index 7fa5385..69500c1 100755 ---- a/fsck_hfs.tproj/dfalib/hfs_endian.c -+++ b/fsck_hfs.tproj/dfalib/hfs_endian.c -@@ -31,7 +31,11 @@ - #include - #include - -+#if LINUX -+#include "missing.h" -+#else - #include -+#endif - #include - - #include "Scavenger.h" -diff --git a/fsck_hfs.tproj/dfalib/hfs_endian.h b/fsck_hfs.tproj/dfalib/hfs_endian.h -index 52d0c3a..0763d9d 100755 ---- a/fsck_hfs.tproj/dfalib/hfs_endian.h -+++ b/fsck_hfs.tproj/dfalib/hfs_endian.h -@@ -27,9 +27,14 @@ - * - * This file prototypes endian swapping routines for the HFS/HFS Plus - * volume format. -- */ -+*/ - #include -+#if LINUX -+#include -+#include -+#else - #include -+#endif - #include "SRuntime.h" - - /*********************/ -diff --git a/fsck_hfs.tproj/fsck_hfs.c b/fsck_hfs.tproj/fsck_hfs.c -index 90532fd..f1a18bd 100644 ---- a/fsck_hfs.tproj/fsck_hfs.c -+++ b/fsck_hfs.tproj/fsck_hfs.c -@@ -24,10 +24,14 @@ - #include - #include - #include -+#if !LINUX - #include -+#endif - #include - #include -+#if !LINUX - #include -+#endif - - #include - -@@ -195,8 +199,12 @@ main(argc, argv) - if (guiControl) - debug = 0; /* debugging is for command line only */ - -+#if LINUX -+// FIXME -+#else - if (signal(SIGINT, SIG_IGN) != SIG_IGN) - (void)signal(SIGINT, catch); -+#endif - - if (argc < 1) { - (void) fprintf(stderr, "%s: missing special-device\n", progname); -@@ -218,7 +226,9 @@ checkfilesys(char * filesys) - int chkLev, repLev, logLev; - int blockDevice_fd, canWrite; - char *unraw, *mntonname; -+#if !LINUX - struct statfs *fsinfo; -+#endif - int fs_fd=-1; // fd to the root-dir of the fs we're checking (only w/lfag == 1) - - flags = 0; -@@ -227,7 +237,9 @@ checkfilesys(char * filesys) - canWrite = 0; - unraw = NULL; - mntonname = NULL; -- -+#if LINUX -+ // FIXME -+#else - if (lflag) { - result = getmntinfo(&fsinfo, MNT_NOWAIT); - -@@ -257,10 +269,10 @@ checkfilesys(char * filesys) - } - } - } -- -+#endif - if (debug && preen) - pwarn("starting\n"); -- -+ - if (setup( filesys, &blockDevice_fd, &canWrite ) == 0) { - if (preen) - pfatal("CAN'T CHECK FILE SYSTEM."); -@@ -278,7 +290,7 @@ checkfilesys(char * filesys) - repLev = kMajorRepairs; - logLev = kVerboseLog; - -- if (yflag) -+ if (yflag) - repLev = kMajorRepairs; - - if (quick) { -@@ -298,16 +310,16 @@ checkfilesys(char * filesys) - - if (nflag) - repLev = kNeverRepair; -- -+ - if ( rebuildCatalogBtree ) { - chkLev = kPartialCheck; - repLev = kForceRepairs; // this will force rebuild of catalog B-Tree file - } -- -+ - /* - * go check HFS volume... - */ -- result = CheckHFS( fsreadfd, fswritefd, chkLev, repLev, logLev, -+ result = CheckHFS( fsreadfd, fswritefd, chkLev, repLev, logLev, - guiControl, lostAndFoundMode, canWrite, &fsmodified ); - if (!hotroot) { - ckfini(1); -@@ -330,6 +342,9 @@ checkfilesys(char * filesys) - } - } - } else { -+#if LINUX -+ // FIXME -+#else - struct statfs stfs_buf; - /* - * Check to see if root is mounted read-write. -@@ -339,19 +354,25 @@ checkfilesys(char * filesys) - else - flags = 0; - ckfini(flags & MNT_RDONLY); -+#endif - } - - /* XXX free any allocated memory here */ - - if (hotroot && fsmodified) { -+#if !LINUX - struct hfs_mount_args args; -+#endif - /* - * We modified the root. Do a mount update on - * it, unless it is read-write, so we can continue. - */ - if (!preen) - printf("\n***** FILE SYSTEM WAS MODIFIED *****\n"); -- if (flags & MNT_RDONLY) { -+#if LINUX -+ // FIXME -+#else -+ if (flags & MNT_RDONLY) { - bzero(&args, sizeof(args)); - flags |= MNT_UPDATE | MNT_RELOAD; - if (mount("hfs", "/", flags, &args) == 0) { -@@ -359,6 +380,7 @@ checkfilesys(char * filesys) - goto ExitThisRoutine; - } - } -+#endif - if (!preen) - printf("\n***** REBOOT NOW *****\n"); - sync(); -@@ -367,7 +389,7 @@ checkfilesys(char * filesys) - } - - result = (result == 0) ? 0 : EEXIT; -- -+ - ExitThisRoutine: - if (lflag) { - fcntl(fs_fd, F_THAW_FS, NULL); -@@ -401,16 +423,18 @@ setup( char *dev, int *blockDevice_fdPtr, int *canWritePtr ) - fswritefd = -1; - *blockDevice_fdPtr = -1; - *canWritePtr = 0; -- -+ - if (stat(dev, &statb) < 0) { - printf("Can't stat %s: %s\n", dev, strerror(errno)); - return (0); - } -+#if !LINUX - if ((statb.st_mode & S_IFMT) != S_IFCHR) { - pfatal("%s is not a character device", dev); - if (reply("CONTINUE") == 0) - return (0); - } -+#endif - if ((fsreadfd = open(dev, O_RDONLY)) < 0) { - printf("Can't open %s: %s\n", dev, strerror(errno)); - return (0); -@@ -419,7 +443,7 @@ setup( char *dev, int *blockDevice_fdPtr, int *canWritePtr ) - /* attempt to get write access to the block device and if not check if volume is */ - /* mounted read-only. */ - getWriteAccess( dev, blockDevice_fdPtr, canWritePtr ); -- -+ - if (preen == 0 && !guiControl) - printf("** %s", dev); - if (nflag || (fswritefd = open(dev, O_WRONLY)) < 0) { -@@ -433,10 +457,14 @@ setup( char *dev, int *blockDevice_fdPtr, int *canWritePtr ) - printf("\n"); - - /* Get device block size to initialize cache */ -+#if LINUX -+ devBlockSize = 512; -+#else - if (ioctl(fsreadfd, DKIOCGETBLOCKSIZE, &devBlockSize) < 0) { - pfatal ("Can't get device block size\n"); - return (0); - } -+#endif - - /* calculate the cache block size and total blocks */ - if (CalculateCacheSize(userCacheSize, &cacheBlockSize, &cacheTotalBlocks, debug) != 0) { -@@ -463,11 +491,15 @@ setup( char *dev, int *blockDevice_fdPtr, int *canWritePtr ) - - static void getWriteAccess( char *dev, int *blockDevice_fdPtr, int *canWritePtr ) - { -+#if !LINUX - int i; - int myMountsCount; -+#endif - void * myPtr; - char * myCharPtr; -+#if !LINUX - struct statfs * myBufPtr; -+#endif - void * myNamePtr; - - myPtr = NULL; -@@ -490,6 +522,9 @@ static void getWriteAccess( char *dev, int *blockDevice_fdPtr, int *canWritePtr - } - - // get count of mounts then get the info for each -+#if LINUX -+ // FIXME -+#else - myMountsCount = getfsstat( NULL, 0, MNT_NOWAIT ); - if ( myMountsCount < 0 ) - goto ExitThisRoutine; -@@ -513,8 +548,8 @@ static void getWriteAccess( char *dev, int *blockDevice_fdPtr, int *canWritePtr - } - myBufPtr++; - } -- *canWritePtr = 1; // single user will get us here, f_mntfromname is not /dev/diskXXXX -- -+#endif -+ *canWritePtr = 1; // single user will get us here, f_mntfromname is not /dev/diskXXXX - ExitThisRoutine: - if ( myPtr != NULL ) - free( myPtr ); -diff --git a/fsck_hfs.tproj/utilities.c b/fsck_hfs.tproj/utilities.c -index ee41bef..8e1cd77 100644 ---- a/fsck_hfs.tproj/utilities.c -+++ b/fsck_hfs.tproj/utilities.c -@@ -183,12 +183,14 @@ retry: - printf("Can't stat %s\n", raw); - return (origname); - } -+#if !LINUX - if ((stchar.st_mode & S_IFMT) == S_IFCHR) { - return (raw); - } else { - printf("%s is not a character device\n", raw); - return (origname); - } -+#endif - } else if ((stblock.st_mode & S_IFMT) == S_IFCHR && !retried) { - newname = unrawname(newname); - retried++; -@@ -214,7 +216,11 @@ rawname(char *name) - *dp = 0; - (void)strcpy(rawbuf, name); - *dp = '/'; -- (void)strcat(rawbuf, "/r"); -+#if LINUX -+ (void)strcat(rawbuf, "/"); -+#else -+ (void)strcat(rawbuf,"/r"); -+#endif - (void)strcat(rawbuf, &dp[1]); - - return (rawbuf); -diff --git a/include/missing.h b/include/missing.h -new file mode 100644 -index 0000000..0a859c4 ---- /dev/null -+++ b/include/missing.h -@@ -0,0 +1,114 @@ -+#ifndef _MISSING_H_ -+#define _MISSING_H_ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#define MAXBSIZE (256 * 4096) -+ -+#ifndef true -+#define true 1 -+#endif -+#ifndef false -+#define false 0 -+#endif -+ -+/* Mac types */ -+ -+/* 8 Bit */ -+#ifndef UInt8 -+#define UInt8 uint8_t -+#endif -+#ifndef u_int8_t -+#define u_int8_t UInt8 -+#endif -+#ifndef SInt8 -+#define SInt8 int8_t -+#endif -+ -+/* 16 Bit */ -+#ifndef UInt16 -+#define UInt16 uint16_t -+#endif -+#ifndef u_int16_t -+#define u_int16_t UInt16 -+#endif -+#ifndef SInt16 -+#define SInt16 int16_t -+#endif -+ -+/* 32 Bit */ -+#ifndef UInt32 -+#define UInt32 uint32_t -+#endif -+#ifndef u_int32_t -+#define u_int32_t UInt32 -+#endif -+#ifndef SInt32 -+#define SInt32 int32_t -+#endif -+ -+/* 64 Bit */ -+#ifndef UInt64 -+#define UInt64 uint64_t -+#endif -+#ifndef u_int64_t -+#define u_int64_t UInt64 -+#endif -+#ifndef SInt64 -+#define SInt64 int64_t -+#endif -+ -+#define UniChar u_int16_t -+#define Boolean u_int8_t -+ -+#define UF_NODUMP 0x00000001 -+ -+/* syslimits.h */ -+#define NAME_MAX 255 -+ -+/* Byteswap stuff */ -+#define NXSwapHostLongToBig(x) cpu_to_be64(x) -+#define NXSwapBigShortToHost(x) be16_to_cpu(x) -+#define OSSwapBigToHostInt16(x) be16_to_cpu(x) -+#define NXSwapBigLongToHost(x) be32_to_cpu(x) -+#define OSSwapBigToHostInt32(x) be32_to_cpu(x) -+#define NXSwapBigLongLongToHost(x) be64_to_cpu(x) -+#define OSSwapBigToHostInt64(x) be64_to_cpu(x) -+ -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+/* Big Endian Swaps */ -+#ifndef be16_to_cpu -+#define be16_to_cpu(x) bswap_16(x) -+#endif -+#ifndef be32_to_cpu -+#define be32_to_cpu(x) bswap_32(x) -+#endif -+#ifndef be64_to_cpu -+#define be64_to_cpu(x) bswap_64(x) -+#endif -+#ifndef cpu_to_be64 -+#define cpu_to_be64(x) bswap_64(x) -+#endif -+#elif __BYTE_ORDER == __BIG_ENDIAN -+/* Big endian doesn't swap */ -+#ifndef be16_to_cpu -+#define be16_to_cpu(x) (x) -+#endif -+#ifndef be32_to_cpu -+#define be32_to_cpu(x) (x) -+#endif -+#ifndef be64_to_cpu -+#define be64_to_cpu(x) (x) -+#endif -+#ifndef cpu_to_be64 -+#define cpu_to_be64(x) (x) -+#endif -+#endif -+ -+#define KAUTH_FILESEC_XATTR "com.apple.system.Security" -+ -+#endif -diff --git a/newfs_hfs.tproj/hfs_endian.c b/newfs_hfs.tproj/hfs_endian.c -index 117b7f8..fdf7353 100644 ---- a/newfs_hfs.tproj/hfs_endian.c -+++ b/newfs_hfs.tproj/hfs_endian.c -@@ -30,7 +30,12 @@ - #include - #include - -+#if LINUX -+#include "missing.h" -+#else - #include -+#endif -+ - #include - - #include "hfs_endian.h" -diff --git a/newfs_hfs.tproj/hfs_endian.h b/newfs_hfs.tproj/hfs_endian.h -index 8d9d01d..5c7ff57 100644 ---- a/newfs_hfs.tproj/hfs_endian.h -+++ b/newfs_hfs.tproj/hfs_endian.h -@@ -29,7 +29,12 @@ - * volume format. - */ - #include -+#if LINUX -+#include -+#include -+#else - #include -+#endif - - /*********************/ - /* BIG ENDIAN Macros */ -diff --git a/newfs_hfs.tproj/makehfs.c b/newfs_hfs.tproj/makehfs.c -index 085222f..7609779 100644 ---- a/newfs_hfs.tproj/makehfs.c -+++ b/newfs_hfs.tproj/makehfs.c -@@ -31,10 +31,16 @@ - #include - #include - #include -+#if LINUX -+#include -+#include "missing.h" -+#endif - #include - #include - #include -+#if !LINUX - #include -+#endif - - #include - #include -@@ -47,13 +53,14 @@ - - #include - -+#if !LINUX - #include - - #include - #include - - extern Boolean _CFStringGetFileSystemRepresentation(CFStringRef string, UInt8 *buffer, CFIndex maxBufLen); -- -+#endif - - #include - #include -@@ -129,7 +136,9 @@ static UInt32 Largest __P((UInt32 a, UInt32 b, UInt32 c, UInt32 d )); - static void MarkBitInAllocationBuffer __P((HFSPlusVolumeHeader *header, - UInt32 allocationBlock, void* sectorBuffer, UInt32 *sector)); - -+#if !LINUX - static UInt32 GetDefaultEncoding(); -+#endif - - static UInt32 UTCToLocal __P((UInt32 utcTime)); - -@@ -158,11 +167,14 @@ void SETOFFSET (void *buffer, UInt16 btNodeSize, SInt16 recOffset, SInt16 vecOff - - #define ROUNDUP(x, u) (((x) % (u) == 0) ? (x) : ((x)/(u) + 1) * (u)) - --#define ENCODING_TO_BIT(e) \ -+#if LINUX -+#define ENCODING_TO_BIT(e) (e) -+#else -+#define ENCODING_TO_BIT(e) - ((e) < 48 ? (e) : \ - ((e) == kCFStringEncodingMacUkrainian ? 48 : \ - ((e) == kCFStringEncodingMacFarsi ? 49 : 0))) -- -+#endif - /* - * make_hfs - * -@@ -528,6 +540,7 @@ InitMDB(hfsparams_t *defaults, UInt32 driveBlocks, HFS_MDB *mdbp) - * Map UTF-8 input into a Mac encoding. - * On conversion errors "untitled" is used as a fallback. - */ -+#if !LINUX - { - UniChar unibuf[kHFSMaxVolumeNameChars]; - CFStringRef cfstr; -@@ -553,7 +566,11 @@ InitMDB(hfsparams_t *defaults, UInt32 driveBlocks, HFS_MDB *mdbp) - bcopy(&mdbp->drVN[1], defaults->volumeName, mdbp->drVN[0]); - defaults->volumeName[mdbp->drVN[0]] = '\0'; - } -+#endif - /* Save the encoding hint in the Finder Info (field 4). */ -+ mdbp->drVN[0] = strlen(defaults->volumeName); -+ bcopy(defaults->volumeName,&mdbp->drVN[1],mdbp->drVN[0]); -+ - mdbp->drFndrInfo[4] = SET_HFS_TEXT_ENCODING(defaults->encodingHint); - - mdbp->drWrCnt = kWriteSeqNum; -@@ -1100,9 +1117,11 @@ InitCatalogRoot_HFSPlus(const hfsparams_t *dp, const HFSPlusVolumeHeader *header - UInt16 nodeSize; - SInt16 offset; - UInt32 unicodeBytes; -+#if !LINUX - UInt8 canonicalName[256]; - CFStringRef cfstr; - Boolean cfOK; -+#endif - int index = 0; - - nodeSize = dp->catalogNodeSize; -@@ -1122,7 +1141,9 @@ InitCatalogRoot_HFSPlus(const hfsparams_t *dp, const HFSPlusVolumeHeader *header - * First record is always the root directory... - */ - ckp = (HFSPlusCatalogKey *)((UInt8 *)buffer + offset); -- -+#if LINUX -+ ConvertUTF8toUnicode(dp->volumeName, sizeof(ckp->nodeName.unicode), ckp->nodeName.unicode, &ckp->nodeName.length); -+#else - /* Use CFString functions to get a HFSPlus Canonical name */ - cfstr = CFStringCreateWithCString(kCFAllocatorDefault, (char *)dp->volumeName, kCFStringEncodingUTF8); - cfOK = _CFStringGetFileSystemRepresentation(cfstr, canonicalName, sizeof(canonicalName)); -@@ -1139,6 +1160,7 @@ InitCatalogRoot_HFSPlus(const hfsparams_t *dp, const HFSPlusVolumeHeader *header - dp->volumeName, kDefaultVolumeNameStr); - } - CFRelease(cfstr); -+#endif - ckp->nodeName.length = SWAP_BE16 (ckp->nodeName.length); - - unicodeBytes = sizeof(UniChar) * SWAP_BE16 (ckp->nodeName.length); -@@ -1821,15 +1843,15 @@ WriteBuffer(const DriveInfo *driveInfo, UInt64 startingSector, UInt32 byteCount, - off_t sector; - - if ((byteCount % driveInfo->sectorSize) != 0) -- errx(1, "WriteBuffer: byte count %ld is not sector size multiple", byteCount); -+ errx(1, "WriteBuffer: byte count %i is not sector size multiple", byteCount); - - sector = driveInfo->sectorOffset + startingSector; - - if (lseek(driveInfo->fd, sector * driveInfo->sectorSize, SEEK_SET) < 0) -- err(1, "seek (sector %qd)", sector); -+ err(1, "seek (sector %lld)", sector); - - if (write(driveInfo->fd, buffer, byteCount) != byteCount) -- err(1, "write (sector %qd, %ld bytes)", sector, byteCount); -+ err(1, "write (sector %lld, %i bytes)", sector, byteCount); - } - - -@@ -1913,7 +1935,7 @@ DivideAndRoundUp(UInt32 numerator, UInt32 denominator) - return quotient; - } - -- -+#if !LINUX - #define __kCFUserEncodingFileName ("/.CFUserTextEncoding") - - static UInt32 -@@ -1939,7 +1961,7 @@ GetDefaultEncoding() - } - return 0; - } -- -+#endif - - static int - ConvertUTF8toUnicode(const UInt8* source, UInt32 bufsize, UniChar* unibuf, -@@ -2006,6 +2028,9 @@ ConvertUTF8toUnicode(const UInt8* source, UInt32 bufsize, UniChar* unibuf, - static int - getencodinghint(unsigned char *name) - { -+#if LINUX -+ return(0); -+#else - int mib[3]; - size_t buflen = sizeof(int); - struct vfsconf vfc; -@@ -2023,7 +2048,8 @@ getencodinghint(unsigned char *name) - return (hint); - error: - hint = GetDefaultEncoding(); -- return (hint); -+ return (0); -+#endif - } - - -@@ -2034,12 +2060,14 @@ void GenerateVolumeUUID(VolumeUUID *newVolumeID) { - unsigned char digest[20]; - time_t now; - clock_t uptime; -- int mib[2]; -- int sysdata; -- char sysctlstring[128]; - size_t datalen; - double sysloadavg[3]; -+#if !LINUX -+ int sysdata; -+ int mib[2]; -+ char sysctlstring[128]; - struct vmtotal sysvmtotal; -+#endif - - do { - /* Initialize the SHA-1 context for processing: */ -@@ -2052,52 +2080,58 @@ void GenerateVolumeUUID(VolumeUUID *newVolumeID) { - SHA1_Update(&context, &uptime, sizeof(uptime)); - - /* The kernel's boot time: */ -+#if !LINUX - mib[0] = CTL_KERN; - mib[1] = KERN_BOOTTIME; - datalen = sizeof(sysdata); - sysctl(mib, 2, &sysdata, &datalen, NULL, 0); - SHA1_Update(&context, &sysdata, datalen); -- -+#endif - /* The system's host id: */ -+#if !LINUX - mib[0] = CTL_KERN; - mib[1] = KERN_HOSTID; - datalen = sizeof(sysdata); - sysctl(mib, 2, &sysdata, &datalen, NULL, 0); - SHA1_Update(&context, &sysdata, datalen); -- -+#endif - /* The system's host name: */ -+#if !LINUX - mib[0] = CTL_KERN; - mib[1] = KERN_HOSTNAME; - datalen = sizeof(sysctlstring); - sysctl(mib, 2, sysctlstring, &datalen, NULL, 0); - SHA1_Update(&context, sysctlstring, datalen); -- -+#endif - /* The running kernel's OS release string: */ -+#if !LINUX - mib[0] = CTL_KERN; - mib[1] = KERN_OSRELEASE; - datalen = sizeof(sysctlstring); - sysctl(mib, 2, sysctlstring, &datalen, NULL, 0); - SHA1_Update(&context, sysctlstring, datalen); -- -+#endif - /* The running kernel's version string: */ -+#if !LINUX - mib[0] = CTL_KERN; - mib[1] = KERN_VERSION; - datalen = sizeof(sysctlstring); - sysctl(mib, 2, sysctlstring, &datalen, NULL, 0); - SHA1_Update(&context, sysctlstring, datalen); -- -+#endif - /* The system's load average: */ - datalen = sizeof(sysloadavg); - getloadavg(sysloadavg, 3); - SHA1_Update(&context, &sysloadavg, datalen); - - /* The system's VM statistics: */ -+#if !LINUX - mib[0] = CTL_VM; - mib[1] = VM_METER; - datalen = sizeof(sysvmtotal); - sysctl(mib, 2, &sysvmtotal, &datalen, NULL, 0); - SHA1_Update(&context, &sysvmtotal, datalen); -- -+#endif - /* The current GMT (26 ASCII characters): */ - time(&now); - strncpy(randomInputBuffer, asctime(gmtime(&now)), 26); /* "Mon Mar 27 13:46:26 2000" */ -diff --git a/newfs_hfs.tproj/newfs_hfs.c b/newfs_hfs.tproj/newfs_hfs.c -index c4176a9..bf2ed21 100644 ---- a/newfs_hfs.tproj/newfs_hfs.c -+++ b/newfs_hfs.tproj/newfs_hfs.c -@@ -38,8 +38,13 @@ - #include - #include - #include -+#if LINUX -+#include -+#endif - -+#if !LINUX - #include -+#endif - - #include - #include "newfs_hfs.h" -@@ -73,7 +78,9 @@ static void usage __P((void)); - - char *progname; - char gVolumeName[kHFSPlusMaxFileNameChars + 1] = {kDefaultVolumeNameStr}; -+#if !LINUX - char rawdevice[MAXPATHLEN]; -+#endif - char blkdevice[MAXPATHLEN]; - UInt32 gBlockSize = 0; - UInt32 gNextCNID = kHFSFirstUserCatalogNodeID; -@@ -158,8 +165,10 @@ main(argc, argv) - extern int optind; - int ch; - int forceHFS; -+#if !LINUX - char *cp, *special; - struct statfs *mp; -+#endif - int n; - - if ((progname = strrchr(*argv, '/'))) -@@ -260,16 +269,19 @@ main(argc, argv) - usage(); - } - -- argc -= optind; -- argv += optind; -+ argc -= optind; -+ argv += optind; - -- if (gPartitionSize != 0) { -- if (argc != 0) -- usage(); -- } else { -- if (argc != 1) -- usage(); -+ if (gPartitionSize != 0) { -+ if (argc != 0) -+ usage(); -+ } else { -+ if (argc != 1) -+ usage(); - -+#if LINUX -+ (void) sprintf(blkdevice, "%s", argv[0]); -+#else - special = argv[0]; - cp = strrchr(special, '/'); - if (cp != 0) -@@ -278,6 +290,7 @@ main(argc, argv) - special++; - (void) sprintf(rawdevice, "%sr%s", _PATH_DEV, special); - (void) sprintf(blkdevice, "%s%s", _PATH_DEV, special); -+#endif - } - - if (forceHFS && gJournaled) { -@@ -301,6 +314,9 @@ main(argc, argv) - /* - * Check if target device is aready mounted - */ -+#if LINUX -+ // FIXME -+#else - n = getmntinfo(&mp, MNT_NOWAIT); - if (n == 0) - fatal("%s: getmntinfo: %s", blkdevice, strerror(errno)); -@@ -310,15 +326,20 @@ main(argc, argv) - fatal("%s is mounted on %s", blkdevice, mp->f_mntonname); - ++mp; - } -+#endif - } - -- if (hfs_newfs(rawdevice, forceHFS, true) < 0) { -+ if (hfs_newfs(blkdevice, forceHFS, true) < 0) { -+#if LINUX -+ err(1, NULL); -+#else - /* On ENXIO error use the block device (to get de-blocking) */ - if (errno == ENXIO) { - if (hfs_newfs(blkdevice, forceHFS, false) < 0) - err(1, NULL); - } else - err(1, NULL); -+#endif - } - - exit(0); -@@ -506,7 +527,9 @@ hfs_newfs(char *device, int forceHFS, int isRaw) - int fso = 0; - int retval = 0; - hfsparams_t defaults = {0}; -+#if !LINUX - u_int64_t maxSectorsPerIO; -+#endif - - if (gPartitionSize) { - dip.sectorSize = kBytesPerSector; -@@ -526,6 +549,34 @@ hfs_newfs(char *device, int forceHFS, int isRaw) - - if (fstat( fso, &stbuf) < 0) - fatal("%s: %s", device, strerror(errno)); -+#if LINUX -+ dip.sectorSize = 512; -+ dip.sectorsPerIO = 256; -+ -+# ifndef BLKGETSIZE -+# define BLKGETSIZE _IO(0x12,96) -+# endif -+ -+# ifndef BLKGETSIZE64 -+# define BLKGETSIZE64 _IOR(0x12,114,size_t) -+# endif -+ -+ if (S_ISREG(stbuf.st_mode)) { -+ dip.totalSectors = stbuf.st_size / 512; -+ } -+ else if (S_ISBLK(stbuf.st_mode)) { -+ unsigned long size; -+ u_int64_t size64; -+ if (!ioctl(fso, BLKGETSIZE64, &size64)) -+ dip.totalSectors = size64 / 512; -+ else if (!ioctl(fso, BLKGETSIZE, &size)) -+ dip.totalSectors = size; -+ else -+ fatal("%s: %s", device, strerror(errno)); -+ } -+ else -+ fatal("%s: is not a block device", device); -+#else - - if (ioctl(fso, DKIOCGETBLOCKCOUNT, &dip.totalSectors) < 0) - fatal("%s: %s", device, strerror(errno)); -@@ -537,11 +588,14 @@ hfs_newfs(char *device, int forceHFS, int isRaw) - dip.sectorsPerIO = (128 * 1024) / dip.sectorSize; /* use 128K as default */ - else - dip.sectorsPerIO = MIN(maxSectorsPerIO, (1024 * 1024) / dip.sectorSize); -+#endif -+ - /* - * The make_hfs code currentlydoes 512 byte sized I/O. - * If the sector size is bigger than 512, start over - * using the block device (to get de-blocking). - */ -+#if !LINUX - if (dip.sectorSize != kBytesPerSector) { - if (isRaw) { - close(fso); -@@ -556,7 +610,9 @@ hfs_newfs(char *device, int forceHFS, int isRaw) - dip.sectorSize = kBytesPerSector; - } - } -+#endif - } -+ - dip.sectorOffset = 0; - time(&createtime); - -diff --git a/newfs_hfs.tproj/newfs_hfs.h b/newfs_hfs.tproj/newfs_hfs.h -index 968ff10..5680a34 100644 ---- a/newfs_hfs.tproj/newfs_hfs.h -+++ b/newfs_hfs.tproj/newfs_hfs.h -@@ -19,8 +19,12 @@ - * - * @APPLE_LICENSE_HEADER_END@ - */ -- -+ -+#if LINUX -+#include "missing.h" -+#else - #include -+#endif - - /* - * Mac OS Finder flags -@@ -122,33 +126,33 @@ enum { - #define kDTDF_FileID 16 - #define kDTDF_Name "Desktop DF" - #define kDTDF_Chars 10 --#define kDTDF_Type 'DTFL' --#define kDTDF_Creator 'DMGR' -+#define kDTDF_Type 0x4454464C /* 'DTFL' */ -+#define kDTDF_Creator 0x444D4752 /* 'DMGR' */ - - #define kDTDB_FileID 17 - #define kDTDB_Name "Desktop DB" - #define kDTDB_Chars 10 --#define kDTDB_Type 'BTFL' --#define kDTDB_Creator 'DMGR' -+#define kDTDB_Type 0x4254464C /* 'BTFL' */ -+#define kDTDB_Creator 0x444D4752 /* 'DMGR' */ - #define kDTDB_Size 1024 - - #define kReadMe_FileID 18 - #define kReadMe_Name "ReadMe" - #define kReadMe_Chars 6 --#define kReadMe_Type 'ttro' --#define kReadMe_Creator 'ttxt' -+#define kReadMe_Type 0x7474726F /* 'ttro' */ -+#define kReadMe_Creator 0x74747974 /* 'ttxt' */ - - #define kFinder_FileID 19 - #define kFinder_Name "Finder" - #define kFinder_Chars 6 --#define kFinder_Type 'FNDR' --#define kFinder_Creator 'MACS' -+#define kFinder_Type 0x464E4452 /* 'FNDR' */ -+#define kFinder_Creator 0x4D414353 /* 'MACS' */ - - #define kSystem_FileID 20 - #define kSystem_Name "System" - #define kSystem_Chars 6 --#define kSystem_Type 'zsys' --#define kSystem_Creator 'MACS' -+#define kSystem_Type 0x7A737973 /* 'zsys' */ -+#define kSystem_Creator 0x4D414353 /* 'MACS' */ - - - diff --git a/utils/hfsprogs/patches/0003-Add-helper-include-files-absent-from-the-upstream-pa.patch b/utils/hfsprogs/patches/0003-Add-helper-include-files-absent-from-the-upstream-pa.patch deleted file mode 100644 index 36b9417..0000000 --- a/utils/hfsprogs/patches/0003-Add-helper-include-files-absent-from-the-upstream-pa.patch +++ /dev/null @@ -1,1024 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Add helper include files absent from the upstream package - -Add some include files from an Apple system that contain the definition of -the data structures used by the programs that manipulate the filesystems. ---- - include/bitstring.h | 164 +++++++++++ - include/hfs/hfs_format.h | 689 +++++++++++++++++++++++++++++++++++++++++++++ - include/hfs/hfs_mount.h | 78 +++++ - include/sys/appleapiopts.h | 52 ++++ - 4 files changed, 983 insertions(+) - create mode 100644 include/bitstring.h - create mode 100644 include/hfs/hfs_format.h - create mode 100644 include/hfs/hfs_mount.h - create mode 100644 include/sys/appleapiopts.h - -diff --git a/include/bitstring.h b/include/bitstring.h -new file mode 100644 -index 0000000..fbecfbe ---- /dev/null -+++ b/include/bitstring.h -@@ -0,0 +1,164 @@ -+/* -+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. -+ * -+ * @APPLE_LICENSE_HEADER_START@ -+ * -+ * The contents of this file constitute Original Code as defined in and -+ * are subject to the Apple Public Source License Version 1.1 (the -+ * "License"). You may not use this file except in compliance with the -+ * License. Please obtain a copy of the License at -+ * http://www.apple.com/publicsource and read it before using this file. -+ * -+ * This Original Code and all software distributed under the License are -+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER -+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the -+ * License for the specific language governing rights and limitations -+ * under the License. -+ * -+ * @APPLE_LICENSE_HEADER_END@ -+ */ -+/* -+ * Copyright (c) 1989, 1993 -+ * The Regents of the University of California. All rights reserved. -+ * -+ * This code is derived from software contributed to Berkeley by -+ * Paul Vixie. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. All advertising materials mentioning features or use of this software -+ * must display the following acknowledgement: -+ * This product includes software developed by the University of -+ * California, Berkeley and its contributors. -+ * 4. Neither the name of the University nor the names of its contributors -+ * may be used to endorse or promote products derived from this software -+ * without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ * -+ * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 -+ */ -+ -+#ifndef _BITSTRING_H_ -+#define _BITSTRING_H_ -+ -+typedef unsigned char bitstr_t; -+ -+/* internal macros */ -+ /* byte of the bitstring bit is in */ -+#define _bit_byte(bit) \ -+ ((bit) >> 3) -+ -+ /* mask for the bit within its byte */ -+#define _bit_mask(bit) \ -+ (1 << ((bit)&0x7)) -+ -+/* external macros */ -+ /* bytes in a bitstring of nbits bits */ -+#define bitstr_size(nbits) \ -+ ((((nbits) - 1) >> 3) + 1) -+ -+ /* allocate a bitstring */ -+#define bit_alloc(nbits) \ -+ (bitstr_t *)calloc(1, \ -+ (unsigned int)bitstr_size(nbits) * sizeof(bitstr_t)) -+ -+ /* allocate a bitstring on the stack */ -+#define bit_decl(name, nbits) \ -+ (name)[bitstr_size(nbits)] -+ -+ /* is bit N of bitstring name set? */ -+#define bit_test(name, bit) \ -+ ((name)[_bit_byte(bit)] & _bit_mask(bit)) -+ -+ /* set bit N of bitstring name */ -+#define bit_set(name, bit) \ -+ (name)[_bit_byte(bit)] |= _bit_mask(bit) -+ -+ /* clear bit N of bitstring name */ -+#define bit_clear(name, bit) \ -+ (name)[_bit_byte(bit)] &= ~_bit_mask(bit) -+ -+ /* clear bits start ... stop in bitstring */ -+#define bit_nclear(name, start, stop) { \ -+ register bitstr_t *_name = name; \ -+ register int _start = start, _stop = stop; \ -+ register int _startbyte = _bit_byte(_start); \ -+ register int _stopbyte = _bit_byte(_stop); \ -+ if (_startbyte == _stopbyte) { \ -+ _name[_startbyte] &= ((0xff >> (8 - (_start&0x7))) | \ -+ (0xff << ((_stop&0x7) + 1))); \ -+ } else { \ -+ _name[_startbyte] &= 0xff >> (8 - (_start&0x7)); \ -+ while (++_startbyte < _stopbyte) \ -+ _name[_startbyte] = 0; \ -+ _name[_stopbyte] &= 0xff << ((_stop&0x7) + 1); \ -+ } \ -+} -+ -+ /* set bits start ... stop in bitstring */ -+#define bit_nset(name, start, stop) { \ -+ register bitstr_t *_name = name; \ -+ register int _start = start, _stop = stop; \ -+ register int _startbyte = _bit_byte(_start); \ -+ register int _stopbyte = _bit_byte(_stop); \ -+ if (_startbyte == _stopbyte) { \ -+ _name[_startbyte] |= ((0xff << (_start&0x7)) & \ -+ (0xff >> (7 - (_stop&0x7)))); \ -+ } else { \ -+ _name[_startbyte] |= 0xff << ((_start)&0x7); \ -+ while (++_startbyte < _stopbyte) \ -+ _name[_startbyte] = 0xff; \ -+ _name[_stopbyte] |= 0xff >> (7 - (_stop&0x7)); \ -+ } \ -+} -+ -+ /* find first bit clear in name */ -+#define bit_ffc(name, nbits, value) { \ -+ register bitstr_t *_name = name; \ -+ register int _byte, _nbits = nbits; \ -+ register int _stopbyte = _bit_byte(_nbits), _value = -1; \ -+ for (_byte = 0; _byte <= _stopbyte; ++_byte) \ -+ if (_name[_byte] != 0xff) { \ -+ _value = _byte << 3; \ -+ for (_stopbyte = _name[_byte]; (_stopbyte&0x1); \ -+ ++_value, _stopbyte >>= 1); \ -+ break; \ -+ } \ -+ *(value) = _value; \ -+} -+ -+ /* find first bit set in name */ -+#define bit_ffs(name, nbits, value) { \ -+ register bitstr_t *_name = name; \ -+ register int _byte, _nbits = nbits; \ -+ register int _stopbyte = _bit_byte(_nbits), _value = -1; \ -+ for (_byte = 0; _byte <= _stopbyte; ++_byte) \ -+ if (_name[_byte]) { \ -+ _value = _byte << 3; \ -+ for (_stopbyte = _name[_byte]; !(_stopbyte&0x1); \ -+ ++_value, _stopbyte >>= 1); \ -+ break; \ -+ } \ -+ *(value) = _value; \ -+} -+ -+#endif /* !_BITSTRING_H_ */ -diff --git a/include/hfs/hfs_format.h b/include/hfs/hfs_format.h -new file mode 100644 -index 0000000..d820329 ---- /dev/null -+++ b/include/hfs/hfs_format.h -@@ -0,0 +1,689 @@ -+/* -+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. -+ * -+ * @APPLE_LICENSE_HEADER_START@ -+ * -+ * The contents of this file constitute Original Code as defined in and -+ * are subject to the Apple Public Source License Version 1.1 (the -+ * "License"). You may not use this file except in compliance with the -+ * License. Please obtain a copy of the License at -+ * http://www.apple.com/publicsource and read it before using this file. -+ * -+ * This Original Code and all software distributed under the License are -+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER -+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the -+ * License for the specific language governing rights and limitations -+ * under the License. -+ * -+ * @APPLE_LICENSE_HEADER_END@ -+ */ -+#ifndef __HFS_FORMAT__ -+#define __HFS_FORMAT__ -+ -+#include "missing.h" -+ -+#include -+ -+/* -+ * hfs_format.c -+ * -+ * This file describes the on-disk format for HFS and HFS Plus volumes. -+ * The HFS Plus volume format is desciibed in detail in Apple Technote 1150. -+ * -+ * http://developer.apple.com/technotes/tn/tn1150.html -+ * -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* some on-disk hfs structures have 68K alignment (misaligned) */ -+ -+#define PACKED_S __attribute__((packed)) -+ -+/* Signatures used to differentiate between HFS and HFS Plus volumes */ -+enum { -+ kHFSSigWord = 0x4244, /* 'BD' in ASCII */ -+ kHFSPlusSigWord = 0x482B, /* 'H+' in ASCII */ -+ kHFSXSigWord = 0x4858, /* 'HX' in ASCII */ -+ -+ kHFSPlusVersion = 0x0004, /* 'H+' volumes are version 4 only */ -+ kHFSXVersion = 0x0005, /* 'HX' volumes start with version 5 */ -+ -+ kHFSPlusMountVersion = 0x31302E30, /* '10.0' for Mac OS X */ -+ kHFSJMountVersion = 0x4846534a, /* 'HFSJ' for journaled HFS+ on OS X */ -+ kFSKMountVersion = 0x46534b21 /* 'FSK!' for failed journal replay */ -+}PACKED_S; -+ -+ -+#if 1 -+/* -+ * Mac OS X has a special directory for linked and unlinked files (HFS Plus only). -+ * This directory and its contents are never exported from the filesystem under -+ * Mac OS X. -+ * -+ * To make this folder name sort last, it has embedded null prefix. -+ * (0xC0, 0x80 in UTF-8) -+ */ -+#define HFSPLUSMETADATAFOLDER "\xC0\x80\xC0\x80\xC0\x80\xC0\x80HFS+ Private Data" -+ -+/* -+ * Files in the HFS Private Data folder have one of the following prefixes -+ * followed by a decimal number (no leading zeros). For indirect nodes this -+ * number is a 32 bit random number. For unlinked (deleted) files that are -+ * still open, the number is the file ID for that file. -+ * -+ * e.g. iNode7182000 and temp3296 -+ */ -+#define HFS_INODE_PREFIX "iNode" -+#define HFS_DELETE_PREFIX "temp" -+ -+#endif /* __APPLE_API_PRIVATE */ -+ -+/* -+ * Indirect link files (hard links) have the following type/creator. -+ */ -+enum { -+ kHardLinkFileType = 0x686C6E6B, /* 'hlnk' */ -+ kHFSPlusCreator = 0x6866732B /* 'hfs+' */ -+}PACKED_S; -+ -+ -+#ifndef _HFSUNISTR255_DEFINED_ -+#define _HFSUNISTR255_DEFINED_ -+/* Unicode strings are used for HFS Plus file and folder names */ -+struct HFSUniStr255 { -+ u_int16_t length; /* number of unicode characters */ -+ u_int16_t unicode[255]; /* unicode characters */ -+} PACKED_S; -+typedef struct HFSUniStr255 HFSUniStr255; -+typedef const HFSUniStr255 *ConstHFSUniStr255Param; -+#endif /* _HFSUNISTR255_DEFINED_ */ -+ -+enum { -+ kHFSMaxVolumeNameChars = 27, -+ kHFSMaxFileNameChars = 31, -+ kHFSPlusMaxFileNameChars = 255 -+}PACKED_S; -+ -+ -+/* Extent overflow file data structures */ -+ -+/* HFS Extent key */ -+struct HFSExtentKey { -+ u_int8_t keyLength; /* length of key, excluding this field */ -+ u_int8_t forkType; /* 0 = data fork, FF = resource fork */ -+ u_int32_t fileID; /* file ID */ -+ u_int16_t startBlock; /* first file allocation block number in this extent */ -+}PACKED_S; -+typedef struct HFSExtentKey HFSExtentKey; -+ -+/* HFS Plus Extent key */ -+struct HFSPlusExtentKey { -+ u_int16_t keyLength; /* length of key, excluding this field */ -+ u_int8_t forkType; /* 0 = data fork, FF = resource fork */ -+ u_int8_t pad; /* make the other fields align on 32-bit boundary */ -+ u_int32_t fileID; /* file ID */ -+ u_int32_t startBlock; /* first file allocation block number in this extent */ -+}PACKED_S; -+typedef struct HFSPlusExtentKey HFSPlusExtentKey; -+ -+/* Number of extent descriptors per extent record */ -+enum { -+ kHFSExtentDensity = 3, -+ kHFSPlusExtentDensity = 8 -+}PACKED_S; -+ -+/* HFS extent descriptor */ -+struct HFSExtentDescriptor { -+ u_int16_t startBlock; /* first allocation block */ -+ u_int16_t blockCount; /* number of allocation blocks */ -+}PACKED_S; -+typedef struct HFSExtentDescriptor HFSExtentDescriptor; -+ -+/* HFS Plus extent descriptor */ -+struct HFSPlusExtentDescriptor { -+ u_int32_t startBlock; /* first allocation block */ -+ u_int32_t blockCount; /* number of allocation blocks */ -+}PACKED_S; -+typedef struct HFSPlusExtentDescriptor HFSPlusExtentDescriptor; -+ -+/* HFS extent record */ -+typedef HFSExtentDescriptor HFSExtentRecord[3]; -+ -+/* HFS Plus extent record */ -+typedef HFSPlusExtentDescriptor HFSPlusExtentRecord[8]; -+ -+ -+/* Finder information */ -+struct FndrFileInfo { -+ u_int32_t fdType; /* file type */ -+ u_int32_t fdCreator; /* file creator */ -+ u_int16_t fdFlags; /* Finder flags */ -+ struct { -+ int16_t v; /* file's location */ -+ int16_t h; -+ } PACKED_S fdLocation; -+ int16_t opaque; -+}PACKED_S; -+typedef struct FndrFileInfo FndrFileInfo; -+ -+struct FndrDirInfo { -+ struct { /* folder's window rectangle */ -+ int16_t top; -+ int16_t left; -+ int16_t bottom; -+ int16_t right; -+ }PACKED_S frRect; -+ unsigned short frFlags; /* Finder flags */ -+ struct { -+ u_int16_t v; /* folder's location */ -+ u_int16_t h; -+ }PACKED_S frLocation; -+ int16_t opaque; -+}PACKED_S; -+typedef struct FndrDirInfo FndrDirInfo; -+ -+struct FndrOpaqueInfo { -+ int8_t opaque[16]; -+}PACKED_S; -+typedef struct FndrOpaqueInfo FndrOpaqueInfo; -+ -+ -+/* HFS Plus Fork data info - 80 bytes */ -+struct HFSPlusForkData { -+ u_int64_t logicalSize; /* fork's logical size in bytes */ -+ u_int32_t clumpSize; /* fork's clump size in bytes */ -+ u_int32_t totalBlocks; /* total blocks used by this fork */ -+ HFSPlusExtentRecord extents; /* initial set of extents */ -+}PACKED_S; -+typedef struct HFSPlusForkData HFSPlusForkData; -+ -+ -+/* Mac OS X has 16 bytes worth of "BSD" info. -+ * -+ * Note: Mac OS 9 implementations and applications -+ * should preserve, but not change, this information. -+ */ -+struct HFSPlusBSDInfo { -+ u_int32_t ownerID; /* user or group ID of file/folder owner */ -+ u_int32_t groupID; /* additional user of group ID */ -+ u_int8_t adminFlags; /* super-user changeable flags */ -+ u_int8_t ownerFlags; /* owner changeable flags */ -+ u_int16_t fileMode; /* file type and permission bits */ -+ union { -+ u_int32_t iNodeNum; /* indirect node number (hard links only) */ -+ u_int32_t linkCount; /* links that refer to this indirect node */ -+ u_int32_t rawDevice; /* special file device (FBLK and FCHR only) */ -+ }PACKED_S special; -+}PACKED_S; -+typedef struct HFSPlusBSDInfo HFSPlusBSDInfo; -+ -+ -+/* Catalog file data structures */ -+ -+enum { -+ kHFSRootParentID = 1, /* Parent ID of the root folder */ -+ kHFSRootFolderID = 2, /* Folder ID of the root folder */ -+ kHFSExtentsFileID = 3, /* File ID of the extents file */ -+ kHFSCatalogFileID = 4, /* File ID of the catalog file */ -+ kHFSBadBlockFileID = 5, /* File ID of the bad allocation block file */ -+ kHFSAllocationFileID = 6, /* File ID of the allocation file (HFS Plus only) */ -+ kHFSStartupFileID = 7, /* File ID of the startup file (HFS Plus only) */ -+ kHFSAttributesFileID = 8, /* File ID of the attribute file (HFS Plus only) */ -+ kHFSRepairCatalogFileID = 14, /* Used when rebuilding Catalog B-tree */ -+ kHFSBogusExtentFileID = 15, /* Used for exchanging extents in extents file */ -+ kHFSFirstUserCatalogNodeID = 16 -+}PACKED_S; -+ -+/* HFS catalog key */ -+struct HFSCatalogKey { -+ u_int8_t keyLength; /* key length (in bytes) */ -+ u_int8_t reserved; /* reserved (set to zero) */ -+ u_int32_t parentID; /* parent folder ID */ -+ u_int8_t nodeName[kHFSMaxFileNameChars + 1]; /* catalog node name */ -+}PACKED_S; -+typedef struct HFSCatalogKey HFSCatalogKey; -+ -+/* HFS Plus catalog key */ -+struct HFSPlusCatalogKey { -+ u_int16_t keyLength; /* key length (in bytes) */ -+ u_int32_t parentID; /* parent folder ID */ -+ HFSUniStr255 nodeName; /* catalog node name */ -+}PACKED_S; -+typedef struct HFSPlusCatalogKey HFSPlusCatalogKey; -+ -+/* Catalog record types */ -+enum { -+ /* HFS Catalog Records */ -+ kHFSFolderRecord = 0x0100, /* Folder record */ -+ kHFSFileRecord = 0x0200, /* File record */ -+ kHFSFolderThreadRecord = 0x0300, /* Folder thread record */ -+ kHFSFileThreadRecord = 0x0400, /* File thread record */ -+ -+ /* HFS Plus Catalog Records */ -+ kHFSPlusFolderRecord = 1, /* Folder record */ -+ kHFSPlusFileRecord = 2, /* File record */ -+ kHFSPlusFolderThreadRecord = 3, /* Folder thread record */ -+ kHFSPlusFileThreadRecord = 4 /* File thread record */ -+}PACKED_S; -+ -+ -+/* Catalog file record flags */ -+enum { -+ kHFSFileLockedBit = 0x0000, /* file is locked and cannot be written to */ -+ kHFSFileLockedMask = 0x0001, -+ -+ kHFSThreadExistsBit = 0x0001, /* a file thread record exists for this file */ -+ kHFSThreadExistsMask = 0x0002, -+ -+ kHFSHasAttributesBit = 0x0002, /* object has extended attributes */ -+ kHFSHasAttributesMask = 0x0004, -+ -+ kHFSHasSecurityBit = 0x0003, /* object has security data (ACLs) */ -+ kHFSHasSecurityMask = 0x0008 -+}PACKED_S; -+ -+ -+/* HFS catalog folder record - 70 bytes */ -+struct HFSCatalogFolder { -+ int16_t recordType; /* == kHFSFolderRecord */ -+ u_int16_t flags; /* folder flags */ -+ u_int16_t valence; /* folder valence */ -+ u_int32_t folderID; /* folder ID */ -+ u_int32_t createDate; /* date and time of creation */ -+ u_int32_t modifyDate; /* date and time of last modification */ -+ u_int32_t backupDate; /* date and time of last backup */ -+ FndrDirInfo userInfo; /* Finder information */ -+ FndrOpaqueInfo finderInfo; /* additional Finder information */ -+ u_int32_t reserved[4]; /* reserved - initialized as zero */ -+}PACKED_S; -+typedef struct HFSCatalogFolder HFSCatalogFolder; -+ -+/* HFS Plus catalog folder record - 88 bytes */ -+struct HFSPlusCatalogFolder { -+ int16_t recordType; /* == kHFSPlusFolderRecord */ -+ u_int16_t flags; /* file flags */ -+ u_int32_t valence; /* folder's valence (limited to 2^16 in Mac OS) */ -+ u_int32_t folderID; /* folder ID */ -+ u_int32_t createDate; /* date and time of creation */ -+ u_int32_t contentModDate; /* date and time of last content modification */ -+ u_int32_t attributeModDate; /* date and time of last attribute modification */ -+ u_int32_t accessDate; /* date and time of last access (MacOS X only) */ -+ u_int32_t backupDate; /* date and time of last backup */ -+ HFSPlusBSDInfo bsdInfo; /* permissions (for MacOS X) */ -+ FndrDirInfo userInfo; /* Finder information */ -+ FndrOpaqueInfo finderInfo; /* additional Finder information */ -+ u_int32_t textEncoding; /* hint for name conversions */ -+ u_int32_t attrBlocks; /* cached count of attribute data blocks */ -+}PACKED_S; -+typedef struct HFSPlusCatalogFolder HFSPlusCatalogFolder; -+ -+/* HFS catalog file record - 102 bytes */ -+struct HFSCatalogFile { -+ int16_t recordType; /* == kHFSFileRecord */ -+ u_int8_t flags; /* file flags */ -+ int8_t fileType; /* file type (unused ?) */ -+ FndrFileInfo userInfo; /* Finder information */ -+ u_int32_t fileID; /* file ID */ -+ u_int16_t dataStartBlock; /* not used - set to zero */ -+ int32_t dataLogicalSize; /* logical EOF of data fork */ -+ int32_t dataPhysicalSize; /* physical EOF of data fork */ -+ u_int16_t rsrcStartBlock; /* not used - set to zero */ -+ int32_t rsrcLogicalSize; /* logical EOF of resource fork */ -+ int32_t rsrcPhysicalSize; /* physical EOF of resource fork */ -+ u_int32_t createDate; /* date and time of creation */ -+ u_int32_t modifyDate; /* date and time of last modification */ -+ u_int32_t backupDate; /* date and time of last backup */ -+ FndrOpaqueInfo finderInfo; /* additional Finder information */ -+ u_int16_t clumpSize; /* file clump size (not used) */ -+ HFSExtentRecord dataExtents; /* first data fork extent record */ -+ HFSExtentRecord rsrcExtents; /* first resource fork extent record */ -+ u_int32_t reserved; /* reserved - initialized as zero */ -+}PACKED_S; -+typedef struct HFSCatalogFile HFSCatalogFile; -+ -+/* HFS Plus catalog file record - 248 bytes */ -+struct HFSPlusCatalogFile { -+ int16_t recordType; /* == kHFSPlusFileRecord */ -+ u_int16_t flags; /* file flags */ -+ u_int32_t reserved1; /* reserved - initialized as zero */ -+ u_int32_t fileID; /* file ID */ -+ u_int32_t createDate; /* date and time of creation */ -+ u_int32_t contentModDate; /* date and time of last content modification */ -+ u_int32_t attributeModDate; /* date and time of last attribute modification */ -+ u_int32_t accessDate; /* date and time of last access (MacOS X only) */ -+ u_int32_t backupDate; /* date and time of last backup */ -+ HFSPlusBSDInfo bsdInfo; /* permissions (for MacOS X) */ -+ FndrFileInfo userInfo; /* Finder information */ -+ FndrOpaqueInfo finderInfo; /* additional Finder information */ -+ u_int32_t textEncoding; /* hint for name conversions */ -+ u_int32_t attrBlocks; /* cached count of attribute data blocks */ -+ -+ /* Note: these start on double long (64 bit) boundary */ -+ HFSPlusForkData dataFork; /* size and block data for data fork */ -+ HFSPlusForkData resourceFork; /* size and block data for resource fork */ -+}PACKED_S; -+typedef struct HFSPlusCatalogFile HFSPlusCatalogFile; -+ -+/* HFS catalog thread record - 46 bytes */ -+struct HFSCatalogThread { -+ int16_t recordType; /* == kHFSFolderThreadRecord or kHFSFileThreadRecord */ -+ int32_t reserved[2]; /* reserved - initialized as zero */ -+ u_int32_t parentID; /* parent ID for this catalog node */ -+ u_int8_t nodeName[kHFSMaxFileNameChars + 1]; /* name of this catalog node */ -+}PACKED_S; -+typedef struct HFSCatalogThread HFSCatalogThread; -+ -+/* HFS Plus catalog thread record -- 264 bytes */ -+struct HFSPlusCatalogThread { -+ int16_t recordType; /* == kHFSPlusFolderThreadRecord or kHFSPlusFileThreadRecord */ -+ int16_t reserved; /* reserved - initialized as zero */ -+ u_int32_t parentID; /* parent ID for this catalog node */ -+ HFSUniStr255 nodeName; /* name of this catalog node (variable length) */ -+}PACKED_S; -+typedef struct HFSPlusCatalogThread HFSPlusCatalogThread; -+ -+#ifdef __APPLE_API_UNSTABLE -+/* -+ These are the types of records in the attribute B-tree. The values were -+ chosen so that they wouldn't conflict with the catalog record types. -+*/ -+enum { -+ kHFSPlusAttrInlineData = 0x10, /* if size < kAttrOverflowSize */ -+ kHFSPlusAttrForkData = 0x20, /* if size >= kAttrOverflowSize */ -+ kHFSPlusAttrExtents = 0x30 /* overflow extents for large attributes */ -+}PACKED_S; -+ -+ -+/* -+ HFSPlusAttrForkData -+ For larger attributes, whose value is stored in allocation blocks. -+ If the attribute has more than 8 extents, there will be additional -+ records (of type HFSPlusAttrExtents) for this attribute. -+*/ -+struct HFSPlusAttrForkData { -+ u_int32_t recordType; /* == kHFSPlusAttrForkData*/ -+ u_int32_t reserved; -+ HFSPlusForkData theFork; /* size and first extents of value*/ -+}PACKED_S; -+typedef struct HFSPlusAttrForkData HFSPlusAttrForkData; -+ -+/* -+ HFSPlusAttrExtents -+ This record contains information about overflow extents for large, -+ fragmented attributes. -+*/ -+struct HFSPlusAttrExtents { -+ u_int32_t recordType; /* == kHFSPlusAttrExtents*/ -+ u_int32_t reserved; -+ HFSPlusExtentRecord extents; /* additional extents*/ -+}PACKED_S; -+typedef struct HFSPlusAttrExtents HFSPlusAttrExtents; -+ -+/* -+ * Atrributes B-tree Data Record -+ * -+ * For small attributes, whose entire value is stored -+ * within a single B-tree record. -+ */ -+struct HFSPlusAttrData { -+ u_int32_t recordType; /* == kHFSPlusAttrInlineData */ -+ u_int32_t reserved[2]; -+ u_int32_t attrSize; /* size of attribute data in bytes */ -+ u_int8_t attrData[2]; /* variable length */ -+}PACKED_S; -+typedef struct HFSPlusAttrData HFSPlusAttrData; -+ -+ -+/* HFSPlusAttrInlineData is obsolete use HFSPlusAttrData instead */ -+struct HFSPlusAttrInlineData { -+ u_int32_t recordType; -+ u_int32_t reserved; -+ u_int32_t logicalSize; -+ u_int8_t userData[2]; -+}PACKED_S; -+typedef struct HFSPlusAttrInlineData HFSPlusAttrInlineData; -+ -+ -+/* A generic Attribute Record*/ -+union HFSPlusAttrRecord { -+ u_int32_t recordType; -+ HFSPlusAttrInlineData inlineData; /* NOT USED */ -+ HFSPlusAttrData attrData; -+ HFSPlusAttrForkData forkData; -+ HFSPlusAttrExtents overflowExtents; -+}PACKED_S; -+typedef union HFSPlusAttrRecord HFSPlusAttrRecord; -+ -+/* Attribute key */ -+enum { kHFSMaxAttrNameLen = 127 }; -+struct HFSPlusAttrKey { -+ u_int16_t keyLength; /* key length (in bytes) */ -+ u_int16_t pad; /* set to zero */ -+ u_int32_t fileID; /* file associated with attribute */ -+ u_int32_t startBlock; /* first attribue allocation block number for extents */ -+ u_int16_t attrNameLen; /* number of unicode characters */ -+ u_int16_t attrName[127]; /* attribute name (Unicode) */ -+}PACKED_S; -+typedef struct HFSPlusAttrKey HFSPlusAttrKey; -+ -+#define kHFSPlusAttrKeyMaximumLength (sizeof(HFSPlusAttrKey) - sizeof(u_int16_t)) -+#define kHFSPlusAttrKeyMinimumLength (kHFSPlusAttrKeyMaximumLength - (127 * sizeof(u_int16_t))) -+ -+#endif /* __APPLE_API_UNSTABLE */ -+ -+ -+/* Key and node lengths */ -+enum { -+ kHFSPlusExtentKeyMaximumLength = sizeof(HFSPlusExtentKey) - sizeof(u_int16_t), -+ kHFSExtentKeyMaximumLength = sizeof(HFSExtentKey) - sizeof(u_int8_t), -+ kHFSPlusCatalogKeyMaximumLength = sizeof(HFSPlusCatalogKey) - sizeof(u_int16_t), -+ kHFSPlusCatalogKeyMinimumLength = kHFSPlusCatalogKeyMaximumLength - sizeof(HFSUniStr255) + sizeof(u_int16_t), -+ kHFSCatalogKeyMaximumLength = sizeof(HFSCatalogKey) - sizeof(u_int8_t), -+ kHFSCatalogKeyMinimumLength = kHFSCatalogKeyMaximumLength - (kHFSMaxFileNameChars + 1) + sizeof(u_int8_t), -+ kHFSPlusCatalogMinNodeSize = 4096, -+ kHFSPlusExtentMinNodeSize = 512, -+ kHFSPlusAttrMinNodeSize = 4096 -+}PACKED_S; -+ -+/* HFS and HFS Plus volume attribute bits */ -+enum { -+ /* Bits 0-6 are reserved (always cleared by MountVol call) */ -+ kHFSVolumeHardwareLockBit = 7, /* volume is locked by hardware */ -+ kHFSVolumeUnmountedBit = 8, /* volume was successfully unmounted */ -+ kHFSVolumeSparedBlocksBit = 9, /* volume has bad blocks spared */ -+ kHFSVolumeNoCacheRequiredBit = 10, /* don't cache volume blocks (i.e. RAM or ROM disk) */ -+ kHFSBootVolumeInconsistentBit = 11, /* boot volume is inconsistent (System 7.6 and later) */ -+ kHFSCatalogNodeIDsReusedBit = 12, -+ kHFSVolumeJournaledBit = 13, /* this volume has a journal on it */ -+ kHFSVolumeInconsistentBit = 14, /* serious inconsistencies detected at runtime */ -+ kHFSVolumeSoftwareLockBit = 15, /* volume is locked by software */ -+ -+ kHFSVolumeHardwareLockMask = 1 << kHFSVolumeHardwareLockBit, -+ kHFSVolumeUnmountedMask = 1 << kHFSVolumeUnmountedBit, -+ kHFSVolumeSparedBlocksMask = 1 << kHFSVolumeSparedBlocksBit, -+ kHFSVolumeNoCacheRequiredMask = 1 << kHFSVolumeNoCacheRequiredBit, -+ kHFSBootVolumeInconsistentMask = 1 << kHFSBootVolumeInconsistentBit, -+ kHFSCatalogNodeIDsReusedMask = 1 << kHFSCatalogNodeIDsReusedBit, -+ kHFSVolumeJournaledMask = 1 << kHFSVolumeJournaledBit, -+ kHFSVolumeInconsistentMask = 1 << kHFSVolumeInconsistentBit, -+ kHFSVolumeSoftwareLockMask = 1 << kHFSVolumeSoftwareLockBit, -+ kHFSMDBAttributesMask = 0x8380 -+}PACKED_S; -+ -+ -+/* HFS Master Directory Block - 162 bytes */ -+/* Stored at sector #2 (3rd sector) and second-to-last sector. */ -+struct HFSMasterDirectoryBlock { -+ u_int16_t drSigWord; /* == kHFSSigWord */ -+ u_int32_t drCrDate; /* date and time of volume creation */ -+ u_int32_t drLsMod; /* date and time of last modification */ -+ u_int16_t drAtrb; /* volume attributes */ -+ u_int16_t drNmFls; /* number of files in root folder */ -+ u_int16_t drVBMSt; /* first block of volume bitmap */ -+ u_int16_t drAllocPtr; /* start of next allocation search */ -+ u_int16_t drNmAlBlks; /* number of allocation blocks in volume */ -+ u_int32_t drAlBlkSiz; /* size (in bytes) of allocation blocks */ -+ u_int32_t drClpSiz; /* default clump size */ -+ u_int16_t drAlBlSt; /* first allocation block in volume */ -+ u_int32_t drNxtCNID; /* next unused catalog node ID */ -+ u_int16_t drFreeBks; /* number of unused allocation blocks */ -+ u_int8_t drVN[kHFSMaxVolumeNameChars + 1]; /* volume name */ -+ u_int32_t drVolBkUp; /* date and time of last backup */ -+ u_int16_t drVSeqNum; /* volume backup sequence number */ -+ u_int32_t drWrCnt; /* volume write count */ -+ u_int32_t drXTClpSiz; /* clump size for extents overflow file */ -+ u_int32_t drCTClpSiz; /* clump size for catalog file */ -+ u_int16_t drNmRtDirs; /* number of directories in root folder */ -+ u_int32_t drFilCnt; /* number of files in volume */ -+ u_int32_t drDirCnt; /* number of directories in volume */ -+ u_int32_t drFndrInfo[8]; /* information used by the Finder */ -+ u_int16_t drEmbedSigWord; /* embedded volume signature (formerly drVCSize) */ -+ HFSExtentDescriptor drEmbedExtent; /* embedded volume location and size (formerly drVBMCSize and drCtlCSize) */ -+ u_int32_t drXTFlSize; /* size of extents overflow file */ -+ HFSExtentRecord drXTExtRec; /* extent record for extents overflow file */ -+ u_int32_t drCTFlSize; /* size of catalog file */ -+ HFSExtentRecord drCTExtRec; /* extent record for catalog file */ -+}PACKED_S; -+typedef struct HFSMasterDirectoryBlock HFSMasterDirectoryBlock; -+ -+ -+#ifdef __APPLE_API_UNSTABLE -+#define SET_HFS_TEXT_ENCODING(hint) \ -+ (0x656e6300 | ((hint) & 0xff)) -+#define GET_HFS_TEXT_ENCODING(hint) \ -+ (((hint) & 0xffffff00) == 0x656e6300 ? (hint) & 0x000000ff : 0xffffffffU) -+#endif /* __APPLE_API_UNSTABLE */ -+ -+ -+/* HFS Plus Volume Header - 512 bytes */ -+/* Stored at sector #2 (3rd sector) and second-to-last sector. */ -+struct HFSPlusVolumeHeader { -+ u_int16_t signature; /* == kHFSPlusSigWord */ -+ u_int16_t version; /* == kHFSPlusVersion */ -+ u_int32_t attributes; /* volume attributes */ -+ u_int32_t lastMountedVersion; /* implementation version which last mounted volume */ -+ u_int32_t journalInfoBlock; /* block addr of journal info (if volume is journaled, zero otherwise) */ -+ -+ u_int32_t createDate; /* date and time of volume creation */ -+ u_int32_t modifyDate; /* date and time of last modification */ -+ u_int32_t backupDate; /* date and time of last backup */ -+ u_int32_t checkedDate; /* date and time of last disk check */ -+ -+ u_int32_t fileCount; /* number of files in volume */ -+ u_int32_t folderCount; /* number of directories in volume */ -+ -+ u_int32_t blockSize; /* size (in bytes) of allocation blocks */ -+ u_int32_t totalBlocks; /* number of allocation blocks in volume (includes this header and VBM*/ -+ u_int32_t freeBlocks; /* number of unused allocation blocks */ -+ -+ u_int32_t nextAllocation; /* start of next allocation search */ -+ u_int32_t rsrcClumpSize; /* default resource fork clump size */ -+ u_int32_t dataClumpSize; /* default data fork clump size */ -+ u_int32_t nextCatalogID; /* next unused catalog node ID */ -+ -+ u_int32_t writeCount; /* volume write count */ -+ u_int64_t encodingsBitmap; /* which encodings have been use on this volume */ -+ -+ u_int8_t finderInfo[32]; /* information used by the Finder */ -+ -+ HFSPlusForkData allocationFile; /* allocation bitmap file */ -+ HFSPlusForkData extentsFile; /* extents B-tree file */ -+ HFSPlusForkData catalogFile; /* catalog B-tree file */ -+ HFSPlusForkData attributesFile; /* extended attributes B-tree file */ -+ HFSPlusForkData startupFile; /* boot file (secondary loader) */ -+}PACKED_S; -+typedef struct HFSPlusVolumeHeader HFSPlusVolumeHeader; -+ -+ -+/* B-tree structures */ -+ -+enum BTreeKeyLimits{ -+ kMaxKeyLength = 520 -+}PACKED_S; -+ -+union BTreeKey{ -+ u_int8_t length8; -+ u_int16_t length16; -+ u_int8_t rawData [kMaxKeyLength+2]; -+}PACKED_S; -+typedef union BTreeKey BTreeKey; -+ -+/* BTNodeDescriptor -- Every B-tree node starts with these fields. */ -+struct BTNodeDescriptor { -+ u_int32_t fLink; /* next node at this level*/ -+ u_int32_t bLink; /* previous node at this level*/ -+ int8_t kind; /* kind of node (leaf, index, header, map)*/ -+ u_int8_t height; /* zero for header, map; child is one more than parent*/ -+ u_int16_t numRecords; /* number of records in this node*/ -+ u_int16_t reserved; /* reserved - initialized as zero */ -+}PACKED_S; -+typedef struct BTNodeDescriptor BTNodeDescriptor; -+ -+/* Constants for BTNodeDescriptor kind */ -+enum { -+ kBTLeafNode = -1, -+ kBTIndexNode = 0, -+ kBTHeaderNode = 1, -+ kBTMapNode = 2 -+}PACKED_S; -+ -+/* BTHeaderRec -- The first record of a B-tree header node */ -+struct BTHeaderRec { -+ u_int16_t treeDepth; /* maximum height (usually leaf nodes) */ -+ u_int32_t rootNode; /* node number of root node */ -+ u_int32_t leafRecords; /* number of leaf records in all leaf nodes */ -+ u_int32_t firstLeafNode; /* node number of first leaf node */ -+ u_int32_t lastLeafNode; /* node number of last leaf node */ -+ u_int16_t nodeSize; /* size of a node, in bytes */ -+ u_int16_t maxKeyLength; /* reserved */ -+ u_int32_t totalNodes; /* total number of nodes in tree */ -+ u_int32_t freeNodes; /* number of unused (free) nodes in tree */ -+ u_int16_t reserved1; /* unused */ -+ u_int32_t clumpSize; /* reserved */ -+ u_int8_t btreeType; /* reserved */ -+ u_int8_t keyCompareType; /* Key string Comparison Type */ -+ u_int32_t attributes; /* persistent attributes about the tree */ -+ u_int32_t reserved3[16]; /* reserved */ -+}PACKED_S; -+typedef struct BTHeaderRec BTHeaderRec; -+ -+/* Constants for BTHeaderRec attributes */ -+enum { -+ kBTBadCloseMask = 0x00000001, /* reserved */ -+ kBTBigKeysMask = 0x00000002, /* key length field is 16 bits */ -+ kBTVariableIndexKeysMask = 0x00000004 /* keys in index nodes are variable length */ -+}PACKED_S; -+ -+ -+/* Catalog Key Name Comparison Type */ -+enum { -+ kHFSCaseFolding = 0xCF, /* case folding (case-insensitive) */ -+ kHFSBinaryCompare = 0xBC /* binary compare (case-sensitive) */ -+}PACKED_S; -+ -+/* JournalInfoBlock - Structure that describes where our journal lives */ -+struct JournalInfoBlock { -+ u_int32_t flags; -+ u_int32_t device_signature[8]; // signature used to locate our device. -+ u_int64_t offset; // byte offset to the journal on the device -+ u_int64_t size; // size in bytes of the journal -+ u_int32_t reserved[32]; -+}PACKED_S; -+typedef struct JournalInfoBlock JournalInfoBlock; -+ -+enum { -+ kJIJournalInFSMask = 0x00000001, -+ kJIJournalOnOtherDeviceMask = 0x00000002, -+ kJIJournalNeedInitMask = 0x00000004 -+}PACKED_S; -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* __HFS_FORMAT__ */ -diff --git a/include/hfs/hfs_mount.h b/include/hfs/hfs_mount.h -new file mode 100644 -index 0000000..ad729f2 ---- /dev/null -+++ b/include/hfs/hfs_mount.h -@@ -0,0 +1,78 @@ -+/* -+ * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. -+ * -+ * @APPLE_LICENSE_HEADER_START@ -+ * -+ * The contents of this file constitute Original Code as defined in and -+ * are subject to the Apple Public Source License Version 1.1 (the -+ * "License"). You may not use this file except in compliance with the -+ * License. Please obtain a copy of the License at -+ * http://www.apple.com/publicsource and read it before using this file. -+ * -+ * This Original Code and all software distributed under the License are -+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER -+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the -+ * License for the specific language governing rights and limitations -+ * under the License. -+ * -+ * @APPLE_LICENSE_HEADER_END@ -+ */ -+/* -+ * Copyright (c) 1997-2002 Apple Computer, Inc. All Rights Reserved -+ * -+ */ -+ -+#ifndef _HFS_MOUNT_H_ -+#define _HFS_MOUNT_H_ -+ -+#include -+ -+#include -+#include -+ -+/* -+ * Arguments to mount HFS-based filesystems -+ */ -+ -+#define OVERRIDE_UNKNOWN_PERMISSIONS 0 -+ -+#define UNKNOWNUID ((uid_t)99) -+#define UNKNOWNGID ((gid_t)99) -+#define UNKNOWNPERMISSIONS (S_IRWXU | S_IROTH | S_IXOTH) /* 705 */ -+ -+#ifdef __APPLE_API_UNSTABLE -+struct hfs_mount_args { -+#ifndef KERNEL -+ char *fspec; /* block special device to mount */ -+#endif -+ uid_t hfs_uid; /* uid that owns hfs files (standard HFS only) */ -+ gid_t hfs_gid; /* gid that owns hfs files (standard HFS only) */ -+ mode_t hfs_mask; /* mask to be applied for hfs perms (standard HFS only) */ -+ u_int32_t hfs_encoding; /* encoding for this volume (standard HFS only) */ -+ struct timezone hfs_timezone; /* user time zone info (standard HFS only) */ -+ int flags; /* mounting flags, see below */ -+ int journal_tbuffer_size; /* size in bytes of the journal transaction buffer */ -+ int journal_flags; /* flags to pass to journal_open/create */ -+ int journal_disable; /* don't use journaling (potentially dangerous) */ -+}; -+ -+#define HFSFSMNT_NOXONFILES 0x1 /* disable execute permissions for files */ -+#define HFSFSMNT_WRAPPER 0x2 /* mount HFS wrapper (if it exists) */ -+#define HFSFSMNT_EXTENDED_ARGS 0x4 /* indicates new fields after "flags" are valid */ -+ -+/* -+ * Sysctl values for HFS -+ */ -+#define HFS_ENCODINGBIAS 1 /* encoding matching CJK bias */ -+#define HFS_EXTEND_FS 2 -+#define HFS_ENCODINGHINT 3 /* guess encoding for string */ -+#define HFS_ENABLE_JOURNALING 0x082969 -+#define HFS_DISABLE_JOURNALING 0x031272 -+#define HFS_GET_JOURNAL_INFO 0x6a6e6c69 -+#define HFS_SET_PKG_EXTENSIONS 0x121031 -+ -+#endif /* __APPLE_API_UNSTABLE */ -+ -+#endif /* ! _HFS_MOUNT_H_ */ -diff --git a/include/sys/appleapiopts.h b/include/sys/appleapiopts.h -new file mode 100644 -index 0000000..4d2061f ---- /dev/null -+++ b/include/sys/appleapiopts.h -@@ -0,0 +1,52 @@ -+/* -+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. -+ * -+ * @APPLE_LICENSE_HEADER_START@ -+ * -+ * The contents of this file constitute Original Code as defined in and -+ * are subject to the Apple Public Source License Version 1.1 (the -+ * "License"). You may not use this file except in compliance with the -+ * License. Please obtain a copy of the License at -+ * http://www.apple.com/publicsource and read it before using this file. -+ * -+ * This Original Code and all software distributed under the License are -+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER -+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the -+ * License for the specific language governing rights and limitations -+ * under the License. -+ * -+ * @APPLE_LICENSE_HEADER_END@ -+ */ -+ -+#ifndef __SYS_APPLEAPIOPTS_H__ -+#define __SYS_APPLEAPIOPTS_H__ -+ -+ -+#ifndef __APPLE_API_STANDARD -+#define __APPLE_API_STANDARD -+#endif /* __APPLE_API_STANDARD */ -+ -+#ifndef __APPLE_API_STABLE -+#define __APPLE_API_STABLE -+#endif /* __APPLE_API_STABLE */ -+ -+#ifndef __APPLE_API_STRICT_CONFORMANCE -+ -+#ifndef __APPLE_API_EVOLVING -+#define __APPLE_API_EVOLVING -+#endif /* __APPLE_API_EVOLVING */ -+ -+#ifndef __APPLE_API_UNSTABLE -+#define __APPLE_API_UNSTABLE -+#endif /* __APPLE_API_UNSTABLE */ -+ -+#ifndef __APPLE_API_OBSOLETE -+#define __APPLE_API_OBSOLETE -+#endif /* __APPLE_API_OBSOLETE */ -+ -+#endif /* __APPLE_API_STRICT_CONFORMANCE */ -+ -+#endif /* __SYS_APPLEAPIOPTS_H__ */ -+ diff --git a/utils/hfsprogs/patches/0004-Fix-compilation-on-64-bit-arches.patch b/utils/hfsprogs/patches/0004-Fix-compilation-on-64-bit-arches.patch deleted file mode 100644 index 57f6011..0000000 --- a/utils/hfsprogs/patches/0004-Fix-compilation-on-64-bit-arches.patch +++ /dev/null @@ -1,131 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Fix compilation on 64-bit arches - ---- - fsck_hfs.tproj/dfalib/BTreePrivate.h | 5 ++++- - fsck_hfs.tproj/dfalib/SControl.c | 8 ++++---- - fsck_hfs.tproj/dfalib/SVerify1.c | 14 +++++++------- - fsck_hfs.tproj/dfalib/hfs_endian.c | 2 +- - 4 files changed, 16 insertions(+), 13 deletions(-) - -diff --git a/fsck_hfs.tproj/dfalib/BTreePrivate.h b/fsck_hfs.tproj/dfalib/BTreePrivate.h -index 058c75b..2fc2f28 100644 ---- a/fsck_hfs.tproj/dfalib/BTreePrivate.h -+++ b/fsck_hfs.tproj/dfalib/BTreePrivate.h -@@ -104,6 +104,9 @@ typedef enum { - - ///////////////////////////////////// Types ///////////////////////////////////// - -+// Forward declaration from Scavenger.h -+struct BTreeExtensionsRec; -+ - typedef struct BTreeControlBlock { // fields specific to BTree CBs - - UInt8 keyCompareType; /* Key string Comparison Type */ -@@ -144,7 +147,7 @@ typedef struct BTreeControlBlock { // fields specific to BTree CBs - UInt32 numPossibleHints; // Looks like a formated hint - UInt32 numValidHints; // Hint used to find correct record. - -- UInt32 refCon; // Used by DFA to point to private data. -+ struct BTreeExtensionsRec *refCon; // Used by DFA to point to private data. - SFCB *fcbPtr; // fcb of btree file - - } BTreeControlBlock, *BTreeControlBlockPtr; -diff --git a/fsck_hfs.tproj/dfalib/SControl.c b/fsck_hfs.tproj/dfalib/SControl.c -index 37eb242..4ce9e16 100644 ---- a/fsck_hfs.tproj/dfalib/SControl.c -+++ b/fsck_hfs.tproj/dfalib/SControl.c -@@ -1034,7 +1034,7 @@ static int ScavTerm( SGlobPtr GPtr ) - btcbP = (BTreeControlBlock*)fcbP->fcbBtree; - if ( btcbP != nil) - { -- if( btcbP->refCon != (UInt32)nil ) -+ if( btcbP->refCon != nil ) - { - if(((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr != nil) - { -@@ -1043,13 +1043,13 @@ static int ScavTerm( SGlobPtr GPtr ) - } - DisposeMemory( (Ptr)btcbP->refCon ); - err = MemError(); -- btcbP->refCon = (UInt32)nil; -+ btcbP->refCon = nil; - } - - fcbP = GPtr->calculatedCatalogFCB; // release catalog BTree bit map - btcbP = (BTreeControlBlock*)fcbP->fcbBtree; - -- if( btcbP->refCon != (UInt32)nil ) -+ if( btcbP->refCon != nil ) - { - if(((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr != nil) - { -@@ -1058,7 +1058,7 @@ static int ScavTerm( SGlobPtr GPtr ) - } - DisposeMemory( (Ptr)btcbP->refCon ); - err = MemError(); -- btcbP->refCon = (UInt32)nil; -+ btcbP->refCon = nil; - } - } - } -diff --git a/fsck_hfs.tproj/dfalib/SVerify1.c b/fsck_hfs.tproj/dfalib/SVerify1.c -index c272d4d..a273bf3 100644 ---- a/fsck_hfs.tproj/dfalib/SVerify1.c -+++ b/fsck_hfs.tproj/dfalib/SVerify1.c -@@ -789,8 +789,8 @@ OSErr CreateExtentsBTreeControlBlock( SGlobPtr GPtr ) - // - // set up our DFA extended BTCB area. Will we have enough memory on all HFS+ volumes. - // -- btcb->refCon = (UInt32) AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -- if ( btcb->refCon == (UInt32) nil ) { -+ btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -+ if ( btcb->refCon == nil ) { - err = R_NoMem; - goto exit; - } -@@ -1144,8 +1144,8 @@ OSErr CreateCatalogBTreeControlBlock( SGlobPtr GPtr ) - // set up our DFA extended BTCB area. Will we have enough memory on all HFS+ volumes. - // - -- btcb->refCon = (UInt32) AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -- if ( btcb->refCon == (UInt32)nil ) { -+ btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -+ if ( btcb->refCon == nil ) { - err = R_NoMem; - goto exit; - } -@@ -1779,8 +1779,8 @@ OSErr CreateAttributesBTreeControlBlock( SGlobPtr GPtr ) - // - // set up our DFA extended BTCB area. Will we have enough memory on all HFS+ volumes. - // -- btcb->refCon = (UInt32) AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -- if ( btcb->refCon == (UInt32)nil ) { -+ btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -+ if ( btcb->refCon == nil ) { - err = R_NoMem; - goto exit; - } -@@ -1793,7 +1793,7 @@ OSErr CreateAttributesBTreeControlBlock( SGlobPtr GPtr ) - } - else - { -- if ( btcb->refCon == (UInt32)nil ) { -+ if ( btcb->refCon == nil ) { - err = R_NoMem; - goto exit; - } -diff --git a/fsck_hfs.tproj/dfalib/hfs_endian.c b/fsck_hfs.tproj/dfalib/hfs_endian.c -index 69500c1..3cc9eb4 100755 ---- a/fsck_hfs.tproj/dfalib/hfs_endian.c -+++ b/fsck_hfs.tproj/dfalib/hfs_endian.c -@@ -437,7 +437,7 @@ hfs_swap_HFSPlusBTInternalNode ( - BTNodeDescriptor *srcDesc = src->buffer; - UInt16 *srcOffs = (UInt16 *)((char *)src->buffer + (src->blockSize - (srcDesc->numRecords * sizeof (UInt16)))); - char *nextRecord; /* Points to start of record following current one */ -- UInt32 i; -+ int i; - UInt32 j; - - if (fileID == kHFSExtentsFileID) { diff --git a/utils/hfsprogs/patches/0005-Remove-Apple-specific-p-from-strings.patch b/utils/hfsprogs/patches/0005-Remove-Apple-specific-p-from-strings.patch deleted file mode 100644 index 318fd60..0000000 --- a/utils/hfsprogs/patches/0005-Remove-Apple-specific-p-from-strings.patch +++ /dev/null @@ -1,291 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Remove (Apple-specific?) \p from strings - -Modify the way that debug messages are sent to the user, by eliminating one -character of them. ---- - fsck_hfs.tproj/dfalib/BTreeTreeOps.c | 48 ++++++++++++++++++------------------ - fsck_hfs.tproj/dfalib/SBTree.c | 14 +++++------ - 2 files changed, 31 insertions(+), 31 deletions(-) - -diff --git a/fsck_hfs.tproj/dfalib/BTreeTreeOps.c b/fsck_hfs.tproj/dfalib/BTreeTreeOps.c -index b812b14..37fb170 100644 ---- a/fsck_hfs.tproj/dfalib/BTreeTreeOps.c -+++ b/fsck_hfs.tproj/dfalib/BTreeTreeOps.c -@@ -223,7 +223,7 @@ OSStatus SearchTree (BTreeControlBlockPtr btreePtr, - // - if (curNodeNum == 0) - { --// Panic("\pSearchTree: curNodeNum is zero!"); -+ Panic("SearchTree: curNodeNum is zero!"); - err = fsBTInvalidNodeErr; - goto ErrorExit; - } -@@ -433,7 +433,7 @@ OSStatus InsertLevel (BTreeControlBlockPtr btreePtr, - M_ExitOnError (err); - - if ( DEBUG_BUILD && updateParent && newRoot ) -- DebugStr("\p InsertLevel: New root from primary key, update from secondary key..."); -+ DebugStr("InsertLevel: New root from primary key, update from secondary key..."); - } - - //////////////////////// Update Parent(s) /////////////////////////////// -@@ -448,7 +448,7 @@ OSStatus InsertLevel (BTreeControlBlockPtr btreePtr, - - secondaryKey = nil; - -- PanicIf ( (level == btreePtr->treeDepth), "\p InsertLevel: unfinished insert!?"); -+ PanicIf ( (level == btreePtr->treeDepth), "InsertLevel: unfinished insert!?"); - - ++level; - -@@ -456,7 +456,7 @@ OSStatus InsertLevel (BTreeControlBlockPtr btreePtr, - index = treePathTable [level].index; - parentNodeNum = treePathTable [level].node; - -- PanicIf ( parentNodeNum == 0, "\p InsertLevel: parent node is zero!?"); -+ PanicIf ( parentNodeNum == 0, "InsertLevel: parent node is zero!?"); - - err = GetNode (btreePtr, parentNodeNum, &parentNode); // released as target node in next level up - M_ExitOnError (err); -@@ -470,7 +470,7 @@ OSStatus InsertLevel (BTreeControlBlockPtr btreePtr, - { - //¥¥Êdebug: check if ptr == targetNodeNum - GetRecordByIndex (btreePtr, parentNode.buffer, index, &keyPtr, &recPtr, &recSize); -- PanicIf( (*(UInt32 *) recPtr) != targetNodeNum, "\p InsertLevel: parent ptr doesn't match target node!"); -+ PanicIf( (*(UInt32 *) recPtr) != targetNodeNum, "InsertLevel: parent ptr doesn't match target node!"); - - // need to delete and re-insert this parent key/ptr - // we delete it here and it gets re-inserted in the -@@ -532,7 +532,7 @@ ErrorExit: - (void) ReleaseNode (btreePtr, targetNode); - (void) ReleaseNode (btreePtr, &siblingNode); - -- Panic ("\p InsertLevel: an error occured!"); -+ Panic ("InsertLevel: an error occured!"); - - return err; - -@@ -566,7 +566,7 @@ static OSErr InsertNode (BTreeControlBlockPtr btreePtr, - - *rootSplit = false; - -- PanicIf ( targetNode->buffer == siblingNode->buffer, "\p InsertNode: targetNode == siblingNode, huh?"); -+ PanicIf ( targetNode->buffer == siblingNode->buffer, "InsertNode: targetNode == siblingNode, huh?"); - - leftNodeNum = ((NodeDescPtr) targetNode->buffer)->bLink; - rightNodeNum = ((NodeDescPtr) targetNode->buffer)->fLink; -@@ -606,7 +606,7 @@ static OSErr InsertNode (BTreeControlBlockPtr btreePtr, - - if ( leftNodeNum > 0 ) - { -- PanicIf ( siblingNode->buffer != nil, "\p InsertNode: siblingNode already aquired!"); -+ PanicIf ( siblingNode->buffer != nil, "InsertNode: siblingNode already aquired!"); - - if ( siblingNode->buffer == nil ) - { -@@ -614,7 +614,7 @@ static OSErr InsertNode (BTreeControlBlockPtr btreePtr, - M_ExitOnError (err); - } - -- PanicIf ( ((NodeDescPtr) siblingNode->buffer)->fLink != nodeNum, "\p InsertNode, RotateLeft: invalid sibling link!" ); -+ PanicIf ( ((NodeDescPtr) siblingNode->buffer)->fLink != nodeNum, "InsertNode, RotateLeft: invalid sibling link!" ); - - if ( !key->skipRotate ) // are rotates allowed? - { -@@ -703,7 +703,7 @@ OSStatus DeleteTree (BTreeControlBlockPtr btreePtr, - - targetNodeNum = treePathTable[level].node; - targetNodePtr = targetNode->buffer; -- PanicIf (targetNodePtr == nil, "\pDeleteTree: targetNode has nil buffer!"); -+ PanicIf (targetNodePtr == nil, "DeleteTree: targetNode has nil buffer!"); - - DeleteRecord (btreePtr, targetNodePtr, index); - -@@ -797,7 +797,7 @@ OSStatus DeleteTree (BTreeControlBlockPtr btreePtr, - - //¥¥Êdebug: check if ptr == targetNodeNum - GetRecordByIndex (btreePtr, parentNode.buffer, index, &keyPtr, &recPtr, &recSize); -- PanicIf( (*(UInt32 *) recPtr) != targetNodeNum, "\p DeleteTree: parent ptr doesn't match targetNodeNum!!"); -+ PanicIf( (*(UInt32 *) recPtr) != targetNodeNum, " DeleteTree: parent ptr doesn't match targetNodeNum!!"); - - // need to delete and re-insert this parent key/ptr - DeleteRecord (btreePtr, parentNode.buffer, index); -@@ -1018,7 +1018,7 @@ static OSStatus RotateLeft (BTreeControlBlockPtr btreePtr, - keyPtr, keyLength, recPtr, recSize); - if ( !didItFit ) - { -- Panic ("\pRotateLeft: InsertKeyRecord (left) returned false!"); -+ Panic ("RotateLeft: InsertKeyRecord (left) returned false!"); - err = fsBTBadRotateErr; - goto ErrorExit; - } -@@ -1031,7 +1031,7 @@ static OSStatus RotateLeft (BTreeControlBlockPtr btreePtr, - didItFit = RotateRecordLeft (btreePtr, leftNode, rightNode); - if ( !didItFit ) - { -- Panic ("\pRotateLeft: RotateRecordLeft returned false!"); -+ Panic ("RotateLeft: RotateRecordLeft returned false!"); - err = fsBTBadRotateErr; - goto ErrorExit; - } -@@ -1048,7 +1048,7 @@ static OSStatus RotateLeft (BTreeControlBlockPtr btreePtr, - keyPtr, keyLength, recPtr, recSize); - if ( !didItFit ) - { -- Panic ("\pRotateLeft: InsertKeyRecord (right) returned false!"); -+ Panic ("RotateLeft: InsertKeyRecord (right) returned false!"); - err = fsBTBadRotateErr; - goto ErrorExit; - } -@@ -1117,7 +1117,7 @@ static OSStatus SplitLeft (BTreeControlBlockPtr btreePtr, - right = rightNode->buffer; - left = leftNode->buffer; - -- PanicIf ( right->bLink != 0 && left == 0, "\p SplitLeft: left sibling missing!?" ); -+ PanicIf ( right->bLink != 0 && left == 0, " SplitLeft: left sibling missing!?" ); - - //¥¥ type should be kLeafNode or kIndexNode - -@@ -1240,8 +1240,8 @@ static OSStatus AddNewRootNode (BTreeControlBlockPtr btreePtr, - Boolean didItFit; - UInt16 keyLength; - -- PanicIf (leftNode == nil, "\pAddNewRootNode: leftNode == nil"); -- PanicIf (rightNode == nil, "\pAddNewRootNode: rightNode == nil"); -+ PanicIf (leftNode == nil, "AddNewRootNode: leftNode == nil"); -+ PanicIf (rightNode == nil, "AddNewRootNode: rightNode == nil"); - - - /////////////////////// Initialize New Root Node //////////////////////////// -@@ -1264,7 +1264,7 @@ static OSStatus AddNewRootNode (BTreeControlBlockPtr btreePtr, - didItFit = InsertKeyRecord ( btreePtr, rootNode.buffer, 0, keyPtr, keyLength, - (UInt8 *) &rightNode->bLink, 4 ); - -- PanicIf ( !didItFit, "\pAddNewRootNode:InsertKeyRecord failed for left index record"); -+ PanicIf ( !didItFit, "AddNewRootNode:InsertKeyRecord failed for left index record"); - - - //////////////////// Insert Right Node Index Record ///////////////////////// -@@ -1275,7 +1275,7 @@ static OSStatus AddNewRootNode (BTreeControlBlockPtr btreePtr, - didItFit = InsertKeyRecord ( btreePtr, rootNode.buffer, 1, keyPtr, keyLength, - (UInt8 *) &leftNode->fLink, 4 ); - -- PanicIf ( !didItFit, "\pAddNewRootNode:InsertKeyRecord failed for right index record"); -+ PanicIf ( !didItFit, "AddNewRootNode:InsertKeyRecord failed for right index record"); - - - #if DEBUG_TREEOPS -@@ -1355,7 +1355,7 @@ static OSStatus SplitRight (BTreeControlBlockPtr btreePtr, - } - rightPtr = rightNodePtr->buffer; - -- PanicIf ( leftPtr->fLink != 0 && rightPtr == 0, "\p SplitRight: right sibling missing!?" ); -+ PanicIf ( leftPtr->fLink != 0 && rightPtr == 0, "SplitRight: right sibling missing!?" ); - - //¥¥ type should be kLeafNode or kIndexNode - -@@ -1557,7 +1557,7 @@ static OSStatus RotateRight (BTreeControlBlockPtr btreePtr, - keyPtr, keyLength, recPtr, recSize); - if ( !didItFit ) - { -- Panic ("\pRotateRight: InsertKeyRecord (left) returned false!"); -+ Panic ("RotateRight: InsertKeyRecord (left) returned false!"); - err = fsBTBadRotateErr; - goto ErrorExit; - } -@@ -1572,7 +1572,7 @@ static OSStatus RotateRight (BTreeControlBlockPtr btreePtr, - didItFit = RotateRecordRight( btreePtr, leftNodePtr, rightNodePtr ); - if ( !didItFit ) - { -- Panic ("\pRotateRight: RotateRecordRight returned false!"); -+ Panic ("RotateRight: RotateRecordRight returned false!"); - err = fsBTBadRotateErr; - goto ErrorExit; - } -@@ -1583,7 +1583,7 @@ static OSStatus RotateRight (BTreeControlBlockPtr btreePtr, - keyPtr, keyLength, recPtr, recSize); - if ( !didItFit ) - { -- Panic ("\pRotateRight: InsertKeyRecord (left) returned false!"); -+ Panic ("RotateRight: InsertKeyRecord (left) returned false!"); - err = fsBTBadRotateErr; - goto ErrorExit; - } -@@ -1607,7 +1607,7 @@ static OSStatus RotateRight (BTreeControlBlockPtr btreePtr, - keyPtr, keyLength, recPtr, recSize); - if ( !didItFit ) - { -- Panic ("\pRotateRight: InsertKeyRecord (right) returned false!"); -+ Panic ("RotateRight: InsertKeyRecord (right) returned false!"); - err = fsBTBadRotateErr; - goto ErrorExit; - } -diff --git a/fsck_hfs.tproj/dfalib/SBTree.c b/fsck_hfs.tproj/dfalib/SBTree.c -index cd81b13..eeb4e8c 100644 ---- a/fsck_hfs.tproj/dfalib/SBTree.c -+++ b/fsck_hfs.tproj/dfalib/SBTree.c -@@ -103,7 +103,7 @@ OSErr SearchBTreeRecord(SFCB *fcb, const void* key, UInt32 hint, void* foundKey, - CopyMemory(&resultIterator->key, foundKey, CalcKeySize(btcb, &resultIterator->key)); //¥¥ warning, this could overflow user's buffer!!! - - if ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, *dataSize) ) -- DebugStr("\pSearchBTreeRecord: bad record?"); -+ DebugStr("SearchBTreeRecord: bad record?"); - } - - ErrorExit: -@@ -211,7 +211,7 @@ OSErr GetBTreeRecord(SFCB *fcb, SInt16 selectionIndex, void* key, void* data, UI - CopyMemory(&iterator->key, key, CalcKeySize(btcb, &iterator->key)); //¥¥ warning, this could overflow user's buffer!!! - - if ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, *dataSize) ) -- DebugStr("\pGetBTreeRecord: bad record?"); -+ DebugStr("GetBTreeRecord: bad record?"); - - } - -@@ -243,7 +243,7 @@ OSErr InsertBTreeRecord(SFCB *fcb, const void* key, const void* data, UInt16 dat - CopyMemory(key, &iterator.key, CalcKeySize(btcb, (BTreeKey *) key)); //¥¥ should we range check against maxkeylen? - - if ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, dataSize) ) -- DebugStr("\pInsertBTreeRecord: bad record?"); -+ DebugStr("InsertBTreeRecord: bad record?"); - - result = BTInsertRecord( fcb, &iterator, &btRecord, dataSize ); - -@@ -305,7 +305,7 @@ OSErr ReplaceBTreeRecord(SFCB *fcb, const void* key, UInt32 hint, void *newData, - CopyMemory(key, &iterator.key, CalcKeySize(btcb, (BTreeKey *) key)); //¥¥ should we range check against maxkeylen? - - if ( DEBUG_BUILD && !ValidHFSRecord(newData, btcb, dataSize) ) -- DebugStr("\pReplaceBTreeRecord: bad record?"); -+ DebugStr("ReplaceBTreeRecord: bad record?"); - - result = BTReplaceRecord( fcb, &iterator, &btRecord, dataSize ); - -@@ -344,7 +344,7 @@ SetEndOfForkProc ( SFCB *filePtr, FSSize minEOF, FSSize maxEOF ) - else - { - if ( DEBUG_BUILD ) -- DebugStr("\pSetEndOfForkProc: minEOF is smaller than current size!"); -+ DebugStr("SetEndOfForkProc: minEOF is smaller than current size!"); - return -1; - } - -@@ -370,7 +370,7 @@ SetEndOfForkProc ( SFCB *filePtr, FSSize minEOF, FSSize maxEOF ) - // Make sure we got at least as much space as we needed - // - if (filePtr->fcbLogicalSize < minEOF) { -- Panic("\pSetEndOfForkProc: disk too full to extend B-tree file"); -+ Panic("SetEndOfForkProc: disk too full to extend B-tree file"); - return dskFulErr; - } - -@@ -442,7 +442,7 @@ static OSErr CheckBTreeKey(const BTreeKey *key, const BTreeControlBlock *btcb) - if ( (keyLen < 6) || (keyLen > btcb->maxKeyLength) ) - { - if ( DEBUG_BUILD ) -- DebugStr("\pCheckBTreeKey: bad key length!"); -+ DebugStr("CheckBTreeKey: bad key length!"); - return fsBTInvalidKeyLengthErr; - } - diff --git a/utils/hfsprogs/patches/0006-Adjust-types-for-printing.patch b/utils/hfsprogs/patches/0006-Adjust-types-for-printing.patch deleted file mode 100644 index 09efbb6..0000000 --- a/utils/hfsprogs/patches/0006-Adjust-types-for-printing.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Adjust types for printing - -Try to address the issues of a given integral type having different sizes -in 32 and 64-bit architectures. ---- - fsck_hfs.tproj/dfalib/SControl.c | 2 +- - fsck_hfs.tproj/dfalib/hfs_endian.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fsck_hfs.tproj/dfalib/SControl.c b/fsck_hfs.tproj/dfalib/SControl.c -index 4ce9e16..8b03ece 100644 ---- a/fsck_hfs.tproj/dfalib/SControl.c -+++ b/fsck_hfs.tproj/dfalib/SControl.c -@@ -776,7 +776,7 @@ static int ScavSetUp( SGlob *GPtr) - pointer = (ScavStaticStructures *) AllocateClearMemory( sizeof(ScavStaticStructures) ); - if ( pointer == nil ) { - if ( GPtr->logLevel >= kDebugLog ) { -- printf( "\t error %d - could not allocate %ld bytes of memory \n", -+ printf( "\t error %d - could not allocate %i bytes of memory \n", - R_NoMem, sizeof(ScavStaticStructures) ); - } - return( R_NoMem ); -diff --git a/fsck_hfs.tproj/dfalib/hfs_endian.c b/fsck_hfs.tproj/dfalib/hfs_endian.c -index 3cc9eb4..6ca2ac1 100755 ---- a/fsck_hfs.tproj/dfalib/hfs_endian.c -+++ b/fsck_hfs.tproj/dfalib/hfs_endian.c -@@ -563,7 +563,7 @@ hfs_swap_HFSPlusBTInternalNode ( - /* Make sure name length is consistent with key length */ - if (keyLength < sizeof(srcKey->parentID) + sizeof(srcKey->nodeName.length) + - srcKey->nodeName.length*sizeof(srcKey->nodeName.unicode[0])) { -- if (debug) printf("hfs_swap_HFSPlusBTInternalNode: catalog record #%d keyLength=%d expected=%lu\n", -+ if (debug) printf("hfs_swap_HFSPlusBTInternalNode: catalog record #%d keyLength=%d expected=%i\n", - srcDesc->numRecords-i, keyLength, sizeof(srcKey->parentID) + sizeof(srcKey->nodeName.length) + - srcKey->nodeName.length*sizeof(srcKey->nodeName.unicode[0])); - WriteError(fcb->fcbVolume->vcbGPtr, E_KeyLen, fcb->fcbFileID, src->blockNum); diff --git a/utils/hfsprogs/patches/0007-Fix-path-for-HFS-wrapper-block.patch b/utils/hfsprogs/patches/0007-Fix-path-for-HFS-wrapper-block.patch deleted file mode 100644 index f92bb22..0000000 --- a/utils/hfsprogs/patches/0007-Fix-path-for-HFS-wrapper-block.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Fix path for HFS wrapper block - -Fix the installation of the HFS wrapper block to be compliant in Linux -systems (since it is arch independent). ---- - newfs_hfs.tproj/makehfs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/newfs_hfs.tproj/makehfs.c b/newfs_hfs.tproj/makehfs.c -index 7609779..2233ef7 100644 ---- a/newfs_hfs.tproj/makehfs.c -+++ b/newfs_hfs.tproj/makehfs.c -@@ -70,7 +70,7 @@ extern Boolean _CFStringGetFileSystemRepresentation(CFStringRef string, UInt8 *b - #include "readme.h" - - --#define HFS_BOOT_DATA "/usr/share/misc/hfsbootdata" -+#define HFS_BOOT_DATA "/usr/share/hfsprogs/hfsbootdata" - - #define HFS_JOURNAL_FILE ".journal" - #define HFS_JOURNAL_INFO ".journal_info_block" diff --git a/utils/hfsprogs/patches/0008-Provide-command-line-option-a.patch b/utils/hfsprogs/patches/0008-Provide-command-line-option-a.patch deleted file mode 100644 index 366dbbc..0000000 --- a/utils/hfsprogs/patches/0008-Provide-command-line-option-a.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Provide command line option -a - -Create a new command line option (-a) for the fsck.hfsplus that has the same -behavior that the -p option has, for greater compatibility with other tools. ---- - fsck_hfs.tproj/fsck_hfs.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/fsck_hfs.tproj/fsck_hfs.c b/fsck_hfs.tproj/fsck_hfs.c -index f1a18bd..6117698 100644 ---- a/fsck_hfs.tproj/fsck_hfs.c -+++ b/fsck_hfs.tproj/fsck_hfs.c -@@ -104,7 +104,7 @@ main(argc, argv) - else - progname = *argv; - -- while ((ch = getopt(argc, argv, "c:D:dfglm:npqruy")) != EOF) { -+ while ((ch = getopt(argc, argv, "c:D:dfglm:napqruy")) != EOF) { - switch (ch) { - case 'c': - /* Cache size to use in fsck_hfs */ -@@ -169,6 +169,7 @@ main(argc, argv) - yflag = 0; - break; - -+ case 'a': - case 'p': - preen++; - break; -@@ -572,7 +573,7 @@ usage() - (void) fprintf(stderr, " l = live fsck (lock down and test-only)\n"); - (void) fprintf(stderr, " m arg = octal mode used when creating lost+found directory \n"); - (void) fprintf(stderr, " n = assume a no response \n"); -- (void) fprintf(stderr, " p = just fix normal inconsistencies \n"); -+ (void) fprintf(stderr, " p, a = just fix normal inconsistencies \n"); - (void) fprintf(stderr, " q = quick check returns clean, dirty, or failure \n"); - (void) fprintf(stderr, " r = rebuild catalog btree \n"); - (void) fprintf(stderr, " u = usage \n"); diff --git a/utils/hfsprogs/patches/0009-Rename-dprintf-to-dbg_printf.patch b/utils/hfsprogs/patches/0009-Rename-dprintf-to-dbg_printf.patch deleted file mode 100644 index 23f8518..0000000 --- a/utils/hfsprogs/patches/0009-Rename-dprintf-to-dbg_printf.patch +++ /dev/null @@ -1,187 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Rename dprintf to dbg_printf - ---- - fsck_hfs.tproj/dfalib/SRepair.c | 18 +++++++++--------- - fsck_hfs.tproj/dfalib/SVerify1.c | 6 +++--- - fsck_hfs.tproj/fsck_debug.c | 10 +++++----- - fsck_hfs.tproj/fsck_debug.h | 10 +++++----- - 4 files changed, 22 insertions(+), 22 deletions(-) - -diff --git a/fsck_hfs.tproj/dfalib/SRepair.c b/fsck_hfs.tproj/dfalib/SRepair.c -index 8eb759c..89c12d6 100644 ---- a/fsck_hfs.tproj/dfalib/SRepair.c -+++ b/fsck_hfs.tproj/dfalib/SRepair.c -@@ -1825,13 +1825,13 @@ static OSErr FixAttrSize(SGlobPtr GPtr, RepairOrderPtr p) - result = BTSearchRecord(GPtr->calculatedAttributesFCB, &iterator, - kInvalidMRUCacheKey, &btRecord, &recSize, &iterator); - if (result) { -- dprintf (d_error|d_xattr, "%s: Cannot find attribute record (err = %d)\n", __FUNCTION__, result); -+ dbg_printf (d_error|d_xattr, "%s: Cannot find attribute record (err = %d)\n", __FUNCTION__, result); - goto out; - } - - /* We should only get record of type kHFSPlusAttrForkData */ - if (record.recordType != kHFSPlusAttrForkData) { -- dprintf (d_error|d_xattr, "%s: Record found is not attribute fork data\n", __FUNCTION__); -+ dbg_printf (d_error|d_xattr, "%s: Record found is not attribute fork data\n", __FUNCTION__); - result = btNotFound; - goto out; - } -@@ -1862,7 +1862,7 @@ static OSErr FixAttrSize(SGlobPtr GPtr, RepairOrderPtr p) - result = BTReplaceRecord(GPtr->calculatedAttributesFCB, &iterator, - &btRecord, recSize); - if (result) { -- dprintf (d_error|d_xattr, "%s: Cannot replace attribute record (err=%d)\n", __FUNCTION__, result); -+ dbg_printf (d_error|d_xattr, "%s: Cannot replace attribute record (err=%d)\n", __FUNCTION__, result); - goto out; - } - } -@@ -2058,7 +2058,7 @@ del_overflow_extents: - - /* Delete the extent record */ - err = DeleteBTreeRecord(GPtr->calculatedExtentsFCB, &extentKey); -- dprintf (d_info, "%s: Deleting extent overflow for fileID=%u, forkType=%u, startBlock=%u\n", __FUNCTION__, fileID, forkType, foundStartBlock); -+ dbg_printf (d_info, "%s: Deleting extent overflow for fileID=%u, forkType=%u, startBlock=%u\n", __FUNCTION__, fileID, forkType, foundStartBlock); - if (err) { - goto create_symlink; - } -@@ -3227,12 +3227,12 @@ static OSErr MoveExtent(SGlobPtr GPtr, ExtentInfo *extentInfo) - &extentData, &recordSize, &foundExtentIndex); - foundLocation = extentsBTree; - if (err != noErr) { -- dprintf (d_error|d_overlap, "%s: No matching extent record found in extents btree for fileID = %d (err=%d)\n", __FUNCTION__, extentInfo->fileID, err); -+ dbg_printf (d_error|d_overlap, "%s: No matching extent record found in extents btree for fileID = %d (err=%d)\n", __FUNCTION__, extentInfo->fileID, err); - goto out; - } - } else { - /* No more extents exist for this file */ -- dprintf (d_error|d_overlap, "%s: No matching extent record found for fileID = %d\n", __FUNCTION__, extentInfo->fileID); -+ dbg_printf (d_error|d_overlap, "%s: No matching extent record found for fileID = %d\n", __FUNCTION__, extentInfo->fileID); - goto out; - } - } -@@ -3241,7 +3241,7 @@ static OSErr MoveExtent(SGlobPtr GPtr, ExtentInfo *extentInfo) - err = CopyDiskBlocks(GPtr, extentInfo->startBlock, extentInfo->blockCount, - extentInfo->newStartBlock); - if (err != noErr) { -- dprintf (d_error|d_overlap, "%s: Error in copying disk blocks for fileID = %d (err=%d)\n", __FUNCTION__, extentInfo->fileID, err); -+ dbg_printf (d_error|d_overlap, "%s: Error in copying disk blocks for fileID = %d (err=%d)\n", __FUNCTION__, extentInfo->fileID, err); - goto out; - } - -@@ -3260,7 +3260,7 @@ static OSErr MoveExtent(SGlobPtr GPtr, ExtentInfo *extentInfo) - - } - if (err != noErr) { -- dprintf (d_error|d_overlap, "%s: Error in updating extent record for fileID = %d (err=%d)\n", __FUNCTION__, extentInfo->fileID, err); -+ dbg_printf (d_error|d_overlap, "%s: Error in updating extent record for fileID = %d (err=%d)\n", __FUNCTION__, extentInfo->fileID, err); - goto out; - } - -@@ -3491,7 +3491,7 @@ static OSErr SearchExtentInAttributeBT(SGlobPtr GPtr, ExtentInfo *extentInfo, - result = BTSearchRecord(GPtr->calculatedAttributesFCB, &iterator, - kInvalidMRUCacheKey, &btRecord, recordSize, &iterator); - if (result) { -- dprintf (d_error|d_overlap, "%s: Error finding attribute record (err=%d) for fileID = %d, attrname = %d\n", __FUNCTION__, result, extentInfo->fileID, extentInfo->attrname); -+ dbg_printf (d_error|d_overlap, "%s: Error finding attribute record (err=%d) for fileID = %d, attrname = %d\n", __FUNCTION__, result, extentInfo->fileID, extentInfo->attrname); - goto out; - } - -diff --git a/fsck_hfs.tproj/dfalib/SVerify1.c b/fsck_hfs.tproj/dfalib/SVerify1.c -index a273bf3..39bda5c 100644 ---- a/fsck_hfs.tproj/dfalib/SVerify1.c -+++ b/fsck_hfs.tproj/dfalib/SVerify1.c -@@ -2157,9 +2157,9 @@ CheckAttributeRecord(SGlobPtr GPtr, const HFSPlusAttrKey *key, const HFSPlusAttr - - if (doDelete == true) { - result = DeleteBTreeRecord(GPtr->calculatedAttributesFCB, key); -- dprintf (d_info|d_xattr, "%s: Deleting attribute %s for fileID %d, type = %d\n", __FUNCTION__, attrname, key->fileID, rec->recordType); -+ dbg_printf (d_info|d_xattr, "%s: Deleting attribute %s for fileID %d, type = %d\n", __FUNCTION__, attrname, key->fileID, rec->recordType); - if (result) { -- dprintf (d_error|d_xattr, "%s: Error in deleting record for %s for fileID %d, type = %d\n", __FUNCTION__, attrname, key->fileID, rec->recordType); -+ dbg_printf (d_error|d_xattr, "%s: Error in deleting record for %s for fileID %d, type = %d\n", __FUNCTION__, attrname, key->fileID, rec->recordType); - } - - /* Set flags to mark header and map dirty */ -@@ -3034,7 +3034,7 @@ OSErr CheckFileExtents( SGlobPtr GPtr, UInt32 fileNumber, UInt8 forkType, - // checkout the extent record first - err = ChkExtRec( GPtr, extents, &lastExtentIndex ); - if (err != noErr) { -- dprintf (d_info, "%s: Bad extent for fileID %u in extent %u for startblock %u\n", __FUNCTION__, fileNumber, lastExtentIndex, blockCount); -+ dbg_printf (d_info, "%s: Bad extent for fileID %u in extent %u for startblock %u\n", __FUNCTION__, fileNumber, lastExtentIndex, blockCount); - - /* Stop verification if bad extent is found for system file or EA */ - if ((fileNumber < kHFSFirstUserCatalogNodeID) || -diff --git a/fsck_hfs.tproj/fsck_debug.c b/fsck_hfs.tproj/fsck_debug.c -index 1be3fc5..77e8e51 100644 ---- a/fsck_hfs.tproj/fsck_debug.c -+++ b/fsck_hfs.tproj/fsck_debug.c -@@ -25,18 +25,18 @@ - #include - #include - --/* Current debug level of fsck_hfs for printing messages via dprintf */ -+/* Current debug level of fsck_hfs for printing messages via dbg_printf */ - unsigned long cur_debug_level; - --/* Function: dprintf -+/* Function: dbg_printf - * - * Description: Debug function similar to printf except the first parameter -- * which indicates the type of message to be printed by dprintf. Based on -+ * which indicates the type of message to be printed by dbg_printf. Based on - * current debug level and the type of message, the function decides - * whether to print the message or not. - * - * Each unique message type has a bit assigned to it. The message type -- * passed to dprintf can be one or combination (OR-ed value) of pre-defined -+ * passed to dbg_printf can be one or combination (OR-ed value) of pre-defined - * debug message types. Only the messages whose type have one or more similar - * bits set in comparison with current global debug level are printed. - * -@@ -56,7 +56,7 @@ unsigned long cur_debug_level; - * Output: - * Nothing - */ --void dprintf (unsigned long type, char *fmt, ...) -+void dbg_printf (unsigned long type, char *fmt, ...) - { - if (cur_debug_level & type) { - va_list ap; -diff --git a/fsck_hfs.tproj/fsck_debug.h b/fsck_hfs.tproj/fsck_debug.h -index 81e3932..cb1b9be 100644 ---- a/fsck_hfs.tproj/fsck_debug.h -+++ b/fsck_hfs.tproj/fsck_debug.h -@@ -36,18 +36,18 @@ enum debug_message_type { - d_overlap = 0x0020 /* Overlap extents related messages */ - }; - --/* Current debug level of fsck_hfs for printing messages via dprintf */ -+/* Current debug level of fsck_hfs for printing messages via dbg_printf */ - extern unsigned long cur_debug_level; - --/* Function: dprintf -+/* Function: dbg_printf - * - * Description: Debug function similar to printf except the first parameter -- * which indicates the type of message to be printed by dprintf. Based on -+ * which indicates the type of message to be printed by dbg_printf. Based on - * current debug level and the type of message, the function decides - * whether to print the message or not. - * - * Each unique message type has a bit assigned to it. The message type -- * passed to dprintf can be one or combination (OR-ed value) of pre-defined -+ * passed to dbg_printf can be one or combination (OR-ed value) of pre-defined - * debug message types. Only the messages whose type have one or more similar - * bits set in comparison with current global debug level are printed. - * -@@ -67,6 +67,6 @@ extern unsigned long cur_debug_level; - * Output: - * Nothing - */ --extern void dprintf (unsigned long message_type, char *format, ...); -+extern void dbg_printf (unsigned long message_type, char *format, ...); - - #endif /* __FSCK_DEBUG__ */ diff --git a/utils/hfsprogs/patches/0010-Rename-custom-macro-nil-with-NULL.patch b/utils/hfsprogs/patches/0010-Rename-custom-macro-nil-with-NULL.patch deleted file mode 100644 index 354b4ff..0000000 --- a/utils/hfsprogs/patches/0010-Rename-custom-macro-nil-with-NULL.patch +++ /dev/null @@ -1,1319 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:21 -0200 -Subject: Rename custom macro nil with NULL - ---- - fsck_hfs.tproj/dfalib/BTree.c | 142 +++++++++++++++++----------------- - fsck_hfs.tproj/dfalib/BTreeAllocate.c | 14 ++-- - fsck_hfs.tproj/dfalib/BTreeMiscOps.c | 26 +++---- - fsck_hfs.tproj/dfalib/BTreeNodeOps.c | 30 +++---- - fsck_hfs.tproj/dfalib/BTreeTreeOps.c | 38 ++++----- - fsck_hfs.tproj/dfalib/SControl.c | 56 +++++++------- - fsck_hfs.tproj/dfalib/SRepair.c | 6 +- - fsck_hfs.tproj/dfalib/SUtils.c | 6 +- - fsck_hfs.tproj/dfalib/SVerify1.c | 32 ++++---- - fsck_hfs.tproj/dfalib/SVerify2.c | 4 +- - 10 files changed, 177 insertions(+), 177 deletions(-) - -diff --git a/fsck_hfs.tproj/dfalib/BTree.c b/fsck_hfs.tproj/dfalib/BTree.c -index 7ad9fe0..c0c8744 100644 ---- a/fsck_hfs.tproj/dfalib/BTree.c -+++ b/fsck_hfs.tproj/dfalib/BTree.c -@@ -163,21 +163,21 @@ OSStatus BTInitialize (FCB *filePtr, - - ////////////////////// Preliminary Error Checking /////////////////////////// - -- headerNode.buffer = nil; -+ headerNode.buffer = NULL; - -- if (pathPtr == nil) return paramErr; -+ if (pathPtr == NULL) return paramErr; - - setEndOfForkProc = pathPtr->agentPtr->agent.setEndOfForkProc; - setBlockSizeProc = pathPtr->agentPtr->agent.setBlockSizeProc; - -- if (pathPtr->agentPtr->agent.getBlockProc == nil) return E_NoGetBlockProc; -- if (pathPtr->agentPtr->agent.releaseBlockProc == nil) return E_NoReleaseBlockProc; -- if (setEndOfForkProc == nil) return E_NoSetEndOfForkProc; -- if (setBlockSizeProc == nil) return E_NoSetBlockSizeProc; -+ if (pathPtr->agentPtr->agent.getBlockProc == NULL) return E_NoGetBlockProc; -+ if (pathPtr->agentPtr->agent.releaseBlockProc == NULL) return E_NoReleaseBlockProc; -+ if (setEndOfForkProc == NULL) return E_NoSetEndOfForkProc; -+ if (setBlockSizeProc == NULL) return E_NoSetBlockSizeProc; - - forkPtr = pathPtr->path.forkPtr; - -- if (forkPtr->fork.btreePtr != nil) return fsBTrFileAlreadyOpenErr; -+ if (forkPtr->fork.btreePtr != NULL) return fsBTrFileAlreadyOpenErr; - - if ((maxKeyLength == 0) || - (maxKeyLength > kMaxKeyLength)) return fsBTInvalidKeyLengthErr; -@@ -209,7 +209,7 @@ OSStatus BTInitialize (FCB *filePtr, - //////////////////////// Allocate Control Block ///////////////////////////// - - M_RESIDENT_ALLOCATE_FIXED_CLEAR( &btreePtr, sizeof( BTreeControlBlock ), kFSBTreeControlBlockType ); -- if (btreePtr == nil) -+ if (btreePtr == NULL) - { - err = memFullErr; - goto ErrorExit; -@@ -220,7 +220,7 @@ OSStatus BTInitialize (FCB *filePtr, - btreePtr->flags = 0; - btreePtr->attributes = 0; - btreePtr->forkPtr = forkPtr; -- btreePtr->keyCompareProc = nil; -+ btreePtr->keyCompareProc = NULL; - btreePtr->keyDescPtr = keyDescPtr; - btreePtr->btreeType = btreeType; - btreePtr->treeDepth = 0; -@@ -282,7 +282,7 @@ OSStatus BTInitialize (FCB *filePtr, - - ///////////////////// Copy Key Descriptor To Header ///////////////////////// - #if SupportsKeyDescriptors -- if (keyDescPtr != nil) -+ if (keyDescPtr != NULL) - { - err = CheckKeyDescriptor (keyDescPtr, maxKeyLength); - M_ExitOnError (err); -@@ -309,7 +309,7 @@ OSStatus BTInitialize (FCB *filePtr, - err = UpdateHeader (btreePtr); - M_ExitOnError (err); - -- pathPtr->path.forkPtr->fork.btreePtr = nil; -+ pathPtr->path.forkPtr->fork.btreePtr = NULL; - M_RESIDENT_DEALLOCATE_FIXED( btreePtr, sizeof( BTreeControlBlock ), kFSBTreeControlBlockType ); - - return noErr; -@@ -320,7 +320,7 @@ OSStatus BTInitialize (FCB *filePtr, - ErrorExit: - - (void) ReleaseNode (btreePtr, &headerNode); -- if (btreePtr != nil) -+ if (btreePtr != NULL) - M_RESIDENT_DEALLOCATE_FIXED( btreePtr, sizeof( BTreeControlBlock ), kFSBTreeControlBlockType ); - - return err; -@@ -342,7 +342,7 @@ Input: filePtr - pointer to file to open as a B-tree - setEndOfForkProc - pointer to client's SetEOF function - - Result: noErr - success -- paramErr - required ptr was nil -+ paramErr - required ptr was NULL - fsBTInvalidFileErr - - memFullErr - - != noErr - failure -@@ -364,16 +364,16 @@ OSStatus BTOpenPath (SFCB *filePtr, - - ////////////////////// Preliminary Error Checking /////////////////////////// - -- if ( filePtr == nil || -- getBlockProc == nil || -- releaseBlockProc == nil || -- setEndOfForkProc == nil || -- setBlockSizeProc == nil ) -+ if (filePtr == NULL || -+ getBlockProc == NULL || -+ releaseBlockProc == NULL || -+ setEndOfForkProc == NULL || -+ setBlockSizeProc == NULL) - { - return paramErr; - } - -- if ( filePtr->fcbBtree != nil ) // already has a BTreeCB -+ if (filePtr->fcbBtree != NULL) // already has a BTreeCB - return noErr; - - // is file large enough to contain header node? -@@ -384,7 +384,7 @@ OSStatus BTOpenPath (SFCB *filePtr, - //////////////////////// Allocate Control Block ///////////////////////////// - - btreePtr = (BTreeControlBlock*) AllocateClearMemory( sizeof( BTreeControlBlock ) ); -- if (btreePtr == nil) -+ if (btreePtr == NULL) - { - Panic ("\pBTOpen: no memory for btreePtr."); - return memFullErr; -@@ -397,7 +397,7 @@ OSStatus BTOpenPath (SFCB *filePtr, - - /////////////////////////// Read Header Node //////////////////////////////// - -- nodeRec.buffer = nil; // so we can call ReleaseNode -+ nodeRec.buffer = NULL; // so we can call ReleaseNode - - btreePtr->fcbPtr = filePtr; - filePtr->fcbBtree = (void *) btreePtr; // attach btree cb to file -@@ -487,7 +487,7 @@ OSStatus BTOpenPath (SFCB *filePtr, - - ////////////////////////// Get Key Descriptor /////////////////////////////// - #if SupportsKeyDescriptors -- if ( keyCompareProc == nil ) // if no key compare proc then get key descriptor -+ if (keyCompareProc == NULL) // if no key compare proc then get key descriptor - { - err = GetKeyDescriptor (btreePtr, nodeRec.buffer); //¥¥ it should check amount of memory allocated... - M_ExitOnError (err); -@@ -499,7 +499,7 @@ OSStatus BTOpenPath (SFCB *filePtr, - else - #endif - { -- btreePtr->keyDescPtr = nil; // clear it so we don't dispose garbage later -+ btreePtr->keyDescPtr = NULL; // clear it so we don't dispose garbage later - } - - err = ReleaseNode (btreePtr, &nodeRec); -@@ -528,7 +528,7 @@ OSStatus BTOpenPath (SFCB *filePtr, - - ErrorExit: - -- filePtr->fcbBtree = nil; -+ filePtr->fcbBtree = NULL; - (void) ReleaseNode (btreePtr, &nodeRec); - DisposeMemory( btreePtr ); - -@@ -567,7 +567,7 @@ OSStatus BTClosePath (SFCB *filePtr) - - btreePtr = (BTreeControlBlockPtr) filePtr->fcbBtree; - -- if (btreePtr == nil) -+ if (btreePtr == NULL) - return fsBTInvalidFileErr; - - ////////////////////// Check for other BTree Paths ////////////////////////// -@@ -603,14 +603,14 @@ OSStatus BTClosePath (SFCB *filePtr) - M_ExitOnError (err); - - #if SupportsKeyDescriptors -- if (btreePtr->keyDescPtr != nil) // deallocate keyDescriptor, if any -+ if (btreePtr->keyDescPtr != NULL) // deallocate keyDescriptor, if any - { - DisposeMemory( btreePtr->keyDescPtr ); - } - #endif - - DisposeMemory( btreePtr ); -- filePtr->fcbBtree = nil; -+ filePtr->fcbBtree = NULL; - - // LogEndTime(kTraceCloseBTree, noErr); - -@@ -643,7 +643,7 @@ Function: Search for position in B*Tree indicated by searchKey. If a valid node - - Input: pathPtr - pointer to path for BTree file. - searchKey - pointer to search key to match. -- hintPtr - pointer to hint (may be nil) -+ hintPtr - pointer to hint (may be NULL) - - Output: record - pointer to BufferDescriptor containing record - recordLen - length of data at recordPtr -@@ -678,14 +678,14 @@ OSStatus BTSearchRecord (SFCB *filePtr, - - // LogStartTime(kTraceSearchBTree); - -- if (filePtr == nil) return paramErr; -- if (searchIterator == nil) return paramErr; -+ if (filePtr == NULL) return paramErr; -+ if (searchIterator == NULL) return paramErr; - - btreePtr = (BTreeControlBlockPtr) filePtr->fcbBtree; -- if (btreePtr == nil) return fsBTInvalidFileErr; -+ if (btreePtr == NULL) return fsBTInvalidFileErr; - - #if SupportsKeyDescriptors -- if (btreePtr->keyCompareProc == nil) // CheckKey if we using Key Descriptor -+ if (btreePtr->keyCompareProc == NULL) // CheckKey if we using Key Descriptor - { - err = CheckKey (&searchIterator->key, btreePtr->keyDescPtr, btreePtr->maxKeyLength); - M_ExitOnError (err); -@@ -775,9 +775,9 @@ OSStatus BTSearchRecord (SFCB *filePtr, - //¥¥ Should check for errors! Or BlockMove could choke on recordPtr!!! - GetRecordByIndex (btreePtr, node.buffer, index, &keyPtr, &recordPtr, &len); - -- if (recordLen != nil) *recordLen = len; -+ if (recordLen != NULL) *recordLen = len; - -- if (record != nil) -+ if (record != NULL) - { - ByteCount recordSize; - -@@ -794,7 +794,7 @@ OSStatus BTSearchRecord (SFCB *filePtr, - - /////////////////////// Success - Update Iterator /////////////////////////// - -- if (resultIterator != nil) -+ if (resultIterator != NULL) - { - resultIterator->hint.writeCount = btreePtr->writeCount; - resultIterator->hint.nodeNum = nodeNum; -@@ -825,10 +825,10 @@ OSStatus BTSearchRecord (SFCB *filePtr, - - ErrorExit: - -- if (recordLen != nil) -+ if (recordLen != NULL) - *recordLen = 0; - -- if (resultIterator != nil) -+ if (resultIterator != NULL) - { - resultIterator->hint.writeCount = 0; - resultIterator->hint.nodeNum = 0; -@@ -892,18 +892,18 @@ OSStatus BTIterateRecord (SFCB *filePtr, - - ////////////////////////// Priliminary Checks /////////////////////////////// - -- left.buffer = nil; -- right.buffer = nil; -- node.buffer = nil; -+ left.buffer = NULL; -+ right.buffer = NULL; -+ node.buffer = NULL; - - -- if (filePtr == nil) -+ if (filePtr == NULL) - { - return paramErr; - } - - btreePtr = (BTreeControlBlockPtr) filePtr->fcbBtree; -- if (btreePtr == nil) -+ if (btreePtr == NULL) - { - return fsBTInvalidFileErr; //¥¥ handle properly - } -@@ -968,7 +968,7 @@ OSStatus BTIterateRecord (SFCB *filePtr, - } - else - { -- if (left.buffer == nil) -+ if (left.buffer == NULL) - { - nodeNum = ((NodeDescPtr) node.buffer)->bLink; - if ( nodeNum > 0) -@@ -981,13 +981,13 @@ OSStatus BTIterateRecord (SFCB *filePtr, - } - } - // Before we stomp on "right", we'd better release it if needed -- if (right.buffer != nil) { -+ if (right.buffer != NULL) { - err = ReleaseNode(btreePtr, &right); - M_ExitOnError(err); - } - right = node; - node = left; -- left.buffer = nil; -+ left.buffer = NULL; - index = ((NodeDescPtr) node.buffer)->numRecords -1; - } - } -@@ -1012,7 +1012,7 @@ OSStatus BTIterateRecord (SFCB *filePtr, - } - else - { -- if (right.buffer == nil) -+ if (right.buffer == NULL) - { - nodeNum = ((NodeDescPtr) node.buffer)->fLink; - if ( nodeNum > 0) -@@ -1025,13 +1025,13 @@ OSStatus BTIterateRecord (SFCB *filePtr, - } - } - // Before we stomp on "left", we'd better release it if needed -- if (left.buffer != nil) { -+ if (left.buffer != NULL) { - err = ReleaseNode(btreePtr, &left); - M_ExitOnError(err); - } - left = node; - node = right; -- right.buffer = nil; -+ right.buffer = NULL; - index = 0; - } - } -@@ -1054,9 +1054,9 @@ CopyData: - err = GetRecordByIndex (btreePtr, node.buffer, index, &keyPtr, &recordPtr, &len); - M_ExitOnError (err); - -- if (recordLen != nil) *recordLen = len; -+ if (recordLen != NULL) *recordLen = len; - -- if (record != nil) -+ if (record != NULL) - { - ByteCount recordSize; - -@@ -1069,7 +1069,7 @@ CopyData: - CopyMemory (recordPtr, record->bufferAddress, len); - } - -- if (iterator != nil) // first & last do not require iterator -+ if (iterator != NULL) // first & last do not require iterator - { - iterator->hint.writeCount = btreePtr->writeCount; - iterator->hint.nodeNum = nodeNum; -@@ -1089,13 +1089,13 @@ CopyData: - err = ReleaseNode (btreePtr, &node); - M_ExitOnError (err); - -- if (left.buffer != nil) -+ if (left.buffer != NULL) - { - err = ReleaseNode (btreePtr, &left); - M_ExitOnError (err); - } - -- if (right.buffer != nil) -+ if (right.buffer != NULL) - { - err = ReleaseNode (btreePtr, &right); - M_ExitOnError (err); -@@ -1113,10 +1113,10 @@ ErrorExit: - (void) ReleaseNode (btreePtr, &node); - (void) ReleaseNode (btreePtr, &right); - -- if (recordLen != nil) -+ if (recordLen != NULL) - *recordLen = 0; - -- if (iterator != nil) -+ if (iterator != NULL) - { - iterator->hint.writeCount = 0; - iterator->hint.nodeNum = 0; -@@ -1157,7 +1157,7 @@ OSStatus BTInsertRecord (SFCB *filePtr, - - ////////////////////////// Priliminary Checks /////////////////////////////// - -- nodeRec.buffer = nil; // so we can call ReleaseNode -+ nodeRec.buffer = NULL; // so we can call ReleaseNode - - err = CheckInsertParams (filePtr, iterator, record, recordLen); - if (err != noErr) -@@ -1317,7 +1317,7 @@ OSStatus BTSetRecord (SFCB *filePtr, - - ////////////////////////// Priliminary Checks /////////////////////////////// - -- nodeRec.buffer = nil; // so we can call ReleaseNode -+ nodeRec.buffer = NULL; // so we can call ReleaseNode - - err = CheckInsertParams (filePtr, iterator, record, recordLen); - if (err != noErr) -@@ -1506,7 +1506,7 @@ OSStatus BTReplaceRecord (SFCB *filePtr, - - ////////////////////////// Priliminary Checks /////////////////////////////// - -- nodeRec.buffer = nil; // so we can call ReleaseNode -+ nodeRec.buffer = NULL; // so we can call ReleaseNode - - err = CheckInsertParams (filePtr, iterator, record, recordLen); - if (err != noErr) -@@ -1645,20 +1645,20 @@ OSStatus BTDeleteRecord (SFCB *filePtr, - - ////////////////////////// Priliminary Checks /////////////////////////////// - -- nodeRec.buffer = nil; // so we can call ReleaseNode -+ nodeRec.buffer = NULL; // so we can call ReleaseNode - -- M_ReturnErrorIf (filePtr == nil, paramErr); -- M_ReturnErrorIf (iterator == nil, paramErr); -+ M_ReturnErrorIf (filePtr == NULL, paramErr); -+ M_ReturnErrorIf (iterator == NULL, paramErr); - - btreePtr = (BTreeControlBlockPtr) filePtr->fcbBtree; -- if (btreePtr == nil) -+ if (btreePtr == NULL) - { - err = fsBTInvalidFileErr; - goto ErrorExit; - } - - #if SupportsKeyDescriptors -- if (btreePtr->keyDescPtr != nil) -+ if (btreePtr->keyDescPtr != NULL) - { - err = CheckKey (&iterator->key, btreePtr->keyDescPtr, btreePtr->maxKeyLength); - M_ExitOnError (err); -@@ -1712,12 +1712,12 @@ OSStatus BTGetInformation (SFCB *filePtr, - BTreeControlBlockPtr btreePtr; - - -- M_ReturnErrorIf (filePtr == nil, paramErr); -+ M_ReturnErrorIf (filePtr == NULL, paramErr); - - btreePtr = (BTreeControlBlockPtr) filePtr->fcbBtree; - -- M_ReturnErrorIf (btreePtr == nil, fsBTInvalidFileErr); -- M_ReturnErrorIf (info == nil, paramErr); -+ M_ReturnErrorIf (btreePtr == NULL, fsBTInvalidFileErr); -+ M_ReturnErrorIf (info == NULL, paramErr); - - //¥¥ check version? - -@@ -1730,7 +1730,7 @@ OSStatus BTGetInformation (SFCB *filePtr, - info->keyDescriptor = btreePtr->keyDescPtr; //¥¥ this won't do at all... - info->reserved = 0; - -- if (btreePtr->keyDescPtr == nil) -+ if (btreePtr->keyDescPtr == NULL) - info->keyDescLength = 0; - else - info->keyDescLength = (UInt32) btreePtr->keyDescPtr->length; -@@ -1762,11 +1762,11 @@ OSStatus BTFlushPath (SFCB *filePtr) - - // LogStartTime(kTraceFlushBTree); - -- M_ReturnErrorIf (filePtr == nil, paramErr); -+ M_ReturnErrorIf (filePtr == NULL, paramErr); - - btreePtr = (BTreeControlBlockPtr) filePtr->fcbBtree; - -- M_ReturnErrorIf (btreePtr == nil, fsBTInvalidFileErr); -+ M_ReturnErrorIf (btreePtr == NULL, fsBTInvalidFileErr); - - err = UpdateHeader (btreePtr); - -@@ -1788,13 +1788,13 @@ Input: iterator - pointer to BTreeIterator - Output: iterator - iterator with the hint.nodeNum cleared - - Result: noErr - success -- paramErr - iterator == nil -+ paramErr - iterator == NULL - -------------------------------------------------------------------------------*/ - - - OSStatus BTInvalidateHint (BTreeIterator *iterator ) - { -- if (iterator == nil) -+ if (iterator == NULL) - return paramErr; - - iterator->hint.nodeNum = 0; -diff --git a/fsck_hfs.tproj/dfalib/BTreeAllocate.c b/fsck_hfs.tproj/dfalib/BTreeAllocate.c -index 485d867..02bdd8d 100644 ---- a/fsck_hfs.tproj/dfalib/BTreeAllocate.c -+++ b/fsck_hfs.tproj/dfalib/BTreeAllocate.c -@@ -83,7 +83,7 @@ OSStatus AllocateNode (BTreeControlBlockPtr btreePtr, UInt32 *nodeNum) - - - nodeNumber = 0; // first node number of header map record -- node.buffer = nil; // clear node.buffer to get header node -+ node.buffer = NULL; // clear node.buffer to get header node - // - and for ErrorExit - - while (true) -@@ -192,7 +192,7 @@ OSStatus FreeNode (BTreeControlBlockPtr btreePtr, UInt32 nodeNum) - - //////////////////////////// Find Map Record //////////////////////////////// - nodeIndex = 0; // first node number of header map record -- node.buffer = nil; // invalidate node.buffer to get header node -+ node.buffer = NULL; // invalidate node.buffer to get header node - - while (nodeNum >= nodeIndex) - { -@@ -278,8 +278,8 @@ OSStatus ExtendBTree (BTreeControlBlockPtr btreePtr, - nodeSize = btreePtr->nodeSize; - filePtr = btreePtr->fcbPtr; - -- mapNode.buffer = nil; -- newNode.buffer = nil; -+ mapNode.buffer = NULL; -+ newNode.buffer = NULL; - - mapNodeRecSize = nodeSize - sizeof(BTNodeDescriptor) - 6; // 2 bytes of free space (see note) - -@@ -448,7 +448,7 @@ ErrorExit: - Routine: GetMapNode - Get the next map node and pointer to the map record. - - Function: Given a BlockDescriptor to a map node in nodePtr, GetMapNode releases -- it and gets the next node. If nodePtr->buffer is nil, then the header -+ it and gets the next node. If nodePtr->buffer is NULL, then the header - node is retrieved. - - -@@ -474,7 +474,7 @@ OSStatus GetMapNode (BTreeControlBlockPtr btreePtr, - UInt16 mapIndex; - UInt32 nextNodeNum; - -- if (nodePtr->buffer != nil) // if iterator is valid... -+ if (nodePtr->buffer != NULL) // if iterator is valid... - { - nextNodeNum = ((NodeDescPtr)nodePtr->buffer)->fLink; - if (nextNodeNum == 0) -@@ -521,7 +521,7 @@ ErrorExit: - - (void) ReleaseNode (btreePtr, nodePtr); - -- *mapPtr = nil; -+ *mapPtr = NULL; - *mapSize = 0; - - return err; -diff --git a/fsck_hfs.tproj/dfalib/BTreeMiscOps.c b/fsck_hfs.tproj/dfalib/BTreeMiscOps.c -index 7c9edca..997f34b 100644 ---- a/fsck_hfs.tproj/dfalib/BTreeMiscOps.c -+++ b/fsck_hfs.tproj/dfalib/BTreeMiscOps.c -@@ -236,13 +236,13 @@ OSStatus FindIteratorPosition (BTreeControlBlockPtr btreePtr, - // assume index points to UInt16 - // assume foundRecord points to Boolean - -- left->buffer = nil; -- middle->buffer = nil; -- right->buffer = nil; -+ left->buffer = NULL; -+ middle->buffer = NULL; -+ right->buffer = NULL; - - foundIt = false; - -- if (iterator == nil) // do we have an iterator? -+ if (iterator == NULL) // do we have an iterator? - { - err = fsBTInvalidIteratorErr; - goto ErrorExit; -@@ -250,7 +250,7 @@ OSStatus FindIteratorPosition (BTreeControlBlockPtr btreePtr, - - #if SupportsKeyDescriptors - //¥¥ verify iterator key (change CheckKey to take btreePtr instead of keyDescPtr?) -- if (btreePtr->keyDescPtr != nil) -+ if (btreePtr->keyDescPtr != NULL) - { - err = CheckKey (&iterator->key, btreePtr->keyDescPtr, btreePtr->maxKeyLength ); - M_ExitOnError (err); -@@ -309,7 +309,7 @@ OSStatus FindIteratorPosition (BTreeControlBlockPtr btreePtr, - { - *right = *middle; - *middle = *left; -- left->buffer = nil; -+ left->buffer = NULL; - index = leftIndex; - - goto SuccessfulExit; -@@ -330,7 +330,7 @@ OSStatus FindIteratorPosition (BTreeControlBlockPtr btreePtr, - { - *right = *middle; - *middle = *left; -- left->buffer = nil; -+ left->buffer = NULL; - index = leftIndex; - - goto SuccessfulExit; -@@ -363,7 +363,7 @@ OSStatus FindIteratorPosition (BTreeControlBlockPtr btreePtr, - { - *left = *middle; - *middle = *right; -- right->buffer = nil; -+ right->buffer = NULL; - index = rightIndex; - - goto SuccessfulExit; -@@ -427,15 +427,15 @@ OSStatus CheckInsertParams (SFCB *filePtr, - { - BTreeControlBlockPtr btreePtr; - -- if (filePtr == nil) return paramErr; -+ if (filePtr == NULL) return paramErr; - - btreePtr = (BTreeControlBlockPtr) filePtr->fcbBtree; -- if (btreePtr == nil) return fsBTInvalidFileErr; -- if (iterator == nil) return paramErr; -- if (record == nil) return paramErr; -+ if (btreePtr == NULL) return fsBTInvalidFileErr; -+ if (iterator == NULL) return paramErr; -+ if (record == NULL) return paramErr; - - #if SupportsKeyDescriptors -- if (btreePtr->keyDescPtr != nil) -+ if (btreePtr->keyDescPtr != NULL) - { - OSStatus err; - -diff --git a/fsck_hfs.tproj/dfalib/BTreeNodeOps.c b/fsck_hfs.tproj/dfalib/BTreeNodeOps.c -index da07cc7..ef2bd7b 100644 ---- a/fsck_hfs.tproj/dfalib/BTreeNodeOps.c -+++ b/fsck_hfs.tproj/dfalib/BTreeNodeOps.c -@@ -105,7 +105,7 @@ Function: Gets an existing BTree node from FS Agent and verifies it. - Input: btreePtr - pointer to BTree control block - nodeNum - number of node to request - --Output: nodePtr - pointer to beginning of node (nil if error) -+Output: nodePtr - pointer to beginning of node (NULL if error) - - Result: - noErr - success -@@ -139,7 +139,7 @@ OSStatus GetNode (BTreeControlBlockPtr btreePtr, - if (err != noErr) - { - Panic ("\pGetNode: getNodeProc returned error."); -- nodePtr->buffer = nil; -+ nodePtr->buffer = NULL; - goto ErrorExit; - } - ++btreePtr->numGetNodes; -@@ -156,8 +156,8 @@ OSStatus GetNode (BTreeControlBlockPtr btreePtr, - return noErr; - - ErrorExit: -- nodePtr->buffer = nil; -- nodePtr->blockHeader = nil; -+ nodePtr->buffer = NULL; -+ nodePtr->blockHeader = NULL; - - // LogEndTime(kTraceGetNode, err); - -@@ -176,7 +176,7 @@ Function: Gets a new BTree node from FS Agent and initializes it to an empty - Input: btreePtr - pointer to BTree control block - nodeNum - number of node to request - --Output: returnNodePtr - pointer to beginning of node (nil if error) -+Output: returnNodePtr - pointer to beginning of node (NULL if error) - - Result: noErr - success - != noErr - failure -@@ -203,7 +203,7 @@ OSStatus GetNewNode (BTreeControlBlockPtr btreePtr, - if (err != noErr) - { - Panic ("\pGetNewNode: getNodeProc returned error."); -- returnNodePtr->buffer = nil; -+ returnNodePtr->buffer = NULL; - return err; - } - ++btreePtr->numGetNewNodes; -@@ -248,7 +248,7 @@ OSStatus ReleaseNode (BTreeControlBlockPtr btreePtr, - - err = noErr; - -- if (nodePtr->buffer != nil) -+ if (nodePtr->buffer != NULL) - { - /* - * The nodes must remain in the cache as big endian! -@@ -267,8 +267,8 @@ OSStatus ReleaseNode (BTreeControlBlockPtr btreePtr, - ++btreePtr->numReleaseNodes; - } - -- nodePtr->buffer = nil; -- nodePtr->blockHeader = nil; -+ nodePtr->buffer = NULL; -+ nodePtr->blockHeader = NULL; - - // LogEndTime(kTraceReleaseNode, err); - -@@ -299,7 +299,7 @@ OSStatus TrashNode (BTreeControlBlockPtr btreePtr, - - err = noErr; - -- if (nodePtr->buffer != nil) -+ if (nodePtr->buffer != NULL) - { - releaseNodeProc = btreePtr->releaseBlockProc; - err = releaseNodeProc (btreePtr->fcbPtr, -@@ -309,8 +309,8 @@ OSStatus TrashNode (BTreeControlBlockPtr btreePtr, - ++btreePtr->numReleaseNodes; - } - -- nodePtr->buffer = nil; -- nodePtr->blockHeader = nil; -+ nodePtr->buffer = NULL; -+ nodePtr->blockHeader = NULL; - - return err; - } -@@ -338,7 +338,7 @@ OSStatus UpdateNode (BTreeControlBlockPtr btreePtr, - - err = noErr; - -- if (nodePtr->buffer != nil) //¥¥ why call UpdateNode if nil ?!? -+ if (nodePtr->buffer != NULL) //¥¥ why call UpdateNode if NULL ?!? - { - // LogStartTime(kTraceReleaseNode); - err = hfs_swap_BTNode(nodePtr, btreePtr->fcbPtr, kSwapBTNodeHostToBig); -@@ -358,8 +358,8 @@ OSStatus UpdateNode (BTreeControlBlockPtr btreePtr, - ++btreePtr->numUpdateNodes; - } - -- nodePtr->buffer = nil; -- nodePtr->blockHeader = nil; -+ nodePtr->buffer = NULL; -+ nodePtr->blockHeader = NULL; - - return noErr; - -diff --git a/fsck_hfs.tproj/dfalib/BTreeTreeOps.c b/fsck_hfs.tproj/dfalib/BTreeTreeOps.c -index 37fb170..73e1fda 100644 ---- a/fsck_hfs.tproj/dfalib/BTreeTreeOps.c -+++ b/fsck_hfs.tproj/dfalib/BTreeTreeOps.c -@@ -177,7 +177,7 @@ Output: nodeNum - number of the node containing the key position - - Result: noErr - key found, index is record index - fsBTRecordNotFoundErr - key not found, index is insert index -- fsBTEmptyErr - key not found, return params are nil -+ fsBTEmptyErr - key not found, return params are NULL - otherwise - catastrophic failure (GetNode/ReleaseNode failed) - -------------------------------------------------------------------------------*/ - -@@ -321,8 +321,8 @@ ReleaseAndExit: - ErrorExit: - - *nodeNum = 0; -- nodePtr->buffer = nil; -- nodePtr->blockHeader = nil; -+ nodePtr->buffer = NULL; -+ nodePtr->blockHeader = NULL; - *returnIndex = 0; - - return err; -@@ -354,7 +354,7 @@ OSStatus InsertTree ( BTreeControlBlockPtr btreePtr, - primaryKey.replacingKey = replacingKey; - primaryKey.skipRotate = false; - -- err = InsertLevel (btreePtr, treePathTable, &primaryKey, nil, -+ err = InsertLevel (btreePtr, treePathTable, &primaryKey, NULL, - targetNode, index, level, insertNode ); - - return err; -@@ -385,7 +385,7 @@ OSStatus InsertLevel (BTreeControlBlockPtr btreePtr, - #if defined(applec) && !defined(__SC__) - PanicIf ((level == 1) && (((NodeDescPtr)targetNode->buffer)->kind != kBTLeafNode), "\P InsertLevel: non-leaf at level 1! "); - #endif -- siblingNode.buffer = nil; -+ siblingNode.buffer = NULL; - targetNodeNum = treePathTable [level].node; - - insertParent = false; -@@ -420,7 +420,7 @@ OSStatus InsertLevel (BTreeControlBlockPtr btreePtr, - - ////// process second insert (if any) ////// - -- if ( secondaryKey != nil ) -+ if (secondaryKey != NULL) - { - Boolean temp; - -@@ -446,7 +446,7 @@ OSStatus InsertLevel (BTreeControlBlockPtr btreePtr, - UInt8 * recPtr; - UInt16 recSize; - -- secondaryKey = nil; -+ secondaryKey = NULL; - - PanicIf ( (level == btreePtr->treeDepth), "InsertLevel: unfinished insert!?"); - -@@ -606,9 +606,9 @@ static OSErr InsertNode (BTreeControlBlockPtr btreePtr, - - if ( leftNodeNum > 0 ) - { -- PanicIf ( siblingNode->buffer != nil, "InsertNode: siblingNode already aquired!"); -+ PanicIf(siblingNode->buffer != NULL, "InsertNode: siblingNode already aquired!"); - -- if ( siblingNode->buffer == nil ) -+ if (siblingNode->buffer == NULL) - { - err = GetNode (btreePtr, leftNodeNum, siblingNode); // will be released by caller or a split below - M_ExitOnError (err); -@@ -703,7 +703,7 @@ OSStatus DeleteTree (BTreeControlBlockPtr btreePtr, - - targetNodeNum = treePathTable[level].node; - targetNodePtr = targetNode->buffer; -- PanicIf (targetNodePtr == nil, "DeleteTree: targetNode has nil buffer!"); -+ PanicIf (targetNodePtr == NULL, "DeleteTree: targetNode has NULL buffer!"); - - DeleteRecord (btreePtr, targetNodePtr, index); - -@@ -766,7 +766,7 @@ OSStatus DeleteTree (BTreeControlBlockPtr btreePtr, - deleteRequired = false; - updateRequired = false; - -- if ( targetNode->buffer == nil ) // then root was freed and the btree is empty -+ if (targetNode->buffer == NULL) // then root was freed and the btree is empty - { - btreePtr->rootNode = 0; - btreePtr->treeDepth = 0; -@@ -1124,7 +1124,7 @@ static OSStatus SplitLeft (BTreeControlBlockPtr btreePtr, - if ( (right->height == 1) && (right->kind != kBTLeafNode) ) - return fsBTInvalidNodeErr; - -- if ( left != nil ) -+ if (left != NULL) - { - if ( left->fLink != rightNodeNum ) - return fsBTInvalidNodeErr; //¥¥ E_BadSibling ? -@@ -1145,7 +1145,7 @@ static OSStatus SplitLeft (BTreeControlBlockPtr btreePtr, - - /////////////// Update Forward Link In Original Left Node /////////////////// - -- if ( left != nil ) -+ if (left != NULL) - { - left->fLink = newNodeNum; - err = UpdateNode (btreePtr, leftNode); -@@ -1240,8 +1240,8 @@ static OSStatus AddNewRootNode (BTreeControlBlockPtr btreePtr, - Boolean didItFit; - UInt16 keyLength; - -- PanicIf (leftNode == nil, "AddNewRootNode: leftNode == nil"); -- PanicIf (rightNode == nil, "AddNewRootNode: rightNode == nil"); -+ PanicIf (leftNode == NULL, "AddNewRootNode: leftNode == NULL"); -+ PanicIf (rightNode == NULL, "AddNewRootNode: rightNode == NULL"); - - - /////////////////////// Initialize New Root Node //////////////////////////// -@@ -1362,7 +1362,7 @@ static OSStatus SplitRight (BTreeControlBlockPtr btreePtr, - if ( (leftPtr->height == 1) && (leftPtr->kind != kBTLeafNode) ) - return fsBTInvalidNodeErr; - -- if ( rightPtr != nil ) -+ if (rightPtr != NULL) - { - if ( rightPtr->bLink != nodeNum ) - return fsBTInvalidNodeErr; //¥¥ E_BadSibling ? -@@ -1382,7 +1382,7 @@ static OSStatus SplitRight (BTreeControlBlockPtr btreePtr, - - /////////////// Update backward Link In Original Right Node /////////////////// - -- if ( rightPtr != nil ) -+ if (rightPtr != NULL) - { - rightPtr->bLink = newNodeNum; - err = UpdateNode (btreePtr, rightNodePtr); -@@ -1739,7 +1739,7 @@ static int DoKeyCheck( NodeDescPtr nodeP, BTreeControlBlock *btcb ) - UInt16 keyLength; - KeyPtr keyPtr; - UInt8 *dataPtr; -- KeyPtr prevkeyP = nil; -+ KeyPtr prevkeyP = NULL; - - - if ( nodeP->numRecords == 0 ) -@@ -1766,7 +1766,7 @@ static int DoKeyCheck( NodeDescPtr nodeP, BTreeControlBlock *btcb ) - return( -1 ); - } - -- if ( prevkeyP != nil ) -+ if (prevkeyP != NULL) - { - if ( CompareKeys( (BTreeControlBlockPtr)btcb, prevkeyP, keyPtr ) >= 0 ) - { -diff --git a/fsck_hfs.tproj/dfalib/SControl.c b/fsck_hfs.tproj/dfalib/SControl.c -index 8b03ece..d3145e0 100644 ---- a/fsck_hfs.tproj/dfalib/SControl.c -+++ b/fsck_hfs.tproj/dfalib/SControl.c -@@ -82,7 +82,7 @@ CheckHFS( int fsReadRef, int fsWriteRef, int checkLevel, int repairLevel, - { - SGlob dataArea; // Allocate the scav globals - short temp; -- FileIdentifierTable *fileIdentifierTable = nil; -+ FileIdentifierTable *fileIdentifierTable = NULL; - OSErr err = noErr; - OSErr scavError = 0; - int scanCount = 0; -@@ -228,7 +228,7 @@ DoAgain: - } - - // Set up structures for post processing -- if ( (autoRepair == true) && (dataArea.fileIdentifierTable != nil) ) -+ if ((autoRepair == true) && (dataArea.fileIdentifierTable != NULL)) - { - // *repairInfo = *repairInfo | kVolumeHadOverlappingExtents; // Report back that volume has overlapping extents - fileIdentifierTable = (FileIdentifierTable *) AllocateMemory( GetHandleSize( (Handle) dataArea.fileIdentifierTable ) ); -@@ -239,7 +239,7 @@ DoAgain: - // - // Post processing - // -- if ( fileIdentifierTable != nil ) -+ if (fileIdentifierTable != NULL) - { - DisposeMemory( fileIdentifierTable ); - } -@@ -682,7 +682,7 @@ short CheckForStop( SGlob *GPtr ) - - //if ( ((ticks - 10) > GPtr->lastTickCount) || (dfaStage == kAboutToRepairStage) ) // To reduce cursor flicker on fast machines, call through on a timed interval - //{ -- if ( GPtr->userCancelProc != nil ) -+ if (GPtr->userCancelProc != NULL) - { - UInt64 progress = 0; - Boolean progressChanged; -@@ -761,7 +761,7 @@ static int ScavSetUp( SGlob *GPtr) - short ioRefNum; - #endif - -- GPtr->MinorRepairsP = nil; -+ GPtr->MinorRepairsP = NULL; - - GPtr->itemsProcessed = 0; - GPtr->lastProgress = 0; -@@ -774,7 +774,7 @@ static int ScavSetUp( SGlob *GPtr) - ScavStaticStructures *pointer; - - pointer = (ScavStaticStructures *) AllocateClearMemory( sizeof(ScavStaticStructures) ); -- if ( pointer == nil ) { -+ if (pointer == NULL) { - if ( GPtr->logLevel >= kDebugLog ) { - printf( "\t error %d - could not allocate %i bytes of memory \n", - R_NoMem, sizeof(ScavStaticStructures) ); -@@ -831,7 +831,7 @@ static int ScavSetUp( SGlob *GPtr) - // Save current value of vcbWrCnt, to detect modifications to volume by other apps etc - if ( GPtr->volumeFeatures & volumeIsMountedMask ) - { -- FlushVol( nil, GPtr->realVCB->vcbVRefNum ); // Ask HFS to update all changes to disk -+ FlushVol(NULL, GPtr->realVCB->vcbVRefNum); // Ask HFS to update all changes to disk - GPtr->wrCnt = GPtr->realVCB->vcbWrCnt; // Remember write count after writing changes - } - #endif -@@ -949,7 +949,7 @@ static int ScavSetUp( SGlob *GPtr) - - // Keep a valid file id list for HFS volumes - GPtr->validFilesList = (UInt32**)NewHandle( 0 ); -- if ( GPtr->validFilesList == nil ) { -+ if (GPtr->validFilesList == NULL) { - if ( GPtr->logLevel >= kDebugLog ) { - printf( "\t error %d - could not allocate file ID list \n", R_NoMem ); - } -@@ -995,17 +995,17 @@ static int ScavTerm( SGlobPtr GPtr ) - - (void) BitMapCheckEnd(); - -- while( (rP = GPtr->MinorRepairsP) != nil ) // loop freeing leftover (undone) repair orders -+ while((rP = GPtr->MinorRepairsP) != NULL) // loop freeing leftover (undone) repair orders - { - GPtr->MinorRepairsP = rP->link; // (in case repairs were not made) - DisposeMemory(rP); - err = MemError(); - } - -- if( GPtr->validFilesList != nil ) -+ if (GPtr->validFilesList != NULL) - DisposeHandle( (Handle) GPtr->validFilesList ); - -- if( GPtr->overlappedExtents != nil ) { -+ if (GPtr->overlappedExtents != NULL) { - extentsTableH = GPtr->overlappedExtents; - - /* Overlapped extents list also allocated memory for attribute name */ -@@ -1021,44 +1021,44 @@ static int ScavTerm( SGlobPtr GPtr ) - DisposeHandle( (Handle) GPtr->overlappedExtents ); - } - -- if( GPtr->fileIdentifierTable != nil ) -+ if (GPtr->fileIdentifierTable != NULL) - DisposeHandle( (Handle) GPtr->fileIdentifierTable ); - -- if( GPtr->calculatedVCB == nil ) // already freed? -+ if (GPtr->calculatedVCB == NULL) // already freed? - return( noErr ); - - // If the FCB's and BTCB's have been set up, dispose of them - fcbP = GPtr->calculatedExtentsFCB; // release extent file BTree bit map -- if ( fcbP != nil ) -+ if (fcbP != NULL) - { - btcbP = (BTreeControlBlock*)fcbP->fcbBtree; -- if ( btcbP != nil) -+ if (btcbP != NULL) - { -- if( btcbP->refCon != nil ) -+ if (btcbP->refCon != NULL) - { -- if(((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr != nil) -+ if (((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr != NULL) - { - DisposeMemory(((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr); - err = MemError(); - } - DisposeMemory( (Ptr)btcbP->refCon ); - err = MemError(); -- btcbP->refCon = nil; -+ btcbP->refCon = NULL; - } - - fcbP = GPtr->calculatedCatalogFCB; // release catalog BTree bit map - btcbP = (BTreeControlBlock*)fcbP->fcbBtree; - -- if( btcbP->refCon != nil ) -+ if (btcbP->refCon != NULL) - { -- if(((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr != nil) -+ if (((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr != NULL) - { - DisposeMemory(((BTreeExtensionsRec*)btcbP->refCon)->BTCBMPtr); - err = MemError(); - } - DisposeMemory( (Ptr)btcbP->refCon ); - err = MemError(); -- btcbP->refCon = nil; -+ btcbP->refCon = NULL; - } - } - } -@@ -1066,7 +1066,7 @@ static int ScavTerm( SGlobPtr GPtr ) - DisposeMemory( GPtr->calculatedVCB ); // Release our block of data structures - err = MemError(); - -- GPtr->calculatedVCB = nil; -+ GPtr->calculatedVCB = NULL; - - return( noErr ); - } -@@ -1113,7 +1113,7 @@ Boolean IsBlueBoxSharedDrive ( DrvQElPtr dqPtr ) - // Now look at the name of the Driver name. If it is .BlueBoxShared keep it out of the list of available disks. - driverDCtlHandle = GetDCtlEntry(dqPtr->dQRefNum); - driverDCtlPtr = *driverDCtlHandle; -- if((((driverDCtlPtr->dCtlFlags) & Is_Native_Mask) == 0) && (driverDCtlPtr->dCtlDriver != nil)) -+ if((((driverDCtlPtr->dCtlFlags) & Is_Native_Mask) == 0) && (driverDCtlPtr->dCtlDriver != NULL)) - { - if (((driverDCtlPtr->dCtlFlags) & Is_Ram_Based_Mask) == 0) - { -@@ -1127,19 +1127,19 @@ Boolean IsBlueBoxSharedDrive ( DrvQElPtr dqPtr ) - - } - driverName = (StringPtr)&(drvrHeaderPtr->drvrName); -- if (!(IdenticalString(driverName,blueBoxSharedDriverName,nil))) -+ if (!(IdenticalString(driverName,blueBoxSharedDriverName,NULL))) - { - return( true ); - } - - // Special case for the ".Sony" floppy driver which might be accessed in Shared mode inside the Blue Box - // Test its "where" string instead of the driver name. -- if (!(IdenticalString(driverName,sonyDriverName,nil))) -+ if (!(IdenticalString(driverName,sonyDriverName,NULL))) - { - CntrlParam paramBlock; - -- paramBlock.ioCompletion = nil; -- paramBlock.ioNamePtr = nil; -+ paramBlock.ioCompletion = NULL; -+ paramBlock.ioNamePtr = NULL; - paramBlock.ioVRefNum = dqPtr->dQDrive; - paramBlock.ioCRefNum = dqPtr->dQRefNum; - paramBlock.csCode = kDriveIcon; // return physical icon -@@ -1152,7 +1152,7 @@ Boolean IsBlueBoxSharedDrive ( DrvQElPtr dqPtr ) - - iconAndStringRecPtr = * (IconAndStringRecPtr*) & paramBlock.csParam; - whereStringPtr = (StringPtr) & iconAndStringRecPtr->string; -- if (!(IdenticalString(whereStringPtr,blueBoxFloppyWhereString,nil))) -+ if (!(IdenticalString(whereStringPtr,blueBoxFloppyWhereString,NULL))) - { - return( true ); - } -diff --git a/fsck_hfs.tproj/dfalib/SRepair.c b/fsck_hfs.tproj/dfalib/SRepair.c -index 89c12d6..b261c37 100644 ---- a/fsck_hfs.tproj/dfalib/SRepair.c -+++ b/fsck_hfs.tproj/dfalib/SRepair.c -@@ -844,7 +844,7 @@ static int DelFThd( SGlobPtr GPtr, UInt32 fid ) // the file ID - - isHFSPlus = VolumeObjectIsHFSPlus( ); - -- BuildCatalogKey( fid, (const CatalogName*) nil, isHFSPlus, &key ); -+ BuildCatalogKey(fid, NULL, isHFSPlus, &key); - result = SearchBTreeRecord( GPtr->calculatedCatalogFCB, &key, kNoHint, &foundKey, &record, &recSize, &hint ); - - if ( result ) return ( IntError( GPtr, result ) ); -@@ -910,7 +910,7 @@ static OSErr FixDirThread( SGlobPtr GPtr, UInt32 did ) // the dir ID - - isHFSPlus = VolumeObjectIsHFSPlus( ); - -- BuildCatalogKey( did, (const CatalogName*) nil, isHFSPlus, &key ); -+ BuildCatalogKey(did, NULL, isHFSPlus, &key); - result = SearchBTreeRecord( GPtr->calculatedCatalogFCB, &key, kNoHint, &foundKey, &record, &recSize, &hint ); - - if ( result ) -@@ -2171,7 +2171,7 @@ static OSErr FixOrphanedFiles ( SGlobPtr GPtr ) - } - - //-- Build the key for the file thread -- BuildCatalogKey( cNodeID, nil, isHFSPlus, &key ); -+ BuildCatalogKey(cNodeID, NULL, isHFSPlus, &key); - - err = SearchBTreeRecord( GPtr->calculatedCatalogFCB, &key, kNoHint, - &tempKey, &threadRecord, &recordSize, &hint2 ); -diff --git a/fsck_hfs.tproj/dfalib/SUtils.c b/fsck_hfs.tproj/dfalib/SUtils.c -index 6e9253e..491afbf 100644 ---- a/fsck_hfs.tproj/dfalib/SUtils.c -+++ b/fsck_hfs.tproj/dfalib/SUtils.c -@@ -395,11 +395,11 @@ OSErr GetVolumeFeatures( SGlobPtr GPtr ) - err = GetVCBDriveNum( &GPtr->realVCB, GPtr->DrvNum ); - ReturnIfError( err ); - -- if ( GPtr->realVCB != nil ) -+ if (GPtr->realVCB != NULL) - { - GPtr->volumeFeatures |= volumeIsMountedMask; - -- pb.ioParam.ioNamePtr = nil; -+ pb.ioParam.ioNamePtr = NULL; - pb.ioParam.ioVRefNum = GPtr->realVCB->vcbVRefNum; - pb.ioParam.ioBuffer = (Ptr) &buffer; - pb.ioParam.ioReqCount = sizeof( buffer ); -@@ -2282,7 +2282,7 @@ void print_prime_buckets(PrimeBuckets *cur); - * 4. btreetye - can be kHFSPlusCatalogRecord or kHFSPlusAttributeRecord - * indicates which btree prime number bucket should be incremented - * -- * Output: nil -+ * Output: NULL - */ - void RecordXAttrBits(SGlobPtr GPtr, UInt16 flags, HFSCatalogNodeID fileid, UInt16 btreetype) - { -diff --git a/fsck_hfs.tproj/dfalib/SVerify1.c b/fsck_hfs.tproj/dfalib/SVerify1.c -index 39bda5c..c33155f 100644 ---- a/fsck_hfs.tproj/dfalib/SVerify1.c -+++ b/fsck_hfs.tproj/dfalib/SVerify1.c -@@ -790,13 +790,13 @@ OSErr CreateExtentsBTreeControlBlock( SGlobPtr GPtr ) - // set up our DFA extended BTCB area. Will we have enough memory on all HFS+ volumes. - // - btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -- if ( btcb->refCon == nil ) { -+ if (btcb->refCon == NULL) { - err = R_NoMem; - goto exit; - } - size = (btcb->totalNodes + 7) / 8; // size of BTree bit map - ((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr = AllocateClearMemory(size); // get precleared bitmap -- if ( ((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr == nil ) -+ if (((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr == NULL) - { - err = R_NoMem; - goto exit; -@@ -1145,13 +1145,13 @@ OSErr CreateCatalogBTreeControlBlock( SGlobPtr GPtr ) - // - - btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -- if ( btcb->refCon == nil ) { -+ if (btcb->refCon == NULL) { - err = R_NoMem; - goto exit; - } - size = (btcb->totalNodes + 7) / 8; // size of BTree bit map - ((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr = AllocateClearMemory(size); // get precleared bitmap -- if ( ((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr == nil ) -+ if (((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr == NULL) - { - err = R_NoMem; - goto exit; -@@ -1339,7 +1339,7 @@ OSErr CatHChk( SGlobPtr GPtr ) - - //¥¥ Can we ignore this part by just taking advantage of setting the selCode = 0x8001; - { -- BuildCatalogKey( 1, (const CatalogName *)nil, isHFSPlus, &key ); -+ BuildCatalogKey(1, NULL, isHFSPlus, &key); - result = SearchBTreeRecord( GPtr->calculatedCatalogFCB, &key, kNoHint, &foundKey, &threadRecord, &recSize, &hint ); - - GPtr->TarBlock = hint; /* set target block */ -@@ -1443,7 +1443,7 @@ OSErr CatHChk( SGlobPtr GPtr ) - /* - * Find thread record - */ -- BuildCatalogKey( dprP->directoryID, (const CatalogName *) nil, isHFSPlus, &key ); -+ BuildCatalogKey(dprP->directoryID, NULL, isHFSPlus, &key); - result = SearchBTreeRecord( GPtr->calculatedCatalogFCB, &key, kNoHint, &foundKey, &threadRecord, &recSize, &hint ); - if ( result != noErr ) { - char idStr[16]; -@@ -1780,26 +1780,26 @@ OSErr CreateAttributesBTreeControlBlock( SGlobPtr GPtr ) - // set up our DFA extended BTCB area. Will we have enough memory on all HFS+ volumes. - // - btcb->refCon = AllocateClearMemory( sizeof(BTreeExtensionsRec) ); // allocate space for our BTCB extensions -- if ( btcb->refCon == nil ) { -+ if (btcb->refCon == NULL) { - err = R_NoMem; - goto exit; - } - - if (btcb->totalNodes == 0) - { -- ((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr = nil; -+ ((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr = NULL; - ((BTreeExtensionsRec*)btcb->refCon)->BTCBMSize = 0; - ((BTreeExtensionsRec*)btcb->refCon)->realFreeNodeCount = 0; - } - else - { -- if ( btcb->refCon == nil ) { -+ if (btcb->refCon == NULL) { - err = R_NoMem; - goto exit; - } - size = (btcb->totalNodes + 7) / 8; // size of BTree bit map - ((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr = AllocateClearMemory(size); // get precleared bitmap -- if ( ((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr == nil ) -+ if (((BTreeExtensionsRec*)btcb->refCon)->BTCBMPtr == NULL) - { - err = R_NoMem; - goto exit; -@@ -2358,7 +2358,7 @@ static OSErr RcdMDBEmbededVolDescriptionErr( SGlobPtr GPtr, OSErr type, HFSMaste - RcdError( GPtr, type ); // first, record the error - - p = AllocMinorRepairOrder( GPtr, sizeof(EmbededVolDescription) ); // get the node -- if ( p == nil ) return( R_NoMem ); -+ if (p == NULL) return( R_NoMem ); - - p->type = type; // save error info - desc = (EmbededVolDescription *) &(p->name); -@@ -2397,7 +2397,7 @@ static OSErr RcdInvalidWrapperExtents( SGlobPtr GPtr, OSErr type ) - RcdError( GPtr, type ); // first, record the error - - p = AllocMinorRepairOrder( GPtr, 0 ); // get the node -- if ( p == nil ) return( R_NoMem ); -+ if (p == NULL) return( R_NoMem ); - - p->type = type; // save error info - -@@ -3029,7 +3029,7 @@ OSErr CheckFileExtents( SGlobPtr GPtr, UInt32 fileNumber, UInt8 forkType, - foundBadExtent = false; - lastExtentIndex = GPtr->numExtents; - -- while ( (extents != nil) && (err == noErr) ) -+ while ((extents != NULL) && (err == noErr)) - { - // checkout the extent record first - err = ChkExtRec( GPtr, extents, &lastExtentIndex ); -@@ -3105,7 +3105,7 @@ OSErr CheckFileExtents( SGlobPtr GPtr, UInt32 fileNumber, UInt8 forkType, - if ( err == btNotFound ) - { - err = noErr; // no more extent records -- extents = nil; -+ extents = NULL; - break; - } - else if ( err != noErr ) -@@ -3121,7 +3121,7 @@ OSErr CheckFileExtents( SGlobPtr GPtr, UInt32 fileNumber, UInt8 forkType, - if ( err == btNotFound ) - { - err = noErr; // no more extent records -- extents = nil; -+ extents = NULL; - break; - } - else if ( err != noErr ) -@@ -3205,7 +3205,7 @@ static OSErr AddExtentToOverlapList( SGlobPtr GPtr, HFSCatalogNodeID fileNumber, - } - - // If it's uninitialized -- if ( GPtr->overlappedExtents == nil ) -+ if (GPtr->overlappedExtents == NULL) - { - GPtr->overlappedExtents = (ExtentsTable **) NewHandleClear( sizeof(ExtentsTable) ); - extentsTableH = GPtr->overlappedExtents; -diff --git a/fsck_hfs.tproj/dfalib/SVerify2.c b/fsck_hfs.tproj/dfalib/SVerify2.c -index c68f3d8..da1a982 100644 ---- a/fsck_hfs.tproj/dfalib/SVerify2.c -+++ b/fsck_hfs.tproj/dfalib/SVerify2.c -@@ -1013,7 +1013,7 @@ static int BTKeyChk( SGlobPtr GPtr, NodeDescPtr nodeP, BTreeControlBlock *btcb ) - UInt16 keyLength; - KeyPtr keyPtr; - UInt8 *dataPtr; -- KeyPtr prevkeyP = nil; -+ KeyPtr prevkeyP = NULL; - - - if ( nodeP->numRecords == 0 ) -@@ -1044,7 +1044,7 @@ static int BTKeyChk( SGlobPtr GPtr, NodeDescPtr nodeP, BTreeControlBlock *btcb ) - return( E_KeyLen ); - } - -- if ( prevkeyP != nil ) -+ if (prevkeyP != NULL) - { - if ( CompareKeys( (BTreeControlBlockPtr)btcb, prevkeyP, keyPtr ) >= 0 ) - { diff --git a/utils/hfsprogs/patches/0011-Fix-types.patch b/utils/hfsprogs/patches/0011-Fix-types.patch deleted file mode 100644 index 88c049f..0000000 --- a/utils/hfsprogs/patches/0011-Fix-types.patch +++ /dev/null @@ -1,71 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= -Date: Thu, 24 Oct 2013 01:11:22 -0200 -Subject: Fix types - ---- - fsck_hfs.tproj/cache.c | 30 ++++++++++++++++-------------- - 1 file changed, 16 insertions(+), 14 deletions(-) - -diff --git a/fsck_hfs.tproj/cache.c b/fsck_hfs.tproj/cache.c -index 527088a..540fa0b 100644 ---- a/fsck_hfs.tproj/cache.c -+++ b/fsck_hfs.tproj/cache.c -@@ -961,20 +961,21 @@ int CacheLookup (Cache_t *cache, uint64_t off, Tag_t **tag) - */ - int CacheRawRead (Cache_t *cache, uint64_t off, uint32_t len, void *buf) - { -- uint64_t result; -+ off_t result1; -+ ssize_t result2; - - /* Both offset and length must be multiples of the device block size */ - if (off % cache->DevBlockSize) return (EINVAL); - if (len % cache->DevBlockSize) return (EINVAL); - - /* Seek to the position */ -- result = lseek (cache->FD_R, off, SEEK_SET); -- if (result < 0) return (errno); -- if (result != off) return (ENXIO); -+ result1 = lseek(cache->FD_R, off, SEEK_SET); -+ if (result1 < 0) return (errno); -+ if (result1 != off) return (ENXIO); - /* Read into the buffer */ -- result = read (cache->FD_R, buf, len); -- if (result < 0) return (errno); -- if (result == 0) return (ENXIO); -+ result2 = read(cache->FD_R, buf, len); -+ if (result2 < 0) return (errno); -+ if (result2 == 0) return (ENXIO); - - /* Update counters */ - cache->DiskRead++; -@@ -989,21 +990,22 @@ int CacheRawRead (Cache_t *cache, uint64_t off, uint32_t len, void *buf) - */ - int CacheRawWrite (Cache_t *cache, uint64_t off, uint32_t len, void *buf) - { -- uint64_t result; -+ off_t result1; -+ ssize_t result2; - - /* Both offset and length must be multiples of the device block size */ - if (off % cache->DevBlockSize) return (EINVAL); - if (len % cache->DevBlockSize) return (EINVAL); - - /* Seek to the position */ -- result = lseek (cache->FD_W, off, SEEK_SET); -- if (result < 0) return (errno); -- if (result != off) return (ENXIO); -+ result1 = lseek (cache->FD_W, off, SEEK_SET); -+ if (result1 < 0) return (errno); -+ if (result1 != off) return (ENXIO); - - /* Write into the buffer */ -- result = write (cache->FD_W, buf, len); -- if (result < 0) return (errno); -- if (result == 0) return (ENXIO); -+ result2 = write (cache->FD_W, buf, len); -+ if (result2 < 0) return (errno); -+ if (result2 == 0) return (ENXIO); - - /* Update counters */ - cache->DiskWrite++; diff --git a/utils/hfsprogs/patches/0012-Fix-mkfs-not-creating-UUIDs-for-new-filesystems.patch b/utils/hfsprogs/patches/0012-Fix-mkfs-not-creating-UUIDs-for-new-filesystems.patch deleted file mode 100644 index 883a7b7..0000000 --- a/utils/hfsprogs/patches/0012-Fix-mkfs-not-creating-UUIDs-for-new-filesystems.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Matthew Garrett -Date: Thu, 24 Oct 2013 01:11:22 -0200 -Subject: Fix mkfs not creating UUIDs for new filesystems. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fix mkfs not creating UUIDs for new filesystems. - -Thanks to Lars Noodén for reporting the bug at - . - -This closes LP: #737002. ---- - include/missing.h | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/include/missing.h b/include/missing.h -index 0a859c4..f50e8fb 100644 ---- a/include/missing.h -+++ b/include/missing.h -@@ -72,7 +72,7 @@ - #define NAME_MAX 255 - - /* Byteswap stuff */ --#define NXSwapHostLongToBig(x) cpu_to_be64(x) -+#define NXSwapHostLongToBig(x) cpu_to_be32(x) - #define NXSwapBigShortToHost(x) be16_to_cpu(x) - #define OSSwapBigToHostInt16(x) be16_to_cpu(x) - #define NXSwapBigLongToHost(x) be32_to_cpu(x) -@@ -88,6 +88,9 @@ - #ifndef be32_to_cpu - #define be32_to_cpu(x) bswap_32(x) - #endif -+#ifndef cpu_to_be32 -+#define cpu_to_be32(x) bswap_32(x) -+#endif - #ifndef be64_to_cpu - #define be64_to_cpu(x) bswap_64(x) - #endif -@@ -102,6 +105,9 @@ - #ifndef be32_to_cpu - #define be32_to_cpu(x) (x) - #endif -+#ifndef cpu_to_be32 -+#define cpu_to_be32(x) (x) -+#endif - #ifndef be64_to_cpu - #define be64_to_cpu(x) (x) - #endif diff --git a/utils/hfsprogs/patches/0013-Fix-manpages.patch b/utils/hfsprogs/patches/0013-Fix-manpages.patch deleted file mode 100644 index d78083b..0000000 --- a/utils/hfsprogs/patches/0013-Fix-manpages.patch +++ /dev/null @@ -1,157 +0,0 @@ -From: =?UTF-8?q?Rog=C3=A9rio=20Theodoro=20de=20Brito?= -Date: Thu, 25 Nov 2010 00:00:00 -0200 -Subject: Fix manpages -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Remove typos, references in the "See also" sections of the manpages to -commands that are not available in Debian systems (and, quite probably, -other systems too) and non-Linux specific comments. - -Authored also by Christoph Hellwig and "A. Costa" - -Bug-Debian: http://bugs.debian.org/598714 -Bug-Debian: http://bugs.debian.org/575201 -Forwarded: no -Reviewed-by: Rogério Theodoro de Brito ---- - fsck_hfs.tproj/fsck_hfs.8 | 18 +++++++----------- - newfs_hfs.tproj/newfs_hfs.8 | 23 ++++++++--------------- - 2 files changed, 15 insertions(+), 26 deletions(-) - -diff --git a/fsck_hfs.tproj/fsck_hfs.8 b/fsck_hfs.tproj/fsck_hfs.8 -index aec9949..0bc804d 100644 ---- a/fsck_hfs.tproj/fsck_hfs.8 -+++ b/fsck_hfs.tproj/fsck_hfs.8 -@@ -19,18 +19,18 @@ - .Dt FSCK_HFS 8 - .Os "Mac OS X" - .Sh NAME --.Nm fsck_hfs -+.Nm fsck.hfs - .Nd HFS file system consistency check - .Sh SYNOPSIS --.Nm fsck_hfs -+.Nm fsck.hfs - .Fl q - .Op Fl df - .Ar special ... --.Nm fsck_hfs -+.Nm fsck.hfs - .Fl p - .Op Fl df - .Ar special ... --.Nm fsck_hfs -+.Nm fsck.hfs - .Op Fl n | y | r - .Op Fl dfgl - .Op Fl m Ar mode -@@ -52,9 +52,7 @@ The second form of - preens the specified file systems. - It is normally started by - .Xr fsck 8 --run from --.Pa /etc/rc.boot --during automatic reboot, when a HFS file system is detected. -+during systen boot, when a HFS file system is detected. - When preening file systems, - .Nm - will fix common inconsistencies for file systems that were not -@@ -105,9 +103,9 @@ to check and repair journaled HFS+ file systems. - .It Fl g - Causes - .Nm --to generate it's output strings in GUI format. -+to generate its output strings in GUI format. - This option is used when another application with a graphical user interface --(like Mac OS X Disk Utility) is envoking the -+(like Mac OS X Disk Utility) is invoking the - .Nm - tool. - .It Fl l -@@ -144,8 +142,6 @@ specified file system for a new catalog file and if there is no damage - to the leaf nodes in the existing catalog file. - .El - .Pp --Because of inconsistencies between the block device and the buffer cache, --the raw device should always be used. - .Sh SEE ALSO - .Xr fsck 8 - .Sh BUGS -diff --git a/newfs_hfs.tproj/newfs_hfs.8 b/newfs_hfs.tproj/newfs_hfs.8 -index d002cc9..fe91962 100644 ---- a/newfs_hfs.tproj/newfs_hfs.8 -+++ b/newfs_hfs.tproj/newfs_hfs.8 -@@ -19,10 +19,10 @@ - .Dt NEWFS_HFS 8 - .Os "Mac OS X" - .Sh NAME --.Nm newfs_hfs -+.Nm mkfs.hfs - .Nd construct a new HFS Plus file system - .Sh SYNOPSIS --.Nm newfs_hfs -+.Nm mkfs.hfs - .Op Fl N Ar [partition-size] - .Op Fl U Ar uid - .Op Fl G Ar gid -@@ -37,19 +37,13 @@ - .Op Fl v Ar volume-name - .Ar special - .Sh DESCRIPTION --.Nm Newfs_hfs -+.Nm mkfs.hfs - builds an HFS Plus file system on the specified special device. --Before running --.Nm newfs_hfs --the disk should be partitioned using the --.Em Disk Utility --application or --.Xr pdisk 8 . - .Pp - The file system default parameters are calculated based on - the size of the disk partition. Typically the defaults are - reasonable, however --.Nm newfs_hfs -+.Nm mkfs.hfs - has several options to allow the defaults to be selectively overridden. - The options are as follows: - .Bl -tag -width Fl -@@ -66,7 +60,7 @@ Set the group of the file system's root directory to - Specify the access permissions mask for the file system's root directory. - .It Fl h - Creates a legacy HFS format filesystem. This option --is not recomended for file systems that will be -+is not recommended for file systems that will be - primarily used with Mac OS X or Darwin. - .It Fl s - Creates a case-sensitive HFS Plus filesystem. By -@@ -93,7 +87,7 @@ sizes are specified with the - option followed by a comma - separated list of the form arg=blocks. - .Pp --Example: -c c=5000,e=500 -+Example: \-c c=5000,e=500 - .Bl -tag -width Fl - .It Em a=blocks - Set the attribute file clump size. -@@ -126,7 +120,7 @@ the form arg=bytes. The - size must be a power of two and no larger than - 32768 bytes. - .Pp --Example: -n c=8192,e=4096 -+Example: \-n c=8192,e=4096 - .Bl -tag -width Fl - .It Em a=bytes - Set the attribute b-tree node size. -@@ -139,8 +133,7 @@ Set the extent overflow b-tree node size. - Volume name (file system name) in ascii or UTF-8 format. - .El - .Sh SEE ALSO --.Xr mount 8 , --.Xr pdisk 8 -+.Xr mount 8 - .Sh HISTORY - The - .Nm diff --git a/utils/hfsprogs/patches/0014-uClibc_no_loadavg.patch b/utils/hfsprogs/patches/0014-uClibc_no_loadavg.patch deleted file mode 100644 index 48649ba..0000000 --- a/utils/hfsprogs/patches/0014-uClibc_no_loadavg.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- diskdev_cmds-332.25/newfs_hfs.tproj/makehfs.c 2015-03-27 21:58:04.163171675 -0700 -+++ hfsprogs-332.25/newfs_hfs.tproj/makehfs.c 2015-03-27 21:56:03.687175020 -0700 -@@ -2119,10 +2119,12 @@ - sysctl(mib, 2, sysctlstring, &datalen, NULL, 0); - SHA1_Update(&context, sysctlstring, datalen); - #endif -+#ifndef __UCLIBC__ - /* The system's load average: */ - datalen = sizeof(sysloadavg); - getloadavg(sysloadavg, 3); - SHA1_Update(&context, &sysloadavg, datalen); -+#endif - - /* The system's VM statistics: */ - #if !LINUX diff --git a/utils/hfsprogs/patches/0015-sysctl-only-on-glibc.patch b/utils/hfsprogs/patches/0015-sysctl-only-on-glibc.patch deleted file mode 100644 index b71290f..0000000 --- a/utils/hfsprogs/patches/0015-sysctl-only-on-glibc.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- a/newfs_hfs.tproj/makehfs.c -+++ b/newfs_hfs.tproj/makehfs.c -@@ -37,7 +37,9 @@ - #endif - #include - #include -+#ifdef __GLIBC__ - #include -+#endif - #if !LINUX - #include - #endif -@@ -2039,6 +2041,7 @@ getencodinghint(unsigned char *name) - if (getvfsbyname("hfs", &vfc) < 0) - goto error; - -+#ifdef __GLIBC__ - mib[0] = CTL_VFS; - mib[1] = vfc.vfc_typenum; - mib[2] = HFS_ENCODINGHINT; -@@ -2046,6 +2049,7 @@ getencodinghint(unsigned char *name) - if (sysctl(mib, 3, &hint, &buflen, name, strlen((char *)name) + 1) < 0) - goto error; - return (hint); -+#endif - error: - hint = GetDefaultEncoding(); - return (0); -@@ -2062,7 +2066,7 @@ void GenerateVolumeUUID(VolumeUUID *newV - clock_t uptime; - size_t datalen; - double sysloadavg[3]; --#if !LINUX -+#if !LINUX && defined(__GLIBC__) - int sysdata; - int mib[2]; - char sysctlstring[128]; -@@ -2080,7 +2084,7 @@ void GenerateVolumeUUID(VolumeUUID *newV - SHA1_Update(&context, &uptime, sizeof(uptime)); - - /* The kernel's boot time: */ --#if !LINUX -+#if !LINUX && defined(__GLIBC__) - mib[0] = CTL_KERN; - mib[1] = KERN_BOOTTIME; - datalen = sizeof(sysdata); -@@ -2088,7 +2092,7 @@ void GenerateVolumeUUID(VolumeUUID *newV - SHA1_Update(&context, &sysdata, datalen); - #endif - /* The system's host id: */ --#if !LINUX -+#if !LINUX && defined(__GLIBC__) - mib[0] = CTL_KERN; - mib[1] = KERN_HOSTID; - datalen = sizeof(sysdata); -@@ -2096,7 +2100,7 @@ void GenerateVolumeUUID(VolumeUUID *newV - SHA1_Update(&context, &sysdata, datalen); - #endif - /* The system's host name: */ --#if !LINUX -+#if !LINUX && defined(__GLIBC__) - mib[0] = CTL_KERN; - mib[1] = KERN_HOSTNAME; - datalen = sizeof(sysctlstring); -@@ -2104,7 +2108,7 @@ void GenerateVolumeUUID(VolumeUUID *newV - SHA1_Update(&context, sysctlstring, datalen); - #endif - /* The running kernel's OS release string: */ --#if !LINUX -+#if !LINUX && defined(__GLIBC__) - mib[0] = CTL_KERN; - mib[1] = KERN_OSRELEASE; - datalen = sizeof(sysctlstring); -@@ -2112,7 +2116,7 @@ void GenerateVolumeUUID(VolumeUUID *newV - SHA1_Update(&context, sysctlstring, datalen); - #endif - /* The running kernel's version string: */ --#if !LINUX -+#if !LINUX && defined(__GLIBC__) - mib[0] = CTL_KERN; - mib[1] = KERN_VERSION; - datalen = sizeof(sysctlstring); -@@ -2127,7 +2131,7 @@ void GenerateVolumeUUID(VolumeUUID *newV - #endif - - /* The system's VM statistics: */ --#if !LINUX -+#if !LINUX && defined(__GLIBC__) - mib[0] = CTL_VM; - mib[1] = VM_METER; - datalen = sizeof(sysvmtotal); diff --git a/utils/io/Makefile b/utils/io/Makefile new file mode 100644 index 0000000..a861e74 --- /dev/null +++ b/utils/io/Makefile @@ -0,0 +1,36 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=io +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +PKG_MAINTAINER:=Hauke Mehrtens + +define Package/io + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Raw memory i/o utility + URL:=http://www.sleepie.demon.co.uk/linuxvme/io.c +endef + +define Package/io/description + This tool can be used to access physical memory addresses from userspace. + It can be useful to access hardware for which no device driver exists! +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -Wall $(PKG_BUILD_DIR)/io.c -o $(PKG_BUILD_DIR)/$(PKG_NAME) +endef + +define Package/io/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/io $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,io)) diff --git a/utils/io/src/io.c b/utils/io/src/io.c new file mode 100644 index 0000000..2572054 --- /dev/null +++ b/utils/io/src/io.c @@ -0,0 +1,428 @@ +/* + * Simple app. to do memory accesses via /dev/mem. + * + * + * Copyright (c) Richard Hirst + * Copyright (c) Thomas Langer + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MEM_READ 0 +#define MEM_WRITE 1 +#define MEM_AND 2 +#define MEM_OR 3 + +static void +usage (char *argv0) +{ + fprintf(stderr, +"Raw memory i/o utility - $Revision: 2.0 $\n\n" +"%s -v -1|2|4 -r|w|a|o [-l ] [-f ] []\n\n" +" -v Verbose, asks for confirmation\n" +" -1|2|4 Sets memory access size in bytes (default byte)\n" +" -l Length in bytes of area to access (defaults to\n" +" one access, or whole file length)\n" +" -r|w|a|o Read from or Write to memory (default read)\n" +" optional write with modify (and/or)\n" +" -f File to write on memory read, or\n" +" to read on memory write\n" +" The memory address to access\n" +" The value to write (implies -w)\n\n" +"Examples:\n" +" %s 0x1000 Reads one byte from 0x1000\n" +" %s 0x1000 0x12 Writes 0x12 to location 0x1000\n" +" %s -2 -l 8 0x1000 Reads 8 words from 0x1000\n" +" %s -r -f dmp -l 100 200 Reads 100 bytes from addr 200 to file\n" +" %s -w -f img 0x10000 Writes the whole of file to memory\n" +"\n" +"Note access size (-1|2|4) does not apply to file based accesses.\n\n", + argv0, argv0, argv0, argv0, argv0, argv0); + exit(1); +} + + +static void +memread_memory(unsigned long phys_addr, void *addr, int len, int iosize) +{ + int i; + + while (len) { + printf("%08lx: ", phys_addr); + i = 0; + while (i < 16 && len) { + switch(iosize) { + case 1: + printf(" %02x", *(unsigned char *)addr); + break; + case 2: + printf(" %04x", *(unsigned short *)addr); + break; + case 4: + printf(" %08lx", *(unsigned long *)addr); + break; + } + i += iosize; + addr += iosize; + len -= iosize; + } + phys_addr += 16; + printf("\n"); + } +} + + +static void +write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) +{ + switch(iosize) { + case 1: + while (len) { + *(unsigned char *)addr = value; + len -= iosize; + addr += iosize; + } + break; + case 2: + while (len) { + *(unsigned short *)addr = value; + len -= iosize; + addr += iosize; + } + break; + case 4: + while (len) { + *(unsigned long *)addr = value; + len -= iosize; + addr += iosize; + } + break; + } +} + + +static void +and_write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) +{ + switch(iosize) { + case 1: + while (len) { + *(unsigned char *)addr &= value; + len -= iosize; + addr += iosize; + } + break; + case 2: + while (len) { + *(unsigned short *)addr &= value; + len -= iosize; + addr += iosize; + } + break; + case 4: + while (len) { + *(unsigned long *)addr &= value; + len -= iosize; + addr += iosize; + } + break; + } +} + + +static void +or_write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) +{ + switch(iosize) { + case 1: + while (len) { + *(unsigned char *)addr |= value; + len -= iosize; + addr += iosize; + } + break; + case 2: + while (len) { + *(unsigned short *)addr |= value; + len -= iosize; + addr += iosize; + } + break; + case 4: + while (len) { + *(unsigned long *)addr |= value; + len -= iosize; + addr += iosize; + } + break; + } +} + + +int +main (int argc, char **argv) +{ + int mfd, ffd = 0, req_len = 0, opt; + void *real_io; + unsigned long real_len, real_addr, req_addr, req_value = 0, offset; + char *endptr; + int memfunc = MEM_READ; + int iosize = 1; + char *filename = NULL; + int verbose = 0; + + opterr = 0; + if (argc == 1) + usage(argv[0]); + + while ((opt = getopt(argc, argv, "hv124rwaol:f:")) > 0) { + switch (opt) { + case 'h': + usage(argv[0]); + case 'v': + verbose = 1; + break; + case '1': + case '2': + case '4': + iosize = opt - '0'; + break; + case 'r': + memfunc = MEM_READ; + break; + case 'a': + memfunc = MEM_AND; + break; + case 'o': + memfunc = MEM_OR; + break; + case 'w': + memfunc = MEM_WRITE; + break; + case 'l': + req_len = strtoul(optarg, &endptr, 0); + if (*endptr) { + fprintf(stderr, "Bad value '%s'\n", optarg); + exit(1); + } + break; + case 'f': + filename = strdup(optarg); + break; + default: + fprintf(stderr, "Unknown option: %c\n", opt); + usage(argv[0]); + } + } + + if (optind == argc) { + fprintf(stderr, "No address given\n"); + exit(1); + } + req_addr = strtoul(argv[optind], &endptr, 0); + if (*endptr) { + fprintf(stderr, "Bad value '%s'\n", argv[optind]); + exit(1); + } + optind++; + if (!filename && (memfunc == MEM_READ) && optind < argc) { + memfunc = MEM_WRITE; + } + if (filename && optind > argc) { + fprintf(stderr, "Filename AND value given\n"); + exit(1); + } + if (!filename && (memfunc != MEM_READ) && optind == argc) { + fprintf(stderr, "No value given for WRITE\n"); + exit(1); + } + if (!filename && (memfunc != MEM_READ)) { + req_value = strtoul(argv[optind], &endptr, 0); + if (*endptr) { + fprintf(stderr, "Bad value '%s'\n", argv[optind]); + exit(1); + } + if ((iosize == 1 && (req_value & 0xffffff00)) || + (iosize == 2 && (req_value & 0xffff0000))) { + fprintf(stderr, " too large\n"); + exit(1); + } + optind++; + } + if (filename && (memfunc == MEM_READ) && !req_len) { + fprintf(stderr, "No size given for file memread\n"); + exit(1); + } + if (optind < argc) { + fprintf(stderr, "Too many arguments '%s'...\n", argv[optind]); + exit(1); + } + if (filename && (memfunc == MEM_READ)) { + ffd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); + if (ffd < 0) { + fprintf(stderr, "Failed to open destination file '%s': %s\n", filename, strerror(errno)); + exit(1); + } + } + if (filename && (memfunc != MEM_READ)) { + ffd = open(filename, O_RDONLY); + if (ffd < 0) { + fprintf(stderr, "Failed to open source file '%s': %s\n", filename, strerror(errno)); + exit(1); + } + } + + if (filename && !req_len) { + req_len = lseek(ffd, 0, SEEK_END); + if (req_len < 0) { + fprintf(stderr, "Failed to seek on '%s': %s\n", + filename, strerror(errno)); + exit(1); + } + if (lseek(ffd, 0, SEEK_SET)) { + fprintf(stderr, "Failed to seek on '%s': %s\n", + filename, strerror(errno)); + exit(1); + } + } + if (!req_len) + req_len = iosize; + + if ((iosize == 2 && (req_addr & 1)) || + (iosize == 4 && (req_addr & 3))) { + fprintf(stderr, "Badly aligned for access size\n"); + exit(1); + } + if ((iosize == 2 && (req_len & 1)) || + (iosize == 4 && (req_len & 3))) { + fprintf(stderr, "Badly aligned for access size\n"); + exit(1); + } + + if (!verbose) + /* Nothing */; + else if (filename && (memfunc == MEM_READ)) + printf("Request to read 0x%x bytes from address 0x%08lx\n" + "\tto file %s, using %d byte accesses\n", + req_len, req_addr, filename, iosize); + else if (filename) + printf("Request to write 0x%x bytes to address 0x%08lx\n" + "\tfrom file %s, using %d byte accesses\n", + req_len, req_addr, filename, iosize); + else if (memfunc == MEM_READ) + printf("Request to read 0x%x bytes from address 0x%08lx\n" + "\tusing %d byte accesses\n", + req_len, req_addr, iosize); + else + printf("Request to write 0x%x bytes to address 0x%08lx\n" + "\tusing %d byte accesses of value 0x%0*lx\n", + req_len, req_addr, iosize, iosize*2, req_value); + + real_addr = req_addr & ~4095; + if (real_addr == 0xfffff000) { + fprintf(stderr, "Sorry, cannot map the top 4K page\n"); + exit(1); + } + offset = req_addr - real_addr; + real_len = req_len + offset; + real_len = (real_len + 4095) & ~ 4095; + if (real_addr + real_len < real_addr) { + fprintf(stderr, "Aligned addr+len exceeds top of address space\n"); + exit(1); + } + if (verbose) + printf("Attempting to map 0x%lx bytes at address 0x%08lx\n", + real_len, real_addr); + + mfd = open("/dev/mem", (memfunc == MEM_READ) ? O_RDONLY : O_RDWR); + if (mfd == -1) { + perror("open /dev/mem"); + fprintf(stderr, "Is CONFIG_DEVMEM activated?\n"); + exit(1); + } + if (verbose) + printf("open(/dev/mem) ok\n"); + real_io = mmap(NULL, real_len, + (memfunc == MEM_READ) ? PROT_READ:PROT_READ|PROT_WRITE, + MAP_SHARED, mfd, real_addr); + if (real_io == (void *)(-1)) { + fprintf(stderr, "mmap() failed: %s\n", strerror(errno)); + exit(1); + } + if (verbose) + printf("mmap() ok\n"); + + if (verbose) { + int c; + + printf("OK? "); + fflush(stdout); + c = getchar(); + if (c != 'y' && c != 'Y') { + printf("Aborted\n"); + exit(1); + } + } + + if (filename && (memfunc == MEM_READ)) { + int n = write(ffd, real_io + offset, req_len); + + if (n < 0) { + fprintf(stderr, "File write failed: %s\n", strerror(errno)); + exit(1); + } + else if (n != req_len) { + fprintf(stderr, "Only wrote %d of %d bytes to file\n", + n, req_len); + exit(1); + } + } + else if (filename) { + int n = read(ffd, real_io + offset, req_len); + + if (n < 0) { + fprintf(stderr, "File read failed: %s\n", strerror(errno)); + exit(1); + } + else if (n != req_len) { + fprintf(stderr, "Only read %d of %d bytes from file\n", + n, req_len); + exit(1); + } + } + else { + switch (memfunc) + { + case MEM_READ: + memread_memory(req_addr, real_io + offset, req_len, iosize); + break; + case MEM_WRITE: + write_memory(req_addr, real_io + offset, req_len, iosize, req_value); + break; + case MEM_AND: + and_write_memory(req_addr, real_io + offset, req_len, iosize, req_value); + break; + case MEM_OR: + or_write_memory(req_addr, real_io + offset, req_len, iosize, req_value); + break; + } + } + + munmap(real_io, real_len); + + if (filename) + close(ffd); + close (mfd); + + return 0; +} + diff --git a/utils/irqbalance/Makefile b/utils/irqbalance/Makefile new file mode 100644 index 0000000..3777fde --- /dev/null +++ b/utils/irqbalance/Makefile @@ -0,0 +1,52 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=irqbalance +PKG_VERSION:=1.2.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/Irqbalance/irqbalance.git +PKG_SOURCE_VERSION:=0e0dd4cfe5464de2f81eaef504eab7183f1fb030 +PKG_MIRROR_HASH:=c826e78babfc26f777a5791b2a6ea95b61453ba3e3c5803d4428cc803216bc5c +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_LICENSE:=GPLv2 + +PKG_MAINTAINER:=Hannu Nyman + +PKG_FIXUP:=autoreconf +PKG_REMOVE_FILES:=autogen.sh + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/irqbalance + SECTION:=utils + CATEGORY:=Utilities + TITLE:=IRQ usage balancing for multi-core systems + URL:=https://github.com/Irqbalance/irqbalance +endef + +define Package/irqbalance/description + The purpose of irqbalance is to distribute hardware interrupts across + processors/cores on a multiprocessor/multicore system in order to + increase performance. +endef + +CONFIGURE_ARGS+= \ + --disable-numa \ + --with-libcap_ng=no \ + --with-systemd=no \ + --without-glib2 + +define Package/irqbalance/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/irqbalance $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,irqbalance)) diff --git a/utils/irqbalance/patches/100-disable-ui-compilation.patch b/utils/irqbalance/patches/100-disable-ui-compilation.patch new file mode 100644 index 0000000..5793ec6 --- /dev/null +++ b/utils/irqbalance/patches/100-disable-ui-compilation.patch @@ -0,0 +1,47 @@ +Revert upstream commit bf9297132d219539e07506c125c6801dd77202f4 +to prevent building the UI component. Also disable manpage. + +--- a/Makefile.am ++++ b/Makefile.am +@@ -24,19 +24,14 @@ AUTOMAKE_OPTIONS = no-dependencies + ACLOCAL_AMFLAGS = -I m4 + EXTRA_DIST = COPYING autogen.sh misc/irqbalance.service misc/irqbalance.env + +-UI_DIR = ui + AM_CFLAGS = $(LIBCAP_NG_CFLAGS) $(GLIB_CFLAGS) + AM_CPPFLAGS = -I${top_srcdir} -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE + noinst_HEADERS = bitmap.h constants.h cpumask.h irqbalance.h non-atomic.h \ +- types.h $(UI_DIR)/helpers.h $(UI_DIR)/irqbalance-ui.h $(UI_DIR)/ui.h +-sbin_PROGRAMS = irqbalance irqbalance-ui ++ types.h ++sbin_PROGRAMS = irqbalance + irqbalance_SOURCES = activate.c bitmap.c classify.c cputree.c irqbalance.c \ + irqlist.c numa.c placement.c procinterrupts.c + irqbalance_LDADD = $(LIBCAP_NG_LIBS) $(GLIB_LIBS) +-irqbalance_ui_SOURCES = $(UI_DIR)/helpers.c $(UI_DIR)/irqbalance-ui.c \ +- $(UI_DIR)/ui.c +-irqbalance_ui_LDADD = $(GLIB_LIBS) $(CURSES_LIBS) +-dist_man_MANS = irqbalance.1 + + CONFIG_CLEAN_FILES = debug*.list config/* + clean-generic: +--- a/configure.ac ++++ b/configure.ac +@@ -3,7 +3,7 @@ AC_PREREQ(2.12)dnl + AM_CONFIG_HEADER(config.h) + + AC_CONFIG_MACRO_DIR([m4]) +-AM_INIT_AUTOMAKE([foreign] [subdir-objects]) ++AM_INIT_AUTOMAKE([foreign]) + AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + +@@ -26,8 +26,6 @@ AC_CHECK_FUNCS(getopt_long) + AC_CHECK_LIB(numa, numa_available) + AC_CHECK_LIB(m, floor) + +-AC_CHECK_LIB(curses, mvprintw) +- + AC_C_CONST + AC_C_INLINE + AM_PROG_CC_C_O diff --git a/utils/irqbalance/patches/200-avoid-glib.patch b/utils/irqbalance/patches/200-avoid-glib.patch new file mode 100644 index 0000000..3c20196 --- /dev/null +++ b/utils/irqbalance/patches/200-avoid-glib.patch @@ -0,0 +1,421 @@ +Revert upstream commit d1993bcde2a524346a9508754671f096ec129ad1 +to avoid glib dependency. That commit polluted the main code +with glib types. + +--- a/irqbalance.h ++++ b/irqbalance.h +@@ -8,7 +8,6 @@ + + #include + #include +-#include + #include + #include + +@@ -63,7 +62,6 @@ extern GList *packages; + extern GList *cache_domains; + extern GList *cpus; + extern int numa_avail; +-extern GList *cl_banned_irqs; + + extern int debug_mode; + extern int journal_logging; +@@ -171,7 +169,5 @@ extern unsigned int log_mask; + }while(0) + #endif /* HAVE_LIBSYSTEMD */ + +-#define SOCKET_PATH "irqbalance" +- + #endif /* __INCLUDE_GUARD_IRQBALANCE_H_ */ + +--- a/irqbalance.c ++++ b/irqbalance.c +@@ -31,8 +31,6 @@ + #include + #include + #include +-#include +-#include + #include + #ifdef HAVE_GETOPT_LONG + #include +@@ -44,7 +42,6 @@ + #include "irqbalance.h" + + volatile int keep_going = 1; +-int socket_fd; + int one_shot_mode; + int debug_mode; + int foreground_mode; +@@ -61,9 +58,6 @@ char *banscript = NULL; + char *polscript = NULL; + long HZ; + int sleep_interval = SLEEP_INTERVAL; +-GMainLoop *main_loop; +- +-char *banned_cpumask_from_ui = NULL; + + static void sleep_approx(int seconds) + { +@@ -236,224 +230,22 @@ static void force_rebalance_irq(struct i + info->assigned_obj = NULL; + } + +-gboolean handler(gpointer data __attribute__((unused))) ++static void handler(int signum) + { ++ (void)signum; + keep_going = 0; +- g_main_loop_quit(main_loop); +- return TRUE; + } + +-gboolean force_rescan(gpointer data __attribute__((unused))) ++static void force_rescan(int signum) + { ++ (void)signum; + if (cycle_count) + need_rescan = 1; +- return TRUE; +-} +- +-gboolean scan(gpointer data) +-{ +- log(TO_CONSOLE, LOG_INFO, "\n\n\n-----------------------------------------------------------------------------\n"); +- clear_work_stats(); +- parse_proc_interrupts(); +- parse_proc_stat(); +- +- +- /* cope with cpu hotplug -- detected during /proc/interrupts parsing */ +- if (need_rescan) { +- need_rescan = 0; +- cycle_count = 0; +- log(TO_CONSOLE, LOG_INFO, "Rescanning cpu topology \n"); +- clear_work_stats(); +- +- free_object_tree(); +- build_object_tree(); +- for_each_irq(NULL, force_rebalance_irq, NULL); +- parse_proc_interrupts(); +- parse_proc_stat(); +- sleep_approx(sleep_interval); +- clear_work_stats(); +- parse_proc_interrupts(); +- parse_proc_stat(); +- } +- +- if (cycle_count) +- update_migration_status(); +- +- calculate_placement(); +- activate_mappings(); +- +- if (debug_mode) +- dump_tree(); +- if (one_shot_mode) +- keep_going = 0; +- cycle_count++; +- +- if (data != &sleep_interval) { +- data = &sleep_interval; +- g_timeout_add_seconds(sleep_interval, scan, data); +- return FALSE; +- } +- +- if (keep_going) +- return TRUE; +- else +- return FALSE; +-} +- +-void get_irq_data(struct irq_info *irq, void *data) +-{ +- sprintf(data + strlen(data), +- "IRQ %d LOAD %lu DIFF %lu CLASS %d ", irq->irq, irq->load, +- (irq->irq_count - irq->last_irq_count), irq->class); +-} +- +-void get_object_stat(struct topo_obj *object, void *data) +-{ +- char irq_data[1024] = "\0"; +- +- if (g_list_length(object->interrupts) > 0) { +- for_each_irq(object->interrupts, get_irq_data, irq_data); +- } +- sprintf(data + strlen(data), "TYPE %d NUMBER %d LOAD %lu SAVE_MODE %d %s", +- object->obj_type, object->number, object->load, +- object->powersave_mode, irq_data); +- if (object->obj_type != OBJ_TYPE_CPU) { +- for_each_object(object->children, get_object_stat, data); +- } +-} +- +-gboolean sock_handle(gint fd, GIOCondition condition, gpointer user_data __attribute__((unused))) +-{ +- char buff[500]; +- int sock; +- int recv_size = 0; +- int valid_user = 0; +- +- struct iovec iov = { buff, 500 }; +- struct msghdr msg = { NULL, 0, &iov, 1, NULL, 0, 0 }; +- msg.msg_control = malloc(CMSG_SPACE(sizeof(struct ucred))); +- msg.msg_controllen = CMSG_SPACE(sizeof(struct ucred)); +- +- struct cmsghdr *cmsg; +- +- if (condition == G_IO_IN) { +- sock = accept(fd, NULL, NULL); +- if (sock < 0) { +- log(TO_ALL, LOG_WARNING, "Connection couldn't be accepted.\n"); +- return TRUE; +- } +- if ((recv_size = recvmsg(sock, &msg, 0)) < 0) { +- log(TO_ALL, LOG_WARNING, "Error while receiving data.\n"); +- return TRUE; +- } +- cmsg = CMSG_FIRSTHDR(&msg); +- if ((cmsg->cmsg_level == SOL_SOCKET) && +- (cmsg->cmsg_type == SCM_CREDENTIALS)) { +- struct ucred *credentials = (struct ucred *) CMSG_DATA(cmsg); +- if (!credentials->uid) { +- valid_user = 1; +- } +- } +- if (!valid_user) { +- log(TO_ALL, LOG_INFO, "Permission denied for user to connect to socket.\n"); +- return TRUE; +- } +- +- if (!strncmp(buff, "stats", strlen("stats"))) { +- char stats[2048] = "\0"; +- for_each_object(numa_nodes, get_object_stat, stats); +- send(sock, stats, strlen(stats), 0); +- } +- if (!strncmp(buff, "settings ", strlen("settings "))) { +- if (!(strncmp(buff + strlen("settings "), "sleep ", +- strlen("sleep ")))) { +- char *sleep_string = malloc( +- sizeof(char) * (recv_size - strlen("settings sleep "))); +- strncpy(sleep_string, buff + strlen("settings sleep "), +- recv_size - strlen("settings sleep ")); +- int new_iterval = strtoul(sleep_string, NULL, 10); +- if (new_iterval >= 1) { +- sleep_interval = new_iterval; +- } +- } else if (!(strncmp(buff + strlen("settings "), "ban irqs ", +- strlen("ban irqs ")))) { +- char *end; +- char *irq_string = malloc( +- sizeof(char) * (recv_size - strlen("settings ban irqs "))); +- strncpy(irq_string, buff + strlen("settings ban irqs "), +- recv_size - strlen("settings ban irqs ")); +- g_list_free_full(cl_banned_irqs, free); +- cl_banned_irqs = NULL; +- need_rescan = 1; +- if (!strncmp(irq_string, "NONE", strlen("NONE"))) { +- return TRUE; +- } +- int irq = strtoul(irq_string, &end, 10); +- do { +- add_cl_banned_irq(irq); +- } while((irq = strtoul(end, &end, 10))); +- } else if (!(strncmp(buff + strlen("settings "), "cpus ", +- strlen("cpus")))) { +- char *cpu_ban_string = malloc( +- sizeof(char) * (recv_size - strlen("settings cpus "))); +- strncpy(cpu_ban_string, buff + strlen("settings cpus "), +- recv_size - strlen("settings cpus ")); +- banned_cpumask_from_ui = strtok(cpu_ban_string, " "); +- if (!strncmp(banned_cpumask_from_ui, "NULL", strlen("NULL"))) { +- banned_cpumask_from_ui = NULL; +- } +- need_rescan = 1; +- } +- } +- if (!strncmp(buff, "setup", strlen("setup"))) { +- char setup[2048] = "\0"; +- snprintf(setup, 2048, "SLEEP %d ", sleep_interval); +- if(g_list_length(cl_banned_irqs) > 0) { +- for_each_irq(cl_banned_irqs, get_irq_data, setup); +- } +- char banned[512]; +- cpumask_scnprintf(banned, 512, banned_cpus); +- snprintf(setup + strlen(setup), 2048 - strlen(setup), +- "BANNED %s", banned); +- send(sock, setup, strlen(setup), 0); +- } +- +- close(sock); +- } +- return TRUE; +-} +- +-int init_socket(char *socket_name) +-{ +- struct sockaddr_un addr; +- memset(&addr, 0, sizeof(struct sockaddr_un)); +- +- socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0); +- if (socket_fd < 0) { +- log(TO_ALL, LOG_WARNING, "Socket couldn't be created.\n"); +- return 1; +- } +- +- addr.sun_family = AF_UNIX; +- addr.sun_path[0] = '\0'; +- strncpy(addr.sun_path + 1, socket_name, strlen(socket_name)); +- if (bind(socket_fd, (struct sockaddr *)&addr, +- sizeof(sa_family_t) + strlen(socket_name) + 1) < 0) { +- log(TO_ALL, LOG_WARNING, "Daemon couldn't be bound to the socket.\n"); +- return 1; +- } +- int optval = 1; +- if (setsockopt(socket_fd, SOL_SOCKET, SO_PASSCRED, &optval, sizeof(optval)) < 0) { +- log(TO_ALL, LOG_WARNING, "Unable to set socket options.\n"); +- return 1; +- } +- listen(socket_fd, 1); +- g_unix_fd_add(socket_fd, G_IO_IN, sock_handle, NULL); +- return 0; + } + + int main(int argc, char** argv) + { ++ struct sigaction action, hupaction; + sigset_t sigset, old_sigset; + + sigemptyset(&sigset); +@@ -553,11 +345,19 @@ int main(int argc, char** argv) + } + } + +- g_unix_signal_add(SIGINT, handler, NULL); +- g_unix_signal_add(SIGTERM, handler, NULL); +- g_unix_signal_add(SIGUSR1, handler, NULL); +- g_unix_signal_add(SIGUSR2, handler, NULL); +- g_unix_signal_add(SIGHUP, force_rescan, NULL); ++ action.sa_handler = handler; ++ sigemptyset(&action.sa_mask); ++ action.sa_flags = 0; ++ sigaction(SIGINT, &action, NULL); ++ sigaction(SIGTERM, &action, NULL); ++ sigaction(SIGUSR1, &action, NULL); ++ sigaction(SIGUSR2, &action, NULL); ++ ++ hupaction.sa_handler = force_rescan; ++ sigemptyset(&hupaction.sa_mask); ++ hupaction.sa_flags = 0; ++ sigaction(SIGHUP, &hupaction, NULL); ++ + sigprocmask(SIG_SETMASK, &old_sigset, NULL); + + #ifdef HAVE_LIBCAP_NG +@@ -566,32 +366,58 @@ int main(int argc, char** argv) + capng_lock(); + capng_apply(CAPNG_SELECT_BOTH); + #endif ++ + for_each_irq(NULL, force_rebalance_irq, NULL); + + parse_proc_interrupts(); + parse_proc_stat(); + +- char socket_name[64]; +- snprintf(socket_name, 64, "%s%d.sock", SOCKET_PATH, getpid()); ++ while (keep_going) { ++ sleep_approx(sleep_interval); ++ log(TO_CONSOLE, LOG_INFO, "\n\n\n-----------------------------------------------------------------------------\n"); + +- if (init_socket(socket_name)) { +- return EXIT_FAILURE; +- } +- main_loop = g_main_loop_new(NULL, FALSE); +- int *last_interval = &sleep_interval; +- g_timeout_add_seconds(sleep_interval, scan, last_interval); +- g_main_loop_run(main_loop); + +- g_main_loop_quit(main_loop); ++ clear_work_stats(); ++ parse_proc_interrupts(); ++ parse_proc_stat(); ++ ++ /* cope with cpu hotplug -- detected during /proc/interrupts parsing */ ++ if (need_rescan) { ++ need_rescan = 0; ++ cycle_count = 0; ++ log(TO_CONSOLE, LOG_INFO, "Rescanning cpu topology \n"); ++ clear_work_stats(); ++ ++ free_object_tree(); ++ build_object_tree(); ++ for_each_irq(NULL, force_rebalance_irq, NULL); ++ parse_proc_interrupts(); ++ parse_proc_stat(); ++ sleep_approx(sleep_interval); ++ clear_work_stats(); ++ parse_proc_interrupts(); ++ parse_proc_stat(); ++ } ++ ++ if (cycle_count) ++ update_migration_status(); ++ ++ calculate_placement(); ++ activate_mappings(); + ++ if (debug_mode) ++ dump_tree(); ++ if (one_shot_mode) ++ keep_going = 0; ++ cycle_count++; ++ ++ } + free_object_tree(); + free_cl_opts(); + + /* Remove pidfile */ + if (!foreground_mode && pidfile) + unlink(pidfile); +- /* Remove socket */ +- close(socket_fd); + + return EXIT_SUCCESS; + } +--- a/cputree.c ++++ b/cputree.c +@@ -38,7 +38,6 @@ + + #include "irqbalance.h" + +-extern char *banned_cpumask_from_ui; + + GList *cpus; + GList *cache_domains; +@@ -77,15 +76,11 @@ static void setup_banned_cpus(void) + cpus_clear(nohz_full); + + /* A manually specified cpumask overrides auto-detection. */ +- if (banned_cpumask_from_ui != NULL) { +- cpulist_parse(banned_cpumask_from_ui, +- strlen(banned_cpumask_from_ui), banned_cpus); +- goto out; +- } + if (getenv("IRQBALANCE_BANNED_CPUS")) { + cpumask_parse_user(getenv("IRQBALANCE_BANNED_CPUS"), strlen(getenv("IRQBALANCE_BANNED_CPUS")), banned_cpus); + goto out; + } ++ + file = fopen("/sys/devices/system/cpu/isolated", "r"); + if (file) { + if (getline(&line, &size, file) > 0) { +@@ -117,8 +112,6 @@ out: + log(TO_CONSOLE, LOG_INFO, "Isolated CPUs: %s\n", buffer); + cpumask_scnprintf(buffer, 4096, nohz_full); + log(TO_CONSOLE, LOG_INFO, "Adaptive-ticks CPUs: %s\n", buffer); +- cpumask_scnprintf(buffer, 4096, banned_cpus); +- log(TO_CONSOLE, LOG_INFO, "Banned CPUs: %s\n", buffer); + } + + static struct topo_obj* add_cache_domain_to_package(struct topo_obj *cache, diff --git a/utils/mysql/files/mysqld.init b/utils/mysql/files/mysqld.init index eec96c0..98c8c65 100644 --- a/utils/mysql/files/mysqld.init +++ b/utils/mysql/files/mysqld.init @@ -7,24 +7,26 @@ STOP=10 SERVICE_DAEMONIZE=1 SERVICE_WRITE_PID=1 SERVICE_STOP_TIME=9 - -error() { - echo "${initscript}:" "$@" 1>&2 -} +PROG='/usr/bin/mysqld' start() { - local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]\"']*\([^[:space:]\"']*\)[[:space:]\"']*/\1/p" /etc/my.cnf) - if [ ! -d "$datadir" ]; then - error "Error: datadir '$datadir' in /etc/my.cnf doesn't exist" + local conf='/etc/my.cnf' + local datadir="$( sed -nE "s/^\s*datadir\s*=\s*('([^']*)'|\x22([^\x22]*)\x22|(.*\S))\s*$/\2\3\4/p" "$conf" )" + + [ -d "$datadir" ] || { + logger -s "[ERROR] datadir '$datadir' in '$conf' does not exist" return 1 - fi - if [ ! -f "$datadir/mysql/tables_priv.MYD" ]; then - error "Error: I didn't detect a privileges table, you might need to run mysql_install_db --force to initialize the system tables" + } + + [ -f "$datadir/mysql/tables_priv.MYD" ] || { + logger -s "[ERROR] can not detect privileges table, you might need to" + logger -s "run 'mysql_install_db --force' to initialize the system tables" return 1 - fi - service_start /usr/bin/mysqld + } + + service_start "$PROG" } stop() { - service_stop /usr/bin/mysqld + service_stop "$PROG" } diff --git a/utils/nano/Makefile b/utils/nano/Makefile index 10d86b0..db28550 100644 --- a/utils/nano/Makefile +++ b/utils/nano/Makefile @@ -8,14 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nano -PKG_VERSION:=2.7.1 +PKG_VERSION:=2.7.5 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_LICENSE_FILES:=COPYING PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/nano -PKG_MD5SUM:=df5cbe69831d7394c0a32fb27373ab313335ea4dc586d6f4be4081eb1de857cd +PKG_MD5SUM:=002703e368e07882f75e304c8860d83d +PKG_HASH:=a64d24e6bc4fc448376d038f9a755af77f8e748c9051b6f45bf85e783a7e67e4 PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/utils/open-plc-utils/Makefile b/utils/open-plc-utils/Makefile index 0cb49db..243d8e9 100644 --- a/utils/open-plc-utils/Makefile +++ b/utils/open-plc-utils/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=open-plc-utils -PKG_VERSION:=2015-09-21 +PKG_VERSION:=2017-01-15 PKG_RELEASE:=$(PKG_SOURCE_VERSION) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/qca/open-plc-utils.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=885a1b7e2e663b5ab8797db6d40a0318131fdf18 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_SOURCE_VERSION:=18b7e2a9a17f043fe8ac8b457680aafb1c249c55 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz PKG_MAINTAINER:=Florian Fainelli @@ -75,10 +75,6 @@ OPEN_PLC_UTILS_APPS:=efbu efeu efru efsu edru edsu nics \ $(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call GenPlugin,$(a)))) -ifdef CONFIG_USE_MUSL - TARGET_CFLAGS += -D__UCLIBC__ -endif - define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ diff --git a/utils/open-plc-utils/patches/100-musl-compat.patch b/utils/open-plc-utils/patches/100-musl-compat.patch deleted file mode 100644 index c20c0a1..0000000 --- a/utils/open-plc-utils/patches/100-musl-compat.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/ether/readpacket.c -+++ b/ether/readpacket.c -@@ -70,6 +70,10 @@ - #include - #include - -+#if defined (__linux__) -+#include -+#endif -+ - #include "../ether/channel.h" - #include "../tools/memory.h" - #include "../tools/error.h" -@@ -95,8 +99,6 @@ ssize_t readpacket (struct channel const - - #elif defined (__linux__) - --#include -- - struct pollfd pollfd = - { - channel->fd, ---- a/serial/serial.c -+++ b/serial/serial.c -@@ -69,6 +69,8 @@ - - #if defined (WIN32) - #include -+#else -+#include - #endif - - /*====================================================================* diff --git a/utils/pcsc-lite/Makefile b/utils/pcsc-lite/Makefile index e8d6d9d..dc96467 100644 --- a/utils/pcsc-lite/Makefile +++ b/utils/pcsc-lite/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcsc-lite -PKG_VERSION:=1.8.18 +PKG_VERSION:=1.8.20 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4179 -PKG_MD5SUM:=b22d32b018f6a1016adba91abfcc63876cca999daa472dd86e953ddd41d00905 +PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4203 +PKG_MD5SUM:=ec7d0114016c788c1c09859c84860f6cec6c4595436d23245105154b9c046bb2 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING diff --git a/utils/qemu/Makefile b/utils/qemu/Makefile index 5990f38..76c1c4f 100644 --- a/utils/qemu/Makefile +++ b/utils/qemu/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qemu PKG_VERSION:=2.6.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/ PKG_SOURCE_MD5SUM:=bdf1f3d0c177ebeb35a079a4bc3fc74e @@ -25,10 +25,15 @@ include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk +QEMU_DEPS_IN_GUEST := @(TARGET_x86_64||TARGET_armvirt||TARGET_arm64||TARGET_malta) +QEMU_DEPS_IN_HOST := @(TARGET_x86_64||TARGET_sunxi) + define Package/virtio-console-helper SECTION:=utils CATEGORY:=Utilities + SUBMENU:=Virtualization TITLE:=Helper script for vportNpn virtio-console devices + DEPENDS:=$(QEMU_DEPS_IN_GUEST) endef define Package/virtio-console-helper/install @@ -40,9 +45,10 @@ endef define Package/qemu-ga SECTION:=utils CATEGORY:=Utilities + SUBMENU:=Virtualization TITLE:=QEMU Guest Agent URL:=http://www.qemu.org - DEPENDS:= +glib2 +virtio-console-helper $(CXX_DEPENDS) + DEPENDS:= +glib2 +virtio-console-helper $(CXX_DEPENDS) $(QEMU_DEPS_IN_GUEST) endef define Package/qemu-ga/description @@ -62,9 +68,10 @@ endef define Package/qemu-blobs SECTION:=utils CATEGORY:=Utilities + SUBMENU:=Virtualization TITLE:=QEMU blobs of BIOS, VGA BIOS and keymaps URL:=http://www.qemu.org - DEPENDS:= + DEPENDS:=$(QEMU_DEPS_IN_HOST) endef define Package/qemu-blobs/install @@ -75,9 +82,10 @@ endef define Package/qemu-bridge-helper SECTION:=utils CATEGORY:=Utilities + SUBMENU:=Virtualization TITLE:=QEMU bridge helper URL:=http://www.qemu.org - DEPENDS:=+glib2 $(CXX_DEPENDS) + DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) endef define Package/qemu-bridge-helper/install @@ -111,11 +119,11 @@ define qemu-target define Package/qemu-$(1) SECTION:=utils CATEGORY:=Utilities + SUBMENU:=Virtualization TITLE:=QEMU target $(1) URL:=http://www.qemu.org - DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) \ - $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +qemu-blobs) \ - @(TARGET_x86_64||TARGET_sunxi) + DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) \ + $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +qemu-blobs) endef define Package/qemu-$(1)/description diff --git a/utils/rng-tools/files/rngd.init b/utils/rng-tools/files/rngd.init index c9cead3..bb560c8 100644 --- a/utils/rng-tools/files/rngd.init +++ b/utils/rng-tools/files/rngd.init @@ -1,7 +1,7 @@ #!/bin/sh /etc/rc.common # Copyright (C) 2011-2014 OpenWrt.org -START=98 +START=25 USE_PROCD=1 PROG=/sbin/rngd diff --git a/utils/tar/Makefile b/utils/tar/Makefile index 96a6421..45befbf 100644 --- a/utils/tar/Makefile +++ b/utils/tar/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tar PKG_VERSION:=1.29 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@GNU/$(PKG_NAME) @@ -21,7 +21,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 -BUILD_DEPENDS:=xz +PKG_BUILD_DEPENDS:=xz include $(INCLUDE_DIR)/package.mk diff --git a/utils/tar/patches/001-CVE-2016-6321.patch b/utils/tar/patches/001-CVE-2016-6321.patch new file mode 100644 index 0000000..0783473 --- /dev/null +++ b/utils/tar/patches/001-CVE-2016-6321.patch @@ -0,0 +1,30 @@ +From 7340f67b9860ea0531c1450e5aa261c50f67165d Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sat, 29 Oct 2016 21:04:40 -0700 +Subject: When extracting, skip ".." members + +* src/extract.c (extract_archive): Skip members whose names +contain "..". +--- a/src/extract.c ++++ b/src/extract.c +@@ -1629,12 +1629,20 @@ extract_archive (void) + { + char typeflag; + tar_extractor_t fun; ++ bool skip_dotdot_name; + + fatal_exit_hook = extract_finish; + + set_next_block_after (current_header); + ++ skip_dotdot_name = (!absolute_names_option ++ && contains_dot_dot (current_stat_info.orig_file_name)); ++ if (skip_dotdot_name) ++ ERROR ((0, 0, _("%s: Member name contains '..'"), ++ quotearg_colon (current_stat_info.orig_file_name))); ++ + if (!current_stat_info.file_name[0] ++ || skip_dotdot_name + || (interactive_option + && !confirm ("extract", current_stat_info.file_name))) + { diff --git a/utils/tmux/Makefile b/utils/tmux/Makefile index a66db4b..593a9c0 100644 --- a/utils/tmux/Makefile +++ b/utils/tmux/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tmux -PKG_VERSION:=2.2 +PKG_VERSION:=2.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/tmux/tmux/releases/download/$(PKG_VERSION) -PKG_MD5SUM:=bd95ee7205e489c62c616bb7af040099 +PKG_MD5SUM:=55313e132f0f42de7e020bf6323a1939ee02ab79c48634aa07475db41573852b PKG_MAINTAINER:=Maxim Storchak PKG_LICENSE:=ISC diff --git a/utils/unzip/Makefile b/utils/unzip/Makefile index a0d0d14..93a4dcf 100644 --- a/utils/unzip/Makefile +++ b/utils/unzip/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2015 OpenWrt.org +# Copyright (C) 2006-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unzip PKG_REV:=60 PKG_VERSION:=6.0 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz PKG_SOURCE_URL:=@SF/infozip diff --git a/utils/unzip/patches/008-cve-2014-9913-unzip-buffer-overflow.patch b/utils/unzip/patches/008-cve-2014-9913-unzip-buffer-overflow.patch new file mode 100644 index 0000000..018d014 --- /dev/null +++ b/utils/unzip/patches/008-cve-2014-9913-unzip-buffer-overflow.patch @@ -0,0 +1,29 @@ +From: "Steven M. Schweda" +Subject: Fix CVE-2014-9913, buffer overflow in unzip +Bug: https://sourceforge.net/p/infozip/bugs/27/ +Bug-Debian: https://bugs.debian.org/847485 +Bug-Ubuntu: https://launchpad.net/bugs/387350 +X-Debian-version: 6.0-21 + +--- a/list.c ++++ b/list.c +@@ -339,7 +339,18 @@ int list_files(__G) /* return PK-type + G.crec.compression_method == ENHDEFLATED) { + methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3]; + } else if (methnum >= NUM_METHODS) { +- sprintf(&methbuf[4], "%03u", G.crec.compression_method); ++ /* 2013-02-26 SMS. ++ * http://sourceforge.net/p/infozip/bugs/27/ CVE-2014-9913. ++ * Unexpectedly large compression methods overflow ++ * &methbuf[]. Use the old, three-digit decimal format ++ * for values which fit. Otherwise, sacrifice the ++ * colon, and use four-digit hexadecimal. ++ */ ++ if (G.crec.compression_method <= 999) { ++ sprintf( &methbuf[ 4], "%03u", G.crec.compression_method); ++ } else { ++ sprintf( &methbuf[ 3], "%04X", G.crec.compression_method); ++ } + } + + #if 0 /* GRR/Euro: add this? */ diff --git a/utils/unzip/patches/009-cve-2016-9844-zipinfo-buffer-overflow.patch b/utils/unzip/patches/009-cve-2016-9844-zipinfo-buffer-overflow.patch new file mode 100644 index 0000000..4d75857 --- /dev/null +++ b/utils/unzip/patches/009-cve-2016-9844-zipinfo-buffer-overflow.patch @@ -0,0 +1,28 @@ +From: "Steven M. Schweda" +Subject: Fix CVE-2016-9844, buffer overflow in zipinfo +Bug-Debian: https://bugs.debian.org/847486 +Bug-Ubuntu: https://launchpad.net/bugs/1643750 +X-Debian-version: 6.0-21 + +--- a/zipinfo.c ++++ b/zipinfo.c +@@ -1921,7 +1921,18 @@ static int zi_short(__G) /* return PK- + ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); + methbuf[3] = dtype[dnum]; + } else if (methnum >= NUM_METHODS) { /* unknown */ +- sprintf(&methbuf[1], "%03u", G.crec.compression_method); ++ /* 2016-12-05 SMS. ++ * https://launchpad.net/bugs/1643750 ++ * Unexpectedly large compression methods overflow ++ * &methbuf[]. Use the old, three-digit decimal format ++ * for values which fit. Otherwise, sacrifice the "u", ++ * and use four-digit hexadecimal. ++ */ ++ if (G.crec.compression_method <= 999) { ++ sprintf( &methbuf[ 1], "%03u", G.crec.compression_method); ++ } else { ++ sprintf( &methbuf[ 0], "%04X", G.crec.compression_method); ++ } + } + + for (k = 0; k < 15; ++k) diff --git a/utils/xz/Makefile b/utils/xz/Makefile index 4f738bb..c3536c2 100644 --- a/utils/xz/Makefile +++ b/utils/xz/Makefile @@ -1,5 +1,6 @@ # # Copyright (C) 2013-2015 OpenWrt.org +# Copyright (C) 2017 Daniel Engberg # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xz -PKG_VERSION:=5.2.2 +PKG_VERSION:=5.2.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://tukaani.org/xz \ - http://fossies.org/linux/misc -PKG_MD5SUM:=f90c9a0c8b259aee2234c4e0d7fd70af +PKG_SOURCE_URL:=@SF/lzmautils \ + http://tukaani.org/xz +PKG_MD5SUM:=fd9ca16de1052aac899ad3495ad20dfa906c27b4a5070102a2ec35ca3a4740c1 PKG_LICENSE:=Public-Domain LGPL-2.1+ GPL-2.0+ GPL-3.0+ PKG_LICENSE_FILES:=COPYING diff --git a/utils/zip/Makefile b/utils/zip/Makefile index e1ed068..6427dda 100644 --- a/utils/zip/Makefile +++ b/utils/zip/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zip PKG_REV:=30 PKG_VERSION:=3.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz PKG_SOURCE_URL:=@SF/infozip diff --git a/utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch b/utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch new file mode 100644 index 0000000..892540b --- /dev/null +++ b/utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch @@ -0,0 +1,90 @@ +From fc392c939b9a18959482f588aff0afc29dd6d30a Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 23 Jan 2015 22:20:18 +0100 +Subject: [PATCH 6/6] unix/configure: borrow the LFS test from autotools. + +Infozip's LFS check can't work for cross-compilation +since it try to run a target's binary on the host system. + +Instead, use to LFS test used by autotools which is a +compilation test. +(see autotools/lib/autoconf/specific.m4) + +Reported-by: Richard Genoud +Signed-off-by: Romain Naour +--- + configure | 46 +++++++++++++++------------------------------- + 1 file changed, 15 insertions(+), 31 deletions(-) + +diff --rupN a/unix/configure b/unix/configure +--- a/unix/configure ++++ b/unix/configure +@@ -399,9 +399,8 @@ else + fi + + +-# Now we set the 64-bit file environment and check the size of off_t +-# Added 11/4/2003 EG +-# Revised 8/12/2004 EG ++# LFS check borrowed from autotools sources ++# lib/autoconf/specific.m4 + + echo Check for Large File Support + cat > conftest.c << _EOF_ +@@ -410,23 +409,19 @@ cat > conftest.c << _EOF_ + # define _FILE_OFFSET_BITS 64 /* select default interface as 64 bit */ + # define _LARGE_FILES /* some OSes need this for 64-bit off_t */ + #include +-#include +-#include +-#include ++ ++ /* Check that off_t can represent 2**63 - 1 correctly. ++ We can't simply define LARGE_OFF_T to be 9223372036854775807, ++ since some C++ compilers masquerading as C compilers ++ incorrectly reject 9223372036854775807. */ ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ++ && LARGE_OFF_T % 2147483647 == 1) ++ ? 1 : -1]; ++ + int main() + { +- off_t offset; +- struct stat s; +- /* see if have 64-bit off_t */ +- if (sizeof(offset) < 8) +- return 1; +- printf(" off_t is %d bytes\n", sizeof(off_t)); +- /* see if have 64-bit stat */ +- if (sizeof(s.st_size) < 8) { +- printf(" s.st_size is %d bytes\n", sizeof(s.st_size)); +- return 2; +- } +- return 3; ++ return 0; + } + _EOF_ + # compile it +@@ -434,19 +429,8 @@ $CC -o conftest conftest.c >/dev/null 2> + if [ $? -ne 0 ]; then + echo -- no Large File Support + else +-# run it +- ./conftest +- r=$? +- if [ $r -eq 1 ]; then +- echo -- no Large File Support - no 64-bit off_t +- elif [ $r -eq 2 ]; then +- echo -- no Large File Support - no 64-bit stat +- elif [ $r -eq 3 ]; then +- echo -- yes we have Large File Support! +- CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT" +- else +- echo -- no Large File Support - conftest returned $r +- fi ++ echo -- yes we have Large File Support! ++ CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT" + fi + + -- 2.25.1