diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79ed097 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +wol-0.7.1.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index 0bbc731..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: wol -# $Id$ -NAME := wol -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/sources b/sources index e69de29..320920e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c2fa9d7e771134ac8c89d56b8197d4ca wol-0.7.1.tar.gz diff --git a/wol-0.7.1-binding.patch b/wol-0.7.1-binding.patch new file mode 100644 index 0000000..2e038de --- /dev/null +++ b/wol-0.7.1-binding.patch @@ -0,0 +1,127 @@ +diff -urw wol-0.7.1-orig/doc/wol.texi wol-0.7.1/doc/wol.texi +--- wol-0.7.1-orig/doc/wol.texi 2004-04-18 10:52:18.000000000 +0200 ++++ wol-0.7.1/doc/wol.texi 2018-08-19 23:45:59.526088977 +0200 +@@ -236,6 +236,13 @@ + (default IP address is @code{255.255.255.255}). + + ++@item -b HOST ++@itemx --bind=HOST ++ ++Bind to this IP address or hostname. This allows broadcasting on multihomed ++hosts by specifying the IP address of the desired outgoing interface. ++ ++ + @item -p NUM + @itemx --port=NUM + +diff -urw wol-0.7.1-orig/include/net.h wol-0.7.1/include/net.h +--- wol-0.7.1-orig/include/net.h 2004-02-05 19:20:07.000000000 +0100 ++++ wol-0.7.1/include/net.h 2018-08-19 23:45:59.526088977 +0200 +@@ -27,6 +27,7 @@ + + #include + ++int bind_to_addr(int sockfd, const char *ip_str); + + int udp_open (void); + +diff -urw wol-0.7.1-orig/src/net.c wol-0.7.1/src/net.c +--- wol-0.7.1-orig/src/net.c 2004-04-20 21:51:18.000000000 +0200 ++++ wol-0.7.1/src/net.c 2018-08-19 23:45:59.526088977 +0200 +@@ -100,7 +100,33 @@ + return sockfd; + } + ++int ++bind_to_addr(int sockfd, const char *ip_str) ++{ ++ struct sockaddr_in toaddr; ++ ++ if (ip_str == NULL) ++ { ++ return -1; ++ } + ++ memset (&toaddr, 0, sizeof (struct sockaddr_in)); ++ ++ if (net_resolv (ip_str, &toaddr.sin_addr)) ++ { ++ error (0, 0, _("Invalid IP address given: %s"), strerror (errno)); ++ return -1; ++ } ++ ++ toaddr.sin_family = AF_INET; ++ ++ if (bind (sockfd, (const struct sockaddr *) &toaddr, sizeof (toaddr))) ++ { ++ error (0, 0, _("Couldn't bind to %s: %s"), ip_str, strerror (errno)); ++ return -1; ++ } ++ return 0; ++} + + int + tcp_open (const char *ip_str, +diff -urw wol-0.7.1-orig/src/wol.c wol-0.7.1/src/wol.c +--- wol-0.7.1-orig/src/wol.c 2004-04-18 13:42:11.000000000 +0200 ++++ wol-0.7.1/src/wol.c 2018-08-19 23:47:31.440398340 +0200 +@@ -56,6 +56,9 @@ + /* IP Address or hostname magic packet is addressed to */ + static char *host_str = DEFAULT_IPADDR; + ++/* IP Address or hostname to bind to */ ++static char *bind_str = NULL; ++ + /* filename with mac addresses */ + static char *pathname = NULL; + +@@ -107,6 +110,7 @@ + -f, --file=FILE read addresses from file FILE (\"-\" reads from stdin)\n\ + --passwd[=PASS] send SecureON password PASS (if no PASS is given, you\n\ + will be prompted for the password)\n\ ++-b, --bind=HOST bind to this IP address or hostname\n\ + \n\ + Each MAC-ADDRESS is written as x:x:x:x:x:x, where x is a hexadecimal number\n\ + between 0 and ff which represents one byte of the address, which is in\n\ +@@ -144,7 +148,7 @@ + int c; + int option_index; + int password_set = 0; +- char *options = "Vvw:h:i:p:f:s:-"; ++ char *options = "Vvw:h:i:p:f:s:b:-"; + static struct option long_options[] = + { + { "help", no_argument, NULL, 'H' }, +@@ -156,6 +160,7 @@ + { "port", required_argument, NULL, 'p' }, + { "file", required_argument, NULL, 'f' }, + { "passwd", optional_argument, NULL, 'P' }, ++ { "bind", required_argument, NULL, 'b' }, + /* { "proxy", required_argument, NULL, 's' }, */ + { NULL, 0, NULL, 0 } + }; +@@ -209,6 +214,9 @@ + host_str = optarg; + break; + ++ case 'b': ++ bind_str = optarg; ++ break; + + case 'p': + if ((sscanf (optarg, "%5u", &port) != 1) || +@@ -370,6 +378,13 @@ + exit (1); + } + ++ if (NULL != bind_str) ++ { ++ if (bind_to_addr (sockfd, bind_str)) ++ { ++ exit (1); ++ } ++ } + + /* loop through possible MAC addresses */ + if (!request_stdin) diff --git a/wol-configure-c99.patch b/wol-configure-c99.patch new file mode 100644 index 0000000..0392879 --- /dev/null +++ b/wol-configure-c99.patch @@ -0,0 +1,123 @@ +Avoid implicit function declarations for C99 compatibility. +These are mostly in standard (built-in or gnulib/autoconf archive) +checks, so there is no need to upstream this (if upstream were stil +active). + +diff --git a/configure b/configure +index 5a5a82660c50b040..38779afcf5cfe28b 100755 +--- a/configure ++++ b/configure +@@ -2669,7 +2669,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ +- '' \ ++ '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ +@@ -3293,8 +3293,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +@@ -4188,7 +4188,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ +- '' \ ++ '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ +@@ -12227,8 +12227,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +@@ -13410,7 +13410,7 @@ cat >>conftest.$ac_ext <<_ACEOF + int + main () + { +- exit (malloc (0) ? 0 : 1); ++ return malloc (0) ? 0 : 1; + } + + _ACEOF +@@ -13481,7 +13481,7 @@ cat >>conftest.$ac_ext <<_ACEOF + int + main () + { +- exit (realloc (0, 0) ? 0 : 1); ++ return realloc (0, 0) ? 0 : 1; + } + + _ACEOF +@@ -14534,6 +14534,7 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default ++#include + int + main () + { +@@ -14719,7 +14720,7 @@ cat >>conftest.$ac_ext <<_ACEOF + if (!in) + return 1; + len = getline (&line, &siz, in); +- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); ++ return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1; + } + + _ACEOF +diff --git a/m4/getline.m4 b/m4/getline.m4 +index d19e56386717afbd..e4da867860cc08fc 100644 +--- a/m4/getline.m4 ++++ b/m4/getline.m4 +@@ -27,7 +27,7 @@ AC_DEFUN([AM_FUNC_GETLINE], + if (!in) + return 1; + len = getline (&line, &siz, in); +- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); ++ return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1; + } + ], am_cv_func_working_getline=yes dnl The library version works. + , am_cv_func_working_getline=no dnl The library version does NOT work. +diff --git a/m4/malloc.m4 b/m4/malloc.m4 +index 05c66ad6a21012de..35f70572348a2ec6 100644 +--- a/m4/malloc.m4 ++++ b/m4/malloc.m4 +@@ -18,7 +18,7 @@ AC_DEFUN([jm_FUNC_MALLOC], + int + main () + { +- exit (malloc (0) ? 0 : 1); ++ return malloc (0) ? 0 : 1; + } + ], + jm_cv_func_working_malloc=yes, +diff --git a/m4/realloc.m4 b/m4/realloc.m4 +index ff8314dd4fc407e9..9eb71f59aac26f8b 100644 +--- a/m4/realloc.m4 ++++ b/m4/realloc.m4 +@@ -18,7 +18,7 @@ AC_DEFUN([jm_FUNC_REALLOC], + int + main () + { +- exit (realloc (0, 0) ? 0 : 1); ++ return realloc (0, 0) ? 0 : 1; + } + ], + jm_cv_func_working_realloc=yes, diff --git a/wol.spec b/wol.spec new file mode 100644 index 0000000..f1dee0c --- /dev/null +++ b/wol.spec @@ -0,0 +1,169 @@ +Name: wol +Version: 0.7.1 +Release: 40%{?dist} +Summary: Wake On Lan client + +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +URL: http://sourceforge.net/projects/wake-on-lan/ +Source0: http://downloads.sourceforge.net/wake-on-lan/%{name}-%{version}.tar.gz +Patch0: wol-0.7.1-binding.patch +Patch1: wol-configure-c99.patch + +BuildRequires: make +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: perl-podlators + +%description +wol implements Wake On LAN functionality in a small program. It wakes up +hardware that is Magic Packet compliant. SecureON is supported by wol too. + +%prep +%setup -q +%patch -P0 -p1 -b .binding +%patch -P1 -p1 -b .configure-c99 + +%build +export CFLAGS="$CFLAGS -std=gnu11" +%configure --disable-static +make %{?_smp_mflags} +iconv -f iso8859-1 -t utf-8 ChangeLog > ChangeLog.conv +touch -c -r ChangeLog ChangeLog.conv +mv ChangeLog.conv ChangeLog + +%install +make install DESTDIR=%{buildroot} INSTALL="install -p" +rm -f %{buildroot}%{_infodir}/dir +%find_lang %{name} + +%files -f %{name}.lang +%doc AUTHORS ChangeLog COPYING NEWS README TODO +%{_infodir}/%{name}.info.* +%{_mandir}/man?/*.* +%{_bindir}/%{name}* + +%changelog +* Fri Jul 17 2026 Fedora Release Engineering - 0.7.1-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Sat Jan 17 2026 Fedora Release Engineering - 0.7.1-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Fri Jul 25 2025 Fedora Release Engineering - 0.7.1-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Wed Apr 30 2025 David Auer - 0.7.1-37 +- Fix build with GCC 15 + +* Sun Jan 19 2025 Fedora Release Engineering - 0.7.1-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 26 2024 Miroslav Suchý - 0.7.1-35 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 0.7.1-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 0.7.1-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 0.7.1-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 0.7.1-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Nov 28 2022 Florian Weimer - 0.7.1-30 +- Port configure script to C99 (#2148875) + +* Sat Jul 23 2022 Fedora Release Engineering - 0.7.1-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 0.7.1-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.7.1-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 0.7.1-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.7.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 0.7.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jul 27 2019 Fedora Release Engineering - 0.7.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Apr 24 2019 Björn Esser - 0.7.1-22 +- Remove hardcoded gzip suffix from GNU info pages + +* Sun Feb 03 2019 Fedora Release Engineering - 0.7.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Sep 06 2018 Fabian Affolter - 0.7.1-20 +- Add patch for binding to interface (rhbz#1619025) + +* Sat Jul 14 2018 Fedora Release Engineering - 0.7.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 0.7.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 0.7.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.7.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.7.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 0.7.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 0.7.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Aug 18 2014 Fedora Release Engineering - 0.7.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 0.7.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 0.7.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Mar 01 2013 Fabian Affolter - 0.7.1-10 +- BR fixed for building man page + +* Tue Feb 19 2013 Fabian Affolter - 0.7.1-9 +- Minor spec file updates + +* Fri Feb 15 2013 Fedora Release Engineering - 0.7.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 0.7.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 0.7.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 0.7.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jul 27 2009 Fedora Release Engineering - 0.7.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 0.7.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sun Dec 07 2008 Fabian Affolter - 0.7.1-2 +- Fix Source0 +- Fix License + +* Sat Dec 06 2008 Fabian Affolter - 0.7.1-1 +- Initial package for Fedora