new packager guidelines

This commit is contained in:
albert 2004-07-17 15:25:45 +00:00
parent 0bdf88ffac
commit deae025969
7 changed files with 57 additions and 26 deletions

View File

@ -4,7 +4,6 @@ pmap
*.o
free
kill
oldps
pgrep
pkill
slabtop
@ -23,11 +22,6 @@ vmstat
w
watch
Makefile
libtool
*.tar.gz
config.h
config.status
config.log
config.cache
.deps
.libs

View File

@ -1,5 +1,5 @@
# procps Makefile
# Albert Cahalan, 2002-2003
# Albert Cahalan, 2002-2004
#
# Recursive make is considered harmful:
# http://google.com/search?q=%22recursive+make+considered+harmful%22
@ -18,9 +18,9 @@
VERSION := 3
SUBVERSION := 2
MINORVERSION := 1
TARVERSION := 3.2.1
LIBVERSION := 3.2.1
MINORVERSION := 2
TARVERSION := 3.2.2
LIBVERSION := 3.2.2
############ vars

3
NEWS
View File

@ -1,7 +1,8 @@
procps-3.2.1 --> procps-3.2.2
new packager (downstream maintainer) guidelines in README
move striping from install command to CFLAGS
now using gcc -fweb and -frename-registers options
new gcc options in use: -fweb, -frename-registers, etc.
avoid warning about -lncurses when not linking -- thanks FLWM
tolerate IA-64 headers without PAGE_SIZE
ps: k option, same as --sort

34
README
View File

@ -29,13 +29,41 @@ INSTALLATION
Suppose you wanted to install stuff in strange places.
You might do something like this:
make usr/bin=/tmp/Q/iii/ DESTDIR=/tmp/Q install="install -D" ldconfig=echo install
make usr/bin=/tmp/Q/i/ DESTDIR=/tmp/Q install="install -D" ldconfig=echo install
If cross-compiling, you might need to set lib64 to
either "lib" or "lib64", like one of these examples:
either "lib" or "lib64". You might need to set m64 to
-m64, -m32, or nothing at all. Some examples:
make lib64=lib CFLAGS="-O2 -m32"
make lib64=lib m64=-m32 # for a bi-arch gcc
make lib64=lib64 CC=x86_64-gcc
make lib64=lib CC=alpha-gcc
PACKAGING
If you are a downstream maintainer (packager) for a Linux distribution,
please avoid causing troubles. This section applies to you.
Send patches in regularly. Many patches made by vendors have been buggy,
some quite severely so. Sending in a patch will at least get it reviewed,
if not included. There is a procps test suite that must be passed.
Forward all bug reports. If your bug database is public and busy enough
to bother with, please make this known. Follow Debian's lead in making
the bug database easy to comment on via email w/o need for an account.
Do not change the user interface. Many of the programs are intended to be
compatible with Solaris, FreeBSD, AIX, IRIX, Tru64, and the UNIX standard.
Your nice new command options WILL BE BROKEN as needed to ensure that
procps remains compatible with the rest of the world. Sysadmins hate to
deal with incompatible behavior. If you need a new option, ask for it.
For normal packages, ensure that you do not add debugging flags
to the CFLAGS variable. If debugging flags are present, the Makefile
will avoid adding several optimizations that would interfere with gdb.
There should be no need to modify the Makefile. You can set variables
on the "make" command line or use "make -e" to pass variables from
the environment.
BUG REPORTS

View File

@ -1,15 +1,15 @@
Begin4
Title: procps
Version: 3.2.1
Entered-date: 2004-3-26
Version: 3.2.2
Entered-date: 2004-7-15
Description: Linux system utilities
Keywords: procps /proc libproc sysctl pmap ps uptime tload
Keywords: procps /proc libproc sysctl pmap ps uptime tload slabtop
free w top vmstat watch skill snice kill pgrep pkill
Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc.
Maintained-by: various <procps-feedback@lists.sf.net>
Primary-site: http://procps.sf.net/
242kB procps-3.2.1.tar.gz
261kB procps-3.2.2.tar.gz
Alternate-site: http://www.debian.org/Packages/unstable/base/procps.html
242kB procps-3.2.1.tar.gz
261kB procps-3.2.2.tar.gz
Copying-policy: mixed
End

View File

@ -3,7 +3,7 @@ Summary: System and process monitoring utilities
Name: procps
%define major_version 3
%define minor_version 2
%define revision 1
%define revision 2
%define version %{major_version}.%{minor_version}.%{revision}
Version: %{version}
Release: 1

View File

@ -412,7 +412,7 @@ static int Preload(const char *restrict const filename) {
* Main...
*
*/
int main(int argc, char **argv) {
int main(int argc, char *argv[]) {
const char *me = (const char *)basename(argv[0]);
bool SwitchesAllowed = true;
bool WriteMode = false;
@ -453,6 +453,8 @@ int main(int argc, char **argv) {
PrintName = false;
break;
case 'e':
// For FreeBSD, -e means a "%s=%s\n" format. ("%s: %s\n" default)
// We (and NetBSD) use "%s = %s\n" always, and -e to ignore errors.
IgnoreError = true;
break;
case 'N':
@ -462,6 +464,7 @@ int main(int argc, char **argv) {
SwitchesAllowed = false;
WriteMode = true;
break;
case 'f': // the NetBSD way
case 'p':
argv++;
if (argv && *argv && **argv) {
@ -471,15 +474,20 @@ int main(int argc, char **argv) {
case 'q':
Quiet = true;
break;
case 'a': /* string and integer values (for Linux, all of them) */
case 'A': /* the above, including "opaques" (would be unprintable) */
case 'X': /* the above, with opaques completly printed in hex */
case 'o': // BSD: binary values too, 1st 16 bytes in hex
case 'x': // BSD: binary values too, whole thing in hex
/* does nothing */ ;
break;
case 'a': // string and integer values (for Linux, all of them)
case 'A': // same as -a -o
case 'X': // same as -a -x
SwitchesAllowed = false;
return DisplayAll(PROC_PATH);
case 'V':
fprintf(stdout, "sysctl (%s)\n",procps_version);
exit(0);
case 'h':
case 'd': // BSD: print description ("vm.kvm_size: Size of KVM")
case 'h': // BSD: human-readable (did FreeBSD 5 make -e default?)
case '?':
return Usage(me);
default:
@ -490,7 +498,7 @@ int main(int argc, char **argv) {
if (NameOnly && Quiet) // nonsense
return Usage(me);
SwitchesAllowed = false;
if (WriteMode)
if (WriteMode || index(*argv, '='))
ReturnCode = WriteSetting(*argv);
else
ReturnCode = ReadSetting(*argv);