minor fix
authorIan Kelling <ian@iankelling.org>
Tue, 12 Nov 2024 04:58:09 +0000 (23:58 -0500)
committerIan Kelling <ian@iankelling.org>
Tue, 12 Nov 2024 04:58:09 +0000 (23:58 -0500)
distro-end

index 4e82b5c9b7ffac1e2da50d747e4f9c093fc5bfbe..a63fef617f7cad5dd25a423084ae837f607ba58f 100755 (executable)
@@ -69,6 +69,32 @@ sudo() {
 }
 m() { printf "$pre %s\n"  "$*"; "$@"; }
 e() { printf "$pre %s\n"  "$*"; }
+
+dummy-pkg() {
+  ver="$1"
+  pkg="$2"
+  if ! pcheck $pkg; then
+    return 0
+  fi
+  tmpdir="$(mktemp -d)"
+  # it puts the deb in .., so use a subdir to stay contained
+  mkdir $tmpdir/sub
+  cd "$tmpdir/sub"
+  # edited from output of equivs-control ubuntu-system-adjustments
+  cat >$pkg <<EOF
+Section: misc
+Priority: optional
+Version: $ver
+Standards-Version: 3.9.2
+Package: $pkg
+Description: $pkg-dummy
+EOF
+  equivs-build $pkg
+  sudo dpkg -i /tmp/user/1000/${pkg}_${ver}_all.deb
+  cd
+  rm -r "$tmpdir"
+}
+
 distro=$(distro-name)
 codename=$(debian-codename)
 codename_compat=$(debian-codename-compat)
@@ -732,7 +758,7 @@ esac
 
 ### system76 things ###
 case $HOSTNAME in
-  bo) # sy|  sy doesnt seem to really need this.
+  bo|so) # sy|  sy doesnt seem to really need this.
     # note, i stored the initial popos packages at /a/bin/data/popos-pkgs
     if [[ ! -e /etc/apt/sources.list.d/system76.list ]]; then
       # https://blog.zackad.dev/en/2017/08/17/add-ppa-simple-way.html
@@ -755,6 +781,16 @@ EOF
       # says I have 3 "devices with no available firmware updates"
       # if there were updates, install with: s fwupdmgr update
 
+      # system76's systemd package adds chrony as a dependency,
+      # apparently solely because they prefer it over systemd-timesyncd,
+      # which is a recommends. And then chrony conflicts with ntp. What
+      # a stupid thing to do. 4.5.1 because it is > current candidate
+      # 4.5-1ubuntu4.1
+      dummy-pkg 4.5.1 chrony
+
+      # On first install, we will need to allow downgrade, at least
+      # since trisquel package version suffixes are considered higher
+      # version numbers.
       check_downgrade=false
       if [[ ! -e /etc/apt/preferences.d/system76-apt-preferences ]]; then
         check_downgrade=true
@@ -942,7 +978,6 @@ if [[ $codename_compat == flidas ]]; then
   pi gnupg-doc
 fi
 
-
 case $distro in
   trisquel)
     case $codename in
@@ -959,28 +994,10 @@ case $distro in
   ubuntu)
     case $codename in
       noble)
-        if pcheck ubuntu-system-adjustments; then
-          # mint firefox has a dependency which is totally not really
-          # needed, just some mint branding and maybe a random firefox
-          # setting.
-          tmpdir="$(mktemp -d)"
-          # it puts the deb in .., so use a subdir to stay contained
-          mkdir $tmpdir/sub
-          cd "$tmpdir/sub"
-          # edited from output of equivs-control ubuntu-system-adjustments
-          cat >ubuntu-system-adjustments <<'EOF'
-Section: misc
-Priority: optional
-Version: 2030
-Standards-Version: 3.9.2
-Package: ubuntu-system-adjustments
-Description: ubuntu-system-adjustments-dummy
-EOF
-          equivs-build ubuntu-system-adjustments
-          sudo dpkg -i /tmp/user/1000/ubuntu-system-adjustments_2030_all.deb
-          cd
-          rm -r "$tmpdir"
-        fi
+        # mint firefox has a dependency which is totally not really
+        # needed, just some mint branding and maybe a random firefox
+        # setting.
+        dummy-pkg 2030 ubuntu-system-adjustments
         ;;
     esac
     pi firefox