📦 Alin Li · avatud lähtekoodi artefaktid

Every Type of Avatud lähtekoodiga artefakt

Teek, raamistik, pakett, binaarfail, konteineritõmmis, lähtekood, püsivara — avatud lähtekood esineb mitmel kujul. Iga liik on erinev ning seda kasutatakse ja kontrollitakse erinevalt. See juhend selgitab neid KÕIKI, sealhulgas seda, kuidas SHA kontrollsummad kaitsevad muudetud failide eest.

Kõik tüübid 📦What is SHA? 🔐
🧠 ÜLDPILT

Mis on avatud lähtekoodi artefakt?

📦 Artefakt = kõik, mida tarkvaraprojekt toodab

In software, an „tarkvaraartefakt“ is any file or package that a project creates and distributes. When a developer writes code and shares it, the things they publish — the compiled program, the library file, the Docker image, the source code archive — are all artifacts.

Different artifacts serve different purposes, are installed differently, and need to be verified differently. Understanding the types is essential because: you wouldn't install a library the same way you install an operating system, and you wouldn't verify a container image the same way you verify source code.

🍳

Kitchen Analogy: Think of a restaurant kitchen. The recipe (lähtekood) ütleb, KUIDAS süüa teha. Aga ingredients (teegid/sõltuvused) on toorained. See prepared meal (binaarfail/pakett) on valmis söömiseks. See meal kit (konteineritõmmis) sisaldab kõike eelnevalt mõõdetult ühes karbis — lihtsalt soojenda ja serveeri. See cookbook (dokumentatsioon) selgitab kõiki retsepte. Erinevad artefaktid, erinevad kasutused.

📦 KÕIK TÜÜBID

Kõik avatud lähtekoodi artefaktide liigid

📜

Source Code Foundation of Everything

The raw human-readable instructions — the recipe itself

Source code is the original text written by developers in a programming language (Python, C, Java, JavaScript, etc.). It's what you see on GitHub. It's human-readable — you can open it in a text editor and understand what it does. ALL other artifacts are created FROM source code.

How you get it: Clone a Git repository, download a .tar.gz or .zip archive from GitHub/GitLab, or extract it from a source package.

🍳

Võrdlus: The recipe written on paper. You can read it, modify it, and cook from it — but you need a kitchen (compiler/interpreter) to turn it into a meal.

Getting source code
# Klooni Gitist (kõige levinum) $ git clone https://github.com/nextcloud/server.git # Laadi alla arhiivina $ wget https://github.com/project/repo/archive/v2.0.tar.gz $ tar -xzf v2.0.tar.gz # Lähtekood tuleb käivitamiseks KOMPILEERIDA või INTERPRETEERIDA # C/C++/Rust → esmalt kompileeri → seejärel käivita binaarfail # Python/JS/PHP → käivita otse (interpreteeritav)
Linuxi tuuma lähtekoodPython scriptsAny GitHub repo.tar.gz / .zip arhiivid
🔐 Turvalisus

Source code is the MOST transparent artifact — you can read every line and verify there's nothing malicious. This is why open source is more trustworthy: anyone can audit the source code. Always prefer reviewing source when security is critical.

📚

Teek (lib) Reusable Building Block

Pre-written code that YOUR program calls — you don't run it alone

Teek on kogum pre-written functions that developers use inside their own programs. You don't run a library directly — you import it into your code and call its functions. Libraries save developers from reinventing the wheel.

For example, instead of writing your own code to parse JSON, you use a JSON library. Instead of writing your own encryption, you use OpenSSL (a library). Libraries are the LEGO bricks of software.

🧱

Võrdlus: LEGO bricks. You don't play with a single brick — you combine many bricks to build something. Each library is a specialized brick (one for colors, one for shapes, one for sounds).

Using libraries
# Python: impordi teek import requests # HTTP-teek import numpy as np # Matemaatikateek import pandas as pd # Andmeanalüüsi teek # JavaScript: impordi teek import React from 'react'; # Kasutajaliidese teek import axios from 'axios'; # HTTP-teek # C: lingi teek kompileerimisel $ gcc myprogram.c -lssl -lcrypto # Lingi OpenSSL-i teek
OpenSSL (krüptimine)React (UI)NumPy (matemaatika)FFmpeg (video)SQLite (database)zlib (compression)
📁 Failitüübid

