socsvn commit: r256209 - in soc2013/jmuniz/personal: documentation ports/PackageKit-0.6.11/packagekit ports/PackageKit-0.6.11/packagekit/files ports/PackageKit-0.6.11/packagekit/files/netpackagekit...

jmuniz at FreeBSD.org jmuniz at FreeBSD.org
Tue Aug 20 15:38:00 UTC 2013


Author: jmuniz
Date: Tue Aug 20 15:38:00 2013
New Revision: 256209
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=256209

Log:

Added:
  soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/files/netpackagekitd/
  soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/files/netpackagekitd.in
  soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/files/netpackagekitd/netpackagekit.c
  soc2013/jmuniz/personal/tools/testing.sh
Modified:
  soc2013/jmuniz/personal/documentation/TODO
  soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/Makefile
  soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/pkg-plist
  soc2013/jmuniz/personal/ports/gnome-packagekit-2.32.0/gnome-packagekit/Makefile
  soc2013/jmuniz/personal/source/PackageKit-0.6.11/backends/Makefile.am
  soc2013/jmuniz/personal/source/PackageKit-0.6.11/configure
  soc2013/jmuniz/personal/source/PackageKit-0.6.11/configure.ac

Modified: soc2013/jmuniz/personal/documentation/TODO
==============================================================================
--- soc2013/jmuniz/personal/documentation/TODO	Tue Aug 20 14:59:31 2013	(r256208)
+++ soc2013/jmuniz/personal/documentation/TODO	Tue Aug 20 15:38:00 2013	(r256209)
@@ -5,57 +5,42 @@
 Tasks are ordered hierarchically: the hyphens indicate the level of each node and any leafs 
 they contain, and plus signs identify nodes with leafs.
 
-This document
--------------
-- delve more into specifics
-+ areas that need work
--- README
--+ TESTING
---- instructions on configuring, building, and installing development sources
--+ NEWS
---- track user oriented changes in this log to show current progress
--+ INSTALL
---- instructions on configuring, building, and installing official releases
--+ THANKS
---- add credits, urls, and licenses of works used
--- FAQ
--- Wiki
--- Makefile
--- PK-0.6.11 patches
--- KPackageKit port
--- KPackageKit patches
--- gnome-packagekit port
--- gnome-packagekit patches 
--- Patches for both front ends
-
 README
 ------
-- repository description
+- project / repository description
 - contact information
 - link to wiki for more information
-- bug tracking
-
-BUGS
-----
-+ document all bugs and limitations
--- any bugs that are discovered during testing
+- name of applicable software license
 
 NEWS
 ----
+- track user oriented changes in this log to show current progress
 
 INSTALL
 -------
+- once a plan is in place to publish an official release, the instructions to configure and install from the ports collection will be in this file
 
 THANKS
 ------
+- update to no longer reflect old hierarchy
+- list assets used
+- licenses
+- names of contributors, or a group name if possible
+- date that the source was accessed and the source version
+- url to source
+- project title
 
 FAQ
 ---
 - troubleshooting
 - usage
-- requirements
++ requirements
+-- lsof requires the kernel sources to build
 - bug tracking
-- repository hierarchy
+- repository directory hierarchy
++ status of each port
+-- which ports are being actively developed
+-- which ports are functioning
 
 TESTING
 -------
@@ -75,18 +60,25 @@
 - make sure that milestones are appropriate
 - present reflective journals
 - request feedback in the form of bug reports, suggestions, feature requests, patches, regression alerts, and other potentially useful information
-- add screenshots to present progress
+- add screenshots and video to present progress
 - instructions for using pk-setter
 - use cases for overall project
 - test results (with seed data, test output, and performance results)
 - link to Google-Melange project page
 - add more links to external documentation (for related work)
 - point out that svnweb is not synchronized as well as socsvn.freebsd.org
