[12:20] <matthewcroughan> Hey! Is this the right place to get help making a PPA package?
[12:20] <matthewcroughan> I'm really confused, having followed the Ubuntu docs, which seem outdated to the point of not actually functioning due to python versions.
[12:21] <matthewcroughan> https://packaging.ubuntu.com/html/packaging-new-software.html
[12:21] <matthewcroughan> the step regarding BRZ fails completely due to an arbitrary python error: brz: ERROR: AttributeError: 'NoneType' object has no attribute 'initialize_on_transport'
[12:21] <matthewcroughan> following the guide to a tee, root@4ac1c3f970f1:~# bzr dh-make hello 2.10 hello-2.10.tar.gz
[12:28] <cjwatson> We can help with the points where it interacts with Launchpad, but not generally with the bits before that.
[12:29] <matthewcroughan> Then I am confused. Maybe you can direct me to better docs that describe how to package?
[12:29] <matthewcroughan> since the ubuntu docs don't currently work
[12:33] <cjwatson> Yeah, I'm somewhat annoyed nobody has fixed those up for years, but haven't had time myself.  https://wiki.ubuntu.com/UbuntuDevelopment/#Packaging links to some other resources; I would probably suggest starting with the Debian resources there, since for the most part the only required difference for uploading stuff to a PPA should be selecting an appropriate version number (for which, ...
[12:33] <cjwatson> ... https://help.launchpad.net/Packaging/PPA/BuildingASourcePackage#Versioning)
[12:33] <matthewcroughan> Why is this such voodoo? I made an AUR package in seconds lol.
[12:34] <matthewcroughan> All I want to do is provide something I'm doing on Github, to people.
[12:34] <cjwatson> OK, and I've given you some better pointers, please don't give me a hard time about it.
[12:34] <matthewcroughan> I'm not, I hope :D
[12:35] <cjwatson> I guarantee it would take me hours to make an AUR package; there's a significant amount of familiarity involved ...
[12:35] <cjwatson> (at minimum)
[12:35] <matthewcroughan> Lol it's just one file.
[12:35] <cjwatson> OK, this is not going to be a productive conversation.
[12:35] <matthewcroughan> The wiki makes it seem very complex. But it is just one file. In which there's a function and some variables.
[12:36] <matthewcroughan> So what is it in this case? All I need to do is X. What is X?
[12:36] <matthewcroughan> I need to make a deb source file. Then use dput to give that to Launchpad. Is this correct?
[12:37] <matthewcroughan> That seems simple, but I can't figure out that first step.
[12:38] <matthewcroughan> But anyway, is it true that all I have to do is *SOMEHOW* get a deb source file out of my code. Then, upload that deb to launchpad with dput?
[12:38] <cjwatson> Yep
[12:39] <matthewcroughan> > You can learn how to create .deb packages for Ubuntu by following the Ubuntu packaging guide.
[12:40] <matthewcroughan> Again, I'm in this loop where I can't get to the stage of packaging the deb due to the docs being incorrect.
[12:40] <cjwatson> Probably easiest is if you ditch the old bzr stuff that the packaging guide talks about and just use "dh_make" to set up a skeleton.
[12:40] <matthewcroughan> The resources it links to are not Ubuntu. They're debian.
[12:40] <matthewcroughan> So as a result, launchpad is now incorrect. Since Launchpad keeps highlighting the significance of everything being done in accordance with Ubuntu's guidelines.
[12:40] <cjwatson> I agree that it is a problem that the Ubuntu packaging guide refers to obsolete stuff.  That's something the Ubuntu people need to fix
[12:40] <matthewcroughan> Yes, but pragmatically, how does this present a problem for me?
[12:41] <matthewcroughan> If I make a debian style deb source package (whatever that looks like) will it not be invalid?
[12:41] <cjwatson> No.
[12:41] <matthewcroughan> Can that file just be the binary file? How does launchpad know or care?
[12:41] <cjwatson> In general Debian and Ubuntu source packages are pretty similar in structure.
[12:41] <cjwatson> What do you mean by "binary file"?
[12:42] <matthewcroughan> I know that, but all the guides on the internet I've seen and failed to follow so far tell me that Ubuntu structures things differently, meaning making a ppa is non-standard.
[12:42] <matthewcroughan> cjwatson providing only the compiled code inside of the deb file
[12:42] <matthewcroughan> the resultant binary of my personal local output of `make`
[12:42] <cjwatson> .deb is the binary package file - Launchpad will not accept that.  Launchpad only accepts source package uploads
[12:42] <matthewcroughan> What is the extension for that?
[12:42] <cjwatson> .dsc
[12:42] <matthewcroughan> Ah brilliant
[12:43] <matthewcroughan> And what tools create dsc files?
[12:43] <matthewcroughan> This is hard to google for. I can't find anything for "debian source" "debian source package" as it just gets conflated with open source, source code, etc.
[12:44] <matthewcroughan> Found it. https://wiki.debian.org/Packaging/SourcePackage?action=show&redirect=SourcePackage#How_to_build_the_Debian_package
[12:44] <matthewcroughan> Yet I can only find docs on interfacing with them. Not creating a source package.
[12:45] <cjwatson> The normal way to build a source package is "debuild -S"
[12:45] <matthewcroughan> Mana from heaven.. You're saving me here
[12:45] <matthewcroughan> My sanity is being restored.
[12:45] <cjwatson> You run it in a source tree with a debian/ subdirectory - the various bits of packaging rules and metadata should all be in there
[12:45] <doko> maybe start reading at the table of contents? https://wiki.debian.org/Packaging
[12:46] <matthewcroughan> doko I found it https://wiki.debian.org/SimplePackagingTutorial
[12:46] <matthewcroughan> cjwatson So you think if I use debuild to make a source package, the resultant dsc will be compatible with Ubuntu *and* Debian via Launchpad?
[12:47] <cjwatson> There can often be quirks depending on the details of your project, but in principle yes.  I upload to both distributions all the time that way.
[12:48] <cjwatson> (I'll try to see if I can find somebody to revamp the Ubuntu packaging guide to be uh actually current.  No promises)
[12:51] <matthewcroughan> The project builds a static binary, it's golang.
[12:53] <matthewcroughan> https://blog.packagecloud.io/debian/debuild/packaging/2015/06/08/buildling-deb-packages-with-debuild/
[12:53] <matthewcroughan> Good guide here by the looks of things. I'm really happy you were able to get me to this conclusion.
[12:53] <matthewcroughan> Thanks
[12:56] <matthewcroughan> cjwatson The `debian/control` file is basically identical in function to what the PKGBUILD in the AUR is doing. Amazing.
[12:57] <matthewcroughan> I really wonder how people manage not to get stuck at this stage. I went directly to Launchpad and Ubuntu docs to learn about this, how are people otherwise getting around it? I only discovered this through chatting with you.
[12:57] <cjwatson> debian/control has declarative metadata like descriptions and build-dependencies; debian/rules has executable bits
[12:57] <cjwatson> (debian/rules can often just be a very minimal skeleton because debhelper is pretty smart these days, but sometimes you need to override it)
[12:58] <cjwatson> The absolute bare minimum is debian/{changelog,control,rules}
[12:58] <matthewcroughan> Alright, that's great. Will fit right into my CI system too
[12:59] <matthewcroughan> So is it common for projects that support debian to have a debian/ directory in their github sources?
[13:19] <cjwatson> Gently discouraged.  It's more usual to maintain the packaging as a branch
[14:07] <matthewcroughan> What about as a separate repo cjwatson ?
[14:07] <matthewcroughan> Also discouraged? Or is it common too?
[14:10] <cjwatson> Well, a branch in a separate repo is still a branch :)
[14:11] <cjwatson> It's common for the person doing the packaging not to be the same as the person doing upstream development, so packaging often ends up living in a separate repo
[14:12] <cjwatson> But if you don't want to bother with that then it technically works to keep them all together, and that may make sense if it's a small thing you don't expect anyone else to work on