automatic rebuild by autodist [release 18-4mamba;Tue Aug 27 2013]

This commit is contained in:
Automatic Build System 2024-01-06 10:32:20 +01:00
parent bf510ec43a
commit bdb959b292
7 changed files with 240 additions and 0 deletions

View File

@ -1,2 +1,7 @@
# procinfo
The procinfo command gets system data from the /proc directory (a Linux kernel filesystem), formats it and displays it on standard output.
You can use procinfo to acquire information about your system from the kernel as it is running.
Install procinfo if you'd like to use it to gather and display system data.

43
procinfo-17-lsdev.patch Normal file
View File

@ -0,0 +1,43 @@
--- procinfo-17/lsdev.pl.broken Thu Nov 16 13:38:17 2000
+++ procinfo-17/lsdev.pl Thu Nov 16 13:48:42 2000
@@ -16,6 +16,7 @@
while (<IRQ>) {
next if /^[ \t]*[A-Z]/;
chop;
+ s/^ +//g;
if (/PIC/) {
$n = (@line = split());
} else {
@@ -32,6 +33,7 @@
open (DMA, "</proc/dma") || die "can't open /proc/dma";
while (<DMA>) {
chop;
+ s/^ +//g;
@line = split(': ');
@tmp = split (/[ \(]/, $line[1]);
$name = $tmp[0];
@@ -43,6 +45,7 @@
open (IOPORTS, "</proc/ioports") || die "can't open /proc/ioports";
while (<IOPORTS>) {
chop;
+ s/^ +//g;
@line = split(' : ');
@tmp = split (/[ \(]/, $line[1]);
$name = $tmp[0];
@@ -51,12 +54,12 @@
}
close (IOPORTS);
-printf ("%-16s %4s%6s %s\n------------------------------------------------\n",
- "Device", "DMA", "IRQ", " I/O Ports");
+printf "%-16s %4s%6s %s\n------------------------------------------------\n",
+ "Device", "DMA", "IRQ", " I/O Ports";
foreach $name (sort { uc($a) cmp uc($b) } keys %device) {
- printf ("%-16s %4s%6s %s\n",
- $name, $dma{$name}, $irq{$name}, $port{$name});
+ printf "%-16s %4s%6s %s\n",
+ $name, $dma{$name}, $irq{$name}, $port{$name};
}
# The End ####################################################################

33
procinfo-17-uptime.patch Normal file
View File

@ -0,0 +1,33 @@
--- procinfo-17/routines.c.uptime Thu Nov 16 14:21:02 2000
+++ procinfo-17/routines.c Thu Nov 16 14:30:37 2000
@@ -390,19 +390,19 @@
unsigned int d, h, m, s;
static char buf[22];
- t = t * 100 / HZ;
- d = (int) (t / 8640000);
- t = t - (long) (d * 8640000);
- h = (int) (t / 360000);
- t = t - (long) (h * 360000);
- m = (int) (t / 6000);
- t = t - (long) (m * 6000);
- s = (int) (t / 100);
- t = t - (long) (s * 100);
+ t *= (100 / HZ);
+ d = (unsigned int) (t / 8640000);
+ t -= (unsigned long) (d * 8640000);
+ h = (unsigned int) (t / 360000);
+ t -= (unsigned long) (h * 360000);
+ m = (unsigned int) (t / 6000);
+ t -= (unsigned long) (m * 6000);
+ s = (unsigned int) (t / 100);
+ t -= (unsigned long) (s * 100);
if (d > 0)
- sprintf (buf, "%3ud %2u:%02u:%02u.%02u", d, h, m, s, (int) t);
+ sprintf (buf, "%3ud %2u:%02u:%02u.%02u", d, h, m, s, (unsigned int) t);
else
- sprintf (buf, " %2u:%02u:%02u.%02u", h, m, s, (int) t);
+ sprintf (buf, " %2u:%02u:%02u.%02u", h, m, s, (unsigned int) t);
return buf;
}

28
procinfo-18-maxdev.patch Normal file
View File

@ -0,0 +1,28 @@
--- procinfo-18/procinfo.h.maxdev 2004-12-16 18:02:26.000000000 +0100
+++ procinfo-18/procinfo.h 2004-12-17 11:18:11.239523416 +0100
@@ -69,10 +69,10 @@
#define CDRV 0
#define BDRV 1
#ifndef MAX_CHRDEV
-#define MAX_CHRDEV 32
+#define MAX_CHRDEV 512
#endif
#ifndef MAX_BLKDEV
-#define MAX_BLKDEV 32
+#define MAX_BLKDEV 512
#endif
#define MAX_DEV MAX(MAX_CHRDEV, MAX_BLKDEV)
--- procinfo-18/procinfo.c.maxdev 2004-12-17 11:19:52.421141472 +0100
+++ procinfo-18/procinfo.c 2004-12-17 11:20:49.312492672 +0100
@@ -613,7 +613,9 @@
printf ("%s\nCharacter Devices: "
"Block Devices:\n",
fs ? ce : "");
- while (fgets (line, sizeof (line), devicesfp)) {
+ while (fgets (line, sizeof (line), devicesfp) &&
+ count[CDRV] < MAX_DEV &&
+ count[BDRV] < MAX_DEV) {
switch (line[0]) {
case 'C':
which = CDRV;

View File

@ -0,0 +1,23 @@
--- procinfo-18/procinfo.c.mharris-use-sysconf 2004-01-16 15:40:37.000000000 -0500
+++ procinfo-18/procinfo.c 2004-01-17 02:01:16.000000000 -0500
@@ -837,19 +837,7 @@
}
/* Count number of CPUs */
- cpuinfofp = myfopen (PROC_DIR "cpuinfo");
- if (cpuinfofp) {
- while (fgets (line, sizeof (line), cpuinfofp))
- if (!strncmp ("processor", line, 9)) /* intel */
- nr_cpus++;
- else if (!strncmp ("ncpus ", line, 6)) /* sparc */
- nr_cpus = atoi(line+19);
- else if (!strncmp ("cpus detected", line, 13)) /* alpha */
- nr_cpus = atoi(line+27);
- fclose (cpuinfofp);
- }
- if (nr_cpus == 0)
- nr_cpus = 1;
+ nr_cpus = sysconf (_SC_NPROCESSORS_ONLN);
/* Gets called from winsz(), but in case stdout is redirected: */
version = make_version (versionfp);

View File

@ -0,0 +1,39 @@
--- procinfo-18/Makefile 2001-02-25 00:29:53.000000000 +0100
+++ procinfo-18-fix/Makefile 2005-09-13 10:26:41.000000000 +0200
@@ -1,10 +1,12 @@
### Makefile for procinfo.
prefix=/usr
+bindir=$(prefix)/bin
+mandir=$(prefix)/share/man
CC = gcc -Wall -Wstrict-prototypes
-CFLAGS = -O2
+CFLAGS = $(RPM_OPT_FLAGS)
LDFLAGS = -s
# If you get lots of `undefined references', you probably need -lncurses
@@ -32,14 +34,14 @@
procinfo: procinfo.o routines.o
install: procinfo procinfo.8 lsdev.pl socklist.pl lsdev.8
- -mkdir -p $(prefix)/bin
- install procinfo $(prefix)/bin/procinfo
- install lsdev.pl $(prefix)/bin/lsdev
- install socklist.pl $(prefix)/bin/socklist
- -mkdir -p $(prefix)/man/man8
- install -m 644 procinfo.8 $(prefix)/man/man8/procinfo.8
- install -m 644 lsdev.8 $(prefix)/man/man8/lsdev.8
- install -m 644 socklist.8 $(prefix)/man/man8/socklist.8
+ -mkdir -p $(bindir)
+ install -m 755 procinfo $(bindir)/procinfo
+ install -m 755 lsdev.pl $(bindir)/lsdev
+ install -m 755 socklist.pl $(bindir)/socklist
+ -mkdir -p $(mandir)/man8
+ install -m 644 procinfo.8 $(mandir)/man8/procinfo.8
+ install -m 644 lsdev.8 $(mandir)/man8/lsdev.8
+ install -m 644 socklist.8 $(mandir)/man8/socklist.8
clean:
rm -f procinfo procinfo.0 *.o *~ out

69
procinfo.spec Normal file
View File

@ -0,0 +1,69 @@
Name: procinfo
Version: 18
Release: 4mamba
Summary: A tool for gathering and displaying system information
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: ftp://ftp.cistron.nl/pub/people/00-OLD/sandervm
Source: ftp://ftp.cistron.nl/pub/people/00-OLD/sandervm/%{name}-%{version}.tar.gz
Patch0: %{name}-17-lsdev.patch
Patch1: %{name}-17-uptime.patch
Patch2: %{name}-18.makeinstall.patch
Patch3: %{name}-18-maxdev.patch
Patch4: %{name}-18-mharris-use-sysconf.patch
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libncurses-devel
## AUTOBUILDREQ-END
%description
The procinfo command gets system data from the /proc directory (a Linux kernel filesystem), formats it and displays it on standard output.
You can use procinfo to acquire information about your system from the kernel as it is running.
Install procinfo if you'd like to use it to gather and display system data.
%prep
%setup -q
%patch0 -p1 -b .lsdev
%patch1 -p1 -b .uptime
%patch2 -p1 -b .makeinstall
%patch3 -p1 -b .maxdev
%patch4 -p1 -b .mharris-use-sysconf
%build
%make LDLIBS=-lncurses LDFLAGS=
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeoldinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/procinfo
%{_bindir}/lsdev
%{_bindir}/socklist
%{_mandir}/man8/procinfo.*
%{_mandir}/man8/lsdev.*
%{_mandir}/man8/socklist.*
%doc README CHANGES
%changelog
* Tue Aug 27 2013 Automatic Build System <autodist@mambasoft.it> 18-4mamba
- automatic rebuild by autodist
* Tue Sep 30 2008 Tiziana Ferro <tiziana.ferro@email.it> 18-3mamba
- update buildrequirements list
- format descripion
* Tue Sep 13 2005 Davide Madrisan <davide.madrisan@qilinux.it> 18-2qilnx
- specfile fixes
* Wed Apr 09 2003 Mirko Cortillaro <mirko.cortillaro@qinet.it> 18-1qilnx
- first build