password-gorilla 1.5.3.8-0 (znver1;x86_64;aarch64) 2022-14551
0

Status rejected
Submitter mandian [@T] tutanota.com
Platform rolling
Repository unsupported
URL https://abf.openmandriva.org/build_lists/128458
Packages
password-gorilla-1.5.3.8-0.znver1.source
password-gorilla-1.5.3.8-0.znver1.binary
password-gorilla-1.5.3.8-0.x86_64.source
password-gorilla-1.5.3.8-0.x86_64.binary
password-gorilla-1.5.3.8-0.aarch64.source
password-gorilla-1.5.3.8-0.aarch64.binary
Build Date 2022-02-13 21:33:49 +0000 UTC
Last Updated 2022-03-04 01:41:32.385856823 +0000 UTC
$ git show --format=fuller --patch-with-stat --summary 754e2a60a0ba4e80cb4c1c589a415ef90f196a38

commit 754e2a60a0ba4e80cb4c1c589a415ef90f196a38
Author:     mandian <mandian@users.noreply.github.com>
AuthorDate: Sun Feb 13 17:16:33 2022 +0100
Commit:     mandian <mandian@users.noreply.github.com>
CommitDate: Sun Feb 13 17:16:33 2022 +0100

    Initial release
---
 .abf.yml                                           |   2 +
 password-gorilla-1.5.3.7-tclsh_version.patch       |  10 ++
 ...rilla-1.5.3.7-unbundle_tcllib_uuid_module.patch | 160 +++++++++++++++++++++
 password-gorilla.spec                              | 152 ++++++++++++++++++++
 4 files changed, 324 insertions(+)
 create mode 100644 .abf.yml
 create mode 100644 password-gorilla-1.5.3.7-tclsh_version.patch
 create mode 100644 password-gorilla-1.5.3.7-unbundle_tcllib_uuid_module.patch
 create mode 100644 password-gorilla.spec

