FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-28-2011, 02:37 PM
Pang Yan Han
 
Default Update Makefile.am and configure.ac for gpgdir

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@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/
--
1.7.5.rc0.101.g3d23c
 
Old 05-29-2011, 09:50 PM
"Marc - A. Dahlhaus"
 
Default Update Makefile.am and configure.ac for gpgdir

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@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
 
Old 06-01-2011, 09:23 AM
Allan McRae
 
Default Update Makefile.am and configure.ac for gpgdir

On 29/05/11 00:37, Pang Yan Han wrote:

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@gmail.com>


What about creating secring.gpg too. Not that it is used, but GPG has
issues with it not being present.


Also, does "touch trustdb.gpg" actually create a valid trustdb? From
memory, a blank trustdb is invalid and it must be created by gpg.


Allan
 

Thread Tools




All times are GMT. The time now is 10:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org