1+ month download bandwidth test
1+ month updated bandwidth test
Outgoing smokeping to public IPv4
Outgoing smokeping over VPN
Incoming smokeping to public IPv4
Incoming smokeping over VPN
Outgoing current week smokeping to public IPv4
Outgoing current week smokeping over VPN
Incoming 1-day smokeping, old provider
Incoming 1-day smokeping, new provider
Outgoing 1-day smokeping, old provider
Outgoing 1-day smokeping, new provider
I have been using my Geforce 1060 extensively for deep learning, both with Python and R. But the always painful play with the closed source drivers and kernel updates, paired with the collapse of my computer s PSU and/or GPU, I decided to finally do the switch to AMD graphic card and open source stack. And you know what, within half a day I had everything, including Tensorflow running. Yeah to Open Source!
Preliminaries
So what is the starting point: I am running Debian/unstable with a AMD Radeon 5700. First of all I purged all NVIDIA related packages, and that are a lot I have to say. Be sure to search for nv and nvidia and get rid of all packages. For safety I did reboot and checked again that no kernel modules related to NVIDIA are loaded.
Firmware
Debian ships the package amd-gpu-firmware but this is not enough for the current kernel and current hardware. Better is to clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git and copy everything from the amdgpu directory to /lib/firmware/amdgpu.
I didn t do that at first, and then booting the kernel did hang during the switch to AMD framebuffer. If you see this behaviour, your firmwares are too old.
Kernel
The advantage of having open source driver that is in the kernel is that you don t have to worry about incompatibilities (like every time a new kernel comes out the NVIDIA driver needs patching). For recent AMD GPUs you need a rather new kernel, I have 5.6.0 and 5.7.0-rc5 running. Make sure that you have all the necessary kernel config options turned on if you compile your own kernels. In my case this is
CONFIG_DRM_AMDGPU=m CONFIG_DRM_AMDGPU_USERPTR=y CONFIG_DRM_AMD_ACP=y CONFIG_DRM_AMD_DC=y CONFIG_DRM_AMD_DC_DCN=y CONFIG_HSA_AMD=y
/etc/apt/sources.list.d/rocm.list:
deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main
/etc/apt/trusted.d/rocm.asc.
After that apt-get update should work.
I did install rocm-dev-3.3.0, rocm-libs-3.3.0, hipcub-3.3.0, miopen-hip-3.3.0 (and of course the dependencies), but not rocm-dkms which is the kernel module. If you have a sufficiently recent kernel (see above), the source in the kernel itself is newer.
The libraries and programs are installed under /opt/rocm-3.3.0, and to make the libraries available to Tensorflow (see below) and other programs, I added /etc/ld.so.conf.d/rocm.conf with the following content:
/opt/rocm-3.3.0/lib/
ldconfig as root.
Last but not least, add a udev rule that is normally installed by rocm-dkms, put the following into /etc/udev/rules.d/70-kfd.rules:
SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"
video group to access the GPU.
$ glxinfo ame of display: :0 display: :0 screen: 0 direct rendering: Yes server glx vendor string: SGI server glx version string: 1.4 ... client glx vendor string: Mesa Project and SGI client glx version string: 1.4 ...
pip3 install tensorflow-rocm
>> import tensorflow as tf >> tf.add(1, 2).numpy() 2020-05-14 12:07:19.590169: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libhip_hcc.so ... 2020-05-14 12:07:19.711478: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7444 MB memory) -> physical GPU (device: 0, name: Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT], pci bus id: 0000:03:00.0) 3 >>
staff, which normally own /usr/local/lib/R)
$ R
...
> install.packages("tensorflow")
..install_tensorflow() since Tensorflow is already installed and functional!
With that done, R can use the AMD GPU for computations:
$ R
...
> library(tensorflow)
> tf$constant("Hellow Tensorflow")
2020-05-14 12:14:24.185609: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libhip_hcc.so
...
2020-05-14 12:14:24.277736: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7444 MB memory) -> physical GPU (device: 0, name: Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT], pci bus id: 0000:03:00.0)
tf.Tensor(b'Hellow Tensorflow', shape=(), dtype=string)
>Vulkan is a new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.Several games are using the Vulkan API if available and it is said to be more efficient. There are Vulkan libraries for Radeon shipped in with mesa, in the Debian package
mesa-vulkan-drivers, but they look a bit outdated is my guess.
The AMDVLK project provides the latest version, and to my surprise was rather easy to install, again by following the advice in their README. The steps are basically (always follow what is written for Ubuntu):
/usr/share/vulkan/icd.d/radeon* shipped by Debians mesa-vulkan-drivers package.
Finally I deviated a bit by not editing the file /usr/share/X11/xorg.conf.d/10-amdgpu.conf, but instead copying to /etc/X11/xorg.conf.d/10-amdgpu.conf and adding there the section:
Section "Device"
Identifier "AMDgpu"
Option "DRI" "3"
EndSection/usr/lib. So what I did is:
/opt/amdvlk/lib/i386-linux-gnu/amdvlk32.so and /opt/amdvlk/lib/x86_64-linux-gnu/amdvlk64.so/etc/vulkan/icd.d/amd_icd32.json and /etc/vulkan/icd.d/amd_icd64.json (which were installed above under Copy driver and JSON files)/etc/ld.so.conf.d/amdvlk.conf containing the two lines:
/opt/amdvlk/lib/i386-linux-gnu /opt/amdvlk/lib/x86_64-linux-gnu
Continuing on the path towards all my stuff being managed by
Ansible, I ve figured out a method of managing the reverse
DNS entries for subnets on the Hetzner Dedicated Server.
There s a bunch of Ansible modules for handling Hetzner Cloud, but these servers
are managed in Robot which the Cloud API doesn t cover. Instead, you need to
use the Robot Webservice.
Ansible does have a module for doing pretty arbitrary things with web
APIs though,
so using that I ve got the following playbook figured out to keep the reverse
DNS entries in sync:
---
- hosts:
- vmhost_vm1
gather_facts: False
tasks:
- name: import hetzner webservice credentials
include_vars:
file: "hetzner_ws.yml"
- name: set rdns for hetzner hosts
block:
- name: get current rdns entry
uri:
user: " hetzner_ws_user "
password: " hetzner_ws_password "
url: "https://robot-ws.your-server.de/rdns/ vmip4 "
status_code: [200, 404]
register: rdns_result
- name: update incorrect rdns entry
uri:
user: " hetzner_ws_user "
password: " hetzner_ws_password "
url: "https://robot-ws.your-server.de/rdns/ vmip4 "
method: "POST"
body_format: form-urlencoded
body:
ptr: " inventory_hostname "
status_code: [200, 201]
when: '"rdns" not in rdns_result.json or inventory_hostname != rdns_result.json.rdns.ptr'
changed_when: True
delegate_to: localhostdelegate_to: localhost twice. The first
step looks up the current PTR record, and accepts success if it gives either
a 200 or 404 status code (it will be 404 if there is no existing pointer
record). The result of this is used to conditionally create/update the PTR
record in the next task.
If nothing needs to be done, nothing will be changed and the second task will
be skipped. If a change is needed, the second step is successful if either the
PTR record is updated (status 200) or created (status 201).
This was actually a lot easier than I thought it would be, and the uri module
looks to be really flexible, so I bet there are other things that I could
easily integrate into my Ansible playbooks.
/etc/hostname: foobar/etc/mailname: foobar.example.com/etc/hosts: 127.0.0.1 foobar.example.com vogar localhostavahi-daemon package to be able to reach this box
using foobar.local.
I noticed the presence of a world-writable
directory and so I
tightened the security of some of the default mount points by putting the following
in /etc/rc.local:
mount -o remount,nodev,nosuid /etc/network
mount -o remount,nodev,nosuid /lib/modules
chmod 755 /etc/network
exit 0
/dev/sda) is a small SSD so that the GnuBee can run silently when the
spinning disks aren't needed. To hold the backup data on the other hand, I
got three 4-TB drives drives which I setup in a
RAID-5 array.
If the data were valuable, I'd use
RAID-6 instead
since it can survive two drives failing at the same time, but in this case
since it's only holding backups, I'd have to lose the original machine at
the same time as two of the 3 drives, a very unlikely scenario.
I created new gpt partition tables on /dev/sdb, /dev/sdbc, /dev/sdd
and used fdisk to create a single partition of type 29 (Linux RAID) on
each of them.
Then I created the RAID array:
mdadm /dev/md127 --create -n 3 --level=raid5 -a /dev/sdb1 /dev/sdc1 /dev/sdd1
and waited more than 24 hours for that operation to finish. Next, I
formatted the array:
mkfs.ext4 -m 0 /dev/md127
and added the following to /etc/fstab:
/dev/md127 /mnt/data/ ext4 noatime,nodiratime 0 2
To reduce unnecessary noise and reduce power consumption, I also installed
hdparm:
apt install hdparm
and configured all spinning drives to spin down after being idle for 10
minutes by putting the following in /etc/hdparm.conf:
/dev/sdb
spindown_time = 120
/dev/sdc
spindown_time = 120
/dev/sdd
spindown_time = 120
and then reloaded the configuration:
/usr/lib/pm-utils/power.d/95hdparm-apm resume
Finally I setup smartmontools by putting
the following in /etc/smartd.conf:
/dev/sda -a -o on -S on -s (S/../.././02 L/../../6/03)
/dev/sdb -a -o on -S on -s (S/../.././02 L/../../6/03)
/dev/sdc -a -o on -S on -s (S/../.././02 L/../../6/03)
/dev/sdd -a -o on -S on -s (S/../.././02 L/../../6/03)
and restarting the daemon:
systemctl restart smartd.service
adduser machine1
adduser machine1 sshuser
adduser machine1 sftponly
chsh machine1 -s /bin/false
and then matching directories under /mnt/data/home/:
mkdir /mnt/data/home/machine1
chown machine1:machine1 /mnt/data/home/machine1
chmod 700 /mnt/data/home/machine1
Then I created a custom ssh key for each machine:
ssh-keygen -f /root/.ssh/foobar_backups -t ed25519
and placed it in /home/machine1/.ssh/authorized_keys on the GnuBee.
On each machine, I added the following to /root/.ssh/config:
Host foobar.local
User machine1
Compression no
Ciphers aes128-ctr
IdentityFile /root/backup/foobar_backups
IdentitiesOnly yes
ServerAliveInterval 60
ServerAliveCountMax 240
The reason for setting the ssh cipher and disabling compression is to speed
up the ssh connection as much
as possible given that the GnuBee has avery small RAM
bandwidth.
Another performance-related change I made on the GnuBee was switching to the internal sftp
server
by putting the following in /etc/ssh/sshd_config:
Subsystem sftp internal-sftp
# Configure for each host
PASSWORD="XXXX" # use pwgen -s 64 to generate a good random password
BACKUP_HOME="/root/backup"
REMOTE_URL="sftp:foobar.local:"
RETENTION_POLICY="--keep-daily 7 --keep-weekly 4 --keep-monthly 12 --keep-yearly 2"
# Internal variables
SSH_IDENTITY="IdentityFile=$BACKUP_HOME/foobar_backups"
EXCLUDE_FILE="$BACKUP_HOME/exclude"
PKG_FILE="$BACKUP_HOME/dpkg-selections"
PARTITION_FILE="$BACKUP_HOME/partitions"
# If the list of files has been requested, only do that
if [ "$1" = "--list-current-files" ]; then
RESTIC_PASSWORD=$PASSWORD restic --quiet -r $REMOTE_URL ls latest
exit 0
# Show list of available snapshots
elif [ "$1" = "--list-snapshots" ]; then
RESTIC_PASSWORD=$GPG_PASSWORD restic --quiet -r $REMOTE_URL snapshots
exit 0
# Restore the given file
elif [ "$1" = "--file-to-restore" ]; then
if [ "$2" = "" ]; then
echo "You must specify a file to restore"
exit 2
fi
RESTORE_DIR="$(mktemp -d ./restored_XXXXXXXX)"
RESTIC_PASSWORD=$PASSWORD restic --quiet -r $REMOTE_URL restore latest --target "$RESTORE_DIR" --include "$2" exit 1
echo "$2 was restored to $RESTORE_DIR"
exit 0
# Delete old backups
elif [ "$1" = "--prune" ]; then
# Expire old backups
RESTIC_PASSWORD=$PASSWORD restic --quiet -r $REMOTE_URL forget $RETENTION_POLICY
# Delete files which are no longer necessary (slow)
RESTIC_PASSWORD=$PASSWORD restic --quiet -r $REMOTE_URL prune
exit 0
# Catch invalid arguments
elif [ "$1" != "" ]; then
echo "Invalid argument: $1"
exit 1
fi
# Check the integrity of existing backups
RESTIC_PASSWORD=$PASSWORD restic --quiet -r $REMOTE_URL check exit 1
# Dump list of Debian packages
dpkg --get-selections > $PKG_FILE
# Dump partition tables from harddrives
/sbin/fdisk -l /dev/sda > $PARTITION_FILE
/sbin/fdisk -l /dev/sdb > $PARTITION_FILE
# Do the actual backup
RESTIC_PASSWORD=$PASSWORD restic --quiet --cleanup-cache -r $REMOTE_URL backup / --exclude-file $EXCLUDE_FILE
I run it with the following cronjob in /etc/cron.d/backups:
30 8 * * * root ionice nice nocache /root/backup/backup-machine1-to-foobar
30 2 * * Sun root ionice nice nocache /root/backup/backup-machine1-to-foobar --prune
in a way that doesn't impact the rest of the system too much.
Finally, I printed a copy of each of my backup script, using
enscript, to stash in a safe place:
enscript --highlight=bash --style=emacs --output=- backup-machine1-to-foobar ps2pdf - > foobar.pdf
This is actually a pretty important step since without the password, you
won't be able to decrypt and restore what's on the GnuBee.
Debian project leader This month contained the first week and a half or so of my term as Debian Project Leader. So far my focus has been getting up to speed and keeping the gears turning with day to day DPL tasks. The updates listed here will also be available on the DPL blog, where I aim to make more frequent updates. During May, Debian Brazil will host Debian talks throughout the month which they will stream to their YouTube channel. You can find the schedule in this git repository, most of the talks will be in Portuguese, but on the 4th of May at 21:00 UTC, I ll be covering some Debian project topics for an hour or so and take some questions if there s time left. 2020-04-19: Handover session with Sam, our outgoing DPL. We covered a lot of questions I had and main areas that the DPL works in. Thanks to Sam for having taken the time to do this. 2020-04-21: First day of term! Thank you to everybody who showed support and have offered to help! 2020-04-21: Request feedback from the trademark team on an ongoing trademark dispute. 2020-04-21: Join the GNOME Advisory Board as a representative from Debian. 2020-04-21: Reply on an ongoing community conflict issue. 2020-04-21: Update Debian project summary for SPI annual report. 2020-04-21: Received a great e-mail introduction from Debian France and followed up on that. 2020-04-21: Posted Bits from the new DPL to debian-devel-announce. 2020-04-22: Became Debian s OSI Affilliate representative. 2020-04-22: Reply to a bunch of media inquiries for interviews, will do them later when initial priorities are on track. 2020-04-23: Resign as Debian FTP team trainee and mailing list moderator. In both these areas there are enough people taking care of it and I intend to maximise available time for DPL and technical areas in the project. 2020-04-25: Review outgoing mail for trademark team. 2020-04-25: Answer some questions in preparation for DAM/Front Desk delegation updates. 2020-04-26: Initiated wiki documentation for delegation updates process. 2020-04-27: Update delegation for the Debian Front Desk team. 2020-04-29: Schedule video call with Debian treasurer team. 2020-04-29: OSI affiliate call. Learned about some Open Source projects including OpenDev, OpenSourceMatters, FOSS Responders and Democracy Labs.
Debian Social Work on the Debian Social project is progressing, we plan to start a separate blog syndicated to Planet Debian that contains progress and status updates. I ve been terrible at tracking the work we ve been doing on this, so for now, here are some micro updates:
MiniDebConf Online In the DebConf video team, we ve been wondering whether we have all the tools required to successfully host a DebConf (or even a mini DebConf) entirely online. There s really just one way to know for sure, so we re going to host MiniDebConf Online from 28 May to 31 May. The first two days will be an online MiniDebCamp, where we can try to hold online spints, meetings and general chit-chat. The last two days will be for talks and lightnight talks, with BoFs likely to take place throughout the 4 days (this will probably be decided once we have a content team). Announcements should go out within the next week, in the meantime, save the dates.
Debian package uploads 2020-04-07: Upload package flask-autoindex (0.6.6-1) to Debian unstable. 2020-04-07: Upload package gamemode (1.5.1-1) to Debian unstable. 2020-04-08: Accept MR#2 for live-tasks (add usbutils to live-task-standard). 2020-04-08: Upload package live-tasks (11.0.2) to Debian unstable (Closes: #955526, #944578, #942837, #942834). 2020-04-08: Close live-config bug #655198 (Only affects squeeze which is no longer supported). 2020-04-08: Upload package live-config (11.0.1) to Debian unstable. 2020-04-08: Upload package calamares (3.2.22-1) to Debian unstable. 2020-04-15: Upload package xabacus (8.2.6-1) to Debian unstable. 2020-04-16: Merge MR#1 for gnome-shell-extension-dashtodock (new upstream release). 2020-04-16: Upload package gnome-shell-extension-dashtodock (67+git20200225-1) to Debian unstable. 2020-04-16: Merge MR#1 for gnome-shell-extension-hard-disk-led (fix some lintian issues). 2020-04-16: Merge MR#1 for gnome-shell-extension-system-monitor (fix some lintian issues). 2020-04-17: Upload package calamares (3.2.23-1) to Debian unstable. 2020-04-17: Upload package catimg (2.6.0-1) to Debian unstable (Closes: #956150). 2020-04-17: Upload package fabulous (0.3.0+dfsg1-7) to Debian unstable (Closes: #952242). 2020-04-17: Upload package gnome-shell-extension-system-monitor (38+git20200414-32cc79e-1) to Debian unstable (Closes: #956656, #956171). 2020-04-17: Upload package gnome-shell-extension-arc-menu (45-1) to Debian unstable (Closes: #956168). 2020-04-18: Upload package toot (0.26.0-1) to Debian unstable. 2020-04-23: Update packaging for gnome-shell-extension-tilix-shortcut, upstream section needs some additional work before release is possible. 2020-04-23: Upload package xabacus (8.2.7-1) to Debian unstable. 2020-04-27: Upload package gnome-shell-extension-dash-to-panel (37-1) to Debian unstable (Closes: #956162, #954978). 2020-04-27: Upload package gnome-shell-extension-dash-to-panel (37-2) to Debian unstable. 2020-04-27: Upload package gnome-shell-extension-dashtodock (68-1) to Debian unstable. 2020-04-30: Merge MR#8 for gamemode (add symbol files) (Closes: #952425). 2020-04-30: Merge MR#9 for gamemode (reduce number of -dev packages generated). 2020-04-30: Merge MR#10 for gamemode (deal better with upgrades on a buggy version). 2020-04-30: Manually merge changes from MR#11 for gamemode (packaging fixes). 2020-04-30: Upload package gamemode (1.5.1-2) to Debian unstable.
$home.
--gem-install layout and fixing autopkgtest.Conflicts field.ARM $arch.Breaks+Replaces for ruby-sass-rails (#952682 and #954544).cut -d'-' -f1 to just show upstream version.
encryptor for Ruby2.7 test failures.image_science for removing relative paths.ffi-yajl for Ruby2.7 test failures.aggregate for simply using require.aggregate for modernizing CI and adding Ruby 2.5 and 2.7 support.espeak-ruby for Ruby2.7 test failures.tty-which for test failures in general.packable for Ruby2.7 test failures. PR #12 has been proposed.growl for test failures and proposed an initial patch.
hugo-coder, asking to enable RSS feed for blogs.hugo-coder for fixing the above issue myself.arbre for requesting a release.combustion, asking to relax dependency on rubocop. Fixed in this commit.ffi-compiler for requesting to fix homepage and license.gographviz for requesting a release.crb-blast, suggesting compatability with bio 2.0.x.uniform_notifier for asking to drop the use of ruby-growl.polybar, adding installation instructions on Debian systems.:wq for today.
Here is my monthly update covering what I have been doing in the free software world during April 2020 (previous month's report). Looking it over prior to publishing, I am surprised how much I got done this month I felt that I was not only failing to do all the extra things I had planned, but I was doing far less than normal. But let us go easy on ourselves; nobody is nailing this.
send-later command's message limit. [...]
debian/rules files that specify -Wl,--as-needed as this is now the default from bullseye onwards. (#956146).debug. (#958945)--with=systemd with a Debhelper compatibility level of 10 or higher. (#949844)$* as using the Debhelper sequencer. (#930679)override dh_install (ie. with a space) in debian/rules; in 99% of cases this will be an omission of the underscore. [...]python3-all-dev and python3-all-dbg to satisfy the check for packages that use py3versions with the -s argument. (#955799, #956134)Build-Depends-Arch and Build-Depends-Indep do not imply each other, so don't warn about "duplicate" dependencies in this case. (#956368)py3versions -s without the corresponding Build-Depends. (#958794)pre-depends-directly-on-multiarch-support tag; any package pre-depending on the multiarch-support will not be installable in the bullseye distribution. (#798762)mailing-list-obsolete-in-debian-infrastructure as being experimental. (#958182, #958666)dh_dwz-generated "multi-files". (#955752)package-relation-with-self if we have specified a required architecture. (#956227)package-uses-old-debhelper-compat-version when run against itself. [...].travis.yml file as we are using Salsa now. [...]
One of the original promises of open source software is that distributed peer review and transparency of process results in enhanced end-user security. However, whilst anyone may inspect the source code of free and open source software for malicious flaws, almost all software today is distributed as pre-compiled binaries. This allows nefarious third-parties to compromise systems by injecting malicious code into ostensibly secure software during the various compilation and distribution processes.
The motivation behind the Reproducible Builds effort is to ensure no flaws have been introduced during this compilation process by promising identical results are always generated from a given source, thus allowing multiple third-parties to come to a consensus on whether a build was compromised.
The initiative is proud to be a member project of the Software Freedom Conservancy, a not-for-profit 501(c)(3) charity focused on ethical technology and user freedom.
Conservancy acts as a corporate umbrella allowing projects to operate as non-profit initiatives without managing their own corporate structure. If you like the work of the Conservancy or the Reproducible Builds project, please consider becoming an official supporter.
otf-active mailing list this final report described in detail the status of each objective, our overall lessons and our future plans.
disorderfs-debug prefix in log output when we change non-disorderfs things in the file and, as it happens, do not run disorderfs at all. [...]a HTML elements under li ones, which was causing a comma/bullet spacing issue. [...]*.sym files as Java archives. (#15).zip filename filtering and exclude two patterns of files generated by Maven projects in "fork" mode. (#13)
Elsewhere in our tooling, I made the following changes to diffoscope, our in-depth and content-aware diff utility that can locate and diagnose reproducibility issues, including preparing and uploading versions 139, 140, 141 and 142 to Debian:
.dex files can also serve as APK containers so restrict the narrower identification of .dex files to files ending with this extension and widen the identification of APK files to when file(1) discovers a Dalvik file. (#28).p7c and .p7b certificates. (#94)zipinfo(1) warnings. (#97)pdftotext as a requirement to run the PDF test_metadata text. (#99)python3-h5py in debian/tests/control.in to ensure that we have this module installed during a test run to generate the fixtures in these tests. [...]./setup.py test --pytest-args arguments. [...]rb-general mailing list is probably a first step for contributors to take. [...]/docs/buildinfo/ to /docs/recording/. (#23)/news/ namespace [...] and improve formatting of archived news links [...].ntp Network Time Protocol server to prevent a denial of service vulnerability (CVE-2020-11868).
ntp in ELA-224-2 to add further protection that was not present in the previous update.
Content-Type HTTP header is missing when downloading .deb files (#956471) and to report build failures in the macs & ruby-enumerable-statistics packages:
6.0~rc3-1 New upstream beta release.6.0~rc4-1 New upstream beta release and use the newly-packaged liblzf-dev package over the local version. (#958321)5.0.7-3 Fix build failures with GCC 10. (#957751)5.0.7-4 Use the newly-packaged liblzf-dev package over the bundled version. (#958321)5.0.7-5 Ensure that the daemon is running prior to running the autopkgtests.5.0.7-6 Perform a "no change" sourceful upload to permit migration to the testing distribution.5.0.7-7 Add a sleep to ensure that the server has started before running the tests.2.2.12-1 New upstream release.3.0.5-1 New upstream release.1.6.3-1 New upstream release.1.6.5-1 New upstream release.1.6.5-2 Fix a failing autopkgtest that assumes a particular string is in the first kilobyte of the response which was no longer the case due to the addition of new configuration options.1.2.2-1 New upstream release.1.2.2-2 Ensure that the server is started before running autopkgtests.1.2.2-3 Sleep to ensure the server has really started before running the autopkgtests.2.2-2) Replace python-nautilus in the build-dependencies with python3-nautilus. (#943137)
15) Correct the (confusing) internal logic of --force from being visible to users. (#895686)
20.0.0-1) New upstream release and refresh packaging.
1.0.1-1) New upstream release and refresh packaging.
0.6-3) Mark a non-deterministic autopkgtest as "flaky" for now to ease migration (#930448) and use DEB_VERSION_UPSTREAM_REVISION over manually parsing dpkg-parsechangelog in debian/rules.
dpkg-dev package provides all the basic tools needed. Assuming that you already succeeded with creating the necessary packaging metadata (i.e., debian/changelog, debian/control, debian/copyright, etc., and there are great helper tools for this such ash dh-make, dh-make-golang, etc.,) it should be as simple as invoking the dpkg-buildpackage tool. So what's the big deal here?dpkg-buildpackage expects to be called with an appropriately setup build context, that is, it needs to be called in an environment that satisfies all build dependencies on the system. Let's say you are building a package for Debian unstable on your Debian stable system (this is the common scenario for the official Debian build machines), you would need your build to link against libraries in unstable, not stable. So how to tell the package build process where to find its dependencies?/usr/lib, etc.chroot(2) system call, which is a privileged operation. Also creating these system installations is a somewhat finicky process. In Debian, we have tools that make this process easier, the most popular ones are probably pbuilder(1)2 and sbuild(1)3. Still, they are somewhat clumsy to use, add significant levels of abstraction in the sense that they do quite a bit of magic behind the scenes to work hide the fact that privileged operations (need root to run chroot(2), etc.) are required. They are also somewhat brittle, for instance, if a build process is aborted (SIGKILL, or system crash), you may end up with temporary directories and files under userids other than your own that again may require root-privileges to cleanup.unshare(2) system call). This means that a regular user may run a process (and its child processes) in an "environment" where system calls behave differently and provide a configurable amount of isolation levels. This article demonstrates a novel build tool buildah, which is:buildah is written in golang and compiled as a (mostly) statically linked executable. It builds on top a number of libraries written in golang, including github.com/containers/storage and github.com/containers/image. The overlay functionality is provided by the fuse-overlayfs(1) utility.echo kernel.unprivileged_userns_clone = 1 sudo tee -a /etc/sysctl.d/containers.confI have to admit that I'm not entirely sure why the Debian kernels don't enable usernamespaces by default. I've found a reference on stackexchange4 that claims this disables some "hardening" features in the Debian kernel. I also understand this step is not necessary if you chose to compile and run a vanilla upstream kernel. I'd appreciate a better reference and am happy to update this text.
systemctl -p /etc/sysctl.d/containers.conf
$ c=$(buildah from docker.io/debian:sid)This command downloads the image from docker.io and stores it locally in your home directory. Let's install essential utilities for building Debian packages:
Getting image source signatures
Copying blob 2bbc6b8c460d done
Copying config 9b90abe801 done
Writing manifest to image destination
Storing signatures
1: buildah run $c apt-get update -qq
2: buildah run $c apt-get install dpkg-dev -y
3: buildah config --workingdir /src $c
4: buildah commit $c dpkg-dev
dpkg-buildpackage, etc. The buildah config command in line 4 arranges that whenever you start a shell in the container, the current working directory in the container is in /src. Don't worry about this location not existing yet, we will make sources from your host system available there. The last command creates an OCI image with the name dpkg-dev. BTW, the name you use for the image in the commit command can be used in podman (but not the "containers"). See 5 and 6 for a comparison between podman and buildah.buildah images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/dpkg-dev latest b85c34f95d3e 16 seconds ago 406 MB
docker.io/library/debian sid 9b90abe801db 11 hours ago 124 MB
$c. To use it conveniently with source packages that I have stored in /srv/scratch/packages/containers, let's introduce a shell alias r like this:alias r='buildah run --tty -v /srv/scratch/packages/containers:/src $c 'This allows you to easily execute commands in that container:
r pwdThe last command will give you an interactive shell that we'll be using for building packages!
r bash
siretart@x1:~/scratch/packages/containers/libpod$ r bashNow we have a environment that has all build-dependencies available and we are ready to build the package:
root@x1:/src# cd golang-github-openshift-imagebuilder
root@x1:/src/golang-github-openshift-imagebuilder# dpkg-checkbuilddeps
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper (>= 11) dh-golang golang-any golang-github-containers-storage-dev (>= 1.11) golang-github-docker-docker-dev (>= 18.09.3+dfsg1) golang-github-fsouza-go-dockerclient-dev golang-glog-dev
root@x1:/src/golang-github-openshift-imagebuilder# apt-get build-dep -y .
Note, using directory '.' to get the build dependencies
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
[...]
root@x1:/src/golang-github-openshift-imagebuilder# dpkg-checkbuilddeps
root@x1:/src/golang-github-openshift-imagebuilder#
root@x1:/src/golang-github-openshift-imagebuilder# dpkg-buildpackage -us -uc -bAssuming the package builds, the package build results are placed in
/src inside the container, and are visible at ~/scratch/packages/containers on the host. There you can inspect, extract or even install them. The latter part allows you to interactively rebuild packages against updated dependencies, without the need of setting up an apt archive or similar.buildah(1) tool is available in debian/bullseye since 2019-12-17. Since is a golang binary, it only links dynamically against system libraries such as libselinux and libseccomp, which are all available in buster-backports. I'd expect buildah to just work on a debian/buster system as well provided you install those system libraries and possibly the backported Linux kernel.docker command to an extend that a user familiar with docker might want to place this in their ~/.bashrc file:alias docker='podman'Unfortunately, at the time of writing podman is still being processed by the ftp-masters since 01-03-2020. At this point, I recommend building the package from our salsa repository at https://salsa.debian.org/debian/libpod
-I rules and -L flags) to tell the compiler and linker where to look.# Download a binary device tree file and matching kernel a good soul uploaded to github
wget https://github.com/vfdev-5/qemu-rpi2-vexpress/raw/master/kernel-qemu-4.4.1-vexpress
wget https://github.com/vfdev-5/qemu-rpi2-vexpress/raw/master/vexpress-v2p-ca15-tc1.dtb
# Download the official Rasbian image without X
wget -O raspbian_lite_latest.zip https://downloads.raspberrypi.org/raspbian_lite_latest
unzip raspbian_lite_latest.zip
# Convert it from the raw image to a qcow2 image and add some space
qemu-img convert -f raw -O qcow2 2020-02-13-raspbian-buster-lite.img rasbian.qcow2
qemu-img resize rasbian.qcow2 +2G
# start qemu
qemu-system-arm -m 2048M -M vexpress-a15 -cpu cortex-a15 \
-kernel kernel-qemu-4.4.1-vexpress -no-reboot \
-smp 2 -serial stdio \
-dtb vexpress-v2p-ca15-tc1.dtb -sd rasbian.qcow2 \
-append "root=/dev/mmcblk0p2 rw rootfstype=ext4 console=ttyAMA0,15200 loglevel=8" \
-nic user,hostfwd=tcp::5555-:22
# login at the serial console as user pi with password raspberry
sudo -i
# enable ssh
systemctl enable ssh
# resize partition and filesystem
parted /dev/mmcblk0 resizepart 2 100%
resize2fs /dev/mmcblk0p2
Now I can login via ssh and start to play:
ssh pi@localhost -p 5555
So for me that is sufficient, I have network connectivity to install an editor, transfer
files and can otherwise work with tmux to have some session multiplexing.
Additional Notes
raspi2 machine, but this one does not support networking or USB for
keyboard and mouse (in case you like to try the version with a desktop), but in general
it works. You can extract the offical kernel and device tree file from the image and boot.
But you're limited to the serial console as far as I could figure it out.vexpress-a15 machine works, but I got only a
resolution of 640x480 out of it, so I decided that ssh access to the emulated machine
is sufficient and easier to deal with.versatilepb machine, you can find a matching device tree file
and kernel on github as well.
The drawback here is that the machine supports only 256MB of RAM, so you're more constrained.| Publisher: | World Scientific |
| Copyright: | 2016 |
| ISBN: | 981-4667-16-1 |
| Format: | Kindle |
| Pages: | 370 |
I m working on trying to get a Qualcomm IPQ8064 device working properly. I d got as far as an extremely hacked up chain of networking booting and the serial console working, so the next stage was to try and get a basic userland in place to try and make poking things a bit easier. While I have a cross-compiling environment all setup (that s how I m building my kernels) I didn t really want to get into something complicated just to be able to poke around sysfs etc. I figured I could use a static BusyBox in an initramfs. I was right, but there were a couple of hiccups along the way so I m writing it up so I remember next time.
First, I cheated and downloaded a prebuilt static binary from https://busybox.net/downloads/binaries/ (very convenient, thanks) - the IPQ8064 is a dual core ARMv7 so I used busybox-armv7l. There were various sites with init scripts to go along with this; I ended up with a variation of Star Brilliant s gist:
#!/bin/busybox sh
busybox mkdir -p /dev /etc /proc /root /sbin /sys /usr/bin /usr/sbin
busybox mount -t proc proc /proc
busybox mount -t sysfs sys /sys
busybox mount -t devtmpfs dev /dev
echo Starting up...
echo ttyMSM0::respawn:/sbin/getty -L ttyMSM0 115200 vt100 >> /etc/inittab
echo Login with root and no password. > /etc/issue
echo >> /etc/issue
echo root::0:0:root:/root:/bin/sh > /etc/passwd
busybox mdev -s
busybox --install
hostname localhost
ip link set lo up
echo 5 > /proc/sys/kernel/printk
exec /linuxrc
busybox and the init script aren t sufficient. If you have any problems then you re going to want a console device. Otherwise you ll do what I did, forget to change one of the tty references in the script to the right device, and spend too long trying to figure out why you re not getting any output as soon as you start running userspace. It turns out that CONFIG_DEVTMPFS_MOUNT isn t sufficient for the initramfs (the Kconfig help even tells you that). So I need to create a /dev/console device file inside the initramfs too. And I don t build as root (and you shouldn t either) which makes creating a device node hard. It s ok though, because the Linux kernel doesn t need you to be root to build it, and it has a default initramfs with a console device in it. This is helpfully generated using usr/gen_init_cpio, which takes a file defining what you want to put in the cpio file that becomes your initramfs. I used the following:
# Simple busybox based initramfs
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
dir /root 0700 0 0
dir /bin 0755 0 0
dir /sbin 0755 0 0
file /init basic-init 0755 0 0
file /bin/busybox busybox-armv7l 0755 0 0
linux/usr/gen_init_cpio initramfs.list > initramfs.cpio and the resulting initramfs.cpio is suitable for inclusion in your kernel. The precompiled binaries have a lot of stuff enabled, which makes for a pretty useful debugging environment with fairly minimal work.
/etc/opendkim/signing.table:
*@debian.org marcos-debian.anarcat.user
/etc/opendkim/key.table:
marcos-debian.anarcat.user debian.org:marcos-debian.anarcat.user:/etc/opendkim/keys/marcos-debian.anarcat.user.private
Yes, that's quite a mouthful! That magic selector is long in that
way because it needs a special syntax (specifically the
.anarcat.user suffix) for Debian to be happy. The -debian
string is to tell me where the key is published. The marcos
prefix is to remind me where the private is used.opendkim-genkey --directory=/etc/opendkim/keys/ --selector=marcos-debian.anarcat.user --domain=debian.org --verbose
This creates the DNS record in
/etc/opendkim/keys/marcos-debian.anarcat.user.txt (alongside the
private key in .key).service opendkim restart
The DNS record will look something like this:
marcos-debian.anarcat.user._domainkey IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtKzBK2f8vg5yV307WAOatOhypQt3ANQ95iDaewkVehmx42lZ6b4PzA1k5DkIarxjkk+7m6oSpx5H3egrUSLMirUiMGsIb5XVGBPFmKZhDVmC7F5G1SV7SRqqKZYrXTufRRSne1eEtA31xpMP0B32f6v6lkoIZwS07yQ7DDbwA9MHfyb6MkgAvDwNJ45H4cOcdlCt0AnTSVndcl"
"pci5/2o/oKD05J9hxFTtlEblrhDXWRQR7pmthN8qg4WaNI4WszbB3Or4eBCxhUdvAt2NF9c9eYLQGf0jfRsbOcjSfeus0e2fpsKW7JMvFzX8+O5pWfSpRpdPatOt80yy0eqpm1uQIDAQAB" ) ; ----- DKIM key marcos-debian.anarcat.user for debian.org
"p=MIIB..." string needs to be joined together, without the
quotes and the p=, and sent in a signed email to
changes@db.debian.org:
-----BEGIN PGP SIGNED MESSAGE-----
dkimPubKey: marcos.anarcat.user MIIB[...]
-----BEGIN PGP SIGNATURE-----
[...]
host -t TXT marcos-debian.anarcat.user._domainkey.debian.org nsp.dnsnode.net
(nsp.dnsnode.net being one of the NS records of the
debian.org zone.)anarcat@debian.org.
check-auth@verifier.port25.com. Those tools will run Spamassassin
on the received emails and report the results. What you are looking
for is:
-0.1 DKIM_VALID: Message has at least one valid DKIM or DK
signature-0.1 DKIM_VALID_AU: Message has a valid DKIM or DK signature from
author's domain-0.1 DKIM_VALID_EF: Message has a valid DKIM or DK signature from
envelope-from domainMAIL FROM: header
as sent by the originating MTA, which you see as from=<> in the
postfix lost.
The following will happen anyways, as soon as you have a signature,
that's normal:
0.1 DKIM_SIGNED: Message has a DKIM or DK signature, not necessarily valid1.1 DKIM_ADSP_ALL No valid author signature, domain signs all mail--- a/opendkim/key.table
+++ b/opendkim/key.table
@@ -1 +1 @@
-marcos anarc.at:marcos:/etc/opendkim/keys/marcos.private
+marcos %:marcos:/etc/opendkim/keys/marcos.private
Next.