diff options
author | marino <marino@FreeBSD.org> | 2014-11-01 00:34:20 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2014-11-01 00:34:20 +0800 |
commit | 2faab4c251c70ea616fcb18a3131fc0029f74abd (patch) | |
tree | b38f051868bea6dcf8adccf744e0fc39a3207f2b /sysutils | |
parent | f32d4b4c8a001bc6df845194e4b6084733871b4f (diff) | |
download | freebsd-ports-gnome-2faab4c251c70ea616fcb18a3131fc0029f74abd.tar.gz freebsd-ports-gnome-2faab4c251c70ea616fcb18a3131fc0029f74abd.tar.zst freebsd-ports-gnome-2faab4c251c70ea616fcb18a3131fc0029f74abd.zip |
Add new port sysutils/rinse
PR: 193493
Submitted by: Jan Beich
Rinse is a simple tool which is designed to carry out the installation
of a new RPM-based distribution. Using rinse you can easily setup simple
chroot() systems running different RPM-based distributions, such as
Centos, Scientific Linux or openSUSE.
The purpose and usage are analogous to the 'debootstrap' utility
familiar to users of Debian GNU/Linux. It was primarily designed to
work with the xen-tools software, which creates new guest images for
running inder the Xen hypervisor.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/rinse/Makefile | 61 | ||||
-rw-r--r-- | sysutils/rinse/distinfo | 2 | ||||
-rw-r--r-- | sysutils/rinse/files/patch-bin__rinse | 29 | ||||
-rw-r--r-- | sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh | 27 | ||||
-rw-r--r-- | sysutils/rinse/pkg-descr | 13 | ||||
-rw-r--r-- | sysutils/rinse/pkg-plist | 71 |
7 files changed, 204 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index cd93d543821c..f96d24c29c2b 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -776,6 +776,7 @@ SUBDIR += respond SUBDIR += retail SUBDIR += rfstool + SUBDIR += rinse SUBDIR += rmonitor SUBDIR += roottail SUBDIR += rsnapshot diff --git a/sysutils/rinse/Makefile b/sysutils/rinse/Makefile new file mode 100644 index 000000000000..3241e353b3ca --- /dev/null +++ b/sysutils/rinse/Makefile @@ -0,0 +1,61 @@ +# $FreeBSD$ + +PORTNAME= rinse +PORTVERSION= 3.0.4 +CATEGORIES= sysutils +MASTER_SITES= DEBIAN +DISTNAME= ${PORTNAME}_${DISTVERSION} + +MAINTAINER= jbeich@vfemail.net +COMMENT= Install RPM-based system into a directory + +LICENSE= ARTPERL10 + +RUN_DEPENDS= p5-Term-Size>0:${PORTSDIR}/devel/p5-Term-Size \ + p5-libwww>0:${PORTSDIR}/www/p5-libwww + +NO_ARCH= yes +NO_BUILD= yes +USES= perl5 shebangfix +USE_PERL5= run +SHEBANG_FILES= bin/* tests/* +MAKE_ARGS= PREFIX="${STAGEDIR}${PREFIX}" VERSION=${DISTVERSION} +DATADIR= ${PREFIX}/lib/${PORTNAME} +WRKSRC= ${WRKDIR}/${PORTNAME} + +ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS_REASON= requires linuxulator to register rpms + +.include <bsd.port.pre.mk> + +.if ${OPSYS} == DragonFly +IGNORE= requires linuxulator to register rpms +.endif + +post-extract: + ${MV} ${WRKSRC}/etc/rinse.conf ${WRKSRC}/etc/rinse.conf.sample + +post-patch: + ${REINPLACE_CMD} -e 's,/usr,,g' \ + -e 's,/share/man,/man,g' \ + -e '/cache/s/PREFIX/DESTDIR/' \ + -e '/^include VERSION/d' \ + -e '/scripts\.common/s/*/&.sh/' \ + -e 's/\.conf/&.sample/' \ + ${WRKSRC}/Makefile + ${REINPLACE_CMD} -e 's,/etc,${PREFIX}&,' \ + -e 's,/usr/lib,${PREFIX}/lib,g' \ + ${WRKSRC}/bin/${PORTNAME} \ + ${WRKSRC}/misc/${PORTNAME} +# mount flags and /dev are different, drop duplicates and add missing + ${REINPLACE_CMD} -e 's,-o bind $$i,-t lin$${i#/}fs none,' \ + ${WRKSRC}/scripts.common/15-mount-proc.sh + ${REINPLACE_CMD} -Ee 's/sed -i/& ""/' \ + -e '/mknod.*dev/d' \ + -e '/chroot.*MAKEDEV/d' \ + -e '/-o bind.*(proc|sys)/d' \ + -e '/umount.*proc/ { p; s/proc/dev/p; \ + s/dev/sys/; N; /(.*)\n\1/!P; g; }' \ + ${WRKSRC}/scripts/*/post-install.sh + +.include <bsd.port.post.mk> diff --git a/sysutils/rinse/distinfo b/sysutils/rinse/distinfo new file mode 100644 index 000000000000..58189689678e --- /dev/null +++ b/sysutils/rinse/distinfo @@ -0,0 +1,2 @@ +SHA256 (rinse_3.0.4.tar.gz) = 9e0ff73bdc0ed0c5e2d19afbf626c4e74d20966dcd7ac8bc7fcc97f8419cf41a +SIZE (rinse_3.0.4.tar.gz) = 29634 diff --git a/sysutils/rinse/files/patch-bin__rinse b/sysutils/rinse/files/patch-bin__rinse new file mode 100644 index 000000000000..bba68c925370 --- /dev/null +++ b/sysutils/rinse/files/patch-bin__rinse @@ -0,0 +1,29 @@ +--- bin/rinse~ ++++ bin/rinse +@@ -334,7 +334,7 @@ exit; + + sub testSetup { + +- my @required = qw/ rpm rpm2cpio wget /; ++ my @required = qw/ bsdtar fetch /; + + foreach my $file (@required) { + if ( ( !-x "/bin/$file" ) && ( !-x "/usr/bin/$file" ) ) { +@@ -840,7 +840,7 @@ sub downloadPackagesToDirectory { + print $msg; + + # download - unless already present. +- system("wget --quiet -O $dir/$key $links{ $key }") unless -e "$dir/$key"; ++ system("fetch -w10 -qo $dir/$key $links{ $key }") unless -e "$dir/$key"; + next PACKAGE; + } + print "[Harmless] Failed to find download link for $package\n"; +@@ -1147,7 +1147,7 @@ sub unpackPackages { + # Run the unpacking command. + # + my $cmd = +- "rpm2cpio $file | (cd $CONFIG{'directory'} ; cpio --extract --make-directories --no-absolute-filenames --preserve-modification-time) 2>/dev/null >/dev/null"; ++ "bsdtar xPf $file --chroot -C $CONFIG{'directory'}"; + if ( $file =~ /(fedora|centos|redhat|mandriva)-release-/ ) { + my $rpmname = basename($file); + $postcmd = diff --git a/sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh b/sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh new file mode 100644 index 000000000000..7dadbbae5453 --- /dev/null +++ b/sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh @@ -0,0 +1,27 @@ +--- scripts.common/20-dev-zero.sh~ ++++ scripts.common/20-dev-zero.sh +@@ -30,15 +30,19 @@ fi + # + # Create the node + # ++if [ ! -e "${prefix}/dev/null" ]; then ++ mount -t devfs none "${prefix}/dev" ++ devfs -m "${prefix}/dev" rule apply hide ++ devfs -m "${prefix}/dev" rule apply path null unhide ++fi ++ + if [ ! -e "${prefix}/dev/zero" ]; then +- mknod -m 666 "${prefix}/dev/zero" c 1 5 ++ devfs -m "${prefix}/dev" rule apply path zero unhide + fi + + if [ ! -e "${prefix}/dev/random" ]; then +- mknod -m 666 "${prefix}/dev/random" c 1 8 +- chown root:root "${prefix}/dev/random" ++ devfs -m "${prefix}/dev" rule apply path random unhide + fi + if [ ! -e "${prefix}/dev/urandom" ]; then +- mknod -m 666 "${prefix}/dev/urandom" c 1 9 +- chown root:root "${prefix}/dev/urandom" ++ devfs -m "${prefix}/dev" rule apply path urandom unhide + fi diff --git a/sysutils/rinse/pkg-descr b/sysutils/rinse/pkg-descr new file mode 100644 index 000000000000..6a51e44219b8 --- /dev/null +++ b/sysutils/rinse/pkg-descr @@ -0,0 +1,13 @@ +Rinse is a simple tool which is designed to carry out the installation +of a new RPM-based distribution. + +Using rinse you can easily setup simple chroot() systems running +different RPM-based distributions, such as Centos, Scientific Linux or +openSUSE. + +The purpose and usage are analogous to the 'debootstrap' utility +familiar to users of Debian GNU/Linux. It was primarily designed to +work with the xen-tools software, which creates new guest images for +running inder the Xen hypervisor. + +WWW: http://collab-maint.alioth.debian.org/rinse/ diff --git a/sysutils/rinse/pkg-plist b/sysutils/rinse/pkg-plist new file mode 100644 index 000000000000..011ce0c2a735 --- /dev/null +++ b/sysutils/rinse/pkg-plist @@ -0,0 +1,71 @@ +etc/bash_completion.d/rinse +%%ETCDIR%%/centos-4.packages +%%ETCDIR%%/centos-5.packages +%%ETCDIR%%/centos-6.packages +%%ETCDIR%%/centos-7.packages +%%ETCDIR%%/fedora-10.packages +%%ETCDIR%%/fedora-12.packages +%%ETCDIR%%/fedora-13.packages +%%ETCDIR%%/fedora-14.packages +%%ETCDIR%%/fedora-15.packages +%%ETCDIR%%/fedora-16.packages +%%ETCDIR%%/fedora-17.packages +%%ETCDIR%%/fedora-18.packages +%%ETCDIR%%/fedora-19.packages +%%ETCDIR%%/fedora-7.packages +%%ETCDIR%%/fedora-8.packages +%%ETCDIR%%/fedora-9.packages +%%ETCDIR%%/fedora-core-4.packages +%%ETCDIR%%/fedora-core-5.packages +%%ETCDIR%%/fedora-core-6.packages +%%ETCDIR%%/opensuse-10.1.packages +%%ETCDIR%%/opensuse-10.2.packages +%%ETCDIR%%/opensuse-10.3.packages +%%ETCDIR%%/opensuse-11.0.packages +%%ETCDIR%%/opensuse-11.1.packages +%%ETCDIR%%/opensuse-11.2.packages +%%ETCDIR%%/opensuse-11.3.packages +%%ETCDIR%%/opensuse-12.1.packages +%%ETCDIR%%/opensuse-12.3.packages +%%ETCDIR%%/opensuse-13.1.packages +%%ETCDIR%%/rhel-5.packages +@sample %%ETCDIR%%/rinse.conf.sample +%%ETCDIR%%/slc-5.packages +%%ETCDIR%%/slc-6.packages +%%DATADIR%%/centos-4/post-install.sh +%%DATADIR%%/centos-5/post-install.sh +%%DATADIR%%/centos-6/post-install.sh +%%DATADIR%%/centos-7/post-install.sh +%%DATADIR%%/common/10-resolv.conf.sh +%%DATADIR%%/common/15-mount-proc.sh +%%DATADIR%%/common/20-dev-zero.sh +%%DATADIR%%/fedora-10/post-install.sh +%%DATADIR%%/fedora-12/post-install.sh +%%DATADIR%%/fedora-13/post-install.sh +%%DATADIR%%/fedora-14/post-install.sh +%%DATADIR%%/fedora-15/post-install.sh +%%DATADIR%%/fedora-16/post-install.sh +%%DATADIR%%/fedora-18/post-install.sh +%%DATADIR%%/fedora-19/post-install.sh +%%DATADIR%%/fedora-7/post-install.sh +%%DATADIR%%/fedora-8/post-install.sh +%%DATADIR%%/fedora-9/post-install.sh +%%DATADIR%%/fedora-core-4/post-install.sh +%%DATADIR%%/fedora-core-5/post-install.sh +%%DATADIR%%/fedora-core-6/post-install.sh +%%DATADIR%%/opensuse-10.1/post-install.sh +%%DATADIR%%/opensuse-10.2/post-install.sh +%%DATADIR%%/opensuse-10.3/post-install.sh +%%DATADIR%%/opensuse-11.0/post-install.sh +%%DATADIR%%/opensuse-11.1/post-install.sh +%%DATADIR%%/opensuse-11.2/post-install.sh +%%DATADIR%%/opensuse-11.3/post-install.sh +%%DATADIR%%/opensuse-12.1/post-install.sh +%%DATADIR%%/opensuse-12.3/post-install.sh +%%DATADIR%%/opensuse-13.1/post-install.sh +%%DATADIR%%/rhel-5/post-install.sh +%%DATADIR%%/slc-5/post-install.sh +%%DATADIR%%/slc-6/post-install.sh +man/man8/rinse.8.gz +sbin/rinse +@dir /var/cache/rinse |