Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: [update] sysutils/trash-d 18 -> 19
To:
Johannes Thyssen Tishman <johannes@thyssentishman.com>, ports@openbsd.org, bcallah@openbsd.org
Date:
Tue, 29 Oct 2024 16:32:37 +0000

Download raw body.

Thread
On 2024/10/29 12:44, Johannes Thyssen Tishman wrote:
> 2024-10-13T18:36:37+0200 Johannes Thyssen Tishman <johannes@thyssentishman.com>:
> > bcallah@ any chance you could take a look at this please? Latest diff
> > below or attached.
> 
> I was contacted by bcallah@ privately with an OK for this (is it alright
> to share his reply?). I'd appreciate if someone could commit this.
> Please find the latest diff below.

committed.

> Note: Both the 'files' and 'patches' directories are now empty and can
> be removed.

ha no, this is CVS, directories can never be removed.

> diff /usr/ports
> commit - 582b03e674131009345dba3a77b75961c02b1e6e
> path + /usr/ports
> blob - f70621820d7345d1d44ac0da05becdba829d70e0
> file + sysutils/trash-d/Makefile
> --- sysutils/trash-d/Makefile
> +++ sysutils/trash-d/Makefile
> @@ -2,12 +2,11 @@
>  ONLY_FOR_ARCHS =	amd64
>  
>  COMMENT =	commandline FreeDesktop trash bin utility
> -REVISION =	1
>  CATEGORIES =	sysutils
>  
>  GH_ACCOUNT =	rushsteve1
>  GH_PROJECT =	trash-d
> -GH_TAGNAME =	18
> +GH_TAGNAME =	19
>  
>  MAINTAINER =	Brian Callahan <bcallah@openbsd.org>
>  
> @@ -16,28 +15,27 @@ PERMIT_PACKAGE =	Yes
>  
>  WANTLIB += c c++abi execinfo m pthread
>  
> -BUILD_DEPENDS =	lang/dmd
> +MODULES = lang/ruby
>  
> +BUILD_DEPENDS =	lang/dmd \
> +		textproc/ruby-ronn
> +
> +MODRUBY_RUNDEP = No
> +
>  # dub,dmd includes dmd compiler
>  TEST_DEPENDS =	devel/dub,dmd
>  
> -# Check to see if the manual page needs to be updated.
> -# To update: pandoc -s -f markdown -t man MANUAL.md -o trash.1
> -#            Put the new trash.1 in ${FILESDIR}
> -#            Update sha256 hash here
> -post-patch:
> -	@[ `sha256 < ${WRKSRC}/MANUAL.md` == 3b6f8936d018781146eb4036a492281443ea60de06adea6471f065c70d1c466e ] || \
> -		(echo "*** manpage changed; regenerate ${FILESDIR}/trash.1"; sleep 3)
> -
>  do-build:
>  	cd ${WRKSRC} && dmd -O -release -inline -Isource -J. -oftrash \
>  		source/app.d source/trash/*.d
>  
>  do-install:
>  	${INSTALL_PROGRAM} ${WRKSRC}/trash ${PREFIX}/bin
> -	${INSTALL_MAN} ${FILESDIR}/trash.1 ${PREFIX}/man/man1
> +	ronn${GEM_BIN_SUFFIX} --roff --pipe ${WRKSRC}/MANUAL.md > \
> +		${PREFIX}/man/man1/trash.1
>  
>  do-test:
> -	cd ${WRKSRC} && dub test --cache=local --compiler=dmd
> +	cd ${WRKSRC} && \
> +		env HOME=${WRKDIR} dub test --cache=local --compiler=dmd
>  
>  .include <bsd.port.mk>
> blob - 4eeef1d25f06d806d7843a6eae61516ba65100df
> file + sysutils/trash-d/distinfo
> --- sysutils/trash-d/distinfo
> +++ sysutils/trash-d/distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (trash-d-18.tar.gz) = SJMqcL0J7Po7l1UG07KcIyMSa87jzVjQaisiPavp//I=
> -SIZE (trash-d-18.tar.gz) = 16994
> +SHA256 (trash-d-19.tar.gz) = nq5us12G4bOIpElb0y4hvSV/zQJjVDD0uwOhNLhc7v8=
> +SIZE (trash-d-19.tar.gz) = 17318
> blob - 9ac3edb2ed14a1949be10e373bc2aee58c5b3443
> file + /dev/null
> --- sysutils/trash-d/files/trash.1
> +++ /dev/null
> @@ -1,139 +0,0 @@
> -.\" generated with Ronn/v0.7.3
> -.\" http://github.com/rtomayko/ronn/tree/0.7.3
> -.
> -.TH "TRASH" "1" "July 2022" "" ""
> -.
> -.SH "NAME"
> -\fBtrash\fR \- A near drop\-in replacement for \fBrm\fR that uses the trash bin
> -.
> -.P
> -\fBNote:\fR The name of this software is "trash\-d" however its executable is simply called \fB\fBtrash\fR\fR\. This manual favors the latter, but the two should be considered interchangable\.
> -.
> -.SH "SYNOPSIS"
> -trash [\fIoption\fR]\.\.\. \fIfile\fR\.\.\.
> -.
> -.SH "DESCRIPTION"
> -A near drop\-in replacement for \fB\fBrm\fR\fR(1) that uses the FreeDesktop trash bin\. Written in the D programming language using only D\'s Phobos standard library\.
> -.
> -.P
> -The options and flags are intended to mirror \fB\fBrm\fR\fR\'s closely, with some additional long options for the \fB\fBtrash\fR\fR specific features\.
> -.
> -.SS "Options"
> -.
> -.TP
> -\fB\fB\-d\fR\fR, \fB\fB\-\-dir\fR\fR
> -Remove empty directories\.
> -.
> -.TP
> -\fB\fB\-r\fR\fR, \fB\fB\-R\fR\fR, \fB\fB\-\-recursive\fR\fR
> -Delete directories and their contents\.
> -.
> -.TP
> -\fB\fB\-v\fR\fR, \fB\fB\-\-verbose\fR\fR
> -Print more information\.
> -.
> -.TP
> -\fB\fB\-i\fR\fR, \fB\fB\-\-interactive\fR\fR
> -Ask before each deletion\.
> -.
> -.TP
> -\fB\fB\-I\fR\fR, \fB\fB\-\-interact\-once\fR\fR
> -Ask before deleting 3 or more files, or deleting recursively
> -.
> -.TP
> -\fB\fB\-f\fR\fR, \fB\fB\-\-force\fR\fR
> -Don\'t prompt and ignore errors\.
> -.
> -.TP
> -\fB\fB\-\-version\fR\fR
> -Output the version and exit\.
> -.
> -.TP
> -\fB\fB\-\-list\fR\fR
> -List out the files in the trash\.
> -.
> -.TP
> -\fB\fB\-\-orphans\fR\fR
> -List orphaned files in the trash\.
> -.
> -.TP
> -\fB\fB\-\-delete\fR\fR \fIfile\fR
> -Delete a file from the trash\.
> -.
> -.TP
> -\fB\fB\-\-restore\fR\fR \fIfile\fR
> -Restore a file from the trash\.
> -.
> -.TP
> -\fB\fB\-\-empty\fR\fR
> -Empty the trash bin\.
> -.
> -.TP
> -\fB\fB\-\-rm\fR\fR \fIfiles\fR\.\.\.
> -Escape hatch to permanently delete a file\.
> -.
> -.TP
> -\fB\fB\-h\fR\fR, \fB\fB\-\-help\fR\fR
> -This help information\.
> -.
> -.SS "Precedence"
> -The \fB\fB\-\-help\fR\fR, \fB\fB\-\-version\fR\fR, \fB\fB\-\-list\fR\fR, \fB\fB\-\-orphans\fR\fR, \fB\fB\-\-restore\fR\fR, \fB\fB\-\-delete\fR\fR, and \fB\fB\-\-empty\fR\fR flags all cause the program to short\-circuit and perform only that operation and no others\. Their precedence is in that order exactly, and is intended to cause the least destruction\.
> -.
> -.P
> -Therefore the command \'\fBtrash \-\-empty \-\-list\fR\' will list the trash bin and NOT empty it\.
> -.
> -.P
> -\fBNote:\fR Before version 11 trash\-d followed a slightly incorrect precedence order\.
> -.
> -.SS "Compatibility with rm(1)"
> -One of trash\-d\'s primary goals is near compatibility with the GNU \fB\fBrm(1)\fR\fR tool\. The keyword here is "near"\. The goal is not exact flag\-for\-flag compatibility with \fB\fBrm\fR\fR, but you should be able to \'\fBalias rm=trash\fR\' and not notice the difference\. But since \fB\fBrm\fR\fR has different failure states and error messages it can never be 100% compatible\.
> -.
> -.P
> -Additionally since there are a few different implementations of \fB\fBrm(1)\fR\fR (BSDs and so on) that are all subtly incompatible with each other I can\'t guarantee compatibility with all versions\.
> -.
> -.P
> -As of version 16 unknown options will throw an error\. Prior to version 16 unknown options were silently ignored\.
> -.
> -.P
> -As of version 17 trash\-d will not follow symlinks recursively through directories\. This may in some cases be inconsistent with \fB\fBrm\fR\fR but errs on the side of not deleting your files\.
> -.
> -.SH "ENVIRONMENT"
> -.
> -.TP
> -\fB\fBXDG_DATA_HOME\fR\fR
> -This variable is used to determine where the default trash directory is for this user as per the FreeDesktop specification\.
> -.
> -.TP
> -\fB\fBTRASH_D_DIR\fR\fR
> -Override the trash directory to the specified path, useful for trashing on removable devices\.
> -.
> -.SH "FILES"
> -.
> -.TP
> -\fB\fB$XDG_DATA_HOME/Trash\fR\fR
> -Standard location of trash files and metadata as per the FreeDesktop specification\. Used in the absence of \fB\fB$TRASH_D_DIR\fR\fR\.
> -.
> -.TP
> -\fB\fB~/\.local/share/Trash\fR\fR
> -The fallback path used in the absence of both \fB\fB$XDG_DATA_HOME\fR\fR and \fB\fB$TRASH_D_DIR\fR\fR\.
> -.
> -.SH "EXIT STATUS"
> -\fB\fBtrash\fR\fR exits with the status code 0 on success, and >0 if an error occurs\.
> -.
> -.SH "SEE ALSO"
> -\fB\fBrm\fR\fR(1), \fB\fBuser\-dirs\.conf\fR\fR(5)
> -.
> -.SH "STANDARDS"
> -By mimicking \fBrm\fR this utility is partially POSIX compliant however this is \fBNOT\fR to be relied upon for any purpose\.
> -.
> -.P
> -trash\-d is compliant with the FreeDesktop trash specification: https://specifications\.freedesktop\.org/trash\-spec/trashspec\-latest\.html
> -.
> -.SH "AUTHOR"
> -Steven vanZyl \fIrushsteve1@rushsteve1\.us\fR
> -.
> -.P
> -The up\-to\-date sources can be found at: https://github\.com/rushsteve1/trash\-d
> -.
> -.SH "BUGS"
> -https://github\.com/rushsteve1/trash\-d/issues
> blob - 53c44848b8557cdf860f30e151bbd4e8ffbdac2e
> file + /dev/null
> --- sysutils/trash-d/patches/patch-dub_json
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -Index: dub.json
> ---- dub.json.orig
> -+++ dub.json
> -@@ -2,7 +2,8 @@
> - 	"authors": ["Steven vanZyl <rushsteve1@rushsteve1.us>"],
> - 	"copyright": "Copyright © 2022, Steven vanZyl",
> - 	"description": "A near drop-in replacement for rm that uses the trash bin",
> --	"version": "18",
> -+	"version": "18.0.0",
> -+	"shortVersion": "18",
> - 	"versionName": "M. Bison",
> - 	"license": "MIT",
> - 	"name": "trash-d",
> blob - 9f9ba81c0c645bdde92ad6fb2c1fb8bd47323281
> file + /dev/null
> --- sysutils/trash-d/patches/patch-source_trash_ver_d
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -Index: source/trash/ver.d
> ---- source/trash/ver.d.orig
> -+++ source/trash/ver.d
> -@@ -25,7 +25,7 @@ const string VER_TEXT = format("trash-d version %s '%s
> - const string COPY_TEXT = copy_text_from_json();
> - 
> - private int version_from_json() {
> --	return DUB_JSON.parseJSON()["version"].str.to!int;
> -+	return DUB_JSON.parseJSON()["shortVersion"].str.to!int;
> - }
> - 
> - private string version_name_from_json() {
>