Skip to content

Commit

Permalink
added unpack deb script; synchronized development state that was on a…
Browse files Browse the repository at this point in the history
… 19.10-test branch
  • Loading branch information
Ashark committed Jun 13, 2019
1 parent 31fa6d0 commit 75f1f48
Showing 1 changed file with 38 additions and 19 deletions.
57 changes: 38 additions & 19 deletions gen-PKGBUILD.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand All @@ -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.

Expand Down

0 comments on commit 75f1f48

Please sign in to comment.