Bug#996893: logwatch: Enable support for autopkgtest

2021-10-20 Thread Miriam Espana Acebal
Package: logwatch
Version: 7.5.2-1ubuntu1.3
Severity: normal
Tags: patch

Dear Maintainer,

The patch attached adds support for autopkgtest and enables to run
the testsuite automatically. It has been proposed and accepted on Ubuntu
[1],
and
you might be interested in doing the same in Debian.

Thanks in advance for considering this.

[1] https://bugs.launchpad.net/ubuntu/+source/logwatch/+bug/1679329

-- 
Miriam
diff --git a/debian/changelog b/debian/changelog
index a12a239..e4e47be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,23 @@
+logwatch (7.5.5-1ubuntu3) impish; urgency=medium
+
+  * d/tests: Add autopkgtest DEP8 tests (LP: #1679329):
+- d/t/control: New file.
+- d/t/basic-checks: Test basic configuration and version. 
+- d/t/syntax-check: Perl syntax checking for the logwatch's scripts.
+- d/t/detail: Check the amount of output when using low, med and
+  high values with the detail flag. 
+- d/t/su-l-check: Check if properly report when a user become root.
+  + d/t/data/su-l: Log portion used in this test.
+- d/t/apparmor-unmatched-entries : Test for not logging as unmatched
+  some lines for apparmor audit in kern.log.
+  + d/t/data/unmatched-entries-apparmor_kern.log: Log portion
+used in the test (LP #1577948).
+- d/t/packages-and-report: Check if the corresponding section
+  is present into logwatch report for a list of packages/services
+  (now only for sshd).
+
+ -- Miriam España Acebal   Thu, 29 Jul 2021 16:53:01 +0200
+
 logwatch (7.5.5-1ubuntu2) hirsute; urgency=medium
 
   * d/p/0010-zz-zfs-detect-zfs-location.patch: Use explicit paths for
diff --git a/debian/tests/apparmor-unmatched-entries b/debian/tests/apparmor-unmatched-entries
new file mode 100644
index 000..4bfd784
--- /dev/null
+++ b/debian/tests/apparmor-unmatched-entries
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+##
+### no apparmor STATUS entries marked as unmatched ###
+##
+
+set -eo pipefail
+
+LOGWATCH_CONF_FILE="/etc/logwatch/conf/logwatch.conf"
+NEED_ERASING=1
+
+clear_logwatch_conf_file(){
+if [ "${NEED_ERASING}" -eq "0" ]; then 
+if [ -e "${LOGWATCH_CONF_FILE}".test.bak ]; then
+cp "${LOGWATCH_CONF_FILE}".test.bak "${LOGWATCH_CONF_FILE}"
+rm "${LOGWATCH_CONF_FILE}".test.bak
+else
+rm "${LOGWATCH_CONF_FILE}"
+fi
+fi
+}
+
+trap ' clear_logwatch_conf_file ' 0 INT QUIT ABRT PIPE TERM
+
+cp "$(dirname "${0}")"/data/unmatched-entries-apparmor_kern.log "${AUTOPKGTEST_TMP}"/kern.log
+
+if  ! [ -f "${LOGWATCH_CONF_FILE}" ] ; then
+echo "AppendVarLogToLogDirs = 0" >> "${LOGWATCH_CONF_FILE}"
+elif ! grep -q "^AppendVarLogToLogDirs" "${LOGWATCH_CONF_FILE}" ; then
+cp "${LOGWATCH_CONF_FILE}" "${LOGWATCH_CONF_FILE}".test.bak
+echo "AppendVarLogToLogDirs = 0" >> "${LOGWATCH_CONF_FILE}"
+else
+sed -i.test.bak 's/^\(AppendVarLogToLogDirs = \).*/\10/' "${LOGWATCH_CONF_FILE}"
+fi
+NEED_ERASING=0
+
+if logwatch --detail High --range all --service kernel --logdir "${AUTOPKGTEST_TMP}" --output stdout | grep -qF "**Unmatched Entries**"; then
+exit 1
+else
+exit 0
+fi
diff --git a/debian/tests/basic-checks b/debian/tests/basic-checks
new file mode 100755
index 000..dcec7b9
--- /dev/null
+++ b/debian/tests/basic-checks
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+
+### Check main installation requirements ###
+
+
+set -e
+
+SHAREDIR="/usr/share/logwatch"
+
+# Config file
+echo "Checking config file present"
+test -e "${SHAREDIR}"/dist.conf/logwatch.conf
+
+# Services
+echo "Checking service configs are installed"
+test -d "${SHAREDIR}"/dist.conf/services
+services_conf_files=("${SHAREDIR}"/dist.conf/services/*.conf)
+num_scf=${#services_conf_files[@]}
+echo "Service files are = ${num_scf}"
+test "${num_scf}" -gt "0"
+
+# Logfiles
+echo "Checking logs configs are installed"
+test -d "$SHAREDIR/dist.conf/logfiles"
+logfiles_conf_files=("${SHAREDIR}"/dist.conf/logfiles/*.conf)
+num_lcf=${#logfiles_conf_files[@]}
+echo "Logfiles are = ${num_lcf}"
+test "${num_lcf}" -gt "0"
+
+# Script
+echo "Checking binary is present and its usefulness"
+test -e /usr/sbin/logwatch
+logwatch --version
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 000..feefe91
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,15 @@
+Tests: basic-checks
+Depends: @
+Restrictions: superficial
+
+Tests: syntax-check
+Depends: @, liburi-perl
+Restrictions: allow-stderr 
+
+Tests: detail su-l-check apparmor-unmatched-entries
+Depends: @ 
+Restrictions: needs-root
+
+Tests: packages-and-report
+Depends: @
+Restrictions:needs-root isolation-container
diff --git a/debian/tests/data/su-l b/debian/tests/data/su-l
new file mode 100644
index 000..4687e20
--- /dev/null
+++ b/debian/tests/data/su-l
@@ -0,0 

Bug#844989:

2023-07-05 Thread Miriam Espana Acebal
Hi,

I am interested in working on this, by submitting a proposal for a new
debian/rules refactor (using the debhelper and dh-commands) that would make
it possible to get debugging information. I think there is interest in
debugging symbols (as we can see due to this very request bug), and that it
is worthwhile.

  Still, I would like to get the green light from the maintainer before I
start with it, in the sense that, with the necessary reviews and approvals,
it would have a chance of being accepted here.

Thanks in advance,

Miriam



-- 
Miriam España Acebal
Software Engineer II - Ubuntu PublicCloud/Server
Canonical Ltd.


Bug#960062:

2023-11-28 Thread Miriam Espana Acebal
Hi,

I'm working on this package on Ubuntu, to promote it from universe to main.
I saw this bug, and it could be a blocker for that process. Reading the
changes files,
the following entry seems to be related (per the comments on
upstream's issue [1] too):

 1.947 2020-05-09 14:30:06-04:00 America/New_York (TRIAL RELEASE)
- add $Email::MIME::MAX_DEPTH and refuse to parse deeper than that
many
  parts; current default: 10

Do you know, as maintainers, if this bug is fixed with that?  One of the
reviewers already asked upstream [1] to see if we can get a confirmation
from there.

Any clue is highly appreciated... thanks in advance.

Miriam (mirespace)

[1] *https://github.com/rjbs/Email-MIME/issues/66
 *
-- 
Miriam España Acebal
Software Engineer II - Ubuntu PublicCloud/Server
Canonical Ltd.


Bug#1062716:

2024-02-02 Thread Miriam Espana Acebal
Attaching patch.
-- 
Miriam España Acebal
Software Engineer II - Ubuntu PublicCloud/Server
Canonical Ltd.
From 938bd71e0e8af3d3c854e54a12f5fea7d1a5e63e Mon Sep 17 00:00:00 2001
From: Miriam Espana Acebal 
Date: Fri, 2 Feb 2024 14:19:36 +0100
Subject: [PATCH] * d/prerm, d/postinst: fix path according to /usr movement

---
 debian/postinst | 2 +-
 debian/prerm| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index e92a53d..456e73a 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -3,7 +3,7 @@
 set -e
 
 if [ "$1" = configure ]; then
-update-alternatives --install /bin/mt mt /bin/mt-gnu 10 \
+update-alternatives --install /usr/bin/mt mt /usr/bin/mt-gnu 10 \
   --slave \
 	/usr/share/man/man1/mt.1.gz mt.1.gz /usr/share/man/man1/mt-gnu.1.gz
 fi
diff --git a/debian/prerm b/debian/prerm
index 89490ea..08f3b39 100644
--- a/debian/prerm
+++ b/debian/prerm
@@ -3,5 +3,5 @@
 set -e
 
 if [ "$1" = remove ]; then
-update-alternatives --remove mt /bin/mt-gnu
+update-alternatives --remove mt /usr/bin/mt-gnu
 fi
-- 
2.40.1



Bug#1066243: Patch for FTBFS

2024-04-10 Thread Miriam Espana Acebal
Hi,

In ubuntu we applied the upstream's patch at
https://sourceforge.net/p/bristol/patches/3/ that I'll attach here for
fixing this FTBFS.

I am sending this for your consideration, and I hope that it helps.

Best,

Miriam

-- 
[image: Canonical-20th-anniversary]

Miriam España Acebal

Software Engineer II - Ubuntu Public Cloud/Server

Email:

miriam.esp...@canonical.com

Location:

Spain

canonical.com

ubuntu.com
Author: Florian Weimer 
Origin: https://sourceforge.net/p/bristol/patches/3/attachment/bristol-c99.patch
Bug-Ubuntu:  https://bugs.launchpad.net/bugs/2060784
Forwarded:   no
Last-Update: 2024-04-17
Description: Avoid implicit ints and implicit function declarations, to prevent
build failures with future compilers which do not support them.

--- a/bristol/bristolmemorymoog.c
+++ b/bristol/bristolmemorymoog.c
@@ -33,6 +33,7 @@
 #include "bristolmemorymoog.h"
 
 extern int buildCurrentTable(Baudio *, float);
+extern void doPitchWheel(Baudio *);
 
 /*
  * Use of these memorymoog global buffers will be an issue with use of multiple
--- a/libbrightonC11/bRoutines.c
+++ b/libbrightonC11/bRoutines.c
@@ -24,6 +24,7 @@
 
 void *
 brightonX11malloc(size)
+int size;
 {
 	void *mem;
 
--- a/libbrightonX11/bRoutines.c
+++ b/libbrightonX11/bRoutines.c
@@ -25,6 +25,7 @@
 
 void *
 brightonX11malloc(size)
+int size;
 {
 	void *mem;
 
--- a/libbristol/bristolcdefs.c
+++ b/libbristol/bristolcdefs.c
@@ -25,6 +25,7 @@
 
 void *
 bristolmalloc(size)
+int size;
 {
 	char *mem;
 
@@ -39,6 +40,7 @@
 
 void *
 bristolmalloc0(size)
+int size;
 {
 	char *mem;
 
--- a/libbristolaudio/audioEngine.c
+++ b/libbristolaudio/audioEngine.c
@@ -85,6 +85,7 @@
 initAudioDevice2(audioDev, devID, fragSize)
 duplexDev *audioDev;
 int devID;
+int fragSize;
 {
 	/*
 	 * The device is basically just opened for the first call of this routine.
@@ -118,6 +119,7 @@
 int
 setAudioStart2(audioDev, devID)
 duplexDev *audioDev;
+int devID;
 {
 	int enable;
 
@@ -162,6 +164,7 @@
 int
 setAudioStop2(audioDev, devID)
 duplexDev *audioDev;
+int devID;
 {
 	int enable;
 
--- a/libbristolaudio/audioEngineOSS.c
+++ b/libbristolaudio/audioEngineOSS.c
@@ -49,6 +49,7 @@
 ossAudioInit(audioDev, devID, fragSize)
 duplexDev *audioDev;
 int devID;
+int fragSize;
 {
 #if (BRISTOL_HAS_OSS == 1)
 	int results, data = 0, mode;
--- a/libbristolaudio/audioGUI.c
+++ b/libbristolaudio/audioGUI.c
@@ -161,6 +161,7 @@
 char *
 getControllerName(audioDev, controller)
 duplexDev *audioDev;
+int controller;
 {
 #if (BRISTOL_HAS_ALSA == 1)
 	if ((audioDev->flags & AUDIO_ALSA) != 0)
@@ -173,6 +174,8 @@
 int
 setRecordSource(audioDev, controller, position)
 duplexDev *audioDev;
+int controller;
+int position;
 {
 #if (BRISTOL_HAS_ALSA == 1)
 	if ((audioDev->flags & AUDIO_ALSA) != 0)
@@ -185,6 +188,7 @@
 int
 getRecordability(audioDev, controller)
 duplexDev *audioDev;
+int controller;
 {
 #if (BRISTOL_HAS_ALSA == 1)
 	if ((audioDev->flags & AUDIO_ALSA) != 0)
@@ -197,6 +201,7 @@
 int
 getMutability(audioDev, controller)
 duplexDev *audioDev;
+int controller;
 {
 #if (BRISTOL_HAS_ALSA == 1)
 	if ((audioDev->flags & AUDIO_ALSA) != 0)
@@ -211,6 +216,7 @@
 int
 getStereoStatus(audioDev, controller)
 duplexDev *audioDev;
+int controller;
 {
 #if (BRISTOL_HAS_ALSA == 1)
 	if ((audioDev->flags & AUDIO_ALSA) != 0)
@@ -222,6 +228,8 @@
 int
 getValue(audioDev, controller, side)
 duplexDev *audioDev;
+int controller;
+int side;
 {
 #if (BRISTOL_HAS_ALSA == 1)
 	if ((audioDev->flags & AUDIO_ALSA) != 0)
@@ -233,6 +241,9 @@
 int
 setAudioValue(audioDev, controller, side, value)
 duplexDev *audioDev;
+int controller;
+int side;
+int value;
 {
 	if (audioDev->cflags & SLAB_AUDIODBG)
 		printf("setAudioValue(%p, %i, %i, %i)\n", audioDev, controller, side, value); 
@@ -251,6 +262,8 @@
 int
 setAudioMute(audioDev, controller, value)
 duplexDev *audioDev;
+int controller;
+int value;
 {
 	if (audioDev->cflags & SLAB_AUDIODBG)
 		printf("setAudioMute()\n");
@@ -280,6 +293,7 @@
 int
 getAudioCapability(audioDev, controller)
 duplexDev *audioDev;
+int controller;
 {
 	if (audioDev->cflags & SLAB_AUDIODBG)
 		printf("getAudioCapability(%s, %i)\n", audioDev->devName, controller);
@@ -296,6 +310,7 @@
 int
 validDev(audioDev, index)
 duplexDev *audioDev;
+int index;
 {
 #if (BRISTOL_HAS_ALSA == 1)
 	if ((audioDev->flags & AUDIO_ALSA) != 0)
--- a/libbristolaudio/audioGUIOSS.c
+++ b/libbristolaudio/audioGUIOSS.c
@@ -91,7 +91,11 @@
  */
 static int
 setAudioOSS(fd, audioDev, param, valueL, valueR)
+int fd;
 duplexDev *audioDev;
+int param;
+int valueL;
+int valueR;
 {
 #if (BRISTOL_HAS_OSS == 1)
 	int value, command;
@@ -259,6 +263,7 @@
 int
 getOSSCapability(audioDev, controller)
 duplexDev *audioDev;
+int controller;
 {
 	if ((audioDev->stereoCaps | audioDev->monoCaps) & (1 << controller))
 		return controller;
@@ -268,6 +273,7 @@
 int
 getOSSRecordability(audioDev, cont)
 duplexDev *audioDev;
+int cont;
 {
 	if (audioDev->cflags & SLAB_AUDIODBG)
 		printf("getOSSRecordability(%i, %i)\n", 

Bug#1066213:

2024-04-12 Thread Miriam Espana Acebal
Hi,

In ubuntu we applied the upstream's fix at
https://github.com/jedsoft/slrn/pull/1 (with some refreshing action)  that
I'll attach here for fixing this FTBFS.

I am sending this for your consideration, and I hope that it helps.

Best,

Miriam

-- 
[image: Canonical-20th-anniversary]

Miriam España Acebal

Software Engineer II - Ubuntu Public Cloud/Server

Email:

miriam.esp...@canonical.com

Location:

Spain

canonical.com

ubuntu.com
Origin: upstream, https://github.com/jedsoft/slrn/pull/1/commits/f550d0ab9e1cd3cfe844022435c3d98af3c18441
From: Florian Weimer 
Date: Sat, 4 Feb 2023 15:04:36 +0100
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/slrn/+bug/2061030
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066213
Subject: [PATCH] autoconf: Fix C99 compatibility issue in the VA_COPY checks

The exit function is called without including , resulting
in an implicit function declarations.  Future compilers will not
support implicit function declarations by default.  This will lead
to build failures.
---
 autoconf/configure.ac | 3 +++
 configure | 3 +++
 2 files changed, 6 insertions(+)

--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -399,6 +399,7 @@
 AC_CACHE_VAL(slrn_cv_va_copy,[
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
@@ -419,6 +420,7 @@
 AC_CACHE_VAL(slrn_cv___va_copy,[
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
@@ -439,6 +441,7 @@
 AC_CACHE_VAL(slrn_cv_va_val_copy,[
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
--- a/configure
+++ b/configure
@@ -8307,6 +8308,7 @@ else
 /* end confdefs.h.  */
 
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
@@ -8353,6 +8354,7 @@ else
 /* end confdefs.h.  */
 
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
@@ -8399,6 +8400,7 @@
 /* end confdefs.h.  */
 
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);


Bug#1066275:

2024-04-12 Thread Miriam Espana Acebal
Hi,

In ubuntu we applied the upstream's fix at
https://github.com/rlancaste/stellarsolver/pull/139. I adapted it to a
patch that I attach here for fixing this FTBFS.

I am sending this for your consideration, and I hope it helps.

Best,

Miriam

-- 
[image: Canonical-20th-anniversary]

Miriam España Acebal

Software Engineer II - Ubuntu Public Cloud/Server

Email:

miriam.esp...@canonical.com

Location:

Spain  (GMT+2)

canonical.com

ubuntu.com
Description: Fix qsort warning implicit function declarations
 The qsort_r function comes with different prototypes on different
 systems. There are some tests around NEED_DECLARE_QSORT_R and
 NEED_SWAP_QSORT_R that try to work around that. However, they only
 work with compilers which accept implicit function declarations.

 The qsort_r fix is backported from astrometry.
Author: timsurber 
Origin: upstream, https://github.com/rlancaste/stellarsolver/pull/139
Bug: https://github.com/rlancaste/stellarsolver/issues/108
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066275
Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/stellarsolver/+bug/2060959
Forwarded: not-needed
Last-Update: 2024-04-11 
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/stellarsolver/astrometry/include/astrometry/ioutils.h
+++ b/stellarsolver/astrometry/include/astrometry/ioutils.h
@@ -31,6 +31,15 @@
 
 extern uint32_t ENDIAN_DETECTOR;
 
+void QSORT_R(void* base, size_t nmembers, size_t member_size,
+ void* token, int (*compar)(void *, const void *, const void *));
+
+/**
+   You should define the "comparison" function like this:
+   static int QSORT_COMPARISON_FUNCTION(my_comparison, void* token, const void* v1, const void* v2) {
+ */
+#define QSORT_COMPARISON_FUNCTION(func, thunk, v1, v2) func(thunk, v1, v2)
+
 int copy_file(const char* infn, const char* outfn);
 
 int pad_fid(FILE* fid, size_t len, char pad);
--- a/stellarsolver/astrometry/include/astrometry/os-features-config.h
+++ b/stellarsolver/astrometry/include/astrometry/os-features-config.h
@@ -1,4 +1,4 @@
-#define NEED_DECLARE_QSORT_R 0
-#define NEED_QSORT_R 1
+#define NEED_DECLARE_QSORT_R 1
+#define NEED_QSORT_R 0
 #define NEED_SWAP_QSORT_R 0
 #define HAVE_NETPBM 0
\ No newline at end of file
--- a/stellarsolver/astrometry/include/astrometry/permutedsort.h
+++ b/stellarsolver/astrometry/include/astrometry/permutedsort.h
@@ -7,7 +7,7 @@
 #define PERMUTED_SORT_H
 
 // for QSORT_COMPARISON_FUNCTION
-#include "os-features.h"
+#include "ioutils.h"
 
 /*
  Computes the permutation array that will cause the "realarray" to be
--- a/stellarsolver/astrometry/os-features.h
+++ b/stellarsolver/astrometry/os-features.h
@@ -108,22 +108,6 @@
-Ubuntu 8.10
 */
 
-#if NEED_DECLARE_QSORT_R
- NOTE: this declaration must match os-features-test.c .
-void qsort_r(void *base, size_t nmemb, size_t sz,
- void *userdata,
- int (*compar)(void *, const void *, const void *));
-#endif
-
-#if NEED_SWAP_QSORT_R
-#define QSORT_R(a,b,c,d,e) qsort_r(a,b,c,e,d)
-#define QSORT_COMPARISON_FUNCTION(func, thunk, v1, v2) func(v1, v2, thunk)
-
-#else
-#define QSORT_R qsort_r
-#define QSORT_COMPARISON_FUNCTION(func, thunk, v1, v2) func(thunk, v1, v2)
-
-#endif
 
 // As suggested in http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Function-Names.html
 #if __STDC_VERSION__ < 199901L
--- a/stellarsolver/astrometry/util/bl-sort.c
+++ b/stellarsolver/astrometry/util/bl-sort.c
@@ -3,6 +3,8 @@
  # Licensed under a 3-clause BSD style license - see LICENSE
  */
 
+#include "ioutils.h" // for QSORT_R
+
 #include "bl-sort.h"
 // for qsort_r
 #include "os-features.h"
@@ -166,4 +168,3 @@
 void  pl_sort(pl* list, int (*compare)(const void* v1, const void* v2)) {
 bl_sort_with_userdata(list, sort_helper_pl, compare);
 }
-
--- a/stellarsolver/astrometry/util/fitstable.c
+++ b/stellarsolver/astrometry/util/fitstable.c
@@ -1227,7 +1227,11 @@
 else {
 tab->fid = fopen(fn, mode);
 if (!tab->fid) {
-SYSERROR("Couldn't open output file %s for writing", fn);
+if (fn != NULL) {
+SYSERROR("Couldn't open output file %s for writing", fn);
+} else {
+SYSERROR("Couldn't open output file because the filename is null");
+}
 goto bailout;
 }
 }
--- a/stellarsolver/astrometry/util/ioutils.c
+++ b/stellarsolver/astrometry/util/ioutils.c
@@ -43,7 +43,7 @@
 
 #include "os-features.h"
 #include "ioutils.h"
-//#include "os-features.h"
+#include "qsort_reentrant.c"
 #include "errors.h"
 #include "log.h"
 
--- a/stellarsolver/astrometry/util/os-features-test.c
+++ b/stellarsolver/astrometry/util/os-features-test.c
@@ -14,63 +14,6 @@
 }
 #endif
 
-#ifdef TEST_QSORT_R
-static int cmp(void* u, const void* a, const void* b) {
-return 0;
-}
-int main() {
-int array;
-int baton;
-qsort_r(, 1, sizeof(int), , cmp);
-//printf("#define NEED_QSORT_R 0\n");
-

Bug#1066224:

2024-04-19 Thread Miriam Espana Acebal
Hi,

In ubuntu we applied the upstream's fix at
https://github.com/radvd-project/radvd/pull/196. I adapted it to a pair of
patches that I attach here for fixing this FTBFS.

I am sending this for your consideration, and I hope it helps.

Best,

Miriam

-- 
[image: Canonical-20th-anniversary]

Miriam España Acebal

Software Engineer II - Ubuntu Public Cloud/Server

Email:

miriam.esp...@canonical.com

Location:

Spain  (GMT+2)

canonical.com

ubuntu.com
Origin: upstream, https://github.com/radvd-project/radvd/commit/e0f5bcd9091a5f7abd423fce9f372c8079849a64
From: Sam James 
Date: Thu, 17 Nov 2022 22:03:25 +
Subject: [PATCH] gram.y: Fix -Wimplicit-function-declaration

Clang 16 makes -Wimplicit-function-declaration an error by default.

For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2],
or the (new) c-std-porting mailing list [3].

[0] https://lwn.net/Articles/913505/
[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
[2] https://wiki.gentoo.org/wiki/Modern_C_porting
[3] hosted at lists.linux.dev.

Bug-Gentoo: https://bugs.gentoo.org/880823
Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/radvd/+bug/2061370
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066224
Forwarded: yes
Signed-off-by: Sam James 
---
 gram.y | 4 
 1 file changed, 4 insertions(+)

--- a/gram.y
+++ b/gram.y
@@ -20,6 +20,10 @@
 
 #define YYERROR_VERBOSE 1
 
+int yylex (void);
+void yyset_in (FILE * _in_str);
+int yylex_destroy (void);
+
 #if 0 /* no longer necessary? */
 #ifndef HAVE_IN6_ADDR_S6_ADDR
 # ifdef __FreeBSD__
Origin: upstream, https://github.com/radvd-project/radvd/commit/ff7ab0cf445236f30e58531175ba912614fed952
From: Sam James 
Date: Thu, 17 Nov 2022 22:03:25 +
Subject: [PATCH] Makefile.am: drop -Wno-implicit-function-declaration

1. Clang 16 makes -Wimplicit-function-declaration error by default
   (and it's planned that GCC 14 will do the same) so we need to fix
   the real problem. This is papering over it.

2. It's not true that there's nothing we can do about it. Fix in a follow-up
   commit.

Bug-Gentoo: https://bugs.gentoo.org/880823
Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/radvd/+bug/2061370
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066224
Forwarded: yes
Signed-off-by: Sam James 
---
 Makefile.am | 3 ---
 1 file changed, 3 deletions(-)

--- a/Makefile.am
+++ b/Makefile.am
@@ -66,9 +66,6 @@
 scanner.c: gram.h
 gram.h: gram.c
 
-libradvd_parser_a_CFLAGS = \
-	-Wno-implicit-function-declaration
-
 libradvd_parser_a_SOURCES = \
 	gram.h \
 	gram.y \