Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Mar 2014 03:08:24 GMT
From:      TAKEMON Takashi <takemon@bamboogate.co.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/187187: freesbie for pkgng
Message-ID:  <201403020308.s2238OEP073799@cgiserv.freebsd.org>
Resent-Message-ID: <201403020310.s223A0Vn071724@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187187
>Category:       ports
>Synopsis:       freesbie for pkgng
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 02 03:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     TAKEMON Takashi
>Release:        
>Organization:
Bamboogate CO.,LTD
>Environment:
FreeBSD zfs2 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
freesbie environment allows you to create a 1CD system very easily.
But adding the package now I can not in pkgng environment.
So, we created a patch to address pkgng.

>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	patch-conf-i386-FREESBIE
#	patch-scripts-pkginstall.sh
#	patch-scripts-pkgselect.sh
#
echo x - patch-conf-i386-FREESBIE
sed 's/^X//' >patch-conf-i386-FREESBIE << 'e5354f9ec278acc0980a3577610c5674'
X--- conf/i386/FREESBIE.org	2006-07-24 04:35:29.000000000 +0900
X+++ conf/i386/FREESBIE	2014-02-27 01:03:01.000000000 +0900
X@@ -1,286 +1,5 @@
X-# $FreeBSD$
X-# $Id: FREESBIE,v 1.6 2006/07/23 19:35:29 rionda Exp $
X-
X-machine		i386
X-cpu		I486_CPU
X-cpu		I586_CPU
X-cpu		I686_CPU
X-ident		FREESBIE
X-
X-# To statically compile in device wiring instead of /boot/device.hints
X-#hints		"GENERIC.hints"		# Default places to look for devices.
X-
X-#options 	SCHED_ULE		# ULE scheduler
X-options 	SCHED_4BSD		# 4BSD scheduler
X-options 	PREEMPTION		# Enable kernel thread preemption
X-options 	INET			# InterNETworking
X-options 	INET6			# IPv6 communications protocols
X-options 	FFS			# Berkeley Fast Filesystem
X-options 	SOFTUPDATES		# Enable FFS soft updates support
X-options 	UFS_ACL			# Support for access control lists
X-options 	UFS_DIRHASH		# Improve performance on big directories
X-options 	MD_ROOT			# MD is a potential root device
X-options 	NFSCLIENT		# Network Filesystem Client
X-options 	NFSSERVER		# Network Filesystem Server
X-options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
X-options 	MSDOSFS			# MSDOS Filesystem
X-options 	CD9660			# ISO 9660 Filesystem
X-options 	PROCFS			# Process filesystem (requires PSEUDOFS)
X-options 	PSEUDOFS		# Pseudo-filesystem framework
X-options 	GEOM_GPT		# GUID Partition Tables.
X-options 	COMPAT_43		# Compatible with BSD 4.3 [KEEP THIS!]
X-options 	COMPAT_FREEBSD5		# Compatible with FreeBSD4
X-options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
X-options 	KTRACE			# ktrace(1) support
X-options 	SYSVSHM			# SYSV-style shared memory
X-options 	SYSVMSG			# SYSV-style message queues
X-options 	SYSVSEM			# SYSV-style semaphores
X-options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
X-options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
X-options 	AHC_REG_PRETTY_PRINT	# Print register bitfields in debug
X-					# output.  Adds ~128k to driver.
X-options 	AHD_REG_PRETTY_PRINT	# Print register bitfields in debug
X-					# output.  Adds ~215k to driver.
X-options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.
X-options 	UNIONFS			# Union filesystem
X-
X-# To make an SMP kernel, the next two lines are needed
X-options 	SMP			# Symmetric MultiProcessor Kernel
X-device		apic			# I/O APIC
X-
X-# Bus support.  Do not remove isa, even if you have no isa slots
X-device		eisa
X-device		pci
X-
X-device 		firmware
X-# Floppy drives
X-device		fdc
X-
X-# ATA and ATAPI devices
X-device		ata
X-device		atadisk		# ATA disk drives
X-device		ataraid		# ATA RAID drives
X-device		atapicd		# ATAPI CDROM drives
X-device		atapifd		# ATAPI floppy drives
X-device		atapist		# ATAPI tape drives
X-options 	ATA_STATIC_ID	# Static device numbering
X-
X-# SCSI Controllers
X-device		ahb		# EISA AHA1742 family
X-device		ahc		# AHA2940 and onboard AIC7xxx devices
X-device		ahd		# AHA39320/29320 and onboard AIC79xx devices
X-device		amd		# AMD 53C974 (Tekram DC-390(T))
X-device		isp		# Qlogic family
X-#device 	ispfw	# Firmware for QLogic HBAs- normally a module
X-device		mpt		# LSI-Logic MPT-Fusion
X-#device		ncr		# NCR/Symbios Logic
X-device		sym		# NCR/Symbios Logic (newer chipsets + those of `ncr')
X-device		trm		# Tekram DC395U/UW/F DC315U adapters
X-
X-device		adv		# Advansys SCSI adapters
X-device		adw		# Advansys wide SCSI adapters
X-device		aha		# Adaptec 154x SCSI adapters
X-device		aic		# Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
X-device		bt		# Buslogic/Mylex MultiMaster SCSI adapters
X-
X-device		ncv		# NCR 53C500
X-device		nsp		# Workbit Ninja SCSI-3
X-device		stg		# TMC 18C30/18C50
X-
X-# SCSI peripherals
X-device		scbus		# SCSI bus (required for SCSI)
X-device		ch		# SCSI media changers
X-device		da		# Direct Access (disks)
X-device		sa		# Sequential Access (tape etc)
X-device		cd		# CD
X-device		pass		# Passthrough device (direct SCSI access)
X-device		ses		# SCSI Environmental Services (and SAF-TE)
X-
X-# RAID controllers interfaced to the SCSI subsystem
X-device		amr		# AMI MegaRAID
X-device		arcmsr		# Areca SATA II RAID
X-device		asr		# DPT SmartRAID V, VI and Adaptec SCSI RAID
X-device		ciss		# Compaq Smart RAID 5*
X-device		dpt		# DPT Smartcache III, IV - See NOTES for options
X-device		hptmv		# Highpoint RocketRAID 182x
X-device		iir		# Intel Integrated RAID
X-device		ips		# IBM (Adaptec) ServeRAID
X-device		mly		# Mylex AcceleRAID/eXtremeRAID
X-device		twa		# 3ware 9000 series PATA/SATA RAID
X-
X-# RAID controllers
X-device		aac		# Adaptec FSA RAID
X-device		aacp		# SCSI passthrough for aac (requires CAM)
X-device		ida		# Compaq Smart RAID
X-device		mlx		# Mylex DAC960 family
X-device		pst		# Promise Supertrak SX6000
X-device		twe		# 3ware ATA RAID
X-
X-# atkbdc0 controls both the keyboard and the PS/2 mouse
X-device		atkbdc		# AT keyboard controller
X-device		atkbd		# AT keyboard
X-device		psm		# PS/2 mouse
X-
X-device		vga		# VGA video card driver
X-
X-device		splash		# Splash screen and screen saver support
X-
X-# syscons is the default console driver, resembling an SCO console
X-device		sc
X-
X-# Enable this for the pcvt (VT220 compatible) console driver
X-#device		vt
X-#options 	XSERVER		# support for X server on a vt console
X-#options 	FAT_CURSOR	# start with block cursor
X-
X-device		agp		# support several AGP chipsets
X-
X-
X-# Power management support (see NOTES for more options)
X-#device		apm
X-# Add suspend/resume support for the i8254.
X-device		pmtimer
X-
X-# PCCARD (PCMCIA) support
X-# PCMCIA and cardbus bridge support
X-device		cbb		# cardbus (yenta) bridge
X-device		pccard		# PC Card (16-bit) bus
X-device		cardbus		# CardBus (32-bit) bus
X-
X-# Serial (COM) ports
X-device		sio		# 8250, 16[45]50 based serial ports
X-
X-# Parallel port
X-device		ppc
X-device		ppbus		# Parallel port bus (required)
X-device		lpt		# Printer
X-device		plip		# TCP/IP over parallel
X-device		ppi		# Parallel port interface device
X-#device		vpo		# Requires scbus and da
X-
X-# If you've got a "dumb" serial or parallel PCI card that is
X-# supported by the puc(4) glue driver, uncomment the following
X-# line to enable it (connects to the sio and/or ppc drivers):
X-#device 	puc
X-
X-# PCI Ethernet NICs.
X-device		de		# DEC/Intel DC21x4x (``Tulip'')
X-device		em		# Intel PRO/1000 adapter Gigabit Ethernet Card
X-device		ixgb		# Intel PRO/10GbE Ethernet Card
X-device		txp		# 3Com 3cR990 (``Typhoon'')
X-device		vx		# 3Com 3c590, 3c595 (``Vortex'')
X-
X-# PCI Ethernet NICs that use the common MII bus controller code.
X-# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
X-device		miibus		# MII bus support
X-device		bfe		# Broadcom BCM440x 10/100 Ethernet
X-device		bge		# Broadcom BCM570xx Gigabit Ethernet
X-device		dc		# DEC/Intel 21143 and various workalikes
X-device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
X-device		lge		# Level 1 LXT1001 gigabit Ethernet
X-device		nge		# NatSemi DP83820 gigabit Ethernet
X-device		nve		# nVidia nForce MCP on-board Ethernet Networking
X-device		pcn		# AMD Am79C97x PCI 10/100(precedence over 'lnc')
X-device		re		# RealTek 8139C+/8169/8169S/8110S
X-device		rl		# RealTek 8129/8139
X-device		sf		# Adaptec AIC-6915 (``Starfire'')
X-device		sis		# Silicon Integrated Systems SiS 900/SiS 7016
X-device		sk		# SysKonnect SK-984x & SK-982x gigabit Ethernet
X-device		ste		# Sundance ST201 (D-Link DFE-550TX)
X-device		ti		# Alteon Networks Tigon I/II gigabit Ethernet
X-device		tl		# Texas Instruments ThunderLAN
X-device		tx		# SMC EtherPower II (83c170 ``EPIC'')
X-device		vge		# VIA VT612x gigabit Ethernet
X-device		vr		# VIA Rhine, Rhine II
X-device		wb		# Winbond W89C840F
X-device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')
X-
X-# ISA Ethernet NICs.  pccard NICs included.
X-device		cs		# Crystal Semiconductor CS89x0 NIC
X-# 'device ed' requires 'device miibus'
X-device		ed		# NE[12]000, SMC Ultra, 3c503, DS8390 cards
X-device		ex		# Intel EtherExpress Pro/10 and Pro/10+
X-device		ep		# Etherlink III based cards
X-device		fe		# Fujitsu MB8696x based cards
X-device		ie		# EtherExpress 8/16, 3C507, StarLAN 10 etc.
X-device		lnc		# NE2100, NE32-VL Lance Ethernet cards
X-device		sn		# SMC's 9000 series of Ethernet chips
X-device		xe		# Xircom pccard Ethernet
X-
X-# ISA devices that use the old ISA shims
X-#device		le
X-
X-# Wireless NIC cards
X-device		wlan		# 802.11 support
X-device		an		# Aironet 4500/4800 802.11 wireless NICs.
X-device		awi		# BayStack 660 and others
X-device		ral		# Ralink Technology RT2500 wireless NICs.
X-device		wi		# WaveLAN/Intersil/Symbol 802.11 wireless NICs.
X-#device		wl		# Older non 802.11 Wavelan wireless NIC.
X-
X-# Pseudo devices.
X-device		loop		# Network loopback
X-device		random		# Entropy device
X-device		ether		# Ethernet support
X-device		sl		# Kernel SLIP
X-device		ppp		# Kernel PPP
X-device		tun		# Packet tunnel.
X-device		pty		# Pseudo-ttys (telnet etc)
X-device		md		# Memory "disks"
X-device		gif		# IPv6 and IPv4 tunneling
X-device		faith		# IPv6-to-IPv4 relaying (translation)
X-
X-# The `bpf' device enables the Berkeley Packet Filter.
X-# Be aware of the administrative consequences of enabling this!
X-# Note that 'bpf' is required for DHCP.
X-device		bpf		# Berkeley packet filter
X-
X-# USB support
X-device		uhci		# UHCI PCI->USB interface
X-device		ohci		# OHCI PCI->USB interface
X-device		ehci		# EHCI PCI->USB interface (USB 2.0)
X-device		usb		# USB Bus (required)
X-#device		udbp		# USB Double Bulk Pipe devices
X-device		ugen		# Generic
X-device		uhid		# "Human Interface Devices"
X-device		ukbd		# Keyboard
X-device		ulpt		# Printer
X-device		umass		# Disks/Mass storage - Requires scbus and da
X-device		ums		# Mouse
X-device		ural		# Ralink Technology RT2500USB wireless NICs
X-device		urio		# Diamond Rio 500 MP3 player
X-device		uscanner	# Scanners
X-# USB Ethernet, requires miibus
X-device		aue		# ADMtek USB Ethernet
X-device		axe		# ASIX Electronics USB Ethernet
X-device		cdce		# Generic USB over Ethernet
X-device		cue		# CATC USB Ethernet
X-device		kue		# Kawasaki LSI USB Ethernet
X-device		rue		# RealTek RTL8150 USB Ethernet
X-
X-# FireWire support
X-device		firewire	# FireWire bus code
X-device		sbp		# SCSI over FireWire (Requires scbus and da)
X-device		fwe		# Ethernet over FireWire (non-standard!)
X-device		fwip		# IP over FireWire (rfc2734 and rfc3146)
X-
X-device		bktr
X-
X-options		IPFIREWALL			#firewall
X-options		IPFIREWALL_VERBOSE		#print information about
X-options		IPFIREWALL_DEFAULT_TO_ACCEPT    #allow everything by default
X-
X-device		pf				#PF OpenBSD packet-filter firewall
X-device		pflog				#logging support interface for PF
X-device		pfsync				#synchronization interface for PF
X-
X-options		IPSTEALTH
X-options		IPDIVERT
X-options		TCP_DROP_SYNFIN			#drop TCP packets with SYN+FIN
X-
X-options		GEOM_UZIP		# Read-only compressed disks
X-options 	GEOM_LABEL		# Providers labelization.
X-
X-options		VESA
X-options		SC_PIXEL_MODE
X-
X+include /usr/src/sys/i386/conf/GENERIC
X+ident FREESBIE
X+options GEOM_UZIP # Read-only compressed disks
X+options GEOM_LABEL # Providers labelization.
X+options UNIONFS # Union filesystem
e5354f9ec278acc0980a3577610c5674
echo x - patch-scripts-pkginstall.sh
sed 's/^X//' >patch-scripts-pkginstall.sh << '8c865a206843a7b4b6f05ea3a169de88'
X--- scripts/pkginstall.sh.org	2014-02-16 11:43:29.000000000 +0900
X+++ scripts/pkginstall.sh	2014-03-02 11:02:22.000000000 +0900
X@@ -52,7 +52,7 @@
X 
X 	# pkg_info might fail if the listed package isn't present
X 	set +e
X-	origins=$(pkg_info -EX "^$(escape_pkg ${pkg})($|-[^-]+$)")
X+	origins=$(pkg query -x "%n-%v" "^$(escape_pkg ${pkg})($|-[^-]+$)")
X 	retval=$?
X 	set -e
X 	if [ ${retval} -eq 0 ]; then
X@@ -84,7 +84,7 @@
X     touch deps
X     echo -n "Finding dependencies... "
X     while read pkg; do
X-	deps=$(pkg_info -qr ${pkg} | cut -d ' ' -f 2)
X+	deps=$(pkg query "%dn-%dv" ${pkg})
X 	for dep in ${deps}; do
X 	    echo ${dep} >> tmp_deps
X 	done      
X@@ -142,7 +142,7 @@
X     export PACKAGE_BUILDING=yo
X     chrootpkgpath=${CHROOTWD#$BASEDIR}
X     pkgfile=${WORKDIR}/sortpkg
X-    pkgaddcmd="chroot ${BASEDIR} pkg_add -v"
X+    pkgaddcmd="chroot ${BASEDIR} pkg add -f "
X     totpkg=$(wc -l $pkgfile | awk '{print $1}')
X     echo "Copying ${totpkg} packages"
X     cd ${CHROOTWD}
X@@ -159,7 +159,11 @@
X 	count=$((${count} + 1))
X 
X 	echo "Running pkg_create -b ${pkg} ${CHROOTWD}/${pkg}.tar" >> ${LOGFILE}
X-	pkg_create -b ${pkg} ${CHROOTWD}/${pkg}.tar >> ${LOGFILE} 2>&1
X+	rpkg=`pkg query %dn-%dv ${pkg}` 
X+	for spkg in ${rpkg}; do
X+		pkg create -o ${CHROOTWD} -n -f tar ${spkg} >> ${LOGFILE} 2>&1
X+	done
X+	pkg create -o ${CHROOTWD} -n -f tar ${pkg} >> ${LOGFILE} 2>&1
X 
X 	echo "Running $pkgaddcmd ${chrootpkgpath}/${pkg}.tar" >> ${LOGFILE}
X 	$pkgaddcmd ${chrootpkgpath}/${pkg}.tar >> ${LOGFILE} 2>&1
X@@ -168,12 +172,17 @@
X 
X     done < $pkgfile
X     echo "]"
X+    if [ -f ${WORKDIR}/extra/customroot/var/db ]; then
X+	chroot ${BASEDIR} pkg backup -d test.db
X+	env PKG_DBDIR=${WORKDIR}extra/customroot/var/db/pkg pkg backup -r ${BASEDIR}/test.db
X+	rm ${BASEDIR}/test.db
X+    fi
X     set -e
X }
X 
X delete_old_packages() {
X     echo "Deleting previously installed packages"
X-    chroot ${BASEDIR} pkg_delete -a >> ${LOGFILE} 2>&1
X+    chroot ${BASEDIR} pkg query %n-%v | grep -v pkg- | sed "s|^|chroot ${BASEDIR} pkg delete -fy  |g" |sh 
X }
X 
X # Deletes workdirs
X@@ -182,6 +191,16 @@
X     rm -rf ${WORKDIR} ${BASEDIR}/tmp/freesbie*
X }
X 
X+#pkgng install
X+pkgng_bootstrap() {
X+    if [ ! -f ${BASEDIR}/usr/local/sbin/pkg ]; then
X+	if [ ! -f ${BASEDIR}/etc/resolv.conf ]; then
X+	    echo "nameserver 8.8.8.8" >> ${BASEDIR}/etc/resolv.conf
X+	fi
X+	chroot ${BASEDIR} pkg bootstrap
X+    fi
X+}
X+
X trap "purge_wd && exit 1" INT
X 
X echo "Installing packages listed in ${PKGFILE}"
X@@ -194,6 +213,7 @@
X 
X find_deps
X sort_packages
X+pkgng_bootstrap
X delete_old_packages
X copy_packages
X purge_wd
8c865a206843a7b4b6f05ea3a169de88
echo x - patch-scripts-pkgselect.sh
sed 's/^X//' >patch-scripts-pkgselect.sh << '842c40c17145776c5512ec9bb20c933d'
X--- scripts/pkgselect.sh.org	2014-02-16 02:43:17.000000000 +0000
X+++ scripts/pkgselect.sh	2014-02-25 20:55:34.000000000 +0000
X@@ -21,7 +21,7 @@
X 
X # Check if there are packages installed on the system
X check_pkgs() {
X-    count=$(pkg_info -Qoa | wc -l)
X+    count=$(pkg query -a "%n-%v:%o" | wc -l)
X     if [ ${count} -eq 0 ]; then
X 	/usr/bin/dialog --title "FreeSBIE Packages selection" --clear \
X 	--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
X@@ -40,7 +40,7 @@
X     # Create a different file for each category. Each row in each file
X     # will look like:
X     # PKGNAME PKGNAME-version    
X-    pkg_info -Qoa | awk \
X+    pkg query -a "%n-%v:%o" | awk \
X ' BEGIN { FS=":|/" } 
X { 
X     a=$1;
X@@ -63,7 +63,7 @@
X 
X 	    # pkg_info might fail if the listed package isn't present
X 	    set +e
X-	    origins=$(pkg_info -QoX "^$(escape_pkg ${pkg})($|-[^-]+$)")
X+	    origins=$(pkg query -x "%n-%v:%o" "^$(escape_pkg ${pkg})($|-[^-]+$)")
X 	    retval=$?
X 	    set -e
X 	    if [ ${retval} -eq 0 ]; then
842c40c17145776c5512ec9bb20c933d
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



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