diff --git a/.cvsignore b/.cvsignore index ba7091e..c1cf0f8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -lirc-0.8.0pre1.tar.bz2 +lirc-0.8.0pre2.tar.bz2 diff --git a/lirc-0.8.0pre1-2615usb.patch b/lirc-0.8.0pre1-2615usb.patch deleted file mode 100644 index b872650..0000000 --- a/lirc-0.8.0pre1-2615usb.patch +++ /dev/null @@ -1,72 +0,0 @@ -Index: drivers/lirc_dev/lirc_dev.c -=================================================================== -RCS file: /cvsroot/lirc/lirc/drivers/lirc_dev/lirc_dev.c,v -retrieving revision 1.44 -diff -u -r1.44 lirc_dev.c ---- drivers/lirc_dev/lirc_dev.c 8 Aug 2005 06:04:48 -0000 1.44 -+++ drivers/lirc_dev/lirc_dev.c 29 Nov 2005 01:15:17 -0000 -@@ -382,7 +382,11 @@ - S_IFCHR|S_IRUSR|S_IWUSR, - DEV_LIRC "/%u", ir->p.minor); - #endif -- (void) class_device_create(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor), -+ (void) class_device_create(lirc_class, -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) -+ NULL, -+#endif -+ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor), - NULL, "lirc%u", ir->p.minor); - - if(p->sample_rate || p->get_queue) { -Index: drivers/lirc_imon/lirc_imon.c -=================================================================== -RCS file: /cvsroot/lirc/lirc/drivers/lirc_imon/lirc_imon.c,v -retrieving revision 1.8 -diff -u -r1.8 lirc_imon.c ---- drivers/lirc_imon/lirc_imon.c 29 Oct 2005 14:18:53 -0000 1.8 -+++ drivers/lirc_imon/lirc_imon.c 29 Nov 2005 01:15:18 -0000 -@@ -72,7 +72,7 @@ - - #define VFD_MINOR_BASE 144 /* Same as LCD */ - #define DEVFS_MODE S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH --#define DEVFS_NAME "usb/lcd%d" -+#define DEVFS_NAME "lcd%d" - - #define BUF_CHUNK_SIZE 4 - #define BUF_SIZE 128 -@@ -216,7 +216,9 @@ - static struct usb_class_driver imon_class = { - .name = DEVFS_NAME, - .fops = &vfd_fops, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) - .mode = DEVFS_MODE, -+#endif - .minor_base = VFD_MINOR_BASE, - }; - #endif -Index: drivers/lirc_sasem/lirc_sasem.c -=================================================================== -RCS file: /cvsroot/lirc/lirc/drivers/lirc_sasem/lirc_sasem.c,v -retrieving revision 1.11 -diff -u -r1.11 lirc_sasem.c ---- drivers/lirc_sasem/lirc_sasem.c 29 Oct 2005 14:18:53 -0000 1.11 -+++ drivers/lirc_sasem/lirc_sasem.c 29 Nov 2005 01:15:19 -0000 -@@ -81,7 +81,7 @@ - - #define VFD_MINOR_BASE 144 /* Same as LCD */ - #define DEVFS_MODE S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH --#define DEVFS_NAME "usb/lcd%d" -+#define DEVFS_NAME "lcd%d" - - #define BUF_CHUNK_SIZE 8 - #define BUF_SIZE 128 -@@ -204,7 +204,9 @@ - static struct usb_class_driver sasem_class = { - .name = DEVFS_NAME, - .fops = &vfd_fops, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) - .mode = DEVFS_MODE, -+#endif - .minor_base = VFD_MINOR_BASE, - }; - #endif diff --git a/lirc-cvs20051129.patch b/lirc-cvs20051129.patch deleted file mode 100644 index 3693864..0000000 --- a/lirc-cvs20051129.patch +++ /dev/null @@ -1,405 +0,0 @@ ---- lirc-0.8.0pre1/configure.in.orig 2005-11-05 18:52:50.000000000 +0200 -+++ lirc-0.8.0pre1/configure.in 2005-11-29 00:23:03.000000000 +0200 -@@ -137,6 +137,7 @@ - AC_MSG_RESULT() - - possible_drivers="(none) \ -+ (userspace) - (bte) \ - (bw6130) \ - (creative) \ -@@ -164,7 +165,7 @@ - - if test x${no_kernel} != xyes; then - possible_drivers="${possible_drivers} \ -- (any) \ -+ (all) \ - (lirc_dev) \ - (lirc_dev lirc_atiusb) \ - (lirc_dev lirc_bt829) \ -@@ -301,9 +302,9 @@ - HW_DEFAULT="hw_null" - fi - --if test "$driver" = "any"; then -+if test "$driver" = "userspace" -o "$driver" = "all"; then - AC_DEFINE(LIRC_DRIVER_ANY) -- lirc_driver="any" -+ lirc_driver=$driver - - any_possible_drivers=`echo ${possible_drivers} | sed -e's/ /-/g' \ - -e's/)-(/ /g' -e's/(//g' -e's/)//g' \ -@@ -1039,7 +1040,7 @@ - AC_MSG_ERROR([*** you need to first install the caraca package - before you can use this driver]) - ;; -- any|lirc_*) -+ all|lirc_*) - AC_MSG_ERROR([*** you need to have the Linux kernel source installed - for this driver]) - ;; -@@ -1078,6 +1079,7 @@ - - if test "$lirc_driver" = "none" || \ - test "$lirc_driver" = "alsa_usb" || \ -+ test "$lirc_driver" = "userspace" || \ - test "$lirc_driver" = "atilibusb" || \ - test "$lirc_driver" = "audio" || \ - test "$lirc_driver" = "audio_alsa" || \ -@@ -1085,7 +1087,7 @@ - test "$lirc_driver" = "irman" || \ - test "$lirc_driver" = "irman_sw"; then - lirc_driver= --elif test "$lirc_driver" = "any"; then -+elif test "$lirc_driver" = "all"; then - lirc_driver="lirc_dev \ - lirc_atiusb \ - lirc_bt829 \ -@@ -1316,7 +1318,7 @@ - ]) - - echo --if test "$driver" = "any"; then -+if test "$driver" = "all"; then - echo "All kernel modules will be built." - elif test "$driver" = "mediafocusI"; then - echo "You will have to use the MediaFocus driver from:" ---- lirc-0.8.0pre1/drivers/lirc_bt829/lirc_bt829.c.orig 2005-02-19 17:12:58.000000000 +0200 -+++ lirc-0.8.0pre1/drivers/lirc_bt829/lirc_bt829.c 2005-11-29 00:21:39.000000000 +0200 -@@ -65,7 +65,8 @@ - }while(0) - - static int atir_minor; --static unsigned long pci_addr_phys, pci_addr_lin; -+static unsigned long pci_addr_phys; -+static unsigned char *pci_addr_lin; - - static struct lirc_plugin atir_plugin; - -@@ -81,7 +82,7 @@ - my_dev = (struct pci_dev *)pci_find_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_264VT,NULL); - if ( my_dev ) { - printk(KERN_ERR "ATIR: Using device: %s\n", -- pci_pretty_name(my_dev)); -+ pci_name(my_dev)); - pci_addr_phys = 0; - if ( my_dev->resource[0].flags & IORESOURCE_MEM ) { - pci_addr_phys = my_dev->resource[0].start; -@@ -161,7 +162,7 @@ - - static int atir_init_start(void) - { -- pci_addr_lin = (unsigned long)ioremap(pci_addr_phys + DATA_PCI_OFF,0x400); -+ pci_addr_lin = ioremap(pci_addr_phys + DATA_PCI_OFF,0x400); - if ( pci_addr_lin == 0 ) { - printk(KERN_INFO "atir: pci mem must be mapped\n"); - return 0; -@@ -363,7 +364,8 @@ - - static unsigned int read_index(unsigned char index) - { -- unsigned int addr, value; -+ unsigned char *addr; -+ unsigned int value; - // addr = pci_addr_lin + DATA_PCI_OFF + ((index & 0xFF) << 2); - addr = pci_addr_lin + ((index & 0xFF) << 2); - value = readl(addr); -@@ -372,7 +374,7 @@ - - static void write_index(unsigned char index,unsigned int reg_val) - { -- unsigned int addr; -+ unsigned char *addr; - addr = pci_addr_lin + ((index & 0xFF) << 2); - writel(reg_val,addr); - } ---- lirc-0.8.0pre1/drivers/kcompat.h.orig 2005-10-29 17:18:53.000000000 +0300 -+++ lirc-0.8.0pre1/drivers/kcompat.h 2005-11-29 00:21:39.000000000 +0200 -@@ -187,9 +187,12 @@ - #define local_irq_restore(flags) do{ restore_flags(flags); } while(0) - #endif - --#if !defined(pci_pretty_name) --#define pci_pretty_name(dev) ((dev)->name) --#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22) -+static inline char *pci_name(struct pci_dev *pdev) -+{ -+ return pdev->slot_name; -+} -+#endif//Kernel<2.4.22 - - /*************************** I2C specific *****************************/ - #include ---- lirc-0.8.0pre1/tools/lirc_client.h.orig 2005-11-01 21:12:16.000000000 +0200 -+++ lirc-0.8.0pre1/tools/lirc_client.h 2005-11-29 00:21:39.000000000 +0200 -@@ -14,6 +14,8 @@ - #ifndef LIRC_CLIENT_H - #define LIRC_CLIENT_H - -+#include -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -91,6 +93,7 @@ - int lirc_code2charprog(struct lirc_config *config,char *code,char **string, - char **prog); - size_t lirc_getsocketname(const char *filename, char *buf, size_t size); -+const char *lirc_getmode(struct lirc_config *config); - - /* new interface for transmit */ - int lirc_send_command(int sockfd, const char *command, char *buf, size_t *buf_len, int *ret_status); ---- lirc-0.8.0pre1/tools/lirc_client.c.orig 2005-11-01 21:12:16.000000000 +0200 -+++ lirc-0.8.0pre1/tools/lirc_client.c 2005-11-29 00:21:39.000000000 +0200 -@@ -1723,7 +1723,7 @@ - char *new_buffer; - - packet_size+=PACKET_SIZE; -- new_buffer=(char *) realloc(lirc_buffer,packet_size); -+ new_buffer=(char *) realloc(lirc_buffer,packet_size+1); - if(new_buffer==NULL) - { - return(-1); -@@ -1767,6 +1767,33 @@ - return strlen(filename)+2; - } - -+const char *lirc_getmode(struct lirc_config *config) -+{ -+ if(config->sockfd!=-1) -+ { -+ static char buf[LIRC_PACKET_SIZE]; -+ size_t buf_len = LIRC_PACKET_SIZE; -+ int success; -+ int ret; -+ -+ ret = lirc_send_command(config->sockfd, "GETMODE\n", -+ buf, &buf_len, &success); -+ if(success == LIRC_RET_SUCCESS) -+ { -+ if(ret > 0) -+ { -+ return buf; -+ } -+ else -+ { -+ return NULL; -+ } -+ } -+ return NULL; -+ } -+ return config->current_mode; -+} -+ - static const char *lirc_read_string(int fd) - { - static char buffer[LIRC_PACKET_SIZE+1]=""; ---- lirc-0.8.0pre1/tools/lirc_clientd.c.orig 2005-11-01 21:12:16.000000000 +0200 -+++ lirc-0.8.0pre1/tools/lirc_clientd.c 2005-11-29 00:21:39.000000000 +0200 -@@ -67,6 +67,7 @@ - - static int code_func(int fd,char *message,char *arguments); - static int ident_func(int fd,char *message,char *arguments); -+static int getmode_func(int fd,char *message,char *arguments); - static int send_result(int fd, char *message, const char *result); - static int send_success(int fd,char *message); - -@@ -74,6 +75,7 @@ - { - {"CODE",code_func}, - {"IDENT",ident_func}, -+ {"GETMODE",getmode_func}, - {NULL,NULL} - /* - {"DEBUG",debug}, -@@ -114,7 +116,10 @@ - do {} while(0) - #endif - --const char *progname="lirc_clientd " VERSION; -+#define logprintf syslog -+#define logperror(prio,s) if((s)!=NULL) syslog(prio,"%s: %m\n",(char *) s); else syslog(prio,"%m\n") -+ -+const char *progname="lirc_clientd"; - - static sig_atomic_t term=0; - static int termsig; -@@ -122,53 +127,12 @@ - static struct client_data clis[MAX_CLIENTS]; - - static int daemonized=0; --static FILE *lf=NULL; --static const char *hostname=""; - - static struct lirc_config *config; - - static int send_error(int fd,char *message,char *format_str, ...); - static int handle_input(); - --void logprintf(int prio,char *format_str, ...) --{ -- time_t current; -- char *currents; -- va_list ap; -- -- current=time(¤t); -- currents=ctime(¤t); -- -- if(lf) fprintf(lf,"%15.15s %s %s: ",currents+4,hostname,progname); -- if(!daemonized) fprintf(stderr,"%s: ",progname); -- va_start(ap,format_str); -- if(lf) -- { -- if(prio==LOG_WARNING) fprintf(lf,"WARNING: "); -- vfprintf(lf,format_str,ap); -- fputc('\n',lf);fflush(lf); -- } -- if(!daemonized) -- { -- if(prio==LOG_WARNING) fprintf(stderr,"WARNING: "); -- vfprintf(stderr,format_str,ap); -- fputc('\n',stderr);fflush(stderr); -- } -- va_end(ap); --} -- --void logperror(int prio,const char *s) --{ -- if(s!=NULL) -- { -- logprintf(prio,"%s: %s",s,strerror(errno)); -- } -- else -- { -- logprintf(prio,"%s",strerror(errno)); -- } --} -- - static inline int max(int a,int b) - { - return(a>b ? a:b); -@@ -554,6 +518,16 @@ - return(send_success(fd,message)); - } - -+static int getmode_func(int fd,char *message,char *arguments) -+{ -+ LOGPRINTF(2, "GETMODE %s", arguments); -+ if(lirc_getmode(config)) -+ { -+ return send_result(fd, message, lirc_getmode(config)); -+ } -+ return(send_success(fd,message)); -+} -+ - static int send_result(int fd, char *message, const char *result) - { - char *count = "1\n"; -@@ -938,7 +912,7 @@ - printf("\t -o --output=socket\t\toutput socket filename\n"); - return(EXIT_SUCCESS); - case 'v': -- printf("%s\n",progname); -+ printf("%s %s\n",progname,VERSION); - return(EXIT_SUCCESS); - case 'p': - if(oatoi(optarg)==-1) -@@ -988,7 +962,6 @@ - return EXIT_FAILURE; - } - -- LOGPRINTF(3, "fork"); - /* fork */ - if(daemon(0,0)==-1) - { -@@ -1001,8 +974,7 @@ - } - daemonized=1; - -- lf = fopen("/tmp/lirc_clientd.log", "a"); -- -+ openlog(progname, LOG_CONS|LOG_PID, LOG_USER); - umask(0); - signal(SIGPIPE,SIG_IGN); - -@@ -1013,8 +985,10 @@ - sigaction(SIGINT,&act,NULL); - sigaction(SIGHUP,&act,NULL); - -+ logprintf(LOG_NOTICE, "%s started", progname); - loop(socket, lircdfd); - -+ closelog(); - shutdown(socket, 2); - close(socket); - lirc_freeconfig(config); ---- lirc-0.8.0pre1/configure.orig 2005-11-05 18:55:58.000000000 +0200 -+++ lirc-0.8.0pre1/configure 2005-11-29 00:24:39.000000000 +0200 -@@ -7995,6 +7995,7 @@ - echo "$ac_t""" 1>&6 - - possible_drivers="(none) \ -+ (userspace) \ - (bte) \ - (bw6130) \ - (creative) \ -@@ -8022,7 +8023,7 @@ - - if test x${no_kernel} != xyes; then - possible_drivers="${possible_drivers} \ -- (any) \ -+ (all) \ - (lirc_dev) \ - (lirc_dev lirc_atiusb) \ - (lirc_dev lirc_bt829) \ -@@ -8568,12 +8569,12 @@ - HW_DEFAULT="hw_null" - fi - --if test "$driver" = "any"; then -+if test "$driver" = "userspace" -o "$driver" = "all"; then - cat >> confdefs.h <<\EOF - #define LIRC_DRIVER_ANY 1 - EOF - -- lirc_driver="any" -+ lirc_driver=$driver - - any_possible_drivers=`echo ${possible_drivers} | sed -e's/ /-/g' \ - -e's/)-(/ /g' -e's/(//g' -e's/)//g' \ -@@ -9332,7 +9333,7 @@ - { echo "configure: error: *** you need to first install the caraca package - before you can use this driver" 1>&2; exit 1; } - ;; -- any|lirc_*) -+ all|lirc_*) - { echo "configure: error: *** you need to have the Linux kernel source installed - for this driver" 1>&2; exit 1; } - ;; -@@ -9370,6 +9371,7 @@ - - if test "$lirc_driver" = "none" || \ - test "$lirc_driver" = "alsa_usb" || \ -+ test "$lirc_driver" = "userspace" || \ - test "$lirc_driver" = "atilibusb" || \ - test "$lirc_driver" = "audio" || \ - test "$lirc_driver" = "audio_alsa" || \ -@@ -9377,7 +9379,7 @@ - test "$lirc_driver" = "irman" || \ - test "$lirc_driver" = "irman_sw"; then - lirc_driver= --elif test "$lirc_driver" = "any"; then -+elif test "$lirc_driver" = "all"; then - lirc_driver="lirc_dev \ - lirc_atiusb \ - lirc_bt829 \ -@@ -10245,7 +10247,7 @@ - - - echo --if test "$driver" = "any"; then -+if test "$driver" = "all"; then - echo "All kernel modules will be built." - elif test "$driver" = "mediafocusI"; then - echo "You will have to use the MediaFocus driver from:" diff --git a/lirc.spec b/lirc.spec index 537e989..06a90cc 100644 --- a/lirc.spec +++ b/lirc.spec @@ -16,19 +16,17 @@ Name: lirc Version: 0.8.0 -Release: 0.2.pre1%{?dist} +Release: 0.2.pre2%{?dist} Summary: The Linux Infrared Remote Control package Group: System Environment/Daemons License: GPL URL: http://www.lirc.org/ #Source0: http://download.sourceforge.net/lirc/%{name}-%{version}.tar.bz2 -Source0: http://lirc.sf.net/software/snapshots/lirc-0.8.0pre1.tar.bz2 +Source0: http://lirc.sf.net/software/snapshots/lirc-0.8.0pre2.tar.bz2 Source1: %{name}.init Source2: %{name}.sysconfig Patch0: %{name}-optflags.patch -Patch1: %{name}-cvs20051129.patch -Patch2: %{name}-0.8.0pre1-2615usb.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if 0%{!?_with_modules:1} @@ -78,18 +76,24 @@ LIRC kernel modules built for kernel %prep -%setup -q -n %{name}-%{version}pre1 +%setup -q -n %{name}-%{version}pre2 %patch0 -p1 -%patch1 -p1 -%patch2 + +# *cough* echo %{kver} | grep -q _FC5 && \ - sed -i -e s/2,6,15/2,6,14/ drivers/lirc_{dev,imon,sasem}/lirc_*.c # *cough* + sed -i -e 's/KERNEL_VERSION(2,\s*6,\s*15)/KERNEL_VERSION(2,6,14)/' \ + drivers/kcompat.h drivers/lirc_{imon,sasem}/lirc_*.c + chmod 644 contrib/* -# cmdir: unknown symbols + +sed -i -e 's/\r//' remotes/{imon,hercules}/lircd.conf* + +# cmdir: unknown symbols (cmdir_{read,write}, set_tx_channels) # gpio: missing drivers/media/video/{bttv,bttvp}.h in kernel-devel for drv in cmdir gpio ; do sed -i -e "/^\\s*(lirc_dev lirc_$drv)/d" -e "/^\\s*lirc_$drv/d" configure* done + touch -r aclocal.m4 configure.in # avoid autofoo re-run @@ -179,7 +183,7 @@ depmod -ae -F /boot/System.map-%{kver} %{kver} >/dev/null || : %{_bindir}/*mode2 %{_sbindir}/lirc*d %{_libdir}/liblirc_client.so.* -%{_mandir}/man1/ir*.1* +%{_mandir}/man1/*ir*.1* %{_mandir}/man1/*mode2*.1* %{_mandir}/man8/lirc*d.8* %ghost /dev/lirc* @@ -198,6 +202,10 @@ depmod -ae -F /boot/System.map-%{kver} %{kver} >/dev/null || : %changelog +* Wed Dec 14 2005 Ville Skyttä - 0.8.0-0.2.pre2 +- 0.8.0pre2, kernel >= 2.6.15 USB patch applied upstream. +- lirc_clientd renamed to lircrcd. + * Tue Nov 29 2005 Ville Skyttä - 0.8.0-0.2.pre1 - Pull security fix for the new lirc_clientd from upstream CVS, and while at it, some other useful post-0.8.0pre1 changes. diff --git a/sources b/sources index e3dd4de..0c0f7ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d115ec757ee1f3b25071f24c8256ee31 lirc-0.8.0pre1.tar.bz2 +80aaee5c1b5815f115b1e14d49f36cd5 lirc-0.8.0pre2.tar.bz2