bgrabitmap / lazpaint

🎨 Cross-platform image editor with raster and vector layers similar to Paint.Net written in Lazarus (Free Pascal)
https://lazpaint.github.io/
GNU General Public License v3.0
404 stars 57 forks source link

bring lazpaint to debian #18

Closed stavpup closed 3 years ago

stavpup commented 7 years ago

Move closer to make LazPaint as official debian package sometime in the future. So then installation would be as simple as "apt install lazpaint". Also upgrades would be automatic.

lainz commented 7 years ago

Hi, you discussed this in the forum? Because I don't remember but someone started to do it.

stavpup commented 7 years ago

@lainz You mean http://forum.lazarus.freepascal.org/index.php?topic=35093.0

It was Chronos ...

lainz commented 7 years ago

Ok I don't have idea on how to do it, but you can help Chronos?

stavpup commented 7 years ago

First it must be added to the list of packages in need of a new maintainer

https://www.debian.org/devel/wnpp/work_needing

How to become a maintainer

https://wiki.debian.org/DebianMaintainer#Advocating_a_Debian_Maintainer

And the guide

https://www.debian.org/doc/manuals/maint-guide/

lainz commented 7 years ago

I'm actually not good with linux, I managed to create a deb for LazPaint (https://github.com/bgrabitmap/lazpaint/tree/master/lazpaint/deb) but nothing more. Let's see what circular thinks if he wants to be a mantainer for distributing on Debian. Or you want to be the mantainer?

circular17 commented 7 years ago

Hmm so there is a way to register on the debian website to suggest that someone would maintain a package ?

stavpup commented 7 years ago

As I understand it, there are teams and individuals who package apps for debian, and you can request by email for the app to be packaged. The key thing as always, it to find the right team for the job that is willing to do that. I think that if there is a collaboration between the developer and the packaging team, it is easy to do it.

https://mentors.debian.net/sponsors

https://wiki.debian.org/Teams/#Packaging_teams

For example, this guy maintains mtpaint, which is similar (?) to lazpaint https://qa.debian.org/developer.php?login=muammar%40debian.org

circular17 commented 5 years ago

I fixed the deb install. So I suppose that now this could be published somehow. I will try to get in touch with a packager

circular17 commented 4 years ago

I've fixed the structure of the Debian package to be ok for Lintian.

Now to get the package into Debian is not so easy. I've proposed the package but that did not seem to satisfy the guidelines. Problem is about how the package is built. I am confused about what to do about it. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960742

lainz commented 4 years ago

The first reject is just a step closer to the goal.

circular17 commented 4 years ago

The issue has been progressing. Personally I think I have made what is expected but the dependency "lazarus-project" was not actually available to the person that tried building, it was only a virtual package. Maybe Lazarus is not provided on all Debian distributions.

alexmyczko commented 4 years ago

There really is no package called "lazarus-project" however lcl-utils-2.0 provides /usr/bin/lazbuild...

circular17 commented 4 years ago

Ok. So lazarus-project comes from the download site of Lazarus though it is not registered in Debian repositories. I am going to try with available dependencies.

alexmyczko commented 4 years ago

apt-cache search lazarus maybe something of that?

freepascal (fpc) is available too.

I always wanted to build this on Linux: https://github.com/hukkax/Propulse but failed

circular17 commented 4 years ago

It seems to work with the dependency "lcl" instead of "lazarus-project". I was able to build LazPaint. Though I had to uninstall "lazarus-project" first and delete the configuration folder ".lazarus" in the home folder. Though people that make Debian packages probably don't have Lazarus installed so that should not pose too much of a problem I guess.

alexmyczko commented 4 years ago

I would love to test your packaging :) if you put it on mentors.debian.net or share a link to your .dsc

we're pretty much the only one without it: https://repology.org/project/lazpaint/versions

circular17 commented 4 years ago

Sure. The package is on the following repository: https://github.com/bgrabitmap/lazpaint-upstream

I have added some instructions in the README.md file.

alexmyczko commented 4 years ago

