diff --git a/setserial-2.17-readme.patch b/setserial-2.17-readme.patch new file mode 100644 index 0000000000000000000000000000000000000000..28d4571cd284bff33b503dcad80db1efc1e6c5cb --- /dev/null +++ b/setserial-2.17-readme.patch @@ -0,0 +1,11 @@ +--- setserial-2.17/README.readme Tue Sep 11 17:59:52 2001 ++++ setserial-2.17/README Tue Sep 11 18:00:27 2001 +@@ -13,6 +13,6 @@ + + The simplest way to configure the serial ports is to copy the provided + rc.serial file to the appropriate /etc/rc.d directory. For example, +-to install rc.serial on a RedHat system, copy rc.serial to +-/etc/rc.d/init.d/serial, and then run the command "chkconfig -add serial". ++to install rc.serial on a Fedora system, copy rc.serial to ++/etc/rc.d/init.d/serial, and then run the command "chkconfig --add serial". + diff --git a/setserial-2.17-spelling.patch b/setserial-2.17-spelling.patch new file mode 100644 index 0000000000000000000000000000000000000000..a857cd08fec2e02ec8e7fb2d359d361603d2dcf1 --- /dev/null +++ b/setserial-2.17-spelling.patch @@ -0,0 +1,11 @@ +--- setserial-2.17/setserial.c.spelling 2003-01-10 17:21:24.000000000 +0000 ++++ setserial-2.17/setserial.c 2003-01-10 17:21:39.000000000 +0000 +@@ -707,7 +707,7 @@ + fprintf(stderr, "\t spd_warp\tuse 460kb instead of 38.4kb\n"); + fprintf(stderr, "\t spd_cust\tuse the custom divisor to set the speed at 38.4kb\n"); + fprintf(stderr, "\t\t\t\t(baud rate = baud_base / custom_divisor)\n"); +- fprintf(stderr, "\t spd_normal\tuse 38.4kb when a buad rate of 38.4kb is selected\n"); ++ fprintf(stderr, "\t spd_normal\tuse 38.4kb when a baud rate of 38.4kb is selected\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "Use a leading '0x' for hex numbers.\n"); + fprintf(stderr, "CAUTION: Using an invalid port can lock up your machine!\n"); diff --git a/setserial-configure-c99.patch b/setserial-configure-c99.patch new file mode 100644 index 0000000000000000000000000000000000000000..f9ed88df890c7dcf97d84d138557309f64ab3a73 --- /dev/null +++ b/setserial-configure-c99.patch @@ -0,0 +1,17 @@ +This fixes a generic C99 compatibility issue in autoconf-generated +code. No need to upstream this because the issue goes away if +autoconf is re-run. + +diff --git a/configure b/configure +index 9d6084aa38e5d6e8..4d948816e1112d13 100755 +--- a/configure ++++ b/configure +@@ -689,7 +689,7 @@ cat > conftest.$ac_ext << EOF + #line 690 "configure" + #include "confdefs.h" + +-main(){return(0);} ++int main(){return(0);} + EOF + if { (eval echo configure:695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes diff --git a/setserial.spec b/setserial.spec index e72f5c945f9b68eb3fc180bd6776430bbc57b92d..415b8e75f61ac97cadab8a9bec37a03d42a8ea74 100644 --- a/setserial.spec +++ b/setserial.spec @@ -1,13 +1,16 @@ -%define anolis_release 1 +%define anolis_release 2 Summary: A utility for configuring serial ports Name: setserial -Version: 2.17 +Version: 2.17 Release: %{anolis_release}%{?dist} Source: https://sourceforge.net/projects/setserial/files/setserial/%{version}/%{name}-%{version}.tar.gz Patch0: setserial-2.17-fhs.patch Patch1: setserial-2.17-rc.patch Patch2: setserial-aarch64.patch +Patch3: setserial-2.17-readme.patch +Patch4: setserial-2.17-spelling.patch +Patch5: setserial-configure-c99.patch License: GPL+ URL: http://setserial.sourceforge.net/ @@ -62,5 +65,8 @@ make install DESTDIR=${RPM_BUILD_ROOT} %doc README rc.serial %changelog +* Thu Aug 21 2025 Wenyuzifang - 2.17-2 +- Apply patch to fix a typo in the help message for clarity and professionalism +- Fix C99 compatibility to ensure successful compilation with modern compilers * Thu Mar 16 2023 Yuanhong Peng - 2.17-1 - Init from upstream