Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 2014 16:34:21 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r371874 - in head/sysutils: . rinse rinse/files
Message-ID:  <201410311634.s9VGYLpE023642@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Fri Oct 31 16:34:20 2014
New Revision: 371874
URL: https://svnweb.freebsd.org/changeset/ports/371874
QAT: https://qat.redports.org/buildarchive/r371874/

Log:
  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.

Added:
  head/sysutils/rinse/
  head/sysutils/rinse/Makefile   (contents, props changed)
  head/sysutils/rinse/distinfo   (contents, props changed)
  head/sysutils/rinse/files/
  head/sysutils/rinse/files/patch-bin__rinse   (contents, props changed)
  head/sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh   (contents, props changed)
  head/sysutils/rinse/pkg-descr   (contents, props changed)
  head/sysutils/rinse/pkg-plist   (contents, props changed)
Modified:
  head/sysutils/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Fri Oct 31 16:15:36 2014	(r371873)
+++ head/sysutils/Makefile	Fri Oct 31 16:34:20 2014	(r371874)
@@ -776,6 +776,7 @@
     SUBDIR += respond
     SUBDIR += retail
     SUBDIR += rfstool
+    SUBDIR += rinse
     SUBDIR += rmonitor
     SUBDIR += roottail
     SUBDIR += rsnapshot

Added: head/sysutils/rinse/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/rinse/Makefile	Fri Oct 31 16:34:20 2014	(r371874)
@@ -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>

Added: head/sysutils/rinse/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/rinse/distinfo	Fri Oct 31 16:34:20 2014	(r371874)
@@ -0,0 +1,2 @@
+SHA256 (rinse_3.0.4.tar.gz) = 9e0ff73bdc0ed0c5e2d19afbf626c4e74d20966dcd7ac8bc7fcc97f8419cf41a
+SIZE (rinse_3.0.4.tar.gz) = 29634

Added: head/sysutils/rinse/files/patch-bin__rinse
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/rinse/files/patch-bin__rinse	Fri Oct 31 16:34:20 2014	(r371874)
@@ -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 =

Added: head/sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh	Fri Oct 31 16:34:20 2014	(r371874)
@@ -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

Added: head/sysutils/rinse/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/rinse/pkg-descr	Fri Oct 31 16:34:20 2014	(r371874)
@@ -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/

Added: head/sysutils/rinse/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/rinse/pkg-plist	Fri Oct 31 16:34:20 2014	(r371874)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410311634.s9VGYLpE023642>