- upgrade to 4.80

- lsof_4.78C-inode.patch - merged upstream
- lsof_4.78C-selinux.patch - merged upstream
- lsof_4.78C-threads.patch - rebased
This commit is contained in:
kzak 2008-05-19 23:50:03 +00:00
parent e0aa365d04
commit 5d534cc73c
7 changed files with 38 additions and 487 deletions

View File

@ -1 +1 @@
lsof_4.78C-rh.tar.bz2
lsof_4.80-rh.tar.bz2

View File

@ -1,7 +1,7 @@
Summary: A utility which lists open files on a Linux/UNIX system
Name: lsof
Version: 4.78
Release: 8%{?dist}
Version: 4.80
Release: 1%{?dist}
License: Distributable
Group: Development/Debuggers
@ -11,7 +11,7 @@ Group: Development/Debuggers
# The script you can found in CVS or download from:
# http://cvs.fedoraproject.org/viewcvs/rpms/lsof/devel/upstream2downstream.sh
#
%define lsofrh lsof_4.78C-rh
%define lsofrh lsof_4.80-rh
Source0: %{lsofrh}.tar.bz2
URL: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof
@ -19,9 +19,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libselinux-devel
Patch1: lsof_4.78C-threads.patch
Patch2: lsof_4.78C-inode.patch
Patch3: lsof_4.78C-selinux.patch
Patch1: lsof_4.80-threads.patch
%description
Lsof stands for LiSt Open Files, and it does just that: it lists
@ -32,10 +30,6 @@ UNIX system.
%setup -q -n %{lsofrh}
# 184338 - allow lsof access nptl threads
%patch1 -p1
# 243976 - mmap'd files with large inode numbers confuse lsof
%patch2 -p1
# 280651 - lsof prints entries in multiple lines when SElinux is disabled
%patch3 -p1
%build
LSOF_VSTR=2.6.16 LINUX_BASE=/proc ./Configure -n linux
@ -59,6 +53,12 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man*/*
%changelog
* Tue May 20 2008 Karel Zak <kzak@redhat.com> 4.80-1
- upgrade to 4.80
- lsof_4.78C-inode.patch - merged upstream
- lsof_4.78C-selinux.patch - merged upstream
- lsof_4.78C-threads.patch - rebased
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.78-8
- Autorebuild for GCC 4.3

View File

@ -1,337 +0,0 @@
diff -up lsof_4.78C-rh/dialects/linux/dnode.c.inode lsof_4.78C-rh/dialects/linux/dnode.c
--- lsof_4.78C-rh/dialects/linux/dnode.c.inode 2006-06-12 19:10:05.000000000 +0200
+++ lsof_4.78C-rh/dialects/linux/dnode.c 2007-10-03 14:01:54.000000000 +0200
@@ -191,7 +191,7 @@ get_locks(p)
char buf[MAXPATHLEN], *ec, **fp;
dev_t dev;
int ex, i, h, mode, pid;
- unsigned long inode;
+ INODETYPE inode;
struct llock *lp, *np;
FILE *ls;
long maj, min;
@@ -267,7 +267,7 @@ get_locks(p)
*/
ec = (char *)NULL;
if (!fp[7] || !*fp[7]
- || (inode = strtoul(fp[7], &ec, 0)) == ULONG_MAX
+ || (inode = strtoull(fp[7], &ec, 0)) == ULONG_MAX
|| !ec || *ec)
continue;
/*
@@ -297,7 +297,7 @@ get_locks(p)
for (lp = LckH[h]; lp; lp = lp->next) {
if (lp->pid == pid
&& lp->dev == dev
- && lp->inode == (INODETYPE)inode
+ && lp->inode == inode
&& lp->type == type)
break;
}
@@ -307,14 +307,15 @@ get_locks(p)
* Allocate a new llock structure and link it to the PID hash bucket.
*/
if (!(lp = (struct llock *)malloc(sizeof(struct llock)))) {
+ (void) snpf(buf, sizeof(buf), InodeFmt_d, inode);
(void) fprintf(stderr,
- "%s: can't allocate llock: PID %d; dev %x; inode %ld\n",
- Pn, pid, (int)dev, inode);
+ "%s: can't allocate llock: PID %d; dev %x; inode %s\n",
+ Pn, pid, (int)dev, buf);
Exit(1);
}
lp->pid = pid;
lp->dev = dev;
- lp->inode = (INODETYPE)inode;
+ lp->inode = inode;
lp->type = type;
lp->next = LckH[h];
LckH[h] = lp;
diff -up lsof_4.78C-rh/dialects/linux/dproc.c.inode lsof_4.78C-rh/dialects/linux/dproc.c
--- lsof_4.78C-rh/dialects/linux/dproc.c.inode 2007-10-03 14:01:54.000000000 +0200
+++ lsof_4.78C-rh/dialects/linux/dproc.c 2007-10-03 14:01:54.000000000 +0200
@@ -41,6 +41,9 @@ static char *rcsid = "$Id: dproc.c,v 1.1
#include <selinux/selinux.h>
#endif /* defined(HASSELINUX) */
+#if !defined(ULLONG_MAX)
+#define ULLONG_MAX 18446744073709551615ULL
+#endif /* !defined(ULLONG_MAX) */
/*
* Local definitions
@@ -790,7 +793,10 @@ process_proc_map(p, s, ss)
dev = (dev_t)makedev((int)maj, (int)min);
if (!fp[5] || !*fp[5])
continue;
- inode = (INODETYPE)atoi(fp[5]);
+ ep = (char *)NULL;
+ if ((inode = strtoull(fp[5], &ep, 0)) == ULLONG_MAX
+ || !ep || *ep)
+ continue;
if (!dev && !inode)
continue;
/*
diff -up lsof_4.78C-rh/dialects/linux/dsock.c.inode lsof_4.78C-rh/dialects/linux/dsock.c
--- lsof_4.78C-rh/dialects/linux/dsock.c.inode 2006-06-12 19:10:05.000000000 +0200
+++ lsof_4.78C-rh/dialects/linux/dsock.c 2007-10-03 14:02:39.000000000 +0200
@@ -350,7 +350,8 @@ get_ax25(p)
FILE *as;
char buf[MAXPATHLEN], *da, *dev_ch, *ep, **fp, *sa;
int h, nf;
- unsigned long inode, rq, sq, state;
+ INODETYPE inode;
+ unsigned long rq, sq, state;
MALLOC_S len;
unsigned char rqs, sqs;
/*
@@ -410,12 +411,12 @@ get_ax25(p)
*/
ep = (char *)NULL;
if (!fp[23] || !*fp[23]
- || (inode = strtoul(fp[23], &ep, 0)) == ULONG_MAX
+ || (inode = strtoull(fp[23], &ep, 0)) == ULONG_MAX
|| !ep || *ep)
continue;
h = INOHASH((INODETYPE)inode);
for (ap = AX25sin[h]; ap; ap = ap->next) {
- if ((INODETYPE)inode == ap->inode)
+ if (inode == ap->inode)
break;
}
if (ap)
@@ -496,7 +497,7 @@ get_ax25(p)
}
ap->da = da;
ap->dev_ch = dev_ch;
- ap->inode = (INODETYPE)inode;
+ ap->inode = inode;
ap->rq = rq;
ap->rqs = rqs;
ap->sa = sa;
@@ -521,7 +522,8 @@ get_ipx(p)
char buf[MAXPATHLEN], *ep, **fp, *la, *ra;
int fl = 1;
int h;
- unsigned long inode, rxq, state, txq;
+ INODETYPE inode;
+ unsigned long rxq, state, txq;
struct ipxsin *ip, *np;
MALLOC_S len;
FILE *xs;
@@ -588,12 +590,12 @@ get_ipx(p)
*/
ep = (char *)NULL;
if (!fp[6] || !*fp[6]
- || (inode = strtoul(fp[6], &ep, 0)) == ULONG_MAX
+ || (inode = strtoull(fp[6], &ep, 0)) == ULONG_MAX
|| !ep || *ep)
continue;
- h = INOHASH((INODETYPE)inode);
+ h = INOHASH(inode);
for (ip = Ipxsin[h]; ip; ip = ip->next) {
- if ((INODETYPE)inode == ip->inode)
+ if (inode == ip->inode)
break;
}
if (ip)
@@ -653,7 +655,7 @@ get_ipx(p)
Pn, sizeof(struct ipxsin));
Exit(1);
}
- ip->inode = (INODETYPE)inode;
+ ip->inode = inode;
ip->la = la;
ip->ra = ra;
ip->txq = txq;
@@ -676,7 +678,7 @@ get_raw(p)
{
char buf[MAXPATHLEN], *ep, **fp, *la, *ra, *sp;
int h;
- unsigned long inode;
+ INODETYPE inode;
int nf = 12;
struct rawsin *np, *rp;
MALLOC_S lal, ral, spl;
@@ -741,12 +743,12 @@ get_raw(p)
*/
ep = (char *)NULL;
if (!fp[9] || !*fp[9]
- || (inode = strtoul(fp[9], &ep, 0)) == ULONG_MAX
+ || (inode = strtoull(fp[9], &ep, 0)) == ULONG_MAX
|| !ep || *ep)
continue;
- h = INOHASH((INODETYPE)inode);
+ h = INOHASH(inode);
for (rp = Rawsin[h]; rp; rp = rp->next) {
- if ((INODETYPE)inode == rp->inode)
+ if (inode == rp->inode)
break;
}
if (rp)
@@ -800,7 +802,7 @@ get_raw(p)
Pn, sizeof(struct rawsin));
Exit(1);
}
- rp->inode = (INODETYPE)inode;
+ rp->inode = inode;
rp->la = la;
rp->lal = lal;
rp->ra = ra;
@@ -825,9 +827,10 @@ get_tcpudp(p, pr, clr)
int clr; /* 1 == clear the table */
{
char buf[MAXPATHLEN], *ep, **fp;
- unsigned long faddr, fport, inode, laddr, lport, rxq, state, txq;
+ unsigned long faddr, fport, laddr, lport, rxq, state, txq;
int h, nf;
FILE *fs;
+ INODETYPE inode;
struct tcp_udp *np, *tp;
/*
* Delete previous table contents. Allocate a table for the first time.
@@ -902,7 +905,7 @@ get_tcpudp(p, pr, clr)
|| (fport = strtoul(fp[4], &ep, 16)) == ULONG_MAX || !ep || *ep)
continue;
/*
- * Get the state, queue sizes, and inode.
+ * Get the state and queue sizes.
*/
ep = (char *)NULL;
if (!fp[5] || !*fp[5]
@@ -921,11 +924,11 @@ get_tcpudp(p, pr, clr)
*/
ep = (char *)NULL;
if (!fp[13] || !*fp[13]
- || (inode = strtoul(fp[13], &ep, 0)) == ULONG_MAX || !ep || *ep)
+ || (inode = strtoull(fp[13], &ep, 0)) == ULONG_MAX || !ep || *ep)
continue;
- h = INOHASH((INODETYPE)inode);
+ h = INOHASH(inode);
for (tp = TcpUdp[h]; tp; tp = tp->next) {
- if (tp->inode == (INODETYPE)inode)
+ if (tp->inode == inode)
break;
}
if (tp)
@@ -939,7 +942,7 @@ get_tcpudp(p, pr, clr)
Pn, sizeof(struct tcp_udp));
Exit(1);
}
- tp->inode = (INODETYPE)inode;
+ tp->inode = inode;
tp->faddr = faddr;
tp->fport = (int)(fport & 0xffff);
tp->laddr = laddr;
@@ -966,7 +969,7 @@ get_raw6(p)
{
char buf[MAXPATHLEN], *ep, **fp, *la, *ra, *sp;
int h;
- unsigned long inode;
+ INODETYPE inode;
int nf = 12;
struct rawsin *np, *rp;
MALLOC_S lal, ral, spl;
@@ -1031,12 +1034,12 @@ get_raw6(p)
*/
ep = (char *)NULL;
if (!fp[9] || !*fp[9]
- || (inode = strtoul(fp[9], &ep, 0)) == ULONG_MAX
+ || (inode = strtoull(fp[9], &ep, 0)) == ULONG_MAX
|| !ep || *ep)
continue;
- h = INOHASH((INODETYPE)inode);
+ h = INOHASH(inode);
for (rp = Rawsin6[h]; rp; rp = rp->next) {
- if ((INODETYPE)inode == rp->inode)
+ if (inode == rp->inode)
break;
}
if (rp)
@@ -1090,7 +1093,7 @@ get_raw6(p)
Pn, sizeof(struct rawsin));
Exit(1);
}
- rp->inode = (INODETYPE)inode;
+ rp->inode = inode;
rp->la = la;
rp->lal = lal;
rp->ra = ra;
@@ -1116,9 +1119,10 @@ get_tcpudp6(p, pr, clr)
{
char buf[MAXPATHLEN], *ep, **fp;
struct in6_addr faddr, laddr;
- unsigned long fport, inode, lport, rxq, state, txq;
+ unsigned long fport, lport, rxq, state, txq;
int h, nf;
FILE *fs;
+ INODETYPE inode;
struct tcp_udp6 *np6, *tp6;
/*
* Delete previous table contents. Allocate a table for the first time.
@@ -1189,7 +1193,7 @@ get_tcpudp6(p, pr, clr)
|| (fport = strtoul(fp[4], &ep, 16)) == ULONG_MAX || !ep || *ep)
continue;
/*
- * Get the state, queue sizes, and inode.
+ * Get the state and queue sizes.
*/
ep = (char *)NULL;
if (!fp[5] || !*fp[5]
@@ -1208,11 +1212,11 @@ get_tcpudp6(p, pr, clr)
*/
ep = (char *)NULL;
if (!fp[13] || !*fp[13]
- || (inode = strtoul(fp[13], &ep, 0)) == ULONG_MAX || !ep || *ep)
+ || (inode = strtoull(fp[13], &ep, 0)) == ULONG_MAX || !ep || *ep)
continue;
- h = INOHASH((INODETYPE)inode);
+ h = INOHASH(inode);
for (tp6 = TcpUdp6[h]; tp6; tp6 = tp6->next) {
- if (tp6->inode == (INODETYPE)inode)
+ if (tp6->inode == inode)
break;
}
if (tp6)
@@ -1226,7 +1230,7 @@ get_tcpudp6(p, pr, clr)
Pn, sizeof(struct tcp_udp6));
Exit(1);
}
- tp6->inode = (INODETYPE)inode;
+ tp6->inode = inode;
tp6->faddr = faddr;
tp6->fport = (int)(fport & 0xffff);
tp6->laddr = laddr;
@@ -1254,7 +1258,7 @@ get_unix(p)
char buf[MAXPATHLEN], *ep, **fp, *path, *pcb;
int fl = 1;
int h, nf;
- unsigned long inode;
+ INODETYPE inode;
MALLOC_S len;
struct uxsin *np, *up;
FILE *us;
@@ -1319,11 +1323,11 @@ get_unix(p)
*/
ep = (char *)NULL;
if (!fp[6] || !*fp[6]
- || (inode = strtoul(fp[6], &ep, 0)) == ULONG_MAX || !ep || *ep)
+ || (inode = strtoull(fp[6], &ep, 0)) == ULONG_MAX || !ep || *ep)
continue;
- h = INOHASH((INODETYPE)inode);
+ h = INOHASH(inode);
for (up = Uxsin[h]; up; up = up->next) {
- if ((INODETYPE)inode == up->inode)
+ if (inode == up->inode)
break;
}
if (up)
@@ -1362,7 +1366,7 @@ get_unix(p)
Pn, sizeof(struct uxsin));
Exit(1);
}
- up->inode = (INODETYPE)inode;
+ up->inode = inode;
up->pcb = pcb;
up->sb_def = 0;
if ((up->path = path) && (*path == '/')) {

View File

@ -1,113 +0,0 @@
diff -up lsof_4.78C-rh/proc.c.selinux lsof_4.78C-rh/proc.c
--- lsof_4.78C-rh/proc.c.selinux 2006-06-12 19:10:02.000000000 +0200
+++ lsof_4.78C-rh/proc.c 2007-10-03 12:15:57.000000000 +0200
@@ -968,7 +968,7 @@ print_proc()
#endif /* defined(HASZONES) */
#if defined(HASSELINUX)
- if (FieldSel[LSOF_FIX_CNTX].st && Fcntx && Lp->cntx)
+ if (FieldSel[LSOF_FIX_CNTX].st && Fcntx && Lp->cntx && CntxStatus)
(void) printf("%c%s%c", LSOF_FID_CNTX, Lp->cntx, Terminator);
#endif /* defined(HASSELINUX) */
diff -up lsof_4.78C-rh/store.c.selinux lsof_4.78C-rh/store.c
--- lsof_4.78C-rh/store.c.selinux 2006-06-12 19:10:03.000000000 +0200
+++ lsof_4.78C-rh/store.c 2007-10-03 12:15:57.000000000 +0200
@@ -70,7 +70,9 @@ lsof_rx_t *CmdRx = (lsof_rx_t *)NULL;
cntxlist_t *CntxArg = (cntxlist_t *)NULL;
/* security context arguments supplied with
* -Z */
-int CntxColW; /* security context column width */
+int CntxColW; /* security context column width */
+int CntxStatus = 0; /* security context status: 0 == disabled,
+ * 1 == enabled */
#endif /* defined(HASSELINUX) */
#if defined(HASDCACHE)
diff -up lsof_4.78C-rh/dialects/linux/dproc.c.selinux lsof_4.78C-rh/dialects/linux/dproc.c
--- lsof_4.78C-rh/dialects/linux/dproc.c.selinux 2007-10-03 12:15:57.000000000 +0200
+++ lsof_4.78C-rh/dialects/linux/dproc.c 2007-10-03 12:17:22.000000000 +0200
@@ -468,7 +468,7 @@ gather_proc_info()
Lp->cntx = (char *)NULL;
if (!Fwarn) {
(void) snpf(nmabuf, sizeof(nmabuf),
- "(getpidcon: %s)\n", strerror(errno));
+ "(getpidcon: %s)", strerror(errno));
if (!(Lp->cntx = strdup(nmabuf))) {
(void) fprintf(stderr,
"%s: no context error space: PID %ld",
diff -up lsof_4.78C-rh/usage.c.selinux lsof_4.78C-rh/usage.c
--- lsof_4.78C-rh/usage.c.selinux 2006-06-12 19:10:03.000000000 +0200
+++ lsof_4.78C-rh/usage.c 2007-10-03 12:15:57.000000000 +0200
@@ -787,7 +788,10 @@ usage(xv, fh, version)
continue;
#endif /* !defined(HASZONES) */
-#if !defined(HASSELINUX)
+#if defined(HASSELINUX)
+ if ((FieldSel[i].id == LSOF_FID_CNTX) && !CntxStatus)
+ continue;
+#else /* !defined(HASSELINUX) */
if (FieldSel[i].id == LSOF_FID_CNTX)
continue;
#endif /* !defined(HASSELINUX) */
diff -up lsof_4.78C-rh/main.c.selinux lsof_4.78C-rh/main.c
--- lsof_4.78C-rh/main.c.selinux 2006-06-12 19:10:02.000000000 +0200
+++ lsof_4.78C-rh/main.c 2007-10-03 12:15:57.000000000 +0200
@@ -84,14 +84,20 @@ main(argc, argv)
int version = 0;
int xover = 0;
-#if defined(HASSELINUX)
- cntxlist_t *cntxp;
-#endif /* defined(HASSELINUX) */
-
#if defined(HASZONES)
znhash_t *zp;
#endif /* defined(HASZONES) */
+#if defined(HASSELINUX)
+/*
+ * This stanza must be immediately before the "Save progam name." code, since
+ * it contains code itself.
+ */
+ cntxlist_t *cntxp;
+
+ CntxStatus = is_selinux_enabled() ? 1 : 0;
+#endif /* defined(HASSELINUX) */
+
/*
* Save program name.
*/
@@ -414,7 +420,10 @@ main(argc, argv)
continue;
#endif /* !defined(HASZONES) */
-#if !defined(HASSELINUX)
+#if defined(HASSELINUX)
+ if ((FieldSel[i].id == LSOF_FID_CNTX) && !CntxStatus)
+ continue;
+#else /* !defined(HASSELINUX) */
if (FieldSel[i].id == LSOF_FID_CNTX)
continue;
#endif /* !defined(HASSELINUX) */
@@ -822,7 +831,7 @@ main(argc, argv)
#if defined(HASSELINUX)
case 'Z':
- if (!is_selinux_enabled()) {
+ if (!CntxStatus) {
(void) fprintf(stderr, "%s: -Z limited to SELinux\n", Pn);
err = 1;
} else {
diff -up lsof_4.78C-rh/lsof.h.selinux lsof_4.78C-rh/lsof.h
--- lsof_4.78C-rh/lsof.h.selinux 2006-06-12 19:10:02.000000000 +0200
+++ lsof_4.78C-rh/lsof.h 2007-10-03 12:15:57.000000000 +0200
@@ -548,6 +548,7 @@ typedef struct cntxlist {
struct cntxlist *next; /* next zone hash entry */
} cntxlist_t;
extern cntxlist_t *CntxArg;
+extern int CntxStatus;
# endif /* defined(HASSELINUX) */
# if defined(HASDCACHE)

View File

@ -1,8 +1,9 @@
--- lsof_4.78C-rh/dialects/linux/dproc.c.kzak 2006-06-12 19:10:05.000000000 +0200
+++ lsof_4.78C-rh/dialects/linux/dproc.c 2006-08-10 00:14:23.000000000 +0200
@@ -69,7 +69,8 @@
_PROTOTYPE(static int read_proc_stat,(char *p, int pid, char **cmd, int *ppid,
int *pgid));
diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dproc.c
--- lsof_4.80-rh/dialects/linux/dproc.c.th 2008-04-15 15:32:34.000000000 +0200
+++ lsof_4.80-rh/dialects/linux/dproc.c 2008-05-20 01:21:39.000000000 +0200
@@ -84,7 +84,8 @@ _PROTOTYPE(static void process_proc_map,
_PROTOTYPE(static int process_id,(char *idp, int idpl, char *cmd, UID_ARG uid,
int pid, int ppid, int pgid));
_PROTOTYPE(static int statEx,(char *p, struct stat *s, int *ss));
-
+_PROTOTYPE(static int get_other_thread,(int pid, char **tid));
@ -10,17 +11,17 @@
#if defined(HASSELINUX)
_PROTOTYPE(static int cmp_cntx_eq,(char *pcntx, char *ucntx));
@@ -148,6 +149,7 @@
static char *path = (char *)NULL;
static int pathl = 0;
int pgid, pid, ppid;
@@ -154,6 +155,7 @@ gather_proc_info()
struct dirent *dp;
struct stat sb;
int lwp, n, nl, pgid, pid, ppid, rv, tx;
+ char *tid = NULL;
static char *pidpath = (char *)NULL;
static MALLOC_S pidpathl = 0;
static MALLOC_S pidx = 0;
@@ -253,6 +255,13 @@
}
if (f)
static char *lwppath = (char *)NULL;
static int lwppathl = 0;
static char *path = (char *)NULL;
@@ -246,6 +248,13 @@ gather_proc_info()
while ((dp = readdir(ps))) {
if (nm2id(dp->d_name, &pid, &n))
continue;
+
+ tid = NULL;
@ -32,7 +33,7 @@
/*
* Build path to PID's directory.
*/
@@ -266,7 +275,14 @@
@@ -259,7 +268,14 @@ gather_proc_info()
Exit(1);
}
}
@ -48,8 +49,8 @@
n += (pidx + 1);
/*
* Process the PID's stat info.
@@ -897,6 +913,64 @@
(void) fclose(ms);
@@ -1016,6 +1032,64 @@ process_id(idp, idpl, cmd, uid, pid, ppi
return(0);
}
+/* fill tid if the initial thread is zombie,
@ -112,15 +113,15 @@
+}
/*
* read_proc_stat() - read process status
@@ -931,12 +1005,6 @@
if ((nf = get_fields(buf, (char *)NULL, &fp, (int *)NULL, 0)) < 5)
* process_proc_map() - process the memory map of a process
@@ -1259,12 +1333,6 @@ read_id_stat(ty, p, id, cmd, ppid, pgid)
return(1);
}
/*
- * Convert the first field to an integer; its conversion must match the
- * PID argument.
- * ID argument.
- */
- if (atoi(fp[0]) != pid)
- if (!fp[0] || (atoi(fp[0]) != id))
- return(1);
-/*
* Get the command name from the second field. Strip a starting '(' and

View File

@ -1 +1 @@
6a604dacc4544486634d5421f7d6d31b lsof_4.78C-rh.tar.bz2
f5db1a8e2cb8337ed043ca68178955e6 lsof_4.80-rh.tar.bz2

View File

@ -10,13 +10,13 @@
#
UPSTREAM="$1"
NAME=$(basename $UPSTREAM .tar.gz)
NAME=$(basename $UPSTREAM .tar.bz2)
MYPWD=$(pwd)
TMP=$(mktemp -d)
echo
echo -n "Extracting upstream code..."
tar -zxf $UPSTREAM -C $TMP
tar -jxf $UPSTREAM -C $TMP
cd $TMP/$NAME
tar xf "$NAME"_src.tar
echo " done."