Compare commits

...
Author SHA1 Message Date
RandyTheSilly 366c76d683 Fxed sync and remote entry deletion 2021-09-15 18:54:10 -04:00
3 changed files with 34 additions and 22 deletions
+5 -5
View File
@@ -1,17 +1,17 @@
# Maintainer: Randall Winkhart <idgr at tutanota dot com> # Maintainer: Randall Winkhart <idgr at tutanota dot com>
pkgname=rpass pkgname=rpass
pkgver=2021.09.15.mr4.1 pkgver=2021.09.15.mr4.2
pkgrel=1 pkgrel=1
pkgdesc="An rsync-based password manager and alternative to GNU pass" pkgdesc="An rsync-based password manager and alternative to GNU pass"
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64')
license=('GPL3') license=('GPL3')
depends=( python gnupg openssh rsync xclip wl-clipboard) depends=( python gnupg openssh rsync xclip wl-clipboard)
source_x86_64=('https://github.com/rwinkhart/rpass/releases/download/v2021.09.15.mr4.1/rpass-2021.09.15.mr4.1.tar.xz') source_x86_64=('https://github.com/rwinkhart/rpass/releases/download/v2021.09.15.mr4.1/rpass-2021.09.15.mr4.2.tar.xz')
source_aarch64=('https://github.com/rwinkhart/rpass/releases/download/v2021.09.15.mr4.1/rpass-2021.09.15.mr4.1.tar.xz') source_aarch64=('https://github.com/rwinkhart/rpass/releases/download/v2021.09.15.mr4.1/rpass-2021.09.15.mr4.2.tar.xz')
sha512sums_x86_64=('fb162031b2bff1896a4ae2c6c78889ead6c278ec7e5cb6134ec8ccf08004bf87f38839f0cab952ce2047c53a075b0802ec882410048b04b4ababc89a68de71f8') sha512sums_x86_64=('f3948d7c6e26f53d19a08db32ba7f7a3576d0386dea2338ff529cb3ee72365c3d405d6de5c812b398e87b8fe50b765a4fc2bcc899fe09cef9d2db44c7978d6bf')
sha512sums_aarch64=('fb162031b2bff1896a4ae2c6c78889ead6c278ec7e5cb6134ec8ccf08004bf87f38839f0cab952ce2047c53a075b0802ec882410048b04b4ababc89a68de71f8') sha512sums_aarch64=('f3948d7c6e26f53d19a08db32ba7f7a3576d0386dea2338ff529cb3ee72365c3d405d6de5c812b398e87b8fe50b765a4fc2bcc899fe09cef9d2db44c7978d6bf')
package() { package() {
+18 -17
View File
@@ -101,7 +101,7 @@ if argument == 'version' or argument == '-v':
print('/ /') print('/ /')
print('/ rpass Copyright (C) 2021 Randall Winkhart /') print('/ rpass Copyright (C) 2021 Randall Winkhart /')
print('/ /') print('/ /')
print('/ Version 2021.09.15.mr4.1 /') print('/ Version 2021.09.15.mr4.2 /')
print('/ The Housekeeping Update (Pt. 1) /') print('/ The Housekeeping Update (Pt. 1) /')
print('/ /') print('/ /')
print('////////////////////////////////////////////////////////\n') print('////////////////////////////////////////////////////////\n')
@@ -169,6 +169,7 @@ if argument == 'config':
f.write('\n\n\n\n' + devicetype) f.write('\n\n\n\n' + devicetype)
print('\nConfiguration complete!\n') print('\nConfiguration complete!\n')
elif devicetype != 's' and devicetype != 'S': elif devicetype != 's' and devicetype != 'S':
devicetype = 'c'
print('\nMake sure the ssh service on the remote server is running and properly configured.\n') print('\nMake sure the ssh service on the remote server is running and properly configured.\n')
sshgen = str(input('rsync support requires a unique ssh key. Would you like to have this ' sshgen = str(input('rsync support requires a unique ssh key. Would you like to have this '
'automatically generated? (Y/n) ')) 'automatically generated? (Y/n) '))
@@ -206,10 +207,10 @@ if argument == '':
try: try:
sshinfo = open("/var/lib/rpass/rpass-ssh").readlines() sshinfo = open("/var/lib/rpass/rpass-ssh").readlines()
usernamessh = sshinfo[0].replace('\n', '') usernamessh = sshinfo[0].replace('\n', '')
ip = (sshinfo[1].replace('\n', '')) ip = sshinfo[1].replace('\n', '')
port = (sshinfo[2].replace('\n', '')) port = sshinfo[2].replace('\n', '')
directoryssh = (sshinfo[3].replace('\n', '')) directoryssh = sshinfo[3].replace('\n', '')
devicetype = (sshinfo[4].replace('\n', '')) devicetype = sshinfo[4].replace('\n', '')
except (FileNotFoundError, IndexError): except (FileNotFoundError, IndexError):
usernamessh, ip, port, directoryssh, devicetype = (0, 0, 0, 0, 0) usernamessh, ip, port, directoryssh, devicetype = (0, 0, 0, 0, 0)
try: try:
@@ -759,19 +760,19 @@ if argument == 'remove' or argument == '-rm':
entryname = str(input('What would you like to delete? ')) entryname = str(input('What would you like to delete? '))
if entryname.startswith('/'): if entryname.startswith('/'):
if entryname.replace('/', '', 1).__contains__('/'): if entryname.replace('/', '', 1).__contains__('/'):
if devicetype == 'c' or devicetype == 'C': if devicetype == 'c':
term('ssh -p ' + port + '' + usernamessh + '@' + ip + ' rm -rf ' + "'" + directoryssh + "'" + term('ssh -p ' + port + ' ' + usernamessh + '@' + ip + ' "' + ' rm -rf ' + "'" + directoryssh +
entryname.replace('/', '', 1) + '.gpg') entryname.replace('/', '', 1) + '.gpg' + "'" + '"')
remove(directory + entryname.replace('/', '', 1) + '.gpg') remove(directory + entryname.replace('/', '', 1) + '.gpg')
else: else:
if devicetype == 'c' or devicetype == 'C': if devicetype == 'c':
term('ssh -p ' + port + '' + usernamessh + '@' + ip + ' rm -rf ' + "'" + directoryssh + "'" + term('ssh -p ' + port + ' ' + usernamessh + '@' + ip + ' "' + ' rm -rf ' + "'" + directoryssh +
entryname.replace('/', '', 1)) entryname.replace('/', '', 1) + "'" + '"')
rmtree(directory + entryname.replace('/', '', 1)) rmtree(directory + entryname.replace('/', '', 1))
else: else:
if devicetype == 'c' or devicetype == 'C': if devicetype == 'c':
term('ssh -p ' + port + ' ' + usernamessh + '@' + ip + ' rm -rf ' + "'" + directoryssh + "'" + term('ssh -p ' + port + ' ' + usernamessh + '@' + ip + ' "' + ' rm -rf ' + "'" + directoryssh +
entryname + '.gpg') entryname + '.gpg' + "'" + '"')
remove(directory + entryname + '.gpg') remove(directory + entryname + '.gpg')
except KeyboardInterrupt: except KeyboardInterrupt:
print('\n\nDeletion cancelled.\n') print('\n\nDeletion cancelled.\n')
@@ -800,11 +801,11 @@ term('find ' + directory + ' -type d -exec chmod -R 700 {} +')
term('find ' + directory + ' -type f -exec chmod -R 600 {} +') term('find ' + directory + ' -type f -exec chmod -R 600 {} +')
# rsync - ran at end of program to ensure all files are properly synced # rsync - ran at end of program to ensure all files are properly synced
if devicetype == 'c' or devicetype == 'C': if devicetype == 'c':
if argument.__contains__('add') or argument.__contains__('-rm') or argument.__contains__('remove') or argument. \ if argument.__contains__('add') or argument.__contains__('-rm') or argument.__contains__('remove') or argument. \
__contains__('edit') or argument.__contains__('gen') or argument == 'sync' or argument == '-s': __contains__('edit') or argument.__contains__('gen') or argument == 'sync' or argument == '-s':
print('Syncing entries with other device(s)...\n') print('Syncing entries with other device(s)...\n')
term('rsync -v -H -r -l -t -p -e ' + '"ssh -i ~/.ssh/rpass -p ' + port + '" ' + directory + ' ' + usernamessh term('rsync -v -H -r -l -t -p -e ' + '"ssh -i ~/.ssh/rpass -p ' + port + '" ' + directory + ' ' +
+ '@' + ip + ':' + directoryssh) usernamessh + '@' + ip + ':' + directoryssh)
term('rsync -v -H -r -l -t -p --delete -e ' + '"ssh -i ~/.ssh/rpass -p ' + port + '" ' + usernamessh term('rsync -v -H -r -l -t -p --delete -e ' + '"ssh -i ~/.ssh/rpass -p ' + port + '" ' + usernamessh
+ '@' + ip + ':' + directoryssh + ' ' + directory) + '@' + ip + ':' + directoryssh + ' ' + directory)
+11
View File
@@ -1,5 +1,16 @@
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
rpass 2021.09.15.mr4.2
The Housekeeping Update (Pt. 1) - Hotfix 2
Changes:
- sync support is fixed
- files with spaces in their names can now be properly deleted from remote servers
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
rpass 2021.09.15.mr4.1 rpass 2021.09.15.mr4.1
The Housekeeping Update (Pt. 1) - Hotfix The Housekeeping Update (Pt. 1) - Hotfix