You are not logged in.

#101 2016-05-18 03:44:28

mbo
Member
Registered: 2016-05-17
Posts: 7

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Hi helix
first of all thanks for the package, it is great!

I try to convert UniFi package for Ubiquiti wireless controller UniFi

I'm new to Linux so please bare with me.
I encounter problems with dependencies during conversion:

Warning: These dependencies (depend =   fields) could not be translated into Arch Linux packages names:
openjdk-6-jre-headless, openjdk-7-jre-headless
Warning: These replacements (replaces =   fields) could not be translated into Arch Linux packages names:
unifi-controller
Warning: These conflicts (conflict =   fields) could not be translated into Arch Linux packages names:
unifi-controller
Warning: These provisions (provides =   fields) could not be translated into Arch Linux packages names:
unifi-controller

My PKGI.NFO indicates:
PKGI.NFO:
pkgname = unifi
pkgver = 4.8.18-1
pkgdesc = Ubiquiti UniFi server is a centralized management system for UniFi suite of devices. After the UniFi server is installed, the UniFi controller $
url = http://www.ubnt.com/unifi
builddate = 1463538068
packager = unifi
arch = any
size = 88811829
license = GNU
replaces = unifi-controller
conflict = unifi-controller
provides = unifi-controller
depend = binutils
depend = coreutils
depend = java-jsvc
depend = jre8-openjdk-headless
depend = mongodb>=2.0.0
depend = openjdk-6-jre-headless
depend = openjdk-7-jre-headless

During install:

resolving dependencies...
warning: cannot resolve "openjdk-6-jre-headless", a dependency of "unifi"
warning: cannot resolve "openjdk-7-jre-headless", a dependency of "unifi"
:: The following package cannot be upgraded due to unresolvable dependencies:
      unifi

so I assume all went ok apart from openjdk-6-jre-headless and openjdk-7-jre-headless ?

How can I resolve that problem?
Thanks.

Last edited by mbo (2016-05-18 04:08:29)

Offline

#102 2016-05-18 03:59:21

helix
Member
Registered: 2013-02-17
Posts: 177

Re: Debtap - A script to convert .deb packages to Arch Linux packages

When it asks you to edit .PKGINFO, do it, remove the line with openjdk-6-jre-headless and replace openjdk-7-jre-headless with jre7-openjdk-headless, then save and exit.

Offline

#103 2016-05-18 04:10:23

mbo
Member
Registered: 2016-05-17
Posts: 7

Re: Debtap - A script to convert .deb packages to Arch Linux packages

helix wrote:

When it asks you to edit .PKGINFO, do it, remove the line with openjdk-6-jre-headless and replace openjdk-7-jre-headless with jre7-openjdk-headless, then save and exit.

Oh, that was quick smile
Will do, thanks a lot!

Offline

#104 2016-05-18 04:30:47

