mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
- update to 1.71
This commit is contained in:
parent
10d9e7caf3
commit
e002e5fc00
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300243
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= pkg_jail
|
||||
PORTVERSION= 1.70
|
||||
PORTVERSION= 1.71
|
||||
CATEGORIES= ports-mgmt
|
||||
MASTER_SITES= # empty
|
||||
DISTFILES= # empty
|
||||
@ -29,7 +29,7 @@ do-install:
|
||||
.endif
|
||||
|
||||
install-ports:
|
||||
-${MKDIR} ${PORTSDIR}/local/update
|
||||
-${MKDIR} ${PORTSDIR}/local/update/data
|
||||
${LN} -s ${FILESDIR}/README ${PORTSDIR}/local/update/
|
||||
${LN} -s ${FILESDIR}/pkg_update ${PORTSDIR}/local/update/
|
||||
${LN} -s ${FILESDIR}/pkg_jail ${PORTSDIR}/local/update/
|
||||
|
@ -2,7 +2,9 @@
|
||||
# /usr/ports/local/update/
|
||||
#
|
||||
# Scripts reside here.
|
||||
# fetch them from http://people.freebsd.org/~dinoex/batch/
|
||||
# install then here with:
|
||||
# cd /usr/ports/ports-mgmt/pkg_jail && make install-ports
|
||||
# /usr/ports should be shared with buildjail and hosts.
|
||||
#
|
||||
#
|
||||
# Intended to run within a jailed System:
|
||||
|
@ -39,7 +39,7 @@ extra_commands="status shell list init"
|
||||
: ${pkg_jail_dir="/usr/jail/mybuild"}
|
||||
: ${pkg_jail_rule="127"}
|
||||
#
|
||||
pkg_jail_init()
|
||||
pkg_jail_setup()
|
||||
{
|
||||
if test ! -d "${pkg_jail_dir}"
|
||||
then
|
||||
@ -52,6 +52,10 @@ pkg_jail_init()
|
||||
make "DESTDIR=${D}" delete-old-libs RM_I="-f -v"
|
||||
if test ! -f "${pkg_jail_dir}/etc/rc.conf"
|
||||
then
|
||||
if test ! -d "${pkg_jail_dir}/usr/ports"
|
||||
then
|
||||
mkdir "${pkg_jail_dir}/usr/ports"
|
||||
fi
|
||||
cd /usr/src/etc
|
||||
make "DESTDIR=${pkg_jail_dir}" distribution
|
||||
ln -sf dev/null "${pkg_jail_dir}/kernel"
|
||||
@ -108,7 +112,8 @@ pkg_jail_create_dev_links()
|
||||
pkg_jail_create_devfs()
|
||||
{
|
||||
local jail_devdir="${pkg_jail_dir}/dev"
|
||||
if test ! -e "${jail_devdir}/null"
|
||||
local jail_devmount=`mount -t devfs | cut -d " " -f 3 | fgrep -x ${jail_devdir}`
|
||||
if test "${jail_devmount}" = ""
|
||||
then
|
||||
# create and mount devfs
|
||||
pkg_jail_create_dev_rules
|
||||
@ -116,7 +121,7 @@ pkg_jail_create_devfs()
|
||||
devfs -m ${jail_devdir} ruleset ${pkg_jail_rule}
|
||||
devfs -m ${jail_devdir} rule applyset
|
||||
fi
|
||||
if test ! -L "${jail_devdir}/console"
|
||||
if test ! -e "${jail_devdir}/console"
|
||||
then
|
||||
pkg_jail_create_dev_links ${jail_devdir} null console
|
||||
fi
|
||||
@ -159,6 +164,11 @@ pkg_jail_create_jail_mount()
|
||||
pkg_jail_start()
|
||||
{
|
||||
echo "Starting jail-${pkg_jail_hostname}-${pkg_jail_ip}"
|
||||
if test ! -d "${pkg_jail_dir}"
|
||||
then
|
||||
echo "${pkg_jail_dir}: Directory not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
pkg_jail_create_devfs
|
||||
pkg_jail_create_jail_mount "${pkg_jail_dir}"
|
||||
sysctl security.jail.sysvipc_allowed=1
|
||||
@ -203,6 +213,18 @@ pkg_jail_umount()
|
||||
fi
|
||||
done
|
||||
}
|
||||
pkg_jail_init()
|
||||
{
|
||||
if pkg_jail_free
|
||||
then
|
||||
pkg_jail_setup
|
||||
pkg_jail_create_devfs
|
||||
pkg_jail_create_jail_mount "${pkg_jail_dir}"
|
||||
/usr/sbin/jail -n "${pkg_jail_short}" "${pkg_jail_dir}" "${pkg_jail_hostname}" "${pkg_jail_ip}" \
|
||||
/bin/sh -c "/usr/ports/ports-mgmt/pkg_jail && make install-ports"
|
||||
pkg_jail_umount
|
||||
fi
|
||||
}
|
||||
pkg_jail_shell()
|
||||
{
|
||||
if pkg_jail_free
|
||||
|
@ -12,13 +12,14 @@ is a script to handle an clean jail for package-builds.
|
||||
.TP
|
||||
.B init
|
||||
Creates or updates a clean jail with "installworld" and populate /etc inside the jail.
|
||||
You need to have a sucessful "buildword" made in /usr/src before this.
|
||||
.TP
|
||||
.B start
|
||||
Start the jail as a guest server.
|
||||
You should have setup sshd inside the jail to login and maintain it with this option.
|
||||
.TP
|
||||
.B shell
|
||||
Start the jail and give a shell back.
|
||||
Start the jail and give a shell back. You can build packages now.
|
||||
.TP
|
||||
.B list
|
||||
Show processes running in the jail.
|
||||
@ -52,14 +53,27 @@ The ip-address for the jail.
|
||||
The new root for the jail.
|
||||
.TP
|
||||
.B pkg_jail_rule
|
||||
The rulset number the script uses for the devfs isnide the jail.
|
||||
The rulset number the script uses for the devfs inside the jail.
|
||||
.SH RETURN VALUES
|
||||
undefined.
|
||||
.SH "FILES"
|
||||
The variables can be set in /etc/rc.conf or in $PREFIX/etc/pkg_jail.conf.
|
||||
.SH "EXAMPLES"
|
||||
.B pkg_jail
|
||||
shell
|
||||
.B Setting up the Jail Directory Tree
|
||||
.P
|
||||
Install all Files with the following comands on the host:
|
||||
.IP
|
||||
cd /usr/src && make buildworld
|
||||
.br
|
||||
pkg_jail init
|
||||
.TP
|
||||
.B Creating a Package
|
||||
.P
|
||||
Change to your management directory and execute pkg_upgrade:
|
||||
.IP
|
||||
cd /usr/ports/local/update
|
||||
.br
|
||||
sh pkg_update make-packages devel/gmake
|
||||
.SH "SEE ALSO"
|
||||
.TP
|
||||
.B pkg_update(1)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Id: pkg_update,v 1.69 2010/06/24 15:56:40 cvs Exp $
|
||||
# $Id: pkg_update,v 1.70 2012/01/15 10:55:12 cvs Exp $
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Copyright (c) 2001-2006
|
||||
@ -2022,7 +2022,7 @@ clean-distfiles)
|
||||
;;
|
||||
merge-distfiles)
|
||||
distdir=`make -f /usr/share/mk/bsd.port.mk ${nowarn} -V DISTDIR`
|
||||
mergedistdir="${MERGEDISTDIR-/media/ports/distfiles}"
|
||||
mergedistdir="${MERGEDISTDIR-/media/distfiles}"
|
||||
old="${distdir}/Old"
|
||||
#
|
||||
merge_distfiles
|
||||
|
Loading…
Reference in New Issue
Block a user