You are not logged in.
# Maintainer: Joël Müller <mail@joelmueller.ch>
pkgname=mediainfo-rar
pkgver=1.2.0
pkgrel=1
epoch=
pkgdesc="MediaInfo-rar get mediainfos from rar file"
arch=("x86_64")
url="http://www.lundman.net/wiki/index.php/Mediainfo-rar"
license=('GPL')
groups=()
depends=('unrar')
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(http://www.lundman.net/ftp/mediainfo-rar/mediainfo-rar-Linux-x86-$pkgver.tar.gz)
noextract=()
sha256sums=('7c1cb7aff7c36d1e434f5863ba2cd5fa13e72f35acb69d6a4e618bbab735b7f2')
prepare() {
tar xfvz $pkgname-Linux-x86-$pkgver.tar.gz
cd "$pkgname"
}
package() {
cd "$pkgname"
cp -f "$pkgname" "/usr/bin/$pkgname" #How can I do this command with root rights?
}
There is a binary file named mediainfo-rar which I want to move one to one to /usr/bin/
Last edited by Morta (2022-07-02 13:54:11)
Offline
You want to install stuff to $pkgdir and not /.
cp -f "$pkgname" "$pkgdir/usr/bin/$pkgname"
and using "install" instead of "cp" is a good idea to ensure correct permissions.
Offline
You want to install stuff to $pkgdir and not /.
cp -f "$pkgname" "$pkgdir/usr/bin/$pkgname"
and using "install" instead of "cp" is a good idea to ensure correct permissions.
install: reguläre Datei '/usr/binmediainfo-rar' kann nicht angelegt werden: Keine Berechtigung
install: regular File '/usr/bin/mediainfo-rar' can't be created
install "$pkgname" "/usr/bin$pkgname"
I want install a binary which I extracted from tar.gz to /usr/bin. I don't wanna install to $pkgdir
Offline
I want install a binary which I extracted from tar.gz to /usr/bin. I don't wanna install to $pkgdir
No you don't and you cant.
Why do you *think* you want to do that? It's contrary to the very concept of a "package".
Offline
Ok. And How I have to say that I want install the binary of the archive tar.gz to /usr/bin?
install "$pkgname" "$pkgdir/usr/bin/$pkgname"
doesn't work
Offline
install: regular File '/usr/bin/mediainfo-rar' can't be created
That's not what it says. Read it again but slowly this time.
Is the missing backslash now present in the PKGBUILD?
You should probably explicitly specify the permissions in the install command. See other PKGBUILDs for examples of how to do this.
And the package name should have a -bin suffix if it supplies a binary.
Freedom for Öcalan!
Offline
Ok.
Is more not enough rights. Sorry for the translation error.
I didn't really find a sample for install a binary. I searched in the forums and internet but coudn't find it.
Offline
What was the exact command you used to see that error message? Please post the full command and full output.
Also either edit the PKGBUILD in the OP to reflect the current status or post an updated version.
Freedom for Öcalan!
Offline
Is more not enough rights.
The problem of #3 (if that's your "doesn't work") isn't a rights issue.
I didn't really find a sample for install a binary.
https://aur.archlinux.org/packages?O=0&K=-bin
eg. https://aur.archlinux.org/cgit/aur.git/ … ?h=yay-bin
Offline
# Version notes:
pkgname=mediainfo-rar
pkgver=1.3.0
pkgrel=1
epoch=1
pkgdesc='mediainfo from rar files'
arch=(x86_64)
url=http://www.lundman.net/wiki/index.php/Mediainfo-rar
license=('')
depends=()
optdepends=()
provides=("${pkgname%-bin}=$pkgver" 'mediainfo-rar')
conflicts=(unrar)
options=(!strip)
source=("$pkgname-$pkgver.tar.gz::http://www.lundman.net/ftp/mediainfo-rar/$pkgname-Linux_x64-$pkgver.tar.gz")
noextract=("$pkgname-$pkgver.tar.gz")
sha256sums=('de7b518fb6c101bf2e375564d757f98f49407a1a4fc29a2abbfe19b936840ad0')
prepare() {
mkdir -p mediainfo-rar
tar xfvz "$pkgname-$pkgver.tar.gz" -C mediainfo-rar
chmod +x mediainfo-rar/mediainfo-rar
}
package() {
install -dm0755 "/$pkgdir/usr/bin"
cd mediainfo-rar
cp -a mediainfo-rar "/$pkgdir/usr/bin/$pkgname"
cp -a unrar "/$pkgdir/usr/bin/unrar"
}
It's installing me in /usr/bin/mediainfor-rar/mediainfo-rar and /usr/bin/mediainfor-rar/unrar instead of /usr/bin/mediainfo-rar and /usr/bin/unrar
What is wrong?
Last edited by Morta (2022-07-02 15:21:41)
Offline
I got it
# Version notes:
pkgname=mediainfo-rar
pkgver=1.3.0
pkgrel=1
epoch=1
pkgdesc='mediainfo from rar files'
arch=(x86_64)
url=http://www.lundman.net/wiki/index.php/Mediainfo-rar
license=('')
depends=()
optdepends=()
provides=("${pkgname%-bin}=$pkgver" 'mediainfo-rar')
conflicts=(unrar)
options=(!strip)
source=("$pkgname-$pkgver.tar.gz::http://www.lundman.net/ftp/mediainfo-rar/$pkgname-Linux_x64-$pkgver.tar.gz")
noextract=("$pkgname-$pkgver.tar.gz")
sha256sums=('de7b518fb6c101bf2e375564d757f98f49407a1a4fc29a2abbfe19b936840ad0')
prepare() {
mkdir -p mediainfo-rar
tar xfvz "$pkgname-$pkgver.tar.gz" -C mediainfo-rar
chmod +x mediainfo-rar/mediainfo-rar
}
package() {
cd $pkgname
install -dm0755 "/$pkgdir/usr/bin"
cd $pkgname
cp -a mediainfo-rar "/$pkgdir/usr/bin/$pkgname"
cp -a unrar "/$pkgdir/usr/bin/unrar"
}
Offline
How can I commit this PKGBUILD to aur.archlinux.org?
Offline
Why are you using an epoch in the package version?
Why have you applied the noextract option for the source tarball and then manually extracted it? Remove that option and the prepare() function.
Why have you used install to just create "$pkgdir"/usr/bin/ instead of using it to install both executables:
package() {
cd "$pkgname"
install -Dm755 mediainfo-rar "$pkgdir"/usr/bin/mediainfo-rar
install -Dm755 unrar "$pkgdir"/usr/bin/unrar
}
Freedom for Öcalan!
Offline
Thanks for input the reason is not enough know-how :-D
# Version notes:
pkgname=mediainfo-rar
pkgver=1.3.0
pkgrel=1
pkgdesc='mediainfo from rar files'
arch=(x86_64)
url=http://www.lundman.net/wiki/index.php/Mediainfo-rar
license=('')
depends=()
optdepends=()
provides=("${pkgname%-bin}=$pkgver" 'mediainfo-rar')
conflicts=(unrar)
options=(!strip)
source=("$pkgname-$pkgver.tar.gz::http://www.lundman.net/ftp/mediainfo-rar/$pkgname-Linux_x64-$pkgver.tar.gz")
noextract=("$pkgname-$pkgver.tar.gz")
sha256sums=('de7b518fb6c101bf2e375564d757f98f49407a1a4fc29a2abbfe19b936840ad0')
prepare() {
mkdir -p mediainfo-rar
tar xfvz "$pkgname-$pkgver.tar.gz" -C mediainfo-rar
chmod +x mediainfo-rar/mediainfo-rar
}
package() {
cd "$pkgname"
install -Dm755 mediainfo-rar "$pkgdir"/usr/bin/mediainfo-rar
install -Dm755 unrar "$pkgdir"/usr/bin/unrar
}
looks better now, nor?
Back to my question... How I can push to AUR?
Last edited by Morta (2022-07-02 15:42:42)
Offline
You still have the noextract line and superfluous prepare() function. The licence field isn't filled in (I know Arch is shamefully lax about licencing but at least a vague statement is required). The empty fields should all be removed. The package name is still wrong because you haven't added the -bin suffix. That !strip option also looks bad.
How I can push to AUR?
Freedom for Öcalan!
Offline
# Version notes:
pkgname=mediainfo-rar-bin
pkgver=1.3.0
pkgrel=1
pkgdesc='mediainfo from rar files'
arch=(x86_64)
url=http://www.lundman.net/wiki/index.php/Mediainfo-rar
license=('GPL2')
provides=("${pkgname%-bin}=$pkgver" 'mediainfo-rar')
conflicts=(unrar)
source=("http://www.lundman.net/ftp/mediainfo-rar/mediainfo-rar-Linux_x64-$pkgver.tar.gz")
sha256sums=('de7b518fb6c101bf2e375564d757f98f49407a1a4fc29a2abbfe19b936840ad0')
prepare() {
cd mediainfo-rar
chmod +x mediainfo-rar/mediainfo-rar
chmod +x mediainfo-rar/unrar
}
package() {
cd mediainfo-rar
install -Dm755 /mediainfo-rar/mediainfo-rar "$pkgdir"/usr/bin/mediainfo-rar
install -Dm755 /mediainfor-rar/unrar "$pkgdir"/usr/bin/unrar
}
makepkg -si
==> Erstelle Paket: mediainfo-rar-bin 1.3.0-1 (Sat 02 Jul 2022 06:36:43 PM CEST)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
-> mediainfo-rar-Linux_x64-1.3.0.tar.gz gefunden
==> Überprüfe source Dateien mit sha256sums...
mediainfo-rar-Linux_x64-1.3.0.tar.gz ... Erfolg
==> Entpacke Quellen...
-> Entpacke mediainfo-rar-Linux_x64-1.3.0.tar.gz mit bsdtar
mediainfo-rar/mediainfo-rar: Can't replace existing directory with non-directory: Das Verzeichnis ist nicht leer
bsdtar: Error exit delayed from previous errors.
==> FEHLER: Konnte mediainfo-rar-Linux_x64-1.3.0.tar.gz nicht entpacken
Breche ab...
Why is the directory not empty? And why can't replace the directory with a non directory? I can't understand this error.
Is noextract the right way to do that when bsdtar fails?
Last edited by Morta (2022-07-02 16:52:41)
Offline
The tarball is automatically extracted (because you've removed the noextract option) so the manual extraction in the prepare() function (which I told you to remove) doesn't work.
Once more: remove the prepare() function.
Remove the pkg/ & src/ directories before running makepkg again.
EDIT: and prepend commands with LC_ALL=C to make them speak English.
Last edited by Head_on_a_Stick (2022-07-02 16:55:41)
Freedom for Öcalan!
Offline
The tarball is automatically extracted (because you've removed the noextract option) so the manual extraction in the prepare() function (which I told you to remove) doesn't work.
Once more: remove the prepare() function.
Remove the pkg/ & src/ directories before running makepkg again.
EDIT: and prepend commands with LC_ALL=C to make them speak English.
Ok I didn‘t understand the meaning of superfluous.
My english is far away from perfect. Remove I do understand.
And now I understand also that the prepare section is there to extract a tarball and is with a automatically extraction not necessary.
I will do tomorrow. Now I go out for a drink. Cheers!
Last edited by Morta (2022-07-02 17:04:32)
Offline
Ok I didn‘t understand the meaning of superfluous.
My english is far away from perfect. Remove I do understand.
Ah, sorry about that.
Too pretentious for my own good
Freedom for Öcalan!
Offline
Note that this software should not be submitted to the AUR. It must have a license. And while upstream provides a file called "LICENSE" they do not grant any rights for use, copying, or anything else at all. The whole license file is a joke (that's not a criticism, it appears intended as a joke). It's most certainly *not* GPL2 as one of your PKGBUILDs above claimed. You cannot just assign your preferred license to other people's software.
This also appears to incorporate source code from mediainfo but fails to meet their license requirements for using their code. The same might be true for using unrar's code, but unrar also uses a custom and unusual license so I don't know what their requirements are.
Last edited by Trilby (2022-07-02 17:32:15)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It‘s CC 4.0 for mediainfo mediainfo-rar has no license but is allowed to adjust the software even for commercial use.
Offline
It‘s CC 4.0 for mediainfo
Where did you get this? It's a BSD 2 clause license.
...mediainfo-rar has no license
If this were true, it could not be submitted to the AUR either. But there is a file called LICENSE in the source tarball (and this is the file that's full of attempts at humor, but does not actually grant any rights to users).
Last edited by Trilby (2022-07-02 21:07:14)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
This Code of Conduct is adapted from the Contributor Covenant, version 2.0
No change except the Scope paragraph which is adapted from the Django Code Of Conduct.
Creative Commons Attribution license.
Offline
That's a Code of Conduct, which is not the same as a software licence.
The correct SPDX identifier would be "BSD-2-Clause" but the Arch developers appear to think "BSD" is acceptable as an identifier.
EDIT: added SPDX link.
Last edited by Head_on_a_Stick (2022-07-02 17:55:42)
Freedom for Öcalan!
Offline
# Maintainer: Joël Müller <mail@joelmueller.ch>
pkgname=mediainfo-rar-bin
pkgver=1.3.0
pkgrel=1
pkgdesc='mediainfo from rar files'
arch=(x86_64)
url=http://www.lundman.net/wiki/index.php/Mediainfo-rar
license=('BSD')
provides=("${pkgname%-bin}=$pkgver" 'mediainfo-rar')
conflicts=(unrar)
source=("http://www.lundman.net/ftp/mediainfo-rar/mediainfo-rar-Linux_x64-$pkgver.tar.gz")
sha256sums=('de7b518fb6c101bf2e375564d757f98f49407a1a4fc29a2abbfe19b936840ad0')
package() {
cd "$srcdir"
install -Dm755 "$srcdir"/mediainfo-rar/mediainfo-rar "$pkgdir"/usr/bin/mediainfo-rar
install -Dm755 "$srcdir"/mediainfo-rar/unrar "$pkgdir"/usr/bin/unrar
}
I'm finished!
Now I have problems to push it to AUR. Could someone help me
Offline