diff --git a/.abf.yml b/.abf.yml
new file mode 100644
index 0000000..c3dd6be
--- /dev/null
+++ b/.abf.yml
@@ -0,0 +1,2 @@
+sources:
+  password-gorilla-5d4df52ebcc0bf2d39551bc16552638cf3bbac6f.tar.gz: 442c5488b743eeae3fef55e1e587d973108bc189
diff --git a/password-gorilla-1.5.3.7-tclsh_version.patch b/password-gorilla-1.5.3.7-tclsh_version.patch
new file mode 100644
index 0000000..b2606ec
--- /dev/null
+++ b/password-gorilla-1.5.3.7-tclsh_version.patch
@@ -0,0 +1,10 @@
+--- a/sources/gorilla.tcl
++++ b/sources/gorilla.tcl
+@@ -1,6 +1,6 @@
+ #! /bin/sh
+ # the next line restarts using wish \
+-exec tclsh8.5 "$0" ${1+"$@"}
++exec tclsh8.6 "$0" ${1+"$@"}
+
+ #
+ # ----------------------------------------------------------------------
diff --git a/password-gorilla-1.5.3.7-unbundle_tcllib_uuid_module.patch b/password-gorilla-1.5.3.7-unbundle_tcllib_uuid_module.patch
new file mode 100644
index 0000000..f13361b
--- /dev/null
+++ b/password-gorilla-1.5.3.7-unbundle_tcllib_uuid_module.patch
@@ -0,0 +1,160 @@
+--- a/sources/gorilla.tcl
++++ b/sources/gorilla.tcl
+@@ -256,7 +256,7 @@
+ # Initialize the Tcl modules system to look into modules/ directory
+ ::tcl::tm::add [ file join $::gorilla::Dir modules ]
+ 
+-foreach package {Itcl pwsafe tooltip PWGprogress} {
++foreach package {Itcl pwsafe tooltip PWGprogress sha1} {
+ 	load-package $package
+ } ; unset package
+ 
+@@ -264,8 +264,8 @@
+ # If installed, we can use the uuid package (part of Tcllib) to generate
+ # UUIDs for new logins, but we don't depend on it.
+ #
+-
+-catch {package require uuid}
++#
++# catch {package require uuid}
+ 
+ # Detect whether or not the file containing download sites exists
+ set ::gorilla::hasDownloadsFile [ file exists [ file join $::gorilla::Dir downloads.txt ] ]
+@@ -2364,11 +2364,11 @@
+ 				set modified 0
+ 				set now [clock seconds]
+ 
+-				if { [ dbget uuid $rn ] eq "" } {
+-					if { ! [ catch { package present uuid } ] } {
+-						dbset uuid $rn [uuid::uuid generate]
+-					}                              
+-				}
++#				if { [ dbget uuid $rn ] eq "" } {
++#					if { ! [ catch { package present uuid } ] } {
++#						dbset uuid $rn [uuid::uuid generate]
++#					}                              
++#				}
+ 
+ 				foreach element [ list {*}$varlist notes ] {
+ 
+@@ -2404,6 +2404,9 @@
+ 					}
+ 
+ 				} ; # end foreach element
++
++                                # update UUID to match current user and url field contents
++                                dbset uuid $rn [gorilla::uuid [dbget user $rn][dbget url $rn]]
+ 				
+ 				if { $modified } {
+ 					dbset last-modified $rn $now
+@@ -3666,11 +3669,15 @@
+ 				dbset group $newrn $default_group_name
+ 			}
+ 			
+-			if {  ( "uuid" ni $columns_present ) 
+-				&& ( ! [ catch { package present uuid } ] ) } {
++#			if {  ( "uuid" ni $columns_present ) 
++#				&& ( ! [ catch { package present uuid } ] ) } {
+ #				puts "setting a new uuid"
+-				dbset uuid $newrn [uuid::uuid generate]
+-			}
++#				dbset uuid $newrn [uuid::uuid generate]
++#			}
++
++                        if { ( "uuid" ni $columns_present ) } {
++                                dbset uuid $newrn [gorilla::uuid [dbget user $newrn][dbget url $newrn]]
++                        }
+ 			
+ 			if { "title" ni $columns_present } {
+ #				puts "setting a default title"
+@@ -8639,6 +8646,90 @@
+   
+ } ;# end proc gorilla::versionLookup
+ 
++# ----------------------------------------------------------------------
++
++# January 31, 2016 - Tcllib 1.17 has changed how it derives UUID
++# values.  If it finds the 'nettool' package from Tcllib 1.17 it uses
++# 'nettool' to attempt to obtain machine information, specifically the
++# mac address of one or more network interfaces.  However, on my dev
++# system, 'nettool' fails because it assumes that 'ifconfig' is in the
++# search PATH (it is not, /sbin is not in a regular user's PATH on my
++# systems), and even if it can find 'ifconfig' it assumes an output
++# format that my dev system's ifconfig does not produce, so UUID
++# generation fails.  When UUID generation fails, addition of new
++# password records also fails.  What this means is that relying on the
++# Tcllib UUID package for Gorilla makes for a fragile situation where
++# UUID generation may fail, dependent upon the particular system upon
++# which Gorillia is running.  Therefore this change, which is to move
++# UUID generation into Gorilla.  As well, Tcllib generated type 1
++# UUID's.  This proc below generates type 5 UUID's.  Type 5 UUID's have
++# a desirable property for Gorilla, which is stated in this quote from
++# RFC 4122 (for type 3 and type 5 UUID's):
++#
++# o  The UUIDs generated at different times from the same name in the
++#    same namespace MUST be equal.
++#
++# Therefore, for the 'name' field of these UUID's, Gorilla will use a
++# concatenation of the username and URL fields of a database record to
++# generate the UUID, and for a namespace, it will use a type 4 randomly
++# generated UUID as the namespace.  This has the desirable property
++# that two database entries with the same username/URL combination will
++# have the same UUID, even if they are independently inserted into
++# different safes by separately running Gorilla instances.  This should
++# allow for an updated PWSafe merge feature to detect movement of
++# entries between groups and replicate the move in a destination safe
++# when a source safe is merged.
++
++proc gorilla::uuid {name} {
++
++  # generate a type 5 (namespaced, sha1) UUID as defined by RFC 4122, using
++  # the parameter 'name' as the RFC name, and a hard coded UUID below as the
++  # RFC namespace
++
++  if {[string length $name]==0} {
++    # an empty input name returns the RFC 4122 Nil UUID
++    return 00000000-0000-0000-0000-000000000000
++  }
++
++  # This hex value below is an arbitrary type 4 (random) UUID generated from
++  # /dev/random as per RFC 4122 and is used as a namespace UUID
++
++  set namespace_uuid [binary format H* 3ed9561831aa550f719d5747869cc84a]
++
++  # this generation step mirrors the C code in RFC 4122 in the
++  # uuid_create_sha1_from_name() function
++
++  set token [::sha1::SHA1Init]
++  ::sha1::SHA1Update $token $namespace_uuid
++  ::sha1::SHA1Update $token $name
++  set hash [::sha1::SHA1Final $token]
++
++  set uuid_fields IuSuSucucua6
++
++  # pull apart the hash output into RFC 4122 fields so we can set the
++  # version and reserved bits as per the RFC - this mirrors the C code from
++  # RFC 4122 in the format_uuid_v3or5() function
++
++  binary scan $hash $uuid_fields \
++    time_low time_mid time_hi_and_version clk_seq_hi_res clk_seq_low node
++
++  # set the appropriate version as reserved bits as per the RFC
++  set time_hi_and_version [expr {($time_hi_and_version & 0x0fff) | (5<<12)}]
++  set clk_seq_hi_res [expr {($clk_seq_hi_res & 0x3f) | 0x80}]
++
++  # put the values back together into a binary representation of the uuid
++  # value
++  set uuid [binary format $uuid_fields \
++    $time_low $time_mid $time_hi_and_version $clk_seq_hi_res $clk_seq_low $node]
++
++  # and convert it to hex for output (f1->f5 ==> field1 -> field5)
++  binary scan $uuid H8H4H4H4H12 f1 f2 f3 f4 f5
++  
++  return $f1-$f2-$f3-$f4-$f5
++} ;# end gorilla::uuid
++
++# ----------------------------------------------------------------------
++
+ #
+ # ----------------------------------------------------------------------
+ # Init
diff --git a/password-gorilla.spec b/password-gorilla.spec
new file mode 100644
index 0000000..55c1000
--- /dev/null
+++ b/password-gorilla.spec
@@ -0,0 +1,152 @@
+%define commit 5d4df52ebcc0bf2d39551bc16552638cf3bbac6f
+%define shortcommit %(c=%{commit}; echo ${c:0:7})
+
+%define sname gorilla
+
+# Latest version is quite old so actually pre-release
+# version actually it may be safey
+%define pre_release 1
+
+Summary:	A tcl/tk password manager
+Name:		password-%{sname}
+Version:	1.5.3.8
+Release:	0
+License:	GPLv2+
+Group:		File tools
+URL:		https://github.com/zdia
+%if %{pre_release}
+Source0:	https://github.com/zdia/%{sname}/archive/%{commit}/%{name}-%{commit}.tar.gz
+%else
+Source0:	https://github.com/zdia/%{sname}/archive/v%{version}/%{name}-%{version}.tar.gz
+Patch0:		%{name}-1.5.3.7-unbundle_tcllib_uuid_module.patch
+%endif
+BuildArch:	noarch
+
+BuildRequires:	docbook-to-man
+BuildRequires:	imagemagick
+BuildRequires:	librsvg
+BuildRequires:	tk
+
+Requires:	tcl
+Requires:	tcl-tcllib
+Requires:	tcl-tklib
+Requires:	tk
+Requires:	itcl
+
+%description
+A tcl/tk password manager.
+
+%files
+%{_bindir}/%{name}
+%dir %{_datadir}/%{name}/
+%{_datadir}/%{name}/*
+%{_iconsdir}/hicolor/*/apps/%{name}.png
+#%{_datadir}/pixmaps/%{name}.xpm
+%{_datadir}/applications/openmandriva-%{name}.desktop
+%doc README
+%doc sources/help.txt
+%doc sources/CHANGES.txt
+%doc sources/LICENSE.txt
+
+#---------------------------------------------------------------------------
+
+%prep
+%if %{pre_release}
+%setup -q -n %{sname}-%{commit}
+%else
+%setup -q -n %{sname}-%{version}
+%endif
+%autopatch -p1
+
+# fix version
+%if %{pre_release}
+	sed -i -e "s|{\$Revision: 1.5.3.7 \$}|\{\$Revision: %{version} pre-release \$}|" sources/gorilla.tcl
+%endif
+
+# launcher
+cat > %{name}.sh << EOF
+#!/bin/sh
+
+exec /usr/share/%{name}/%{sname}.tcl $@
+EOF
+
+%build
+# Nothing to build
+
+%install
+# launcher
+install -dm 0755 %{buildroot}%{_bindir}/
+install -pm 0755 %{name}.sh %{buildroot}%{_bindir}/%{name}
+
+# program
+install -dm 0755 %{buildroot}%{_datadir}/%{name}/
+install -pm 0644 sources/*.tcl %{buildroot}%{_datadir}/%{name}/
+chmod 0755 %{buildroot}%{_datadir}/%{name}/%{sname}.tcl
+
+install -dm 0755 %{buildroot}%{_datadir}/%{name}/modules/
+install -pm 0644 sources/modules/*.tm %{buildroot}%{_datadir}/%{name}/modules/
+
+install -dm 0755 %{buildroot}%{_datadir}/%{name}/blowfish/
+install -pm 0644 sources/blowfish/blowfish.tcl %{buildroot}%{_datadir}/%{name}/blowfish/
+install -pm 0644 sources/blowfish/pkgIndex.tcl %{buildroot}%{_datadir}/%{name}/blowfish/
+
+install -dm 0755 %{buildroot}%{_datadir}/%{name}/twofish/
+install -pm 0644 sources/twofish/twofish.tcl %{buildroot}%{_datadir}/%{name}/twofish/
+install -pm 0644 sources/twofish/pkgIndex.tcl %{buildroot}%{_datadir}/%{name}/twofish/
+
+install -dm 0755 %{buildroot}%{_datadir}/%{name}/pwsafe/
+install -pm 0644 sources/pwsafe/pwsafe*.tcl %{buildroot}%{_datadir}/%{name}/pwsafe/
+install -pm 0644 sources/pwsafe/pkgIndex.tcl %{buildroot}%{_datadir}/%{name}/pwsafe/
+
+install -dm 0755 %{buildroot}%{_datadir}/%{name}/msgs/
+install -pm 0644 sources/msgs/*msg %{buildroot}%{_datadir}/%{name}/msgs/
+
+install -dm 0755 %{buildroot}%{_datadir}/%{name}/msgs/help/
+install -pm 0644 sources/msgs/help/*msg %{buildroot}%{_datadir}/%{name}/msgs/help/
+install -pm 0644 sources/help.txt %{buildroot}%{_datadir}/%{name}/
+
+install -dm 0755 %{buildroot}%{_datadir}/%{name}/pics/
+install -pm 0644 sources/pics/application.gif %{buildroot}%{_datadir}/%{name}/pics/
+install -pm 0644 sources/pics/browse.gif %{buildroot}%{_datadir}/%{name}/pics/
+install -pm 0644 sources/pics/%{sname}-splash.gif %{buildroot}%{_datadir}/%{name}/pics/
+install -pm 0644 sources/pics/group.gif %{buildroot}%{_datadir}/%{name}/pics/
+install -pm 0644 sources/pics/login.gif %{buildroot}%{_datadir}/%{name}/pics/
+install -pm 0644 sources/pics/splash.gif %{buildroot}%{_datadir}/%{name}/pics/
+
+# manpage
+#FIXME: add manpage
+
+# .desktop file
+install -dm 0755 %{buildroot}%{_datadir}/applications/
+cat > %{buildroot}%{_datadir}/applications/openmandriva-%{name}.desktop << EOF
+[Desktop Entry]
+Name=%{name}
+Comment="lightweight password manager"
+Exec=%{name}
+Icon=%{name}
+Terminal=false
+Type=Application
+StartupNotify=false
+Categories=System;
+X-Vendor=OpenMandriva
+EOF
+
+# icons
+# FIXME: imagemagick produces empty images (maybe
+#	a bug in inkskape maybe a bug in image)
+#	rsvg-convert works properly for png only
+for d in 16 32 48 64 72 128 256
+do
+	install -dm 0755 %{buildroot}%{_iconsdir}/hicolor/${d}x${d}/apps/
+	rsvg-convert -f png -h ${d} -w ${d} sources/pics/vector-logo/%{sname}-logo.svg \
+			-o %{buildroot}%{_iconsdir}/hicolor/${d}x${d}/apps/%{name}.png
+#	convert -background none -size "${d}x${d}" sources/pics/vector-logo/%{sname}-logo.svg \
+#			%{buildroot}%{_iconsdir}/hicolor/${d}x${d}/apps/%{name}.png
+done
+#install -dm 0755 %{buildroot}%{_datadir}/pixmaps/
+#convert -size 32x32 sources/pics/vector-logo/%{sname}-logo.svg \
+#	%{buildroot}%{_datadir}/pixmaps/%{name}.xpm
+
+%check
+# .desktop
+desktop-file-validate %{buildroot}%{_datadir}/applications/openmandriva-%{name}.desktop
Not Available

benbullard79 [@T] cox.netNo Comment.996d 09hrs