lots of updates, some t11 stuff
[distro-setup] / distro-end
index e8e3ee031cf620ca9823a1c379a8d2cf9865a5b4..54321bf0533bd51bed00e707a5ab022102c21eba 100755 (executable)
@@ -43,7 +43,7 @@ end() {
 }
 pre="${0##*/}:"
 sudo() {
-  printf "$pre %s\n"  "$*"
+  printf "$pre sudo %s\n"  "$*"
   SUDOD="$PWD" command sudo "$@";
 }
 m() { printf "$pre %s\n"  "$*"; "$@"; }
@@ -155,10 +155,12 @@ esac
 # fi
 
 
+
+
 pi debootstrap
 ######### begin universal pinned packages ######
 case $(debian-codename) in
-  nabia|etiona|flidas)
+  etiona|flidas|nabia|aramo)
     sudo rm -fv /etc/apt/preferences.d/etiona-buster
     sd /etc/apt/preferences.d/trisquel-debian <<EOF
 Explanation: Debian* includes Debian + Debian Backports
@@ -340,29 +342,14 @@ EOF
 
 
     ;;&
-  nabia|etiona)
+  aramo|nabia|etiona)
     # for ziva
     #p install --no-install-recommends minetest/buster libleveldb1d/buster libncursesw6/buster libtinfo6/buster
     doupdate=false
-    for n in buster bullseye; do
+    for n in bullseye; do
       f=/etc/apt/sources.list.d/$n.list
       t=$(mktemp)
       case $n in
-        buster)
-          cat >$t <<'EOF'
-deb http://http.us.debian.org/debian buster main
-deb-src http://http.us.debian.org/debian buster main
-
-deb http://security.debian.org/ buster/updates main
-deb-src http://security.debian.org/ buster/updates main
-
-deb http://http.us.debian.org/debian buster-updates main
-deb-src http://http.us.debian.org/debian buster-updates main
-
-deb http://http.debian.net/debian buster-backports main
-deb-src http://http.debian.net/debian buster-backports main
-EOF
-          ;;
         bullseye)
           cat >$t <<'EOF'
 EOF
@@ -484,6 +471,34 @@ Pin: release n=bionic,o=Ubuntu
 Pin-Priority: -100
 EOF
 
+    ;;&
+  nabia)
+    sd /etc/apt/preferences.d/aramo-nabia <<'EOF'
+Package: *
+Pin: release n=aramo*,o=Trisquel
+Pin-Priority: -100
+EOF
+    f=/etc/apt/sources.list.d/aramo.list
+    t=$(mktemp)
+    cat >$t <<'EOF'
+deb http://mirror.fsf.org/trisquel/ aramo main
+deb-src http://mirror.fsf.org/trisquel/ aramo main
+
+deb http://mirror.fsf.org/trisquel/ aramo-updates main
+deb-src http://mirror.fsf.org/trisquel/ aramo-updates main
+
+deb http://archive.trisquel.info/trisquel/ aramo-security main
+deb-src http://archive.trisquel.info/trisquel/ aramo-security main
+
+# Uncomment this lines to enable the backports optional repository
+deb http://mirror.fsf.org/trisquel/ aramo-backports main
+deb-src http://mirror.fsf.org/trisquel/ aramo-backports main
+EOF
+    if ! diff -q $t $f; then
+      sudo dd if=$t of=$f 2>/dev/null
+      p update
+    fi
+
     ;;&
   *)
     if isdeb; then
@@ -492,7 +507,11 @@ EOF
     ;;
 esac
 
-
+case $codename_compat in
+  jammy)
+    s systemctl enable ssh-agent-iank
+    ;;
+esac
 
 case $codename_compat in
   focal)
@@ -533,6 +552,14 @@ EOF
 Package: chromium chromium-* libicu67 libjpeg62-turbo libjsoncpp24 libre2-9 libwebpmux3
 Pin: release o=Debian*,n=bullseye
 Pin-Priority: 500
+EOF
+    ;;
+  aramo)
+    # obs dependency not in trisquel
+    sd /etc/apt/preferences.d/obs <<EOF
+Package: libfdk-aac2
+Pin: release n=jammy,o=Ubuntu
+Pin-Priority: 500
 EOF
     ;;
 esac
@@ -784,14 +811,25 @@ EOF
 # https://radicale.org/2.1.html
 #https://httpd.apache.org/docs/2.4/mod/mod_authn_core.html#authtype
 # https://stackoverflow.com/questions/5011102/apache-reverse-proxy-with-basic-authentication
-<Location /radicale/>
-  Options +FollowSymLinks +Multiviews +Indexes
+
+# this doesn't exactly fit with the documentation.
+# We need location / to do an auth, it cant be done outside,
+# in order to pass on X-Remote-User. And we need
+# the other location in order to remove the /radicale/ for
+# requests which have it. This could be done with a rewrite,
+# but i just get something working and call it a day.
+
+<Location "/">
   AllowOverride None
-  AuthType basic
+  AuthType Basic
   AuthName "Authentication Required"
   # setup one time, with root:www-data, 640
   AuthUserFile "/etc/caldav-htpasswd"
   Require valid-user
+  RequestHeader    set X-Remote-User expr=%{REMOTE_USER}
+</Location>
+<Location "/radicale/">
+  Options +FollowSymLinks +Multiviews -Indexes
   RequestHeader    set X-Script-Name /radicale/
   RequestHeader    set X-Remote-User expr=%{REMOTE_USER}
   ProxyPass  "http://10.8.0.4:5232/" retry=0
@@ -974,6 +1012,10 @@ EOF
     # and choose lightdm.
     #
     ;;
+  jammy)
+    # not yet bothering with mate
+    pi lightdm-gtk-greeter
+    ;;
 esac