pkg_add.1 (37634) | pkg_add.1 (41866) |
---|---|
1.\" 2.\" FreeBSD install - a package for the installation and maintainance 3.\" of non-core utilities. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" Jordan K. Hubbard 15.\" 16.\" 17.\" @(#)pkg_add.1 | 1.\" 2.\" FreeBSD install - a package for the installation and maintainance 3.\" of non-core utilities. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" Jordan K. Hubbard 15.\" 16.\" 17.\" @(#)pkg_add.1 |
18.\" $Id$ | 18.\" $Id: pkg_add.1,v 1.26 1998/07/14 08:27:58 jkoshy Exp $ |
19.\" 20.Dd November 25, 1994 21.Dt pkg_add 1 22.Os FreeBSD 23.Sh NAME 24.Nm pkg_add 25.Nd a utility for installing software package distributions 26.Sh SYNOPSIS --- 16 unchanged lines hidden (view full) --- 43.Nm 44command may execute scripts or programs contained within a package file, 45your system may be susceptible to ``trojan horses'' or other subtle 46attacks from miscreants who create dangerous package files. 47.Pp 48You are advised to verify the competence and identity of those who 49provide installable package files. For extra protection, use the 50.Fl M | 19.\" 20.Dd November 25, 1994 21.Dt pkg_add 1 22.Os FreeBSD 23.Sh NAME 24.Nm pkg_add 25.Nd a utility for installing software package distributions 26.Sh SYNOPSIS --- 16 unchanged lines hidden (view full) --- 43.Nm 44command may execute scripts or programs contained within a package file, 45your system may be susceptible to ``trojan horses'' or other subtle 46attacks from miscreants who create dangerous package files. 47.Pp 48You are advised to verify the competence and identity of those who 49provide installable package files. For extra protection, use the 50.Fl M |
51flag to extract the package file, and inspect its contents and scripts 52to insure it poses no danger to your system's integrity. Pay particular 53attention to any +INSTALL, +DEINSTALL, +REQUIRE or +MTREE_DIRS files, 54and inspect the +CONTENTS file for | 51flag to extract the package file, and inspect its contents and scripts to 52insure it poses no danger to your system's integrity. Pay particular 53attention to any +INSTALL, +POST-INSTALL, +DEINSTALL, +POST-DEINSTALL, 54+REQUIRE or +MTREE_DIRS files, and inspect the +CONTENTS file for |
55.Cm @cwd , 56.Cm @mode 57(check for setuid), 58.Cm @dirrm , 59.Cm @exec , 60and 61.Cm @unexec 62directives, and/or use the --- 10 unchanged lines hidden (view full) --- 73to read from stdin. If the packages are not found in the current 74working directory, 75.Nm 76will search them in each directory named by 77.Ev PKG_PATH . 78.It Fl v 79Turn on verbose output. 80.It Fl I | 55.Cm @cwd , 56.Cm @mode 57(check for setuid), 58.Cm @dirrm , 59.Cm @exec , 60and 61.Cm @unexec 62directives, and/or use the --- 10 unchanged lines hidden (view full) --- 73to read from stdin. If the packages are not found in the current 74working directory, 75.Nm 76will search them in each directory named by 77.Ev PKG_PATH . 78.It Fl v 79Turn on verbose output. 80.It Fl I |
81If an installation script exists for a given package, do not execute it. | 81If a installation scripts (pre-install or post-install) exist for a given 82package, do not execute them. |
82.It Fl n 83Don't actually install a package, just report the steps that 84would be taken if it was. 85.It Fl R 86Do not record the installation of a package. This means 87that you cannot deinstall it later, so only use this option if 88you know what you are doing! 89.It Fl f --- 102 unchanged lines hidden (view full) --- 192.Nm 193consistently fails to fetch a package from a site known to work, 194it may be because you have a firewall that demands the usage of 195.Bf -emphasis 196passive mode 197.Ef 198ftp. 199.Sh TECHNICAL DETAILS | 83.It Fl n 84Don't actually install a package, just report the steps that 85would be taken if it was. 86.It Fl R 87Do not record the installation of a package. This means 88that you cannot deinstall it later, so only use this option if 89you know what you are doing! 90.It Fl f --- 102 unchanged lines hidden (view full) --- 193.Nm 194consistently fails to fetch a package from a site known to work, 195it may be because you have a firewall that demands the usage of 196.Bf -emphasis 197passive mode 198.Ef 199ftp. 200.Sh TECHNICAL DETAILS |
200.Nm Pkg_add | 201.Nm pkg_add |
201is fairly simple. It extracts each package's "packing list" 202into a special staging directory, parses it, 203and then runs through the following sequence to fully extract the contents: 204.Bl -enum -indent indent 205.It 206Check if the package is already recorded as installed. If so, 207terminate installation. 208.It --- 30 unchanged lines hidden (view full) --- 239.Ed 240where 241.Ar pkg-name 242is the name of the package in question and the 243.Ar INSTALL 244keyword denotes this as an installation requirements check (useful if 245you want to have one script serving multiple functions). 246.It | 202is fairly simple. It extracts each package's "packing list" 203into a special staging directory, parses it, 204and then runs through the following sequence to fully extract the contents: 205.Bl -enum -indent indent 206.It 207Check if the package is already recorded as installed. If so, 208terminate installation. 209.It --- 30 unchanged lines hidden (view full) --- 240.Ed 241where 242.Ar pkg-name 243is the name of the package in question and the 244.Ar INSTALL 245keyword denotes this as an installation requirements check (useful if 246you want to have one script serving multiple functions). 247.It |
247If an 248.Ar install 249script exists for the package, it is then executed with the following arguments: | 248If a 249.Ar pre-install 250script exists for the package, it is then executed with the following 251arguments: |
250.Bd -filled -offset indent -compact | 252.Bd -filled -offset indent -compact |
253.Cm script |
|
251.Ar pkg-name | 254.Ar pkg-name |
252.Ar PRE-INSTALL | 255.Ar PRE-INSTALL |
253.Ed | 256.Ed |
257 |
|
254where 255.Ar pkg-name 256is the name of the package in question and 257.Ar PRE-INSTALL 258is a keyword denoting this as the preinstallation phase. | 258where 259.Ar pkg-name 260is the name of the package in question and 261.Ar PRE-INSTALL 262is a keyword denoting this as the preinstallation phase. |
263 264.Cm Note: 265The 266.Ar PRE-INSTALL 267keyword will not appear if separate scripts for pre-install and post-install 268are given during package creation time (using the 269.Cm Fl i 270and 271.Cm Fl I 272flags to 273.Xr pkg_create 1 ). |
|
259.It 260If 261.Cm @option extract-in-place 262is not used, then the packing list (this is the 263.Pa +CONTENTS 264file) is now used as a guide for moving (or copying, as necessary) files from 265the staging area into their final locations. 266.It --- 17 unchanged lines hidden (view full) --- 284is either the prefix specified with the 285.Fl p 286flag or, if no 287.Fl p 288flag was specified, the name of the first directory named by a 289.Cm @cwd 290directive within this package. 291.It | 274.It 275If 276.Cm @option extract-in-place 277is not used, then the packing list (this is the 278.Pa +CONTENTS 279file) is now used as a guide for moving (or copying, as necessary) files from 280the staging area into their final locations. 281.It --- 17 unchanged lines hidden (view full) --- 299is either the prefix specified with the 300.Fl p 301flag or, if no 302.Fl p 303flag was specified, the name of the first directory named by a 304.Cm @cwd 305directive within this package. 306.It |
292If an 293.Ar install | 307If a 308.Ar post-install |
294script exists for the package, it is then executed as 295.Bd -filled -offset indent -compact 296.Cm script 297.Ar pkg-name 298.Ar POST-INSTALL 299.Ed | 309script exists for the package, it is then executed as 310.Bd -filled -offset indent -compact 311.Cm script 312.Ar pkg-name 313.Ar POST-INSTALL 314.Ed |
300This all allows you to write a single | 315where 316.Ar pkg-name 317is the name of the package in question and 318.Ar POST-INSTALL 319is a keyword denoting this as the post-installation phase. 320 321.Cm Note: 322The 323.Ar POST-INSTALL 324keyword will not appear if separate scripts for pre-install and post-install 325are given during package creation time (using the 326.Cm Fl i 327and 328.Cm Fl I 329flags to 330.Xr pkg_create 1 ). 331 332Reasoning behind passing keywords such as 333.Ar POST-INSTALL 334and 335.Ar PRE-INSTALL 336is that this allows you to write a single |
301.Ar install | 337.Ar install |
302script that does both ``before and after'' actions. | 338script that does both ``before and after'' actions. But, separating the 339functionality is more advantageous and easier from a maintainence viewpoint. |
303.It 304After installation is complete, a copy of the packing list, 305.Ar deinstall 306script, description, and display files are copied into 307.Pa /var/db/pkg/<pkg-name> 308for subsequent possible use by 309.Xr pkg_delete 1 . 310Any package dependencies are recorded in the other packages' --- 96 unchanged lines hidden --- | 340.It 341After installation is complete, a copy of the packing list, 342.Ar deinstall 343script, description, and display files are copied into 344.Pa /var/db/pkg/<pkg-name> 345for subsequent possible use by 346.Xr pkg_delete 1 . 347Any package dependencies are recorded in the other packages' --- 96 unchanged lines hidden --- |