Saturday, 27 July, 2024

Amanda 3.5.4 on Debian unstable

Just to tell that I have upload a new amanda version on Debian unstable (3.5.4). Please test it.

Wednesday, 21 September, 2022

How to quickly setup a new OpenAFS cell in Debian 9 aka stretch.

Because the instructions in Debian are a bit out of date I put here a quick summary of how to setup a new OpenAFS cell. This instructions complements the existing documentation and add some interesting bits for debug.First setup the kerberos client, we use in this example the MIT implementation:

apt install krb5-user

The install the fileserver software including the aklog command:

apt install openafs-dbserver openafs-fileserver openafs-krb5

Get a keytab to authenticate your OpenAFS servers:

kadmin.local
addprinc -randkey -e aes256-cts-hmac-sha1-96 afs/cell-name
ktadd -k /root/afs.keytab afs/cell-name
getprinc afs/cell-name
quit

Copy this keytab into you first server:

scp afs.keytab afs01:

Move the keytab into the final place:

mv afs.keytab /etc/openafs/server/rxkad.keytab
chown root: /etc/openafs/server/rxkad.keytab

To workaround a bug on afs-newcell:

touch /etc/openafs/server/KeyFile

Check if you mounted the /vicepa:

df -h /vicepa

Bootstrap:

afs-newcell

If something goes wrong you can to debug the aklog command with:

KRB5_TRACE=/dev/stdout aklog -d

List of KRB RPC errors:

Monday, 28 February, 2022

at daemon 3.2.5

The at daemon 3.2.4 is broken for some setups because POSIX timers do not play well with fork syscall. So here is the announce of 3.2.5, only to fix 3.2.4.

You can download the source and the signature from http://software.calhariz.com/at/

The changelog at 3.2.5 (2022-02-05):

at 3.2.5 (2022-02-05)
  Vincent Lefevre
        Fix: atd forgets to run a job in the queue
          https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004972

Saturday, 29 January, 2022

at daemon 3.2.4

There is a new version of at daemon, 3.2.4. Before working on releasing 3.2.3 I forgot to do a "git fetch". So quickly releasing a new version with the missing changes.

You can download the source and the signature from http://software.calhariz.com/at/

The changelog: at 3.2.4 (2022-01-29):

 at 3.2.4 (2022-01-29):
  Danillo Spinella
	Use POSIX timers to wait on next job
	Add timeformat argument in at.c
	Use secure_getenv when available
	Add O_SYNC option when opening atjob file
	Fix mtime check in atd.c
	  https://bugzilla.suse.com/show_bug.cgi?id=680113
	MR18 - Use POSIX timers to wait on next job
	  Upstreaming openSUSE patch: https://build.opensuse.org/package/view_file/Base:System/at/at-3.1.14-usePOSIXtimers.patch?expand=0&rev=d84f9fe442d5b5cce89c22d52581dfa4
	MR21 - Add timeformat argument in at.c
	  Upstreaming openSUSE patch: https://build.opensuse.org/package/view_file/Base:System/at/at-atq-timeformat.patch?expand=1
	MR23 - Use secure_getenv when available
	  https://build.opensuse.org/package/view_file/Base:System/at/at-secure_getenv.patch?expand=1
	MR25 - Fix mtime check in atd.c
	  https://bugzilla.suse.com/show_bug.cgi?id=680113
	MR22 - Print the selected jobs in atq
	  https://build.opensuse.org/package/view_file/Base:System/at/at-3.1.14-joblist.patch?expand=1
	MR24 - Add O_SYNC option when opening atjob file

at daemon 3.2.3

There is a new version of at daemon, 3.2.3. I have incorporated several fixes from other distributions that are using them for some time.

You can download the source and the signature from http://software.calhariz.com/at/

The changelog:

at 3.2.3 (2022-01-29):
 Jose M Calhariz
       Fix two typos on documentation
 Giulio Benetti
       MR14 - Makefile: fix parallel build failure
       MR12 - Makefile.in: use DESTDIR instead of IROOT
       MR11 - Use quotes to include config.h since it is a local file.
       MR8 - .gitignore: add all files produced during building
       MR13 - getloadavg: use standard fcntl.h for open(), close(), read() and write()
 Danilo Spinella
       MR16 - Fix leaks in at.c
       MR19 - Avoid sleeping when SIGHUP has been received
       MR17 - Set PIDDIR to /run if exists on the system
 Jan Staněk
       MR15 - Address issues raised by static analysis

Sunday, 25 April, 2021

at daemon 3.2.2

There is a new version of at daemon, 3.2.2. I add one helper script, so the bump on the patch version.

