quickhash icon indicating copy to clipboard operation
quickhash copied to clipboard

Debian packaging

Open darealshinji opened this issue 9 years ago • 71 comments

I've written packaging files based on the files you had published here. Running Lintian on the package shows no errors or warnings for me.

Packaging files plus a .deb package: debian.zip

quickhash_2.7.0-1_amd64.deb:
 new debian package, version 2.0.
 size 1932730 bytes: control archive=1117 bytes.
     814 bytes,    19 lines      control              
    1069 bytes,    14 lines      md5sums              
 Package: quickhash
 Version: 2.7.0-1
 Architecture: amd64
 Maintainer: Ted Smith <[email protected]>
 Installed-Size: 6381
 Depends: libatk1.0-0 (>= 1.12.4), libc6 (>= 2.2.5), libcairo2 (>= 1.2.4), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.24.0), libpango-1.0-0 (>= 1.14.0), libx11-6
 Section: misc
 Priority: optional
 Homepage: http://quickhash-gui.org/
 Description: Graphical data hashing tool
  Quickhash is a graphical means for users to easily
  hash data such as text, files, or even disks using Linux
  without knowing command line syntax.
  .
  It can also be used for copying files from one folder to another
  where hashes are computed prior to copying and afterwards.
  .
  Users can compare to files, or compare two folders, using hash
  anaysis to be sure one matches the other

drwxr-xr-x root/root         0 2016-12-22 11:44 ./
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/bin/
-rwxr-xr-x root/root   5863080 2016-12-22 11:44 ./usr/bin/quickhash
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/96x96/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/96x96/apps/
-rw-r--r-- root/root     14664 2016-12-22 11:44 ./usr/share/icons/hicolor/96x96/apps/quickhash.png
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/32x32/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/32x32/apps/
-rw-r--r-- root/root      2473 2016-12-22 11:44 ./usr/share/icons/hicolor/32x32/apps/quickhash.png
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/48x48/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/48x48/apps/
-rw-r--r-- root/root      4672 2016-12-22 11:44 ./usr/share/icons/hicolor/48x48/apps/quickhash.png
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/64x64/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/64x64/apps/
-rw-r--r-- root/root      7434 2016-12-22 11:44 ./usr/share/icons/hicolor/64x64/apps/quickhash.png
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/16x16/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/16x16/apps/
-rw-r--r-- root/root      1197 2016-12-22 11:44 ./usr/share/icons/hicolor/16x16/apps/quickhash.png
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/128x128/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/128x128/apps/
-rw-r--r-- root/root     22526 2016-12-22 11:44 ./usr/share/icons/hicolor/128x128/apps/quickhash.png
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/24x24/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/icons/hicolor/24x24/apps/
-rw-r--r-- root/root      1667 2016-12-22 11:44 ./usr/share/icons/hicolor/24x24/apps/quickhash.png
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/man/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/man/man1/
-rw-r--r-- root/root       435 2016-12-22 11:44 ./usr/share/man/man1/quickhash.1.gz
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/doc/
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/doc/quickhash/
-rw-r--r-- root/root     16601 2016-12-22 10:19 ./usr/share/doc/quickhash/README.txt.gz
-rw-r--r-- root/root    563358 2016-12-22 10:19 ./usr/share/doc/quickhash/UserManual.pdf
-rw-r--r-- root/root       190 2016-12-22 10:11 ./usr/share/doc/quickhash/changelog.Debian.gz
-rw-r--r-- root/root       994 2016-12-21 15:31 ./usr/share/doc/quickhash/copyright
drwxr-xr-x root/root         0 2016-12-22 11:44 ./usr/share/applications/
-rw-r--r-- root/root       226 2016-12-22 11:44 ./usr/share/applications/quickhash.desktop

darealshinji avatar Dec 22 '16 10:12 darealshinji

Looks very promising. I'll try to give it a whirl tonight if you like on my own system. Thanks again for your work and efforts.