-
-Makefile
---------
-- contain all operations to test code
-- running 'make' in the root of the repository will provide instructions on using the Makefile
+- add "completed" column to milestone table
+- refer to new documentation files and locations
+- add links to new progress reports
+- finish deliverables section, adding instructions and other information
+
+testing.sh
+----------
+- keep track of steps in hidden file to allow for resuming
+- configure / build / install / deinstall / reinstall
+- patch
+- restore to unpatched state
+- internal dependency tracking for the ports in this repository, to make sure that all required ports are patched
 
 pk-setter
 ---------
@@ -99,9 +91,10 @@
 - configure pkg to use default repository
 - create a manual page
 - a way to reset PackageKit.conf to default using PackageKit.conf.sample
+- make pk-setter a packagekit runtime dependency so it is checked for after packagekit is installed
 
-PackageKit-0.6.11 patches
--------------------------
+PackageKit-0.6.11 source
+------------------------
 - show unavailable file lists by downloading the plist from freebsd.org
 - find out if packagekit-cron could work
 
@@ -112,9 +105,10 @@
 - create a file on installation to contain a list of installed back ends for pk-setter
 + Makefile
 -- find a better way to add site_ruby/1.8/pkgtools to ruby 1.9 include path
--- create an option to install pk-setter AFTER PK; this should prevent circular dependency
 -- replace manpage generation with a manpage patch
 -- save a copy of PackageKit.conf to PackageKit.conf.sample for default configuration recovery
+-- make sure that pkgng back end option includes all required dependencies
+-- change pkgng dependency check to library instead of executable
 + when Matt finishes the C back end
 -- update patches to permanent pkgng back end
 -- update pkg-plist to include the new files
@@ -129,10 +123,10 @@
 gnome-packagekit-2.32.0 port
 ----------------------------
 + optional
--- upgrade port to latest version
+-- upgrade port to gnome-packagekit-3.8.2
 
-KPackageKit-0.6.3.3 patches
----------------------------
+KPackageKit-0.6.3.3 source
+--------------------------
 - enable help button, patch in help files
 - when the user clicks "install updates", any get-details transactions generated by update-viewer should be cancelled
 + user interface files
@@ -140,42 +134,32 @@
 -- preference option available to keep selections when navigating tabs (default: true)
 -- clicking on an item in a dependency list should open that items information
 
-gnome-packagekit-2.32.0 patches
--------------------------------
+gnome-packagekit-2.32.0 source
+------------------------------
 + user interface files
 -+ gpk-application.ui
 --- convenient access to view updates, install from local file, and preferences
--+ gpk-backend-status.ui
--+ gpk-client.ui
--+ gpk-error.ui
--+ gpk-eula.ui
--+ gpk-log.ui
--+ gpk-prefs.ui
--+ gpk-repo.ui
--+ gpk-service-pack.ui
--+ gpk-signature.ui
 -+ gpk-update-viewer.ui
+--- clicking install should cancel the transaction to get package descriptions
 + source code files
 + optional features to look into
 -- service packs (perhaps replace tarball with PBI)
 -- mime type installation
 -- catalogs (would allow for sharing of toolkits for example)
 
-Patches for both front ends
+Sources for both front ends
 ---------------------------
 - have front ends remember with which back end a port was installed with, and use that back end for updates
 - customizable permissions (so some users may only update packages, or view data)
-- create a confirmation report, listing all changes
+- create a pre-confirmation report, listing all changes
 - easy repository management
 - easily switch between ports and binary packages
-- create mock up concepts
 - if front ends are new ports, combine the appearance of the front ends
 - update search results after each keystroke (using a timer delay to prevent extra overhead)
 - option to automatically start tray icons at boot
 - configure a port to change from development version to stable version once a specific stable version is released
 - add jail support, and easy selection of one or more jails to modify
 - manage remote systems and their jails in a centralized way
-- improve transaction history to include more information on each transaction
 - import and export packagekit and front end configuration files
 - install specific available versions of software (over the internet)
 - fail over to another back end if version is not available (help to get latest versions)
