I'd like to self-host, but I'm probably going to forget to update this occasionally due to the effort involved. A launchpad PPA would make it as easy as running apt-get update && apt-get upgrade whenever I want to update KeeWeb.
That would be great but I need some help with creating a binary package and updating it.
Here's the package for arch linux: #78
@antelle I have created a script wich builds a .deb package.
Save as buildkeeweb-desktopdeb.sh:
#!/bin/bash
echo "Build keeweb-desktop.deb"
rm -rf keeweb-desktop
rm -f keeweb-desktop.deb
mkdir -p keeweb-desktop/opt/keeweb-desktop
wget -nc https://github.com/antelle/keeweb/releases/download/v1.0.4/KeeWeb.linux.x64.zip
unzip KeeWeb.linux.x64.zip -d keeweb-desktop/opt/keeweb-desktop
mkdir -p keeweb-desktop/usr/bin
tee "keeweb-desktop/usr/bin/KeeWeb" << 'EOF'
#!/bin/bash
/opt/keeweb-desktop/KeeWeb --disable-updater $1
EOF
chmod 755 keeweb-desktop/usr/bin/KeeWeb
mkdir keeweb-desktop/DEBIAN
tee "keeweb-desktop/DEBIAN/control" << 'EOF'
Package: keeweb-desktop
Version: 1.0.4
Section: base
Priority: optional
Architecture: amd64
Maintainer: antelle <[email protected]>
Installed-Size: 97280
Homepage: https://keeweb.info/
Description: KeeWeb
Free cross-platform password manager
compatible with KeePass
EOF
mkdir -p keeweb-desktop/usr/share/applications
tee "keeweb-desktop/usr/share/applications/keeweb.desktop" << 'EOF'
[Desktop Entry]
Name=KeeWeb
GenericName=Password Manager
GenericName[de]=Passwortverwaltung
GenericName[es]=Gestor de contraseñas
GenericName[fr]=Gestionnaire de mot de passe
GenericName[ru]=менеджер паролей
Comment=Free cross-platform password manager compatible with KeePass
Exec=KeeWeb %u
Icon=keeweb
Terminal=false
StartupNotify=false
Type=Application
Categories=Utility;
MimeType=application/x-keepass2;
StartupWMClass=KeeWeb
EOF
mkdir -p keeweb-desktop/usr/share/mime/packages
tee "keeweb-desktop/usr/share/mime/packages/keeweb.xml" << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-keepass2">
<comment>KeePass 2 database</comment>
<glob pattern="*.kdbx"/>
</mime-type>
</mime-info>
EOF
mkdir -p keeweb-desktop/usr/share/icons/hicolor/128x128/apps
cp keeweb-desktop/opt/keeweb-desktop/resources/app/icon.png keeweb-desktop/usr/share/icons/hicolor/128x128/apps/keeweb.png
fakeroot dpkg-deb --build keeweb-desktop
echo "keeweb-desktop.deb successfully build!"
Thanks! I've made a grunt tasks from this and uncluded building deb in grunt build, now it's producing deb file as well. Registered the app: https://launchpad.net/~antelle-net/+archive/ubuntu/keeweb
I'm building the package on os x using dpkg from brew and I get this error when trying to install it on ubuntu in virtualbox:

