From 821cdc0ff74394669d8088b52d7f2124d623dd99 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Sat, 15 Sep 2007 19:39:40 +0000 Subject: [PATCH] - Upgraded to librtas-1.3.2 - Cleaned up spec file to conform to Fedora packaging guidelines --- .cvsignore | 2 +- librtas-1.2.4-no_syscall1.patch | 30 ---------------- librtas-1.3.2-mode.patch | 12 +++++++ librtas.spec | 62 ++++++++++++++++++--------------- sources | 2 +- 5 files changed, 48 insertions(+), 60 deletions(-) delete mode 100644 librtas-1.2.4-no_syscall1.patch create mode 100644 librtas-1.3.2-mode.patch diff --git a/.cvsignore b/.cvsignore index 6a45ce2..ee08abd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -librtas-1.2.4.tar.gz +librtas-1.3.2.tar.gz diff --git a/librtas-1.2.4-no_syscall1.patch b/librtas-1.2.4-no_syscall1.patch deleted file mode 100644 index 83cf327..0000000 --- a/librtas-1.2.4-no_syscall1.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- librtas-1.2.4/librtas_src/syscall_calls.c.no_syscall 2006-08-01 10:08:03.000000000 -0400 -+++ librtas-1.2.4/librtas_src/syscall_calls.c 2006-08-01 10:09:22.000000000 -0400 -@@ -93,7 +93,15 @@ - .interface_exists = sc_interface_exists, - }; - -+/* The original librtas used the _syscall1 interface to get to the rtas -+ * system call. On recent versions of Linux though the _syscall1 -+ * interface was removed from unistd.h so we have moved to using the -+ * syscall() interface instead. The use of _syscall1 is left as the -+ * default to avoid breaking the library on older systems. -+ */ -+#ifdef _syscall1 - _syscall1(int, rtas, void *, args); -+#endif - - #define CALL_AGAIN 1 - -@@ -201,7 +209,11 @@ - va_end(ap); - - display_rtas_buf(&args, 0); -+#ifdef _syscall1 - rc = rtas(&args); -+#else -+ rc = syscall(__NR_rtas, &args); -+#endif - if (rc != 0) { - dbg1("RTAS syscall failure, errno=%d\n", errno); - return RTAS_IO_ASSERT; diff --git a/librtas-1.3.2-mode.patch b/librtas-1.3.2-mode.patch new file mode 100644 index 0000000..6300d0f --- /dev/null +++ b/librtas-1.3.2-mode.patch @@ -0,0 +1,12 @@ +diff -up librtas-1.3.2/librtas_src/syscall_rmo.c.mode librtas-1.3.2/librtas_src/syscall_rmo.c +--- librtas-1.3.2/librtas_src/syscall_rmo.c.mode 2007-08-06 12:02:34.000000000 -0400 ++++ librtas-1.3.2/librtas_src/syscall_rmo.c 2007-09-05 17:03:10.000000000 -0400 +@@ -117,7 +117,7 @@ static int acquire_file_lock(off_t start + + /* Lazily open lock file */ + if (wa_config.lockfile_fd < 0) { +- wa_config.lockfile_fd = open(lockfile_path, O_CREAT | O_RDWR); ++ wa_config.lockfile_fd = open(lockfile_path, O_CREAT | O_RDWR, 0600); + if (wa_config.lockfile_fd < 0) { + dbg1("could not open lockfile %s\n", lockfile_path); + return RTAS_IO_ASSERT; diff --git a/librtas.spec b/librtas.spec index 8aa518f..5a2f922 100644 --- a/librtas.spec +++ b/librtas.spec @@ -1,14 +1,16 @@ -Summary: Libraries to provide access to RTAS calls and RTAS events. -Name: librtas -Version: 1.2.4 -Release: 4%{?dist} -URL: http://librtas.ozlabs.org -License: IBM Common Public License (CPL) v1.0 -Group: System Environment/Libraries -Source: http://librtas.ozlabs.org/releases/librtas-%{version}.tar.gz -Patch0: librtas-1.2.4-no_syscall1.patch +Summary: Libraries to provide access to RTAS calls and RTAS events +Name: librtas +Version: 1.3.2 +Release: 1%{?dist} +URL: http://librtas.ozlabs.org +License: IBM +Group: System Environment/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Source: http://librtas.ozlabs.org/releases/%{name}-%{version}.tar.gz + +Patch0: %{name}-1.3.2-mode.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: ppc ppc64 %description @@ -22,48 +24,52 @@ definitions and common routines useful in parsing and dumping the contents of RTAS events. %package devel -Summary: Static libraries and header files for librtas development. -Group: Development/Libraries -Requires: librtas = %{version} +Summary: C header files for development with librtas +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel - -The librtas-devel packages contains the header files and static libraries -necessary for developing programs using libdaemon. +The librtas-devel packages contains the header files necessary for +developing programs using libdaemon. %prep -%setup -%patch0 -p1 -b .no_syscall +%setup +%patch0 -p1 -b .mode %build -make CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" - +%{__make} CFLAGS="%{optflags} -fPIC -DPIC" %{?_smp_mflags} %install -make DESTDIR=$RPM_BUILD_ROOT LIB_DIR=%{_libdir} install -rm -rf $RPM_BUILD_ROOT/usr/share/doc +%{__make} install DESTDIR=%{buildroot} LIB_DIR=%{_libdir} +%{__rm} -rf %{buildroot}%{_datadir}/doc %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean -rm -rf $RPM_BUILD_ROOT +%{__rm} -rf %{buildroot} %files %defattr(-, root, root, -) -%doc COPYRIGHT README +%doc COPYRIGHT README Changelog %{_libdir}/librtas.so.%{version} %{_libdir}/librtasevent.so.%{version} %files devel %defattr(-, root, root, -) -%doc COPYRIGHT README -%{_libdir}/*.so -%{_libdir}/*.a -/usr/include/* +%{_libdir}/librtas.so +%{_libdir}/librtasevent.so +%{_includedir}/librtas.h +%{_includedir}/librtasevent.h +%{_includedir}/librtasevent_v4.h +%{_includedir}/librtasevent_v6.h %changelog +* Mon Sep 10 2007 David Cantrell - 1.3.2-1 +- Upgraded to librtas-1.3.2 +- Cleaned up spec file to conform to Fedora packaging guidelines + * Tue Aug 21 2007 David Cantrell - 1.2.4-4 - Rebuild diff --git a/sources b/sources index 8c6839b..c59b1a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2e2a2b10ee65deb9b99f88f1502656ce librtas-1.2.4.tar.gz +0a3705d4983fbb18a1b98cbe15032318 librtas-1.3.2.tar.gz