[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi, I am a newbie to debian-hurd development! I have created a patch for libtorrent-0.13.8

Hi, everybody.
        I am a newbie to debian-hurd development and want to contribute to this project. After reading the development guide at https://www.debian.org/ports/hurd/hurd-devel-debian, I decide to fix a broken package found at the recommended page https://people.debian.org/~sthibault/out_of_date2.txt named `libtorrent`.
      After I download the package source and try to build without any modifications under the debian hurd running in qemu (debian-hurd-20210219.img),  I got the following error.
   socket_fd.cc: In member function 'bool torrent::SocketFd::set_priority(torrent::SocketFd::priority_type)':
   socket_fd.cc:78:43: error: 'IPV6_TCLASS' was not declared in this scope; did you mean 'IPOPT_CLASS'?
   and it matches with what that page said.
  I also try to build that package under my debian desktop(Debian GNU/Linux bullseye/sid x86_64) and it got no errors. After a quick search, i have found linux defined the `IPV6_TCLASS` macro at `bits/in.h` as follows:
  #define IPV6_TCLASS 67
So that, I modify the `configure.ac` to add a conditional compilation when it detects the host operating system is hurd based, along with macro definition at the `Makefile.am` found at `src/net/`. The patch file is attached at the end of this email.
But I have some questions:
1. Should I only load that patch file? Is it enough? Should I provided a change file?
2. If the patch file is accepted, how it can be merged to the official deb package?
3. Should I add some other description information to the patch file?
4. Can somebody tell me how can I become a debian package maintainer? Is there any detailed and practical guides?
Thank you!
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,17 @@
AC_INIT(libtorrent, 0.13.8, sundell.software@gmail.com)
+case "${host_os}" in
+ gnu*)
+ build_hurd=yes
+ ;;
+AM_CONDITIONAL([BUILD_HURD], [test "$build_hurd" = "yes"])
dnl Find a better way to do this
--- a/src/net/Makefile.am
+++ b/src/net/Makefile.am
@@ -26,3 +26,7 @@
AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir)
--- a/src/net/socket_fd.cc
+++ b/src/net/socket_fd.cc
@@ -50,6 +50,10 @@
#include "torrent/exceptions.h"
#include "socket_fd.h"
+#ifdef BUILD_HURD
+#define IPV6_TCLASS 67
namespace torrent {
inline void

Reply to: