Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2017 10:36:17 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r449960 - in head/sysutils/freesbie: . files
Message-ID:  <201709161036.v8GAaHZZ005011@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Sat Sep 16 10:36:17 2017
New Revision: 449960
URL: https://svnweb.freebsd.org/changeset/ports/449960

Log:
  Fix remaining uses of mount_devfs and pkg_install; cleanup port
  
  Details:
  - Fix remaining uses of mount_devfs and pkg_install [1]
  - Bump PORTREVISION
  - Add pkg-message about the upstream project no longer being
    maintained
  - pet portlint
  
  Reported by:	christophe.maury@gmail.com via email [1]

Added:
  head/sysutils/freesbie/files/patch-extra_installports.sh   (contents, props changed)
  head/sysutils/freesbie/files/patch-extra_varmfs.sh   (contents, props changed)
  head/sysutils/freesbie/files/patch-scripts_iso.sh
     - copied, changed from r449959, head/sysutils/freesbie/files/patch-scripts-iso.sh
  head/sysutils/freesbie/files/patch-scripts_pkginstall.sh   (contents, props changed)
  head/sysutils/freesbie/files/patch-scripts_pkgselect.sh   (contents, props changed)
  head/sysutils/freesbie/pkg-message   (contents, props changed)
Deleted:
  head/sysutils/freesbie/files/extra-patch-pkgng
  head/sysutils/freesbie/files/patch-scripts-iso.sh
Modified:
  head/sysutils/freesbie/Makefile