Linux: .so (jagatav objekt), .a (staatiline arhiiv) — nt libssl.so
Windows: .dll (dünaamiliselt lingitav teek) — nt openssl.dll
macOS: .dylib (dünaamiline teek)
Python: .py-failid või kompileeritud .whl (wheel)
Java: .jar (Java arhiiv)

🏗️

Framework Skeleton + Rules

Teek, mis juhib programmi käiku — sina täidad lüngad

Raamistik sarnaneb teegiga, kuid ühe olulise erinevusega: a library is called BY your code; a framework CALLS your code. Raamistik annab struktuuri (marsruutimine, andmebaas, autentimine) ja sina täidad konkreetsed osad (äriloogika, lehed, andmed).

🏠

Võrdlus: A house frame (seinad, katus ja torustik on juba valmis). Sa ei ehita vundamenti — lisad mööbli, värvi ja kaunistused. Raamistik määrab, KUHU uksed tulevad; sina otsustad nende värvi.

Django (Python web)React (UI)Spring (Java)Laravel (PHP)Express.js (Node)Flutter (mobile)Next.js (React)
🤔 Teek või raamistik — Hollywoodi põhimõte

Teek: „Sina helistad meile.“ Sinu kood otsustab, millal teeki kasutada. Framework: „Ära helista meile, meie helistame sulle.“ Raamistik juhib toimuvat ja kutsub SINU koodi õigel hetkel välja. Seda nimetatakse „Juhtimise ümberpööramine“ — the framework is in charge, not you.

📦

Pakett Ready to Install

Source code + metadata + dependencies bundled for easy installation

Pakett on bundled, installable unit — it contains the code (source or compiled), metadata (name, version, author, license), and a list of dependencies (other packages it needs). Package managers install, update, and remove packages automatically.

📬

Võrdlus: A mail-order package — labeled with sender, contents list, and delivery instructions. The package manager is the postal service that delivers and installs it for you.

Installing packages with different managers
# Linuxi süsteemipaketid (.deb / .rpm) $ sudo apt install nginx # Debian/Ubuntu (.deb) $ sudo dnf install nginx # Fedora/RHEL (.rpm) # Pythoni paketid (.whl PyPI-st) $ pip install flask # Allikas: pypi.org # JavaScripti paketid (npm-ist) $ npm install express # Allikas: npmjs.com # Rusti paketid (crates) $ cargo install ripgrep # Allikas: crates.io # Universaalsed Linuxi paketid $ snap install nextcloud # Snapi pakett $ flatpak install org.gimp.GIMP # Flatpaki pakett
📁 Paketivormingud

.deb — Debian/Ubuntu/Mint (installed by apt/dpkg)
.rpm — Fedora/RHEL/SUSE (installed by dnf/yum/zypper)
.whl — Python wheel (installed by pip)
.gem — Ruby (installed by gem)
.jar / .war — Java (installed by Maven/Gradle)
.snap — Universal Linux (installed by snap)
.flatpak — Universal Linux (installed by flatpak)
.AppImage — Portable Linux app (just download and run!)

⚠️ Package Registries — Where They Live

PyPI (pypi.org) — Python · npm (npmjs.com) — JavaScript · crates.io — Rust · Maven Central — Java · RubyGems — Ruby · NuGet — .NET · APT hoidlad — Debian/Ubuntu · Flathub — Flatpak · Snap Store — Snap. Each language has its own registry.

⚡

Binary / Executable Compiled & Ready to Run

Masinkood — arvuti käivitab seda otse, kompileerimist pole vaja

Binaarfail on compiled machine code — the CPU runs it directly. When source code (C, C++, Rust, Go) is compiled, the result is a binary. You can't read it (it's 1s and 0s) — but it's FAST because the CPU doesn't need to translate anything.

Important distinction: Binaries are platform-specific! A Linux binary won't run on Windows, and an ARM binary won't run on x86. That's why projects publish binaries for EACH platform: linux-amd64, linux-arm64, windows-x64, macos-arm64, etc.

🍽️

Võrdlus: The cooked meal — ready to eat immediately. You can't see the recipe by looking at it (decompilation is hard and imperfect), and it only fits certain plates (platforms).

Working with binaries
# Kompileeri lähtekood → binaarfail $ gcc -o myprogram myprogram.c # C → binaarfail $ go build -o myapp main.go # Go → binaarfail $ cargo build --release # Rust → binaarfail # Laadi alla eelkompileeritud binaarfail $ wget https://example.com/tool-linux-amd64 $ chmod +x tool-linux-amd64 $ ./tool-linux-amd64 # Käivita see! # Kontrolli binaarfaili tüüpi $ file tool-linux-amd64 tool-linux-amd64: ELF 64-bit LSB executable, x86-64
.exe (Windows)ELF (Linux)Mach-O (macOS).apk (Android).AppImage (kaasaskantav Linuxi rakendus)
🚨 Turvahoiatus