Yes I can see it there, but that's overly complicated and outdate version? Would it be a problem to put a debian source package on a webshare with file indexing on? Something like I do with http://phd-sid.ethz.ch/debian/ ?

Or mentors.debian.net also works...

my build log of a dummy/empty package http://phd-sid.ethz.ch/debian/lazpaint/lazpaint_7.1.4-1_amd64.build

circular17 commented 4 years ago

How is that so complicated? It is just that GitHub supplies the archive as .zip format and that you need to make the archive yourself. You can do that by right-clicking on folder and choosing "add to archive" or something.

Not really going to put that out there until I am confident it works.

alexmyczko commented 4 years ago

It's complicated as in you have to do what you describe with a dsc link you can just say:

dget -x http://phd-sid.ethz.ch/debian/lazpaint/lazpaint_7.1.4-1.dsc

but yeah fine i can do it your way, np

yours is like this:

wget https://github.com/bgrabitmap/lazpaint-upstream/archive/master.tar.gz
tar xzvf master.tar.gz
cat lazpaint-upstream-master/debian/changelog
ln -s master.tar.gz lazpaint_6.4.1.orig.tar.gz
mv lazpaint-upstream-master lazpaint-6.4.1
circular17 commented 4 years ago

Oh I see you tried with version 7.1.4. Well the Debian package system is not really ready yet for this version. For now though you can make the package using the bash script in lazpaint/release/debian. You will need latest version of BGRABitmap and BGRAControls for that.

Regarding complexity I thought you were talking about giving the orig.tar.gz file. But from what you write you are talking about a DSC file. I don't know this format yet but that seems convenient indeed. I would say I am not there yet.

You know that's my first package and I am already struggling just to make the Debian structure. I am reading and receiving conflicting information on how to do it so I would like first to know if the package can be built at all.

So thanks for telling me about the DSC format, just be patient with me.

alexmyczko commented 4 years ago

I was able to build your 6.4.1 packaging once, but after i did update debhelper and standards versions to 4.5.0/13 it would keep failing. are you able to build your package twice in a row? just run debuild, then debuild again without changes?

i also wasn't able to find a wnpp bug, neither RFP nor ITP, only RFS. there's a few things that need be improved in the package, but other than that (once it builds), it should be easy.

