MODULE 4 open source-1
MODULE 4 open source-1
LICENSING
What is a License :
Open source software has a license that defines how the software can be used,
modified, and redistributed.
The license determines the terms under which the code can be shared and the
obligations of the users.
Open-source licenses are legal agreements that define the rights and responsibilities of
users and developers.
Common Open Source Licenses are MIT License, GNU General Public License
(GPL), Apache License 2.0, BSD License etc.
Core Principles of open source software license - Freedom to Use, Freedom to Study,
Freedom to Modify , Freedom to Distribute etc.
License Categories - Permissive Licenses , Copyleft Licenses etc.
Key Considerations When Choosing a License:
Disadvantages :
BSD
BSD is the Berkeley Software Distribution License.
The BSD License is one of the oldest and most permissive open-source
licenses.
It originated from the Berkeley Software Distribution (BSD), which was a
version of the Unix operating system.
The BSD license comes in two primary versions:
This is the most minimal form of the BSD License. It includes two main
clauses:
Copyright Notice and License: You must include the copyright notice,
license, and disclaimer of liability in any redistribution.
No Endorsement: You cannot use the name of the project or the names of the
contributors to promote derived works, unless given explicit permission.
This version of the BSD License is more detailed than the 2-Clause version
and includes an additional clause that restricts the use of the project’s name for
promotional purposes.
1. Copyright Notice and License
2. No Endorsement
3. Additional Clause : This version is sometimes called the New BSD
License or the Modified BSD License due to this added clause that clarifies
branding and endorsement restrictions.
The BSD License allows users to freely use, modify, and distribute the
software.
The BSD License allows redistribution of both the original and modified
versions of the software.
No Warranty
The BSD License allows the software to be used in both open-source and
proprietary software.
PL
PL is the PostgreSQL License.
This is an open-source software license that is very permissive and similar to
the MIT License.
It was created for the PostgreSQL relational database management system
(RDBMS), but it can be used by other projects as well.
It is allowed to use PostgreSQL or any software licensed under the
PostgreSQL License for commercial purposes.
Permissive License , meaning is it allowed to use, modify, and distribute the
software with minimal restrictions.
No Copyleft
No Warranty
Advantages - Simple and Clear , Highly Permissive , Flexible for Commercial
Use, No Copyleft.
LGPL
LGPL is the the GNU Lesser General Public License.
This is a free software license published by the Free Software Foundation (FSF).
This license mainly applies to the libraries.
Modifications Must Be Open – If we modify the LGPL-covered library,it must share
those modifications under LGPL.
LGPL is a proprietary software.
This is a free and open source software.
This is Less strict than the GPL (General Public License).
This can also used for the commercial projects.
We can relicense an LGPL library as GPL.
COPYRIGHTS AND COPY LEFTS
Copyrights –
Copyright helps creators protect their work and control how others use it.
It gives them the power to say who can copy, share, change, perform, or display their
creations.
This is the Legal right for the creators of the original works.
Protecting Creators' Economic Interests: Copyright allows creators to benefit
financially from their work through sales, licensing, and other forms.
Duration of Copyright- The duration of copyright protection varies depending on the
country and the type of work.
Copyright Infringement – This means the using of copyrighted material without
permission. This may lead to the lawsuits, fines, or content removal.
Copylefts-
Copyleft is a special kind of copyright license that allows others to freely
use, modify, and share a work — but under one condition: Any
modified versions must also be free and open under the same license.
Common Copyleft Licenses:
- GNU GPL (General Public License) – Most popular copyleft license.
- GNU AGPL – Stronger; also applies to network/server use.
- GNU LGPL – Weaker copyleft, allows linking with proprietary
software.
Purpose of Copyleft:
- Encourage collaboration
- Prevent the work from being turned into proprietary software
- Ensure freedom for all users and developers.
Difference between copyright and copyleft :
Feature Copyright Copyleft
To protect the
To preserve freedom to use,
Main Purpose creator’s work and
modify, and share the work
control its use
Can It Be Made Yes, owner can sell No, any version must stay
Proprietary? or license it privately open
Traditional
copyright, Creative GNU GPL, AGPL, LGPL
Examples
Commons (some licenses
types)
Patent
A software patent is a legal protection granted to an inventor.
This right allows the inventor to exclude others from making,
using, or selling their invention.
This is for a limited period of time.
Limitations
Patents are granted for a limited period, after which the invention
enters the public domain.
Patent rights are territorial, meaning they only apply within the
country or region that granted the patent.
Advantages:
Exclusive rights – No one else can copy or sell your invention.
Higher market value – Patents can be licensed or sold for profit.
Encourages innovation – Inventors can safely invest in research.
Disadvantages:
Expensive & time-consuming – Takes years and can cost thousands of
dollars.
Public disclosure – Others can see your idea and try to design around it.
Limited protection – After 20 years, anyone can use the invention.
------------------------------------------------------------------------------------------------
BASIC LINUX AND OPEN SOURCE APPLICATIONS
GNU/LINUX
GNU/Linux is a free and open-source operating system that's built by combining:
GNU: A collection of free software tools created by the GNU Project.
Linux: The kernel — the core part of the operating system that interacts with
hardware.
Together, GNU software + the Linux kernel = GNU/Linux operating system.
Licensed -Released under licenses like MIT, Apache 2.0, GPL, etc.
MOZILLA (FIREFOX)
Mozilla Firefox, often simply referred to as Firefox.
This is a free and open-source web browser.
Firefox is a software application.
This allows the users to access, view, and interact with websites on the internet.
This interprets the code (like HTML, CSS, and JavaScript) that makes up web pages
and displays them in a user-friendly format.
Open source (anyone can view or modify its code).
This is developed by Mozilla Foundation and Mozilla Corporation.
The Mozilla Foundation’s mission is to promote an open and accessible internet for
everyone.
It focuses on privacy, security, transparency, and user rights.
Firefox was launched in 2004 as an alternative to Internet Explorer.
Key Features of Mozilla firefox
Customization: Firefox is highly customizable through themes.
Password Management: Firefox can securely remember and suggest passwords for
websites.
Fast Performance: The Gecko engine is designed for speed and efficiency in loading
web pages.
Tabbed Browsing: Allows users to open multiple websites in separate tabs within a
single browser window for easy multitasking.
Focused on user privacy (blocking trackers, cookies, etc.)
WIKIPEDIA
Wikipedia is a free, online encyclopedia.
This is built and maintained by a community of volunteer editors, known as
Wikipedians.
This operates on a "wiki" system, which means, most of its articles can be edited by
anyone with internet access.
The core principle of Wikipedia is open editing. Millions of volunteers from around
the world contribute by creating, editing, and updating articles.
Wikipedia runs on a special software called MediaWiki, which allows for easy
content creation, editing, and tracking of changes.
Wikipedia's fundamental principles are summarized in its "five pillars".
- Wikipedia is an encyclopedia.
- Wikipedia is written from a neutral point of view.[Articles should
present information fairly, without bias]
- Wikipedia is free content that anyone can use, edit, and distribute.
- Wikipedia's editors should treat each other with respect.
- Wikipedia has no firm rules. [Policies and guidelines should be
interpreted in the spirit of improving the encyclopedia].
Wikipedia is hosted and supported by the Wikimedia Foundation.
DRUPAL
Drupal is a free and open-source content management system (CMS).
It is written in PHP.
It's a powerful and flexible platform, used by millions of websites and applications
worldwide, ranging from personal blogs to large enterprise and government sites.
This is best suited for complex websites and applications that require a high degree of
customization, scalability, and security.
Drupal has strong built-in support for creating multilingual websites.
This has Built-in Multilingual Support: Excellent for creating websites in multiple
languages.
WORDPRESS
WordPress is a free and open-source content management system (CMS).
It is written in PHP.
This uses MySQL or MariaDB database.
This is a powerful tool that allows to create and manage your own website without
needing to write any code.
WordPress is a powerful, flexible, and widely used CMS.
Ease of Use: Beginner-friendly interface for content creation and website
management.
Cost-Effective: The core software is free, and many free themes and plugins are
available.
Highly Customizable – can be created with the customer needs.
Versatile: Can be used for various types of websites.
There are two main types of WordPress - WordPress.org, WordPress.com.
Used for personal blogs , business websites , news and magazine sites.
GCC
GCC is the (GNU Compiler Collection).
This is a prominent example of open source.
This is one of the most fundamental and widely used open-source development tools.
GCC is distributed under the GNU General Public License.
This grants users the freedom to: Run the software for any purpose., Redistribute
copies, Distribute copies of your modified versions to others.
This supports various programming languages including c, c++ etc.
Commonly used for education and research , building open source software etc.
Cross-platform: Works on many operating systems including Linux, Windows and
macOS.
GDB
GDB stands for GNU Debugger.
It is a powerful, command-line debugging tool.
This allows you to see what is going on inside a running program, or what a program
was doing at the moment it crashed.
It's a crucial tool for software developers to identify and fix bugs in their code.
GDB supports debugging programs written in various programming languages,
including C, C++.
GDB is a free and open-source project, part of the GNU Project. This means it's freely
available to use, distribute, and modify.
Portability: GDB is a portable debugger that runs on many Unix-like systems and
also on Windows.
Remote debugging: GDB can be used to debug programs running on a different
machine or an embedded system.
GITHUB
GitHub is a web-based platform built around Git, a distributed version control system.
GitHub is like a special online shared folder for your project,
This can Revert to previous versions: If something goes wrong, you can easily roll
back to a stable state.
It keeps track of every changes made.
GitHub is a website where people who write code can store their projects, keep track
of changes, and work together easily.
It's like a central hub for collaboration on software projects.
Issues: GitHub's "Issues" tracker is a powerful system for managing tasks, bug
reports, feature requests, and general discussions related to the project.
Remote Repository Hosting: GitHub provides a central, online location to store
your Git-managed projects. This makes it easy to share your code with others and
collaborate remotely.
LIBRE OFFICE
LibreOffice is a free and open-source office productivity suite.
It allows you to create various types of documents, work with spreadsheets, design
presentations, manage databases, create drawings, and write mathematical formulas.
Free: You can download, use, and even share LibreOffice without paying any
licensing fees.
Open-source: The software's code is publicly available, allowing anyone to examine,
modify, and distribute it. This fosters community development and transparency.
Cross-Platform: LibreOffice works on various operating systems, including
Windows, macOS, and Linux.
Customizable: The user interface can be customized to suit customer preferences.
LibreOffice is actively developed, with new versions released regularly that include
new features, improvements, and bug fixes.
It's designed to be compatible with Microsoft Office file formats.
BASIC LINUX COMMANDS
Refer Lab Record book.
SAMPLE SHELL SCRIPTING PROGRAMS
Shell scripting is a series of commands written in a file. These commands are read
and execute by the bash program.
Bourne Again Shell (Bash) is a command line interface shell program used in Linux.
Bash is the default shell for linux.
To write code in a Bash script, follow these steps:
#!/bin/bash
echo “ Hello data science students”
Note –save the code.
- ./filename.sh is used to run the file.
#!/bin/bash
echo “ Hello data science students”
sleep 2
echo “ Welcome to linux”
sleep 3
echo “learn linux”
- Output –
Hello data science students
Welcome to linux
learn linux
#!/bin/bash
name=”Mubarak”
echo $name
execute - ./filename.sh
output – Mubarak
#!/bin/bash
name=”Aneesha”
# Aneesha is stored in the user defined variable name.
age=20
# age is stored in the user defined variable age.
echo “My name is $name, I am $age years old”
# echo is used to print the content.
Note -
To execute - ./filename.sh
output – My name is Aneesha, I am 20 years old.
#!/bin/bash
# Arithmetic operaions
num1=20
num2=10
result=$((num1+num2))
echo $result
execute - ./filename.sh
output – 30
6. To substract 2 numbers.
result=$((num1-num2))
output – 10
7. To multiply 2 numbers.
result=$((num1*num2))
output – 200
8. To divide 2 numbers.
result=$((num1/num2))
output – 2
#!/bin/bash
output
Enter your name
Salmon
Your name is salmon
sum=$((number_1+number_2))
echo “sum is $sum”
Output :
Enter number 1:
20
Enter number 2:
30
Sum is 50