Binaries are OPAQUE — you can't easily verify what's inside. A binary COULD contain malware you can't see. This is why SHA checksums and GPG signatures are critical for binaries. ALWAYS verify the hash of downloaded binaries before running them. More on this below.

🐳

Container Image (Docker) Complete Environment

The application + ALL its dependencies + OS layer in one portable file

Konteineripilt on complete, self-contained package that includes: the application binary, all its libraries, configuration files, and even a minimal OS layer. It runs identically on ANY machine with Docker/Podman installed — no "works on my machine" problem.

📦

Võrdlus: A meal kit box — contains the meal, plates, utensils, and even a mini-oven. You don't need anything except a table (Docker engine). Everything is pre-packaged to work perfectly together.

Working with container images
# Tõmba tõmmis Docker Hubist $ docker pull nginx:latest $ docker pull nextcloud:28 $ docker pull postgres:16 # Käivita see $ docker run -d -p 8080:80 nginx # Ehita Dockerfile'i põhjal oma tõmmis $ docker build -t myapp:1.0 . # Tõmmiseid hoitakse registrites: # Docker Hub (hub.docker.com) # GitHub Container Registry (ghcr.io) # Quay.io (Red Hat)
Docker Hub imagesOCI tõmmisedPodmanghcr.ioquay.io
🔐 Tõmmise kontrollimine

Container images have digests (iga kihi SHA256-räsid). Kasuta docker pull nginx@sha256:abc123... to pull by exact digest — guaranteeing you get the EXACT image, not a tampered version. Also check for Cosign signatures (nüüdisaegne tõmmiste allkirjastamine).

🔧

Firmware / ROM Embedded Software

Software burned into hardware — routers, Arduino, IoT devices, BIOS

Firmware is software that lives inside hardware devices — your router, your Arduino, your printer, your TV, your car's computer, your BIOS/UEFI. It's usually a binary image that gets "flashed" (written) to the device's memory chip. Open-source firmware gives you control over your hardware.

OpenWrt (ruuterid)Coreboot (BIOS)Arduino sketchesTasmota (smart plugs)LineageOS (phones)ESPHome (IoT)
🚨 Kirjuta püsivara ettevaatlikult!

Flashing wrong firmware can „ehitusplokk“ your device (make it completely non-functional). ALWAYS verify the SHA checksum of firmware files before flashing. ALWAYS follow the exact instructions for your specific hardware model.

💿

ISO Image / Disk Image Bootable System

Complete operating system or installation media in one file

ISO-tõmmis on complete disk image — usually a full operating system installer. You download it, write it to a USB drive (using Etcher), and boot from it to install an OS. Named after the ISO 9660 file system standard for CD-ROMs.

Linux Mint .isoZorin OS .isoUbuntu .isoProxmox .isoTails .iso (privacy OS)
🔐 Kontrolli ISO-faile ALATI!

Operatsioonisüsteemide ISO-d on tarneahelarünnete #1 sihtmärk — ISO muutmisel saab ründaja lisada tagaukse kogu operatsioonisüsteemi. IGA Linuxi distributsioon avaldab ISO kõrval SHA256 kontrollsummad. Kontrolli ALATI enne paigaldamist.

📖

Documentation & Assets Knowledge

Käsiraamatud, juhendid, API dokumentatsioon, tõlked, kujundusmaterjalid

Documentation is often overlooked but is a crucial artifact: READMEs, API references, tutorials, man pages, translation files, design files (icons, logos), and configuration examples. Good documentation is what separates usable software from abandoned experiments.

README.mdman pagesAPI dokumentatsioon (Swagger/OpenAPI)Wiki pagesTranslation .po filesLitsentsifailid
🧠

Tehisintellektimudelid ja andmestikud The Newest Type

Trained neural networks and training data — the AI age's artifacts

Uus tarkvaraartefakti kategooria: Tehisintellektimudelite kaalud (närvivõrgu treenitud parameetrid, mille maht on sageli GB–TB) ning datasets (andmed, mida kasutati nende treenimiseks). Neid jagatakse Hugging Face’i, Ollama ja mudeliregistrite kaudu.

