tedsmith / quickhash

Graphical cross platform data hashing tool for Linux, Windows and Mac
http://www.quickhash-gui.org
GNU General Public License v2.0
369 stars 37 forks source link

Debian packaging #10

Open darealshinji opened 7 years ago

darealshinji commented 7 years ago

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 <tedsmith28@yahoo.co.uk>
 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
tedsmith commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

darealshinji commented 7 years ago

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

tedsmith commented 7 years ago

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

tedsmith commented 7 years ago

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.

darealshinji commented 7 years ago

Here you go: quickhash-2.8.0-2017-02-15-debian.zip

darealshinji commented 7 years ago

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

tedsmith commented 7 years ago

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.

darealshinji commented 7 years ago

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

tedsmith commented 7 years ago

That would be great! Yes please.

Ted

Sent from Yahoo Mail on Android

darealshinji commented 7 years ago

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

darealshinji commented 7 years ago

Debian packages for 2.8.2: qh282-deb.zip

tedsmith commented 7 years ago

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

darealshinji commented 7 years ago

Newest version: quickhash-2.8.3-debian.zip

tedsmith commented 7 years ago

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

darealshinji commented 7 years ago

Version 2.8.4: quickhash-2.8.4-debian.zip

tedsmith commented 7 years ago

So fast! Many thanks. Added to the website.

tedsmith commented 6 years ago

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.

darealshinji commented 6 years ago

Here you go: quickhash-3.0.1-deb.zip

tedsmith commented 6 years ago

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.

darealshinji commented 6 years ago

quickhash-3.0.2-deb.zip

tedsmith commented 5 years ago

@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

darealshinji commented 5 years ago

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 commented 5 years ago

quickhash_3.0.3-1_deb.zip

tedsmith commented 5 years ago

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?

darealshinji commented 5 years ago

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 commented 5 years ago

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
tedsmith commented 5 years ago

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.

darealshinji commented 5 years ago

Is there no way to link the app directly against libsqlite3?

tedsmith commented 5 years ago

Im not sure about that one. Ill see if I can find out.

Meanwhile note the new branch, v3.0.4. The unti2.lfm main form got fubarred somehow with everything being right aligned. So I've taken the v3.0.3 version and overwritten it in the v3.0.4 branch.

tedsmith commented 5 years ago

Please could you compile the debs again for v.3.0.4 this time? Sorry it was soon after 3.0.3 but there were few things I and other users did not like.

darealshinji commented 5 years ago

quickhash_3.0.4-1_deb.zip

tedsmith commented 5 years ago

thank you sir.

tedsmith commented 5 years ago

@darealshinji v3.1.0 has been committed to master. Could you do your usual Debian package wrap up for me please when you can?

tedsmith commented 5 years ago

@darealshinji I've updated packaging branch for v3.1.0 and adjusted the e-mail address etc. I've attempted to run the build script but it still asks for v1.8.x of Lazarus, whereas v3.1.0 was built with v2.0.4 of Lazarus. I assumed there would be a variable in the script where I could just update what it was looking for but I can't see where it looks for the version. So I tried removing the version check part and saved it and then re-ran the buildscript. But it failed with : Makefile:39: recipe for target 'quickhash' failed make[1]: [quickhash] Error 127 make[1]: Leaving directory '<>' dh_auto_build: make -j1 returned exit code 2 debian/rules:4: recipe for target 'build' failed make: [build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Not sure where I go next? Can you help me?

darealshinji commented 5 years ago

https://github.com/tedsmith/quickhash/pull/61 fixes your issue.

quickhash_3.1.0-1_deb.zip

Note: those packages were build using the patch from https://github.com/tedsmith/quickhash/pull/62

tedsmith commented 5 years ago

Thanks man! You're a diamond as ever.

darealshinji commented 4 years ago

I'm trying to build version 3.2.0 but it fails because diskspecification.lfm is missing:

(3104) Compiling diskspecification.pas
/home/djcj/Downloads/quickhash-tmp/diskspecification.pas(38,1) Error: (9031) Can't open resource file "/home/djcj/Downloads/quickhash-tmp/diskspecification.lfm"
/home/djcj/Downloads/quickhash-tmp/diskspecification.pas(38,1) Fatal: (10026) There were 1 errors compiling module, stopping
darealshinji commented 4 years ago

