[PC-BSD Commits] r9724 - in pcbsd/current/src-sh/pbi-manager: . man
svn at pcbsd.org
svn at pcbsd.org
Fri Mar 18 10:24:21 PDT 2011
Author: kris
Date: 2011-03-18 10:24:21 -0700 (Fri, 18 Mar 2011)
New Revision: 9724
Modified:
pcbsd/current/src-sh/pbi-manager/man/pbi_icon.1
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Update to pbi_manager
* Prevent registration of repos with duplicate SSL pub keys
* Fixed manpage for pbi_icon
* Fixed bug checking for updates when an index hasn't been downloaded yet
Modified: pcbsd/current/src-sh/pbi-manager/man/pbi_icon.1
===================================================================
--- pcbsd/current/src-sh/pbi-manager/man/pbi_icon.1 2011-03-18 16:39:06 UTC (rev 9723)
+++ pcbsd/current/src-sh/pbi-manager/man/pbi_icon.1 2011-03-18 17:24:21 UTC (rev 9724)
@@ -6,12 +6,12 @@
.Nd Interacts with a PBIs icon / mime settings
.Sh SYNOPSIS
.Nm
-.Op Fl add-desktop
-.Op Fl add-menu
-.Op Fl add-mime
-.Op Fl del-desktop
-.Op Fl del-menu
-.Op Fl del-mime
+.Op add-desktop
+.Op add-menu
+.Op add-mime
+.Op del-desktop
+.Op del-menu
+.Op del-mime
.Op Ar pbi
.Sh DESCRIPTION
The utility,
@@ -21,17 +21,17 @@
.Pp
.Sh OPTIONS
.Bl -tag -width indent
-.It Fl add-desktop
+.It add-desktop
Installs any XDG compliant desktop icons, should be run as user.
-.It Fl add-menu
+.It add-menu
Installs any XDG compliant menu icons, should be run as root.
-.It Fl add-mime
+.It add-mime
Installs any XDG compliant mime registrations, should be run as root.
-.It Fl del-desktop
+.It del-desktop
Removes any XDG compliant desktop icons, should be run as user.
-.It Fl del-mime
+.It del-mime
Removes any XDG compliant menu icons, should be run as root.
-.It Fl del-mime
+.It del-mime
Removes any XDG compliant mime registration, should be run as root.
.El
.Sh SEE ALSO
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-03-18 16:39:06 UTC (rev 9723)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-03-18 17:24:21 UTC (rev 9724)
@@ -1661,6 +1661,15 @@
exit_err "Improperly packaged repo file!"
fi
+ # Make sure we don't have a duplicate repo key
+ for tr in ${PBI_PUBKEYS}
+ do
+ diff -q ${tr} ${PBI_TMPDIR}/repokey.ssl >/dev/null 2>/dev/null
+ if [ "$?" = "0" ] ; then
+ exit_err "Repo with identical key already registered!"
+ fi
+ done
+
# Figure out the next repo number
get_next_repo_num
@@ -2936,26 +2945,25 @@
# Check if we have valid signatures, and return "0" if success, "1" if failure
check_valid_sigs() {
PBI_VALIDKEYSIG=""
- _sf="${1}/pbi_archivesum ${1}/${MOD_PREINS} ${1}/${MOD_POSTINS} ${1}/${MOD_PREREM}"
- for _ts in $_sf
- do
- for _pk in ${PBI_PUBKEYS}
- do
- good="false"
+
+ for _pk in ${PBI_PUBKEYS}
+ do
+ good="true"
+ _sf="${1}/pbi_archivesum ${1}/${MOD_PREINS} ${1}/${MOD_POSTINS} ${1}/${MOD_PREREM}"
+ for _ts in $_sf
+ do
openssl dgst -sha1 \
-verify ${_pk} \
-signature ${_ts}.sha1 \
${_ts} >/dev/null 2>/dev/null
- if [ "$?" = "0" ] ; then
- PBI_VALIDKEYSIG="$_pk"
- good="true" ; break
+ if [ "$?" != "0" ] ; then
+ good="false" ; break
fi
+ PBI_VALIDKEYSIG="$_pk"
done
- if [ "$good" != "true" ] ; then
- return 1
- fi
+ if [ "$good" = "true" ] ; then return 0 ; fi
done
- return 0
+ return 1
}
# Verify if the archive checksum is good
@@ -4425,6 +4433,7 @@
# Loop and check all PBIs for updates
for i in `ls ${PBI_DBAPPDIR}/ 2>/dev/null`
do
+ PBI_REPO=""
if [ -e "${PBI_DBAPPDIR}/${i}/pbi_name" ] ; then
load_info_from_dir "${PBI_DBAPPDIR}/${i}"
if [ -z "${PBI_REPO}" ]; then
@@ -4600,6 +4609,8 @@
_pbiIndex="${PBI_DBINDEXDIR}/${_rMd5}-index"
fi
+ if [ ! -e "${_pbiIndex}" ] ; then continue ; fi
+
# Search the update index for the specified PBI
_upLine=`grep -i -e "^$_uprog:" ${_pbiIndex} | grep ":$_uarch:" | grep "$_uver" | head -n 1`
More information about the Commits
mailing list