Bug 163920 - MAINTAINER UPDATE games/minecraft-server
Summary: MAINTAINER UPDATE games/minecraft-server
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Michael Scheidell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-08 16:00 UTC by Martin Kropfinger
Modified: 2012-01-12 13:20 UTC (History)
0 users

See Also:


Attachments
patch.txt (10.35 KB, text/plain)
2012-01-08 16:00 UTC, Martin Kropfinger
no flags Details
UIDs.txt (567 bytes, text/plain)
2012-01-08 16:00 UTC, Martin Kropfinger
no flags Details
GIDs.txt (217 bytes, text/plain)
2012-01-08 16:09 UTC, Martin Kropfinger
no flags Details
UIDs.txt (567 bytes, text/plain)
2012-01-08 16:09 UTC, Martin Kropfinger
no flags Details
patch.txt (10.35 KB, text/plain)
2012-01-08 16:09 UTC, Martin Kropfinger
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kropfinger 2012-01-08 16:00:24 UTC
	Added some extra stuff like a rc-script for automatic starting and
	stopping.
	Therefore a new user was added (UID/GID).

Fix: --- GIDs	2012-01-08 14:49:13.000000000 +0100
+++ /usr/ports/GIDs	2011-12-28 22:01:44.000000000 +0100
@@ -96,7 +96,6 @@
 cups:*:193:
 saned:*:194:
 radns:*:195:
-mcserver:*:199:
 sympa:*:200:
 dspam:*:202:
 yate:*:204:
--- GIDs.txt ends here ---
Comment 1 Martin Kropfinger 2012-01-08 16:09:27 UTC
Am Sun, 8 Jan 2012 16:00:24 GMT
schrieb FreeBSD-gnats-submit@FreeBSD.org:

> Thank you very much for your problem report.
> It has the internal identification `ports/163920'.
> The individual assigned to look at your
> report is: freebsd-ports-bugs. 
> 
> You can access the state of your problem report at any time
> via this link:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=163920
> 
> >Category:       ports
> >Responsible:    freebsd-ports-bugs
> >Synopsis:       MAINTAINER UPDATE games/minecraft-server
> >Arrival-Date:   Sun Jan 08 16:00:24 UTC 2012


Having inverted the diff arguments I made defective patches.
New patches appended.
Comment 2 Michael Scheidell freebsd_committer freebsd_triage 2012-01-08 22:46:46 UTC
Responsible Changed
From-To: freebsd-ports-bugs->scheidell

I'll take it
Comment 3 Michael Scheidell freebsd_committer freebsd_triage 2012-01-08 23:09:09 UTC
State Changed
From-To: open->feedback

I noticed the new files/*.txt files (and they seem to be installed in ../etc/minecraft, and ../share/minecraft) 
Q: do they need to be there twice? (in ../share and ../etc) 
Q: what copy does minecraft actually use (I assume ../etc?) 

if someone does a 'portupgrade', and, or make deinstall reinstall, you will lose BOTH copies 
(the copy in ../share, and the copy in ../etc) 

If ../share is static, and ../etc is dynamic, you might want to consider some pkg-plist @unexec magic. 

%D is macro for $DATADIR 

@unexec if cmp -s %D%/ops.txt %%PREFIX%%/etc/minecraft/ops.txt; then rm -f %%PREFIX%%/etc/minecraft/ops.txt; fi 
(and remove this: etc/minecraft/ops.txt from plist) 

if ../etc is static, and share is dynamic (the DATADIR), then reverse them. 

This way,  
#1, tinderbox/ freebsd clusters will be happy, because untouched *.txt will be removed. 
#2, if a user does a make deinstall/reinstall, they preserve their *.txt files. 

Two more things: 
#1, on install, you should check for existance of dynamic/*txt files and NOT overwrite them. 
#2: the dynamic dir should use a @dirrmtry (note, @dirrm and @dirrmtry cd to $PREFIX before running, but the @unexec rm -f are  
cwd at root. see ports security/amavisd-new and mail/p5-Mail-SpamAssassin for examples of all of this) 
#3:you should have a pkg-deinstall that checks the dynamic directory, to see if it still exists, and inform user  
that they might want to remove that directory (if it still exists), and tell them they can rm the user 
(also, see port mail/p5-Mail-SpamAssassin/pkg-deinstall for examples) 

minor nits: 
dont bump PORTVERSION unless the minecraft-server distfiles itself change. 
just add: 
PORTREVISION=	1 
(etc) 

send me patches to your patches if you like, or a whole new set of patches if you like.
Comment 4 Michael Scheidell freebsd_committer freebsd_triage 2012-01-09 00:00:55 UTC
Actually, I just noticed this:

+    ${INSTALL_DATA} ${FILESDIR}/banned-players.txt 
${PREFIX}/etc/minecraft/banned-players.txt
+    ${LN} ${PREFIX}/etc/minecraft/banned-players.txt 
${DATADIR}/banned-players.txt


if ../etc and ../share are duplicates (always), and editing one changes 
the other, you might want to consider installing a *.txt-sample' set of 
files instead.

OP would (manually) copy *txt-sample to txt, to use them, and your 
pkg-plist would list the sample's, cmp *.txt with sample (in case they 
just copied over the sample)

-- 
Michael Scheidell, CTO
o: 561-999-5000
d: 561-948-2259
 >*| *SECNAP Network Security Corporation

    * Best Mobile Solutions Product of 2011
    * Best Intrusion Prevention Product
    * Hot Company Finalist 2011
    * Best Email Security Product
    * Certified SNORT Integrator
Comment 5 Martin Kropfinger 2012-01-09 08:13:09 UTC
Hi there!

The thing is minecraft needs its config/txt files in its own directory. So they have to be placed in the ../share folder. Without the files beeing there minecraft can not run (it will generate new ones). I'd like to have those files inside ../etc to be more "bsd-friendly" so I used the links for doing the job. The result is that I have for each file two identical files (per link). I thought this would be acceptable and better than having config-files unter ../share.

So even using .sample-files will not solve this problem :(

Thanx for your help
Martin



Michael Scheidell <scheidell@freebsd.org> schrieb:

>Actually, I just noticed this:
>
>+    ${INSTALL_DATA} ${FILESDIR}/banned-players.txt
>${PREFIX}/etc/minecraft/banned-players.txt
>+    ${LN} ${PREFIX}/etc/minecraft/banned-players.txt
>${DATADIR}/banned-players.txt
>
>
>if ../etc and ../share are duplicates (always), and editing one changes
>
>the other, you might want to consider installing a *.txt-sample' set of
>
>files instead.
>
>OP would (manually) copy *txt-sample to txt, to use them, and your
>pkg-plist would list the sample's, cmp *.txt with sample (in case they
>just copied over the sample)
>
>--
>Michael Scheidell, CTO
>o: 561-999-5000
>d: 561-948-2259
> >*| *SECNAP Network Security Corporation
>
>    * Best Mobile Solutions Product of 2011
>    * Best Intrusion Prevention Product
>    * Hot Company Finalist 2011
>    * Best Email Security Product
>    * Certified SNORT Integrator


--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit Kaiten Mail gesendet.
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-01-12 13:14:54 UTC
scheidell    2012-01-12 13:14:45 UTC

  FreeBSD ports repository

  Modified files:
    .                    GIDs UIDs 
    games/minecraft-server Makefile pkg-plist 
  Added files:
    games/minecraft-server/files banned-ips.txt.sample 
                                 banned-players.txt.sample 
                                 minecraft.in ops.txt.sample 
                                 pkg-deinstall.in pkg-message.in 
                                 server.properties.sample 
                                 white-list.txt.sample 
  Log:
  - Functionality upgrade.  Add in *.txt.sample files so that uninstall/pkg_delete won't delete users settings [1]
  - Add mcserver user to GIDs/UIDs [1]
  - Added rc startup script [1]
  - Lots of PLIST_SUB/SUB_FILES patches to allow substitution, moved several pkg* files to files/*.in [1]
  - made USERS a ?= in case server had previously been running as a different user [2]
  
  PR:             ports/163920 [1]
  Submitted by:   maintainer [1]
  Reviewed by:    scheidell [2]
  Approved by:    maintainer, gabor (mentor)
  
  Revision  Changes    Path
  1.163     +2 -1      ports/GIDs
  1.183     +2 -1      ports/UIDs
  1.2       +67 -12    ports/games/minecraft-server/Makefile
  1.1       +1 -0      ports/games/minecraft-server/files/banned-ips.txt.sample (new)
  1.1       +1 -0      ports/games/minecraft-server/files/banned-players.txt.sample (new)
  1.1       +120 -0    ports/games/minecraft-server/files/minecraft.in (new)
  1.1       +1 -0      ports/games/minecraft-server/files/ops.txt.sample (new)
  1.1       +26 -0     ports/games/minecraft-server/files/pkg-deinstall.in (new)
  1.1       +40 -0     ports/games/minecraft-server/files/pkg-message.in (new)
  1.1       +24 -0     ports/games/minecraft-server/files/server.properties.sample (new)
  1.1       +1 -0      ports/games/minecraft-server/files/white-list.txt.sample (new)
  1.2       +24 -1     ports/games/minecraft-server/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Michael Scheidell freebsd_committer freebsd_triage 2012-01-12 13:15:17 UTC
State Changed
From-To: feedback->closed

Committed with changes, Thanks.