Modified: head/sysutils/freesbie/Makefile
==============================================================================
--- head/sysutils/freesbie/Makefile	Sat Sep 16 09:42:21 2017	(r449959)
+++ head/sysutils/freesbie/Makefile	Sat Sep 16 10:36:17 2017	(r449960)
@@ -3,7 +3,7 @@
 
 PORTNAME=	freesbie
 PORTVERSION=	2.0.20070710
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	sysutils
 MASTER_SITES=	LOCAL/riggs/freesbie
 DISTNAME=	${PORTNAME}-${PORTVERSION:S/2.0.//}
@@ -13,17 +13,16 @@ COMMENT=	Yet another cool answer to the system-on-cd q
 
 LICENSE=	BSD2CLAUSE
 
+ONLY_FOR_ARCHS=	amd64 i386 powerpc
+ONLY_FOR_ARCHS_REASON=	FreeSBIE build system only supports amd64, i386 and powerpc
+
 RUN_DEPENDS=	cdrecord:sysutils/cdrtools
 
 USES=		tar:bzip2
+NO_ARCH=	yes
 NO_BUILD=	yes
 
 WRKSRC=		${WRKDIR}/${PORTNAME}2
-
-ONLY_FOR_ARCHS=	amd64 i386 powerpc
-ONLY_FOR_ARCHS_REASON=	FreeSBIE build system only supports amd64, i386 and powerpc
-
-EXTRA_PATCHES+=	${FILESDIR}/extra-patch-pkgng
 
 pre-configure:
 	@${SED} -e "s:%%ARCH%%:${ARCH}:g" ${FILESDIR}/conf-arch-FREESBIE.in > ${WRKSRC}/conf/${ARCH}/FREESBIE

Added: head/sysutils/freesbie/files/patch-extra_installports.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/freesbie/files/patch-extra_installports.sh	Sat Sep 16 10:36:17 2017	(r449960)
@@ -0,0 +1,11 @@
+--- extra/installports.sh.orig	2007-01-04 18:28:56 UTC
++++ extra/installports.sh
+@@ -35,7 +35,7 @@ if [ ! -z "${INSTALL_PORTS}" ]; then
+ 	mkdir -p ${BASEDIR}/usr/ports ${BASEDIR}/usr/src
+ 	mount_nullfs ${PORTSDIR:-/usr/ports} ${BASEDIR}/usr/ports
+ 	mount_nullfs ${SRCDIR:-/usr/src} ${BASEDIR}/usr/src
+-	mount_devfs none ${BASEDIR}/dev
++	mount -t devfs none ${BASEDIR}/dev
+ 
+ 	print_error_umount() {
+ 		echo "Something went wrong, check errors!" >&2

Added: head/sysutils/freesbie/files/patch-extra_varmfs.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/freesbie/files/patch-extra_varmfs.sh	Sat Sep 16 10:36:17 2017	(r449960)
@@ -0,0 +1,8 @@
+--- extra/varmfs.sh.orig	2006-04-24 11:14:33 UTC
++++ extra/varmfs.sh
+@@ -28,4 +28,4 @@ mtree -Pcp ${BASEDIR}/var > ${TMPFILE}
+ mv ${TMPFILE} ${BASEDIR}/etc/mtree/var.dist
+ 
+ echo "Generating pkg_info.txt"
+-chroot ${BASEDIR} pkg_info > ${BASEDIR}/pkg_info.txt
++chroot ${BASEDIR} pkg info > ${BASEDIR}/pkg_info.txt

Copied and modified: head/sysutils/freesbie/files/patch-scripts_iso.sh (from r449959, head/sysutils/freesbie/files/patch-scripts-iso.sh)
==============================================================================
--- head/sysutils/freesbie/files/patch-scripts-iso.sh	Sat Sep 16 09:42:21 2017	(r449959, copy source)
+++ head/sysutils/freesbie/files/patch-scripts_iso.sh	Sat Sep 16 10:36:17 2017	(r449960)
@@ -1,6 +1,6 @@
---- scripts/iso.sh.orig	2006-10-01 14:00:47.000000000 +0200
-+++ scripts/iso.sh	2011-11-06 18:07:26.544790101 +0100
-@@ -48,7 +48,7 @@
+--- scripts/iso.sh.orig	2006-10-01 12:00:47 UTC
++++ scripts/iso.sh
+@@ -48,7 +48,7 @@ cd ${CLONEDIR}
  
  echo "Running mkisofs..."
  

Added: head/sysutils/freesbie/files/patch-scripts_pkginstall.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/freesbie/files/patch-scripts_pkginstall.sh	Sat Sep 16 10:36:17 2017	(r449960)
@@ -0,0 +1,61 @@
+--- scripts/pkginstall.sh.orig	2007-01-16 10:14:46 UTC
++++ scripts/pkginstall.sh
+@@ -52,7 +52,7 @@ find_origins() {
+ 
+ 	# pkg_info might fail if the listed package isn't present
+ 	set +e
+-	origins=$(pkg_info -EX "^$(escape_pkg ${pkg})($|-[^-]+$)")
++	origins=$(pkg query -x "%n-%v" "^$(escape_pkg ${pkg})($|-[^-]+$)")
+ 	retval=$?
+ 	set -e
+ 	if [ ${retval} -eq 0 ]; then
+@@ -84,7 +84,7 @@ find_deps() {
+     touch deps
+     echo -n "Finding dependencies... "
+     while read pkg; do
+-	deps=$(pkg_info -qr ${pkg} | cut -d ' ' -f 2)
++	deps=$(pkg query "%dn-%dv" ${pkg})
+ 	for dep in ${deps}; do
+ 	    echo ${dep} >> tmp_deps
+ 	done      
+@@ -142,7 +142,7 @@ copy_packages() {
+     export PACKAGE_BUILDING=yo
+     chrootpkgpath=${CHROOTWD#$BASEDIR}
+     pkgfile=${WORKDIR}/sortpkg
+-    pkgaddcmd="chroot ${BASEDIR} pkg_add -v"
++    pkgaddcmd="/usr/local/sbin/pkg -c ${BASEDIR} add -f "
+     totpkg=$(wc -l $pkgfile | awk '{print $1}')
+     echo "Copying ${totpkg} packages"
+     cd ${CHROOTWD}
+@@ -159,7 +159,11 @@ copy_packages() {
+ 	count=$((${count} + 1))
+ 
+ 	echo "Running pkg_create -b ${pkg} ${CHROOTWD}/${pkg}.tar" >> ${LOGFILE}
+-	pkg_create -b ${pkg} ${CHROOTWD}/${pkg}.tar >> ${LOGFILE} 2>&1
++	rpkg=`pkg query %dn-%dv ${pkg}` 
++	for spkg in ${rpkg}; do
++		pkg create -o ${CHROOTWD} -n -f tar ${spkg} >> ${LOGFILE} 2>&1
++	done
++	pkg create -o ${CHROOTWD} -n -f tar ${pkg} >> ${LOGFILE} 2>&1
+ 
+ 	echo "Running $pkgaddcmd ${chrootpkgpath}/${pkg}.tar" >> ${LOGFILE}
+ 	$pkgaddcmd ${chrootpkgpath}/${pkg}.tar >> ${LOGFILE} 2>&1
+@@ -168,12 +172,17 @@ copy_packages() {
+ 
+     done < $pkgfile
+     echo "]"
++    if [ -f ${WORKDIR}/extra/customroot/var/db ]; then
++	chroot ${BASEDIR} pkg backup -d test.db
++	env PKG_DBDIR=${WORKDIR}extra/customroot/var/db/pkg pkg backup -r ${BASEDIR}/test.db
++	rm ${BASEDIR}/test.db
++    fi
+     set -e
+ }
+ 
+ delete_old_packages() {
+     echo "Deleting previously installed packages"
+-    chroot ${BASEDIR} pkg_delete -a >> ${LOGFILE} 2>&1
++    pkg -c ${BASEDIR} delete -afy >> ${LOGFILE} 2>&1
+ }
+ 
+ # Deletes workdirs

Added: head/sysutils/freesbie/files/patch-scripts_pkgselect.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/freesbie/files/patch-scripts_pkgselect.sh	Sat Sep 16 10:36:17 2017	(r449960)
@@ -0,0 +1,29 @@
+--- scripts/pkgselect.sh.orig	2006-05-26 23:20:09 UTC
++++ scripts/pkgselect.sh
+@@ -21,7 +21,7 @@ PKGFILE=${PKGFILE:-${LOCALDIR}/conf/pack
+ 
+ # Check if there are packages installed on the system
+ check_pkgs() {
+-    count=$(pkg_info -Qoa | wc -l)
++    count=$(pkg query -a "%n-%v:%o" | wc -l)
+     if [ ${count} -eq 0 ]; then
+ 	/usr/bin/dialog --title "FreeSBIE Packages selection" --clear \
+ 	--msgbox "Sorry, you don't have any packages installed.\n\nPlease install at least the packages you want\nto include in your distribution." 10 50
+@@ -40,7 +40,7 @@ create_lists() {
+     # Create a different file for each category. Each row in each file
+     # will look like:
+     # PKGNAME PKGNAME-version    
+-    pkg_info -Qoa | awk \
++    pkg query -a "%n-%v:%o" | awk \
+ ' BEGIN { FS=":|/" } 
+ { 
+     a=$1;
+@@ -63,7 +63,7 @@ create_lists() {
+ 
+ 	    # pkg_info might fail if the listed package isn't present
+ 	    set +e
+-	    origins=$(pkg_info -QoX "^$(escape_pkg ${pkg})($|-[^-]+$)")
++	    origins=$(pkg query -x "%n-%v:%o" "^$(escape_pkg ${pkg})($|-[^-]+$)")
+ 	    retval=$?
+ 	    set -e
+ 	    if [ ${retval} -eq 0 ]; then

Added: head/sysutils/freesbie/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/freesbie/pkg-message	Sat Sep 16 10:36:17 2017	(r449960)
@@ -0,0 +1,5 @@
+===========================================================================
+Note that the FreeSBIE project is not actively maintained. There were no
+upstream releases since 2007. If you are a regular user of this port,
+please consider adopting the upstream project.
+===========================================================================



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