diff --git a/irda-utils-0.9.18-PIE.patch b/irda-utils-0.9.18-PIE.patch new file mode 100644 index 0000000..52bd241 --- /dev/null +++ b/irda-utils-0.9.18-PIE.patch @@ -0,0 +1,113 @@ +diff --git a/findchip/Makefile b/findchip/Makefile +index 7428617..0937827 100644 +--- a/findchip/Makefile ++++ b/findchip/Makefile +@@ -47,7 +47,7 @@ all: findchip + + findchip: $(OBJS) + $(prn_cc_o) +- $(ECMD)$(CC) $(OBJS) $(CFLAGS) -o $@ ++ $(ECMD)$(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) -o $@ + + + clean: +diff --git a/irattach/Makefile b/irattach/Makefile +index e70de61..76383c2 100644 +--- a/irattach/Makefile ++++ b/irattach/Makefile +@@ -28,7 +28,7 @@ include ../output.mak + CC = gcc + LD = ld + RM = rm -f +-CFLAGS = -O2 -W -Wall -Wstrict-prototypes -Wshadow $(SYS_INCLUDES) ++CFLAGS = -O2 -W -Wall -Wstrict-prototypes -Wshadow $(SYS_INCLUDES) $(RPM_OPT_FLAGS) + + SYS_INCLUDES = -I/usr/include + SYS_LIBPATH = -L/usr/lib -L/usr/local/lib +@@ -49,13 +49,13 @@ all: $(TARGETS) + + irattach: irattach.o util.o + $(prn_cc_o) +- $(ECMD)$(CC) $(CFLAGS) irattach.o util.o -o $@ ++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) irattach.o util.o -o $@ + + + + dongle_attach: dongle_attach.o + $(prn_cc_o) +- $(ECMD)$(CC) $(CFLAGS) dongle_attach.o -o $@ ++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) dongle_attach.o -o $@ + + + install: $(TARGETS) +diff --git a/irdadump/Makefile b/irdadump/Makefile +index bd21abb..e7d8929 100644 +--- a/irdadump/Makefile ++++ b/irdadump/Makefile +@@ -19,7 +19,7 @@ SYS_INCLUDES = -I/usr/include + SYS_LIBRARIES = + SYS_LIBPATH = -L/usr/lib -L/usr/local/lib + +-CFLAGS= -O2 -W -Wall -I. `pkg-config --cflags glib-2.0` ++CFLAGS= -O2 -W -Wall -I. `pkg-config --cflags glib-2.0` $(RPM_OPT_FLAGS) + + LIBIRDADUMP_OBJS = irdadump.o irlap.o irlmp.o obex.o ircomm.o netbuf.o capture.o + IRDADUMP_OBJS = main.o +@@ -40,7 +40,7 @@ lib_irdadump.a: $(LIBIRDADUMP_OBJS) + + irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET) + $(prn_cc_o) +- $(ECMD)$(CC) $(CFLAGS) $(LIBRARIES) -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) ++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(LIBRARIES) -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) + #$(ECMD)$(CC) $(CFLAGS) `pkg-config --cflags --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) + + +diff --git a/irdaping/Makefile b/irdaping/Makefile +index ef84acd..cd64c90 100644 +--- a/irdaping/Makefile ++++ b/irdaping/Makefile +@@ -56,7 +56,7 @@ all: $(TARGETS) + + irdaping: $(OBJS) + $(prn_cc_o) +- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@ ++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ + + + .c.o: +diff --git a/irnetd/Makefile b/irnetd/Makefile +index 1fb1571..5efbc4a 100644 +--- a/irnetd/Makefile ++++ b/irnetd/Makefile +@@ -50,7 +50,7 @@ all: $(TARGETS) + + irnetd: $(OBJS) + $(prn_cc_o) +- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@ ++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ + + + install: irnetd +diff --git a/psion/Makefile b/psion/Makefile +index 001926c..5d7cd7f 100644 +--- a/psion/Makefile ++++ b/psion/Makefile +@@ -25,4 +25,4 @@ install: $(PSION_TARGETS) + + irpsion5: + $(prn_cc_o) +- $(ECMD)$(CC) $(CFLAGS) -g -I/usr/include/glib-2.0 -I../include -Wall -Wstrict-prototypes $(RPM_OPT_FLAGS) $(PSION_SRC) -o $@ ++ $(ECMD)$(CC) $(CFLAGS) $(LDFLAGS) -g -I/usr/include/glib-2.0 -I../include -Wall -Wstrict-prototypes $(RPM_OPT_FLAGS) $(PSION_SRC) -o $@ +diff --git a/tekram/Makefile b/tekram/Makefile +index e10d116..65996e6 100644 +--- a/tekram/Makefile ++++ b/tekram/Makefile +@@ -55,7 +55,7 @@ all: irkbd + + irkbd: $(OBJS) + $(prn_cc_o) +- $(ECMD)$(CC) $(OBJS) -o $@ ++ $(ECMD)$(CC) $(LDFLAGS) $(OBJS) -o $@ + + + .c.o: diff --git a/irda-utils-0.9.18-no-inline.patch b/irda-utils-0.9.18-no-inline.patch new file mode 100644 index 0000000..c79ae6b --- /dev/null +++ b/irda-utils-0.9.18-no-inline.patch @@ -0,0 +1,299 @@ +diff -Nrbu irda-utils-0.9.18/irdadump/irdadump.c irda-utils-0.9.18-OK/irdadump/irdadump.c +--- irda-utils-0.9.18/irdadump/irdadump.c 2006-07-11 10:16:06.000000000 +0400 ++++ irda-utils-0.9.18-OK/irdadump/irdadump.c 2017-02-13 03:42:20.216303403 +0300 +@@ -71,7 +71,7 @@ + * Print current time + * + */ +-inline void print_time(const struct timeval *timev, GString *str) ++void print_time(const struct timeval *timev, GString *str) + { + int s; + +@@ -90,7 +90,7 @@ + * Print the difference in time between this frame and the previous one + * + */ +-inline void print_diff_time(struct timeval *timev, struct timeval *prev_timev, ++void print_diff_time(struct timeval *timev, struct timeval *prev_timev, + GString *str) + { + float diff; +diff -Nrbu irda-utils-0.9.18/irdadump/irdadump.h irda-utils-0.9.18-OK/irdadump/irdadump.h +--- irda-utils-0.9.18/irdadump/irdadump.h 2006-07-11 10:16:06.000000000 +0400 ++++ irda-utils-0.9.18-OK/irdadump/irdadump.h 2017-02-13 03:41:55.785303429 +0300 +@@ -219,10 +219,10 @@ + guint8 caddr; /* LAP connection address (for garbage collect) */ + }; + +-inline void parse_obex(GNetBuf *buf, GString *str, int cmd); +-inline void parse_irlmp(GNetBuf *buf, GString *str, ++void parse_obex(GNetBuf *buf, GString *str, int cmd); ++void parse_irlmp(GNetBuf *buf, GString *str, + guint8 caddr, int type, int cmd); +-inline void parse_ui_irlmp(GNetBuf *buf, GString *str, int type); ++void parse_ui_irlmp(GNetBuf *buf, GString *str, int type); + void parse_ircomm_params(guint8 clen, GNetBuf *buf, GString *str); + void parse_ircomm_connect(GNetBuf *buf, GString *str); + void parse_ircomm_lmp(GNetBuf *buf, GString *str); +diff -Nrbu irda-utils-0.9.18/irdadump/irlap.c irda-utils-0.9.18-OK/irdadump/irlap.c +--- irda-utils-0.9.18/irdadump/irlap.c 2006-07-11 10:16:06.000000000 +0400 ++++ irda-utils-0.9.18-OK/irdadump/irlap.c 2017-02-13 03:43:06.858303354 +0300 +@@ -91,7 +91,7 @@ + * Garbage collect destroyes LAP connections + * + */ +-inline void garbage_connection(guint8 caddr) ++void garbage_connection(guint8 caddr) + { + gint i; + +@@ -226,7 +226,7 @@ + * Parse and print the names of the various hint bits if they are set + * + */ +-inline void parse_hints(guint8 *hint, GString *str) ++void parse_hints(guint8 *hint, GString *str) + { + g_string_append(str, "[ "); + if (hint[0] & HINT_PNP) +@@ -261,7 +261,7 @@ + * Exchange station identification frame + * + */ +-inline void parse_xid_frame(guint8 command, guint8 pf, int type, ++void parse_xid_frame(guint8 command, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + struct xid_frame *frame = (struct xid_frame *) buf->data; +@@ -339,7 +339,7 @@ + * Information frames + * + */ +-inline void parse_i_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_i_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + int nr, ns; +@@ -396,7 +396,7 @@ + * Information frames + * + */ +-inline void parse_ui_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_ui_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + /* Remove IrLAP header */ +@@ -417,7 +417,7 @@ + * Frame reject frame + * + */ +-inline void parse_frmr_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_frmr_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + int nr, ns; +@@ -439,7 +439,7 @@ + * Receive ready frame + * + */ +-inline void parse_rr_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_rr_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + int nr; +@@ -479,7 +479,7 @@ + * Receive not ready frame + * + */ +-inline void parse_rnr_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_rnr_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + int nr; +@@ -497,7 +497,7 @@ + * Reject frame + * + */ +-inline void parse_rej_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_rej_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + int nr; +@@ -515,7 +515,7 @@ + * Selective reject frame + * + */ +-inline void parse_srej_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_srej_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + int nr; +@@ -533,7 +533,7 @@ + * Unnumbered acknowledgement frame + * + */ +-inline void parse_ua_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_ua_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + struct ua_frame *frame = (struct ua_frame *) buf->data; +@@ -564,7 +564,7 @@ + * Disconnect frame + * + */ +-inline void parse_disc_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_disc_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + /* Kill "unused" warning */ +@@ -582,7 +582,7 @@ + * Disconnected mode frame + * + */ +-inline void parse_dm_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_dm_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + /* Kill "unused" warning */ +@@ -598,7 +598,7 @@ + * Request disconnect frame + * + */ +-inline void parse_rd_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_rd_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + /* Kill "unused" warning */ +@@ -614,7 +614,7 @@ + * Test frame + * + */ +-inline void parse_test_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_test_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + struct test_frame *frame = (struct test_frame *) buf->data; +@@ -634,7 +634,7 @@ + * Set normal response mode frame + * + */ +-inline void parse_snrm_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_snrm_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + struct snrm_frame *frame = (struct snrm_frame *) buf->data; +@@ -671,7 +671,7 @@ + * Request normal response mode + * + */ +-inline void parse_rnrm_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, ++void parse_rnrm_frame(guint8 caddr, guint8 cmd, guint8 pf, int type, + GNetBuf *buf, GString *str) + { + gint32 saddr, daddr; +diff -Nrbu irda-utils-0.9.18/irdadump/irlmp.c irda-utils-0.9.18-OK/irdadump/irlmp.c +--- irda-utils-0.9.18/irdadump/irlmp.c 2006-07-11 10:16:06.000000000 +0400 ++++ irda-utils-0.9.18-OK/irdadump/irlmp.c 2017-02-13 03:41:45.654303441 +0300 +@@ -47,7 +47,7 @@ + * Try to parse and print the LM-IAS query + * + */ +-inline void parse_iriap_command(GNetBuf *buf, GString *str, guint8 slsap_sel) ++void parse_iriap_command(GNetBuf *buf, GString *str, guint8 slsap_sel) + { + guint8 opcode; + char name[255]; +@@ -193,7 +193,7 @@ + * + * + */ +-inline void parse_iriap_response(GNetBuf *buf, GString *str, guint8 dlsap_sel) ++void parse_iriap_response(GNetBuf *buf, GString *str, guint8 dlsap_sel) + { + guint8 opcode, rsp; + +@@ -239,7 +239,7 @@ + * Parse IrTTP data frame + * + */ +-inline void parse_irnet(GNetBuf *buf, GString *str) ++void parse_irnet(GNetBuf *buf, GString *str) + { + /* Kill "unused" warning */ + buf = buf; +@@ -256,7 +256,7 @@ + * Parse IrTTP data frame + * + */ +-inline void parse_irttp(GNetBuf *buf, GString *str) ++void parse_irttp(GNetBuf *buf, GString *str) + { + g_string_sprintfa(str, "TTP credits=%d ", buf->data[0] & 0x7f); + +@@ -273,7 +273,7 @@ + * Parse IrTTP connect frame + * + */ +-inline void parse_irttp_connect(GNetBuf *buf, GString *str) ++void parse_irttp_connect(GNetBuf *buf, GString *str) + { + guint8 plen, pi, pl; + guint16 tmp_cpu; +@@ -303,7 +303,7 @@ + * Parse IrLMP frame + * + */ +-inline void parse_irlmp(GNetBuf *buf, GString *str, ++void parse_irlmp(GNetBuf *buf, GString *str, + guint8 caddr, int type, int cmd) + { + guint8 slsap_sel, dlsap_sel; +@@ -437,7 +437,7 @@ + * Parse IrLMP frame in UI frame + * + */ +-inline void parse_ui_irlmp(GNetBuf *buf, GString *str, int type) ++void parse_ui_irlmp(GNetBuf *buf, GString *str, int type) + { + guint8 slsap_sel, dlsap_sel; + int ctrl; +diff -Nrbu irda-utils-0.9.18/irdadump/obex.c irda-utils-0.9.18-OK/irdadump/obex.c +--- irda-utils-0.9.18/irdadump/obex.c 2006-07-11 10:16:06.000000000 +0400 ++++ irda-utils-0.9.18-OK/irdadump/obex.c 2017-02-13 03:42:10.356303414 +0300 +@@ -112,7 +112,7 @@ + * Parse an OBEX put command + * + */ +-inline void parse_obex_headers(GNetBuf *buf, GString *str) ++void parse_obex_headers(GNetBuf *buf, GString *str) + { + struct obex_minimal_frame *frame; + int final; +@@ -179,7 +179,7 @@ + } + } + +-inline void parse_obex_connect(GNetBuf *buf, GString *str) ++void parse_obex_connect(GNetBuf *buf, GString *str) + { + struct obex_connect_frame *frame; + guint16 length; +@@ -210,7 +210,7 @@ + * We also need to parse the anser to GET request properly + * Jean II + */ +-inline void parse_obex_success(GNetBuf *buf, GString *str) ++void parse_obex_success(GNetBuf *buf, GString *str) + { + struct obex_connect_frame *frame; + guint16 length; +@@ -252,7 +252,7 @@ + * Parse OBEX commands and responses + * + */ +-inline void parse_obex(GNetBuf *buf, GString *str, int cmd) ++void parse_obex(GNetBuf *buf, GString *str, int cmd) + { + guint8 opcode; + int len; diff --git a/irda-utils-0.9.18-run.patch b/irda-utils-0.9.18-run.patch new file mode 100644 index 0000000..aa67ea7 --- /dev/null +++ b/irda-utils-0.9.18-run.patch @@ -0,0 +1,11 @@ +--- irda-utils-0.9.18/irattach/irattach.c.orig 2021-05-17 01:58:48.781587723 +0300 ++++ irda-utils-0.9.18/irattach/irattach.c 2021-05-17 02:01:21.738344238 +0300 +@@ -68,7 +68,7 @@ + static int termvalid = -1; /* If termsave is valid */ + + /* Default path for pid file */ +-char *pidfile = "/var/run/irattach.pid"; ++char *pidfile = "/run/irattach.pid"; + + /* Used by ioctl to the tty to obtain the network device name */ + struct irtty_info { diff --git a/irda-utils-0.9.18-sbin.patch b/irda-utils-0.9.18-sbin.patch new file mode 100644 index 0000000..55e8b70 --- /dev/null +++ b/irda-utils-0.9.18-sbin.patch @@ -0,0 +1,123 @@ +diff -Nrbu irda-utils-0.9.18/README irda-utils-0.9.18-OK/README +--- irda-utils-0.9.18/README 2006-07-11 10:16:06.000000000 +0400 ++++ irda-utils-0.9.18-OK/README 2025-01-23 18:58:15.456409010 +0300 +@@ -28,7 +28,7 @@ + + First of all you need to install the tools in this package. Make and + make install should do that for you. By default it will install the +-files in /etc/irda, and in /usr/sbin. If you don't like that, you ++files in /etc/irda, and in /usr/bin. If you don't like that, you + should edit the makefile. + + 2.2 irattach +diff -Nrbu irda-utils-0.9.18/etc/irda.rc irda-utils-0.9.18-OK/etc/irda.rc +--- irda-utils-0.9.18/etc/irda.rc 2006-07-11 10:16:06.000000000 +0400 ++++ irda-utils-0.9.18-OK/etc/irda.rc 2025-01-23 18:59:07.746012761 +0300 +@@ -17,7 +17,7 @@ + # Check that irda is up. + [ ${IRDA} = "no" ] && exit 0 + +-[ -f /usr/sbin/irattach ] || exit 0 ++[ -f /usr/bin/irattach ] || exit 0 + + ARGS= + if [ $DONGLE ]; then +@@ -32,7 +32,7 @@ + start) + # Attach irda device + echo -n "Starting IrDA: " +- daemon /usr/sbin/irattach ${DEVICE} ${ARGS} ++ daemon /usr/bin/irattach ${DEVICE} ${ARGS} + touch /var/lock/subsys/irda + echo + ;; +diff -Nrbu irda-utils-0.9.18/findchip/Makefile irda-utils-0.9.18-OK/findchip/Makefile +--- irda-utils-0.9.18/findchip/Makefile 2025-01-23 18:49:11.278515528 +0300 ++++ irda-utils-0.9.18-OK/findchip/Makefile 2025-01-23 18:58:49.747149179 +0300 +@@ -60,7 +60,7 @@ + + install: findchip + $(prn_install) +- $(ECMD)install findchip $(ROOT)/usr/sbin/ ++ $(ECMD)install findchip $(ROOT)/usr/bin/ + + + gfindchip: gfindchip.c +diff -Nrbu irda-utils-0.9.18/irattach/Makefile irda-utils-0.9.18-OK/irattach/Makefile +--- irda-utils-0.9.18/irattach/Makefile 2025-01-23 18:49:11.278515528 +0300 ++++ irda-utils-0.9.18-OK/irattach/Makefile 2025-01-23 19:00:28.246402814 +0300 +@@ -60,8 +60,8 @@ + + install: $(TARGETS) + $(prn_install) +- $(ECMD)install irattach $(ROOT)/usr/sbin +- $(ECMD)install dongle_attach $(ROOT)/usr/sbin ++ $(ECMD)install irattach $(ROOT)/usr/bin ++ $(ECMD)install dongle_attach $(ROOT)/usr/bin + + + clean: +diff -Nrbu irda-utils-0.9.18/irattach/irattach.c irda-utils-0.9.18-OK/irattach/irattach.c +--- irda-utils-0.9.18/irattach/irattach.c 2025-01-23 18:49:11.285515475 +0300 ++++ irda-utils-0.9.18-OK/irattach/irattach.c 2025-01-23 19:00:18.207478893 +0300 +@@ -262,7 +262,7 @@ + int ret; + + sprintf(msg, "Trying to load module %s", name); +- sprintf(cmd, "/sbin/modprobe %s", name); ++ sprintf(cmd, "modprobe %s", name); + + ret = execute(msg, cmd); + +diff -Nrbu irda-utils-0.9.18/irdadump/Makefile irda-utils-0.9.18-OK/irdadump/Makefile +--- irda-utils-0.9.18/irdadump/Makefile 2025-01-23 18:49:11.278515528 +0300 ++++ irda-utils-0.9.18-OK/irdadump/Makefile 2025-01-23 18:58:43.057199840 +0300 +@@ -50,7 +50,7 @@ + + install: $(IRDADUMP_TARGET) + $(prn_install) +- $(ECMD)install $(IRDADUMP_TARGET) $(ROOT)/usr/sbin ++ $(ECMD)install $(IRDADUMP_TARGET) $(ROOT)/usr/bin + + clean: + $(RM_CMD) +diff -Nrbu irda-utils-0.9.18/irdaping/Makefile irda-utils-0.9.18-OK/irdaping/Makefile +--- irda-utils-0.9.18/irdaping/Makefile 2025-01-23 18:49:11.278515528 +0300 ++++ irda-utils-0.9.18-OK/irdaping/Makefile 2025-01-23 19:00:00.446613473 +0300 +@@ -65,7 +65,7 @@ + + install: $(TARGETS) + $(prn_install) +- $(ECMD)install irdaping $(ROOT)/usr/sbin ++ $(ECMD)install irdaping $(ROOT)/usr/bin + + clean: + $(RM_CMD) +diff -Nrbu irda-utils-0.9.18/irnetd/Makefile irda-utils-0.9.18-OK/irnetd/Makefile +--- irda-utils-0.9.18/irnetd/Makefile 2025-01-23 18:49:11.279515520 +0300 ++++ irda-utils-0.9.18-OK/irnetd/Makefile 2025-01-23 18:58:29.216304738 +0300 +@@ -55,7 +55,7 @@ + + install: irnetd + $(prn_install) +- $(ECMD) install irnetd $(ROOT)/usr/sbin/ ++ $(ECMD) install irnetd $(ROOT)/usr/bin/ + + + clean: +diff -Nrbu irda-utils-0.9.18/smcinit/Makefile irda-utils-0.9.18-OK/smcinit/Makefile +--- irda-utils-0.9.18/smcinit/Makefile 2006-07-11 10:16:06.000000000 +0400 ++++ irda-utils-0.9.18-OK/smcinit/Makefile 2025-01-23 18:59:49.557695945 +0300 +@@ -45,9 +45,9 @@ + + install: $(SMCINIT_TARGETS) + $(prn_install) +- $(ECMD)install smcinit $(ROOT)/usr/sbin +- $(ECMD)install tosh1800-smcinit $(ROOT)/usr/sbin +- $(ECMD)install tosh2450-smcinit $(ROOT)/usr/sbin ++ $(ECMD)install smcinit $(ROOT)/usr/bin ++ $(ECMD)install tosh1800-smcinit $(ROOT)/usr/bin ++ $(ECMD)install tosh2450-smcinit $(ROOT)/usr/bin + + clean: + $(RM_CMD) diff --git a/irda-utils-0.9.18-smcdisable.patch b/irda-utils-0.9.18-smcdisable.patch deleted file mode 100644 index d07c771..0000000 --- a/irda-utils-0.9.18-smcdisable.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Nrbu irda-utils-0.9.18/Makefile irda-utils-0.9.18-OK/Makefile ---- irda-utils-0.9.18/Makefile 2011-07-15 20:16:14.000000000 +0400 -+++ irda-utils-0.9.18-OK/Makefile 2011-07-15 20:15:38.000000000 +0400 -@@ -27,7 +27,7 @@ - - TARGET = test - --DIRS = irattach irdaping etc man irnetd psion tekram findchip irdadump smcinit -+DIRS = irattach irdaping etc man irnetd psion tekram findchip irdadump - CFLAGS = -O2 -W -Wall - INCLUDES = -I/usr/include/glib-2.0 -I./include -I. - -diff -Nrbu irda-utils-0.9.18/man/Makefile irda-utils-0.9.18-OK/man/Makefile ---- irda-utils-0.9.18/man/Makefile 2006-07-11 10:16:06.000000000 +0400 -+++ irda-utils-0.9.18-OK/man/Makefile 2011-07-15 20:16:01.000000000 +0400 -@@ -18,7 +18,7 @@ - MANPAGES4=irnet.4.gz - MANPAGES7=irda.7.gz - MANPAGES8=irattach.8.gz irdaping.8.gz irdadump.8.gz irpsion5.8.gz \ -- findchip.8.gz irnetd.8.gz smcinit.8.gz tosh1800-smcinit.8.gz -+ findchip.8.gz irnetd.8.gz - - # Man pages generated by DOCBOOK - SGMLMAN=irattach.8 irdaping.8 irdadump.8 irpsion5.8 findchip.8 diff --git a/irda-utils.spec b/irda-utils.spec index 81653d7..7af8a05 100644 --- a/irda-utils.spec +++ b/irda-utils.spec @@ -1,11 +1,12 @@ +%global _hardened_build 1 + Summary: Utilities for infrared communication between devices Name: irda-utils Version: 0.9.18 -Release: 13%{?dist} +Release: 52%{?dist} Url: http://irda.sourceforge.net -License: GPLv2+ -Group: Applications/System -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later ExcludeArch: s390 s390x Source0: http://downloads.sourceforge.net/irda/%{name}/%{version}/%{name}-%{version}.tar.gz Source1: irda.init @@ -15,11 +16,16 @@ Patch1: irda-utils-0.9.17-rootonly.patch Patch2: irda-utils-0.9.15-rh1.patch Patch3: irda-utils-0.9.16-io.patch Patch4: irda-utils-0.9.17-makefile.patch -Patch5: irda-utils-0.9.18-smcdisable.patch Patch6: irda-utils-0.9.18-root.patch Patch7: irda-utils-0.9.18-man.patch -BuildRequires: glib2-devel +Patch8: irda-utils-0.9.18-PIE.patch +Patch9: irda-utils-0.9.18-no-inline.patch +Patch10: irda-utils-0.9.18-run.patch +Patch11: irda-utils-0.9.18-sbin.patch +BuildRequires: gcc +BuildRequires: glib2-devel, pciutils-devel BuildRequires: systemd-units +BuildRequires: make Requires(post): systemd-units Requires(preun): systemd-units @@ -46,26 +52,31 @@ actually implemented outside the kernel. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P6 -p1 gunzip man/irnet.4.gz man/irda.7.gz -%patch7 -p1 +%patch -P7 -p1 gzip -9 man/irnet.4 man/irda.7 +%patch -P8 -p1 +%patch -P9 -p1 +%patch -P10 -p1 +%patch -P11 -p1 %build -make all RPM_OPT_FLAGS="$RPM_OPT_FLAGS" ROOT="$RPM_BUILD_ROOT" \ +export LDFLAGS="%{?__global_ldflags}" +make all RPM_OPT_FLAGS="$RPM_OPT_FLAGS -std=gnu89" ROOT="$RPM_BUILD_ROOT" \ + LDFLAGS="%{?__global_ldflags}" \ CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -for dir in %{_sbindir} %{_bindir} %{_initrddir} %{_sysconfdir}/sysconfig +for dir in %{_bindir} %{_initrddir} %{_sysconfdir}/sysconfig do install -d $RPM_BUILD_ROOT$dir done @@ -92,42 +103,138 @@ mv etc/modules.conf.irda etc/modprobe.conf.irda chmod -x etc/ifcfg-irlan0 -%clean -rm -rf $RPM_BUILD_ROOT - %post -if [ $1 = 1 ]; then - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post irda.service %preun -if [ $1 = 0 ]; then - /bin/systemctl --no-reload disable irda.service >/dev/null 2>&1 || : - /bin/systemctl stop irda.service >/dev/null 2>&1 || : -fi +%systemd_preun irda.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 != 0 ]; then - /bin/systemctl try-restart irda.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart irda.service %files -%defattr(-,root,root,-) -%{_sbindir}/* %{_bindir}/* %{_mandir}/*/* -#%{_initrddir}/irda %{_unitdir}/* %config(noreplace) %{_sysconfdir}/sysconfig/irda %doc README* etc/ifcfg-irlan0 etc/modprobe.conf.irda %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 0.9.18-52 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jan 23 2025 Dmitry Butskoy - 0.9.18-51 +- Use /usr/bin instead of /usr/sbin (#2340661) + +* Fri Jan 17 2025 Fedora Release Engineering - 0.9.18-50 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 26 2024 Miroslav Suchý - 0.9.18-49 +- convert license to SPDX + +* Thu Jul 18 2024 Fedora Release Engineering - 0.9.18-48 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 0.9.18-47 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering - 0.9.18-46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 0.9.18-45 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 0.9.18-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 0.9.18-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 0.9.18-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 0.9.18-41 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon May 17 2021 Dmitry Butskoy - 0.9.18-40 +- move /var/run to /run and fix systemd service file (#1960900) + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 0.9.18-39 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Tue Jan 26 2021 Fedora Release Engineering - 0.9.18-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.9.18-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 0.9.18-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.9.18-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.9.18-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.9.18-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 0.9.18-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 0.9.18-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.9.18-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Feb 13 2017 Dmitry Butskoy - 0.9.18-29 +- add no-inline patch for new compilers +- require pciutils-devel for smcinit + +* Sun Feb 12 2017 Dmitry Butskoy - 0.9.18-25 +- enable smcinit (#1421387) + +* Fri Feb 10 2017 Fedora Release Engineering - 0.9.18-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 0.9.18-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0.9.18-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Aug 16 2014 Fedora Release Engineering - 0.9.18-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.9.18-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 0.9.18-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jun 13 2013 Dmitry Butskoy - 0.9.18-18 +- build with PIE flags (#955165) + +* Thu Feb 14 2013 Fedora Release Engineering - 0.9.18-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Sep 24 2012 Dmitry Butskoy - 0.9.18-16 +- new systemd-rpm macros (#850171) + +* Thu Jul 19 2012 Fedora Release Engineering - 0.9.18-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0.9.18-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Mon Jul 18 2011 Dmitry Butskoy - 0.9.18-13 - migrate from SysV to Systemd init system (#694940) diff --git a/irda.service b/irda.service index ad48ef4..85ec7bb 100644 --- a/irda.service +++ b/irda.service @@ -4,12 +4,12 @@ After=syslog.target [Service] Type=forking -PIDFile=/var/run/irattach.pid +PIDFile=/run/irattach.pid EnvironmentFile=-/etc/sysconfig/irda ExecStartPre=-/sbin/modprobe -qab ircomm-tty irtty-sir irnet ExecStart=/usr/sbin/irattach ${DEVICE} ${OPTIONS} -StandardOutput=syslog -StandardError=syslog +StandardOutput=journal +StandardError=journal [Install]