In order to compile it with the Makefile I had to re-add quickhash_linux.lpi, uKnownHashLists.pas and uprogress.lfm. And I had to remove the unit diskspecification.

Update: I made a PR

tedsmith commented 4 years ago

I've re-pushed diskspecification.lfm to master. And uprogress and uKnownHashLists are also needed. I'm muddled as to why it wont build for you with Makefile. They're needed in order to facilitate disk data in both Windows & Linux along with hash based lookups from known imported hash lists.

Hopefully you'll be able to build?

Perhaps I should try from my end as I was able to compile the Linux binary with these units etc included. ??

tedsmith commented 4 years ago

@darealshinji I just pulled master to a temp folder and confirm all compiles OK using Lazarus 2.0.10. So that's good. And the program no longer crashes in Disk Hashing tab on Linux if the user right clicks a disk and chooses to view technical data, but it doesn't show anything either (as lteast not on Linux Mint 19.3) but I can work on that for the next release. At least it no longer causes the fatal exception errors. So I am happy for us to compile this into Debian packages as v3.2.0 if you are able to help me there?

darealshinji commented 4 years ago

Here's the package: quickhash_3.1.0-1_amd64-deb.zip Do you still need a 32 bit package too? I made 2 pull requests with small changes I had to make to build this package.

tedsmith commented 4 years ago

Thanks man...awesome! Much appreciated.

I've stopped doing 32-bit for Windows and OSX and I see little point these days in continuing it for Linux. Instead I've told users to e-mail me if they desperately need it and I'll compile on an "as is" basis.

tedsmith commented 4 years ago

Oooops - darn...sorry man....it is showing as v3.1.0, but master is at 3.2.0 now. I don't know if that is a typo or if its from one of the project files that maybe I forgot to update. I'm sure I updated it in the "normal" lpi file for exe compilations etc but maybe not in the linux lpi one?

tedsmith commented 3 years ago

@darealshinji hey sir..hope you are well etc.

v3.3.0 is nearing readiness for release. I would like to have compiled exe, .app and .deb on the website by Friday night for a scheduled release on Saturday 29th, which will be the 10 year anniversary of the tool.

It would be great to have Debian packages ready for that and whilst I managed it last time, you seem far better at it than I am. I hoped you could help me out with PREPARING the packaging script in the v3.3.0 branch makefile to ensure the data in the misc folder and the right Lazarus versions etc are set so that when I execute it on Friday night'ish, it all just works?

I will aim to commit the branch to master of course before I run the script. So if you make any changes to the version in the branch we can push those to the branch as well and then I'll merge the lot to master ASAP.

Basically, I use x64 version of Lazarus v2.0.12 now. Freepascal v3.2.0. The e-mail needs to be tedsmith@quickhash-gui.org. The version needs to be v3.3.0.

The new logo files in /misc need to be included. And, for Linux 64-bit, there is now a libewf-Linux-x64.so file in a subfolder called /libs/x64 that needs to be included. I've looked at the makefile and it looks like the following values need to be specified :

LAZARUSDIR ?= /usr/share/lazarus/2.0.12/ LAZBUILD := $(LAZARUSDIR)lazbuild LAZRES := $(LAZARUSDIR)tools/lazres

RESFILES = dbases_sqlite.lrs frmaboutunit.lrs udisplaygrid.lrs unit2.lrs udisplaygrid3.lrs uenvironmentchecker.lrs

But I'm not sure about the new SO file that needs to be added, libewf-Linux-x64.so, in /libs/x64? How do we add that to a Deb? Can we even do so?

I've not been able to compile that library for 32-bit so I'll have to skip a 32-bit Debian package for now until I get time. So all I need for now is the script prepared for 64-bit compilation of a Deb package. Would you be able to help me with that? I'd massively appreciate. But as ever, don't worry if not. I know it is short notice.

Thanks

darealshinji commented 3 years ago

I'll look into it. Honestly, just skip 32 bit Linux at all.

PS: you should better add a link to https://github.com/libyal/libewf in your Readme since that project is LGPL.

tedsmith commented 3 years ago

Re the libewf credit - it is given in the header of ulibewf.pas and user manual. But I'll add it to README too.

Re compiling - it took some doing (for Windows), but eventually managed it for Linux https://github.com/libyal/libewf/issues/152

darealshinji commented 3 years ago

Okay, I pushed commits to the v3.3.0 branch and the packaging branch. Add the Linux library of ewf to the libs directory where the dll files are.