I'd recommend adding some more files though (debian/watch), and I'd somehow try to get rid of the manpage/desktopfile/icon from debian/* but get it into upstream packaging/releases..

circular17 commented 4 years ago

Yes I can run it multiple times. What changes did you make to update versions? What error do you get?

I don't know the difference between RFS or ITP, here is the link I have got: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960742

By the way I sent a response there, notifying that the dependency with Lazarus is fixed. Maybe they will create the ITP?

I suppose it makes sense to add the watch file when the orig.tar.gz files are provided. That seems to go together.

I am not sure to understand what you suggest to do with manpage, desktop and icon files. To put them in the same archive but in a different folder?

circular17 commented 4 years ago

In fact when doing debuild, it generates a DSC file: lazpaint_6.4.1-1.dsc.gz

So, if I understand correctly, I need to put this file, along with the orig.tar.gz, in an online directory?

I have put the DSC, the orig file and the debian.tar.gz in this online directory: http://johann-elsass.net/debian/

If I do dget -x http://johann-elsass.net/debian/lazpaint_6.4.1-1.dsc I get a verification error:

dscverify: lazpaint_6.4.1-1.dsc failed signature check:
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
gpg: aucune donnée OpenPGP valable n'a été trouvée.
gpg: processing message failed: Erreur système inconnue
Validation FAILED!!
alexmyczko commented 4 years ago

It should just be .dsc (without .gz)

I was able to dget your debian source package.

The signature check is to see if it's signed, it seems not so, that's fine for now... you can do that later with debsign

Also debuild was successful. As the previous build, I can install and run it even. Checking if a second debuild would run... yes it does.

Change debian/control line to: Standards-Version: 4.5.0

Also still works increasing debhelper to 10 and 11:

Also works with 12, except you need to do two things:

drop debian/compat completely and have debian/control say: Build-Depends: lcl, debhelper-compat (= 12) (you can drop the versioning in lcl, as sid already has > 1.8.whatever)

W: lazpaint: hardening-no-pie usr/bin/lazpaint
W: lazpaint: initial-upload-closes-no-bugs
W: lazpaint source: timewarp-standards-version (2015-07-04 < 2018-04-05)

Your debian/changelog should be only something like this:

lazpaint (6.4.1-1) unstable; urgency=medium

 * Initial release. (Closes: #MUST-BE-ITP-BUG-NUMBER)

 -- Johann Elsass <circular@operamail.com>  Sat, 4 Jul 2015 10:29:00 +0100

and a later date, see dch -i

There's a lot more work to do on debian/copyright

try grep -ri opyright .

You should list yourself only for debian/* in debian/copyright, unless you also wrote parts of lazpaint.

I can see missing: Copyright (C) 2012 Krzysztof Dibowski dibowski at interia.pl Copyright (c) 2003 by Mazen NEIFER of the Free Pascal development team for details about the copyright.

Add a debian/watch file: (this is an example from another package on github, so replace relevant parts)

version=4
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%$1.tar.gz%" \
   https://github.com/8bitbubsy/pt2-clone/tags \
   (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate

Add a debian/upstream/metadata file: (also an example from another package)

Bug-Database: https://github.com/colmap/colmap/issues
Bug-Submit: https://github.com/colmap/colmap/issues/new
Repository: https://github.com/colmap/colmap.git
Repository-Browse: https://github.com/colmap/colmap
circular17 commented 4 years ago

It should just be .dsc (without .gz)

Not sure I understand. The DSC file does not have .gz appended to its name.

Also debuild was successful. As the previous build, I can install and run it even. Checking if a second debuild would run... yes it does.

Yey! 👍

Change debian/control line to: Standards-Version: 4.5.0

drop debian/compat completely and have debian/control say: Build-Depends: lcl, debhelper-compat (= 12) (you can drop the versioning in lcl, as sid already has > 1.8.whatever)

Done

lazpaint (6.4.1-1) unstable; urgency=medium

 * Initial release. (Closes: #MUST-BE-ITP-BUG-NUMBER)

 -- Johann Elsass <circular@operamail.com>  Sat, 4 Jul 2015 10:29:00 +0100

and a later date, see dch -I

Done. I have put the bug number #960742 (that's the RFS number)

You should list yourself only for debian/* in debian/copyright, unless you also wrote parts of lazpaint.

Well I wrote almost everything in LazPaint.

I can see missing: Copyright (C) 2012 Krzysztof Dibowski dibowski at interia.pl Copyright (c) 2003 by Mazen NEIFER of the Free Pascal development team for details about the copyright.

Added

Add a debian/watch file

Added the following:

version=4
opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/lazpaint-$1\.tar\.gz/ \
  https://github.com/bgrabitmap/lazpaint/tags .*/v?(\d\S+)\.tar\.gz

Add a debian/upstream/metadata file

Done

I have updated the DSC file (moved to a subfolder lazpaint): http://johann-elsass.net/debian/lazpaint/

alexmyczko commented 4 years ago

for some reason (i tried adding lazarus as Build-Depends:) and still it'd fail building in a clean changeroot, see the lazpaint_6.4.1-1_amd64-2020-10-14T20:08:06Z.build 254064 Oct 14 22:09 file at http://phd-sid.ethz.ch/debian/lazpaint/2/

something is missing, i can't find out what... maybe you do?

circular17 commented 4 years ago

It seems it cannot find an fpc dependency. I would have thought it would be included with lcl, but maybe not.

What if you add fpc in the dependencies?

To be more specific, the unit FastHTMLParser is provided by:

alexmyczko commented 4 years ago

different error messages, same url

circular17 commented 4 years ago

Ok now it seems that it is attempting to compile BGRAControls before or at the same time as BGRABitmap, but BGRAControls depends on BGRABitmap. Maybe the make is multithreaded in this case?

