diff options
-rw-r--r-- | user/grub/APKBUILD | 19 | ||||
-rw-r--r-- | user/grub/default-grub | 9 | ||||
-rw-r--r-- | user/grub/grub.post-upgrade | 38 | ||||
-rw-r--r-- | user/grub/grub.trigger | 2 | ||||
-rw-r--r-- | user/grub/quirk-01_radeon_agpmode | 28 | ||||
-rw-r--r-- | user/grub/update-grub | 16 | ||||
-rw-r--r-- | user/mosquitto/APKBUILD | 80 | ||||
-rw-r--r-- | user/mosquitto/disable-flaky-test.patch | 11 | ||||
-rw-r--r-- | user/mosquitto/mosquitto.initd | 36 | ||||
-rw-r--r-- | user/mosquitto/mosquitto.pre-install | 7 | ||||
-rw-r--r-- | user/mosquitto/openrc-conf.patch | 20 | ||||
-rw-r--r-- | user/mosquitto/python3.patch | 48 | ||||
-rw-r--r-- | user/py3-paho-mqtt/APKBUILD | 33 | ||||
-rw-r--r-- | user/py3-paho-mqtt/setup.patch | 24 |
14 files changed, 369 insertions, 2 deletions
diff --git a/user/grub/APKBUILD b/user/grub/APKBUILD index 9d6ada6fd..d571310e7 100644 --- a/user/grub/APKBUILD +++ b/user/grub/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=grub pkgver=2.02 -pkgrel=7 +pkgrel=8 pkgdesc="Bootloader with support for Linux, Multiboot and more" url="https://www.gnu.org/software/grub/" arch="all !s390x" @@ -12,6 +12,8 @@ license="GPL-3.0+" depends="" makedepends="bison flex freetype-dev linux-headers lvm2-dev python3 xz unifont automake autoconf libtool" +# [22:02] <@awilfox> [[sroracle]]: grub breaks without its locale files present +# [22:02] <@awilfox> it cannot be split subpackages="$pkgname-dev $pkgname-doc" # currently grub only builds on x86*, aarch64 and ppc* systems @@ -27,6 +29,9 @@ for f in $flavors; do subpackages="$subpackages $pkgname-$f" done +install="$pkgname.post-upgrade" +triggers="$pkgname.trigger=/boot" + source="https://ftp.gnu.org/gnu/grub/grub-$pkgver.tar.xz fix-gcc-no-pie-specs.patch grub2-accept-empty-module.patch @@ -34,6 +39,8 @@ source="https://ftp.gnu.org/gnu/grub/grub-$pkgver.tar.xz the-arch-everyone-uses-and-nobody-loves.patch x86_64_asm.patch default-grub + update-grub + quirk-01_radeon_agpmode " prepare() { @@ -119,8 +126,14 @@ package() { rm -f "$pkgdir"/usr/lib/charset.alias install -D -m644 "$srcdir"/default-grub "$pkgdir"/etc/default/grub + install -D -m755 "$srcdir"/update-grub "$pkgdir"/usr/sbin # remove grub-install warning of missing directory mkdir -p "$pkgdir"/usr/share/locale + + for i in "$srcdir"/quirk-*; do + install -Dm755 "$i" \ + "$pkgdir"/etc/grub-quirks.d/"${i##"$srcdir"/quirk-}" + done } bios() { @@ -163,4 +176,6 @@ f2a7d9ab6c445f4e402e790db56378cecd6631b5c367451aa6ce5c01cd95b95c83c3dd24d6d4b857 4e7394e0fff6772c89683039ccf81099ebbfe4f498e6df408977a1488fd59389b6e19afdbf0860ec271e2b2aea0df7216243dcc8235d1ca3af0e7f4d0a9d60a4 grub-xen-host_grub.cfg 088455205f2f397d60e43eab19ed73994880ea1f442661f7975846cceaf2b112d92fd1341119d7dbfad3af2174dfd4d4721f31dead1ac35f4a3cb7c0d92f8a04 the-arch-everyone-uses-and-nobody-loves.patch 8752b5e689ec3b7e1f438c7207adc517d7acb4f7d15fda2907bc9177883a686f23994c66641bfc0c7620365415972b5d8b74f511c13dd234f5f3461dda4bb445 x86_64_asm.patch -048d061ac0aab0106f59a3d257739ff5de6c7dc08a4dc9b8b12e9bd2b1ec11f9bc6214013f3d1083b11c3ce41185fcbb5615beb2f290380abf392bb4c3f0d509 default-grub" +1e6ae4a3884829864dbd789d3c3a0d43a5aa5f279c3ebb25f71775686e9236bc1c6295e5064ad32b384635987ee0814df95e9ca33bc57bc8e0aeb47bec34270e default-grub +0907a810e9ba5be92d10dae38403d1e50fb9b324799df36d2241ff59f545dace37a65f2b1c8f07367220da4fd341d8f21dd9a4fab8da6c87ae52d7ffbca3dbd7 update-grub +78b7ec141a364994c7de181e47fedca820add9960c56c7adf4c14ee11d5249a0887fd788ecd5d24b9bdd102b7c40395181e2f7c3fe5ab795dd7c0057ba1115c5 quirk-01_radeon_agpmode" diff --git a/user/grub/default-grub b/user/grub/default-grub index 18fc2317d..3fb754c7e 100644 --- a/user/grub/default-grub +++ b/user/grub/default-grub @@ -6,3 +6,12 @@ GRUB_DEFAULT="Adélie" GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="Adélie" GRUB_CMDLINE_LINUX_DEFAULT="ro" + +# Uncomment the following line if you do *not* want /boot/grub/grub.cfg to be +# automatically regenerated when easy-kernel is upgraded. +#ADELIE_MANUAL_CONFIG=1 + +for i in /etc/grub-quirks.d/[0-9][0-9]*; do + [ -x "$i" ] || continue + . "$i" +done diff --git a/user/grub/grub.post-upgrade b/user/grub/grub.post-upgrade new file mode 100644 index 000000000..5b9cbb072 --- /dev/null +++ b/user/grub/grub.post-upgrade @@ -0,0 +1,38 @@ +#!/bin/sh -e +ver_new="$1" +ver_old="$2" + +if [ "$(apk version -t "$ver_old" "2.02-r8")" = "<" ]; then + cat >&2 <<-EOF + * + * Starting with grub=2.02-r8, /boot/grub/grub.cfg is now automatically + * regenerated when easy-kernel is upgraded. + * + EOF + if ! grep -Fqx '# DO NOT EDIT THIS FILE' /boot/grub/grub.cfg; then + cat >&2 <<-EOF + * It appears that you have a manual GRUB configuration. + * If this is incorrect, comment out ADELIE_MANUAL_CONFIG + * in /etc/default/grub. When this option is set, /boot/grub/grub.cfg + * will *not* be automatically regenerated. + * + EOF + + cat >> /etc/default/grub <<-EOF + # Uncomment the following line if you do *not* want /boot/grub/grub.cfg to be + # automatically regenerated when easy-kernel is upgraded. + ADELIE_MANUAL_CONFIG=1 + EOF + else + cat >&2 <<-EOF + * It appears that you have a default GRUB configuration. + * If this is incorrect, uncomment ADELIE_MANUAL_CONFIG=1 + * in /etc/default/grub. When this option is set, /boot/grub/grub.cfg + * will *not* be automatically regenerated. + * + * A copy of the existing configuration will be saved as + * /boot/grub/grub.cfg.update-grub-old. + * + EOF + fi +fi diff --git a/user/grub/grub.trigger b/user/grub/grub.trigger new file mode 100644 index 000000000..eba13a458 --- /dev/null +++ b/user/grub/grub.trigger @@ -0,0 +1,2 @@ +#!/bin/sh -e +exec update-grub diff --git a/user/grub/quirk-01_radeon_agpmode b/user/grub/quirk-01_radeon_agpmode new file mode 100644 index 000000000..879f1619e --- /dev/null +++ b/user/grub/quirk-01_radeon_agpmode @@ -0,0 +1,28 @@ +#!/bin/sh +# vi: noet: +# Horst Burkhardt <horst@adelielinux.org> 2018 +# Max Rees <maxcrees@me.com> 2019 +# +# AGP acceleration in the Radeon KMS driver has been broken on Apple PPC +# since the 2.6 series, and most developers are in agreement that since +# UniNorth is underdocumented, it probably won't ever be fixed. Disable +# it on all Apple machines except ones where it is known not to apply. +# +# https://bts.adelielinux.org/show_bug.cgi?id=49 +set -e + +case "$(uname -m)" in +ppc|ppc64) + if grep -q 'MacRISC[23]' /proc/cpuinfo; then + case "$(awk '$1 == "machine" { print $3 }' /proc/cpuinfo)" in + PowerBook1,1) ;; + PowerMac1,1) ;; + PowerMac1,2) ;; + PowerMac11,2) ;; + PowerMac12,1) ;; + RackMac3,1) ;; + iMac,1) ;; + *) export GRUB_CMDLINE_LINUX="radeon.agpmode=-1 $GRUB_CMDLINE_LINUX";; + esac + fi;; +esac diff --git a/user/grub/update-grub b/user/grub/update-grub new file mode 100644 index 000000000..d22930bd7 --- /dev/null +++ b/user/grub/update-grub @@ -0,0 +1,16 @@ +#!/bin/sh -e +. /etc/default/grub +if [ "$ADELIE_MANUAL_CONFIG" = 1 ]; then + cat >&2 <<-EOF + * + * You have specified that you are using a manual GRUB configuration. + * You must update it yourself. + * + EOF + exit 0 +fi + +if [ -e /boot/grub/grub.cfg ]; then + cp -p /boot/grub/grub.cfg /boot/grub/grub.cfg.update-grub-old +fi +exec grub-mkconfig -o /boot/grub/grub.cfg diff --git a/user/mosquitto/APKBUILD b/user/mosquitto/APKBUILD new file mode 100644 index 000000000..e7cd25057 --- /dev/null +++ b/user/mosquitto/APKBUILD @@ -0,0 +1,80 @@ +# Contributor: Pedro Filipe <xpecex@outlook.com> +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Max Rees <maxcrees@me.com> +pkgname=mosquitto +pkgver=1.6.6 +pkgrel=0 +pkgdesc="An Open Source MQTT Broker" +url="https://mosquitto.org/" +arch="all" +license="EPL-1.0 AND EDL-1.0 AND MIT AND BSD-3-Clause" +depends="" +makedepends="c-ares-dev openssl-dev util-linux-dev" +checkdepends="python3" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc + $pkgname-clients" +install="$pkgname.pre-install" +source="http://mosquitto.org/files/source/$pkgname-$pkgver.tar.gz + mosquitto.initd + disable-flaky-test.patch + openrc-conf.patch + python3.patch" + +# secfixes: +# 1.6.6-r0: +# - CVE-2019-11779 +# 1.5.6-r0: +# - CVE-2018-12546 +# - CVE-2018-12550 +# - CVE-2018-12551 +# 1.5.3-r0: +# - CVE-2018-12543 +# 1.4.15-r0: +# - CVE-2017-7652 +# - CVE-2017-7651 +# 1.4.13-r0: +# - CVE-2017-9868 +# 1.4.12-r0: +# - CVE-2017-7650 + +build() { + make \ + WITH_ADNS=no \ + WITH_MEMORY_TRACKING=no \ + WITH_SRV=yes \ + prefix=/usr +} + +check() { + # Unit tests require cunit, so skip them. + make -j1 -C test/broker test + make -j1 -C test/lib test +} + +package() { + make prefix=/usr DESTDIR="$pkgdir" install + + # C++ bindings are deprecated, so don't install them. + make -C lib/cpp prefix=/usr DESTDIR="$pkgdir" uninstall + rm "$pkgdir"/usr/lib/pkgconfig/libmosquittopp.pc + + mv "$pkgdir"/usr/sbin/mosquitto "$pkgdir"/usr/bin + mv "$pkgdir"/etc/mosquitto/mosquitto.conf.example \ + "$pkgdir"/etc/mosquitto/mosquitto.conf + + install -Dm755 "$srcdir"/mosquitto.initd \ + "$pkgdir"/etc/init.d/mosquitto +} + +clients() { + pkgdesc="Mosquitto command line MQTT clients" + + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/mosquitto_[ps]ub "$subpkgdir"/usr/bin/ +} + +sha512sums="ea6ba7b57773c8f4a59e708ae305a0e38ca85df94854410b29cccddbe10bbb91c2ea5e827fefb3f57cb4fce188ab9c3021804f1ae398b7fd5e9e965354b68bc1 mosquitto-1.6.6.tar.gz +681fddc737b3ef3e6c052f0c854a730df290352640a18a63e23ef83d14c425558aff87805d1eb95e44de101b5df48872173af9f5414464ffa8cf727ea2c0491e mosquitto.initd +3886171e36f759a717aa6626d5b8dbd392963c737d5de28b4d52b81359008927b99ff7a0ca82f56a0e5deaed4585571759ba9216336a664fd346845837c2bc18 disable-flaky-test.patch +b07f9bec2751ab32c43f53e74d8fca18dbf2d7ce7f8fab562dbcf75de19609ba6219d735ac504697404e0ed36613a14074e3a19e735297195877798f778d337a openrc-conf.patch +078197e6c3e59b664f5fdd1e4a4f669c9a76ab84fe4a5d8602ac80406b85c4e1cce29d9372e76d995155b74abb438d0dc0cdcdb98251fb904122073c4088d76a python3.patch" diff --git a/user/mosquitto/disable-flaky-test.patch b/user/mosquitto/disable-flaky-test.patch new file mode 100644 index 000000000..8fd51c403 --- /dev/null +++ b/user/mosquitto/disable-flaky-test.patch @@ -0,0 +1,11 @@ +--- mosquitto-1.6.4/test/broker/Makefile 2019-08-01 19:50:01.000000000 +0000 ++++ mosquitto-1.6.4/test/broker/Makefile 2019-08-28 00:03:54.430562623 +0000 +@@ -193,7 +193,7 @@ endif + ./10-listener-mount-point.py + + 11 : +- ./11-message-expiry.py ++ #./11-message-expiry.py + ./11-persistent-subscription.py + ./11-persistent-subscription-v5.py + ./11-persistent-subscription-no-local.py diff --git a/user/mosquitto/mosquitto.initd b/user/mosquitto/mosquitto.initd new file mode 100644 index 000000000..818931213 --- /dev/null +++ b/user/mosquitto/mosquitto.initd @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +MOSQUITTO_CFG="${MOSQUITTO_CFG:-/etc/mosquitto/${RC_SVCNAME}.conf}" + +command="/usr/bin/mosquitto" +command_args="-c '${MOSQUITTO_CFG}' $command_args" +command_args_background="--daemon" +pidfile="$(awk '$1 == "pid_file" {print $2}' "${MOSQUITTO_CFG}" || true)" + +extra_started_commands="reload" +description_reload="Reload configuration" + +start_pre() { + if ! [ -e "$MOSQUITTO_CFG" ]; then + eerror "$MOSQUITTO_CFG does not exist" + return 1 + fi + + if [ -z "$pidfile" ]; then + eerror "${MOSQUITTO_CFG} is missing the pid_file option" + return 1 + fi + + MOSQUITTO_LOG="$(awk '$1 " " $2 == "log_dest file" {print $3}' "${MOSQUITTO_CFG}")" + if [ -n "$MOSQUITTO_LOG" ]; then + MOSQUITTO_USER="$(awk '$1 == "user" {print $2}' "${MOSQUITTO_CFG}")" + MOSQUITTO_USER="${MOSQUITTO_USER:-mosquitto}" + checkpath -fm 660 -o "${MOSQUITTO_USER}" \ + "${MOSQUITTO_LOG}" || return 1 + fi +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/user/mosquitto/mosquitto.pre-install b/user/mosquitto/mosquitto.pre-install new file mode 100644 index 000000000..ac36da04c --- /dev/null +++ b/user/mosquitto/mosquitto.pre-install @@ -0,0 +1,7 @@ +#!/bin/sh + +groupadd -r mosquitto 2>/dev/null +useradd -c mosquitto -s /sbin/nologin -g mosquitto \ + -m -d /var/empty -k /etc/skel -r mosquitto 2>/dev/null + +exit 0 diff --git a/user/mosquitto/openrc-conf.patch b/user/mosquitto/openrc-conf.patch new file mode 100644 index 000000000..d1c5ee04b --- /dev/null +++ b/user/mosquitto/openrc-conf.patch @@ -0,0 +1,20 @@ +--- mosquitto-1.6.4/mosquitto.conf 2019-08-01 14:50:01.000000000 -0500 ++++ mosquitto-1.6.4/mosquitto.conf 2019-08-27 18:16:52.290542736 -0500 +@@ -158,7 +158,7 @@ + # This should be set to /var/run/mosquitto.pid if mosquitto is + # being run automatically on boot with an init script and + # start-stop-daemon or similar. +-#pid_file ++pid_file /var/run/mosquitto.pid + + # Set to true to queue messages with QoS 0 when a persistent client is + # disconnected. These messages are included in the limit imposed by +@@ -585,7 +585,7 @@ + # Note that if the broker is running as a Windows service it will default to + # "log_dest none" and neither stdout nor stderr logging is available. + # Use "log_dest none" if you wish to disable logging. +-#log_dest stderr ++log_dest file /var/log/mosquitto.log + + # Types of messages to log. Use multiple log_type lines for logging + # multiple types of messages. diff --git a/user/mosquitto/python3.patch b/user/mosquitto/python3.patch new file mode 100644 index 000000000..f348cbc3e --- /dev/null +++ b/user/mosquitto/python3.patch @@ -0,0 +1,48 @@ +--- mosquitto-1.6.4/test/broker/09-extended-auth-change-username.py.old 2019-08-01 19:50:01.000000000 +0000 ++++ mosquitto-1.6.4/test/broker/09-extended-auth-change-username.py 2019-08-27 22:20:08.560518752 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Check whether an extended auth plugin can change the username of a client. + +--- mosquitto-1.6.4/test/broker/09-extended-auth-multistep-reauth.py.old 2019-08-01 19:50:01.000000000 +0000 ++++ mosquitto-1.6.4/test/broker/09-extended-auth-multistep-reauth.py 2019-08-27 22:22:11.530519618 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from mosq_test_helper import * + +--- mosquitto-1.6.4/test/broker/09-extended-auth-multistep.py.old 2019-08-01 19:50:01.000000000 +0000 ++++ mosquitto-1.6.4/test/broker/09-extended-auth-multistep.py 2019-08-27 22:20:37.030518952 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from mosq_test_helper import * + +--- mosquitto-1.6.4/test/broker/09-extended-auth-single.py.old 2019-08-01 19:50:01.000000000 +0000 ++++ mosquitto-1.6.4/test/broker/09-extended-auth-single.py 2019-08-27 22:21:42.250519412 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Multi tests for extended auth with a single step. + # * Error in plugin +--- mosquitto-1.6.4/test/broker/09-extended-auth-single2.py.old 2019-08-01 19:50:01.000000000 +0000 ++++ mosquitto-1.6.4/test/broker/09-extended-auth-single2.py 2019-08-27 22:21:02.220519130 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Multi tests for extended auth with a single step - multiple plugins at once. + # * Error in plugin +--- mosquitto-1.6.4/test/broker/09-extended-auth-unsupported.py.old 2019-08-01 19:50:01.000000000 +0000 ++++ mosquitto-1.6.4/test/broker/09-extended-auth-unsupported.py 2019-08-27 22:21:20.360519257 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Test whether an unsupported extended auth is rejected. + diff --git a/user/py3-paho-mqtt/APKBUILD b/user/py3-paho-mqtt/APKBUILD new file mode 100644 index 000000000..cda723c76 --- /dev/null +++ b/user/py3-paho-mqtt/APKBUILD @@ -0,0 +1,33 @@ +# Contributor: Fabian Affolter <fabian@affolter-engineering.ch> +# Maintainer: Max Rees <maxcrees@me.com> +pkgname=py3-paho-mqtt +_pkgname=paho.mqtt.python +pkgver=1.4.0 +pkgrel=0 +pkgdesc="MQTT version 3.1.1 client class for Python" +url="https://www.eclipse.org/paho/" +# Certified net clean +arch="noarch" +license="EPL-1.0 AND EDL-1.0" +depends="python3" +makedepends="" +checkdepends="py3-pytest" +# Use GitHub tarball since PyPI doesn't include tests +source="$pkgname-$pkgver.tar.gz::https://github.com/eclipse/paho.mqtt.python/archive/v$pkgver.tar.gz + setup.patch" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + python3 setup.py build +} + +check() { + PYTHONPATH="$builddir"/src pytest +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +sha512sums="2e49f0f146207ab4fbc8c346b10d3e2b50869b2d9db7c999b6645f7213fb635b64cff01c5405e7833a8b25334d24685ce6ed734a6e4b6b0660b48f65cf4a941c py3-paho-mqtt-1.4.0.tar.gz +0cfff826651b36b5062dae8bad3abcab428dc18bfcee6c941a46f5c8900c871bd475d96fa382e06d731ea451ad9159edadf0ee3767f7dea992cb7a7ed7313d80 setup.patch" diff --git a/user/py3-paho-mqtt/setup.patch b/user/py3-paho-mqtt/setup.patch new file mode 100644 index 000000000..70ccc869f --- /dev/null +++ b/user/py3-paho-mqtt/setup.patch @@ -0,0 +1,24 @@ +--- paho.mqtt.python-1.4.0/setup.py 2018-09-02 11:20:42.000000000 +0000 ++++ paho.mqtt.python-1.4.0/setup.py 2019-08-28 02:51:55.690633661 +0000 +@@ -11,9 +11,8 @@ with open('README.rst', 'rb') as readme_ + readme = readme_file.read().decode('utf-8') + + requirements = [] +-test_requirements = ['pytest', 'pylama'] +-needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) +-setup_requirements = ['pytest-runner'] if needs_pytest else [] ++test_requirements = ['pytest'] ++setup_requirements = [] + + if sys.version_info < (3, 0): + test_requirements += ['mock'] +--- paho.mqtt.python-1.4.0/setup.cfg 2018-09-02 11:20:42.000000000 +0000 ++++ paho.mqtt.python-1.4.0/setup.cfg 2019-08-28 02:50:19.540632984 +0000 +@@ -1,7 +1,6 @@ + [aliases] + test=pytest + [tool:pytest] +-addopts=-r xs --pylama + strict=True + testpaths=tests src + [pylama] |