From 75f1f4860c4005d705de443802ec7bac30d68465 Mon Sep 17 00:00:00 2001 From: Andrew Shark Date: Thu, 13 Jun 2019 11:57:54 +0300 Subject: [PATCH] added unpack deb script; synchronized development state that was on a 19.10-test branch --- gen-PKGBUILD.py | 57 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/gen-PKGBUILD.py b/gen-PKGBUILD.py index a3643a4..4501948 100644 --- a/gen-PKGBUILD.py +++ b/gen-PKGBUILD.py @@ -833,26 +833,31 @@ def gen_arch_packages(): "all": "any" } -# To see list of uniq licences files and packages that uses them, I used this: - # tmpdir=tmpdir; rm -rf "$tmpdir"; mkdir "$tmpdir"; - # for file in $(ls *deb); +# For more convenient development, I (Ashark) have unpackaed all deb packages. For this I did: + # tmpdir=unpacked_debs; rm -rf "$tmpdir"; mkdir "$tmpdir"; + # for file in $(ls *deb); # amdgpu_19.20-812932_amd64.deb # # do - # cd "$tmpdir" - # ar x ../$file data.tar.xz - # files=$(tar -tf data.tar.xz) - # if [[ $files != "" ]]; then - # tar -xvf data.tar.xz ./usr/share/doc; - # rm data.tar.xz; - # fi - # files=""; cd .. - # done + # echo processing $file + # cd "$tmpdir"; mkdir $file; cd $file + # ar x ../../$file + # rm debian-binary + # tar -xf control.tar.xz; rm control.tar.xz; + # tar -xf data.tar.xz; rm data.tar.xz; # - # cd tmpdir/usr/share/doc - # rm list_tmp - # for dir in $(ls -d *); do - # md5sum $dir/copyright >> list_tmp + # find usr/share/doc -type f -name 'copyright' -exec mv {} . \; + # find usr/share/doc -type f -name "changelog.Debian.gz" -exec mv {} . \; + # + # find . -type d -empty -delete + # + # cd ../.. # done - # cat list_tmp | sort + + +# To see list of uniq licences files and packages that uses them, I used this: + # cd unpacked_debs + # for dir in $(ls -d *); do + # md5sum $dir/copyright + # done | sort # Then I mapped each copyright hash to its short licence name: licenses_hashes_map = { @@ -911,6 +916,20 @@ def hashFile(file): #sources.append("20-amdgpu.conf") #sha256sums.append(hashFile("20-amdgpu.conf")) +# To see transaction scripts of debian packages I (Ashark) used this: + # cd unpacked_debs + # rm *.install_scripts.sh + # for dir in $(ls); do + # for file in postinst preinst prerm; do + # if [ -f $dir/$file ]; then + # file_md5=$(md5sum $dir/$file) + # echo -e "# $file_md5" >> $dir.install_scripts.sh + # cat $dir/$file >> $dir.install_scripts.sh + # fi + # done + # done +# After that its needed to carefully convert them to pacman .install files or hooks + # All (except two) libs debian packages have just ldconfig awaiting trigger. # To check this I (Ashark) used the following: #cd unpacked_debs @@ -927,9 +946,9 @@ def hashFile(file): #cd .. #done # Two exceptions are: - #libgl1-amdgpu-mesa-dri_18.3.0-785425_amd64.deb + #libgl1-amdgpu-mesa-dri_18.3.0-812932_amd64.deb #interest /usr/lib/x86_64-linux-gnu/dri - #libgl1-amdgpu-mesa-dri_18.3.0-785425_i386.deb + #libgl1-amdgpu-mesa-dri_18.3.0-812932_i386.deb #interest /usr/lib/i386-linux-gnu/dri # They are triggered when files are changed in interest path. I (Ashark) created corresponding alpm hooks.