Getting AI model artifacts
# Laadi mudel alla Ollama kaudu $ ollama pull llama3.2:8b # Mudeli kaalud mahuga 4.7 GB # Laadi alla Hugging Face'ist $ pip install huggingface_hub $ huggingface-cli download meta-llama/Llama-3.2-8B # Mudelid on failidena: .gguf, .safetensors, .bin, .pt
Llama 3 (.gguf)Stable Diffusion (.safetensors)Whisper (.pt)Common Crawl (dataset)ImageNet (dataset)
🔐 SHA JA KONTROLLIMINE

Mis on SHA? Kuidas allalaadimisi kontrollida

The most important security skill you'll learn today.

🔐 SHA = turvaline räsialgoritm — sinu digisõrmejälgede masin

SHA is a mathematical function that takes ANY file — no matter how big — and produces a fixed-length "fingerprint" (nimega hash või checksum). Sellel sõrmejäljel on hämmastavad omadused:

• Unique: Even changing ONE bit in the file produces a COMPLETELY different hash
• Fixed size: Whether the file is 1 KB or 100 GB, the hash is always the same length
• Ühesuunaline: You can't reverse-engineer the file from the hash
• Deterministic: The same file ALWAYS produces the same hash

👁️ See It in Action — How One Character Changes Everything

Input: "Hello"

SHA256:

185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969

Input: "hello" (lowercase!)

SHA256:

2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Input: "Hello!" (add !)

SHA256:

334d016f755cd6dc58c53a86e183882f8ec14f52fb05345887c8a5edd42c87b7

See? Changing ONE character produces a completely different hash. If someone modifies a single byte in a 4 GB ISO file, the entire SHA256 hash changes. This is how you detect tampering.

📊 SHA variandid — millist kasutada?

AlgoritmHash LengthTurvalisusUse Today?
MD5128 bitti (32 kuueteistkümnendmärki)❌ BROKENEI — kokkupõrked leiti 2004. aastal. Ründajad saavad luua kaks erinevat sama MD5-ga faili.
SHA-1160 bitti (40 kuueteistkümnendmärki)⚠️ WEAKAvoid — Google proved a collision attack (SHAttered) in 2017. Still used by some old systems.
SHA-256256 bitti (64 kuueteistkümnendmärki)✅ STRONG⭐ YES — the standard. Used by Bitcoin, TLS, most Linux distros, Docker.
SHA-512512 bits (128 hex chars)✅ VERY STRONGYes — slightly stronger, used for passwords and high-security contexts.
SHA-3 (Keccak)Variable✅ STRONGESTYes — newest standard (2015), completely different algorithm from SHA-2. Used where future-proofing matters.
🔑 Rusikareegel

Use SHA-256 for everything. It's the industry standard, supported everywhere, and has no known weaknesses. Only use SHA-512 or SHA-3 if you have specific high-security requirements. Ära kasuta KUNAGI MD5 ega SHA-1 for security purposes.

🛡️ Samm-sammult: allalaaditud faili kontrollimine

When you download a Linux ISO, firmware, or any important file — here's how to verify it hasn't been tampered with:

Verify a download using SHA256
# Samm 1: laadi alla fail JA selle kontrollsumma $ wget https://linuxmint.com/linuxmint-22-cinnamon-64bit.iso $ wget https://linuxmint.com/sha256sum.txt # Samm 2: arvuta OMA allalaaditud faili SHA256 $ sha256sum linuxmint-22-cinnamon-64bit.iso a1b2c3d4e5f6... linuxmint-22-cinnamon-64bit.iso # Samm 3: võrdle ametliku kontrollsummaga $ cat sha256sum.txt a1b2c3d4e5f6... linuxmint-22-cinnamon-64bit.iso # Kui need ÜHTIVAD → on fail ehtne! ✅ # Kui need EI ühti → on fail RIKUTUD või MUUDETUD! ❌ # Kiire üherealine käsk automaatseks kontrolliks: $ sha256sum -c sha256sum.txt linuxmint-22-cinnamon-64bit.iso: OK

🔏 GPG allkirjad — rohkem kui SHA (usaldusahel)

SHA tells you the file hasn't changed. But what if an attacker hacked the website and replaced BOTH the file AND the checksum? Then the SHA would match a tampered file!

GPG signatures solve this: the developer digitally signs the checksum file with their private key. You verify the signature with their public key. Even if the website is hacked, the attacker can't forge the developer's signature without their private key.

