Le 01/08/2012 23:17, Julien Cristau a écrit :
It's much easier for us if we don't have to go chase patches in other places and stuff is all in the mail.
Here is the full debdiff between gnunet 0.9.3-2 (in testing/unstable) and the new revision I prepared.
Cheers, Bertrand
diff -Nru gnunet-0.9.3/debian/changelog gnunet-0.9.3/debian/changelog --- gnunet-0.9.3/debian/changelog 2012-06-20 23:55:23.000000000 +0200 +++ gnunet-0.9.3/debian/changelog 2012-08-01 22:10:06.000000000 +0200 @@ -1,3 +1,21 @@ +gnunet (0.9.3-3) unstable; urgency=low + + * debian/control: update Vcs-* to the new repository in collab-maint. + * Install only the generated binaries on Hurd, thanks to Cyril Roelandt + (Closes: #670794). + * Use chmod and chown instead of dpkg-statoverride to set special permissions + and upgrade properly depending on the previous version (Closes: #673301). + * Rewrite gnunet-server.init based on /etc/init.d/skeleton and make + gnunet-server depend on lsb-base to use LSB logging. + * Fix "gcc-4.6: [sparc] compiler fails to align stack-allocated + struct, with array of uint32-values to 32-bit boundary": + new patch sparc_alignment.patch, taken from upstream: + https://lists.gnu.org/archive/html/gnunet-svn/2012-07/msg00548.html + Thanks to Jurij Smakov for the analysis. + (Closes: #670578) + + -- Bertrand Marc <beberk...@gmail.com> Wed, 01 Aug 2012 22:09:49 +0200 + gnunet (0.9.3-2) unstable; urgency=low * Clean properly dpkg-statoverride in gnunet-server.postrm diff -Nru gnunet-0.9.3/debian/control gnunet-0.9.3/debian/control --- gnunet-0.9.3/debian/control 2012-06-10 10:29:08.000000000 +0200 +++ gnunet-0.9.3/debian/control 2012-07-13 20:04:35.000000000 +0200 @@ -10,8 +10,8 @@ libsqlite3-dev (>=3.0), libpq-dev (>=8.3), guile-1.8-dev, libglpk-dev (>=4.32) Build-Conflicts: autoconf2.13, automake1.4 Standards-Version: 3.9.3 -Vcs-Git: git://git.debian.org/git/users/bbk-guest/gnunet.git -Vcs-browser: http://git.debian.org/?p=users/bbk-guest/gnunet.git +Vcs-Git: git://git.debian.org/git/collab-maint/gnunet.git +Vcs-browser: http://git.debian.org/?p=collab-maint/gnunet.git Homepage: http://www.gnunet.org/ Package: gnunet @@ -75,7 +75,7 @@ Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends}, gnunet-common (= ${binary:Version}), - adduser, gettext, netbase + adduser, gettext, netbase, lsb-base Suggests: miniupnpc Breaks: gnunet-fuse (<<0.9), gnunet-client (<<0.9) Replaces: gnunet-fuse (<<0.9), gnunet-client (<<0.9) diff -Nru gnunet-0.9.3/debian/gnunet-server.init gnunet-0.9.3/debian/gnunet-server.init --- gnunet-0.9.3/debian/gnunet-server.init 2012-05-02 21:43:40.000000000 +0200 +++ gnunet-0.9.3/debian/gnunet-server.init 2012-07-13 20:02:50.000000000 +0200 @@ -1,64 +1,109 @@ -#!/bin/sh - +#! /bin/sh ### BEGIN INIT INFO -# Provides: gnunet-server -# Required-Start: $syslog $network $local_fs $remote_fs -# Required-Stop: $syslog $network $local_fs $remote_fs -# Should-Start: -# Should-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Starts the GNUnet server at boot time. -# Description: GNUnet is a secure, trust-based peer-to-peer framework. +# Provides: gnunet-server +# Required-Start: $remote_fs $syslog $network +# Required-Stop: $remote_fs $syslog $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts the GNUnet server at boot time. +# Description: GNUnet is a secure, trust-based peer-to-peer framework. ### END INIT INFO -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="GNUnet" +NAME=gnunet-server DAEMON=/usr/bin/gnunet-service-arm -NAME=gnunet-service-arm -DESC=GNUnet LOGFILE=/var/log/gnunetd/gnunetd.log +DAEMON_ARGS="-c /etc/gnunet.conf -d -l $LOGFILE" +SCRIPTNAME=/etc/init.d/$NAME -test -x "${DAEMON}" || exit 0 - -set -e - -# Get configuration -if [ -f /etc/default/gnunet-server ] -then - . /etc/default/gnunet-server -fi - -if [ "${GNUNET_AUTOSTART}" != "true" ] -then - exit 0 -fi - -case "${1}" in - start) - echo -n "Starting ${DESC}: " - start-stop-daemon --start --chuid ${GNUNET_USER} \ - --oknodo --quiet --exec ${DAEMON} -- -c \ - /etc/gnunet.conf -d -l $LOGFILE - echo "${NAME}." - ;; +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 - stop) - echo -n "Stopping ${DESC}: " - start-stop-daemon --stop --retry 15 \ - --oknodo --quiet --exec ${DAEMON} - echo "${NAME}." - ;; +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME - restart|force-reload) - ${0} stop - sleep 1 - ${0} start +[ "${GNUNET_AUTOSTART}" != "true" ] && exit 0 + +# Define LSB log_* functions. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --chuid $GNUNET_USER --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --exec $DAEMON + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + return "$RETVAL" +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac ;; - - *) - echo "Usage: ${0} {start|stop|restart|force-reload}" >&2 - exit 1 + *) + # Failed to stop + log_end_msg 1 ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; esac -exit 0 +: diff -Nru gnunet-0.9.3/debian/gnunet-server.install.hurd gnunet-0.9.3/debian/gnunet-server.install.hurd --- gnunet-0.9.3/debian/gnunet-server.install.hurd 1970-01-01 01:00:00.000000000 +0100 +++ gnunet-0.9.3/debian/gnunet-server.install.hurd 2012-07-01 16:59:50.000000000 +0200 @@ -0,0 +1,52 @@ +etc/gnunet.conf +usr/bin/gnunet-arm +usr/bin/gnunet-core +usr/bin/gnunet-daemon-* +usr/bin/gnunet-dht-* +usr/bin/gnunet-fs +usr/bin/gnunet-gns* +usr/bin/gnunet-helper-* +usr/bin/gnunet-namestore +usr/bin/gnunet-nat-server +usr/bin/gnunet-peerinfo +usr/bin/gnunet-resolver +usr/bin/gnunet-rsa +usr/bin/gnunet-service-* +usr/bin/gnunet-testing +usr/bin/gnunet-transport +usr/bin/gnunet-transport-certificate-creation +usr/bin/mockup-service +usr/lib/libgnunetarm.so.* +usr/lib/libgnunetats.so.* +usr/lib/libgnunetblock.so.* +usr/lib/libgnunetcore.so.* +usr/lib/libgnunetdatacache.so.* +usr/lib/libgnunetdht.so.* +usr/lib/libgnunetfragmentation.so.* +usr/lib/libgnunethello.so.* +usr/lib/libgnunetlockmanager.so.0* +usr/lib/libgnunetmesh.so.* +usr/lib/libgnunetnamestore.so.* +usr/lib/libgnunetnat.so.* +usr/lib/libgnunetnse.so.* +usr/lib/libgnunetpeerinfo.so.* +usr/lib/libgnunettesting.so.* +usr/lib/libgnunettesting_new.so.0* +usr/lib/libgnunettestbed.so.0* +usr/lib/libgnunettransport.so.* +usr/lib/libgnunettransporttesting.so.* +usr/lib/libgnunettun.so.* +usr/lib/gnunet/*.so +usr/share/gnunet/config.d +usr/share/gnunet/hellos/* +usr/share/man/man1/gnunet-arm.1 +usr/share/man/man1/gnunet-core.1 +usr/share/man/man1/gnunet-fs.1 +usr/share/man/man1/gnunet-gns.1 +usr/share/man/man1/gnunet-namestore.1 +usr/share/man/man1/gnunet-nat-server.1 +usr/share/man/man1/gnunet-peerinfo.1 +usr/share/man/man1/gnunet-rsa.1 +usr/share/man/man1/gnunet-transport.1 +usr/share/man/man1/gnunet-vpn.1 +debian/man/* usr/share/man/man1/ diff -Nru gnunet-0.9.3/debian/gnunet-server.postinst gnunet-0.9.3/debian/gnunet-server.postinst --- gnunet-0.9.3/debian/gnunet-server.postinst 2012-06-07 23:13:17.000000000 +0200 +++ gnunet-0.9.3/debian/gnunet-server.postinst 2012-07-07 15:50:27.000000000 +0200 @@ -52,6 +52,24 @@ echo " done." fi + # this can go away after wheezy + if dpkg --compare-versions "$2" le "0.9.3-2" && dpkg --compare-versions "$2" ge "0.9.2-1"; then + for file in /usr/bin/gnunet-helper-exit \ + /usr/bin/gnunet-helper-fs-publish \ + /usr/bin/gnunet-helper-nat-client \ + /usr/bin/gnunet-helper-nat-server \ + /usr/bin/gnunet-helper-transport-wlan \ + /usr/bin/gnunet-helper-vpn \ + /usr/bin/gnunet-helper-dns \ + /usr/bin/gnunet-service-dns + do + if dpkg-statoverride --list $file >/dev/null 2>&1 + then + dpkg-statoverride --remove $file + fi + done + fi + # Update files and directories permissions. # Assuming default values, this *should* not be changed. echo -n "Updating files and directories permissions:" @@ -60,7 +78,7 @@ # Secure access to the data directory chmod 0700 "${SERVICEHOME}" || true # Restrict access on setuid binaries - for i in /usr/bin/gnunet-helper-exit \ + for file in /usr/bin/gnunet-helper-exit \ /usr/bin/gnunet-helper-fs-publish \ /usr/bin/gnunet-helper-nat-client \ /usr/bin/gnunet-helper-nat-server \ @@ -68,18 +86,21 @@ /usr/bin/gnunet-helper-vpn do # only do something when no setting exists - if ! dpkg-statoverride --list $i >/dev/null 2>&1 + if ! dpkg-statoverride --list $file >/dev/null 2>&1 then - dpkg-statoverride --update --add root ${_GROUPNAME} 4754 $i + chown root:${_GROUPNAME} $file + chmod 4754 $file fi done if ! dpkg-statoverride --list /usr/bin/gnunet-helper-dns >/dev/null 2>&1 then - dpkg-statoverride --update --add root ${GNUNETDNS_GROUP} 4754 /usr/bin/gnunet-helper-dns + chown root:${GNUNETDNS_GROUP} /usr/bin/gnunet-helper-dns + chmod 4754 /usr/bin/gnunet-helper-dns fi if ! dpkg-statoverride --list /usr/bin/gnunet-service-dns >/dev/null 2>&1 then - dpkg-statoverride --update --add ${_USERNAME} ${GNUNETDNS_GROUP} 2754 /usr/bin/gnunet-service-dns + chown ${_USERNAME}:${GNUNETDNS_GROUP} /usr/bin/gnunet-service-dns + chmod 2754 /usr/bin/gnunet-service-dns fi echo " done." diff -Nru gnunet-0.9.3/debian/gnunet-server.postrm gnunet-0.9.3/debian/gnunet-server.postrm --- gnunet-0.9.3/debian/gnunet-server.postrm 2012-06-20 23:53:40.000000000 +0200 +++ gnunet-0.9.3/debian/gnunet-server.postrm 2012-07-01 17:44:16.000000000 +0200 @@ -21,21 +21,6 @@ GNUNETDNS_GROUP="gnunetdns" - for i in /usr/bin/gnunet-helper-exit \ - /usr/bin/gnunet-helper-fs-publish \ - /usr/bin/gnunet-helper-nat-client \ - /usr/bin/gnunet-helper-nat-server \ - /usr/bin/gnunet-helper-transport-wlan \ - /usr/bin/gnunet-helper-vpn \ - /usr/bin/gnunet-helper-dns \ - /usr/bin/gnunet-service-dns - do - if dpkg-statoverride --list $i >/dev/null 2>&1 - then - dpkg-statoverride --remove $i - fi - done - if [ -x /usr/sbin/deluser ] then deluser --quiet --system ${_USERNAME} diff -Nru gnunet-0.9.3/debian/patches/series gnunet-0.9.3/debian/patches/series --- gnunet-0.9.3/debian/patches/series 2012-06-03 15:32:14.000000000 +0200 +++ gnunet-0.9.3/debian/patches/series 2012-08-01 21:46:33.000000000 +0200 @@ -1 +1,2 @@ support_GNU_hurd.patch +sparc_alignment.patch diff -Nru gnunet-0.9.3/debian/patches/sparc_alignment.patch gnunet-0.9.3/debian/patches/sparc_alignment.patch --- gnunet-0.9.3/debian/patches/sparc_alignment.patch 1970-01-01 01:00:00.000000000 +0100 +++ gnunet-0.9.3/debian/patches/sparc_alignment.patch 2012-08-01 21:46:33.000000000 +0200 @@ -0,0 +1,55 @@ +Author: grothoff +Date: 2012-07-30 09:26:05 +0200 (Mon, 30 Jul 2012) +New Revision: 22960 + +Modified: + gnunet/src/include/gnunet_common.h +Log: +fix for gcc alginment issue on sparc reported to Debian as #670578 + +Modified: gnunet/src/include/gnunet_common.h +=================================================================== +--- a/src/include/gnunet_common.h ++++ b/src/include/gnunet_common.h +@@ -170,9 +170,13 @@ + */ + #define GNUNET_NORETURN __attribute__((noreturn)) + ++#if MINGW + #if __GNUC__ > 3 + /** +- * gcc 4.x-ism to pack structures even on W32 (to be used before structs) ++ * gcc 4.x-ism to pack structures even on W32 (to be used before structs); ++ * Using this would cause structs to be unaligned on the stack on Sparc, ++ * so we *only* use this on W32 (see #670578 from Debian); fortunately, ++ * W32 doesn't run on sparc anyway. + */ + #define GNUNET_NETWORK_STRUCT_BEGIN \ + _Pragma("pack(push)") \ +@@ -180,19 +184,23 @@ + + /** + * gcc 4.x-ism to pack structures even on W32 (to be used after structs) ++ * Using this would cause structs to be unaligned on the stack on Sparc, ++ * so we *only* use this on W32 (see #670578 from Debian); fortunately, ++ * W32 doesn't run on sparc anyway. + */ + #define GNUNET_NETWORK_STRUCT_END _Pragma("pack(pop)") ++ + #else +-#ifdef MINGW + #error gcc 4.x or higher required on W32 systems + #endif ++#else + /** +- * Good luck, GNUNET_PACKED should suffice, but this won't work on W32 ++ * Define as empty, GNUNET_PACKED should suffice, but this won't work on W32 + */ + #define GNUNET_NETWORK_STRUCT_BEGIN + + /** +- * Good luck, GNUNET_PACKED should suffice, but this won't work on W32 ++ * Define as empty, GNUNET_PACKED should suffice, but this won't work on W32; + */ + #define GNUNET_NETWORK_STRUCT_END + #endif