Mon, 06 Aug 2012 13:34:16 +0200
Import package vendor original specs for necessary manipulations.
opie/opie.patch | file | annotate | diff | comparison | revisions | |
opie/opie.spec | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/opie/opie.patch Mon Aug 06 13:34:16 2012 +0200 1.3 @@ -0,0 +1,137 @@ 1.4 +Index: Makefile.in 1.5 +--- Makefile.in.orig 2005-11-07 19:38:27 +0100 1.6 ++++ Makefile.in 2005-11-07 19:38:52 +0100 1.7 +@@ -152,7 +152,7 @@ 1.8 + @-for i in otp-md4 otp-md5; do ln -s opiekey.1 $(LOCALMAN)/man1/$$i.1; done 1.9 + @if test ! -d $(LOCALMAN)/man1; then $(MKDIR) $(LOCALMAN)/man1; chmod 755 $(LOCALMAN)/man1; fi; cp opiekey.1 $(LOCALMAN)/man1/opiekey.1; $(CHOWN) $(OWNER) $(LOCALMAN)/man1/opiekey.1; chgrp $(GROUP) $(LOCALMAN)/man1/opiekey.1; chmod 644 $(LOCALMAN)/man1/opiekey.1 1.10 + 1.11 +-server: libopie/libopie.a libmissing/libmissing.a opietest-passed opielogin opiesu opiepasswd opieinfo opieftpd opieserv 1.12 ++server: libopie/libopie.a libmissing/libmissing.a opietest-passed opielogin opiesu opiepasswd opieinfo opieserv 1.13 + 1.14 + server-install: server 1.15 + @echo "Installing OPIE server software..." 1.16 +Index: libopie/atob8.c 1.17 +--- libopie/atob8.c.orig 1999-03-11 03:09:57 +0100 1.18 ++++ libopie/atob8.c 2005-11-07 19:39:30 +0100 1.19 +@@ -72,5 +72,5 @@ 1.20 + *out++ |= val; 1.21 + } 1.22 + 1.23 +- return out; 1.24 ++ return (char *)out; 1.25 + } 1.26 +Index: opie_cfg.h 1.27 +--- opie_cfg.h.orig 2001-11-20 17:23:37 +0100 1.28 ++++ opie_cfg.h 2005-11-07 19:39:05 +0100 1.29 +@@ -69,6 +69,9 @@ 1.30 + #define DOUTMPX 0 1.31 + #endif /* HAVE_GETUTXLINE && HAVE_UTMPX_H */ 1.32 + 1.33 ++#include <stdlib.h> 1.34 ++#include <stdio.h> 1.35 ++#include <string.h> 1.36 + #include <sys/types.h> 1.37 + /* Adapted from the Autoconf hypertext info pages */ 1.38 + #if HAVE_DIRENT_H 1.39 +Index: libopie/generator.c 1.40 +--- libopie/generator.c.orig 2006-06-18 02:06:28.215630000 +0200 1.41 ++++ libopie/generator.c 2006-06-18 02:06:15.049431000 +0200 1.42 +@@ -62,7 +62,7 @@ 1.43 + static int opieauto_connect FUNCTION_NOARGS 1.44 + { 1.45 + int s; 1.46 +- struct sockaddr_un sun; 1.47 ++ struct sockaddr_un locsun; 1.48 + char buffer[1024]; 1.49 + char *c, *c2 ="/.opieauto"; 1.50 + uid_t myuid = getuid(), myeuid = geteuid(); 1.51 +@@ -74,8 +74,8 @@ 1.52 + return -1; 1.53 + }; 1.54 + 1.55 +- memset(&sun, 0, sizeof(struct sockaddr_un)); 1.56 +- sun.sun_family = AF_UNIX; 1.57 ++ memset(&locsun, 0, sizeof(struct sockaddr_un)); 1.58 ++ locsun.sun_family = AF_UNIX; 1.59 + 1.60 + if (!(c = getenv("HOME"))) { 1.61 + #if DEBUG 1.62 +@@ -84,15 +84,15 @@ 1.63 + return -1; 1.64 + }; 1.65 + 1.66 +- if (strlen(c) > (sizeof(sun.sun_path) - strlen(c2) - 1)) { 1.67 ++ if (strlen(c) > (sizeof(locsun.sun_path) - strlen(c2) - 1)) { 1.68 + #if DEBUG 1.69 + syslog(LOG_DEBUG, "opieauto_connect: HOME is too long: %s", c); 1.70 + #endif /* DEBUG */ 1.71 + return -1; 1.72 + }; 1.73 + 1.74 +- strcpy(sun.sun_path, c); 1.75 +- strcat(sun.sun_path, c2); 1.76 ++ strcpy(locsun.sun_path, c); 1.77 ++ strcat(locsun.sun_path, c2); 1.78 + 1.79 + if ((s = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { 1.80 + #if DEBUG 1.81 +@@ -104,14 +104,14 @@ 1.82 + { 1.83 + struct stat st; 1.84 + 1.85 +- if (stat(sun.sun_path, &st) < 0) { 1.86 ++ if (stat(locsun.sun_path, &st) < 0) { 1.87 + #if DEBUG 1.88 + syslog(LOG_DEBUG, "opieauto_connect: stat: %s(%d)\n", strerror(errno), errno); 1.89 + #endif /* DEBUG */ 1.90 + goto ret; 1.91 + }; 1.92 + 1.93 +- if (connect(s, (struct sockaddr *)&sun, sizeof(struct sockaddr_un))) { 1.94 ++ if (connect(s, (struct sockaddr *)&locsun, sizeof(struct sockaddr_un))) { 1.95 + #if DEBUG 1.96 + syslog(LOG_DEBUG, "opieauto_connect: connect: %s(%d)\n", strerror(errno), errno); 1.97 + #endif /* DEBUG */ 1.98 +Index: opieauto.c 1.99 +--- opieauto.c.orig 2001-11-20 16:18:42.000000000 +0100 1.100 ++++ opieauto.c 2006-06-18 02:28:20.526432000 +0200 1.101 +@@ -282,10 +282,10 @@ 1.102 + baile("atexit"); 1.103 + 1.104 + { 1.105 +- struct sockaddr_un sun; 1.106 ++ struct sockaddr_un locsun; 1.107 + 1.108 +- memset(&sun, 0, sizeof(struct sockaddr_un)); 1.109 +- sun.sun_family = AF_UNIX; 1.110 ++ memset(&locsun, 0, sizeof(struct sockaddr_un)); 1.111 ++ locsun.sun_family = AF_UNIX; 1.112 + 1.113 + { 1.114 + char *c; 1.115 +@@ -294,12 +294,12 @@ 1.116 + if (!(c = getenv("HOME"))) 1.117 + bail("getenv(HOME) failed -- no HOME variable?"); 1.118 + 1.119 +- if (strlen(c) > (sizeof(sun.sun_path) - strlen(c2) - 1)) 1.120 ++ if (strlen(c) > (sizeof(locsun.sun_path) - strlen(c2) - 1)) 1.121 + bail("your HOME is too long"); 1.122 + 1.123 +- strcpy(sun.sun_path, c); 1.124 +- strcat(sun.sun_path, c2); 1.125 +- sockpath = strdup(sun.sun_path); 1.126 ++ strcpy(locsun.sun_path, c); 1.127 ++ strcat(locsun.sun_path, c2); 1.128 ++ sockpath = strdup(locsun.sun_path); 1.129 + }; 1.130 + 1.131 + if ((parents = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) 1.132 +@@ -311,7 +311,7 @@ 1.133 + if (umask(0177) < 0) 1.134 + baile("umask"); 1.135 + 1.136 +- if (bind(parents, (struct sockaddr *)&sun, sizeof(struct sockaddr_un))) 1.137 ++ if (bind(parents, (struct sockaddr *)&locsun, sizeof(struct sockaddr_un))) 1.138 + baile("bind"); 1.139 + 1.140 + if (stat(sockpath, &st) < 0)
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/opie/opie.spec Mon Aug 06 13:34:16 2012 +0200 2.3 @@ -0,0 +1,119 @@ 2.4 +## 2.5 +## opie.spec -- OpenPKG RPM Package Specification 2.6 +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 2.7 +## 2.8 +## Permission to use, copy, modify, and distribute this software for 2.9 +## any purpose with or without fee is hereby granted, provided that 2.10 +## the above copyright notice and this permission notice appear in all 2.11 +## copies. 2.12 +## 2.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 2.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 2.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 2.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 2.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2.24 +## SUCH DAMAGE. 2.25 +## 2.26 + 2.27 +# package version 2.28 +%define V_major 2.4.1 2.29 +%define V_minor 1 2.30 + 2.31 +# package information 2.32 +Name: opie 2.33 +Summary: One-Time Passwords In Everything (OPIE) 2.34 +URL: http://www.inner.net/~cmetz/opie 2.35 +Vendor: Craig Metz 2.36 +Packager: OpenPKG Foundation e.V. 2.37 +Distribution: OpenPKG Community 2.38 +Class: PLUS 2.39 +Group: Cryptography 2.40 +License: INL3 2.41 +Version: %{V_major}.%{V_minor} 2.42 +Release: 20080101 2.43 + 2.44 +# list of sources 2.45 +Source0: http://www.inner.net/pub/opie/test/opie-%{V_major}-test%{V_minor}.tar.gz 2.46 +Patch0: opie.patch 2.47 + 2.48 +# build information 2.49 +Prefix: %{l_prefix} 2.50 +BuildRoot: %{l_buildroot} 2.51 +BuildPreReq: OpenPKG, openpkg >= 20040130 2.52 +PreReq: OpenPKG, openpkg >= 20040130 2.53 +AutoReq: no 2.54 +AutoReqProv: no 2.55 + 2.56 +%description 2.57 + OPIE is a One Time Password (OTP) toolkit. 2.58 + 2.59 +%track 2.60 + prog opie = { 2.61 + version = %{V_major}-test%{V_minor} 2.62 + url = http://www.inner.net/pub/opie/test/ 2.63 + regex = opie-(__VER__)\.tar\.gz 2.64 + } 2.65 + 2.66 +%prep 2.67 + %setup -q -n opie-%{V_major}-test%{V_minor} 2.68 + %patch -p0 2.69 + 2.70 +%build 2.71 + %{l_shtool} subst \ 2.72 + -e 's;/etc/opiekeys;%{l_prefix}/etc/opie/opiekeys;' \ 2.73 + Makefile.in 2.74 + CC="%{l_cc}" \ 2.75 + CFLAGS="%{l_cflags -O}" \ 2.76 + CPPFLAGS="%{l_cppflags}" \ 2.77 + LDFLAGS="%{l_ldflags}" \ 2.78 + ./configure \ 2.79 + --prefix=%{l_prefix} \ 2.80 + --enable-access-file=%{l_prefix}/etc/opie/opieaccess \ 2.81 + --enable-opieauto 2.82 + %{l_make} %{l_mflags -O} 2.83 + echo "#permit 127.0.0.1 255.255.255.255" >opieaccess 2.84 + 2.85 +%install 2.86 + rm -rf $RPM_BUILD_ROOT 2.87 + %{l_shtool} mkdir -f -p -m 755 \ 2.88 + $RPM_BUILD_ROOT%{l_prefix}/bin \ 2.89 + $RPM_BUILD_ROOT%{l_prefix}/sbin \ 2.90 + $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ 2.91 + $RPM_BUILD_ROOT%{l_prefix}/man/man3 \ 2.92 + $RPM_BUILD_ROOT%{l_prefix}/man/man8 \ 2.93 + $RPM_BUILD_ROOT%{l_prefix}/etc/opie \ 2.94 + $RPM_BUILD_ROOT%{l_prefix}/include \ 2.95 + $RPM_BUILD_ROOT%{l_prefix}/lib 2.96 + %{l_shtool} install -c -s -m 755 \ 2.97 + opiekey opieauto $RPM_BUILD_ROOT%{l_prefix}/bin/ 2.98 + %{l_shtool} install -c -m 644 \ 2.99 + opiekey.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ 2.100 + %{l_shtool} install -c -s -m 755 \ 2.101 + opiepasswd opieinfo $RPM_BUILD_ROOT%{l_prefix}/sbin/ 2.102 + %{l_shtool} install -c -m 644 \ 2.103 + opiepasswd.1 $RPM_BUILD_ROOT%{l_prefix}/man/man8/opiepasswd.8 2.104 + %{l_shtool} install -c -m 644 \ 2.105 + opieinfo.1 $RPM_BUILD_ROOT%{l_prefix}/man/man8/opieinfo.8 2.106 + %{l_shtool} install -c -m 644 \ 2.107 + libopie/libopie.a $RPM_BUILD_ROOT%{l_prefix}/lib/ 2.108 + %{l_shtool} install -c -m 644 \ 2.109 + opie.h $RPM_BUILD_ROOT%{l_prefix}/include/ 2.110 + %{l_shtool} install -c -m 644 \ 2.111 + opie.4 $RPM_BUILD_ROOT%{l_prefix}/man/man3/opie.3 2.112 + %{l_shtool} install -c -m 644 \ 2.113 + opieaccess $RPM_BUILD_ROOT%{l_prefix}/etc/opie/ 2.114 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 2.115 + %{l_files_std} \ 2.116 + '%config %{l_prefix}/etc/opie/*' 2.117 + 2.118 +%files -f files 2.119 + 2.120 +%clean 2.121 + rm -rf $RPM_BUILD_ROOT 2.122 +