You can download the source and the signature from http://software.calhariz.com/at/

The changelog:

at 3.2.1 (2019-08-04):
    Jose M Calhariz
	Include config.h on parsetime.l, see
	88a3bed41de234220f007c785e3aa45bd62446c6 for more info and
	original author.
	Check if libc provides __isleap() macro, see
	02a0a98d94b24284177dad7747edbdc3088d63cd

at 3.2.2 (2021-04-25):
  Jose M Calhariz
	Add helper script batch-job

Sunday, 19 January, 2020

Welcome to a new Implementation

The blog as migrated to a new host, some links are broken. 

Thursday, 25 July, 2019

at daemon 3.2.0

There is a new version of at daemon, 3.2.0. It was implemented some new features, so the bump on the minor version.

You can download the source and the signature from http://software.calhariz.com/at/

The changelog:

at 3.2.0 (2019-07-24):
  Jose M Calhariz
        Print time of new job before the input of the commands, Closes #863045
        Do not drop seconds on -t option, Closes #792040
        Start using nice levels from 0 instead of 2. Closes #519716
        Correctly handle DST when specifying a UTC time. Closes #364975
  Gerhard Poul:
        Add flag to send email to other user. MR 5

Sunday, 21 July, 2019

New release of switchconf 0.0.16

I have not touched switchconf for a long time. Being at DebCamp19 was a good time to work on it.

I have moved the development of switchconf from a private svn repo to a git repo in salsa: https://salsa.debian.org/debian/switchconf Created a virtual host called http://software.calhariz.com were I will publish the sources of the software that I take care. Updated the Makefile to the git repo and released version 0.0.16.

You can download the latest version of switchconf from here: http://software.calhariz.com/switchconf

Friday, 3 August, 2018

A Selection of talks from DebConf 2018

This is my selection of talks from DebConf18.

Thursday, 26 July, 2018

at daemon 3.1.23, with some fixes and now a signature

This is the public announcement of release 3.1.23.

I have made some non public releases of at daemon for internal development of the Debian package, since 3.1.20. This fixes some reported bugs and the development was made using http://salsa.debian.org. You can download the tar from here and the signature from here.

The Changelog:

at 3.1.21 (2018-07-23):
  Jose M Calhariz:
    832368-Using_of_the_meaningless_fcntl
        Fix call of fcntl by replacing (long) 1 with FD_CLOEXEC

    892819-at__improvements_to_atd.service
        Improve atd.service, see bug report 892819

    885891-at__stale_batchjobs_after_reboot
        Remove stale at jobs after a boot.

    897669-897670-Some_fixes_in_the_manuals
        Fix some warnings in manpages at.1 and atd.8

    883730-Remove_invalid_email_from_man_page
        Remove invalid email from man pages.

at 3.1.22 (2018-07-24):
  Jose M Calhariz:
        Draft of a release script

at 3.1.23 (2018-07-24):
  Jose M Calhariz
        Finalised script to release software.

A non official backport of amanda 3.5.1 for Debian stretch

I have checked the conditions for an official backport of amanda in Debian, but I think there is not demand enough. I have made an non official backport of amanda 3.5.1 for Debian stretch amd64 because of new features, fixes bugs and to support my users. You can download the tar file with the debs from here.

Add a PGP subkey to Yubikey 4

I have a Yubikey from the job and wanted to start signing git commit without copying my Debian PGP key to the work computer. No, I did not want to create a second class PGP key just for the work. Here are the instructions for someone else do the same.

On the master computer

  • Create a second home dir for gpg

Because of bug #904596 I recommend to move your GPG home directory out of the way. Copy it into the original directory before starting.

mv ~/.gnupg ~/.gnupg.ref
cp -r ~/.gnupg.ref ~/.gnupg
  • Create a subkey just for signing.

Create a subkey and take noticy of is id.

gpg --edit-key <KEY ID>
addkey
list
save
  • Move into the Yubikey.

Select the new subkey and move it into the Yubikey.

gpg --edit-key <KEY ID>
key <SUB KEY ID>
keytocard 
save
  • Publish the updated PGP Key
gpg --keyserver http://keyserver.ubuntu.com --send-keys <KEY ID>
  • Store the public URL of the key on Yubikey
gpg --edit-card
url http://https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=...
quit
  • Backup both GPG home dir

On your master computer you need to use the old GPG home dir. But need to store both for the future.

mv ~/.gnupg ~/.gnupg.yubikey4
mv ~/.gnupg.ref ~/.gnupg
cd ~
tar cf gnupg-homedir.backup.tar .gnupg .gnupg.yubikey4
  • Test