@@ -196,4 +180,6 @@
 - easy means of deleting distfiles
 - easy means of removing orphaned dependencies
 - let user reinstall a package
+- make sure Matt's back end provides the required output to communicate with front neds
+- test front ends for complaints to make sure all ports back end output can communicate with front ends
 

Modified: soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/Makefile
==============================================================================
--- soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/Makefile	Tue Aug 20 14:59:31 2013	(r256208)
+++ soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/Makefile	Tue Aug 20 15:38:00 2013	(r256209)
@@ -43,10 +43,11 @@
 MAKE_ARGS=	pkgconfigdir="${PREFIX}/libdata/pkgconfig"
 
 .if !defined(SLAVEPORT)
-OPTIONS_DEFINE= DOCS
+OPTIONS_DEFINE= DOCS NETWORKING
 OPTIONS_SINGLE= BACKEND
 OPTIONS_SINGLE_BACKEND=	PORTS PKGNG DUMMY
 OPTIONS_DEFAULT=PORTS
+NETWORKING_DESC=	Ability to manage PackageKit from a remote host
 PORTS_DESC=	Ruby back end for traditional or new binary packages 
 PKGNG_DESC=	C back end for PGN Next Generation, specifically
 DUMMY_DESC=	The dummy back end for developers
@@ -64,6 +65,13 @@
 CONFIGURE_ARGS+=--disable-man-pages
 .endif
 
+.if %{PORT_OPTIONS:MNETWORKING}
+USE_RC_SUBR=	netpackagekitd
+PLIST_SUB+=	NETWORKING=""
+.else
+PLIST_SUB+=	NETWORKING="@comment "
+.endif
+
 .if ${PORT_OPTIONS:MDUMMY}
 CONFIGURE_ARGS+=--with-default-backend=dummy \
 		--enable-dummy
@@ -73,7 +81,7 @@
 .endif
 
 .if ${PORT_OPTIONS:MPORTS}
-RUN_DEPENDS+=	${LOCALBASE}/sbin/portupgrade:${PORTSDIR}/ports-mgmt/portupgrade
+BUILD_DEPENDS+=	${LOCALBASE}/sbin/portupgrade:${PORTSDIR}/ports-mgmt/portupgrade
 USE_RUBY=	yes
 CONFIGURE_ARGS+=--enable-ports \
 		--with-default-backend=ports
@@ -82,7 +90,7 @@
 .endif
 
 .if ${PORT_OPTIONS:MPKGNG}
-RUN_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PORTSDIR}/ports-mgmt/pkg
+BUILD_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PORTSDIR}/ports-mgmt/pkg
 CONFIGURE_ARGS+=--enable-pkgng \
 		--with-default-backend=pkgng
 PLIST_SUB+=	PKGNG="" \
@@ -128,6 +136,10 @@
 	@${INSTALL_DATA} ${WRKSRC}/data/transactions.db \
 	    	${PREFIX}/share/PackageKit/transactions.db
 	@-update-mime-database ${PREFIX}/share/mime > /dev/null
+	.if ${PORT_OPTIONS:MNETWORKING}
+		@${INSTALL_DATA} ${PATCHDIR}/netpackagekitd \
+			${LOCALBASE}/sbin/netpackagekitd
+	.endif
 .endif
 
 .include <bsd.port.mk>

Added: soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/files/netpackagekitd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/files/netpackagekitd.in	Tue Aug 20 15:38:00 2013	(r256209)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# PROVIDE: netpackagekitd
+
+. /etc/rc.subr
+
+name=netpackagekitd
+rcvar=netpackagekitd_enable
+
+command="/usr/sbin/${name}
+
+load_rc_config $name
+run_rc_command "$1"

