Bug 1317805

Summary: %jpackage_script is not compatible with XDG specification
Product: [Fedora] Fedora Reporter: jiri vanek <jvanek>
Component: javapackages-toolsAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: akurtako, extras-orphan, java-sig-commits, jerboaa, mizdebsk, msimacek, msrb, sochotni
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-11 16:50:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description jiri vanek 2016-03-15 09:33:13 UTC
the %jpackage_script generates also:

 # Source user prefs
 if [ -f $HOME/.LauncherName ] ; then
   . $HOME/.LauncherName
 fi

 Which looks really bad. $XDG_* should be followed.

 So the correct snippet should be (not tested):

 XCFG=$XDG_CONFIG_DIR
 if [ "xXCFG" == "x" ] ; then
   XCFG=$HOME/.config/.LauncherName
 else
   XCFG=$XCFG/.LauncherName
 fi
 if [ -f $XCFG ] ; then
 . $XCFG
 fi



%jpackage_script is an old macro. It was created before XDG spec
existed. It would be nice to use standardized location for config files,
but I can't just move config file location as it would break user config
files.

Perhaps a second XDG-compliant location could be added next to existing
non-standard config location. Or we could introduce a totally new macro,
which would solve this and many of other issues. New macro would allow
to migrate packages gradually.

Comment 1 Jan Kurik 2016-07-26 04:46:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 2 Michael Simacek 2016-11-11 16:50:34 UTC
We decided to go with the new macro. We re tracking it in upstream issue at [1].
Because we don't plan to change %jpackage_script macro, I'll close this bug now. Feel free to comment on the upstream issue (you mentioned "other issues" you had, we're interested in hearing about those).

[1] https://github.com/fedora-java/javapackages/issues/9