From cf67eaf6b628b017994affb2a36ac045699c585a Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 21 Sep 2005 10:36:10 +0000 Subject: [PATCH] - 16bit->32bit dev major/minor numbers --- lockdev-1.0.1-32bit.patch | 20 ++++++++++++++++++++ lockdev.spec | 19 ++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 lockdev-1.0.1-32bit.patch diff --git a/lockdev-1.0.1-32bit.patch b/lockdev-1.0.1-32bit.patch new file mode 100644 index 0000000..ef72bb1 --- /dev/null +++ b/lockdev-1.0.1-32bit.patch @@ -0,0 +1,20 @@ +--- lockdev-1.0.1/src/lockdev.c.32bit 2005-09-21 11:23:36.000000000 +0200 ++++ lockdev-1.0.1/src/lockdev.c 2005-09-21 11:55:22.000000000 +0200 +@@ -228,13 +228,13 @@ + _debug( 3, "_dl_filename_1 (stat=%d)\n", (int)st->st_rdev); + #if defined (__linux__) + /* this changes the major from 5 to 4 if it was a cua device */ +- if ( (int)st->st_rdev >= (TTYAUX_MAJOR*256)+64 +- && (int)st->st_rdev <= (TTYAUX_MAJOR*256)+127 ) +- add = (TTY_MAJOR - TTYAUX_MAJOR)*256; ++ if ( (int)st->st_rdev >= makedev(TTYAUX_MAJOR,64) ++ && (int)st->st_rdev <= makedev(TTYAUX_MAJOR,127)) ++ add = makedev((TTY_MAJOR - TTYAUX_MAJOR),0); + #endif /* __linux__ */ + /* lockfile of type /var/lock/LCK.004.064 */ + l = sprintf( name, "%s/LCK.%03d.%03d", LOCK_PATH, +- (int)MAJOR( add+st->st_rdev), (int)MINOR( add+st->st_rdev)); ++ (int)major(add+st->st_rdev), (int)minor(add+st->st_rdev)); + _debug( 2, "_dl_filename_1 () -> len=%d, name=%s<\n", l, name); + return l; + } diff --git a/lockdev.spec b/lockdev.spec index 2557f32..d74ab03 100644 --- a/lockdev.spec +++ b/lockdev.spec @@ -1,7 +1,7 @@ Summary: A library for locking devices. Name: lockdev Version: 1.0.1 -Release: 8 +Release: 9 License: LGPL Group: System Environment/Libraries Source: http://ftp.debian.org/debian/pool/main/l/lockdev/%{name}_%{version}.orig.tar.gz @@ -13,6 +13,7 @@ Patch4: lockdev-1.0.1-checkname.patch Patch5: lockdev-1.0.1-pidexists.patch Patch6: lockdev-1.0.1-subdir.patch Patch7: lockdev-1.0.1-fcntl.patch +Patch8: lockdev-1.0.1-32bit.patch Prereq: shadow-utils, filesystem >= 2.1.4-1 BuildRoot: %{_tmppath}/%{name}-root @@ -40,6 +41,7 @@ package contains the development headers and a static library. %patch5 -p1 -b .pidexists %patch6 -p1 -b .subdir %patch7 -p1 -b .fcntl +%patch8 -p1 -b .32bit %build make "CFLAGS=${RPM_OPT_FLAGS} -fPIC" @@ -79,6 +81,9 @@ rm -fr $RPM_BUILD_ROOT %{_includedir}/* %changelog +* Wed Sep 21 2005 Karel Zak 1.0.1-9 +- fix #165189 - The naming of the lock file by the lockdev command is abnormal. + * Thu Sep 1 2005 Karel Zak 1.0.1-8 - fix #163276 - baudboy.h should include fcntl.h @@ -142,10 +147,10 @@ rm -fr $RPM_BUILD_ROOT * Wed Jan 09 2002 Tim Powers - automated rebuild -* Thu Nov 29 2001 Trond Eivind Glomsrød 1.0.0-16 +* Thu Nov 29 2001 Trond Eivind Glomsrod 1.0.0-16 - Rebuilt -* Fri Oct 26 2001 Trond Eivind Glomsrød 1.0.0-15 +* Fri Oct 26 2001 Trond Eivind Glomsrod 1.0.0-15 - Add copyright/license info to baudboy.h (#54321) * Tue Sep 4 2001 Jeff Johnson @@ -170,10 +175,10 @@ rm -fr $RPM_BUILD_ROOT * Sun Aug 5 2001 Jeff Johnson - include setgid helper binary and baudboy.h. -* Mon Jun 18 2001 Trond Eivind Glomsrød +* Mon Jun 18 2001 Trond Eivind Glomsrod - Make the -devel depend on the main package -* Sun Aug 06 2000 Trond Eivind Glomsrød +* Sun Aug 06 2000 Trond Eivind Glomsrod - rebuild * Wed Jul 12 2000 Prospector @@ -182,8 +187,8 @@ rm -fr $RPM_BUILD_ROOT * Sat Jun 17 2000 Bill Nottingham - add %%defattr for -devel -* Sat Jun 10 2000 Trond Eivind Glomsrød +* Sat Jun 10 2000 Trond Eivind Glomsrod - use %%{_mandir} -* Thu May 04 2000 Trond Eivind Glomsrød +* Thu May 04 2000 Trond Eivind Glomsrod - first build