gpg --armor --sign

Should work without asking for the Yubikey.

  • Wait for the Key server to update your public key with the new subkey.

On a new computer

  • Plug the Yubikey
  • Through Yubikey fetch the public PGP Key
gpg --edit-card
fetch
quit
  • Test
gpg -armor --sign

Should ask for the Yubikey.

Sunday, 30 July, 2017

Crossgrading a complex Desktop and Debian Developer machine running Debian 9, for real.

After sometime without looking into this problem, I decided to do another try. I do not found a way to do a complex crossgrade of my desktop without massively removing packages. And there are bug and bug that require to edit the config scripts of the packages.

So here is my another try to do a crossgrade of my desktop, this time for real.

apt-get update
apt-get upgrade
apt-get autoremove
apt-get clean
dpkg --list > original.dpkg
apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64 bash:amd64 dash:amd64 init:amd64 mawk:amd64
for pack32 in $(grep i386 original.dpkg | egrep "^ii " | awk '{print $2}' ) ; do 
  echo $pack32 ; 
  apt-get --download-only install -y --allow-remove-essential ${pack32%:i386}:amd64 ; 
done
cd /var/cache/apt/archives/
dpkg --install libacl1_*amd64.deb libattr1_*_amd64.deb libapt-pkg5.0_*amd64.deb libbz2-1.0_*amd64.deb dpkg_*amd64.deb tar_*amd64.deb apt_*amd64.deb bash_*amd64.deb dash_*amd64.deb 
dpkg --install --skip-same-version *.deb
dpkg --configure --pending
dpkg --install --skip-same-version *.deb
dpkg --remove libcurl4-openssl-dev:i386
dpkg --configure --pending
dpkg --remove libkdesu5 kde-runtime
apt-get --fix-broken install
apt-get install  $(egrep "^ii"  ~/original.dpkg | grep -v ":i386" | grep -v "all" | grep -v "aiccu" | grep -v "acroread" | grep -v "flashplayer-mozilla" | grep -v "flash-player-properties" | awk '{print $2}')

Reboot.

Then the system failed to boot, missing lvm2 package.

Boot with a live CD.

sudo -i
mount /dev/sdc2         /mnt
mount /dev/vg100/usr /mnt/usr
mount /dev/vg100/var /mnt/var
mount -o bind /proc    /mnt/proc
mount -o bind /sys     /mnt/sys
mount -o bind /dev/    /mnt/dev
mount -o bind /dev/pts  /mnt/dev/pts
chroot /mnt /bin/su -
apt-get install lvm2
exit
reboot

Still somethings do not work, like command fakeroot.

for pack32 in $(grep i386 original.dpkg  | egrep "^ii " | awk '{print $2}' ) ; do     
  echo $pack32 ;     
  if dpkg --status $pack32 | grep -q "Multi-Arch: same" ; then       
    apt-get -y install ${pack32%:i386}:amd64 ;     
  fi ;   
done

for pack32 in $(grep i386 original.dpkg  | egrep "^ii " | awk '{print $2}' ) ; do     
  echo $pack32 ;     
  apt-get -y install ${pack32%:i386}:amd64 ;     
done

Now is time to find what still does not work and how to solve it.

Sunday, 16 July, 2017

Crossgrading a complex Desktop and Debian Developer machine running Debian 9

This article is an experiment in progress, please recheck, while I am updating with the new information.

I have a very old installation of Debian, possibly since v2, dot not remember, that I have upgraded since then both in software and hardware. Now the hardware is 64bits, runs a kernel of 64bits but the run-time is still 32bits. For 99% of tasks this is very good. Now that I have made many simulations I may have found a solution to do a crossgrade of my desktop. I write here the tentative procedure and I will update with more ideias on the problems that I may found.

First you need to install a 64bits kernel and boot with it. See my previous post on how to do it.

