aboutsummaryrefslogtreecommitdiff
path: root/sysutils/rinse
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-10-31 16:34:20 +0000
committerJohn Marino <marino@FreeBSD.org>2014-10-31 16:34:20 +0000
commit166701d1cc346a9b5f219299bf4d222e23ce2336 (patch)
treeb38f051868bea6dcf8adccf744e0fc39a3207f2b /sysutils/rinse
parentf7057b396c045636100c6302b3f0a00dd029f008 (diff)
downloadports-166701d1cc346a9b5f219299bf4d222e23ce2336.tar.gz
ports-166701d1cc346a9b5f219299bf4d222e23ce2336.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.
Notes
Notes: svn path=/head/; revision=371874
Diffstat (limited to 'sysutils/rinse')
-rw-r--r--sysutils/rinse/Makefile61
-rw-r--r--sysutils/rinse/distinfo2
-rw-r--r--sysutils/rinse/files/patch-bin__rinse29
-rw-r--r--sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh27
-rw-r--r--sysutils/rinse/pkg-descr13
-rw-r--r--sysutils/rinse/pkg-plist71
6 files changed, 203 insertions, 0 deletions
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