What is the reason, any guess? Looks like fakeroot is not working. Bad.
@antelle As you can see you need fakeroot. Without it the ownership is wrong (not root). Try to install fakeroot via brew (brew install fakeroot).
Yes, I've tried fakeroot from brew and standalone installation: both does not work on el capitan :(
Maybe this helps: https://github.com/Homebrew/homebrew/issues/33400. Or you could try to use sudo chown -R root:root keeweb-desktop before dpkg-deb --build keeweb-desktop. (I have not tested it on my system).
running sudo from build is not the best idea:
I've found some packages in npm which create deb right from node.js, without using dpkg - will try using them.
So, I switched the build to grunt-contrib-deb and after some patches (you may find them in my fork here: https://github.com/antelle/grunt-contrib-deb) it's installing. Could you please help me with these questions, I still don't understand it:
This is very strange with my build script the produced deb (build on ubuntu 14.04) installs without these problems. I have an desktop icon and the option to uninstall the package. If I'm back home I'll take a look at these issues.
Ok, thank you. Attached the contents of PRM (with extracted content.tar.gz data.tar.gz). Maybe there's something wrong with permissions?..
contents.txt
So, I've investigated a bit:
Now the deb can be installed and the app appears in search after install with app icon (Ubuntu Dash). The app can be launched ok.
Ok, 2 is very strange because with my script it is working out of the box.
In the next few days I'll try to investigate this further. 3. Updates only
work via ppa or manual Installation of a newer version, so this is expected
behavior.
Am 02.04.2016 9:43 nachm. schrieb "antelle" [email protected]:
So, I've investigated a bit:
- Search in apps: it was permissions trouble; after adding another patch
to packager, it appears in apps search. I also added a postinstall script
https://github.com/antelle/keeweb/blob/develop/package/deb/scripts/postinst
to refresh icons cache. Is it a right way of doing this?
2, 3. Still don't understand—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/antelle/keeweb/issues/141#issuecomment-204788275
So the package appears in Ubuntu Software Center for you after installation?
I'm using Ubuntu 15. I can upload the built deb if you need it.
I checked your package and it is not working because the rights are wrong (see attached files).
You can also remove sudo in your postinstall script.
Thanks, I'll add rights
I've changed rights, here's the new package: https://www.dropbox.com/s/pqyfjy055kjsl03/keeweb-desktop_1.1.1-1_amd64.deb?dl=0
Does it work for you?
@antelle It is now working. :) Only bug left the description is not shown because the formatting is wrong. Here is the right formatting:
Description:
Free cross-platform password manager
compatible with KeePass
What's the correct way to build it from string? Just wrap all lines to fit N characters per line rule? I cannot find any info about such splitting in debian policy manual.
You mean, the first line here is a synopsis and the last one is the extended description?
It is not the splitting. First line is the package name, second line needs a space + description text. If you put the description in the fist line nothing is displayed. ;)
Description: Name
Description
So is it ok to format it in this way?
Description:
Free cross-platform password manager compatible with KeePass
Yes and in the first line you could add the application name
Description: KeeWeb
Free cross-platform password manager compatible with KeePass
Implemented this, the package is installing for my ubuntu 15 as well.
What's the next step, is there any manual how to push this package? I haven't found any good description. Uploading page describes only how to upload the source package to ppa (or, what means a 'source package'?), but how can I upload this binary deb? New deb can be downloaded from the release page.
Sorry I have no experience with ppa's. As far as I understand you need to upload the source code or the source for the deb file. The ppa builds the packages from source (https://askubuntu.com/questions/71199/manually-created-deb-how-do-i-upload-to-a-ppa).
Bad. So there will be no option to upload this, as we definitely don't want to rebuild the app from source. I'll try to search whether it possible to add the app to Ubuntu Software Center.
UPD: Tried to submit it but lintian tool found too many errors which should be fixed by electron team. So... auto-update for linux looks like an impossible task for now. But of course, internal app auto-update can be used and is working. Triaging back to Future.
Anyway thank you for help :gift: having a .deb package is already better than just zip.
https://github.com/tagplus5/keeweb-ppa PPA for ubuntu based on your .deb packages.
So is that ppa officially supported? Are there still things that need to happen?
So is that ppa officially supported?
I don't support it, but as I can understand, it's regularly updated.
I'm on Solus right now and installing manually. Seeing that this is already on launchpad, is there a possibility of publishing it as a snap, to cater to a wider range of distros?
It's possible of course, but will require some preparation: #450
Most helpful comment
https://github.com/tagplus5/keeweb-ppa PPA for ubuntu based on your .deb packages.