Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Package ManagementTim Liou (@lyt)
5/075/03 (Thu) 11:00 ~ 12:00 @ 2175/10 (Thu) 11:00 ~ 12:00 @ 217
Overview● Motivation● Package manager● Quick overview of Arch Build System (ABS)● In-Class Lab
Motivation
Manual Installation
http://kb.mozillazine.org/Installing_Firefox_on_Windows
Installation wizards are not scalable. (Do you remember last time you reinstall softwares of your choice while reinstalling your Windows box?)
Manual Installationwget https://iperf.fr/download/source/iperf-3.1.3-source.tar.gztar zxf iperf-3.1.3-source.tar.gzcd iperf && ./configure && make && sudo make install
git clone https://github.com/django/django.gitcd djangosudo python setup.py install
● What if they have dependencies?● What if someday you want to remove
them safely?● What if they conflict with installed files?● What if you can’t afford compiling them?● What if the install scripts are malicious?● What if you want to upgrade them?
Oops… I just ran Bumblebee’s install script with root
https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/issues/123
rm -rf /usr /lib/nvidia-current/xorg/xorg
Oops… I just ran Bumblebee’s install script with root
https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/issues/123
Oops… I just ran Steam’s install script with root
https://github.com/ValveSoftware/steam-for-linux/issues/3671
rm -rf “$STEAMROOT/”*
Oops… I just ran Steam’s install script with root
https://github.com/ValveSoftware/steam-for-linux/issues/3671
Package Manager
The goal of package managerEnable the user do the following things with ease:
● Search & install new software● Upgrade software● Safely remove software● Verify the downloaded software content
Language package manager
System package manager
dpkg/aptpacman
rpm/yum/dnf
rpm/zypper
nix
LPM vs SPM● Language package managers are good for quickly sharing code written
purely in that language with other developers.● Some Language package repository allows arbitrary developers to upload
packages. Hard to enforce package signing.● Most system package managers won't let you have multiple versions of a
library installed at all● System package, compare to Language package, usually have to be
checked more carefully to make sure it is acceptable
How are you involved in?
Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY
Developer Maintainer User
Work on upstream project
* Every distribution has their own maintainers* Create the distribution-specific experience* Package stability, default options, usability
Enjoy & give feedback
Workflow
Icons made by SimpleIcon from https://www.flaticon.com is licensed by CC 3.0 BY
new release
report bugs,contribute code
patch, review, build
Download
report bugs
feature request
Quick overview of Arch Build System (ABS)
ABS● Official repository
○ core, extra, community, multilib, testing
● PKGBUILD○ a Bash script that contains the compilation and packaging instructions
● makepkg○ shell command tool which reads the PKGBUILDs, automatically downloads and compiles the
sources and creates a package tarball
● pacman○ install and remove the built packages and for fetching dependencies
● AUR○ a community-driven repository for Arch users
In-Class Labhttps://tinyurl.com/y9azpp75
References● https://www.csie.ntu.edu.tw/~hsinmu/courses/_media/nasa_17spring/slides/p
ackage_management.pdf● https://lwn.net/Articles/712318/● https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae
9c17d9527● https://wiki.archlinux.org/index.php/Arch_Build_System● https://news.ycombinator.com/item?id=11096368