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

View File

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

3
NEWS
View File

@ -1,7 +1,8 @@
procps-3.2.1 --> procps-3.2.2 procps-3.2.1 --> procps-3.2.2
new packager (downstream maintainer) guidelines in README
move striping from install command to CFLAGS 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 avoid warning about -lncurses when not linking -- thanks FLWM
tolerate IA-64 headers without PAGE_SIZE tolerate IA-64 headers without PAGE_SIZE
ps: k option, same as --sort ps: k option, same as --sort

34
README
View File

@ -29,13 +29,41 @@ INSTALLATION
Suppose you wanted to install stuff in strange places. Suppose you wanted to install stuff in strange places.
You might do something like this: 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 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=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 BUG REPORTS

View File

@ -1,15 +1,15 @@
Begin4 Begin4
Title: procps Title: procps
Version: 3.2.1 Version: 3.2.2
Entered-date: 2004-3-26 Entered-date: 2004-7-15
Description: Linux system utilities 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 free w top vmstat watch skill snice kill pgrep pkill
Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc. Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc.
Maintained-by: various <procps-feedback@lists.sf.net> Maintained-by: various <procps-feedback@lists.sf.net>
Primary-site: http://procps.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 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 Copying-policy: mixed
End End

View File

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

View File

@ -412,7 +412,7 @@ static int Preload(const char *restrict const filename) {
* Main... * Main...
* *
*/ */
int main(int argc, char **argv) { int main(int argc, char *argv[]) {
const char *me = (const char *)basename(argv[0]); const char *me = (const char *)basename(argv[0]);
bool SwitchesAllowed = true; bool SwitchesAllowed = true;
bool WriteMode = false; bool WriteMode = false;
@ -453,6 +453,8 @@ int main(int argc, char **argv) {
PrintName = false; PrintName = false;
break; break;
case 'e': 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; IgnoreError = true;
break; break;
case 'N': case 'N':
@ -462,6 +464,7 @@ int main(int argc, char **argv) {
SwitchesAllowed = false; SwitchesAllowed = false;
WriteMode = true; WriteMode = true;
break; break;
case 'f': // the NetBSD way
case 'p': case 'p':
argv++; argv++;
if (argv && *argv && **argv) { if (argv && *argv && **argv) {
@ -471,15 +474,20 @@ int main(int argc, char **argv) {
case 'q': case 'q':
Quiet = true; Quiet = true;
break; break;
case 'a': /* string and integer values (for Linux, all of them) */ case 'o': // BSD: binary values too, 1st 16 bytes in hex
case 'A': /* the above, including "opaques" (would be unprintable) */ case 'x': // BSD: binary values too, whole thing in hex
case 'X': /* the above, with opaques completly printed 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; SwitchesAllowed = false;
return DisplayAll(PROC_PATH); return DisplayAll(PROC_PATH);
case 'V': case 'V':
fprintf(stdout, "sysctl (%s)\n",procps_version); fprintf(stdout, "sysctl (%s)\n",procps_version);
exit(0); 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 '?': case '?':
return Usage(me); return Usage(me);
default: default:
@ -490,7 +498,7 @@ int main(int argc, char **argv) {
if (NameOnly && Quiet) // nonsense if (NameOnly && Quiet) // nonsense
return Usage(me); return Usage(me);
SwitchesAllowed = false; SwitchesAllowed = false;
if (WriteMode) if (WriteMode || index(*argv, '='))
ReturnCode = WriteSetting(*argv); ReturnCode = WriteSetting(*argv);
else else
ReturnCode = ReadSetting(*argv); ReturnCode = ReadSetting(*argv);