Closed lucaswerkmeister closed 5 years ago
The one line script is correct. Its role is to setup commands with the correct I/O requirements without invoking another shell instance. It thus saves an exec
system call and the shell's startup cost. The script's first line must include the full path of dgsh-wrap
so that the kernel can execute it through the #!
mechanism. Shouldn't that be DESTDIR
?
I thought that’s what the PREFIX
is for. When building the package, $pkgdir
is some meaningless directory that’s later tarballed into the package and won’t exist when the package is installed – it should only be used to copy files into, nothing more. If that’s not the intended use of DESTDIR
, some other variable needs to be available to support this kind of build.
Thank you for the clarification. Please keep in mind that Marios and I are noobs regarding packaging. We have two types of builds. A build-install
, which is used for testing, and this creates the files you saw with the line
./install-wrapped.sh $$(cd .. ; pwd)/build
Then the install
target creates the files with the correct prefix using the line
./install-wrapped.sh
To eliminate the warning we could include the line in the testing process and remove the files afterwards. What do you think?
Please keep in mind that Marios and I are noobs regarding packaging.
Me too, I just hear things about Makefile conventions and try to infer things that make sense from them :)
I’m afraid I don’t quite understand your comment, sorry. If the two build kinds already exist, and the non-build install uses the right prefix, why does the problem occur? Or is that your suggested solution, but currently there’s just install
and it does the same thing as your proposed build-install
?
I think that the packager blindly looks for $pkgdir
within the package directory and complains when it finds it. In dgsh
it is used for a legitimate reason, so the warning can be safely ignored. The $pkgdir
path does not occur in the final executed scripts, right?
I think that the packager blindly looks for
$pkgdir
within the package directory and complains when it finds it.
Essentially, yes. (Not sure if it looks in $pkgdir
or in the final tarball, but it shouldn’t make a difference.) But since the path is in the scripts in $pkgdir
, it does appear in the final executed scripts, which AFAIU won’t work once the package build dir (which contains $pkgdir
) is removed.
$pkgdir
is in the scripts used for testing, not in the installed scripts, no?
No, it ended up in the final usr/libexec/dgsh/cmp
and other files in the installed package.
Hmm, this may not the case here, or I have understood something wrong.
First I configure with PREFIX=/home/dds config
.
/home/dds/src/dgsh
$ find /home/dds/src/dgsh -name ls
/home/dds/src/dgsh/build/libexec/dgsh/ls
/home/dds/src/dgsh/unix-tools/coreutils/tests/ls
$ cat /home/dds/src/dgsh/build/libexec/dgsh/ls
#!/home/dds/src/dgsh/build/libexec/dgsh/dgsh-wrap -s -d
Note that the path contains $pkgdir
, but this should not be a problem here.
/home/dds
$ find /home/dds/libexec/ -name ls
/home/dds/libexec/dgsh/ls
$ cat /home/dds/libexec/dgsh/ls
#!/home/dds/libexec/dgsh/dgsh-wrap -s -d
Now the path references $PREFIX
not $DESTDIR
.
Okay, I’ll have to look into this again… unfortunately I’m away from home for a week, so I can’t debug this right now. I’ll get back to you.
Closing due to lack of submitter input.
I don’t know when this started to happen, because my local build of the
dgsh-git
AUR package was broken for months for unrelated reasons – but now that it’s fixed,pkgbuild
reports:Looking into the package, I can see that
usr/libexec/dgsh/cmp
and a bunch of other files inusr/libexec/dgsh/
have only this content:~/git/aur/dgsh-git/pkg/dgsh-git/
is theDESTDIR
inmake install
, which should never appear in the output. (Apart from that, is it correct that the script only consists of that single line?)You can find the build script here, but basically it boils down to:
The package should only reference the
PREFIX
, not theDESTDIR
.