You are not logged in.

#1 2023-11-28 17:36:25

delmadord
Member
Registered: 2015-03-22
Posts: 14

Amazon Schema Conversion Tool for AUR

Hello, I would like to create AUR package for https://aws.amazon.com/dms/schema-conversion-tool/

There is DEB and RPM package for download, bundled as ZIP file at the bottom of that page.

I tried to downloading it, unzipping and applying `debtap -p aws-schema-conversion-tool-1.0.674.deb` to it, which generated basically an empty .install file and the following PKGBUILD file:

# Generated by debtap
# Maintainer: aws-sct
# Contributor: aws-sct
pkgname=aws-schema-conversion-tool
pkgver=1.0.674
pkgrel=1
pkgdesc="AWS Schema Conversion Tool."
arch=('i686' 'x86_64')
url=""
license=('')
groups=('')
depends=('alsa-lib' 'gephi' 'libbsd' 'libx11' 'libxau' 'libxcb' 'libxdmcp' 'libxext' 'xdg-utils')
options=('!strip' '!emptydirs')
install=${pkgname}.install
source_i686=("PUT_FULL_URL_FOR_DOWNLOADING_i386_DEB_PACKAGE_HERE")
source_x86_64=("PUT_FULL_URL_FOR_DOWNLOADING_amd64_DEB_PACKAGE_HERE")
sha512sums_i686=('PUT_SHA512SUM_OF_i386_DEB_PACKAGE_HERE')
sha512sums_x86_64=('899e271f581befd3af2b11219bb355447c954dffbb9cd2c78f074f468f7e99b2edc51a3132bd3571d8c988cb84807396a92be4f2c88cd1ddc1d67bd6d1154fe5')

package(){

	# Extract package data
	tar -xJ -f data.tar.xz -C "${pkgdir}"

	install -D -m644 "opt/aws-schema-conversion-tool/lib/runtime/legal/jdk.zipfs/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -D -m644 "opt/aws-schema-conversion-tool/share/doc/copyright" "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"

}

This is obviously lacking, because I had to do the unzip, apart from other possible problems.

I suspect there are multiple packages already that do the same (download ZIP, convert DEV, install resulting ZST), so maybe just pointing me out to the right direction would let me move further up to a point of publishing a working PKGBUILD to AUR.

Thanks!

Offline

#2 2023-11-28 21:44:10

yochananmarqos
Member
Registered: 2020-02-05
Posts: 198

Re: Amazon Schema Conversion Tool for AUR

Never use debtap or any other tools that claim to magically create a PKGBUILD. They are always wrong. Always.

It doesn't even apply here, anyway. You downloaded the ZIP and examined the contents, right?

Converting a DEB or RPM to an Arch package is mainly a practice of taking it apart and putting it back together again.

FYI, for anyone curious, before you bother downloading the ZIP to peek, know that it's 1.2 GB.

Last edited by yochananmarqos (2023-11-28 21:50:52)

Offline

#3 2023-11-28 22:04:47

delmadord
Member
Registered: 2015-03-22
Posts: 14

Re: Amazon Schema Conversion Tool for AUR

I just used magic tool to at least understand what could I start doing, I really did not want to blindly use it. But I still do not understand the "extracting and putting it back together steps".

If I wanted to look at another PKGBUILD that does this with zipped .deb archive, how would I filter out such packages, if such a practice would be a good starting point, please?

Offline

#4 2023-11-29 12:04:58

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,958

Re: Amazon Schema Conversion Tool for AUR

Many of the 5k+ *-bin packages in AUR do that, but I don't use them and can't find a good example.

pacman has no problem extracting zip-files, but .deb-files are archives themselves and can't be handled automatically .

https://linuxconfig.org/how-to-extract- … rchive-deb has useful info .

all .deb-files have 3 files in them :
debian-binary
control.tar.xz (xz is common but can also be gz, bz2, zstd or other compression methods)
data.tar.xz

No idea what debian-binary is for, but it doesn't matter for an archlinux package.
control.tar.* holds rules that are used by debhelper to install things according to debian rules. Useless on archlinux.
data.tar.* : this is what you want/need .

extract the contents of data.tar.* in prepare() function .

If the folder structure doesn't match the one used by archlinux, correct it in package() function .
example : debian uses /bin & /sbin as folders whereas they are symlinks to /usr/bin on archlinux .
files in those folders in data.tar.* need to be moved to the locations in $pkgdir where archlinux expects them.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2023-11-29 12:13:37

delmadord
Member
Registered: 2015-03-22
Posts: 14

Re: Amazon Schema Conversion Tool for AUR

Thanks, this is a very good starting point, now I have a much clearer way of what needs to be done! Will post update in about a week hopefully

Offline

#6 2023-11-30 15:16:28

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Amazon Schema Conversion Tool for AUR

Just a minor point: tar is in gnutar under Arch Linux, an gnu tar is not in base-devel, and so would need to be added to the makeps-array. If you use bsdtar for unpacking, you could avoid this makedep.

Offline

Board footer

Powered by FluxBB