
Hello, I'm trying to use the 'makehapkg' script to build Haskell packages, as suggested by Magnus Therning, but I'm having some issues with it. Though it works fine for packages without dependencies other than ghc, like haskell-xdg-basedir (not currently in habs), it fails to install extra dependencies prior to building, e.g.: $./makeahpkg haskell-data-accessor [...] ==> Making package: haskell-data-accessor 0.2.2.2-1 (Wed Jul 25 12:14:10 UTC 2012) ==> Checking runtime dependencies... ==> Installing missing dependencies... sudo: effective uid is not 0, is sudo installed setuid root? ==> ERROR: 'pacman' failed to install missing dependencies. ==> ERROR: Build failed, check /home/bexie/my-habs/x86_64-chroot/build/build As I don't have any kind of experience with chroots I'm quite at a loss here. Am I doing something wrong? Thank you in advance, Alessandro

On Wed, Jul 25, 2012 at 2:23 PM, Alessandro Pezzoni
Hello, I'm trying to use the 'makehapkg' script to build Haskell packages, as suggested by Magnus Therning, but I'm having some issues with it. Though it works fine for packages without dependencies other than ghc, like haskell-xdg-basedir (not currently in habs), it fails to install extra dependencies prior to building, e.g.:
$./makeahpkg haskell-data-accessor [...] ==> Making package: haskell-data-accessor 0.2.2.2-1 (Wed Jul 25 12:14:10 UTC 2012) ==> Checking runtime dependencies... ==> Installing missing dependencies... sudo: effective uid is not 0, is sudo installed setuid root? ==> ERROR: 'pacman' failed to install missing dependencies. ==> ERROR: Build failed, check /home/bexie/my-habs/x86_64-chroot/build/build
As I don't have any kind of experience with chroots I'm quite at a loss here. Am I doing something wrong?
First run `./makeahpkg -h` to familiarise yourself with its options. Then make sure you have `sudo` and `devtools` installed (those are the only required packages I can remember off the top of my head). /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus

On Thu, Jul 26, 2012 at 09:54:36AM +0200, Magnus Therning wrote:
On Wed, Jul 25, 2012 at 2:23 PM, Alessandro Pezzoni
wrote: Hello, I'm trying to use the 'makehapkg' script to build Haskell packages, as suggested by Magnus Therning, but I'm having some issues with it. Though it works fine for packages without dependencies other than ghc, like haskell-xdg-basedir (not currently in habs), it fails to install extra dependencies prior to building, e.g.:
$./makeahpkg haskell-data-accessor [...] ==> Making package: haskell-data-accessor 0.2.2.2-1 (Wed Jul 25 12:14:10 UTC 2012) ==> Checking runtime dependencies... ==> Installing missing dependencies... sudo: effective uid is not 0, is sudo installed setuid root? ==> ERROR: 'pacman' failed to install missing dependencies. ==> ERROR: Build failed, check /home/bexie/my-habs/x86_64-chroot/build/build
As I don't have any kind of experience with chroots I'm quite at a loss here. Am I doing something wrong?
First run `./makeahpkg -h` to familiarise yourself with its options. Then make sure you have `sudo` and `devtools` installed (those are the only required packages I can remember off the top of my head).
I already had 'sudo' and 'devtools' installed and read the output of './makehapkg -h', but that really didn't help in this case.

On Thu, Jul 26, 2012 at 10:40 AM, Alessandro Pezzoni
On Thu, Jul 26, 2012 at 09:54:36AM +0200, Magnus Therning wrote:
On Wed, Jul 25, 2012 at 2:23 PM, Alessandro Pezzoni
wrote: Hello, I'm trying to use the 'makehapkg' script to build Haskell packages, as suggested by Magnus Therning, but I'm having some issues with it. Though it works fine for packages without dependencies other than ghc, like haskell-xdg-basedir (not currently in habs), it fails to install extra dependencies prior to building, e.g.:
$./makeahpkg haskell-data-accessor [...] ==> Making package: haskell-data-accessor 0.2.2.2-1 (Wed Jul 25 12:14:10 UTC 2012) ==> Checking runtime dependencies... ==> Installing missing dependencies... sudo: effective uid is not 0, is sudo installed setuid root? ==> ERROR: 'pacman' failed to install missing dependencies. ==> ERROR: Build failed, check /home/bexie/my-habs/x86_64-chroot/build/build
As I don't have any kind of experience with chroots I'm quite at a loss here. Am I doing something wrong?
First run `./makeahpkg -h` to familiarise yourself with its options. Then make sure you have `sudo` and `devtools` installed (those are the only required packages I can remember off the top of my head).
I already had 'sudo' and 'devtools' installed and read the output of './makehapkg -h', but that really didn't help in this case.
Then I don't know what the problem is exactly. What does the build log file say? (/home/bexie/my-habs/x86_64-chroot/build/build) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus

On Thu, Jul 26, 2012 at 11:02:07AM +0200, Magnus Therning wrote:
On Thu, Jul 26, 2012 at 10:40 AM, Alessandro Pezzoni
wrote: On Thu, Jul 26, 2012 at 09:54:36AM +0200, Magnus Therning wrote:
On Wed, Jul 25, 2012 at 2:23 PM, Alessandro Pezzoni
wrote: Hello, I'm trying to use the 'makehapkg' script to build Haskell packages, as suggested by Magnus Therning, but I'm having some issues with it. Though it works fine for packages without dependencies other than ghc, like haskell-xdg-basedir (not currently in habs), it fails to install extra dependencies prior to building, e.g.:
$./makeahpkg haskell-data-accessor [...] ==> Making package: haskell-data-accessor 0.2.2.2-1 (Wed Jul 25 12:14:10 UTC 2012) ==> Checking runtime dependencies... ==> Installing missing dependencies... sudo: effective uid is not 0, is sudo installed setuid root? ==> ERROR: 'pacman' failed to install missing dependencies. ==> ERROR: Build failed, check /home/bexie/my-habs/x86_64-chroot/build/build
As I don't have any kind of experience with chroots I'm quite at a loss here. Am I doing something wrong?
First run `./makeahpkg -h` to familiarise yourself with its options. Then make sure you have `sudo` and `devtools` installed (those are the only required packages I can remember off the top of my head).
I already had 'sudo' and 'devtools' installed and read the output of './makehapkg -h', but that really didn't help in this case.
Then I don't know what the problem is exactly. What does the build log file say? (/home/bexie/my-habs/x86_64-chroot/build/build)
There doesn't seem to be any log in that directory: $ls /home/bexie/my-habs/x86_64-chroot/build/build PKGBUILD haskell-data-accessor.install Alessandro

On Thu, Jul 26, 2012 at 12:58 PM, Alessandro Pezzoni
On Thu, Jul 26, 2012 at 11:02:07AM +0200, Magnus Therning wrote:
On Thu, Jul 26, 2012 at 10:40 AM, Alessandro Pezzoni
wrote: On Thu, Jul 26, 2012 at 09:54:36AM +0200, Magnus Therning wrote:
On Wed, Jul 25, 2012 at 2:23 PM, Alessandro Pezzoni
wrote: Hello, I'm trying to use the 'makehapkg' script to build Haskell packages, as suggested by Magnus Therning, but I'm having some issues with it. Though it works fine for packages without dependencies other than ghc, like haskell-xdg-basedir (not currently in habs), it fails to install extra dependencies prior to building, e.g.:
$./makeahpkg haskell-data-accessor [...] ==> Making package: haskell-data-accessor 0.2.2.2-1 (Wed Jul 25 12:14:10 UTC 2012) ==> Checking runtime dependencies... ==> Installing missing dependencies... sudo: effective uid is not 0, is sudo installed setuid root? ==> ERROR: 'pacman' failed to install missing dependencies. ==> ERROR: Build failed, check /home/bexie/my-habs/x86_64-chroot/build/build
As I don't have any kind of experience with chroots I'm quite at a loss here. Am I doing something wrong?
First run `./makeahpkg -h` to familiarise yourself with its options. Then make sure you have `sudo` and `devtools` installed (those are the only required packages I can remember off the top of my head).
I already had 'sudo' and 'devtools' installed and read the output of './makehapkg -h', but that really didn't help in this case.
Then I don't know what the problem is exactly. What does the build log file say? (/home/bexie/my-habs/x86_64-chroot/build/build)
There doesn't seem to be any log in that directory:
$ls /home/bexie/my-habs/x86_64-chroot/build/build PKGBUILD haskell-data-accessor.install
Can you jump into the chroot manually and build? Something like $ sudo mkarchroot -r /bin/bash /path/to/chroot # cd /build # makepkg --asroot /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus

On Thu, Jul 26, 2012 at 02:01:53PM +0200, Magnus Therning wrote:
On Thu, Jul 26, 2012 at 12:58 PM, Alessandro Pezzoni
wrote: On Thu, Jul 26, 2012 at 11:02:07AM +0200, Magnus Therning wrote:
On Thu, Jul 26, 2012 at 10:40 AM, Alessandro Pezzoni
wrote: On Thu, Jul 26, 2012 at 09:54:36AM +0200, Magnus Therning wrote:
On Wed, Jul 25, 2012 at 2:23 PM, Alessandro Pezzoni
wrote: Hello, I'm trying to use the 'makehapkg' script to build Haskell packages, as suggested by Magnus Therning, but I'm having some issues with it. Though it works fine for packages without dependencies other than ghc, like haskell-xdg-basedir (not currently in habs), it fails to install extra dependencies prior to building, e.g.:
$./makeahpkg haskell-data-accessor [...] ==> Making package: haskell-data-accessor 0.2.2.2-1 (Wed Jul 25 12:14:10 UTC 2012) ==> Checking runtime dependencies... ==> Installing missing dependencies... sudo: effective uid is not 0, is sudo installed setuid root? ==> ERROR: 'pacman' failed to install missing dependencies. ==> ERROR: Build failed, check /home/bexie/my-habs/x86_64-chroot/build/build
As I don't have any kind of experience with chroots I'm quite at a loss here. Am I doing something wrong?
First run `./makeahpkg -h` to familiarise yourself with its options. Then make sure you have `sudo` and `devtools` installed (those are the only required packages I can remember off the top of my head).
I already had 'sudo' and 'devtools' installed and read the output of './makehapkg -h', but that really didn't help in this case.
Then I don't know what the problem is exactly. What does the build log file say? (/home/bexie/my-habs/x86_64-chroot/build/build)
There doesn't seem to be any log in that directory:
$ls /home/bexie/my-habs/x86_64-chroot/build/build PKGBUILD haskell-data-accessor.install
Can you jump into the chroot manually and build?
Something like
$ sudo mkarchroot -r /bin/bash /path/to/chroot # cd /build # makepkg --asroot
With 'makepkg --asroot' I get a "missing dependencies" error and adding a '-s' flag to that, as I usually would, it compiles the package correctly. Alessandro

On Thu, Jul 26, 2012 at 2:21 PM, Alessandro Pezzoni
With 'makepkg --asroot' I get a "missing dependencies" error and adding a '-s' flag to that, as I usually would, it compiles the package correctly.
Fascinating, so there's nothing wrong with the chroot then. I have no clue what causes the error in makeahpkg. I've never seen it myself, and I don't think I can figure it out without access to your build machine :( /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus

On Thu, Jul 26, 2012 at 03:01:12PM +0200, Magnus Therning wrote:
On Thu, Jul 26, 2012 at 2:21 PM, Alessandro Pezzoni
wrote: With 'makepkg --asroot' I get a "missing dependencies" error and adding a '-s' flag to that, as I usually would, it compiles the package correctly.
Fascinating, so there's nothing wrong with the chroot then. I have no clue what causes the error in makeahpkg. I've never seen it myself, and I don't think I can figure it out without access to your build machine :(
From what I see in the 'makechrootpkg' script, when running 'makeahpkg' 'makepkg' gets called with:
# sudo -u nobody makepkg -s --noconfirm -L If I try to do that from within the chroot I get the following error, when it comes to install the missing dependencies: sudo: effective uid is not 0, is sudo installed setuid root? A minimal test case confirms that this is a 'sudo' issue: # sudo -u nobody sudo sudo: effective uid is not 0, is sudo installed setuid root? Looking for that error message on the internet I get a FAQ about 'sudo' where they say that: "Sudo must be setuid root to do its work. Either /usr/local/bin/sudo is not owned by uid 0 or the setuid bit is not set." But 'ls -l /usr/bin/sudo' in the chroot gives me the expected result: ---s--x--x 1 root root 125834 May 31 11:37 /usr/bin/sudo At the moment I don't have a clue about what could be causing this problem, though. Alessandro

On Thu, Jul 26, 2012 at 08:06:39PM +0200, Alessandro Pezzoni wrote:
From what I see in the 'makechrootpkg' script, when running 'makeahpkg' 'makepkg' gets called with:
# sudo -u nobody makepkg -s --noconfirm -L
If I try to do that from within the chroot I get the following error, when it comes to install the missing dependencies:
sudo: effective uid is not 0, is sudo installed setuid root?
A minimal test case confirms that this is a 'sudo' issue:
# sudo -u nobody sudo sudo: effective uid is not 0, is sudo installed setuid root?
Looking for that error message on the internet I get a FAQ about 'sudo' where they say that: "Sudo must be setuid root to do its work. Either /usr/local/bin/sudo is not owned by uid 0 or the setuid bit is not set." But 'ls -l /usr/bin/sudo' in the chroot gives me the expected result:
---s--x--x 1 root root 125834 May 31 11:37 /usr/bin/sudo
At the moment I don't have a clue about what could be causing this problem, though.
This is a long shot, but how is the partition where your chroot lives mounted? There is an option to disallow setuid root on an entire device by specifying 'nosuid' in /etc/fstab. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. -- Alan Kay
participants (2)
-
Alessandro Pezzoni
-
Magnus Therning