mbo
Member
Registered: 2016-05-17
Posts: 7

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Hi again,
the file was created with success smile
I run in problems during install thou:
(7/7) installing unifi                                                                       [######################################################] 100%
/etc/init.d/unifi: line 82: /lib/lsb/init-functions: No such file or directory
/etc/init.d/unifi: line 25: update-alternatives: command not found
/etc/init.d/unifi: line 36: update-alternatives: command not found
/etc/init.d/unifi: line 166: /lib/lsb/init-functions: No such file or directory
/etc/init.d/unifi: line 180: log_daemon_msg: command not found
/etc/init.d/unifi: line 172: start-stop-daemon: command not found
/etc/init.d/unifi: line 190: log_progress_msg: command not found
/etc/init.d/unifi: line 191: log_end_msg: command not found

Any tips on that one?
Thanks.

Offline

#105 2016-05-18 04:34:50

helix
Member
Registered: 2013-02-17
Posts: 177

Re: Debtap - A script to convert .deb packages to Arch Linux packages

These are debian specific files/services, see if it works, I have no other clue at the moment

Offline

#106 2016-05-18 05:04:19

mbo
Member
Registered: 2016-05-17
Posts: 7

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Unfortunately, it does not work.

Will need to run the program under windows.... which is a pity because my Arch PC runs 24/7.

Thanks for your help, I really appreciate this smile

Offline

#107 2016-05-18 05:10:31

mbo
Member
Registered: 2016-05-17
Posts: 7

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Last try... smile
I've found this info for debian install, should I follow this before install attempt? (I did not):

Now on to installing the UniFi software. First we will need to add the Ubiquiti source to our sources list.
This will tell Debian to look for packages available from Ubiquiti for installation. To edit the sources list,
open the sources.list file in Nano with the following command (as root user):
# nano /etc/apt/sources.list
Now add the following lines below the existing sources and save the changes:
# Ubiquiti UniFi updates
deb http://www.ubnt.com/downloads/unifi/distros/deb/debian debian ubiquiti
Next we will need to add the Ubiquiti GPG keys. Type the following commands as root user:
# apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
and
# apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
And finally we need to install the UniFi controller software. First we need to update our package
database again, which will now include the UniFi package information from Ubiquiti.
# apt-get update
And last but not least, installation of the actual UniFi package.
# apt-get install unifi

The UniFi controller software should now be accessible by visiting the following URL (replacing the IP
address with whatever you used):
https://192.168.1.15:8443

Thanks.

Offline

#108 2016-06-30 07:14:26

Taquito
Member
Registered: 2011-10-06
Posts: 5

Re: Debtap - A script to convert .deb packages to Arch Linux packages

helix wrote:

I wrote this script in my free time to help people who, for any reason, want to convert a .deb to an Arch Linux package. It works in a similar way with alien (which converts .deb packages to .rpm packages and vice versa), but, unlike alien, it is focused on accuracy of conversion, trying to translate Debian/Ubuntu packages names to the correct Arch Linux packages names and store them in the dependencies fields of the .PKGINFO metadata in the final package. In other words, it won't only create an Arch package with the data of the original .deb package, but also it will try to create a valid and as accurate as possible .PKGINFO metadata file in the converted package. It uses pkgfile and pacman utilities to achieve this accuracy. The final package can be installed like any local Arch Linux package. Debtap is now available on AUR!

Q: How do I use debtap?
A: The syntax is quite simple actually: debtap [option] package_filename
For example: debtap world-of-goo-demo_1.0_i386.deb

Any recommendations or questions for debtap are welcomed!

Helix thank you!!! I was struggling to find some up to date cnijfilter2 packages for my canon printer (the one in the repository is from last year). Found the tarballs at the canon web, and i was not able to install them and i was too lazy to look inside all folders with a .auto_configure.sh and try to fix them.
Now i know why! Downloaded the debs, used your debtap, and it give me the warning for missing dependencies of libcupsys2.  Googled around and found out that libcupsys2 is named lib32-libcups in arch repository. So all i had to do was: fire up debtap, insert the Packager Name, the license and edit the .PCKGBUILD to replace the missing dependency (lib32-libcups>=1.3.11-1). Thanks a lot. Saved me a lot of trouble.
So now i have these thanks to you:

  • cnijfilter2-5.00-1-i686.pkg.tar.xz

  • scangearmp2-3.00-1-i686.pkg.tar.xz

  • cnijfilter2-5.00-1-x86_64.pkg.tar.xz

  • scangearmp2-3.00-1-x86_64.pkg.tar.xz

x86_64 is all i needed but i wanted to try out the other ones. Thanks a lot.  big_smile

Last edited by Taquito (2016-06-30 09:31:46)

Offline

#109 2016-06-30 11:11:37

helix
Member
Registered: 2013-02-17
Posts: 177

Re: Debtap - A script to convert .deb packages to Arch Linux packages

You are welcome sir, glad I helped

Offline

#110 2016-07-10 21:52:13

Xyne
Administrator/TU
Registered: 2008-08-03
Posts: 6,861
Website

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Hi helix,

For the last few months I have been working on an extensible pacman wrapper named Pacboy that I have now uploaded for testing and development here. I came across debtap a while ago and made a note of it as a possible extension for building packages. Looking through the thread now, my understanding is that it takes individual .deb files and converts them to Arch Linux packages by generating a PKGBUILD. Do you think it would be possible and useful to use debtap to wrap existing .deb repositories transparently?

I am oblivious to the .deb ecosystem, which is why I'm asking.

Regards,
Xyne


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#111 2016-07-10 22:04:19

helix
Member
Registered: 2013-02-17
Posts: 177

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Hi Xyne, thank you for your notes

Right now debtap converts .deb packages directly to Arch Linux packages, it doesn't create a PKGBUILD yet, although it helps on writing one. In version 3.0 I'm going to add the option to create a PKGBUILD additionally with the converted package,

Regards,
Helix (George)

Offline

#112 2016-07-10 22:31:25

Xyne
Administrator/TU
Registered: 2008-08-03
Posts: 6,861
Website

Re: Debtap - A script to convert .deb packages to Arch Linux packages

I had assumed that it already generated the PKGBUILD from the extracted metadata. Thanks for the clarification. smile


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#113 2017-06-03 16:14:42

MichaelArtin
Member
Registered: 2017-06-03
Posts: 2

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Hi helix, first of all thanks for the program, it made work de .deb drivers provided for brother for my new printer.
By the way, t was quite complicated (for a noob like me) to debtap -u. I was having the 404 error, and i think this may be useful for you so i'll tell you what i did. This is the last version i could install from aur (2.8-1).
Executing line 43

  ubuntu_latest_stable_version=`curl -s https://packages.ubuntu.com | grep option | gawk -F '=' '{print $2}' | gawk '{print $1}' | grep -v option | tac | sed -n 3'{p;q;}' | sed s'/\("\|-updated\|-backports\)//g'` 

gave no problems to me, but next lines

      curl -C - -f http://ftp.debian.org/debian/dists/sid/main/Contents-$_arch.gz > /var/cache/debtap/debian-packages-files.gz
                gzip -df /var/cache/debtap/debian-packages-files.gz
                curl -C - -f http://archive.ubuntu.com/ubuntu/dists/$ubuntu_latest_stable_version/Contents-$_arch.gz > /var/cache/debtap/ubuntu-packages-files.gz
                gzip -df /var/cache/debtap/ubuntu-packages-files.gz 

seemed to be the problem. I suppose the program should put something instead of $ubuntu_latest_stable_version/Contents-$ and the other $ things, but as it didn't worked i suppose it was putting something wrong. I explored both links to see what the heck were there, and modified both links with something that looked reasonable to me.

             curl -C - -f http://ftp.debian.org/debian/dists/sid/main/Contents-source.gz > /var/cache/debtap/debian-packages-files.gz
                gzip -df /var/cache/debtap/debian-packages-files.gz
                curl -C - -f http://archive.ubuntu.com/ubuntu/dists/zesty/Contents-amd64.gz > /var/cache/debtap/ubuntu-packages-files.gz
                gzip -df /var/cache/debtap/ubuntu-packages-files.gz 

Then, i executed the next if-like stuff (lines 48-69 of your code)

 if [[ $(echo $?) != 0 ]]; then
                    echo -e "${red}Synchronization failed. Exiting...${NC}"; exit 1
                else
                    echo -e "${lightgreen}==>${NC} ${bold}Downloading latest virtual packages list...${normal}"
                    curl -L https://github.com/helixarch/virtual-packages-list-generator/archive/master.tar.gz > /var/cache/debtap/master.tar.gz
                    tar xfz /var/cache/debtap/master.tar.gz -C /var/cache/debtap
                    mv /var/cache/debtap/virtual-packages-list-generator-master/virtual-packages /var/cache/debtap
                    rm -rf /var/cache/debtap/master.tar.gz /var/cache/debtap/virtual-packages-list-generator-master
                    if [[ $(echo $?) != 0 ]]; then
                        echo -e "${red}Downloading failed. Exiting...${NC}"; exit 1
                    else
                        echo -e "${lightgreen}==>${NC} ${bold}Downloading latest AUR packages list...${normal}"
                        curl -C - -f https://aur.archlinux.org/packages.gz > /var/cache/debtap/aur-packages.gz
                        gzip -df /var/cache/debtap/aur-packages.gz
                        if [[ $(echo $?) != 0 ]]; then
                            echo -e "${red}Downloading failed. Exiting...${NC}"; exit 1
                        else    
                            chmod 644 /var/cache/debtap/*
                            echo -e "${lightgreen}==>${NC} ${bold}All steps successfully completed!${normal}"; exit 0
                        fi
                    fi
                fi

I don't really understand what theese ones do, but i suppose they tell debtap that the updated was righ because after that everything worked perfectly.
I hope this helps, and thanks for the software! smile

Offline

#114 2017-06-03 16:24:38

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,335

Re: Debtap - A script to convert .deb packages to Arch Linux packages

@MichaelArtin

Which Brother printer do you have?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#115 2017-06-03 16:42:13

helix
Member
Registered: 2013-02-17
Posts: 177

Re: Debtap - A script to convert .deb packages to Arch Linux packages

3.0 version coming soon, it fixes the error and brings many new features, meanwhile version in github works

Last edited by helix (2017-06-03 16:44:01)

Offline

#116 2017-06-03 18:38:07

MichaelArtin
Member
Registered: 2017-06-03
Posts: 2

Re: Debtap - A script to convert .deb packages to Arch Linux packages

I have a DCP-T700W. I readed that the github version had everything fixed, but i didn't know how to compile that.

Offline

#117 2017-07-24 17:20:08

helix
Member
Registered: 2013-02-17
Posts: 177

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Major upgrade 3.0

Changelog

* Fixed broken url which prevented from updating debtap database.
* Merged debtap and debtap-p64 into one script. To get the functionality of debtap-p64, use -s switch with debtap.
* Added -w option, which wipeouts (removes) versions from dependencies, optional dependencies, provitions, conflicts and replacements.
* Improved accuracy on finding non-optional dependencies.
* Now removes packages from non-optional dependencies that are part of base group.
* Added -p option to generate a basic-to-near-complete PKGBUILD additionally with the converted package, ready to be edited.
* Added -P option, same as above but only generates PKGBUILD file (doesn't convert package).
* Creation of .INSTALL metadata file has been vastly improved.
* Added support for ARM Linux .deb packages. Please note that this feature has not been tested, as I don't own any ARM computer. If you have any questions or recommendations about ARM packages, ask them on github, not here.
* Bug fixes.
* Code cleanup and minor improvements.
* Added GPL2 license in the beginning of script.

Don't forget to rerun "debtap -u" before running this new version!

Last edited by helix (2017-07-24 17:26:07)

Offline

#118 2017-08-16 05:31:42

helix
Member
Registered: 2013-02-17
Posts: 177

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Update 3.1.1

Changelog

* Fixed broken functionality for ARM packages
* Improved debtap database
* Bug fixes

Don't forget to rerun "debtap -u" before running this new version!

Offline

#119 2017-08-21 12:31:43

helix
Member
Registered: 2013-02-17
Posts: 177

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Update 3.1.4

Changelog

* Bug fix
* Removed unnecessary comment

Last edited by helix (2017-08-21 16:29:40)

Offline

#120 2017-11-30 16:33:41

stupid.stupido
Member
Registered: 2017-11-30
Posts: 3

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Hello

maybe somone can help me or give me an advice:

i want to install a .deb package (audio.injector.scripts_0.1-1_all.deb) using

debtap

but it seems that there is a problem when debtap is creating the pkg.tar out of the .deb file:

input:

root@alarm>> debtap audio.injector.scripts_0.1-1_all.deb
root@alarm>> 

output:

==> Extracting package data...
==> Fixing possible directories structure differencies...
==> Generating .PKGINFO file...

:: Enter Packager name:


:: Enter package license (you can enter multiple licenses comma separated):


*** Creation of .PKGINFO file in progress. It may take a few minutes, please wait...

==> Checking and generating .INSTALL file (if necessary)...
grep: tempfile2: No such file or directory
grep: tempfile2: No such file or directory


:: If you want to edit .PKGINFO file, press (1) For vi (2) For nano (3) For default editor (4) For a custom editor or any other key to continue:

==> Generating .MTREE file...

==> Creating final package...
xz: audio.injector.scripts-0.1-1-any.pkg.tar: Cannot allocate memory
mv: cannot stat '*.xz': No such file or directory
==> Package successfully created!
==> Removing leftover files...

At the end I dont have the *.pkg.tar.xz file


Thx in advance

Last edited by stupid.stupido (2017-11-30 16:35:49)

Offline

#121 2017-11-30 16:44:30

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,320
Website

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Looks like something strictly related to ALARM.

https://bbs.archlinux.org/viewtopic.php?id=153431


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#122 2017-11-30 16:47:25

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,335

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Are you using a Raspberry Pi?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#123 2017-11-30 18:25:52

stupid.stupido
Member
Registered: 2017-11-30
Posts: 3

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Yes iam using Raspberry pi 3 model B

Offline

#124 2017-11-30 18:30:39

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,335

Re: Debtap - A script to convert .deb packages to Arch Linux packages

Then you're asking in the wrong place.

Arch ARM is a separate distro with its own forums. Please ask there.
https://bbs.archlinux.org/misc.php?action=rules


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#125 2017-11-30 18:36:01

stupid.stupido
Member
Registered: 2017-11-30
Posts: 3

Re: Debtap - A script to convert .deb packages to Arch Linux packages

sorry was in a rush, overseen

Offline

Board footer

Powered by FluxBB