Verify GPG signature
# Impordi projekti GPG-võti $ gpg --keyserver keyserver.ubuntu.com --recv-keys ABCD1234 # Kontrolli kontrollsummade faili allkirja $ gpg --verify sha256sum.txt.gpg sha256sum.txt gpg: Good signature from "Linux Mint ISO Signing Key" # Kui kuvatakse „Good signature“ → on kontrollsumma autentne # Seejärel kontrolli ISO-t kontrollsumma abil (nagu eespool) # Need on KAKS kontrollikihti: allkiri + räsi
🔐 Täielik usaldusahel

Developer writes code → compiles binary → calculates SHA256 hash → signs the hash with GPG key → publishes file + hash + signature. You download all three → verify GPG signature (proves authenticity) → verify SHA256 (proves integrity). If both pass, you can trust the file.

📋 Kontrollimeetodid artefakti tüübi järgi

📜 Lähtekood

Git commit hashes (SHA-1 → moving to SHA-256), signed tags (git tag -v), GitHubi kinnitatud märgised

📦 Paketid (.deb/.rpm)

Repos are GPG-signed. apt/dnf verify signatures automatically. apt-key manages trusted keys

📦 pip/npm paketid

PyPI has hash pinning (pip install pkg==1.0 --hash sha256:abc...). npm kasutab lukustusfailides SHA-512

⚡ Binaries

SHA256 checksum files + GPG signatures. Always verify BOTH before running

🐳 Container Images

Image digests (sha256:abc...), Cosigni allkirjad, Docker Content Trust (Notary)

💿 ISO-tõmmised

SHA256 checksum files + GPG signatures. CRITICAL to verify — the #1 supply chain target

🔧 Püsivara

SHA256 checksums from manufacturer. Some use Secure Boot (signed firmware only)

🧠 Tehisintellektimudelid

SHA256 on Hugging Face model cards. GGUF files have embedded checksums. Ollama verifies automatically

«يَا أَيُّهَا الَّذِينَ آمَنُوا إِن جَاءَكُمْ فَاسِقٌ بِنَبَإٍ فَتَبَيَّنُوا»
„Teie, kes usute, kui üleastuja toob teile teate, siis kontrollige seda.“ — Koraan 49:6

Tabayyanoo — Verify! The Quran commands us to verify information before acting on it. SHA checksums are the digital form of this command. When you download a file from the internet, you don't blindly trust it — you VERIFY its integrity. This is Tabayyanoo in the digital age.

📋 KIIRJUHEND

Tarkvaraartefaktide spikker

TypeWhat It IsFile TypesHow to GetVerify With
📜 LähtekoodHuman-readable instructions.py .js .c .rs .go .javagit clone, .tar.gzGit commit hash, signed tags
📚 TeekReusable code you import.so .dll .dylib .jar .whlpip, npm, aptPaketihalduri allkirjad
🏗️ FrameworkSkeleton that calls YOUR codeSource + templatespip, npm, cargoPaketihaldur ja lukufaili räsid
📦 PakettBundled installable unit.deb .rpm .whl .gem .snapapt, dnf, pip, npmGPG repo signatures
⚡ BinaryCompiled machine codeELF, .exe, Mach-ODirect downloadSHA256 + GPG signature
🐳 Container ImageApp + dependencies + OSOCI tõmmiste kihiddocker pullImage digest, Cosign
🔧 PüsivaraSoftware for hardware.bin .hex .imgTootja veebilehtSHA256 from official source
💿 ISO-tõmmisBootable OS installer.isoDistro websiteSHA256 + GPG (CRITICAL!)
📖 DokumentatsioonGuides, API docs, translations.md .html .po .rstIn the repoGit commit history
🧠 TehisintellektimudelTrained neural network.gguf .safetensors .pt .binOllama, Hugging FaceSHA256 on model card
📦🔐✨

Know Your Artifacts. Verify Everything.

Nüüd mõistad kõiki avatud lähtekoodi artefakte — toorest lähtekoodist kompileeritud binaarfailideni, Dockeri tõmmistest tehisarumudeliteni. Oskad neid KONTROLLIDA SHA kontrollsummade ja GPG allkirjadega. Ära usalda enam allalaaditud faili pimesi. Tabayyanoo — kontrolli!

📜
Read source
🔐
Verify SHA
🔏
Check GPG
✅
Trust, then run

«وَأَلَنَّا لَهُ الْحَدِيدَ»

Every artifact is a piece of softened iron — powerful and useful. But just as a blacksmith tests the quality of iron before forging, you must verify every artifact before trusting it. ✨