this post was submitted on 18 May 2024
65 points (98.5% liked)

Open Source

31396 readers
127 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

Hey there.

Im working on a project for some software I want in the world. But I'm such a hobbyist that I've never thought of publishing any of my projects, but after doing so much work in it I kind of want other to have access to it after I feel its ready.

Whats the process of distribution? I guess I typically use github when interacting with FOSS community, but its still confusing for me to navigate as an end user sometimes, let alone being an uploader.

FWIW its simply a few python modules and other supporting txt and jsons. Targeting mostly Windows because that's what I use.

Thanks! (If this isn't the right place to ask please let me know!)

Edit: there are a bunch of great comments here! To clarify, I want to get it functional and somewhat bug free then fully upload everything so someone can see my idea and do it better. So I think I'm going to go with unlicense, because I don't really care about getting credit or getting contributions necessarily. Thanks all!

all 17 comments
sorted by: hot top controversial new old
[–] CosmicTurtle0@lemmy.dbzer0.com 62 points 6 months ago* (last edited 6 months ago) (3 children)

If you simply want to allow people to view your code, you can just upload it to GitHub or something similar.

By default, your work is copyright and you hold all rights, excluding those you give up to GitHub.

Open-Sourcing your project is all about choosing the license that you want your users to use.

Please, for the love of God, choose an existing license. Don't go out and try to make one yourself or mix and match. Not only do you open yourself up to liability but it just makes it harder for you to keep track of it.

Choosing a license is all about your personal preference and what your goals are. The two ends of the spectrum:

  • MIT License: do whatever you want, so long as you attribute me. Most libraries use this license.
  • GPL/AGPL: if you use my code, you must also release using GPL/AGPL or similarly appropriate license. Linux Kernel famously uses version 2. Linus Torvalds has issues with some of the terms in V3.

There is a lot of middle ground between these two philosophies. Most of the major licenses have seen some level of court cases. I personally use AGPL, which is often seen as one of the strongest, most restrictive, licenses.

I do not recommend releasing code to public domain. This often is a point of contention between OSS purists and OSS "spirit". I personally believe we're entering a new world of AI-driven content and I don't want more code feeding that beast.

The license is then copied and pasted to a LICENSE file at the root of your repo and, boom. You've open sourced your code.

Keep in mind: that commit (and all future commits) will be available under that license until your copyright expires, so long as that license exists in your repo. You cannot claw it back.

One word of advice: you aren't likely going to see a bunch of people downloading your stuff. So don't get your hopes up that you'll have people submitting bug reports or making PRs, etc. All of my projects are just for me to use with one or two people reviewing it for fun. All but one, anyway.

[–] scrubbles@poptalk.scrubbles.tech 13 points 6 months ago

Choose a license is great, they did an amazing job. I'm personally a fan of gpl. Sorry Amazon/Microsoft/corpo world. If you want to use my stuff great, but then you have to share your stuff too.

[–] 56_@lemmy.ml 12 points 6 months ago

and all future commits

Not entirely true. As long as you hold the copyright to all of the code (there are no contributions from other people), you can change the license however you like. The important thing is that this only affects commits after the licence is changed. All earlier versions are permanently available under the license they were released with.

[–] starman@programming.dev -1 points 6 months ago

I personally use AGPL, which is often seen as one of the strongest, most restrictive, licenses.

Good choice, I use it as well, but please keep in mind that AGPL is not restrictive

[–] sturlabragason@lemmy.world 25 points 6 months ago* (last edited 6 months ago)

https://opensource.guide/starting-a-project/

Maybe Codeberg or Gitlab would be better than Github.

[–] delirious_owl@discuss.online 24 points 6 months ago

Just slap a LICENSE file at the root of your repo with your license of choice. Boom, its open source.

[–] pelya@lemmy.world 19 points 6 months ago (1 children)

I advise booking a city square, loud music, background dancers, printed flyers with the URL of your Github repo, and a big countdown clock when you change repo visibility to public (Github has an option for that, but you need to click it yourself at the exact time, there no option to publish it on timer).

[–] billgamesh@lemmy.ml 15 points 6 months ago

A lot of people are recommending version control. While it's good practice, that isn't a requirement of sharing your code. If you want to make it really simple at first, add a License (as others have mentioned) and just post the code anywhere. Upload a tar archive to a website, use sourceforge or even lemmy.

Learning git would still be useful for you and potential contributors but it is not a requirement. Open source just means you share the source and explicitely provide a license for others to use and modify it

[–] ipacialsection@startrek.website 11 points 6 months ago
  1. Create a source control repository containing all your code, and publish it to an online code forge. GitHub's docs might help with this: https://docs.github.com/en/get-started/start-your-journey
  2. Choose an open-source license and add it to the repository as a LICENSE file. If you want to require any projects that build upon yours to be open-source too, the GNU GPL is a good choice. If you want to allow proprietary programs to include your library without releasing any source code other than that which is directly based on yours, the GNU LGPL is good for that. If you want to allow people to do whatever they want, even use all your code as the basis of a proprietary program without credit, the Unlicense is a good choice. There are a lot of licenses with different degrees of "copyleft" and attribution requirements in between. Technically publishing with a license file is all you need to do, but there are more things you should do.
  3. Create a README text file describing what your program does, and instructing users on how to compile and run it. Consider including more detailed documentation on how to use it, as well.
  4. Clean up your code and file layout so that it's as easy as is feasible for other programmers to understand.
  5. Promote your project to whoever you think might find it useful!
[–] ParadeDuGrotesque@lemmy.sdf.org 4 points 6 months ago

If it's several python modules, then yes, choose a license and then contact pypi and see if you can distribute your modules through them.

One very important thing is that you have to make sure everything is ready for distribution: check your project will work (possibly starting with a blank VM), what its dependencies are, that the requirements.txt file is good and operational, that automated tests are available for people to run after installing, etc.

In other words, the ideal project is not just a question of license but also all the scaffoldings you supply with it.

Thanks for opening your code!

[–] moritz@l.deltaa.xyz -2 points 6 months ago

Adding to what other people said, I want to suggest using the Blue Oak Model License. It is comparable to the MIT license (so no copyleft) but much more readable and easier to understand.

[–] Lodra@programming.dev -4 points 6 months ago (4 children)

Open source software literally means that the source code is available to anyone. In GitHub, that just means that your repo is public rather than private. But your method technically doesn’t matter. You could publish to a forum if you wish. That’s still open source!

Free OSS just means that anyone is free to use and modify the source code for any purpose. The details are usually defined in a LICENSE file.

I feel like you’re really asking about the common practices and methods used in FOSS. Right? If so, that’s entirely up to you as the maintainer. As the project matures, you may attract other contributors which will in turn will motivate change to your tools and methods.

Start with what works for you. Model after similar projects if you wish. Adjust as change is needed.

[–] CosmicTurtle0@lemmy.dbzer0.com 14 points 6 months ago* (last edited 6 months ago)

Open source software literally means that the source code is available to anyone. In GitHub, that just means that your repo is public rather than private.

You can make publicly available any code that is fully under copyright. The reader cannot compile, modify, or redistribute it. It's called "source available".

Open Source has a specific definition that has been tested in court, which means that you are able to make modifications, transform, etc. within the confines of the license that is provided with the code.

There are two types of "free": free as in gratis (free beer) vs free as in libre (free speech). The OSS licenses very clearly dictate by which means that you are free.

Edit: added a source

[–] brisk@aussie.zone 8 points 6 months ago

While that is a definition that's used by some, I would argue The OSI's Open Source Definition is more widely used within the field

[–] chebra@mstdn.io 1 points 6 months ago

If you find a piece of code in a forum without any license text, and you use it in your software, you could be in a lot of trouble, and not just because the code might be bad. Code without a license is NOT open source, nor public domain, nor free to use, https://opensource.stackexchange.com/a/1721. It needs to have a license that explicitly allows use, modification, redistribution, only then it is open source. You may have seen some "openwashing", someone trying to redefine the term to make them look good