tedsmith avatar Dec 22 '16 15:12 tedsmith

I tested it on my own Linux Mint 17 LTS 64-bit distribution, and it worked perfectly! So I have uploaded it to my website for others to download and try out, and perhaps with a little refinement I can think about submitting it to the Debian Package maintainers.

http://quickhash-gui.org/download/debian-package-v2-7-0-for-linux/

Thanks again for your help with is. It's awesome.

tedsmith avatar Dec 29 '16 14:12 tedsmith

Was just looking at the Debian Package submission process (https://mentors.debian.net/) and I think the deb package has to be signed with a GPG key (https://mentors.debian.net/intro-maintainers).

I have generated a public and private key but I'm not sure what the procedure is for signing the package. Do you know? Am I best sending the key to you or is it a simple step?

tedsmith avatar Dec 29 '16 15:12 tedsmith

Hi. Would you please be able to do what you did last time and create a DEB package for v2.8.0 from this published code? I'd appreciate it? By the way, you may or may not have noticed you are listed in the user manual! :-)

Quickhash-DebPackage-v2.8.0.tar.gz

tedsmith avatar Feb 14 '17 11:02 tedsmith

Building from the packaging files created by lazbuild didn't work, so I was using my own build files again. This time I've also added a 32 bit package.

quickhash-2.8.0-debian.zip

darealshinji avatar Feb 14 '17 12:02 darealshinji

Superstar!! Thanks so much!! I'll add them to the release when I get the other binaries compiled.

tedsmith avatar Feb 14 '17 12:02 tedsmith

Except shortly afterwards I realised there were a few issues still (handle error codes for Windows 10 most notably) so I've had to make some more changes annoyingly. If its OK, I'll get another source code bundle to you if you'd be happy enough to rebuild for me? Or if you can use the Github code, all the better. Sorry to be a nuisance.

tedsmith avatar Feb 14 '17 21:02 tedsmith

By the way I suggest you to add the packaging files to a new branch, so you always have them available when you need them: https://github.com/darealshinji/quickhash/tree/packaging

darealshinji avatar Feb 15 '17 14:02 darealshinji

Thank you once again! I've uploaded the packages to the website.

I take your point about the branches. I'm still trying to get to grips with git generally. I need to get into branching for sure.

tedsmith avatar Feb 15 '17 23:02 tedsmith

Should I create a new branch with the packaging files, now that I have write access to your repository?

darealshinji avatar Mar 04 '17 11:03 darealshinji

That would be great! Yes please.

Ted

Sent from Yahoo Mail on Android

tedsmith avatar Mar 04 '17 12:03 tedsmith

Here they are on a new branch: https://github.com/tedsmith/quickhash/tree/packaging

darealshinji avatar Mar 04 '17 13:03 darealshinji

Debian packages for 2.8.2: qh282-deb.zip

darealshinji avatar May 31 '17 19:05 darealshinji

Brilliant! Thank you. Added to the website http://quickhash-gui.org/download/quickhash-v2-8-2-debian-packages-for-linux/

tedsmith avatar May 31 '17 23:05 tedsmith

Newest version: quickhash-2.8.3-debian.zip

darealshinji avatar Aug 08 '17 16:08 darealshinji

Brilliant. Thank you sir! Have uploaded to the site.

tedsmith avatar Aug 08 '17 18:08 tedsmith

Version 2.8.4: quickhash-2.8.4-debian.zip

darealshinji avatar Aug 28 '17 14:08 darealshinji

So fast! Many thanks. Added to the website.

tedsmith avatar Aug 28 '17 14:08 tedsmith

Is there any chance you would be able to generate a deb package for v3.0.1 master using your scripts? I'd appreciate it but if not I will look into doing it.

tedsmith avatar Feb 16 '18 09:02 tedsmith

Here you go: quickhash-3.0.1-deb.zip

darealshinji avatar Feb 16 '18 16:02 darealshinji

Sorry to come back so quickly, but v3.0.2 is out which fixed several bugs but one of them was quite important so I couldn't delay the release. Its committed to master.

tedsmith avatar Feb 28 '18 21:02 tedsmith

@darealshinji v3.0.3 is out, if you are still able to do the honours for me? However, I just discovered after wrapping up a pre-compiled binary up which worked fine within the Lazarus IDE did not work when executed standalone. I initially assumed it was due to the paths changing to the sqlite.so files, but upon inspection, my 64-bit Linux Mint 19.1 system still has the sqlite so files in the very first line where Quickhash looks for it. So it must be something else but I am too knackered to look now having spent several evenings on the trot compiling for the various operating systems

tedsmith avatar Jan 10 '19 23:01 tedsmith

I'm currently having some issues compiling it. Compiling through command line gives this error: <<BUILDDIR>>/HashLib4Pascal/HashLib/src/Base/HlpConverters.pas(14,3) Fatal: (10022) Can't find unit StrUtils used by HlpConverters And when I try to load DateTimePicker in the IDE it says it can't find "clocale".

Update: I figured out the issue were old config files laying around everywhere. It's building now. Will upload .deb packages soon.

darealshinji avatar Jan 11 '19 06:01 darealshinji

You're a rock star! It works perfectly on my Linux Mint system. Thanks. I'll get it uploaded to the website over the weekend.

I'm interested to know why the compiled binary I made last night did not work though. Did you have to make any code changes to get it working, or did you just have to do some clean up? If it was code, do I need to merge a commit somewhere?

tedsmith avatar Jan 11 '19 17:01 tedsmith

I didn't make any code changes despite https://github.com/tedsmith/quickhash/commit/ecc79b35b23968c5bc8f6401bf0d7ecedc4f6f58 ( https://github.com/tedsmith/quickhash/commit/3549e3fad9fb55092bd9610a32d1815a77fe1759 is not included in this one). I used the build script from the packaging branch. Maybe the resource files had to be updated? It's always done when building with the make command.

darealshinji avatar Jan 11 '19 17:01 darealshinji

I initially assumed it was due to the paths changing to the sqlite.so files, but upon inspection, my 64-bit Linux Mint 19.1 system still has the sqlite so files in the very first line where Quickhash looks for it.

This may be the issue I tried to fix in https://github.com/tedsmith/quickhash/commit/3549e3fad9fb55092bd9610a32d1815a77fe1759 . I discovered that if I run the 32 bit binary on my 64 bit system, it picks the first library present and tries to use that one. But that would be the 64 bit library in /usr/lib/x86_64-linux-gnu which doesn't work with 32 bit binaries.

Here it says:

For SQLDB database connectors, at least recent FPC versions try to load some default library names, but may fail. Using SQLDBLibraryLoader, you can specify the exact filename to load.

Does that mean there's a way to let this being handled automatically? And if not, maybe it's better to iterate through the paths and actually try to load all the libraries present (currently it seems to pick the first existing library and only checks that one). Here's what I mean in pseudo code:

SQLitePaths = '/usr/lib/x86_64-linux-gnu/libsqlite3.so.0',
 '/usr/lib/i386-linux-gnu/libsqlite3.so.0',
 ...
 '/lib/libsqlite3.so.0';

for each libPath in SQLitePaths
begin
  if fileExists(libPath) then
  begin
    SQLDB.LoadLibrary(libPath)
    if SQLDB.LibraryWasLoaded then
    begin
      stop checking and continue with the database stuff...
    end
  end
end

if not SQLDB.LibraryWasLoaded then
begin
  error: cannot find/load the sqlite library
end

darealshinji avatar Jan 11 '19 18:01 darealshinji

but loading all the libraries present seems extreme? I'll try and get round to trying out the latest commit on Linux Mint 19 later and see how it gets on there.

tedsmith avatar Jan 13 '19 10:01 tedsmith