[arch-haskell] working with HABS

大神天照 flaeme.flow at gmail.com
Sun Jan 19 05:53:47 UTC 2014


Darn Gmail, forgot to 'Reply all'. Text of what I said:
No, the upgrade goes fine. The problem is with makechrootpkg's
download_sources function. It, depending on if $SUDO_USER is set, either
sudo's to $SUDO_USER and runs makepkg to check the sources or runs makepkg
with --asroot. However, makeahpkg ALWAYS calls makechrootpkg, and in fact
everything, through sudo. So when makechrootpkg reaches download_sources,
$SUDO_USER is root, and makepkg is ran as root without --asroot. Oops. The
easiest way to "fix" this would to do something like s/sudo // on
makeahpkg, and run that version of makeahpkg via sudo.
On Jan 16, 2014 12:14 AM, "Linus Arver" <linusarver at gmail.com> wrote:

> Hi Magnus --
>
> On Wed, Jan 15, 2014 at 02:41:01PM +0100, Magnus Therning wrote:
> > On Wed, Jan 15, 2014 at 12:29 AM, Linus Arver <linusarver at gmail.com>
> wrote:
> > > Hello,
> > >
> > > I want to compile HABS packages with the 'makeahpkg' script but the
> uses
> > > of 'sudo' require me to enter my root password every once in a while.
> > > This is annoying because I cannot just do
> > >
> > >     ./makeahpkg -c -- $(cblrepo build base | tail -n +2)
> > >
> > > and let it run overnight. In fact, at one instance the script just
> > > exited on its own because I did not enter the root pasword in time. Is
> > > there a workaround for this?
> >
> > The easiest way is to remove password prompting while building.  That
> > does compromise security somewhat though.
>
> How do you do remove password prompting entirely? I could change the
> timeout for sudo but that feels a bit hacky.
>
> > You can also try to run the
> > script as root, then `sudo` becomes a no-op.  The building uses a
> > chroot, which is why root access is necessary.
>
> I tried running the script as root, but then `makeahpkg` complains:
>
>     ==> Creating updated database file 'repo.db.tar.gz'
>     *** Skipping build in /home/l/prog/foreign/habs/haskell-tagsoup
>     *** Building in /home/l/prog/foreign/habs/haskell-th-lift
>     :: Synchronizing package databases...
>      repo                    23.3 KiB  0.00B/s 00:00 [##############] 100%
>      haskell                256.1 KiB  1778K/s 00:00 [##############] 100%
>      core is up to date
>      extra                 1529.6 KiB  2.63M/s 00:01 [##############] 100%
>      community                2.0 MiB  3.10M/s 00:01 [##############] 100%
>     :: Starting full system upgrade...
>      there is nothing to do
>     ==> ERROR: Running makepkg as root is a BAD idea and can cause
>     permanent,
>     catastrophic damage to your system. If you wish to run as root, please
>     use the --asroot option.
>     ==> ERROR: Could not download sources.
>
> This is probably from the call to "pacman -Syu --noconfirm" from line
> 598 in /usr/bin/makechrootpkg.
>
> > > Also does anyone have recommendations for web storage services that
> > > would work well with hosting my build of HABS packages? I've tried
> > > DropBox but the current AUR package for it is unusable, at least with
> > > Xmonad.
> >
> > There is always the option of using the pre-built packages.
> > Information can be found at
> >
> https://wiki.archlinux.org/index.php/Haskell_package_guidelines#Haskell_packages
>
> What I want to do is contribute built packages to HABS, as per your
> message in
> http://www.haskell.org/pipermail/arch-haskell/2012-March/001954.html .
> Maybe I should start small and just manually give you links to packages
> one at a time, but I imagine this could get tedious at some point...
> whereupon I would need to find decent web storage/hosting.
>
> -L
>
> >
> > /M
> >
> > --
> > Magnus Therning                      OpenPGP: 0xAB4DFBA4
> > email: magnus at therning.org   jabber: magnus at therning.org
> > twitter: magthe               http://therning.org/magnus
> _______________________________________________
> arch-haskell mailing list
> arch-haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/arch-haskell
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/arch-haskell/attachments/20140118/2bc33f3a/attachment.html>


More information about the arch-haskell mailing list