getservbyname returns network ordered port.
CVS patchset: 2716 CVS date: 1999/01/19 16:02:44
This commit is contained in:
parent
06a29f2dd5
commit
fb49619ccf
|
@ -37,6 +37,11 @@ instead of a version number, you would do this:
|
|||
|
||||
Requires: somepackage =S 23
|
||||
|
||||
You can't continue a "Requires: " line. If you have multiple
|
||||
"Requires: " lines then the package requires all pacakges mentioned on
|
||||
all lines to be installed. Max line length is probably 8K.
|
||||
|
||||
|
||||
Virtual Packages
|
||||
----------------
|
||||
|
||||
|
@ -75,6 +80,42 @@ example, the libc-5.3.12 package has provides information added for
|
|||
libm.so.5 and libc.so.5. We expect this automatic dependency generation
|
||||
to eliminate the need for most packages to use explicit Requires: lines.
|
||||
|
||||
|
||||
Interpreters and Shells (to be implemented)
|
||||
-----------------------
|
||||
|
||||
Modules for interpreted languages like perl and tcl impose additional
|
||||
dependency requirements on packages. A script written for an interpreter
|
||||
often requires language specfic modules to be installed in order to execute
|
||||
correctly. In order to automatically detect langiage specific modules, each
|
||||
interpreter may have its own find-provides and find-requires. To prevent
|
||||
module name collisions between interpreters, module names are enclosed within
|
||||
parentheses and a conventional interpreter specific identifier is pre-pended:
|
||||
|
||||
|
||||
Provides: perl(MIME-Base64), perl(Mail-Header)-1-09
|
||||
|
||||
Requires: perl(Carp), perl(IO-Wrap) = 4.5
|
||||
|
||||
|
||||
The output of a per-interpreter find-requires (notice in this example the
|
||||
first requirement is a package and the rest are langague specific modules)
|
||||
|
||||
Mail-Header >= 1.01
|
||||
perl(Carp) >= 3.2
|
||||
perl(IO-Wrap) == 4.5 or perl(IO-Wrap)-4.5
|
||||
|
||||
the output from find-provides is
|
||||
Foo-0.9
|
||||
perl(Widget)-0-1
|
||||
|
||||
|
||||
The per-interpreter automatic module detectors will normally be located in
|
||||
/usr/lib/rpm/{perl,tcl}/find-{provides,requires}
|
||||
with appropriate per-interpreter hooks into
|
||||
/usr/lib/rpm/find-{provides,requires}
|
||||
|
||||
|
||||
Installing and Erasing Packages with Dependencies
|
||||
-------------------------------------------------
|
||||
|
||||
|
|
12
docs/macros
12
docs/macros
|
@ -48,11 +48,13 @@ was present using "%{-f:X}". This macro expands to (the expansion of) X
|
|||
if the flag was present. The negative form, "%{!-f:Y}", expanding to (the
|
||||
expansion of) Y if -f was *not* present, is also supported.
|
||||
|
||||
In addition to the "%{...}" form, shell expansion can be performed using
|
||||
"%(shell command)". The expansion of "%(...)" is the output of (the expansion
|
||||
of) ... fed to /bin/sh. For example, "%(date +%%y%%m%%d)" expands to the
|
||||
string "YYMMDD" (final newline is deleted). Note the 2nd % needed to escape
|
||||
the arguments to /bin/date.
|
||||
In addition to the "%{...}" form, shell expansion can be performed
|
||||
using "%(shell command)". The expansion of "%(...)" is the output of
|
||||
(the expansion of) ... fed to /bin/sh. For example, "%(date
|
||||
+%%y%%m%%d)" expands to the string "YYMMDD" (final newline is
|
||||
deleted). Note the 2nd % needed to escape the arguments to /bin/date.
|
||||
There is currently an 8K limit on the size that this macro can expand
|
||||
to.
|
||||
|
||||
Builtin Macros
|
||||
--------------
|
||||
|
|
|
@ -16,14 +16,22 @@ programs access *it* (and expect it to be in a certain place), etc.
|
|||
If you determine that the location of the package doesn't matter,
|
||||
then it can probably be built as "relocatable".
|
||||
|
||||
All you need to do to build a relocatable package is put:
|
||||
All you need to do to build a relocatable package is put one or more:
|
||||
|
||||
Prefix: <dir>
|
||||
|
||||
in your spec file. The "<dir>" will usually be something like "/usr",
|
||||
"/usr/local", or "/opt". Every file in your %files list must start
|
||||
with that prefix. For example, if you have "Prefix: /usr" and your
|
||||
%files list contains "/etc/foo.conf", the build will fail.
|
||||
%files list contains "/etc/foo.conf", the build will fail. The fix for
|
||||
this is to put
|
||||
|
||||
Prefix: /usr
|
||||
Prefix: /etc
|
||||
|
||||
into the spec file so that the /usr and /etc directories may be
|
||||
relocated separately when this package is installed.
|
||||
|
||||
|
||||
Installing Relocatable Packages
|
||||
-------------------------------
|
||||
|
@ -34,3 +42,12 @@ RPM install command line with "--prefix <dir>". For example, if
|
|||
the package in question were going to be installed in "/opt" but
|
||||
you don't have enough disk space there (and it is a relocatable
|
||||
package), you could install it "--prefix /usr/opt".
|
||||
|
||||
If there is more then one Prefix you may relocate each prefix
|
||||
separately by using syntax like:
|
||||
|
||||
rpm ... --relocate /opt=/usr/opt --relocate /etc=/usr/etc ...
|
||||
|
||||
If any of the Prefixs are not being relocated they can be skipped on
|
||||
the command line
|
||||
|
||||
|
|
19
docs/spec
19
docs/spec
|
@ -57,3 +57,22 @@ of this. The Packager: tag is meant to contain the name and email
|
|||
address of the person who "maintains" the RPM package (which may be
|
||||
different from the person who actually maintains the program the
|
||||
package contains).
|
||||
|
||||
Files attributes
|
||||
---------------
|
||||
|
||||
A %ghost tag on a file indicates that this file is not to be included
|
||||
in the package. It is typically used when the attributes of the file
|
||||
are important while the contents is not (e.g. a log file).
|
||||
|
||||
The %config(missingok) indicates that the file need not exist on the
|
||||
installed machine. The %config(missingok) is frequently used for files
|
||||
like /etc/rc.d/rc2.d/S55named where the (non-)existence of the symlink
|
||||
is part of the configuration in %post, and the file may need to be
|
||||
removed when this package is removed. This file is not required to
|
||||
exist at either install or uninstall time.
|
||||
|
||||
The %config(noreplace) indicates that the file in the package should
|
||||
be installed with extension .rpmnew if there is already a file by
|
||||
the same name on the installed machine.
|
||||
|
||||
|
|
2
url.c
2
url.c
|
@ -177,7 +177,7 @@ int urlSplit(const char * url, urlinfo **uret)
|
|||
if (u->port < 0 && u->service != NULL) {
|
||||
struct servent *se;
|
||||
if ((se = getservbyname(u->service, "tcp")) != NULL)
|
||||
u->port = se->s_port;
|
||||
u->port = ntohs(se->s_port);
|
||||
else if (!strcasecmp(u->service, "ftp"))
|
||||
u->port = IPPORT_FTP;
|
||||
else if (!strcasecmp(u->service, "http"))
|
||||
|
|
Loading…
Reference in New Issue