I have added fp-compiler dependency and changed the Makefile to make sure the dependencies are not on the same level. Does it solve the problem?

Note: I've updated the orig file.

alexmyczko commented 4 years ago

Yes it's multithreaded...

You have updated the debian source package, and I did dget it and here's the sbuild output: http://phd-sid.ethz.ch/debian/lazpaint/3/

it still failed, now i added --no-parallel to disable multithreaded building, and that... also failed.

alexmyczko commented 4 years ago

But look at the build log in /2/, it succeeded! so it's just missing build-depends and disable the parallel building :)

alexmyczko commented 4 years ago

I took the freedom to run this command: bts retitle 960742 "RFS: lazpaint/6.4.1 [ITP] -- Graphics viewer and editor"

circular17 commented 4 years ago

Sure it makes sense to rename it to 6.4.1 since that's what we are trying now.

I am confused about the 2 and 3. I have added fp-compiler already. So there is something else to add to build-depends?

alexmyczko commented 4 years ago

you can also dget my .dsc from 2, and read man debdiff to compare mine to yours to see what i changed

alexmyczko commented 4 years ago

I have updated the 2/ one

to me it looks pretty ready except for the bug you close with d/changelog it really needs a separate bug ITP (not the RFS one) here's an example of such a mail: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931009 d/control: should use Vcs but pointing to salsa.debian.org (that's what people usually do for the packaging) people like packages not be maintained by single person but a team or 2nd person at least would be great (if you want you can add me to Uploaders (right after Maintainer) to d/control, or a team, maybe debian multimedia))

ah could also try now if debhelper 13 won't work... works

circular17 commented 4 years ago

I've applied the bullet-listed changes by comparison

Regarding the dependency, you mentioned fp-compiler so I thought you used that instead of fpc. So I have done that, that may be why it doesn't work. So I changed back to fpc dependency (without all the list afterwards). I suppose that would compile for you, doesn't it?

About the ITP, how do I get one? Shall I ask in the RFS bug? For now I have put a "?" instead of the number in the changelog. EDIT: shall I create the ITP myself with bugreport command?

About using salsa as repository, well, why not but it works like that doesn't it? GitHub is free for open source projects. Anyway I wonder if the repository could be transferred and still keep the history?

The watch file for now checks the GitHub repository. Maybe this would need to check another place, to be in sync with actually uploaded source package?

I have added you as uploader in the control file. Would you like to be the person that offers the source package? In this case, would I keep the files on my website?

I realized there was .git files in the orig archive, which made it fat. I have put it on a diet with: tar --exclude-vcs -zcvf lazpaint_6.4.1.orig.tar.gz ./lazpaint-6.4.1

I have updated the files and also put the logs and deb file: http://johann-elsass.net/debian/lazpaint/

There are a lot of "?" in this message :D

alexmyczko commented 4 years ago

I've applied the bullet-listed changes by comparison

Well, I had fixes those already too at the URL/2/...

Regarding the dependency, you mentioned fp-compiler so I thought you used that instead of fpc. So I have done that, that may be why it doesn't work. So I changed back to fpc dependency (without all the list afterwards). I suppose that would compile for you, doesn't it?

Need to check, my point was to solve all the other issues I mentioned not in bullet-points...

About the ITP, how do I get one? Shall I ask in the RFS bug? For now I have put a "?" instead of the number in the changelog. EDIT: shall I create the ITP myself with bugreport command?

Yes that's why I put an example URL how that email would look like. Using reportbug would be the preferred way, also possible.

About using salsa as repository, well, why not but it works like that doesn't it? GitHub is free for open source projects. Anyway I wonder if the repository could be transferred and still keep the history?

You keep development where it is, salsa is only for the debian/ packaging. Did you think about you want to join the package into a team?

The watch file for now checks the GitHub repository. Maybe this would need to check another place, to be in sync with actually uploaded source package?

That stays as it is, since development of upstream/source happens there.