Added: soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/files/netpackagekitd/netpackagekit.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/files/netpackagekitd/netpackagekit.c	Tue Aug 20 15:38:00 2013	(r256209)
@@ -0,0 +1,139 @@
+/*
+* Copyright (C) 2013 Justin Edward Muniz <jmuniz at freebsd.org>
+*
+* Licensed under the GNU General Public License Version 2
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* Daemon for remote management of PackageKit
+* This server listens on port 1200 to for instructions
+*/
+
+#include <stdio.h>
+/*
+*These might be important for read():
+#include <sys/uio.h>
+#include <unistd.h>
+*/
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+/*
+#include <openssl/bio.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+*/
+
+/* Only one client needs to connect at once */
+#define BACKLOG 1
+
+/*
+static void cleanupSSL()
+{
+	
+}
+*/
+
+static void listenForConnections()
+{
+	register int listeningSocket, connectedSocket;
+	struct sockaddr_in socketInformation;
+	FILE *masterHost;
+	int socketAddressStructureSize;
+	int bytesRead;
+	char buffer[BUFSIZ+1];
+	char userName[32];
+/*
+	BIO *bio;
+	
+	SSL_load_error_strings();
+	SSL_load_BIO_strings();
+	OpenSSL_add_all_algorithms();
+*/
+
+	if ((listeningSocket = socket(PF_INET, SOCK_STREAM, 0)) < 0)
+	{
+		perror("The socket couldn't be created");
+		return 1;
+	}
+
+	bzero(&socketInformation, sizeof socketInformation);
+
+	socketInformation.sin_family = AF_INET;
+	socketInformation.sin_port = htons(1200);
+
+	if (INADDR_ANY)
+		socketInformation.sin_addr.s_addr = htonl(INADDR_ANY);
+
+	if (bind(listeningSocket, (struct sockaddr *)&socketInformation, sizeof socketInformation) < 0)
+	{
+		perror("Could not bind the socket");
+		close(listeningSocket);
+		return 2;
+	}
+
+	switch (fork())
+	{
+		case -1:
+			perror("Could not create the child process");
+			close(listeningSocket);
+			return 3;
+			break;
+		case 0:
+			break;
+		default:
+			close(listeningSocket);
+			return 0;
+			break;
+	}
+
+	listen(listeningSocket, BACKLOG);
+
+	while (true)
+	{
+		socketAddressStructureSize = sizeof socketInformation;
+
+		if ((connectedSocket = accept(listeningSocket, (struct sockaddr *)&socketInformation, &socketAddressStructureSize)) < 0)
+		{
+			perror("Could not initialize incoming connection");
+			close(listeningSocket);
+			return 4;
+		}
+
+		if ((masterHost = fdopen(connectedSocket, "w+")) == NULL)
+		{
+			perror("Could not open socket file descriptor");
+			close(connectedSocket);
+			close(listeningSocket);
+			return 5;
+		}
+
+		/* Authenticate host */
+		while (*userName='\0')
+		{
+			if (read(connectedSocket, buffer, BUFSIZ) > 0)
+				userName = buffer;
+		}
+
+		/* Make sure that random numbers are exchanged and password hashes are generated with them, so that encrypted passwords do not traverse the network */
+
+		/* Receive and parse instructions from host */
+
+		/* Do work  */
+
+		/* Send response back to server */
+
+		fclose(masterHost);
+		close(connectedSocket);
+	}
+}
+
+int main(int argc, char *argv[])
+{
+	listenForConnections();
+}
+

Modified: soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/pkg-plist
==============================================================================
--- soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/pkg-plist	Tue Aug 20 14:59:31 2013	(r256208)
+++ soc2013/jmuniz/personal/ports/PackageKit-0.6.11/packagekit/pkg-plist	Tue Aug 20 15:38:00 2013	(r256209)
@@ -452,3 +452,4 @@
 @dirrmtry etc/PackageKit
 @exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
 @unexec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
+%%NETWORKING%%sbin/netpackagekitd

