- update to revision 1.68
- add manpages
This commit is contained in:
parent
a75c560933
commit
885a82841c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=252369
4 changed files with 253 additions and 8 deletions
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= pkg_jail
|
||||
PORTVERSION= 1.0
|
||||
PORTVERSION= 1.68
|
||||
CATEGORIES= ports-mgmt
|
||||
MASTER_SITES= # empty
|
||||
DISTFILES= # empty
|
||||
|
@ -18,10 +18,11 @@ NO_BUILD= yes
|
|||
|
||||
PLIST_FILES= bin/pkg_jail bin/pkg_update
|
||||
PORTDOCS= README
|
||||
MAN1= pkg_jail.1 pkg_update.1
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/pkg_jail ${PREFIX}/bin/
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/pkg_update ${PREFIX}/bin/
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/pkg_jail ${FILESDIR}/pkg_update ${PREFIX}/bin/
|
||||
${INSTALL_MAN} ${FILESDIR}/pkg_jail.1 ${FILESDIR}/pkg_update.1 ${PREFIX}/man/man1/
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${FILESDIR}/README ${DOCSDIR}/
|
||||
|
|
73
ports-mgmt/pkg_jail/files/pkg_jail.1
Normal file
73
ports-mgmt/pkg_jail/files/pkg_jail.1
Normal file
|
@ -0,0 +1,73 @@
|
|||
.\" $Id$
|
||||
.TH PKG_JAIL 1 "April 2010" "FreeBSD" "User Manuals"
|
||||
.SH NAME
|
||||
pkg_jail \- Easy handling of a jail for package-builds.
|
||||
.SH SYNOPSIS
|
||||
.TP
|
||||
.B pkg_jail [command]
|
||||
.SH DESCRIPTION
|
||||
.B pkg_jail
|
||||
is a script to handle an clean jail for package-builds.
|
||||
.SH ARGUMENTS
|
||||
.TP
|
||||
.B init
|
||||
Creates or updates a clean jail with "installworld" and populate /etc inside the jail.
|
||||
.TP
|
||||
.B start
|
||||
Start the jail as a guest server.
|
||||
You should have setup sshd to login and maintain it with this option.
|
||||
.TP
|
||||
.B shell
|
||||
Start the jail and give a shell back.
|
||||
.TP
|
||||
.B list
|
||||
Show processes running in the jail.
|
||||
You need to have /proc mounted (readonly) in the host.
|
||||
.TP
|
||||
.B stop
|
||||
Kill processes running in the jail.
|
||||
You need to have /proc mounted (readonly) in the host.
|
||||
.TP
|
||||
.B restart
|
||||
Same as "stop" and "start"
|
||||
.SH "IMPLEMENTATION NOTES"
|
||||
.TP
|
||||
.B /proc
|
||||
/proc will be mounted readonly via procfs inside the jail.
|
||||
.TP
|
||||
.B /usr/src
|
||||
if /usr/src/Makefile does not exists inside the jail,
|
||||
/usr/src will be mounted readonly via nullfs from the the host into the jail.
|
||||
.TP
|
||||
.B jail_name
|
||||
The hostname of the jail.
|
||||
.TP
|
||||
.B jail_short
|
||||
A short id fopr the jail.
|
||||
.TP
|
||||
.B jail_ip
|
||||
The ip-address for the jail.
|
||||
.TP
|
||||
.B jail_dir
|
||||
The new root for the jail.
|
||||
.TP
|
||||
.B jail_short
|
||||
A short id fopr the jail.
|
||||
.TP
|
||||
.B jail_rule
|
||||
The rulset number the script uses for the devfs isnide the jail.
|
||||
.SH RETURN VALUES
|
||||
undefined.
|
||||
.SH "FILES"
|
||||
Configuration is inside the script.
|
||||
.SH "EXAMPLES"
|
||||
.B pkg_jail
|
||||
shell
|
||||
.SH "SEE ALSO"
|
||||
.TP
|
||||
.B pkg_update(1)
|
||||
The tool to create packages inside the jail.
|
||||
.SH "HISTORY"
|
||||
http://www.dinoex.net/training/package.html
|
||||
.SH "AUTHOR"
|
||||
Dirk Meyer, dinoex@FreeBSD.org
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
# $Id: pkg_update,v 1.67 2010/03/25 08:06:37 cvs Exp $
|
||||
# $Id: pkg_update,v 1.68 2010/04/05 04:39:43 cvs Exp $
|
||||
#
|
||||
# Copyright (c) 2001-2006
|
||||
# by Dirk Meyer, All rights reserved.
|
||||
|
@ -1085,25 +1085,30 @@ merge_distfiles() {
|
|||
continue
|
||||
fi
|
||||
case "${dir}" in
|
||||
*Old*)
|
||||
if test -f "${mergedistdir}/${dir#Old}${xfile}"
|
||||
/Old/*)
|
||||
echo "${mergedistdir}${dir#/Old}${xfile}"
|
||||
if test -f "${mergedistdir}${dir#/Old}${xfile}"
|
||||
then
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test -f "${mergedistdir}/Old/${dir}${xfile}"
|
||||
echo "${mergedistdir}/Old${dir}${xfile}"
|
||||
if test -f "${mergedistdir}/Old${dir}${xfile}"
|
||||
then
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test ! -d "${mergedistdir}${dir}"
|
||||
then
|
||||
echo \
|
||||
mkdir -p "${mergedistdir}${dir}"
|
||||
mkdir -p "${mergedistdir}${dir}"
|
||||
fi
|
||||
echo \
|
||||
cp -pi "${name}" "${mergedistdir}${dir}"
|
||||
cp -pi "${name}" "${mergedistdir}${dir}/"
|
||||
cp -pi "${name}" "${mergedistdir}${dir}/"
|
||||
done
|
||||
}
|
||||
#
|
||||
|
|
166
ports-mgmt/pkg_jail/files/pkg_update.1
Normal file
166
ports-mgmt/pkg_jail/files/pkg_update.1
Normal file
|
@ -0,0 +1,166 @@
|
|||
.\" $Id$
|
||||
.TH PKG_UPDATE 1 "April 2010" "FreeBSD" "User Manuals"
|
||||
.SH NAME
|
||||
pkg_update \- Easy handling of jailed packages builds.
|
||||
.SH SYNOPSIS
|
||||
.TP
|
||||
.B pkg_update [command] ...
|
||||
.SH DESCRIPTION
|
||||
.B pkg_update
|
||||
is a script to handle an clean jail for package-builds.
|
||||
.SH ARGUMENTS
|
||||
.TP
|
||||
.B cvsup
|
||||
Installs a copy of cvsup-without-gui package and start
|
||||
"make update" for the ports tree.
|
||||
.TP
|
||||
.B make-packages
|
||||
Builds a port and its dependencies in a clean /usr/local.
|
||||
You should not run this on a server with configuration.
|
||||
Existing packages are used.
|
||||
Extra files in "${PREFIX}" are detected and reported.
|
||||
The default list of ports is "data/make-packages.${hostname}"
|
||||
.TP
|
||||
.B clean-distfiles
|
||||
Checks all distinfo files and moves the disfiles not found
|
||||
to "/usr/ports/distfiles/Old/".
|
||||
.TP
|
||||
.B merge-distfiles
|
||||
Copy all disfiles found that do not yet exist on the master
|
||||
directory "/media/ports/distfiles/".
|
||||
.TP
|
||||
.B clean-packages
|
||||
Find obsolete packages and move them out of the way.
|
||||
.TP
|
||||
.B pkg_update clean-openssl-packages
|
||||
Find packages that use openssl and move them out of the way
|
||||
.TP
|
||||
.B full-update-jail
|
||||
Do full update cycle:
|
||||
1. "cvsup" to update the ports tree
|
||||
2. "clean-packages" to keep only good packages
|
||||
3. remove all old error logs
|
||||
4. "make-packages" to rebuild missing packages
|
||||
.TP
|
||||
.B full-update-jail retry
|
||||
Skip "cvsup" and procced as above.
|
||||
.TP
|
||||
.B fetch-distfiles
|
||||
Fetch distfiles for list of ports.
|
||||
.TP
|
||||
.B fetch-recursive-distfiles
|
||||
Fetch distfiles for list of ports and their dependecies.
|
||||
.TP
|
||||
.B show-extra-files
|
||||
List files in portsdir that are not updated by cvsup
|
||||
.TP
|
||||
.B dependency-update
|
||||
Try to fix as much dependecy problens in installed ports.
|
||||
.TP
|
||||
.B fix-moved-ports
|
||||
Check installed packages for moved ports.
|
||||
Then register the new dir in the old installed package.
|
||||
.TP
|
||||
.B add-packages
|
||||
Build a missing port and its missing dpendencies
|
||||
/usr/local is not deleted, on success the port is installed.
|
||||
Existing packages will be used.
|
||||
.TP
|
||||
.B list-installed-ports
|
||||
List all installed ports.
|
||||
.TP
|
||||
.B show-version-list
|
||||
List installed packages that are not in correct version.
|
||||
.TP
|
||||
.B show-packages
|
||||
List build packages or report missing for each port
|
||||
recorded in "data/install-packages.${hostname}".
|
||||
.TP
|
||||
.B check-installed-ports
|
||||
Compare the list of installed ports with the list
|
||||
recorded in data/install-packages.${hostname}".
|
||||
.TP
|
||||
.B show-missing-packages
|
||||
Warn if no package is found for each port
|
||||
recorded in "data/install-packages.${hostname}"
|
||||
.TP
|
||||
.B show-missing-installed
|
||||
List build packages or report missing for each port
|
||||
installed on this host.
|
||||
.TP
|
||||
.B check-update
|
||||
1. check-installed-ports
|
||||
2. show-missing-packages
|
||||
3. show-missing-installed
|
||||
.TP
|
||||
.B clean
|
||||
Clean all cached information.
|
||||
.TP
|
||||
.B make-version-list
|
||||
Make new list of packages that are not in correct version.
|
||||
.TP
|
||||
.B make-deinstall-list
|
||||
Make new list of ports that are not in correct version
|
||||
and create a script "deinstall.${hostname}" to deinstall
|
||||
all the old ports and the dependend ports in order.
|
||||
.TP
|
||||
.B check-reinstall
|
||||
For each package deleted by "make-deinstall-list" warn
|
||||
if no new package is found.
|
||||
.TP
|
||||
.B reinstall
|
||||
For each package deleted by "make-deinstall-list" try
|
||||
to install the new package if it exists.
|
||||
.TP
|
||||
.B install-packages
|
||||
For each port recorded in "data/install-packages.${hostname}"
|
||||
try to to install the new package if it exists.
|
||||
.TP
|
||||
.B show-missing-reinstall
|
||||
For each port recorded from "make-deinstall-list" warn
|
||||
if no new package is found.
|
||||
.TP
|
||||
.B make-easy-update
|
||||
Try to generate the ordered sequence of pkg_deinstall
|
||||
and pkg_add commands to update your old packages.
|
||||
.TP
|
||||
.B replace-package
|
||||
Overwrite the installed package with a new one and
|
||||
register dependencies and dependant packages.
|
||||
Warning: Don't do this when the ABI of the this
|
||||
package or the ABI of its dependencies has changed.
|
||||
.TP
|
||||
.B clean-reinstall
|
||||
For each port recorded from "make-deinstall-list",
|
||||
keep only the ports that have no package installed.
|
||||
.TP
|
||||
.B deinstall-packages
|
||||
For each port recorded in "data/install-packages.${hostname}"
|
||||
try to to deinstall the installed port.
|
||||
.SH "IMPLEMENTATION NOTES"
|
||||
This script uses only /bin/sh and it does not need an INDEX file.
|
||||
.SH RETURN VALUES
|
||||
undefined.
|
||||
.SH "FILES"
|
||||
.TP
|
||||
.B /usr/ports/local/update/data/
|
||||
Default location for configuration and varaible data.
|
||||
|
||||
.TP
|
||||
.B /usr/ports/local/update/log-${hostname}
|
||||
Default location for logsfiles.
|
||||
.TP
|
||||
.B /media/ports/distfiles/
|
||||
Optional location lor a central hostng of distfiles.
|
||||
.SH "EXAMPLES"
|
||||
.B pkg_update full-update-jail clean-distfiles
|
||||
.SH "SEE ALSO"
|
||||
.TP
|
||||
.B pkg_jail(1)
|
||||
The tool to create and run the jail.
|
||||
.SH "HISTORY"
|
||||
http://www.dinoex.net/training/package.html
|
||||
.TP
|
||||
http://www.dinoex.net/training/package2.html
|
||||
.SH "AUTHOR"
|
||||
Dirk Meyer, dinoex@FreeBSD.org
|
Loading…
Reference in a new issue