When are you violating a license like the GPL? [duplicate]

Specifically in the following scenarios where you’re working on an open source library using an incompatible license like the MIT license.

  • You copy & paste a method from a GPL library – blatantly a violation assuming the GPL library created the method themselves.
  • You create a function with a similar purpose but you create it from scratch – presumably not a violation
  • You use the same code as a GPL library, but you improve on it (optimize performance for example) – is this a violation?
  • You use the same code as a GPL library, but you superficially refactor it (e.g. rename variables for clarity, add comments, but don’t really change the underlying logic) – is this a violation?
  • You translate code from a GPL library to another language but keep the logic exactly the same – presumably not a violation?

I know these are possibly questions for lawyers but I’m hoping to get a rough idea.

0

(…) using an incompatible license like the MIT license.

In general, I like to work with this baseline:

  • GPL + MIT => GPL
  • MIT + GPL => GPL
  • (anything else) + GPL => GPL
  • GPL + (anything else) => GPL

In other words, if you mix GPL with anything else, you get GPL’ed code. There are some exceptions, but not at the level of actually mixing code. Note that you can do as you please as long as you keep the code to yourself — only when you distribute your code you must adhere to the rules of the GPL.

You copy & paste a method from a GPL library – blatantly a violation assuming the GPL library created the method themselves.

Not a violation as long as you release your code under the GPL and quote the original author. This is called a derivative work (one that has all parts but one removed).

You create a function with a similar purpose but you create it from scratch –
presumably not a violation

If you see a GPLed program and think to yourself, “gee, that would be useful if it were not GPLed” and the go and write your own program without copying any code and other protected parts, probably not a direct violation. Very much depends on the jurisdiction.

You use the same code as a GPL library, but you improve on it (optimize performance for example) – is this a violation?

As long as you put your code under the GPL that’s one of the core ideas of GPL – allow you to improve on the previous work, freely, as you see fit. As long as you stick to the rules, of course.

You use the same code as a GPL library, but you superficially refactor it (e.g. rename variables for clarity, add comments, but don’t really change the underlying logic) – is this a violation?

Again, as long as you keep the result GPL’ed and quoting the original author, that’s probably fine.

You translate code from a GPL library to another language but keep the logic exactly the same – presumably not a violation?

It’s still copying, right? If your intention is to take a GPL’d program in language A and transform it to language B just to get rid of the GPL, think again. That is at least plagiarism, if not worse, in most jurisdictions.

Disclaimer: IANAL

6

You violate the GPL when you do two things.

  1. Create a “derivative work” from GPL’d code.
  2. Fail to follow the requirements of the GPL for creating such works.

You can in fact do ALL of what you noted, so long as you follow the GPL’s rules. That’s the point of copyleft. You can copy and paste all or part of a GPL’d program into your own, modify it to suit your purposes better, or completely re-write it, and so long as you do what the GPL requires you’re 100% in the clear.

If you don’t want to follow the GPL’s requirements, what you can do becomes far more restrictive. In fact, it becomes exactly as restrictive as what you could do if someone emailed you the source code to some closed-source program, like Microsoft Windows 10.

3

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật