Skip to content

Commit

Permalink
ports-mgmt/portsnap: Resurrect
Browse files Browse the repository at this point in the history
portsnap will be removed from the base from 14.0-RELEASE onwards. To
facilitate usage of portsnap from 14.0-RELEASE onwards extract portsnap
from base and create seperate port.

Portsnap is a system for securely updating the ports tree by
distributing signed compressed snapshots.  This is the client
half of that system; it downloads compressed snapshots into
/usr/local/portsnap ("portsnap fetch") and uses those to extract
a ports tree into /usr/ports ("portsnap extract") or update an
existing tree ("portsnap update").

In addition to operating entirely over HTTP, portsnap can use under
a tenth of the bandwidth required by CVSup if a copy of the ports
tree is being updated every few days.

Approved by:	portmgr
  • Loading branch information
5u623l20 committed Apr 9, 2023
1 parent 19c5ede commit 0e9127b
Show file tree
Hide file tree
Showing 12 changed files with 1,039 additions and 1 deletion.
1 change: 0 additions & 1 deletion MOVED
Expand Up @@ -390,7 +390,6 @@ java/ecj-bootstrap||2009-01-06|Removed
emulators/mupen64plus-sound||2009-01-06|No supported anymore by mupen64plus team
misc/heyu||2009-01-07|Has expired: no longer under development, use misc/heyu2
sysutils/pkill||2009-01-07|Part of the base system since FreeBSD 5.3
ports-mgmt/portsnap||2009-01-07|Part of the base system since FreeBSD 5.5
lang/py-compiler||2009-01-08|Included with Python since 2.2
net/nvnet||2009-01-08|Part of the base system since FreeBSD 6.0
security/openssl-beta|security/openssl|2009-01-09|Removed
Expand Down
1 change: 1 addition & 0 deletions ports-mgmt/Makefile
Expand Up @@ -60,6 +60,7 @@
SUBDIR += portsearch
SUBDIR += portshaker
SUBDIR += portshaker-config
SUBDIR += portsnap
SUBDIR += portsreinstall
SUBDIR += porttools
SUBDIR += porttree
Expand Down
41 changes: 41 additions & 0 deletions ports-mgmt/portsnap/Makefile
@@ -0,0 +1,41 @@
PORTNAME= portsnap
PORTVERSION= 1.1
PORTREVISION= 1
CATEGORIES= ports-mgmt net
MASTER_SITES= http://www.daemonology.net/portsnap/

MAINTAINER= bofh@FreBSD.org
COMMENT= Provides secure snapshots of the ports directory
WWW= http://www.daemonology.net/portsnap/

LICENSE= BSD2CLAUSE

SUB_FILES= pkg-message

PLIST_FILES= "@sample etc/portsnap.conf.sample" \
libexec/make_index \
sbin/portsnap \
man/man5/portsnap.conf.5.gz \
man/man8/portsnap.8.gz

.include <bsd.port.pre.mk>

.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1500000
IGNORE= portsnap is in base systems but will be removed from 14.0-RELEASE
.endif

post-patch:
${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" \
${WRKSRC}/portsnap \
${WRKSRC}/portsnap.conf.5 \
${WRKSRC}/portsnap.8

do-install:
${INSTALL_SCRIPT} ${WRKSRC}/portsnap ${STAGEDIR}/${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/make_index ${STAGEDIR}/${PREFIX}/libexec
${INSTALL_MAN} ${WRKSRC}/portsnap.conf.5 ${STAGEDIR}/${PREFIX}/man/man5/
${INSTALL_MAN} ${WRKSRC}/portsnap.8 ${STAGEDIR}/${PREFIX}/man/man8/
${INSTALL_DATA} ${WRKSRC}/portsnap.conf \
${STAGEDIR}/${PREFIX}/etc/portsnap.conf.sample

.include <bsd.port.post.mk>
3 changes: 3 additions & 0 deletions ports-mgmt/portsnap/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1681052114
SHA256 (portsnap-1.1.tar.gz) = 08bf6db8738d5c4fe757737d97366e7e899a6d0cfb244a46055f97f4b116b36c
SIZE (portsnap-1.1.tar.gz) = 20875
12 changes: 12 additions & 0 deletions ports-mgmt/portsnap/files/patch-Makefile
@@ -0,0 +1,12 @@
--- Makefile.orig 2023-04-09 15:24:50 UTC
+++ Makefile
@@ -1,8 +1,6 @@
-all: make_index phttpget
+all: make_index

make_index: make_index.c
-
-phttpget: phttpget.c

install:
install -m 555 portsnap /usr/local/sbin
18 changes: 18 additions & 0 deletions ports-mgmt/portsnap/files/patch-make__index.c
@@ -0,0 +1,18 @@
--- make_index.c.orig 2023-04-09 15:19:46 UTC
+++ make_index.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright 2005 Colin Percival
* All rights reserved
*
@@ -25,7 +27,7 @@
*/

#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.sbin/portsnap/make_index/make_index.c,v 1.5 2005/12/01 22:14:44 cperciva Exp $");
+__FBSDID("$FreeBSD$");

#include <err.h>
#include <stdio.h>

0 comments on commit 0e9127b

Please sign in to comment.