Second you need to do a bootstrap of crossgrading and the instalation of all the libs as amd64:

 apt-get update
 apt-get upgrade
 apt-get clean
 dpkg --list > original.dpkg
 apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64 bash:amd64 dash:amd64 init:amd64 mawk:amd64
 cd /var/cache/apt/archives/
 dpkg --install dpkg_*amd64.deb tar_*amd64.deb apt_*amd64.deb bash_*amd64.deb dash_*amd64.deb *.deb
 dpkg --configure --pending
 dpkg -i --skip-same-version dpkg_*_amd64.deb apt_*_amd64.deb bash_*_amd64.deb dash_*_amd64.deb mawk_*_amd64.deb *.deb
 
 for pack32 in $(grep i386 original.dpkg  | egrep "^ii " | awk '{print $2}' ) ; do 
   echo $pack32 ; 
   if dpkg --status $pack32 | grep -q "Multi-Arch: same" ; then 
     apt-get --download-only install -y --allow-remove-essential ${pack32%:i386}:amd64 ; 
   fi ; 
 done

 dpkg --install /var/cache/apt/archives/*_amd64.deb
 dpkg --install /var/cache/apt/archives/*_amd64.deb
 dpkg --print-architecture
 dpkg --print-foreign-architectures

But this procedure does not prevent the "apt-get install" to have broken dependencies.

So trying to install the core packages and the libraries using "dpkg -i".

apt-get update
apt-get upgrade
apt-get autoremove
apt-get clean
dpkg --list > original.dpkg
apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64 bash:amd64 dash:amd64 init:amd64 mawk:amd64
for pack32 in $(grep i386 original.dpkg | egrep "^ii " | awk '{print $2}' ) ; do 
  echo $pack32 ; 
  if dpkg --status $pack32 | grep -q "Multi-Arch: same" ; then 
    apt-get --download-only install -y --allow-remove-essential ${pack32%:i386}:amd64 ; 
  fi ; 
done
cd /var/cache/apt/archives/
dpkg --install dpkg_*amd64.deb tar_*amd64.deb apt_*amd64.deb bash_*amd64.deb dash_*amd64.deb *.deb
dpkg --configure --pending
dpkg --install --skip-same-version dpkg_*_amd64.deb apt_*_amd64.deb bash_*_amd64.deb dash_*_amd64.deb mawk_*_amd64.deb *.deb

dpkg --remove libcurl4-openssl-dev
dpkg -i libcurl4-openssl-dev_*_amd64.deb

Remove packages until all there is no brokens packages

dpkg --print-architecture
dpkg --print-foreign-architectures
apt-get --fix-broken --allow-remove-essential install

Still broken, because apt-get removed dpkg

So instead of only installing the libs with dpkg -i, I am going to try to install all the packages with dpkg -i:

apt-get update
apt-get upgrade
apt-get autoremove
apt-get clean
dpkg --list > original.dpkg
apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64 bash:amd64 dash:amd64 init:amd64 mawk:amd64
for pack32 in $(grep i386 original.dpkg | egrep "^ii " | awk '{print $2}' ) ; do 
  echo $pack32 ; 
  apt-get --download-only install -y --allow-remove-essential ${pack32%:i386}:amd64 ; 
done
cd /var/cache/apt/archives/
dpkg --install dpkg_*amd64.deb tar_*amd64.deb apt_*amd64.deb bash_*amd64.deb dash_*amd64.deb *.deb
dpkg --configure --pending
dpkg --install --skip-same-version dpkg_*_amd64.deb apt_*_amd64.deb bash_*_amd64.deb dash_*_amd64.deb mawk_*_amd64.deb *.deb
dpkg --configure --pending

Remove packages and reinstall selected packages until you fix all off them. Follow the trial for my machine:

dpkg --remove rkhunter
dpkg --remove libmarco-private1:i386 marco mate-control-center mate-desktop-environment-core mate-desktop-environment-core  mate-desktop-environment mate-desktop-environment-core mate-desktop-environment-extras
dpkg --remove libmate-menu2:i386 libmate-window-settings1:i386 mate-panel mate-screensaver python-mate-menu libmate-slab0:i386 mozo mate-menus
dpkg --remove libmate-menu2:i386 mate-panel python-mate-menu mate-applets mate-menus
dpkg -i libmate-menu2_1.16.0-2_amd64.deb
dpkg --remove  gir1.2-ibus-1.0:i386 gnome-shell gnome-shell-extensions gdm3 gnome-session
dpkg --remove  gir1.2-ibus-1.0:i386
dpkg --remove libmateweather1:i386
dpkg -i libmateweather1_1.16.1-2_amd64.deb

apt-get --fix-broken --download-only install
dpkg --skip-same-version --install dpkg_*amd64.deb tar_*amd64.deb apt_*amd64.deb bash_*amd64.deb dash_*amd64.deb *.deb
dpkg --configure --pending
dpkg -i python_2.7.13-2_amd64.deb
dpkg --configure --pending
dpkg -i perl_5.24.1-3+deb9u1_amd64.deb perl-base_5.24.1-3+deb9u1_amd64.deb
dpkg -i exim4-daemon-light_4.89-2+deb9u1_amd64.deb exim4-base_4.89-2+deb9u1_amd64.deb
dpkg -i libuuid-perl_0.27-1_amd64.deb
dpkg --configure --pending
dpkg --install gstreamer1.0-plugins-bad_1.10.4-1_amd64.deb libmpeg2encpp-2.1-0_1%3a2.1.0+debian-5_amd64.deb libmplex2-2.1-0_1%3a2.1.0+debian-5_amd64.deb
dpkg --configure --pending
dpkg --audit

Now fixing broken dependencies on apt-get. Found no other way than removing all the broken packages.

dpkg --remove $(apt-get --fix-broken install | cut -f 2 -d ' ' )
apt-get install $(grep -v ":i386" ~/original.dpkg | egrep "^ii" | grep -v "aiccu" | grep -v "acroread" | grep -v "flash-player-properties" | grep -v "flashplayer-mozilla" | egrep -v "tp-flash-marillat" | awk '{print $2}')

Thursday, 13 July, 2017

Crossgrading a more typical server in Debian9

First you need to install a 64bits kernel and boot with it. See my previous post on how to do it.

Second you need to do a bootstrap of crossgrading:

 apt-get clean
 apt-get upgrade
 apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64 bash:amd64 dash:amd64 init:amd64 mawk:amd64
 dpkg --install /var/cache/apt/archives/*_amd64.deb
 dpkg --install /var/cache/apt/archives/*_amd64.deb
 dpkg --print-architecture
 dpkg --print-foreign-architectures

Third, do a crossgrade of the libraries:

 dpkg --list > original.dpkg
 apt-get --fix-broken --allow-remove-essential install
 for pack32 in $(grep :i386 original.dpkg | awk '{print $2}' ) ; do 
   if dpkg --status $pack32 | grep -q "Multi-Arch: same" ; then 
     apt-get install --yes --allow-remove-essential ${pack32%:i386} ; 
   fi ; 
 done

Forth, do a full crossgrade:

 if ! apt-get install --allow-remove-essential $(grep :i386 original.dpkg | awk '{print $2}' | sed -e s/:i386//) ; then
   apt-get --fix-broken --allow-remove-essential install
   apt-get install --allow-remove-essential $(grep :i386 original.dpkg | awk '{print $2}' | sed -e s/:i386//)
 fi

Wednesday, 12 July, 2017

Crossgrading a minimal install of Debian 9

By testing the previous instructions for a full crosgrade I run into trouble. Here is the results of my tests to do a full crossgrade of a minimal installation of Debian inside a VM.

First you need to install a 64bits kernel and boot with it. See my previous post on how to do it.

Second you need to do a bootstrap of crossgrading:

 apt-get clean
 apt-get upgrade
 apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64 bash:amd64 dash:amd64 init:amd64
 dpkg --install /var/cache/apt/archives/*_amd64.deb
 dpkg --install /var/cache/apt/archives/*_amd64.deb
 dpkg --print-architecture
 dpkg --print-foreign-architectures
 apt-get --fix-broken --allow-remove-essential install

Third do a full crossgrade:

 apt-get install --allow-remove-essential $(dpkg --list | grep :i386 | awk '{print $2}' | sed -e s/:i386// )

This procedure seams to be a little fragile, but worked most of the time for me.

Crossgrading the kernel in Debian 9

I have a very old installation of 32bits Debian running in new hardware. Until now running a 64bits kernel was enough to use efficiently more than 4GiB of RAM. The only problem I found was the proprietary drivers from AMD/ATI and NVIDIA, that did not like this mixed environment and some problems with openafs, easilly solved with the help of the package maintainers of openafs. Crossgrading the Qemu/KVM to 64 bits did not pose a problem, so I have been running 64bits VMs for some time.

But now the nouveau driver do not work with my new display adapter and I need to run tools from OpsCode not available as 32bits. So is time to do a CrossGrade. Finding some problems I can not recommend it to the inexperienced people. Is time investigate the issues and report bugreports to Debian were appropriate.

If you run 32bits Debian installation you can easily install a 64bits kernel . The procedure is simple and well tested.

dpkg --add-architecture amd64
apt-get update
apt-get install linux-image-amd64:amd64

And reboot to test the new kernel.

You can expect here more articles about crossgrading.

Tuesday, 25 October, 2016

New packages for Amanda on the works

Because of the upgrade of perl, amanda is currently broken on testing and unstable on Debian. The problem is known and I am working with my sponsor to create new packages to solve the problem. Please hang a little more.

Saturday, 20 August, 2016

Availabilty of at at the Major Linux Distributions

In this blog post I will cover what versions of software at is used by the leading Linux Distributions as reported by LWN.

Also

Currently some distributions are lagging on the use of the latest at software.

- page 1 of 4