Bug 177220

Summary: New Port: ports-mgmt/chucky
Product: Ports & Packages Reporter: Waitman Gobble <uzimac>
Component: Individual Port(s)Assignee: Steven Kreuzer <skreuzer>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.shar none

Description Waitman Gobble 2013-03-22 04:30:00 UTC
This program reads /var/db/pkg/local.sqlite and compares install timestamp with
date in $FreeBSD header in the Makefile of the port. If there is no $FreeBSD
header then it is assumed to be a beta port.

 Command line switches:
                -u      show ports with update status only
                -o      show ports with current status only
                -b      show ports with beta status only
                -t      show timestamps (debug, etc)
                -a      create shar of files (usefull with -a). output to stdout
                -h      help
		-i	ignore fread() errors*

NOTE: shar files are created with absolute path (ie /usr/ports/src/dir)
so executing them will restore to that path. Multiple shars are concatenated
by chucky stripping the 'exit' command from the output. (ie there is no 'exit'
in the shar output. the shar output is to stdout, if you want to save:

# chucky -b -a > save.shar

This will save all the ports marked 'beta' in the save.shar archive,
in the cwd.

Edit Makefile if you dont put stuff in /usr/local

example:
# chucky

 {OK}		p:1359956798 i:1363325950       x11/xpr 1.0.4
 {OK}		p:1342304958 i:1363325954       x11/xprop 1.2.1
 {beta}		p:---------- i:1363045617       x11/xproto 7.0.22
 {OK}		p:1362771552 i:1363325959       x11/xrandr 1.4.0
 {updates}	p:1366304958 i:1363325962       x11/xrdb 1.0.9

{OK} means there is no update available
{beta} is a beta port
{updates} means the version in /usr/ports is newer than install date

the right columns show the port location, ie /usr/ports/x11/xrdb
and the version currently installed on the system.

depends on /var/db/pkg/local.sqlite which is managed by the pkg system.
(see /usr/ports/ports-mgmt/pkg)

*ignore fread errors: if you are working on developing ports outside the
ports tree you may receive an error because the port is listed in the database
but it does not exist in the ports tree. if you use the -i flag it will continue
without an error message.

Fix: Patch attached with submission follows:
Comment 1 Steven Kreuzer freebsd_committer freebsd_triage 2013-07-09 14:37:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->skreuzer

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-08-23 18:40:03 UTC
Author: skreuzer
Date: Fri Aug 23 17:39:54 2013
New Revision: 325275
URL: http://svnweb.freebsd.org/changeset/ports/325275

Log:
  This program reads /var/db/pkg/local.sqlite and compares install timestamp with
  date in $FreeBSD header in the Makefile of the port. If there is no $FreeBSD
  header then it is assumed to be a beta port.
  
  Chucky also features a shar file backup feature, which is normally used to
  backup 'beta' development ports.
  
  WWW:    https://dx.burplex.com/bin/chucky.html
  
  PR:		ports/177220
  Submitted by:	Waitman Gobble <uzimac@da3m0n8t3r.com>

Added:
  head/ports-mgmt/chucky/
  head/ports-mgmt/chucky/Makefile   (contents, props changed)
  head/ports-mgmt/chucky/distinfo   (contents, props changed)
  head/ports-mgmt/chucky/files/
  head/ports-mgmt/chucky/files/pkg-message.in   (contents, props changed)
  head/ports-mgmt/chucky/pkg-descr   (contents, props changed)
  head/ports-mgmt/chucky/pkg-plist   (contents, props changed)
Modified:
  head/ports-mgmt/Makefile

Modified: head/ports-mgmt/Makefile
==============================================================================
--- head/ports-mgmt/Makefile	Fri Aug 23 17:39:25 2013	(r325274)
+++ head/ports-mgmt/Makefile	Fri Aug 23 17:39:54 2013	(r325275)
@@ -6,6 +6,7 @@
     SUBDIR += bpkg
     SUBDIR += bpm
     SUBDIR += bxpkg
+    SUBDIR += chucky
     SUBDIR += dialog4ports
     SUBDIR += distilator
     SUBDIR += fastest_sites

Added: head/ports-mgmt/chucky/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/chucky/Makefile	Fri Aug 23 17:39:54 2013	(r325275)
@@ -0,0 +1,44 @@
+# Created by: "Waitman Gobble" <uzimac@da3m0n8t3r.com>
+# $FreeBSD$
+
+PORTNAME=	chucky
+PORTVERSION=	1.0
+CATEGORIES=	ports-mgmt
+MASTER_SITES=	GH
+DISTNAME=	${GH_ACCOUNT}-${GH_PROJECT}-${PORTVERSION}-0-g${GH_COMMIT}
+
+MAINTAINER=	waitman@waitman.net
+COMMENT=	Port installed version check/report with shar archival
+
+LICENSE=	CHUCKY
+LICENSE_NAME=	CHUCKY BSD LICENSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+LICENSE_PERMS=	${_LICENSE_PERMS_DEFAULT}
+
+LIB_DEPENDS=	pkg:${PORTSDIR}/ports-mgmt/pkg \
+		sqlite3:${PORTSDIR}/databases/sqlite3
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	waitman
+GH_PROJECT=	chucky
+GH_TAGNAME=	075defe
+GH_COMMIT=	${GH_TAGNAME}
+
+WRKSRC=		${WRKDIR}/waitman-chucky-075defe
+
+MAN7=		chucky.7
+
+SUB_FILES=	pkg-message
+SUB_LIST=	MAN7PREFIX="${MAN7PREFIX}"
+PORTDOCS=	*
+
+.include <bsd.port.options.mk>
+
+post-install:
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
+	@${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>

Added: head/ports-mgmt/chucky/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/chucky/distinfo	Fri Aug 23 17:39:54 2013	(r325275)
@@ -0,0 +1,2 @@
+SHA256 (waitman-chucky-1.0-0-g075defe.tar.gz) = bf7fa32c5584725fa6c2d1d0951cf0f29488307d5a73d81b2df47d59617bc6d6
+SIZE (waitman-chucky-1.0-0-g075defe.tar.gz) = 4367

Added: head/ports-mgmt/chucky/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/chucky/files/pkg-message.in	Fri Aug 23 17:39:54 2013	(r325275)
@@ -0,0 +1,14 @@
+************************************************************************
+
+NOTICE
+
+man page is installed in %%MAN7PREFIX%%/man/man7, if you do not yet
+have the configuration in /etc/man.conf, add
+
+MANPATH /usr/local/share/man
+
+to view all man pages which are installed in /usr/local/share/man/manX/
+
+
+************************************************************************
+

Added: head/ports-mgmt/chucky/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/chucky/pkg-descr	Fri Aug 23 17:39:54 2013	(r325275)
@@ -0,0 +1,8 @@
+This program reads /var/db/pkg/local.sqlite and compares install timestamp with
+date in $FreeBSD header in the Makefile of the port. If there is no $FreeBSD
+header then it is assumed to be a beta port.
+
+Chucky also features a shar file backup feature, which is normally used to
+backup 'beta' development ports.
+
+WWW:    https://dx.burplex.com/bin/chucky.html

Added: head/ports-mgmt/chucky/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/chucky/pkg-plist	Fri Aug 23 17:39:54 2013	(r325275)
@@ -0,0 +1 @@
+bin/chucky
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Steven Kreuzer freebsd_committer freebsd_triage 2013-08-23 18:40:09 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!