You are not logged in.
Hello world,
I'm not quite sure where to post this, but as this is my second post here and I'm new to arch, I suppose it could be right here. Feel free to move this thread if it's wrong here.
Situation:
I want to run activinspire with hardware support. That is an whiteboard application, for hardware like this.
The problem is:
There are officially only repositories for Debian, Ubuntu, OpenSuse and AltLinux:
http://activsoftware.co.uk/linux/
The application itself is also available as a direct download, but that doesn't include the drivers to run the hardware:
http://www1.prometheanplanet.com/forum/ … php?t=8394
I switched from Ubuntu to Arch, so on my other dualboot partition I still have activinspire (with hardware support) running (on Ubuntu), could I make profit of this situation in order to get the driver to arch, too?
Last edited by Carl Karl (2013-06-12 11:23:58)
Offline
Moving to AUR Issues, Discussion, and PKGBUILD requests.
On Arch, non official products live in the AUR. It is best to learn the makepkg tool first, but there are helper programs (like packer, as you can see below). Perhaps these AUR packages are what you seek:
ewaller$@$odin ~ 1014 %packer -Ss Promethean
aur/activdriver 5.7.22-2 (1)
The kernel mode and X11 drivers for Promethean ActivBoard and ActivHub.
aur/promethean-activboard-git 20120316-1 (0)
Kernel module and utils for the promethean activboard
aur/activdriver-i686 5.7.22-1 (0)
The kernel mode and X11 drivers for Promethean ActivBoard and ActivHub -
i686 version.
ewaller$@$odin ~ 1015 %In general, you can look for AUR packages here
Edit: Oh, and of course, welcome to Arch Linux
Last edited by ewaller (2013-06-12 05:03:24)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Thank you, I didn't notice this package before indeed.
However, it is not installable, as the source gives a 404.
However, there is another package for this: https://aur.archlinux.org/packages.php?ID=57656
Trying to install that, gives me another error:
$ yaourt -S promethean-activboard-git
******snip standard outputs*****
==> Compiling kernel module...
cd linux-kernel/ && make
make[1]: Entering directory `/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel'
make -C /lib/modules/3.9.5-1-ARCH/build SUBDIRS="/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel" modules
make[2]: Entering directory `/usr/src/linux-3.9.5-1-ARCH'
CC [M] /tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/mathrout.o
CC [M] /tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/usbpromethean.o
/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/usbpromethean.c: In Funktion »usb_activ_thread_process_pipe_data«:
/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/usbpromethean.c:2496:6: Fehler: Implizite Deklaration der Funktion »err« [-Werror=implicit-function-declaration]
err ("can't resubmit intr, %s-%s/input0, status %d",
^
/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/usbpromethean.c: In Funktion »usb_activ_probe«:
/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/usbpromethean.c:2988:2: Warnung: Format »%lu« erwartet Argumenttyp »long unsigned int«, aber Argument 2 hat Typ »size_t« [-Wformat=]
DebugPrint(TRACE_LEVEL_RELEASE,DRV_DBG_INIT,(KERN_INFO "Promethean: max write size: %lu\n", board->max_bulk_transfer_size));
^
/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/usbpromethean.c:3113:3: Fehler: Zu wenige Argumente für Funktion »input_mt_init_slots«
input_mt_init_slots(input_dev, MAX_SLOTS);
^
In file included from /tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/usbpromethean.c:16:0:
include/linux/input/mt.h:78:5: Anmerkung: hier deklariert
int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots,
^
cc1: Einige Warnungen werden als Fehler behandelt
make[3]: *** [/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel/usbpromethean.o] Fehler 1
make[2]: *** [_module_/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel] Fehler 2
make[2]: Leaving directory `/usr/src/linux-3.9.5-1-ARCH'
make[1]: *** [all] Fehler 2
make[1]: Leaving directory `/tmp/yaourt-tmp-carl/aur-promethean-activboard-git/src/promethean-activboard/linux-kernel'
make: *** [all] Fehler 2
==> FEHLER: Ein Fehler geschah in build().
Breche ab ...
==> ERROR: Makepkg was unable to build promethean-activboard-git.
==> Restart building promethean-activboard-git ? [y/N]
==> --------------------------------------------------I'm not sure what went wrong, and unfortuantely, I don't have time right now (I will look myself later), but if anybody sees whats wrong easyly you're welcome to leave an information about that...
Offline
I need to call it a night, I will pick this up on the morrow....
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
PS:
I found another source:
http://update.iserv.eu/debian/pool/main … .0_all.deb
is it save to edit the PCKBUILD and enter the other source there?
Edit:
no, that doesn't pass md5.
Last edited by Carl Karl (2013-06-12 05:41:12)
Offline
If you replace one of the files listed in the PKGBUILD you have to update the corresponding MD5 checksum, too.
Offline
OK, one step further:
The maintainer of the activdriver AUR updated the source URL, the driver works. :-)
But that leads to the next problem: Calibration of the device.
In other distributions, that is done by activcalibrate in the package activtools. Searching for that in AUR and via packer leaded to nothing.
The other AUR package https://aur.archlinux.org/packages.php?ID=57656 seems to include a calibration tool. As I wasn't able to yaourt it, I git cloned the package and only "made" the calibration part. That leads to a program called loadcalibdata which is used by:
./loadcalibdata DEVICE CALIBRATIONFILE
loads the calibration from CALIBRATIONFILE to the DEVICE
lsusb told me:
Bus 001 Device 009: ID 0d48:0004 Promethean Limited ACTIVboardso I tried with the given example file calibrate-000008067b39.data :
[carl@a150 loadcalibdata]$ ./loadcalibdata /dev/bus/usb/001/009 calibrate-000008067b39.data
/dev/bus/usb/001/009: Permission denied
[carl@a150 loadcalibdata]$ sudo ./loadcalibdata /dev/bus/usb/001/009 calibrate-000008067b39.data
[sudo] password for carl:
ioctl: Inappropriate ioctl for deviceThis is where I am stuck now. At least a bit further. ;-)
Offline
Please read the wiki article about the AUR again. Try to learn how to use the AUR without yaourt. My first steps in Arch ended, because yaourt failed to compile my packages. You will see what's going wrong, the moment you download the tarball from the AUR page and run makepkg.
Offline
OK, I also found a solution for the calibration, but I'm quite sure you won't be happy about it:
Copying the corresponding files from the ubuntu-partition where activinpire was installed from the official repos.
these files were in:
/usr/local/bin
/usr/local/lib
/usr/share/promethean
The only disadvantage in this is, that the fullsize-window of the calibration doesn't vanish, so it has to be closed by alt+f4. which isn't bad, as the calibration itself worked.
(and yes, this caused no trouble with pacman -Syu. At least this time. ;-) )
@Awebb:
Will typing "makepkg" give me other error messages than the ones yaourt gave me? As there were Errors, it didn't install, and so there is no harm, or did I get it wrong? I don't see why using yaourt could cause harm.
Offline
Yourt will not do any harm, except that it may slow your understanding of the process and can thus indirectly lead you you doing harm to your system... like you now have done by manually installing untracked files.
Again, you should read the AUR wiki page and perhaps make a PKGBUILD for the calibration tool you found. If you can install it manually, making a PKGBUILD will be trivial, but it will likely save you trouble in the long run.
Shortcuts seem handy now, but just see the really long stickied thread with the recent update to see scores of users who are now being plagued by their long-since-forgotten shortcuts that seemed perfectly reasonable at the time.
Last edited by Trilby (2013-06-12 11:30:36)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
@Awebb:
Will typing "makepkg" give me other error messages than the ones yaourt gave me? As there were Errors, it didn't install, and so there is no harm, or did I get it wrong? I don't see why using yaourt could cause harm.
Yaourt has already done harm in preventing you from understanding how the AUR and PKGBUILD files work. Manipulating PKGBUILD's is basic knowledge for any Arch user, who wants to use packages not included in the repos.
Offline
I knew you wouldn't like my solution. ;-)
But OK, let's see it as a process like learning to ride a bicycle: In the early stages, you're happy when it works any how. Later you're not.
So what would be the "clean" solution in this case? Really a PKGBUILD? (Also if I'm the only one using it?) Containing what?
There are three lose threads:
1. The program itself in an official tar.gz Archive with an install.sh Script.
2. The driver in the AUR.
3. The calibration tool files copied from the other distribution. (at least it's easy for me to track them: they are the only ones in the corresponding folders)
All in one PKGBUILD? For each a seperate one?
Offline
Really a PKGBUILD?
Yes, really.
Containing what?
https://wiki.archlinux.org/index.php/PKGBUILD
You can decide whether it's worth sharing it in the AUR, or just using it yourself - I have a few PKGBUILDs I have just for my own use. This is just like manually installing something, but it allows pacman to track the files.
All in one PKGBUILD? For each a seperate one?
There are already PKGBUILDS for the first two, right? All you're adding is the third. A PKGBUILD would (as mentioned above) allow pacman to track these files.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Really a PKGBUILD? (Also if I'm the only one using it?) Containing what?
Yes, really a PKGBUILD file! I have some PKGBUILD files that are only used by me.
Everything in the root directory should be controlled by pacman. Otherwise, you should just keep it in your home directory. The reason is... Um... Organization, maybe? I don't know.
If you use pacman then pacman can tell you exactly what you have installed. It can be updated and it can be uninstalled. Maybe it's just an experience thing. If I don't use the package manager something bad will always eventually happen. It's just a different bad something every time.
Do you think of PKGBUILD files as difficult to make? They're not! Think of it this way:
Do you use Bash?
Can you install the software from a terminal window?
Then you can make a PKGBUILD file! A PKGBUILD file is just a Bash script with the instructions on how to install a piece of software. You can find examples of PKGBUILD files in "/usr/share/pacman/".
Offline
PKGBUILDS can *seem* like a lot at first. But many are just a couple dozen lines, and about a couple dozen of those are "boiler-plate" fill in the blanks bits. The "work" of PKGBUILD is just in the build and package functions. And what goes in these functions are basically just the commands you've already used to install this calibration tool manually.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
There are already PKGBUILDS for the first two, right? All you're adding is the third.
No, only for the second. And the PKGBUILD file for that doesn't really look trivial for me... ;-)
After reading a bit, I can imagine what to do for the first (a tar.gz containing an install.sh script), but for the third it would be somehow strange: Just copy some files from my disc to another place on the disc? Sounds a bit strange.. (but on the other hand: easy!)
Meanwhile, I found a .deb for the third, it's here. (from there), maybe using that is better?
So concerning the third (the calibration tool), I see 3 ways now:
creating a PKGBUILD which just describes the file copies from my disc to my disc.
creating a PKGBUILD based on the .deb linked above. (sounds difficult...)
OR installing the .deb file with dpkg from AUR
or even another way? Which way do you recommend me?
(Any how thanks for your patience, I promise to read and try! :-) )
Offline
I'd recommend against option c. Some arch users use alternative package managers for things, but I genuinely don't understand why. Creating a PKGBUILD for a deb isn't as bad as you think, but if you can get option a to work correctly, then it is probably the simplest.
All the best,
-HG
Offline
OK, done! At least for thread 3, i.e. the calibration tool.
I deleted all the files I copied manually (so no more untracked files, at least concerning thread 3, the calibration tool), created a PKGBUILD file, made makepkg and installed the package via sudo pacman -U packagename.pkg.tar.xz.
I suppose this is the way it should be, right?
At least also sudo pacman -R packagename works.
Here is the PKGBUILD file:
# Maintainer: Your Name <youremail@domain.com>
pkgname=activtools
pkgver=5.8.46_13
pkgrel=1
pkgdesc="Includes activmanager, activcalibrate, activremote and activmonitor.
You must install activtools if you want to use ActivInspire with Promethean
hardware. You do not need activtools if you just want to run ActivInspire
Personal Edition."
arch=('i686')
license=('unknown')
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/non-oss/a/activtools/activtools_5.8.46-13~ubuntu~1204_i386.deb)
md5sums=('f6ae0e4f76b9d3f90cf1557cbc9ff3df') #generate with 'makepkg -g'
package() {
cd "$srcdir"
tar -xf data.tar.gz
cp -r usr $pkgdir/usr
cp -r etc $pkgdir/etc
}it's just for myself, not to be published.
Was that OK or should/could I learn something else?
e.g.: This installs to /usr/local. Is that a problem concerning the new move to /usr/bin? As the package only contains binaries, I doubt they are really flexible...
Offline
I would just extract the data tarball into $pkgdir directly. This will ensure that the permissions are preserved.
You should also, if possible, move "/usr/local/*" to "/usr/*" as packages should never install files under /usr/local. I don't think this will break anything but testing is the only way to be sure. And no, this has nothing to do with the /usr merge as the package manager generally never touches anything under /usr/local.
Last edited by Stebalien (2013-06-13 17:26:36)
Offline
Also, if you really need to use `cp` because you need to recursively copy a directory, use `cp -a --no-preserve=ownership`. And again, double-quote all the variables you want to expand (including "$pkgdir" in the package function).
All the best,
-HG
P.S., the package function (and the prepare and build functions) begin(s) in "$srcdir", you don't need to cd to it anymore.
Last edited by HalosGhost (2013-06-13 17:32:17)
Offline
Thanks again for your feedback, I extract now in the pkg folder directly and also have an PKGBUILD for the software suite:
PKGBUILD for activtools:
# Maintainer: Your Name <youremail@domain.com>
pkgname=activtools
pkgver=5.8.46_13
pkgrel=1
pkgdesc="Includes activmanager, activcalibrate, activremote and activmonitor.
You must install activtools if you want to use ActivInspire with Promethean
hardware. You do not need activtools if you just want to run ActivInspire
Personal Edition."
arch=('i686')
license=('unknown')
depends=('qt4')
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/non-oss/a/activtools/activtools_5.8.46-13~ubuntu~1204_i386.deb)
md5sums=('f6ae0e4f76b9d3f90cf1557cbc9ff3df') #generate with 'makepkg -g'
package() {
mv data.tar.gz "$pkgdir"
cd "$pkgdir"
tar -xf data.tar.gz
rm data.tar.gz
rm -r etc #activmgr works only when started after board is attached, so no autostart
cd usr/local/lib
cp libactivboardex.so.1.0 libactivboardex.so.1 #activcalibration needs libactivboardex.so.1 instead of libactivboardex.so.1.0
}PKGBUILD for activinspire (the software suite):
# Maintainer: Your Name <youremail@domain.com>
pkgname=activinspire
pkgver=1.6.43277_1
pkgrel=1
pkgdesc="Software to use with Promethean Hardware products."
arch=('i686')
license=('unknown')
source=(http://www.activsoftware.co.uk/linux/activinspire.tar.gz)
md5sums=('0137b93234c8e34198083d1ea000d474') #generate with 'makepkg -g'
package() {
mv activinspire.tar.gz "$pkgdir"
cd "$pkgdir"
tar -xf activinspire.tar.gz
cd inspire
mv etc ..
mv usr ..
mv var ..
cd ..
rm activinspire.tar.gz
rm -r inspire
}However, moving away from /usr/local to just /usr seems to be difficult, as I saw some scripts there with absolute paths directing to /usr/local/...
While that wouldn't be so bad with the scripts (there it can be changed), I don't know how it is linked inside the binaries, so I leave the attempt to move to /usr/ to somewhen when I have got time to try that.
Again, thanks for your help! :-)
Offline
1. activtools's pkgdesc is silly as it stands. Instead, you should add an optdepends=() array and list most of that information there.
2. There's no need for mv/cd/tar, just use (bsd)tar's "-C" flag to extract directly to the desired directory.
3. Again, if you're going to use `cp`, use `cp -a --no-preserve=ownership`
All the best,
-HG
Last edited by HalosGhost (2013-06-17 16:14:46)
Offline
1. activtools's pkgdesc is silly as it stands.
haha, that's the copied original description from promethean, the original developer.
Instead, you should add an optdepends=() array and list most of that information there.
I don't think so, as the programs in the description are the ones included in this package. (as binaries unfortunately...)
2. There's no need for mv/cd/tar, just use (bsd)tar's "-C" flag to extract directly to the desired directory.
3. Again, if you're going to use `cp`, use `cp -a --no-preserve=ownership`
thanks, I'll try!
Offline
I don't think so, as the programs in the description are the ones included in this package. (as binaries unfortunately...)
Let me offer some clarification. Here's how I would write the pkgdesc and the optdepends for activeinspire:
pkgdesc='Software Suite for ActivInspire Personal Edition'
optdepends=('activtools: For use with Promethean hardware')and then the pkgdesc for activtools:
pkgdesc='Utilities for configuring and managing Promethean hardware'That's much shorter and to the point. But it clarifies the usage quite a bit better imho.
All the best,
-HG
Offline
By the way, try this python script to create skeleton PKGBUILDs for a debian repository.
#!/usr/bin/env python3
import sys
import urllib.request
import gzip
import os
class DebPkgBuild():
def __init__(self):
self.name=None
self.depends=None
self.version=None
self.source=None
self.provides=None
self.arch=None
self.head="""
# Converted from debian repository info for binary package
# !!!!!!!!!!!!!!!
# STILL REQUIRED STEPS:
# - set correct arch
# - fix dependency array
# - download sources and extract with makepkg -o
# - use the scripts in src/control.tar.gz to create the installscript.
# - adjust the package function to your needs
# - add systemd service files if necessary
# !!!!!!!!!!!!!!!
"""
def toString(self):
if not (self.name and self.version and self.source):
raise Error("PKGBUILD missing data")
return """%s
pkgname=\"%s\"
pkgver=%s
pkgrel=1
pkgdesc=\"%s\"
arch=(%s)
depends=(%s)
provides=(%s)
source=(\"%s\")
md5sums=(%s)
sha256sums=(%s)
package() {
cd "$pkgdir"
# extract files into arch package
bsdtar -xzf "$srcdir/data.tar.gz"
# fix locations (e.g. /usr/local to /usr, ...)
# -> also modify .desktop files, symlinks, etc. if necessary
# to create multilib packages from i386, move libraries from .../lib to .../lib32
}
"""%(self.head, self.name, self.version, self.desc, self.arch, self.depends, self.provides, self.source, self.md5, self.sha256)
def __str__(self):
return self.toString()
'''
description format, separated by empty line:
Package: pkgname
Version: 1.2.3-12~beta
Architecture: i386
Essential: no
Depends: something, apackage
Installed-Size: 123
Maintainer: Bob Coleman [bob.coleman@example.com]
Provides: pkgprovide
Priority: optional
Section: asection
Filename: pool/....deb
Size: 12345
SHA256: SOME_SHA256_SZM
SHA1: SOME_SHA1_SUM
MD5sum: SOME_MD5_SUM
Description: First description line
second description line
third description line
'''
def main():
if len(sys.argv) < 5:
print("dpkgbuild.py - create PKGBUILD skeletons from debian repository")
print("Usage: dpkgbuild.py URL DISTRIBUTION ARCH COMPONENT [COMPONENT..]")
print("Copyright (C) 2013 ProgAndy")
print("License WTFPL <http://www.wtfpl.net/txt/copying/>")
print("This is free software: you are free to change and redistribute it.")
print("There is NO WARRANTY, to the extent permitted by law.")
return 1
repo = sys.argv[1]
distri = sys.argv[2]
arch = sys.argv[3]
comps = sys.argv[4:]
for comp in comps:
url = "%s/dists/%s/%s/binary-%s/Packages.gz"%(repo,distri,comp,arch)
print(url)
pkgs = urllib.request.urlopen(url)
data = str(gzip.decompress(pkgs.read()), "UTF-8").split("\n")
desc=""
pkgbuild=""
pkg=DebPkgBuild()
pkg.arch=arch
for line in data:
if desc != "" and line.startswith(" "):
desc += "\n" + line
continue
elif desc != "":
pkg.desc = desc
desc = ""
if line == "":
if pkg.name:
print(">> " + pkg.name)
if not os.path.exists(pkg.name):
os.makedirs(pkg.name)
with open(pkg.name + "/PKGBUILD", "w") as f:
f.write(str(pkg))
pkg=DebPkgBuild()
pkg.arch=arch
elif line.startswith("Package:"):
pkg.name=line[9:]
elif line.startswith("Version:"):
pkg.version = line[9:].replace("-", "+")
elif line.startswith("Filename:"):
pkg.source = "package.deb.ar::%s/%s"%(repo,line[10:])
elif line.startswith("SHA256:"):
pkg.sha256 = line[8:]
elif line.startswith("MD5sum:"):
pkg.md5 = (line[8:])
elif line.startswith("Depends:"):
pkg.depends=line[9:]
elif line.startswith("Provides:"):
pkg.provides=line[10:]
elif line.startswith("Maintainer:"):
pkg.head += "# %s\n"%line
elif line.startswith("Description:"):
desc=line[13:]
sys.exit(main())# ./dpkgbuild.py http://activsoftware.co.uk/linux/repos/debian wheezy i386 oss non-ossLast edited by progandy (2013-06-17 20:07:43)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline