Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock X-Debbugs-Cc: i...@packages.debian.org Control: affects -1 + src:inn2
Please unblock package inn2 This is the diff betwwen 2.7.1 RC1 and 2.7.1. It contains many documentation fixes, small fixes to pullnews and a significant for ovsqlite-util. It also adds a versioned Breaks on manpages-dev which fixes the RC bug #1035098. The 2.7.1 package is being used in production on one of my news servers. Follows the git diff between debian/2.7.1_20230322-1 and debian/2.7.1-1, abridged of whitespace and documentation changes. The full changelog can be consulted at https://salsa.debian.org/md/inn2/-/commits/master . The package has a fairly decent autopkgtest but it currently cannot work on the Debian infrastructure, because the workers do not have valid hostnames. I will find a solution after the release, so please bear with me once more. :-) unblock inn2/2.7.1-1 diff --git a/Makefile.global.in b/Makefile.global.in index db42dee2e..3a84f23e7 100644 --- a/Makefile.global.in +++ b/Makefile.global.in @@ -20,7 +20,7 @@ ## be complying with the NNTP protocol. VERSION = 2.7.1 -VERSION_EXTRA = rc1 version +VERSION_EXTRA = ## The absolute path to the top of the build directory, used to find the ## libraries built as part of INN. Using relative paths confuses libtool diff --git a/backends/news2mail.in b/backends/news2mail.in index bef6ca86a..952cf4610 100644 --- a/backends/news2mail.in +++ b/backends/news2mail.in @@ -104,9 +104,15 @@ sub mailto { my ($t, $s, @a) = @_; my $sendmail = $INN::Config::mta; + # Remove %s and -f from the mta command line (we'll explicitly set + # recipients and an envelope sender below). + # Remove -oem as we'll set -oee so that sendmail exits with a + # non-zero status only if the mail cannot be sent. $sendmail =~ s!\s*%s!!; + $sendmail =~ s!(^|\s+)-f\s*\S*!!; + $sendmail =~ s!(^|\s+)-oem!!; my @command = ( - split(' ', $sendmail), '-ee', '-odq', "-f$s", + split(' ', $sendmail), '-oee', '-odq', "-f$s", "-pNNTP:$INN::Config::pathhost", @a ); diff --git a/debian/changelog b/debian/changelog index eff319e64..eeaf10caa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +inn2 (2.7.1-1) unstable; urgency=medium + + * New upstream release. + * Breaks manpages-dev << 6.03-2 to make upgrades smoother, because of + file(3) and list(3) removed from inn2-dev 2.6.5-1. (Closes: #1035098) + + -- Marco d'Itri <m...@linux.it> Mon, 01 May 2023 19:25:42 +0200 + inn2 (2.7.1~20230322-1) unstable; urgency=medium * New release candidate 1 of the stable branch. diff --git a/debian/control b/debian/control index 93d37618c..8d7089372 100644 --- a/debian/control +++ b/debian/control @@ -63,6 +63,7 @@ Package: inn2-dev Section: devel Architecture: any Depends: ${misc:Depends} +Breaks: manpages-dev (<< 6.03-2) Conflicts: inn Description: libinn.a library, headers and man pages You will only need this if you are going to compile programs that diff --git a/frontends/pullnews.in b/frontends/pullnews.in index b21ce29b4..0d8809cec 100644 --- a/frontends/pullnews.in +++ b/frontends/pullnews.in @@ -100,6 +100,7 @@ my $defaultRetryTime = 1; my $defaultProgressWidth = 50; my $defaultMaxArts; my $lockfile; +my $runEndBlock = 0; # Check whether pullnews is run inside INN. my $use_inn_shlock = 0; @@ -120,6 +121,8 @@ if (not $use_inn_shlock) { } END { + return unless $runEndBlock; + # In case we bail out, while holding a lock. if ($use_inn_shlock) { INN::Utils::Shlock::releaselocks(); @@ -423,7 +426,7 @@ if ($use_inn_shlock) { INN::Utils::Shlock::lock($lockfile) or die "cannot create lockfile $lockfile\n"; } else { - sysopen(LOCK, "$lockfile", O_RDWR | O_CREAT, 0700) + sysopen(LOCK, "$lockfile", O_RDWR | O_CREAT, 0644) or die "cannot create lockfile $lockfile: $!\n"; $oldfh = select; select LOCK; @@ -439,6 +442,9 @@ if ($use_inn_shlock) { print LOCK "$$\n"; } +# Now that a lock file has been created, ensure we release it when this process +# ends or is stopped. +$runEndBlock = 1; print LOG scalar(localtime(time)), " start\n\n" unless $quiet; @@ -554,6 +560,7 @@ if (not $quiet and not $quietness) { } my $connectionAttempts = 0; +my %groupsStarted = (); UPSTREAM: foreach my $server (@servers) { @@ -683,6 +690,7 @@ foreach my $server (@servers) { } continue { # Reinitialize the counter for the next server. $connectionAttempts = 0; + %groupsStarted = (); } saveConfig(); @@ -768,7 +776,8 @@ sub stats { sub saveConfig { return if $no_op; - $SIG{INT} = $SIG{QUIT} = 'IGNORE'; + local $SIG{INT} = 'IGNORE'; + local $SIG{QUIT} = 'IGNORE'; open(FILE, ">$groupFile") || die "can't open $groupFile: $!\n"; my $server; @@ -846,12 +854,18 @@ sub crossFeedGroup { printf LOG "\t%d article%s available (first %d, last %d)\n", $narticles, $narticles != 1 ? "s" : "", $first, $last; } - if (defined $watermark) { + + # Do not set several times the water mark to another value. Just go on + # downloading articles from the last retrieved one when the connection + # timed out. + if (defined($watermark) and !exists($groupsStarted{$group})) { printf LOG "\tOur previous highest: %d\n", $prevHigh if not $quiet; $high = $watermark; $high = $last + $watermark if substr($watermark, 0, 1) eq '-'; $high = 0 if $high < 0; $shash->{$group} = [time, $high]; + $prevHigh = $high; + $groupsStarted{$group} = 1; } printf LOG "\tOur current highest: %d", $high if not $quiet; @@ -964,7 +979,7 @@ sub crossFeedGroup { } } $add_bytes_header = 1 if not $has_bytes_header; - push @{$article}, "\n" if not $is_control_art; + push @{$article}, "\r\n" if not $is_control_art; } } @@ -1001,7 +1016,7 @@ sub crossFeedGroup { $idx_blank_pre_body = $idx; $curr_hdr = lc($1) if $article->[$idx] =~ /^([^:[:blank:]]+):/; - if ($article->[$idx] eq "\n") { + if ($article->[$idx] eq "\r\n") { $headers = 0; next; } diff --git a/innd/rc.c b/innd/rc.c index 6e6f1a127..b65e3a2ab 100644 --- a/innd/rc.c +++ b/innd/rc.c @@ -61,7 +61,6 @@ typedef struct _REMOTETABLE { time_t Expires; } REMOTETABLE; -static char *RCslaveflag; static char *RCnnrpd = NULL; static char *RCnntpd = NULL; static CHANNEL **RCchan; @@ -424,8 +423,6 @@ RChandoff(int fd, HANDOFF h) } if (NNRPTracing) argv[i++] = "-t"; - if (RCslaveflag) - argv[i++] = RCslaveflag; for (j = 0; j < flags->count; j++) { argv[i++] = flags->strings[j]; diff --git a/lib/setproctitle.c b/lib/setproctitle.c index fd5e75351..a5a0212ca 100644 --- a/lib/setproctitle.c +++ b/lib/setproctitle.c @@ -77,7 +77,8 @@ setproctitle(const char *format, ...) title = title_start; *title++ = '-'; *title++ = ' '; - length = title_end - title_start - 2; + /* Remaining length after initial "- ". */ + length = (title_end - title_start + 1) - 2; /* Now, put in the actual content. Get the program name from message_program_name if it's set. */ diff --git a/storage/ovsqlite/ovsqlite-util.in b/storage/ovsqlite/ovsqlite-util.in index 626949b82..f86b8392e 100644 --- a/storage/ovsqlite/ovsqlite-util.in +++ b/storage/ovsqlite/ovsqlite-util.in @@ -346,7 +345,7 @@ insert into repairs expired, groupname, flag_alias) select groupid, new_low, new_low != low as low_was_bad, - new_high, new_high != high as high_was_bad, + new_high, new_high > high as high_was_bad, new_count, new_count != "count" as count_was_bad, expired, groupname, flag_alias from new_stats diff --git a/support/getrra-c-util b/support/getrra-c-util index 84f688614..4ee537f58 100755 --- a/support/getrra-c-util +++ b/support/getrra-c-util @@ -40,10 +40,12 @@ download() { # Update the path of included C header files. # Change "RRA_" to "INN_", "rra_" to "inn_", and "UTIL_" to "INN_" # so as to keep a homogeneous naming convention in INN source code. + # Also remove the first 2 lines containing an internal serial number. # Changes in shell, m4 and C files are not the same. if [ "$2" = "m4" ]; then sed -i -e 's/RRA_/INN_/g' \ -e 's/rra_/inn_/g' \ + -e '1,2d' \ ${TEMP} # Remove useless function for INN. The rest is just the test suite: diff --git a/tests/lib/fakewrite.c b/tests/lib/fakewrite.c index 1467b1415..2b0a73fa1 100644 --- a/tests/lib/fakewrite.c +++ b/tests/lib/fakewrite.c @@ -4,7 +4,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. * - * Copyright 2000-2002, 2004, 2017 Russ Allbery <ea...@eyrie.org> + * Copyright 2000-2002, 2004, 2017, 2023 Russ Allbery <ea...@eyrie.org> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -64,7 +64,7 @@ bool write_fail = false; ssize_t fake_write(int fd UNUSED, const void *data, size_t n) { - size_t total; + size_t total, left; if (write_fail) return 0; @@ -72,9 +72,14 @@ fake_write(int fd UNUSED, const void *data, size_t n) errno = EINTR; return -1; } - total = (n < 32) ? n : 32; - if (256 - write_offset < total) - total = 256 - write_offset; + if (write_offset >= sizeof(write_buffer)) { + errno = ENOSPC; + return 0; + } + left = sizeof(write_buffer) - write_offset; + if (left > 32) + left = 32; + total = (n < left) ? n : left; memcpy(write_buffer + write_offset, data, total); write_offset += total; return total; @@ -89,7 +94,7 @@ fake_write(int fd UNUSED, const void *data, size_t n) ssize_t fake_pwrite(int fd UNUSED, const void *data, size_t n, off_t offset) { - size_t total; + size_t total, left; if (write_fail) return 0; @@ -97,13 +102,14 @@ fake_pwrite(int fd UNUSED, const void *data, size_t n, off_t offset) errno = EINTR; return -1; } - total = (n < 32) ? n : 32; - if (offset > 256) { + if (offset >= (ssize_t) sizeof(write_buffer)) { errno = ENOSPC; return -1; } - if ((size_t) (256 - offset) < total) - total = 256 - offset; + left = sizeof(write_buffer) - offset; + if (left > 32) + left = 32; + total = (n < left) ? n : left; memcpy(write_buffer + offset, data, total); return total; } @@ -125,7 +131,7 @@ fake_writev(int fd UNUSED, const struct iovec *iov, int iovcnt) errno = EINTR; return -1; } - left = 256 - write_offset; + left = sizeof(write_buffer) - write_offset; if (left > 32) left = 32; total = 0; diff --git a/tests/lib/getnameinfo-t.c b/tests/lib/getnameinfo-t.c index 93991eeb1..24864fc06 100644 --- a/tests/lib/getnameinfo-t.c +++ b/tests/lib/getnameinfo-t.c @@ -5,7 +5,7 @@ * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. * * Written by Russ Allbery <ea...@eyrie.org> - * Copyright 2005-2006, 2014, 2018, 2022 Russ Allbery <ea...@eyrie.org> + * Copyright 2005-2006, 2014, 2018, 2022-2023 Russ Allbery <ea...@eyrie.org> * Copyright 2007-2011 * The Board of Trustees of the Leland Stanford Junior University * @@ -150,7 +150,8 @@ main(void) inet_aton("0.0.0.0", &sin.sin_addr); status = test_getnameinfo(sa, sizeof(sin), node, sizeof(node), NULL, 0, 0); is_int(0, status, "lookup of 0.0.0.0"); - hp = gethostbyaddr(sa, sizeof(sin), AF_INET); + hp = gethostbyaddr((const void *) &sin.sin_addr, sizeof(sin.sin_addr), + AF_INET); if (hp != NULL) skip_block(2, "0.0.0.0 resolves to a hostname"); else { diff --git a/tests/lib/network/server-t.c b/tests/lib/network/server-t.c index 9e543efdc..4f30602cd 100644 --- a/tests/lib/network/server-t.c +++ b/tests/lib/network/server-t.c @@ -5,7 +5,7 @@ * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. * * Written by Russ Allbery <ea...@eyrie.org> - * Copyright 2005, 2013, 2016-2018, 2020 Russ Allbery <ea...@eyrie.org> + * Copyright 2005, 2013, 2016-2018, 2020, 2023 Russ Allbery <ea...@eyrie.org> * Copyright 2009-2013 * The Board of Trustees of the Leland Stanford Junior University * @@ -282,10 +282,6 @@ test_server_accept(socket_type fd) * come from other addresses. Hosts that only have IPv6 interfaces will see a * client connection on ::1 instead. Avoid checking if the client IP is * 127.0.0.1 for that reason. Hopefully this won't hide bugs. - * - * saddr is allocated from the heap instead of using a local struct - * sockaddr_storage to work around a misdiagnosis of strict aliasing - * violations from gcc 4.4 (fixed in later versions). */ static void test_server_accept_any(socket_type fds[], unsigned int count) @@ -298,7 +294,13 @@ test_server_accept_any(socket_type fds[], unsigned int count) /* If there are firewalls that block connections, we could hang here. */ alarm(5); - /* Accept the connection and writes from the client. */ + /* + * Accept the connection and writes from the client. + * + * saddr is allocated from the heap instead of using a local struct + * sockaddr_storage to work around a misdiagnosis of strict aliasing + * violations from gcc 4.4 (fixed in later versions). + */ slen = sizeof(struct sockaddr_storage); saddr = bcalloc(1, slen); client = network_accept_any(fds, count, saddr, &slen); @@ -407,7 +409,9 @@ get_sockaddr(socket_type fd) size = sizeof(struct sockaddr_storage); if (getsockname(fd, saddr, &size) < 0) sysbail("cannot getsockname"); - if (size > sizeof(struct sockaddr)) { + + /* This seems highly unlikely, but handle it anyway. */ + if (size > sizeof(struct sockaddr_storage)) { free(saddr); saddr = bmalloc(size); if (getsockname(fd, saddr, &size) < 0) diff --git a/tests/runtests.c b/tests/runtests.c index 72f4a70d9..3fd55a525 100644 --- a/tests/runtests.c +++ b/tests/runtests.c @@ -408,7 +408,7 @@ x_reallocarray(void *p, size_t n, size_t size, const char *file, int line) n = (n > 0) ? n : 1; size = (size > 0) ? size : 1; - if (n > 0 && UINT_MAX / n <= size) + if (UINT_MAX / n <= size) sysdie("realloc too large at %s line %d", file, line); p = realloc(p, n * size); if (p == NULL) -- ciao, Marco
signature.asc
Description: PGP signature