[pacman-dev] [PATCH 3/6] Update Makefile.am and configure.ac for gpgdir

Marc - A. Dahlhaus mad at wol.de
Sun May 29 17:50:31 EDT 2011


Am 28.05.2011 16:37, schrieb Pang Yan Han:

> install-data-local target in Makefile.am will now create the default GPGDir,
> trustdb.gpg, pubring.gpg if they do not exist.
> 
> configure script will now output the default gpgdir with the other info
> (eg. database dir, cachedir, etc)
> 
> Signed-off-by: Pang Yan Han <pangyanhan at gmail.com>
> ---
>  Makefile.am  |    7 +++++--
>  configure.ac |    1 +
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 259a455..edae191 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -24,10 +24,13 @@ check-local: test/pacman test/util src/pacman src/util
>  	$(SH) $(top_srcdir)/test/util/vercmptest.sh \
>  		$(top_builddir)/src/util/vercmp
>  
> -# create the pacman DB and cache directories upon install
> +# create the pacman DB, cache and GPG directories, trustdb.gpg, pubring.gpg upon install
>  install-data-local:
> -	for dir in "$(DESTDIR)$(localstatedir)/lib/pacman" "$(DESTDIR)$(localstatedir)/cache/pacman/pkg"; do \
> +	for dir in "$(DESTDIR)$(localstatedir)/lib/pacman" "$(DESTDIR)$(localstatedir)/cache/pacman/pkg" "$(DESTDIR)$(sysconfdir)/pacman.d/gnupg"; do \
>  	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
>  	done
> +	for f in "$(DESTDIR)$(sysconfdir)/pacman.d/gnupg/pubring.gpg" "$(DESTDIR)$(sysconfdir)/pacman.d/gnupg/trustdb.gpg"; do \
> +		test -e "$$f" || touch "$$f"; \
> +	done
>  
>  # vim:set ts=2 sw=2 noet:
> diff --git a/configure.ac b/configure.ac
> index 02f9f40..6422f57 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -394,6 +394,7 @@ ${PACKAGE_NAME}:
>      prefix                 : ${prefix}
>      sysconfdir             : $(eval echo ${sysconfdir})
>         conf file           : $(eval echo ${sysconfdir})/pacman.conf
> +       gpg dir             : $(eval echo ${sysconfdir})/pacman.d/gnupg/
>      localstatedir          : $(eval echo ${localstatedir})
>         database dir        : $(eval echo ${localstatedir})/lib/pacman/
>         cache dir           : $(eval echo ${localstatedir})/cache/pacman/pkg/



The path should be changeable and have another default value IMO.

Directories named "*.d" are typically dirs containing files for the same purpose that are read in glob order by a single tool, some examples:

/etc/xinetd.d
/etc/httpd/conf.d
/etc/pam.d
/etc/grub.d
/etc/bash_completion.d
/etc/ld.so.conf.d
/etc/rsyslog.d
/etc/udev/rules.d

We should not use a .d suffix if a directory contains many files for many different things which is the case for pacman.d here...

rankmirrors.sh and corresponding config-lines in pacman.conf are also misusing the .d suffix right now...

I prepare some patches for that in the next few days.


Marc


More information about the pacman-dev mailing list