Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 815234 - games-util/lgogdownloader-3.8 Please add the credentials export script
Summary: games-util/lgogdownloader-3.8 Please add the credentials export script
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-28 10:55 UTC by Michał Dec
Modified: 2021-10-27 22:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Dec 2021-09-28 10:55:26 UTC
lgogdownloader 3.8 has received a patch that enabled headless operations if there are existing, valid credentials detected. Please add the following script in the src_install phase:

https://gitlab.com/src_prepare/src_prepare-overlay/-/blob/68da7f9f5b1a549b655ec484875d294271f6ca6a/games-util/lgogdownloader/files/export_gog_to_portage

as demonstrated in this verion of 3.7 ebuild:
https://gitlab.com/src_prepare/src_prepare-overlay/-/blob/68da7f9f5b1a549b655ec484875d294271f6ca6a/games-util/lgogdownloader/lgogdownloader-3.7-r1.ebuild

This script produces a base64 representation of a tar.xz with GOG credentials. Putting the resulting string in /etc/portage/make.conf enables the gog eclass from src_prepare-overlay to install ebuilds that source the gamedata from GOG, as demonstrated in:
https://gitlab.com/src_prepare/src_prepare-overlay/-/blob/15af7b3d8f82f2527ff1cbc075caf058b5de35c3/games-rpg/fallout1/fallout1-1.1.ebuild
https://gitlab.com/src_prepare/src_prepare-overlay/-/blob/bc00b0a0a7f8581cd20bf61d95522078ca3fe332/eclass/gog.eclass
Comment 1 James Le Cuirot gentoo-dev 2021-10-27 22:30:42 UTC
Sorry for taking a while.

I've had a think about this, and I'm not convinced it needs to be part of the lgogdownloader package. Why not package it separately? It doesn't matter that it's a tiny script. Hell, you could even just stick it in the files directory of the repo. That's what I do with esteam. I'd do the same if I were adding something like this to the main repo.

I still want to be helpful though. Your script scared me a little so I've come up with something a lot simpler and safer:

--------

#!/bin/bash

set -euo pipefail

TMPDIR=$(mktemp -d)
trap 'rm -r "${TMPDIR}"' EXIT

XDG_CONFIG_HOME=${TMPDIR} lgogdownloader --login

echo "Your GOG_CONFIG:" >&2
XZ_OPT=-9 tar -C "${TMPDIR}" -Jc lgogdownloader/ | base64 -w0
echo

--------

This doesn't include .config in the tarball, but if you set XDG_CONFIG_HOME in a similar manner in your eclass, then you won't need it. Hope this helps.