Modified: soc2013/jmuniz/personal/ports/gnome-packagekit-2.32.0/gnome-packagekit/Makefile
==============================================================================
--- soc2013/jmuniz/personal/ports/gnome-packagekit-2.32.0/gnome-packagekit/Makefile	Tue Aug 20 14:59:31 2013	(r256208)
+++ soc2013/jmuniz/personal/ports/gnome-packagekit-2.32.0/gnome-packagekit/Makefile	Tue Aug 20 15:38:00 2013	(r256209)
@@ -23,7 +23,7 @@
 		unique-1.0:${PORTSDIR}/x11-toolkits/unique \
 		upower-glib.1:${PORTSDIR}/sysutils/upower \
 		canberra-gtk.0:${PORTSDIR}/audio/libcanberra \
-		libgcrypt.so.18:${PORTSDIR}/security/libgcrypt
+		gcrypt:${PORTSDIR}/security/libgcrypt
 RUN_DEPENDS=	yelp:${PORTSDIR}/x11/yelp
 
 USE_GMAKE=	yes

Modified: soc2013/jmuniz/personal/source/PackageKit-0.6.11/backends/Makefile.am
==============================================================================
--- soc2013/jmuniz/personal/source/PackageKit-0.6.11/backends/Makefile.am	Tue Aug 20 14:59:31 2013	(r256208)
+++ soc2013/jmuniz/personal/source/PackageKit-0.6.11/backends/Makefile.am	Tue Aug 20 15:38:00 2013	(r256209)
@@ -81,7 +81,7 @@
 endif
 
 if BACKEND_TYPE_PKGNG
-SUBDIRS+= pkgng
+SUBDIRS += pkgng
 endif
 
 clean-local :

Modified: soc2013/jmuniz/personal/source/PackageKit-0.6.11/configure
==============================================================================
--- soc2013/jmuniz/personal/source/PackageKit-0.6.11/configure	Tue Aug 20 14:59:31 2013	(r256208)
+++ soc2013/jmuniz/personal/source/PackageKit-0.6.11/configure	Tue Aug 20 15:38:00 2013	(r256209)
@@ -16944,7 +16944,7 @@
 
 if test x$enable_strict != xno; then
 	if test "$GCC" = "yes"; then
-		WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Werror"
+#$		WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Werror"
 	fi
 fi
 
@@ -16961,7 +16961,7 @@
 	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wreturn-type"
 	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wformat-nonliteral"
 	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wformat-security"
-	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wmissing-include-dirs"
+	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP "
 	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wmissing-format-attribute"
 #	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wclobbered"
 #	WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Wempty-body"
@@ -20749,7 +20749,7 @@
 	elif test -f /usr/local/sbin/portupgrade ; then
 		with_default_backend=ports
 	elif test -f /usr/sbin/pkgng ; then
-		with_default_backend=pkgng ; then
+		with_default_backend=pkgng
 	else
 		with_default_backend=dummy
 	fi

Modified: soc2013/jmuniz/personal/source/PackageKit-0.6.11/configure.ac
==============================================================================
--- soc2013/jmuniz/personal/source/PackageKit-0.6.11/configure.ac	Tue Aug 20 14:59:31 2013	(r256208)
+++ soc2013/jmuniz/personal/source/PackageKit-0.6.11/configure.ac	Tue Aug 20 15:38:00 2013	(r256209)
@@ -878,7 +878,7 @@
         Razor backend:             ${enable_razor}
         Pacman backend:            ${enable_pacman}
         PiSi backend:              ${enable_pisi}
-        Pkgng backend:             ${enable_ports}
+        Pkgng backend:             ${enable_pkgng}
         poldek backend:            ${enable_poldek}
         Portage backend:           ${enable_portage}
         Ports backend:             ${enable_ports}

Added: soc2013/jmuniz/personal/tools/testing.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2013/jmuniz/personal/tools/testing.sh	Tue Aug 20 15:38:00 2013	(r256209)
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Copyright (C) 2013 Justin Edward Muniz <jmuniz at freebsd.org>
+#
+# Licensed under the GNU General Public License Version 2
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Function: Aid in quick testing of developing code, by way of simple sub-commands
+#
+# Arguments that can be passed...
+
+


More information about the svn-soc-all mailing list