- Upgraded to librtas-1.3.2
- Cleaned up spec file to conform to Fedora packaging guidelines
This commit is contained in:
parent
16ae1d7559
commit
821cdc0ff7
@ -1 +1 @@
|
||||
librtas-1.2.4.tar.gz
|
||||
librtas-1.3.2.tar.gz
|
||||
|
@ -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;
|
12
librtas-1.3.2-mode.patch
Normal file
12
librtas-1.3.2-mode.patch
Normal file
@ -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;
|
52
librtas.spec
52
librtas.spec
@ -1,14 +1,16 @@
|
||||
Summary: Libraries to provide access to RTAS calls and RTAS events.
|
||||
Summary: Libraries to provide access to RTAS calls and RTAS events
|
||||
Name: librtas
|
||||
Version: 1.2.4
|
||||
Release: 4%{?dist}
|
||||
Version: 1.3.2
|
||||
Release: 1%{?dist}
|
||||
URL: http://librtas.ozlabs.org
|
||||
License: IBM Common Public License (CPL) v1.0
|
||||
License: IBM
|
||||
Group: System Environment/Libraries
|
||||
Source: http://librtas.ozlabs.org/releases/librtas-%{version}.tar.gz
|
||||
Patch0: librtas-1.2.4-no_syscall1.patch
|
||||
|
||||
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.
|
||||
Summary: C header files for development with librtas
|
||||
Group: Development/Libraries
|
||||
Requires: librtas = %{version}
|
||||
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
|
||||
%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 <dcantrell@redhat.com> - 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 <dcantrell@redhat.com> - 1.2.4-4
|
||||
- Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user