From 741f48c71b98645d5d3b63f9d3502c8144e5331c Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Sat, 19 Aug 2023 19:54:58 -0400 Subject: handle dpkg-gensymbols problem --- .gitignore | 1 + deploy-to-obs.sh | 22 +++++++++++++--------- get-latest-versions.sh | 2 +- gtk-classic-build-deb.sh | 15 ++++++++++++--- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 012c165..c84e57d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ gtk3classic/ *.deb *.udeb gtk+-*/ +debian/ diff --git a/deploy-to-obs.sh b/deploy-to-obs.sh index 25ef954..e0ddd87 100755 --- a/deploy-to-obs.sh +++ b/deploy-to-obs.sh @@ -19,12 +19,16 @@ dsc_file="$( find . -maxdepth 1 -name 'gtk+3.0_*dsc' -printf '%T@ %f\n' | sort - debian_tar_file="$( find . -maxdepth 1 -name 'gtk+3.0_*debian*z' -printf '%T@ %f\n' | sort -n -k1 | awk '{print $NF}' | tail -n1 | cut -d' ' -f2 )" # prep obs -cd "${obsdir}" -osc up -osc rm * -cd "${projectdir}" -cp -p "${dsc_file}" "${debian_tar_file}" "${tf}" "${obsdir}/" -cd "${obsdir}" -find . -mindepth 1 -maxdepth 1 ! -name '.osc' ! -name "${dsc_file}" ! -name "${debian_tar_file}" ! -name "${tf}" -delete -osc add * -osc commit # will prompt for commit name +if ! cd "${obsdir}" ; +then + printf "%s\n" "Fatal! This depends on ${obsdir} being prepared first with \`cd ~/dev/osc ; osc checkout home:bgstack15:gtk3-classic gtk3-classic\`" 1>&2 +else + osc up + osc rm * + cd "${projectdir}" + cp -p "${dsc_file}" "${debian_tar_file}" "${tf}" "${obsdir}/" + cd "${obsdir}" + find . -mindepth 1 -maxdepth 1 ! -name '.osc' ! -name "${dsc_file}" ! -name "${debian_tar_file}" ! -name "${tf}" -delete + osc add * + osc commit # will prompt for commit name +fi diff --git a/get-latest-versions.sh b/get-latest-versions.sh index 62c14d8..64d7076 100755 --- a/get-latest-versions.sh +++ b/get-latest-versions.sh @@ -3,7 +3,7 @@ oldx="$( printf %s\\n "$-" | grep -q -e 'x' && echo YES )" set +x # hide this cruft test -z "${WORKDIR}" && WORKDIR="$( readlink -f . )" export WORKDIR -RAW_DEB="$( rmadison gtk+3.0 | awk -F='|' '{gsub(" ","");print $2,$2,$3}' | awk '{gsub("-[0-9]+","",$1);print}' | sort -r --sort=version | grep -v debug | head -n1)" +RAW_DEB="$( rmadison gtk+3.0 | awk -F'|' '{gsub(" ","");print $2,$2,$3}' | awk '{gsub("-[0-9]+","",$1);print}' | sort -r --sort=version | grep -v debug | head -n1)" RAW="$( echo "${RAW_DEB}" | awk '{print $1}' )" DEB="$( echo "${RAW_DEB}" | awk '{print $2}' )" if ! test "$( cd "${WORKDIR}/gtk3classic" 2>/dev/null && git remote -v | grep -o 'origin https://github.com/lah7/gtk3-classic' | head -n1 )" = "origin https://github.com/lah7/gtk3-classic" ; then diff --git a/gtk-classic-build-deb.sh b/gtk-classic-build-deb.sh index ed9ff3a..86c93f9 100755 --- a/gtk-classic-build-deb.sh +++ b/gtk-classic-build-deb.sh @@ -8,7 +8,8 @@ # Purpose: combine gtk+3.0 from debian and gtk3-classic into a .deb suite for Devuan Ceres # History: # 2023-01-11 switch package release to stackrpms -# 2023-08-19 support gtk3-classic upstream +# 2023-05-26 add 3.24.38 env var +# 2023-08-19 support gtk3-classic upstream with sub-version numbers that come after a dash # Usage: # make # References: @@ -55,7 +56,7 @@ else echo "${classic_vers}" > "${WORKDIR}/classic_vers" #### Find versions of gtk+3.0 available to debian - debian_vers="$( rmadison gtk+3.0 | awk -F='|' '{gsub(" ","");print $2,$2,$3}' | awk '{gsub("-[0-9]+","",$1);print}' | sort -r --sort=version | grep -v debug )" + debian_vers="$( rmadison gtk+3.0 | awk -F'|' '{gsub(" ","");print $2,$2,$3}' | awk '{gsub("-[0-9]+","",$1);print}' | sort -r --sort=version | grep -v debug )" echo "${debian_vers}" > "${WORKDIR}/debian_vers" #### Find highest matching version @@ -65,12 +66,16 @@ else deb_version="$( echo "${highest_ver}" | awk '{print $2}' )" classic_version="${raw_version}" # so now check if there are "3.24.38-4" dash number version tags in the classic repo. This is bad form, but who am I to correct such venerable people? + sub_version=1 highest_raw_sub_version="$( grep -e "^${raw_version}" "${WORKDIR}/classic_vers" | head -n1 )" + echo "${highest_raw_sub_version}" | grep -q -e '-' && sub_version="$( echo "${highest_raw_sub_version}" | awk -F'-' '{print $2}' )" + sub_version=$(( sub_version + 100 )) classic_version="${highest_raw_sub_version}" # and $3 is the distro name like "experimental" which is not needed. echo "Found highest version: ${highest_ver}" echo "and will use highest classic sub-version ${highest_raw_sub_version}" + echo "will use release number ${sub_version}" fi #### Fetch debian sources @@ -93,7 +98,7 @@ cd "${WORKDIR}/gtk+-${raw_version}" tar -Jxf "${WORKDIR}/gtk+3.0_${deb_version}.debian.tar.xz" mv debian/changelog debian/changelog.orig { - echo "gtk+3.0 (${raw_version}-101+stackrpms) obs; urgency=medium" + echo "gtk+3.0 (${raw_version}-${sub_version}+stackrpms) obs; urgency=medium" echo "" echo " * Rebuild gtk3 with gtk3-classic patches" echo " * Add filechooser-icon-view from dudemanguy" @@ -124,6 +129,10 @@ case "${raw_version}" in sed -r -i 's/(appearance__smaller-statusbar.patch|file-chooser__places-sidebar.patch)//g;' debian/patches/series sed -i -r debian/rules -e '2aDEB_BUILD_OPTIONS := nocheck' ;; + 3.24.38) + # suppress "dpkg-gensymbols: error: some new symbols appeared in the symbols file" about new symbols related to show_mount_eject. + sed -i -r debian/rules -e '2aexport DPKG_GENSYMBOLS_CHECK_LEVEL=1' + ;; esac #### Build .dsc and tarballs for OBS -- cgit