Bug 225787 - games/diaspora: Update mirrors and pkg-descr file
Summary: games/diaspora: Update mirrors and pkg-descr file
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-02-09 08:00 UTC by lightside
Modified: 2018-02-11 04:13 UTC (History)
1 user (show)

See Also:


Attachments
Proposed patch (since 459123 revision) (1.56 KB, patch)
2018-02-09 08:00 UTC, lightside
lightside: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2018-02-09 08:00:19 UTC
Created attachment 190455 [details]
Proposed patch (since 459123 revision)

Patch to update mirrors for games/diaspora port.

The pkg-fallout reported about unavailable http://www.freespacemods.net/e107_files/downloads/Diaspora_R1_Linux.tar.lzma file:
http://beefy10.nyi.freebsd.org/data/111i386-default/461193/logs/diaspora-1.1.1_1.log

The http://www.freespacemods.net site reports following message (excerpt): "FreeSpaceMods is in the process of being moved to fsmods.hard-light.net."

The Diaspora_R1_Linux.tar.lzma file is available on:
http://diaspora.fs2downloads.com/Diaspora_R1_Linux.tar.lzma
-8<--
% curl -sLI http://diaspora.fs2downloads.com/Diaspora_R1_Linux.tar.lzma
HTTP/1.1 200 OK
Date: Fri, 09 Feb 2018 06:28:09 GMT
Server: Apache
Last-Modified: Tue, 04 Sep 2012 04:10:51 GMT
ETag: "5003c941-4c8d8719628c0"
Accept-Ranges: bytes
Content-Length: 1342425409
Content-Type: application/x-tar
-->8-

Probably, 7200 seconds wasn't enough, because of reported message about runaway build.

Possible to add some mirror for Diaspora_R1_Linux.tar.lzma file:
http://sectorgame.com/fsfiles/uploads/Projects%20-%20Campaigns%20-%20TCs/Total%20Conversions/Diaspora/Diaspora%20%28Linux%29.tar.lzma?dummy=/Diaspora_R1_Linux.tar.lzma
-8<--
% curl -sLI "http://sectorgame.com/fsfiles/uploads/Projects%20-%20Campaigns%20-%20TCs/Total%20Conversions/Diaspora/Diaspora%20%28Linux%29.tar.lzma?dummy=/Diaspora_R1_Linux.tar.lzma"
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 09 Feb 2018 06:29:34 GMT
Content-Type: application/x-tar
Content-Length: 1342425409
Connection: keep-alive
X-Accel-Version: 0.01
Last-Modified: Tue, 09 Jan 2018 05:33:04 GMT
Accept-Ranges: bytes
X-Powered-By: PleskLin
-->8-

and for Diaspora_R1_Patch_1.1.tar.lzma file:
http://sectorgame.com/fsfiles/uploads/Projects%20-%20Campaigns%20-%20TCs/Total%20Conversions/Diaspora/Diaspora_R1_Patch_1.1.tar.lzma
-8<--
% curl -sLI http://sectorgame.com/fsfiles/uploads/Projects%20-%20Campaigns%20-%20TCs/Total%20Conversions/Diaspora/Diaspora_R1_Patch_1.1.tar.lzma
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 09 Feb 2018 06:39:45 GMT
Content-Type: application/x-tar
Content-Length: 487141904
Connection: keep-alive
X-Accel-Version: 0.01
Last-Modified: Tue, 09 Jan 2018 04:16:00 GMT
Accept-Ranges: bytes
X-Powered-By: PleskLin
-->8-

Also, looks like, there is a redirect for WWW:
-8<--
% curl -sLI http://www.diasporagame.com | grep -e Moved -e ^Location
HTTP/1.1 301 Moved Permanently
Location: http://diaspora.hard-light.net
-->8-

The PORTREVISION bump is not needed, because there are no functional changes, the redirect for WWW is available and created packages are huge:
-8<--
% curl -sLI pkg.freebsd.org/FreeBSD:10:i386/latest/All/diaspora-1.1.1_1.txz | grep -e ^Content-Length -e ^Last-Modified
Content-Length: 1648633436
Last-Modified: Thu, 08 Feb 2018 21:26:25 GMT
% curl -sLI pkg.freebsd.org/FreeBSD:12:i386/latest/All/diaspora-1.1.1_1.txz | grep -e ^Content-Length -e ^Last-Modified
Content-Length: 1648691292
Last-Modified: Wed, 07 Feb 2018 00:44:40 GMT
-->8-

- Update mirrors for distfiles
- Update pkg-descr file
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-10 20:55:35 UTC
Could you please create patches from /usr/ports next time? It is more convenient this way. Thanks.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-10 21:09:35 UTC
Committed, thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-02-10 21:09:39 UTC
A commit references this bug:

Author: yuri
Date: Sat Feb 10 21:09:30 UTC 2018
New revision: 461433
URL: https://svnweb.freebsd.org/changeset/ports/461433

Log:
  games/diaspora: Update mirrors and pkg-descr file

  Port changes:
  * Mirrors changed without an actual distfiles change
  * Whitespace changes in pkg-descr
  * Changed WWW

  PR:		225787
  Submitted by:	lightside@gmx.com (maintainer)
  Approved by:	tcberner (mentor, implicit)

Changes:
  head/games/diaspora/Makefile
  head/games/diaspora/pkg-descr
Comment 4 lightside 2018-02-11 04:13:30 UTC
Thanks for commit.

(In reply to Yuri Victorovich from comment #1)
> Could you please create patches from /usr/ports next time?
> It is more convenient this way. Thanks.
I tried to answer about this in other bug 224372 comment #4.
If briefly, the variant in attachment #190455 [details] was explained in current FreeBSD Porter's Handbook:
https://www.freebsd.org/doc/en/books/porters-handbook/port-upgrading.html#svn-diff

The possible intermediate solution is:
% cat diaspora.diff | sed -E 's|^[-+]{3} |&games/diaspora/| ; s|^Index: |&games/diaspora/|' > games_diaspora.diff

I also created following snv_diff_prefix.sh script:
-8<--
#!/bin/sh

DIR=$1
PATCHFILE=$2

usage() {
	echo "Example of usage:"
	echo "$0 category/port patch.diff > output.diff"
}

if [ -z "${DIR}" ]; then
	echo "1st argument required for prefix directory, e.g. category/port"
	usage
	exit 1
fi

# Remove possible '/' character(s) after directory name
DIR=`echo "${DIR}" | sed -e 's|[/]*$||'`

if [ -z "${PATCHFILE}" ]; then
	echo "2nd argument required for path to patch file"
	usage
	exit 1
fi

if ! [ -f "${PATCHFILE}" ]; then
	echo "The '${PATCHFILE}' file doesn't exists"
	exit 1
fi

sed -E "s|^[-+]{3} |&${DIR}/| ; s|^Index: |&${DIR}/|" < "${PATCHFILE}"
-->8-

Example of usage:
% svn_diff_prefix.sh games/diaspora diaspora.diff > games_diaspora.diff

There were no issues with such type of patch for previous committer in bug 225187, for example.
Possible to build some port(s) inside of user directories, without a need to (svn) copy a whole /usr/ports directory, because of `make stage` support. This may depend from different workflow.
I guess, poudriere may require to use patches from root directory for some method, while others aren't (e.g. some git/svn branch with applied patch).

In other words, I can try to create such type of patches on request. But such issue was rare for many previous years, especially if possible to adapt patches to own needs. Honestly to say, this also works for patches from root directory, where possible to use `svn patch --strip 2 ../diaspora.diff`. I just attached one variant of patch, which was created.