Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Michal Domonkos
Merged #2992 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2992#event-12247199537 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
...and now with docs... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2992#issuecomment-2019946369 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
@pmatilai pushed 4 commits. b5cb2b48af7293c3b1608b1cef289fed1b14ad2c Use rpmGlobPath(... RPMGLOB_NOCHECK) for rpmrc reading d48bf2e1e3e6e3512401e83d04d38eb6807e4480 Sanitize rpmGlob() behavior wrt non-glob patterns de0ae1121392e50aa59032e5d2e6d97d65e8bd4f Drop support for compile-time

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Michal Domonkos
Ugh, right... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2992#issuecomment-2019920673 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
Eep, another thing this is missing: docs. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2992#issuecomment-2019919241 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Michal Domonkos
Oh, and please add a label for the category of this feature (for the future auto-changelog). -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2992#issuecomment-2019913634 You are receiving this because you are subscribed to this thread.

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Michal Domonkos
@dmnks approved this pull request. Looks good now! And thanks for the updated commit message (wrt the "rpm --showrc" case) :smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2992#pullrequestreview-1959771873 You are receiving

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
@pmatilai commented on this pull request. > +} +#else +/* + * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros + * if it exists and the XDG path doesn't. + */ +static char *initMacroPath(const char *confdir) +{ +const char *xdgconf = getenv("XDG_CONFIG_HOME"); +if

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Michal Domonkos
@dmnks commented on this pull request. > +} +#else +/* + * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros + * if it exists and the XDG path doesn't. + */ +static char *initMacroPath(const char *confdir) +{ +const char *xdgconf = getenv("XDG_CONFIG_HOME"); +if (!(xdgconf

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
@pmatilai commented on this pull request. > +#ifdef MACROFILES +static char *initMacroPath(const char *confdir) +{ +return xstrdup(MACROFILES); +} +#else +/* + * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros + * if it exists and the XDG path doesn't. + */ +static char

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
Updated to use ~/.config/rpm directory and take ~/.rpmrc into account as well. Thanks guys for the feedback! -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2992#issuecomment-2019689559 You are receiving this because you are subscribed

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -2,6 +2,41 @@ # AT_BANNER([RPM macros]) +AT_SETUP([macro path]) +AT_KEYWORDS([macros]) +RPMDB_INIT + +# .rpmmacros exists Right, this ... crossed my mind but dismissed it, along with several other warning bells related to this PR, too busy

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
@pmatilai pushed 2 commits. 6ee9eedc9af522bbd0025b0874222477ccf40139 Drop support for compile-time MACROFILES override 6eaa933386a72d4a5673e7e86969bca679cbb6a8 Support per-user macro configuration in XDG_CONFIG_HOME -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
@pmatilai commented on this pull request. > +#ifdef MACROFILES +static char *initMacroPath(const char *confdir) +{ +return xstrdup(MACROFILES); +} +#else +/* + * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros + * if it exists and the XDG path doesn't. + */ +static char

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
@pmatilai commented on this pull request. > +} +#else +/* + * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros + * if it exists and the XDG path doesn't. + */ +static char *initMacroPath(const char *confdir) +{ +const char *xdgconf = getenv("XDG_CONFIG_HOME"); +if

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-26 Thread Panu Matilainen
@pmatilai commented on this pull request. > +#ifdef MACROFILES +static char *initMacroPath(const char *confdir) +{ +return xstrdup(MACROFILES); +} +#else +/* + * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros + * if it exists and the XDG path doesn't. + */ +static char

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-25 Thread Michal Domonkos
@dmnks commented on this pull request. > +#ifdef MACROFILES +static char *initMacroPath(const char *confdir) +{ +return xstrdup(MACROFILES); +} +#else +/* + * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros + * if it exists and the XDG path doesn't. + */ +static char

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-25 Thread Michal Domonkos
@dmnks requested changes on this pull request. > @@ -2,6 +2,41 @@ # AT_BANNER([RPM macros]) +AT_SETUP([macro path]) +AT_KEYWORDS([macros]) +RPMDB_INIT + +# .rpmmacros exists I'd suggest that we actually check that `~/.rpmmacros` really exists (or just `touch` it like in the other tests

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-25 Thread ニール・ゴンパ
@Conan-Kudo requested changes on this pull request. > +#ifdef MACROFILES +static char *initMacroPath(const char *confdir) +{ +return xstrdup(MACROFILES); +} +#else +/* + * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros + * if it exists and the XDG path doesn't. + */ +static

Re: [Rpm-maint] [rpm-software-management/rpm] Support per-user macro configuration in XDG_CONFIG_HOME (PR #2992)

2024-03-25 Thread Panu Matilainen
@pmatilai pushed 3 commits. ee17de74cf23df317e9c53f259c9bdd483a2ff4d Use rpmGlobPath(... RPMGLOB_NOCHECK) for rpmrc reading 3b796dc90e819fe7cfaa621cd7e8d4f62c6c517d Sanitize rpmGlob() behavior wrt non-glob patterns 1172a0f60e336891a86df77de89e3e82d536b39f Support per-user macro configuration