Files
operating-system/buildroot/package/nut/0004-nut_check_libgd.m4-try-to-find-gd-through-pkg-config.patch
Stefan Agner a0871be6c0 Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot

* Update buildroot to 2020.11-rc1

Signed-off-by: Stefan Agner <stefan@agner.ch>

* Don't rely on sfdisk --list-free output

The --list-free (-F) argument does not allow machine readable mode. And
it seems that the output format changes over time (different spacing,
using size postfixes instead of raw blocks).

Use sfdisk json output and calculate free partition space ourselfs. This
works for 2.35 and 2.36 and is more robust since we rely on output which
is meant for scripts to parse.

* Migrate defconfigs for Buildroot 2020.11-rc1

In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE).

* Rebase/remove systemd patches for systemd 246

* Drop apparmor/libapparmor from buildroot-external

* hassos-persists: use /run as directory for lockfiles

The U-Boot tools use /var/lock by default which is not created any more
by systemd by default (it is under tmpfiles legacy.conf, which we no
longer install).

* Disable systemd-update-done.service

The service is not suited for pure read-only systems. In particular the
service needs to be able to write a file in /etc and /var. Remove the
service. Note: This is a static service and cannot be removed using
systemd-preset.

* Disable apparmor.service for now

The service loads all default profiles. Some might actually cause
problems. E.g. the profile for ping seems not to match our setup for
/etc/resolv.conf:
[85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
2020-11-13 18:25:44 +01:00

121 lines
4.0 KiB
Diff

From cb507c44d26d8ae04a0cc3d1c24e79e3bf33ba23 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 29 Jul 2020 22:51:54 +0200
Subject: [PATCH] nut_check_libgd.m4: try to find gd through pkg-config
gdlib-config has been dropped from version 2.3.0 with
https://github.com/libgd/libgd/commit/d62f608c7c4a814c70d4ba777725e3e62d9e2cde
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved from:
https://github.com/networkupstools/nut/commit/cb507c44d26d8ae04a0cc3d1c24e79e3bf33ba23]
---
m4/nut_check_libgd.m4 | 88 ++++++++++++++++++++++++-------------------
1 file changed, 50 insertions(+), 38 deletions(-)
diff --git a/m4/nut_check_libgd.m4 b/m4/nut_check_libgd.m4
index 73f4da76d..c4e96761c 100644
--- a/m4/nut_check_libgd.m4
+++ b/m4/nut_check_libgd.m4
@@ -12,50 +12,62 @@ if test -z "${nut_have_libgd_seen}"; then
LDFLAGS_ORIG="${LDFLAGS}"
LIBS_ORIG="${LIBS}"
- dnl Initial defaults. These are only used if gdlib-config is
- dnl unusable and the user fails to pass better values in --with
- dnl arguments
- CFLAGS=""
- LDFLAGS="-L/usr/X11R6/lib"
- LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11"
+ AC_MSG_CHECKING(for gd version via pkg-config)
+ GD_VERSION="`pkg-config --silence-errors --modversion gdlib 2>/dev/null`"
+ if test "$?" = "0" -a -n "${GD_VERSION}"; then
+ CFLAGS="`pkg-config --silence-errors --cflags gdlib 2>/dev/null`"
+ LIBS="`pkg-config --silence-errors --libs gdlib 2>/dev/null`"
+ else
+ GD_VERSION="none"
+ fi
+ AC_MSG_RESULT(${GD_VERSION} found)
- dnl By default seek in PATH
- GDLIB_CONFIG=gdlib-config
- AC_ARG_WITH(gdlib-config,
- AS_HELP_STRING([@<:@--with-gdlib-config=/path/to/gdlib-config@:>@],
- [path to program that reports GDLIB configuration]),
- [
- case "${withval}" in
- "") ;;
- yes|no)
- AC_MSG_ERROR(invalid option --with(out)-gdlib-config - see docs/configure.txt)
+ if test "${GD_VERSION}" = "none"; then
+ dnl Initial defaults. These are only used if gdlib-config is
+ dnl unusable and the user fails to pass better values in --with
+ dnl arguments
+ CFLAGS=""
+ LDFLAGS="-L/usr/X11R6/lib"
+ LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11"
+
+ dnl By default seek in PATH
+ GDLIB_CONFIG=gdlib-config
+ AC_ARG_WITH(gdlib-config,
+ AS_HELP_STRING([@<:@--with-gdlib-config=/path/to/gdlib-config@:>@],
+ [path to program that reports GDLIB configuration]),
+ [
+ case "${withval}" in
+ "") ;;
+ yes|no)
+ AC_MSG_ERROR(invalid option --with(out)-gdlib-config - see docs/configure.txt)
+ ;;
+ *)
+ GDLIB_CONFIG="${withval}"
+ ;;
+ esac
+ ])
+
+ AC_MSG_CHECKING(for gd version via ${GDLIB_CONFIG})
+ GD_VERSION=`${GDLIB_CONFIG} --version 2>/dev/null`
+ if test "$?" != "0" -o -z "${GD_VERSION}"; then
+ GD_VERSION="none"
+ fi
+ AC_MSG_RESULT(${GD_VERSION} found)
+
+ case "${GD_VERSION}" in
+ none)
+ ;;
+ 2.0.5 | 2.0.6 | 2.0.7)
+ AC_MSG_WARN([[gd ${GD_VERSION} detected, unable to use ${GDLIB_CONFIG} script]])
+ AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]])
;;
*)
- GDLIB_CONFIG="${withval}"
+ CFLAGS="`${GDLIB_CONFIG} --includes 2>/dev/null`"
+ LDFLAGS="`${GDLIB_CONFIG} --ldflags 2>/dev/null`"
+ LIBS="`${GDLIB_CONFIG} --libs 2>/dev/null`"
;;
esac
- ])
-
- AC_MSG_CHECKING(for gd version via ${GDLIB_CONFIG})
- GD_VERSION=`${GDLIB_CONFIG} --version 2>/dev/null`
- if test "$?" != "0" -o -z "${GD_VERSION}"; then
- GD_VERSION="none"
fi
- AC_MSG_RESULT(${GD_VERSION} found)
-
- case "${GD_VERSION}" in
- none)
- ;;
- 2.0.5 | 2.0.6 | 2.0.7)
- AC_MSG_WARN([[gd ${GD_VERSION} detected, unable to use ${GDLIB_CONFIG} script]])
- AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]])
- ;;
- *)
- CFLAGS="`${GDLIB_CONFIG} --includes 2>/dev/null`"
- LDFLAGS="`${GDLIB_CONFIG} --ldflags 2>/dev/null`"
- LIBS="`${GDLIB_CONFIG} --libs 2>/dev/null`"
- ;;
- esac
dnl Now allow overriding gd settings if the user knows best
AC_MSG_CHECKING(for gd include flags)