I have added you as uploader in the control file. Would you like to be the person that offers the source package? In this case, would I keep the files on my website?

I will take your latest .dsc and see...

I realized there was .git files in the orig archive, which made it fat. I have put it on a diet with: tar --exclude-vcs -zcvf lazpaint_6.4.1.orig.tar.gz ./lazpaint-6.4.1

That is very good!

I have updated the files and also put the logs and deb file: http://johann-elsass.net/debian/lazpaint/

There are a lot of "?" in this message :D

I'll re-check...

(I'll fix the things I find, just noting them here) Ah sorry for the confusion, by my Uploaders must be this: Gürkan Myczko <gurkan@phys.ethz.ch> removed white spaces from end of line debian/control (long description) removed double new line debian/changelog debian/rules was missing --no-parallel

alexmyczko commented 4 years ago

Your package also builds in sbuild: http://phd-sid.ethz.ch/debian/lazpaint/4/

alexmyczko commented 4 years ago

feel free to dget the /4 and /2 and merge debian/* and then upload another to mentors.debian.net

if you prefer, tell me to create the ITP bug number for you... can also put it on mentors.debian.net and salsa, if you want. but could you also create a salsa.debian.org account for yourself?

circular17 commented 4 years ago

I've applied the bullet-listed changes by comparison

Well, I had fixes those already too at the URL/2/...

That's ok I merged them with Meld. Though I am considering giving you write access to my upstream repository https://github.com/bgrabitmap/lazpaint-upstream or maybe you could fork it?

Need to check, my point was to solve all the other issues I mentioned not in bullet-points...

Ok

Yes that's why I put an example URL how that email would look like. Using reportbug would be the preferred way, also possible.

Ok in the end, I have sent an ITP bug e-mail. Waiting for a mail back.

circular17 commented 4 years ago

I have fixed the uploader name/mail to Gürkan.

Your package also builds in sbuild: http://phd-sid.ethz.ch/debian/lazpaint/4/

So that means there is no need for --no-parallel option anymore?

circular17 commented 4 years ago

When I dget your DSC the files receive are not up-to-date. Last time I had to unpack the deb file to get your changes.

Anyway I think I merged everything. I received the ITP. I built the files again: http://johann-elsass.net/debian/lazpaint/

alexmyczko commented 4 years ago

I have fixed the uploader name/mail to Gürkan.

Your package also builds in sbuild: http://phd-sid.ethz.ch/debian/lazpaint/4/

So that means there is no need for --no-parallel option anymore?

it is needed i re added it :)

same url/5, your fullname must match the one in changelog and control (i've made ELSASS to Elsass)

very cool about the ITP bug you created, I have run this: bts owner 972503 circular@operamail.com

circular17 commented 4 years ago

Ok. I have replaced the rules with your file. And rebuilt everything.

Is it ready for entering the Debian realm?

Oh wait, I need to fix the name in control.

circular17 commented 4 years ago

I don't get why my name should be lowercase. Is this a rule for last names? Or is it that there is a place where my name is lowercase that those files should match?

In my e-mail, my name is uppercase for example.

alexmyczko commented 4 years ago

I don't get why my name should be lowercase. Is this a rule for last names? Or is it that there is a place where my name is lowercase that those files should match?

In my e-mail, my name is uppercase for example.

must be the same at all places which one you want is up to you

alexmyczko commented 4 years ago

Ok. I have replaced the rules with your file. And rebuilt everything.

Is it ready for entering the Debian realm?

almost there, let us put it on mentors first and see what lintian says about it...

Oh wait, I need to fix the name in control.

circular17 commented 4 years ago

In my e-mail, my name is uppercase for example.

must be the same at all places which one you want is up to you

Well I find uppercase convenient to differentiate first name and last name. Also that's my e-mail. Ok so let's put uppercase in control, changelog and copyright.

almost there, let us put it on mentors first and see what lintian says about it...

Ok, I don't know what mentors is. About lintian are you taking about the utility? It complains about hardening-no-pie.

alexmyczko commented 4 years ago

https://mentors.debian.net