https://wiki.archlinux.org/api.php?action=feedcontributions&user=Magus&feedformat=atomArchWiki - User contributions [en]2024-03-29T09:14:13ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Unofficial_user_repositories/ArchHaskell&diff=532731Unofficial user repositories/ArchHaskell2018-08-07T22:03:26Z<p>Magus: Remove myself.</p>
<hr />
<div>[[Category:Package development]]<br />
[[ja:非公式ユーザーリポジトリ/ArchHaskell]]<br />
The ArchHaskell group works on providing [[Haskell]] packages to the wider Arch Linux community. The goal is to provide all of [http://hackage.haskell.org Hackage] as binary packages for easy installation.<br />
<br />
== Resources ==<br />
<br />
The main resources for the ArchHaskell community to interact and discuss are:<br />
<br />
* #archlinux-haskell IRC channel @ freenode.org<br />
* arch-haskell@haskell.org [http://haskell.org/mailman/listinfo/arch-haskell mailing list] and [http://www.haskell.org/pipermail/arch-haskell archives]<br />
* [https://github.com/archhaskell ArchHaskell group] on GitHub<br />
<br />
== Membership ==<br />
<br />
Membership is not required at all in order to contribute. Just fork the relevant repository, make some changes, and file a pull request.<br />
<br />
There are currently two people with commit rights to the ArchHaskell repository at GitHub:<br />
<br />
* David Nicholaeff<br />
* Leif Warner<br />
<br />
== Available repositories ==<br />
<br />
=== haskell-core ===<br />
<br />
{{Out of date|The state of the repository xsounds.org is unclear, there was a report of it being retired ([https://mail.haskell.org/pipermail/arch-haskell/2017-October/004994.html]) but as of February 2018 it's still available.}}<br />
<br />
{{Note|The ''haskell-core'' repository is currently unmaintained and down. If you wish to help, please send a mail to the list or use the IRC channel.}}<br />
<br />
The ''haskell-core'' repository is the base repository of packages maintained by the ArchHaskell team.<br />
''haskell-core'' can be accessed by adding the following entry to {{ic|/etc/pacman.conf}} (above [community], to ensure the correct '''ghc''' package is picked):<br />
<br />
{{Warning|Placing ''haskell-core'' above ''community'' will cause packages from ''haskell-core'' to take precedence, and avoid dependency conflicts in case of duplicate packages. Overriding [[official repositories]] is however '''not''' supported.}}<br />
<br />
[haskell-core]<br />
<nowiki>Server = http://xsounds.org/~haskell/core/$arch</nowiki><br />
<br />
The set of packages in the ''haskell-core'' repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
The repositories provide both file listings (by using {{ic|repo-add --files}}), package deltas ({{ic|repo-add --delta}}), and both packages and the database are signed. The fingerprint of the key used for signing is:<br />
<br />
pub 2048D/4209170B 2012-12-26<br />
Key fingerprint = F310 4992 EBF2 4EB8 72B9 7B9C 32B0 B453 4209 170B<br />
uid ArchHaskell (Magnus Therning) <magnus@therning.org><br />
sub 2048D/A418C0FE 2012-12-26<br />
<br />
If you use {{ic|SigLevel &#61; Required TrustedOnly}} in {{ic|/etc/pacman.conf}} for ''haskell-core'', then you need to do the following to add Magnus Therning's key:<br />
<br />
# pacman-key -r 4209170B<br />
# pacman-key --lsign-key 4209170B<br />
<br />
Force a refresh of all package lists:<br />
<br />
# pacman -Syu<br />
<br />
=== haskell-happstack ===<br />
<br />
The ''haskell-happstack'' repository contains packages for web development based on the [http://happstack.com/ Happstack] framework. It requires [[#haskell-core]], and includes most of the Happstack packages in [http://hackage.haskell.org/ HackageDB], plus [http://gitit.net/ Gitit] (package name {{ic|haskell-gitit}}) and [http://clckwrks.com/ clckwrks], all their dependencies not in ''haskell-core'' and some other not web related packages. To enable the repository, add the following entry to {{ic|/etc/pacman.conf}}:<br />
<br />
[haskell-happstack]<br />
<nowiki>Server = http://noaxiom.org/$repo/$arch</nowiki><br />
<br />
Add and sign the maintainer's key:<br />
<br />
# pacman-key -r B0544167<br />
# pacman-key --lsign-key B0544167<br />
<br />
Bug reports and feature requests in [https://github.com/tensor5/haskell-happstack/issues GitHub].<br />
<br />
=== haskell-web ===<br />
<br />
{{Note|The ''haskell-web'' repository is not maintained anymore. If you wish to help, please send a mail to the list or use the IRC channel.}}<br />
The repository was built on ''haskell-core'', providing several more packages, especially those useful for web applications.<br />
<br />
[haskell-web]<br />
<nowiki>Server = http://archhaskell.mynerdside.com/$repo/$arch</nowiki><br />
<br />
== Improving ArchHaskell ==<br />
<br />
=== Community ===<br />
<br />
See the [[#Resources]] and get in touch via the mailing list or the IRC channel.<br />
<br />
=== Overview ===<br />
<br />
The plan is to have one user-facing repository, ''haskell'', which merges the packages available in various satellite repositories (like ''haskell-web''), thereby distributing the maintenance load.<br />
One satellite repository is special, the ''haskell-core'' repository, which provides packages that are dependencies of all the other satellites.<br />
<br />
=== haskell-core maintenance ===<br />
<br />
Ensure:<br />
* ''haskell-core'' is an Arch repository hosted at kiwilight and xsounds.<br />
* ''haskell-core'' is in sync with the [https://github.com/archhaskell/habs habs] cblrepo database.<br />
<br />
=== Other repository maintenance ===<br />
<br />
For example, for haskell-foo, ensure:<br />
* haskell-foo is a cblrepo database, possibly using packages from ''haskell-core'' as DistroPkgs.<br />
* Whenever ''haskell-core'' is updated, haskell-foo's database is updated to match within a reasonable time.<br />
<br />
=== Creating another repository ===<br />
<br />
{{Expansion|TODO}}<br />
<br />
=== List of satellite repositories ===<br />
<br />
{{Expansion|TODO}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Switching to ArchHaskell repository ===<br />
<br />
There can be some problems switching to [[#Available repositories|ArchHaskell repository]] when some Haskell packages are already installed from [[official repositories]]. The surest way is to remove all Haskell related packages, synchronize the [[pacman]] packages database, and reinstall all the needed packages. Also for Xmonad users, be sure to install {{ic|haskell-xmonad}} package instead of {{Pkg|xmonad}}.</div>Magushttps://wiki.archlinux.org/index.php?title=Unofficial_user_repositories/ArchHaskell&diff=511999Unofficial user repositories/ArchHaskell2018-02-25T17:57:38Z<p>Magus: Marking myself as removed from the team, since I'm no longer spending time on it. Also putting a note on the current state of haskell-core.</p>
<hr />
<div>[[Category:Package development]]<br />
[[ja:非公式ユーザーリポジトリ/ArchHaskell]]<br />
The ArchHaskell group works on providing [[Haskell]] packages to the wider Arch Linux community. The goal is to provide all of [http://hackage.haskell.org Hackage] as binary packages for easy installation.<br />
<br />
== Resources ==<br />
<br />
The main resources for the ArchHaskell community to interact and discuss are:<br />
<br />
* #archlinux-haskell IRC channel @ freenode.org<br />
* arch-haskell@haskell.org [http://haskell.org/mailman/listinfo/arch-haskell mailing list] and [http://www.haskell.org/pipermail/arch-haskell archives]<br />
* [https://github.com/archhaskell ArchHaskell group] on GitHub<br />
<br />
== Membership ==<br />
<br />
Membership is not required at all in order to contribute. Just fork the relevant repository, make some changes, and file a pull request.<br />
<br />
There are currently two people with commit rights to the ArchHaskell repository at GitHub:<br />
<br />
* Leif Warner<br />
* <s>Magnus Therning</s> (in the process of leaving the group)<br />
<br />
== Available repositories ==<br />
<br />
=== haskell-core ===<br />
<br />
{{Out of date|The state of the repository xsounds.org is unclear, there was a report of it being retired ([https://mail.haskell.org/pipermail/arch-haskell/2017-October/004994.html]) but as of February 2018 it's still available.}}<br />
<br />
{{Note|The ''haskell-core'' repository is currently not actively maintained. If you wish to help, please send a mail to the list or use the IRC channel.}}<br />
<br />
The ''haskell-core'' repository is the base repository of packages maintained by the ArchHaskell team.<br />
''haskell-core'' can be accessed by adding the following entry to {{ic|/etc/pacman.conf}} (above [community], to ensure the correct '''ghc''' package is picked):<br />
<br />
{{Warning|Placing ''haskell-core'' above ''community'' will cause packages from ''haskell-core'' to take precedence, and avoid dependency conflicts in case of duplicate packages. Overriding [[official repositories]] is however '''not''' supported.}}<br />
<br />
[haskell-core]<br />
<nowiki>Server = http://xsounds.org/~haskell/core/$arch</nowiki><br />
<br />
The set of packages in the ''haskell-core'' repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
The repositories provide both file listings (by using {{ic|repo-add --files}}), package deltas ({{ic|repo-add --delta}}), and both packages and the database are signed. The fingerprint of the key used for signing is:<br />
<br />
pub 2048D/4209170B 2012-12-26<br />
Key fingerprint = F310 4992 EBF2 4EB8 72B9 7B9C 32B0 B453 4209 170B<br />
uid ArchHaskell (Magnus Therning) <magnus@therning.org><br />
sub 2048D/A418C0FE 2012-12-26<br />
<br />
If you use {{ic|SigLevel &#61; Required TrustedOnly}} in {{ic|/etc/pacman.conf}} for ''haskell-core'', then you need to do the following to add Magnus Therning's key:<br />
<br />
# pacman-key -r 4209170B<br />
# pacman-key --lsign-key 4209170B<br />
<br />
Force a refresh of all package lists:<br />
<br />
# pacman -Syu<br />
<br />
=== haskell-happstack ===<br />
<br />
The ''haskell-happstack'' repository contains packages for web development based on the [http://happstack.com/ Happstack] framework. It requires [[#haskell-core]], and includes most of the Happstack packages in [http://hackage.haskell.org/ HackageDB], plus [http://gitit.net/ Gitit] (package name {{ic|haskell-gitit}}) and [http://clckwrks.com/ clckwrks], all their dependencies not in ''haskell-core'' and some other not web related packages. To enable the repository, add the following entry to {{ic|/etc/pacman.conf}}:<br />
<br />
[haskell-happstack]<br />
<nowiki>Server = http://noaxiom.org/$repo/$arch</nowiki><br />
<br />
Add and sign the maintainer's key:<br />
<br />
# pacman-key -r B0544167<br />
# pacman-key --lsign-key B0544167<br />
<br />
Bug reports and feature requests in [https://github.com/tensor5/haskell-happstack/issues GitHub].<br />
<br />
=== haskell-web ===<br />
<br />
{{Note|The ''haskell-web'' repository is not maintained anymore. If you wish to help, please send a mail to the list or use the IRC channel.}}<br />
The repository was built on ''haskell-core'', providing several more packages, especially those useful for web applications.<br />
<br />
[haskell-web]<br />
<nowiki>Server = http://archhaskell.mynerdside.com/$repo/$arch</nowiki><br />
<br />
== Improving ArchHaskell ==<br />
<br />
=== Community ===<br />
<br />
See the [[#Resources]] and get in touch via the mailing list or the IRC channel.<br />
<br />
=== Overview ===<br />
<br />
The plan is to have one user-facing repository, ''haskell'', which merges the packages available in various satellite repositories (like ''haskell-web''), thereby distributing the maintenance load.<br />
One satellite repository is special, the ''haskell-core'' repository, which provides packages that are dependencies of all the other satellites.<br />
<br />
=== haskell-core maintenance ===<br />
<br />
Ensure:<br />
* ''haskell-core'' is an Arch repository hosted at kiwilight and xsounds.<br />
* ''haskell-core'' is in sync with the [https://github.com/archhaskell/habs habs] cblrepo database.<br />
<br />
=== Other repository maintenance ===<br />
<br />
For example, for haskell-foo, ensure:<br />
* haskell-foo is a cblrepo database, possibly using packages from ''haskell-core'' as DistroPkgs.<br />
* Whenever ''haskell-core'' is updated, haskell-foo's database is updated to match within a reasonable time.<br />
<br />
=== Creating another repository ===<br />
<br />
{{Expansion|TODO}}<br />
<br />
=== List of satellite repositories ===<br />
<br />
{{Expansion|TODO}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Switching to ArchHaskell repository ===<br />
<br />
There can be some problems switching to [[#Available repositories|ArchHaskell repository]] when some Haskell packages are already installed from [[official repositories]]. The surest way is to remove all Haskell related packages, synchronize the [[pacman]] packages database, and reinstall all the needed packages. Also for Xmonad users, be sure to install {{ic|haskell-xmonad}} package instead of {{Pkg|xmonad}}.</div>Magushttps://wiki.archlinux.org/index.php?title=LDAP_authentication&diff=418819LDAP authentication2016-02-02T13:47:03Z<p>Magus: /* 4. PAM Configuration */ Add 'forward_pass' to the 'auth' setting in PAM, apparently pam_sss doesn't put the password on the PAM stack by default. Without this local (non-root) users get prompted twice for their password.</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[[ja:LDAP 認証]]<br />
{{Related articles start}}<br />
{{Related|OpenLDAP}}<br />
{{Related|LDAP Hosts}}<br />
{{Related articles end}}<br />
<br />
== Introduction and Concepts ==<br />
<br />
This is a guide on how to configure an Arch Linux installation to authenticate against an LDAP directory. This LDAP directory can be either local (installed on the same computer) or network (e.g. in a lab environment where central authentication is desired).<br />
<br />
The guide is divided into two parts. The first part deals with how to setup an [[OpenLDAP]] server that hosts the authentication directory. The second part deals with how to setup the NSS and PAM modules that are required for the authentication scheme to work on the client computers. If you just want to configure Arch to authenticate against an already existing LDAP server, you can skip to the second part.<br />
<br />
=== NSS and PAM ===<br />
NSS (which stands for Name Service Switch) is a system mechanism to configure different sources for common configuration databases. For example, {{ic|/etc/passwd}} is a {{ic|file}} type source for the {{ic|passwd}} database.<br />
<br />
PAM (which stands for Pluggable Authentication Module) is a mechanism used by Linux (and most *nixes) to extend its authentication schemes based on different plugins.<br />
<br />
So to summarize, we need to configure NSS to use the OpenLDAP server as a source for the {{ic|passwd}}, {{ic|shadow}} and other configuration databases and then configure PAM to use these sources to authenticate its users.<br />
<br />
== LDAP Server Setup ==<br />
<br />
=== Installation ===<br />
<br />
You can read about installation and basic configuration in the [[OpenLDAP]] article. After you have completed that, return here.<br />
<br />
=== Set up access controls ===<br />
<br />
To make sure that no-one can read the (encrypted) passwords from the LDAP server, but a user can edit their own password, add the following to {{ic|/etc/openldap/slapd.conf}} and restart {{ic|slapd.service}} afterwards:<br />
<br />
{{hc|slapd.conf|2=<br />
access to attrs=userPassword<br />
by self write<br />
by anonymous auth<br />
by dn.base="cn=Manager,dc=example,dc=org" write<br />
by * none<br />
<br />
access to *<br />
by self write<br />
by dn.base="cn=Manager,dc=example,dc=org" write<br />
by * read<br />
<br />
}}<br />
<br />
=== Populate LDAP Tree with Base Data ===<br />
<br />
Create a temporarily file called {{ic|base.ldif}} with the following text.<br />
{{note|If you have a different domain name then alter "example" and "org" to your needs}}<br />
<br />
{{hc|base.ldif|<nowiki><br />
# example.org<br />
dn: dc=example,dc=org<br />
dc: example<br />
o: Example Organization<br />
objectClass: dcObject<br />
objectClass: organization<br />
<br />
# Manager, example.org<br />
dn: cn=Manager,dc=example,dc=org<br />
cn: Manager<br />
description: LDAP administrator<br />
objectClass: organizationalRole<br />
objectClass: top<br />
roleOccupant: dc=example,dc=org<br />
<br />
# People, example.org<br />
dn: ou=People,dc=example,dc=org<br />
ou: People<br />
objectClass: top<br />
objectClass: organizationalUnit<br />
<br />
# Groups, example.org<br />
dn: ou=Groups,dc=example,dc=org<br />
ou: Groups<br />
objectClass: top<br />
objectClass: organizationalUnit<br />
</nowiki>}}<br />
<br />
Add it to your OpenLDAP Tree:<br />
<br />
$ ldapadd -D "cn=Manager,dc=example,dc=org" -W -f base.ldif<br />
<br />
Test to make sure the data was imported:<br />
<br />
$ ldapsearch -x -b 'dc=example,dc=org' '(objectclass=*)'<br />
<br />
=== Adding users ===<br />
To manually add a user, create an {{ic|.ldif}} file like this:<br />
{{hc|user_joe.ldif|<nowiki><br />
dn: uid=johndoe,ou=People,dc=example,dc=org<br />
objectClass: top<br />
objectClass: person<br />
objectClass: organizationalPerson<br />
objectClass: inetOrgPerson<br />
objectClass: posixAccount<br />
objectClass: shadowAccount<br />
uid: johndoe<br />
cn: John Doe<br />
sn: Doe<br />
givenName: John<br />
title: Guinea Pig<br />
telephoneNumber: +0 000 000 0000<br />
mobile: +0 000 000 0000<br />
postalAddress: AddressLine1$AddressLine2$AddressLine3<br />
userPassword: {CRYPT}xxxxxxxxxx<br />
labeledURI: https://archlinux.org/<br />
loginShell: /bin/bash<br />
uidNumber: 9999<br />
gidNumber: 9999<br />
homeDirectory: /home/johndoe/<br />
description: This is an example user<br />
</nowiki>}}<br />
<br />
The {{ic|xxxxxxxxxx}} in the {{ic|userPassword}} entry should be replaced with the value in {{ic|/etc/shadow}} or use the {{ic|slappasswd}} command. Now add the user:<br />
<br />
$ ldapadd -D "cn=Manager,dc=example,dc=org" -W -f user_joe.ldif<br />
<br />
{{Note|You can automatically migrate all of your local accounts (and groups, etc.) to the LDAP directory using PADL Software's [http://www.padl.com/OSS/MigrationTools.html Migration Tools].}}<br />
<br />
== Client Setup ==<br />
<br />
Install the OpenLDAP client as described in [[OpenLDAP]]. Make sure you can query the server with {{ic|ldapsearch}}.<br />
<br />
Next, [[install]] {{pkg|nss-pam-ldapd}} from the [[official repositories]].<br />
<br />
=== NSS Configuration ===<br />
NSS is a system facility which manages different sources as configuration databases. For example, {{ic|/etc/passwd}} is a {{ic|file}} type source for the {{ic|passwd}} database, which stores the user accounts.<br />
<br />
Edit {{ic|/etc/nsswitch.conf}} which is the central configuration file for NSS. It tells NSS which sources to use for which system databases. We need to add the {{ic|ldap}} directive to the {{ic|passwd}}, {{ic|group}} and {{ic|shadow}} databases, so be sure your file looks like this:<br />
<br />
passwd: files ldap<br />
group: files ldap<br />
shadow: files ldap<br />
<br />
Edit {{ic|/etc/nslcd.conf}} and change the {{ic|base}} and {{ic|uri}} lines to fit your ldap server setup.<br />
<br />
Start {{ic|nslcd.service}} using systemd.<br />
<br />
You now should see your LDAP users when running {{ic|getent passwd}} on the client.<br />
<br />
=== PAM Configuration ===<br />
The basic rule of thumb for PAM configuration is to include {{ic|pam_ldap.so}} wherever {{ic|pam_unix.so}} is included. Arch moving to {{pkg|pambase}} has helped decrease the amount of edits required. For more details about configuring pam, the [https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Smart_Cards/PAM_Configuration_Files.html RedHat Documentation] is quite good. You might also want the upstream documentation for [http://arthurdejong.org/nss-pam-ldapd nss-pam-ldapd].<br />
<br />
{{Tip|If you want to prevent UID clashes with local users on your system, you might want to include {{ic|minimum_uid&#61;10000}} or similar on the end of the {{ic|pam_ldap.so}} lines. You will have to make sure the LDAP server returns uidNumber fields that match the restriction.}}<br />
<br />
{{Note|Each facility (auth, session, password, account) forms a separate chain and the order matters. Sufficient lines will sometimes "short circuit" and skip the rest of the section, so the rule of thumb for ''auth'', ''password'', and ''account'' is ''sufficient'' lines before ''required'', but after required lines for the ''session'' section; ''optional'' can almost always go at the end. When adding your {{ic|pam_ldap.so}} lines, do not change the relative order of the other lines without good reason! Simply insert LDAP within the chain.}}<br />
<br />
First edit {{ic|/etc/pam.d/system-auth}}. This file is included in most of the other files in {{ic|pam.d}}, so changes here propagate nicely. Updates to {{pkg|pambase}} may change this file.<br />
<br />
Make {{ic|pam_ldap.so}} sufficient at the top of each section, except in the ''session'' section, where we make it optional.<br />
{{hc|/etc/pam.d/system-auth|<br />
'''auth sufficient pam_ldap.so'''<br />
auth required pam_unix.so try_first_pass nullok<br />
auth optional pam_permit.so<br />
auth required pam_env.so<br />
<br />
'''account sufficient pam_ldap.so'''<br />
account required pam_unix.so<br />
account optional pam_permit.so<br />
account required pam_time.so<br />
<br />
'''password sufficient pam_ldap.so'''<br />
password required pam_unix.so try_first_pass nullok sha512 shadow<br />
password optional pam_permit.so<br />
<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
'''session optional pam_ldap.so'''<br />
session optional pam_permit.so<br />
}}<br />
<br />
Then edit both {{ic|/etc/pam.d/su}} and {{ic|/etc/pam.d/su-l}} identically. The {{ic|su-l}} file is used when the user runs {{ic|su --login}}.<br />
<br />
Make {{ic|pam_ldap.so}} sufficient at the top of each section, and add {{ic|use_first_pass}} to {{ic|pam_unix}} in the ''auth'' section.<br />
{{hc|/etc/pam.d/su|<br />
#%PAM-1.0<br />
'''auth sufficient pam_ldap.so'''<br />
auth sufficient pam_rootok.so<br />
# Uncomment the following line to implicitly trust users in the "wheel" group.<br />
#auth sufficient pam_wheel.so trust use_uid<br />
# Uncomment the following line to require a user to be in the "wheel" group.<br />
#auth required pam_wheel.so use_uid<br />
auth required pam_unix.so '''use_first_pass'''<br />
'''account sufficient pam_ldap.so'''<br />
account required pam_unix.so<br />
'''session sufficient pam_ldap.so'''<br />
session required pam_unix.so<br />
}}<br />
<br />
To enable users to edit their password, edit {{ic|/etc/pam.d/passwd}}:<br />
<br />
{{hc|/etc/pam.d/passwd|2=<br />
#%PAM-1.0<br />
'''password sufficient pam_ldap.so'''<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
#password required pam_unix.so sha512 shadow use_authtok<br />
password required pam_unix.so sha512 shadow nullok<br />
}}<br />
<br />
==== Create home folders at login ====<br />
<br />
If you want home folders to be created at login (eg: if you are not using NFS to store home folders), edit {{ic|/etc/pam.d/system-login}} and add {{ic|pam_mkhomedir.so}} to the ''session'' section above any "sufficient" items. This will cause home folder creation when logging in at a tty, from ssh, xdm, kdm, gdm, etc. You might choose to edit additional files in the same way, such as {{ic|/etc/pam.d/su}} and {{ic|/etc/pam.d/su-l}} to enable it for {{ic|su}} and {{ic|su --login}}. If you do not want to do this for ssh logins, edit {{ic|system-local-login}} instead of {{ic|system-login}}, etc.<br />
<br />
{{hc|/etc/pam.d/system-login|<br />
...top of file not shown...<br />
session optional pam_loginuid.so<br />
session include system-auth<br />
session optional pam_motd.so motd&#61;/etc/motd<br />
session optional pam_mail.so dir&#61;/var/spool/mail standard quiet<br />
-session optional pam_systemd.so<br />
session required pam_env.so<br />
'''session required pam_mkhomedir.so skel&#61;/etc/skel umask&#61;0022'''<br />
}}<br />
<br />
{{hc|/etc/pam.d/su-l|<br />
...top of file not shown...<br />
'''session required pam_mkhomedir.so skel&#61;/etc/skel umask&#61;0022'''<br />
session sufficient pam_ldap.so<br />
session required pam_unix.so<br />
}}<br />
<br />
==== Enable sudo ====<br />
<br />
To enable sudo from an LDAP user, edit {{ic|/etc/pam.d/sudo}}. You will also need to modify sudoers accordingly.<br />
{{hc|/etc/pam.d/sudo|<br />
#%PAM-1.0<br />
'''auth sufficient pam_ldap.so'''<br />
auth required pam_unix.so '''try_first_pass'''<br />
auth required pam_nologin.so<br />
}}<br />
<br />
You will also need to add in {{ic|/etc/openldap/ldap.conf}} the following.<br />
{{hc|/etc/openldap/ldap.conf|2=<br />
sudoers_base ou=sudoers,dc=AFOLA<br />
}}<br />
<br />
== Online and Offline Authentication with SSSD ==<br />
<br />
SSSD is a system daemon. Its primary function is to provide access to identity and authentication remote resource through a common framework that can provide caching and offline support to the system. It provides PAM and NSS modules, and in the future will D-BUS based interfaces for extended user information. It provides also a better database to store local users as well as extended user data.<br />
<br />
=== General Package Details ===<br />
<br />
{{pkg|sssd}} is a package available from [[official repositories]].<br />
<br />
=== How to enable SSSD for basic Authentication ===<br />
<br />
==== 1. SSSD Configuration ====<br />
<br />
If it does not exist create {{ic|/etc/sssd/sssd.conf}}.<br />
{{hc|/etc/sssd/sssd.conf|2=<br />
[sssd]<br />
config_file_version = 2<br />
services = nss, pam<br />
domains = LDAP<br />
<br />
[domain/LDAP]<br />
cache_credentials = true<br />
<br />
id_provider = ldap<br />
auth_provider = ldap<br />
<br />
ldap_uri = ldap://server1.example.org, ldap://server2.example.org<br />
ldap_search_base = dc=example,dc=org<br />
ldap_id_use_start_tls = true<br />
ldap_tls_reqcert = demand<br />
ldap_tls_cacert = /etc/openldap/certs/cacerts.pem<br />
chpass_provider = ldap<br />
ldap_chpass_uri = ldap://server1.example.org<br />
entry_cache_timeout = 600<br />
ldap_network_timeout = 2<br />
ldap_group_member = uniquemember<br />
}}<br />
<br />
The above is an example only. See {{ic|man sssd.conf}} for the full details.<br />
<br />
Finally set the file permissions {{ic|chmod 600 /etc/sssd/sssd.conf}} otherwise sssd will fail to start.<br />
<br />
==== 2. NSCD Configuration ====<br />
<br />
Disable caching for both the passwd and group entries in {{ic|/etc/nscd.conf}} as it will interfere with sssd caching.<br />
<br />
==== 3. NSS Configuration ====<br />
<br />
Edit {{ic|/etc/nsswitch.conf}} as follows.<br />
{{hc|/etc/nsswitch.conf|<br />
# Begin /etc/nsswitch.conf<br />
<br />
passwd: files sss<br />
group: files sss<br />
shadow: files sss<br />
sudoers: files sss<br />
<br />
publickey: files<br />
<br />
hosts: files dns myhostname<br />
networks: files<br />
<br />
protocols: files<br />
services: files<br />
ethers: files<br />
rpc: files<br />
<br />
netgroup: files<br />
<br />
# End /etc/nsswitch.conf<br />
}}<br />
<br />
==== 4. PAM Configuration ====<br />
<br />
The first step is to edit {{ic|/etc/pam.d/system-auth}} as follows.<br />
{{hc|/etc/pam.d/system-auth|2=<br />
#%PAM-1.0<br />
<br />
auth sufficient pam_sss.so forward_pass<br />
auth required pam_unix.so try_first_pass nullok<br />
auth optional pam_permit.so<br />
auth required pam_env.so<br />
<br />
account [default=bad success=ok user_unknown=ignore] pam_sss.so<br />
account required pam_unix.so<br />
account optional pam_permit.so<br />
account required pam_time.so<br />
<br />
password sufficient pam_sss.so use_authtok<br />
password required pam_unix.so try_first_pass nullok sha512 shadow<br />
password optional pam_permit.so<br />
<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
session optional pam_sss.so<br />
session optional pam_permit.so<br />
}}<br />
<br />
===== 1. SUDO Configuration =====<br />
<br />
Edit {{ic|/etc/pam.d/sudo}} as follows.<br />
{{hc|/etc/pam.d/sudo|<br />
#%PAM-1.0<br />
auth sufficient pam_sss.so<br />
auth required pam_unix.so try_first_pass<br />
auth required pam_nologin.so<br />
}}<br />
<br />
===== 2. Password Management =====<br />
<br />
In order to enable users to change their passwords using {{ic|passwd}} edit {{ic|/etc/pam.d/passwd}} as follows.<br />
{{hc|/etc/pam.d/passwd|2=<br />
#%PAM-1.0<br />
password sufficient pam_sss.so<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
#password required pam_unix.so sha512 shadow use_authtok<br />
password required pam_unix.so sha512 shadow nullok<br />
}}<br />
<br />
Start sssd with {{ic|systemctl start sssd}} and enable it with {{ic|systemctl enable sssd}}.<br />
<br />
You should now be able to see details of your ldap users with {{ic|getent passwd <username>}} or {{ic|id <username>}}.<br />
<br />
Once you have logged in with a user the credentials will be cached and you will be able to login using the cached credentials when the ldap server is offline or unavailable.<br />
<br />
== Resources ==<br />
* [http://arthurdejong.org/nss-pam-ldapd/setup The official page of the nss-pam-ldapd packet]<br />
* The PAM and NSS page at the Debian Wiki [http://wiki.debian.org/LDAP/NSS 1] [http://wiki.debian.org/LDAP/PAM 2]<br />
* [https://www.fatofthelan.com/technical/using-ldap-for-single-authentication/ Using LDAP for single authentication]<br />
* [http://www.cs.dixie.edu/ldap/ Heterogeneous Network Authentication Introduction]<br />
* [http://readlist.com/lists/suse.com/suse-linux-e/36/182642.html Discussion on suse's mailing lists about nss-pam-ldapd]<br />
* [https://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/chap-SSSD_User_Guide-Introduction.html Fedora's SSSD User Guide]</div>Magushttps://wiki.archlinux.org/index.php?title=Talk:Unofficial_user_repositories/ArchHaskell&diff=375140Talk:Unofficial user repositories/ArchHaskell2015-05-26T07:47:03Z<p>Magus: Add a comment explaining why [haskell-core] has to go above [extra].</p>
<hr />
<div>== above extra ==<br />
<br />
In [https://wiki.archlinux.org/index.php/ArchHaskell#Available_repositories this section], it is said that haskell-core should be above extra but at the sane time we are warning users about that. So what's that? We have to clarify that?--[[User:Xan|Xan]] ([[User talk:Xan|talk]]) 07:18, 26 May 2015 (UTC)<br />
: I mean this: "above [extra], to ensure the correct ghc package is picked)" and this "Placing [haskell-core] above [extra] will cause packages from [haskell-core] to take precedence, and avoid dependency conflicts in case of duplicate package". It seems contradictorial. Thanks Magus. --[[User:Xan|Xan]] ([[User talk:Xan|talk]]) 07:38, 26 May 2015 (UTC)<br />
<br />
:: I don't see any contradiction, both statements say that if you '''don't''' place [haskell-core] above [extra] you will run into problems. Please feel free to change the text as you see fit. The issue with putting [haskell-core] '''below''' [extra] is that then packages from [extra] will be preferred, and since the packages in [haskell-core] are compiled against ''ghc'' from [haskell-core] one will have a non-functioning Haskell system if one installs ''ghc'' from [extra]. [[User:Magus|Magus]] ([[User talk:Magus|talk]]) 07:47, 26 May 2015 (UTC)</div>Magushttps://wiki.archlinux.org/index.php?title=Unofficial_user_repositories/ArchHaskell&diff=375137Unofficial user repositories/ArchHaskell2015-05-26T07:35:56Z<p>Magus: An attempt at clarifying why [haskell-core] must go above [extra].</p>
<hr />
<div>[[Category:Package development]]<br />
The ArchHaskell group works on providing [[Haskell]] packages to the wider Arch Linux community. The goal is to provide all of [http://hackage.haskell.org Hackage] as binary packages for easy installation.<br />
<br />
== Resources ==<br />
<br />
The main resources for the [[ArchHaskell]] community to interact and discuss are:<br />
<br />
* #archlinux-haskell IRC channel @ freenode.org<br />
* arch-haskell@haskell.org [http://haskell.org/mailman/listinfo/arch-haskell mailing list] and [http://www.haskell.org/pipermail/arch-haskell archives]<br />
* [https://github.com/archhaskell ArchHaskell group] on GitHub<br />
<br />
== Membership ==<br />
<br />
Membership is not required at all in order to contribute. Just fork the relevant repository, make some changes, and file a pull request.<br />
<br />
There are currently two people with commit rights to the ArchHaskell repository at GitHub:<br />
<br />
* Magnus Therning<br />
* Leif Warner<br />
<br />
== Available repositories ==<br />
<br />
=== [haskell-core] ===<br />
<br />
The [haskell-core] repository is the base repository of packages maintained by the ArchHaskell team.<br />
[haskell-core] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}} (above [extra], to ensure the correct '''ghc''' package is picked):<br />
<br />
[haskell-core]<br />
<nowiki>Server = http://xsounds.org/~haskell/core/$arch</nowiki><br />
<br />
or a mirror (updated daily):<br />
<br />
[haskell-core]<br />
<nowiki>Server = http://orbitalfox.com/haskell/core/$arch</nowiki><br />
<br />
The set of packages in the [haskell-core] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
{{Warning|Placing [haskell-core] above [extra] will cause packages from [haskell-core] to take precedence, and avoid dependency conflicts in case of duplicate packages. Overriding [[official repositories]] is however '''not''' supported.}}<br />
<br />
The repositories provide both file listings (by using {{ic|repo-add --files}}), package deltas ({{ic|repo-add --delta}}), and both packages and the database are signed. The fingerprint of the key used for signing is:<br />
<br />
pub 2048D/4209170B 2012-12-26<br />
Key fingerprint = F310 4992 EBF2 4EB8 72B9 7B9C 32B0 B453 4209 170B<br />
uid ArchHaskell (Magnus Therning) <magnus@therning.org><br />
sub 2048D/A418C0FE 2012-12-26<br />
<br />
If you use {{ic|SigLevel &#61; Required TrustedOnly}} in {{ic|/etc/pacman.conf}} for [haskell-core], then you need to do the following to add Magnus Therning's key:<br />
<br />
# pacman-key -r 4209170B<br />
# pacman-key --lsign-key 4209170B<br />
<br />
Force a refresh of all package lists:<br />
<br />
# pacman -Syy<br />
<br />
=== [haskell-happstack] ===<br />
<br />
The [haskell-happstack] repository contains packages for web development based on the [http://happstack.com/ Happstack] framework. It requires [[Haskell_Package_Guidelines#.5Bhaskell-core.5D|[haskell-core]]], and includes most of the Happstack packages in [http://hackage.haskell.org/ HackageDB], plus [http://gitit.net/ Gitit] (package name {{ic|haskell-gitit}}) and [http://clckwrks.com/ clckwrks], all their dependencies not in [haskell-core] and some other not web related packages. To enable the repository, add the following entry to {{ic|/etc/pacman.conf}}:<br />
<br />
[haskell-happstack]<br />
<nowiki>Server = http://noaxiom.org/$repo/$arch</nowiki><br />
<br />
Add and sign the maintainer's key:<br />
<br />
# pacman-key -r B0544167<br />
# pacman-key --lsign-key B0544167<br />
<br />
Bug reports and feature requests in [https://github.com/tensor5/haskell-happstack/issues GitHub].<br />
<br />
=== [haskell-web] ===<br />
<br />
{{Note|The [haskell-web] repository is not maintained anymore. If you wish to help, please send a mail to the list or use the IRC channel.}}<br />
The repository was built on [haskell-core], providing several more packages, especially those useful for web applications.<br />
<br />
[haskell-web]<br />
<nowiki>Server = http://archhaskell.mynerdside.com/$repo/$arch</nowiki><br />
<br />
== Improving ArchHaskell ==<br />
<br />
=== Community ===<br />
<br />
See the [[ArchHaskell]] community page and get in touch via the mailing list or the IRC channel.<br />
<br />
=== Overview ===<br />
<br />
The plan is to have one user-facing repository, [haskell], which merges the packages available in various satellite repositories (like [haskell-web]), thereby distributing the maintenance load.<br />
One satellite repo is special, the [haskell-core] repository, which provides packages that are dependencies of all the other satellites.<br />
<br />
=== [haskell-core] maintenance ===<br />
<br />
Ensure:<br />
* [haskell-core] is an Arch repo hosted at kiwilight and xsounds.<br />
* [haskell-core] is in sync with the [https://github.com/archhaskell/habs habs] cblrepo database.<br />
<br />
=== Other repo maintenance ===<br />
<br />
For example, for haskell-foo, ensure:<br />
* haskell-foo is a cblrepo database, possibly using packages from [haskell-core] as DistroPkgs.<br />
* Whenever [haskell-core] is updated, haskell-foo's database is updated to match within a reasonable time.<br />
<br />
=== Creating another repo ===<br />
<br />
=== List of satellite repos ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Switching to ArchHaskell repository ===<br />
<br />
There can be some problems switching to [[#ArchHaskell repository|ArchHaskell repository]] when some Haskell packages are already installed from [[official repositories]]. The surest way is to remove all Haskell related packages, synchronize the [[pacman]] packages database, and reinstall all the needed packages. Also for Xmonad users, be sure to install {{ic|haskell-xmonad}} package instead of {{Pkg|xmonad}}.</div>Magushttps://wiki.archlinux.org/index.php?title=Unofficial_user_repositories/ArchHaskell&diff=365052Unofficial user repositories/ArchHaskell2015-03-11T16:51:30Z<p>Magus: Remove mentions of kiwilight, that server hasn't worked for a while.</p>
<hr />
<div>[[Category:Package development]]<br />
The ArchHaskell group works on providing [[Haskell]] packages to the wider Arch Linux community. The goal is to provide all of [http://hackage.haskell.org Hackage] as binary packages for easy installation.<br />
<br />
== Resources ==<br />
<br />
The main resources for the [[ArchHaskell]] community to interact and discuss are:<br />
<br />
* #archlinux-haskell IRC channel @ freenode.org<br />
* arch-haskell@haskell.org [http://haskell.org/mailman/listinfo/arch-haskell mailing list] and [http://www.haskell.org/pipermail/arch-haskell archives]<br />
* [https://github.com/archhaskell ArchHaskell group] on GitHub<br />
<br />
== Membership ==<br />
<br />
Membership is not required at all in order to contribute. Just fork the relevant repository, make some changes, and file a pull request.<br />
<br />
There are currently two people with commit rights to the ArchHaskell repository at GitHub:<br />
<br />
* Magnus Therning<br />
* Leif Warner<br />
<br />
== Available repositories ==<br />
<br />
=== [haskell-core] ===<br />
<br />
The [haskell-core] repository is the base repository of packages maintained by the ArchHaskell team.<br />
[haskell-core] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}} (above [extra]):<br />
<br />
[haskell-core]<br />
<nowiki>Server = http://xsounds.org/~haskell/core/$arch</nowiki><br />
<br />
The set of packages in the [haskell-core] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
{{Warning|Placing [haskell-core] above [extra] will cause packages from [haskell-core] to take precedence, and avoid dependency conflicts in case of duplicate packages. Overriding [[official repositories]] is however '''not''' supported.}}<br />
<br />
The repositories provide both file listings (by using {{ic|repo-add --files}}), package deltas ({{ic|repo-add --delta}}), and both packages and the database are signed. The fingerprint of the key used for signing is:<br />
<br />
pub 2048D/4209170B 2012-12-26<br />
Key fingerprint = F310 4992 EBF2 4EB8 72B9 7B9C 32B0 B453 4209 170B<br />
uid ArchHaskell (Magnus Therning) <magnus@therning.org><br />
sub 2048D/A418C0FE 2012-12-26<br />
<br />
If you use {{ic|SigLevel &#61; Required TrustedOnly}} in {{ic|/etc/pacman.conf}} for [haskell-core], then you need to do the following to add Magnus Therning's key:<br />
<br />
# pacman-key -r 4209170B<br />
# pacman-key --lsign-key 4209170B<br />
<br />
Force a refresh of all package lists:<br />
<br />
# pacman -Syy<br />
<br />
=== [haskell-happstack] ===<br />
<br />
The [haskell-happstack] repository contains packages for web development based on the [http://happstack.com/ Happstack] framework. It requires [[Haskell_Package_Guidelines#.5Bhaskell-core.5D|[haskell-core]]], and includes most of the Happstack packages in [http://hackage.haskell.org/ HackageDB], plus [http://gitit.net/ Gitit] (package name {{ic|haskell-gitit}}) and [http://clckwrks.com/ clckwrks], all their dependencies not in [haskell-core] and some other not web related packages. To enable the repository, add the following entry to {{ic|/etc/pacman.conf}}:<br />
<br />
[haskell-happstack]<br />
<nowiki>Server = http://noaxiom.org/$repo/$arch</nowiki><br />
<br />
Add and sign the maintainer's key:<br />
<br />
# pacman-key -r B0544167<br />
# pacman-key --lsign-key B0544167<br />
<br />
Bug reports and feature requests in [https://github.com/tensor5/haskell-happstack/issues GitHub].<br />
<br />
=== [haskell-web] ===<br />
<br />
{{Note|The [haskell-web] repository is not maintained anymore. If you wish to help, please send a mail to the list or use the IRC channel.}}<br />
The repository was built on [haskell-core], providing several more packages, especially those useful for web applications.<br />
<br />
[haskell-web]<br />
<nowiki>Server = http://archhaskell.mynerdside.com/$repo/$arch</nowiki><br />
<br />
== Improving ArchHaskell ==<br />
<br />
=== Community ===<br />
<br />
See the [[ArchHaskell]] community page and get in touch via the mailing list or the IRC channel.<br />
<br />
=== Overview ===<br />
<br />
The plan is to have one user-facing repository, [haskell], which merges the packages available in various satellite repositories (like [haskell-web]), thereby distributing the maintenance load.<br />
One satellite repo is special, the [haskell-core] repository, which provides packages that are dependencies of all the other satellites.<br />
<br />
=== [haskell-core] maintenance ===<br />
<br />
Ensure:<br />
* [haskell-core] is an Arch repo hosted at kiwilight and xsounds.<br />
* [haskell-core] is in sync with the [https://github.com/archhaskell/habs habs] cblrepo database.<br />
<br />
=== Other repo maintenance ===<br />
<br />
For example, for haskell-foo, ensure:<br />
* haskell-foo is a cblrepo database, possibly using packages from [haskell-core] as DistroPkgs.<br />
* Whenever [haskell-core] is updated, haskell-foo's database is updated to match within a reasonable time.<br />
<br />
=== Creating another repo ===<br />
<br />
=== List of satellite repos ===<br />
<br />
== Troubleshooting ==<br />
<br />
=== Switching to ArchHaskell repository ===<br />
<br />
There can be some problems switching to [[#ArchHaskell repository|ArchHaskell repository]] when some Haskell packages are already installed from [[official repositories]]. The surest way is to remove all Haskell related packages, synchronize the [[pacman]] packages database, and reinstall all the needed packages. Also for Xmonad users, be sure to install {{ic|haskell-xmonad}} package instead of {{Pkg|xmonad}}.</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=243643Haskell package guidelines2013-01-12T21:22:40Z<p>Magus: /* [haskell-core] */</p>
<hr />
<div>[[Category:Package development]]<br />
[[it:Haskell Package Guidelines]]<br />
{{Package Guidelines}}<br />
<br />
[[Wikipedia:Haskell|Haskell]] is well supported on Arch Linux.<br />
GHC and a few core packages are available in the [[Official Repositories|official repositories]].<br />
For more serious Haskellers, the [[ArchHaskell]] community project provides many packages from [http://hackage.haskell.org Hackage], and the number is growing.<br />
<br />
See the [[ArchHaskell]] community page for contact details and ways to help.<br />
<br />
== Haskell Packages ==<br />
To use Haskell on Arch Linux, you have two mutually exclusive options:<br />
# Use packages from the official Arch Linux repositories. These are a well maintained small subset of all Haskell packages. Just install them the way you would install anything else on Arch Linux. Examples of what is available: in the [https://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 extra] and [https://www.archlinux.org/packages/?arch=x86_64&repo=Community&q=haskell&last_update=&limit=50 community] repositories. The packages here should satisfy people who just want to use the Haskell Platform. You may also combine this option with other packages from unofficial sources like the AUR.<br />
# Use the ArchHaskell project's unofficial repositories. These contain a much larger subset of what's available on Hackage. As a community effort, we often need volunteers to help maintain and add more packages to these repositories. Read on for information about using them.<br />
<br />
=== [haskell-core] ===<br />
The [haskell-core] repository is the base repository of packages maintained by the ArchHaskell team.<br />
[haskell-core] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}} (above [extra]):<br />
<br />
[haskell-core]<br />
Server = http://xsounds.org/~haskell/core/$arch<br />
<br />
or<br />
<br />
[haskell-core]<br />
Server = http://www.kiwilight.com/haskell/core/$arch<br />
<br />
The set of packages in the [haskell-core] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
Putting [haskell-core] above [extra] will ensure that the packages from [haskell-core] take precedence, in case of duplicate packages in the two repositories.<br />
<br />
The repositories provide both file listings (by using {{ic|repo-add --files}}), package deltas ({{ic|repo-add --delta}}), and both packages and the database are signed. The fingerprint of the key used for signing is:<br />
<br />
pub 2048D/4209170B 2012-12-26<br />
Key fingerprint = F310 4992 EBF2 4EB8 72B9 7B9C 32B0 B453 4209 170B<br />
uid ArchHaskell (Magnus Therning) <magnus@therning.org><br />
sub 2048D/A418C0FE 2012-12-26<br />
<br />
=== [haskell-web] ===<br />
The [haskell-web] repository builds on [haskell], providing several more packages, especially those useful for web applications.<br />
<br />
[haskell-web]<br />
Server = http://archhaskell.mynerdside.com/$repo/$arch<br />
<br />
Add it after [haskell].<br />
<br />
=== Last resorts ===<br />
* [https://aur.archlinux.org/packages.php?O=0&K=haskell- Haskell packages in the AUR]<br />
* cabal-install directly<br />
<br />
Unfortunately, many of the packages in the AUR are outdated due to a lack of resources.<br />
If you have the time, it is recommended to use cblrepo and create something like [haskell-web], which can then be added to the collection of haskell-providing repositories.<br />
<br />
== Improving ArchHaskell ==<br />
<br />
=== Community ===<br />
See the [[ArchHaskell]] community page and get in touch via the mailing list or the IRC channel.<br />
<br />
=== Overview ===<br />
The plan is to have one user-facing repository, [haskell], which merges the packages available in various satellite repositories (like [haskell-web]), thereby distributing the maintenance load.<br />
One satellite repo is special, the [haskell-core] repository, which provides packages that are dependencies of all the other satellites.<br />
<br />
=== [haskell-core] maintenance ===<br />
Ensure:<br />
* [haskell-core] is an Arch repo hosted at kiwilight and xsounds.<br />
* [haskell-core] is in sync with the [https://github.com/archhaskell/habs habs] cblrepo database.<br />
<br />
=== Other repo maintenance ===<br />
For example, for haskell-foo, ensure:<br />
* haskell-foo is a cblrepo database, possibly using packages from [haskell-core] as DistroPkgs.<br />
* Whenever [haskell-core] is updated, haskell-foo's database is updated to match within a reasonable time.<br />
<br />
=== Creating another repo ===<br />
<br />
=== List of satellite repos ===</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=241805Haskell package guidelines2012-12-26T16:07:23Z<p>Magus: /* [haskell-core] maintenance */</p>
<hr />
<div>[[Category:Package development]]<br />
[[it:Haskell Package Guidelines]]<br />
{{Package Guidelines}}<br />
<br />
[[Wikipedia:Haskell|Haskell]] is well supported on Arch Linux.<br />
GHC and a few core packages are available in the [[Official Repositories|official repositories]].<br />
For more serious Haskellers, the [[ArchHaskell]] community project provides many packages from [http://hackage.haskell.org Hackage], and the number is growing.<br />
<br />
See the [[ArchHaskell]] community page for contact details and ways to help.<br />
<br />
== Haskell Packages ==<br />
To use Haskell on Arch Linux, you have two mutually exclusive options:<br />
# Use packages from the official Arch Linux repositories. These are a well maintained small subset of all Haskell packages. Just install them the way you would install anything else on Arch Linux. Examples of what is available: in the [https://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 extra] and [https://www.archlinux.org/packages/?arch=x86_64&repo=Community&q=haskell&last_update=&limit=50 community] repositories. The packages here should satisfy people who just want to use the Haskell Platform. You may also combine this option with other packages from unofficial sources like the AUR.<br />
# Use the ArchHaskell project's unofficial repositories. These contain a much larger subset of what's available on Hackage. As a community effort, we often need volunteers to help maintain and add more packages to these repositories. Read on for information about using them.<br />
<br />
=== [haskell-core] ===<br />
The [haskell-core] repository is the base repository of packages maintained by the ArchHaskell team.<br />
[haskell-core] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}} (above [extra]):<br />
<br />
[haskell-core]<br />
Server = http://xsounds.org/~haskell/core/$arch<br />
<br />
or<br />
<br />
[haskell-core]<br />
Server = http://www.kiwilight.com/haskell/core/$arch<br />
<br />
The set of packages in the [haskell-core] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
Putting [haskell-core] above [extra] will ensure that the packages from [haskell-core] take precedence, in case of duplicate packages in the two repositories.<br />
<br />
=== [haskell-web] ===<br />
The [haskell-web] repository builds on [haskell], providing several more packages, especially those useful for web applications.<br />
<br />
[haskell-web]<br />
Server = http://archhaskell.mynerdside.com/$repo/$arch<br />
<br />
Add it after [haskell].<br />
<br />
=== Last resorts ===<br />
* [https://aur.archlinux.org/packages.php?O=0&K=haskell- Haskell packages in the AUR]<br />
* cabal-install directly<br />
<br />
Unfortunately, many of the packages in the AUR are outdated due to a lack of resources.<br />
If you have the time, it is recommended to use cblrepo and create something like [haskell-web], which can then be added to the collection of haskell-providing repositories.<br />
<br />
== Improving ArchHaskell ==<br />
<br />
=== Community ===<br />
See the [[ArchHaskell]] community page and get in touch via the mailing list or the IRC channel.<br />
<br />
=== Overview ===<br />
The plan is to have one user-facing repository, [haskell], which merges the packages available in various satellite repositories (like [haskell-web]), thereby distributing the maintenance load.<br />
One satellite repo is special, the [haskell-core] repository, which provides packages that are dependencies of all the other satellites.<br />
<br />
=== [haskell-core] maintenance ===<br />
Ensure:<br />
* [haskell-core] is an Arch repo hosted at kiwilight and xsounds.<br />
* [haskell-core] is in sync with the [https://github.com/archhaskell/habs habs] cblrepo database.<br />
<br />
=== Other repo maintenance ===<br />
For example, for haskell-foo, ensure:<br />
* haskell-foo is a cblrepo database, possibly using packages from [haskell-core] as DistroPkgs.<br />
* Whenever [haskell-core] is updated, haskell-foo's database is updated to match within a reasonable time.<br />
<br />
=== Creating another repo ===<br />
<br />
=== List of satellite repos ===</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=241804Haskell package guidelines2012-12-26T16:06:31Z<p>Magus: /* [haskell] maintenance */ Removed, at least for now, since it isn't true.</p>
<hr />
<div>[[Category:Package development]]<br />
[[it:Haskell Package Guidelines]]<br />
{{Package Guidelines}}<br />
<br />
[[Wikipedia:Haskell|Haskell]] is well supported on Arch Linux.<br />
GHC and a few core packages are available in the [[Official Repositories|official repositories]].<br />
For more serious Haskellers, the [[ArchHaskell]] community project provides many packages from [http://hackage.haskell.org Hackage], and the number is growing.<br />
<br />
See the [[ArchHaskell]] community page for contact details and ways to help.<br />
<br />
== Haskell Packages ==<br />
To use Haskell on Arch Linux, you have two mutually exclusive options:<br />
# Use packages from the official Arch Linux repositories. These are a well maintained small subset of all Haskell packages. Just install them the way you would install anything else on Arch Linux. Examples of what is available: in the [https://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 extra] and [https://www.archlinux.org/packages/?arch=x86_64&repo=Community&q=haskell&last_update=&limit=50 community] repositories. The packages here should satisfy people who just want to use the Haskell Platform. You may also combine this option with other packages from unofficial sources like the AUR.<br />
# Use the ArchHaskell project's unofficial repositories. These contain a much larger subset of what's available on Hackage. As a community effort, we often need volunteers to help maintain and add more packages to these repositories. Read on for information about using them.<br />
<br />
=== [haskell-core] ===<br />
The [haskell-core] repository is the base repository of packages maintained by the ArchHaskell team.<br />
[haskell-core] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}} (above [extra]):<br />
<br />
[haskell-core]<br />
Server = http://xsounds.org/~haskell/core/$arch<br />
<br />
or<br />
<br />
[haskell-core]<br />
Server = http://www.kiwilight.com/haskell/core/$arch<br />
<br />
The set of packages in the [haskell-core] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
Putting [haskell-core] above [extra] will ensure that the packages from [haskell-core] take precedence, in case of duplicate packages in the two repositories.<br />
<br />
=== [haskell-web] ===<br />
The [haskell-web] repository builds on [haskell], providing several more packages, especially those useful for web applications.<br />
<br />
[haskell-web]<br />
Server = http://archhaskell.mynerdside.com/$repo/$arch<br />
<br />
Add it after [haskell].<br />
<br />
=== Last resorts ===<br />
* [https://aur.archlinux.org/packages.php?O=0&K=haskell- Haskell packages in the AUR]<br />
* cabal-install directly<br />
<br />
Unfortunately, many of the packages in the AUR are outdated due to a lack of resources.<br />
If you have the time, it is recommended to use cblrepo and create something like [haskell-web], which can then be added to the collection of haskell-providing repositories.<br />
<br />
== Improving ArchHaskell ==<br />
<br />
=== Community ===<br />
See the [[ArchHaskell]] community page and get in touch via the mailing list or the IRC channel.<br />
<br />
=== Overview ===<br />
The plan is to have one user-facing repository, [haskell], which merges the packages available in various satellite repositories (like [haskell-web]), thereby distributing the maintenance load.<br />
One satellite repo is special, the [haskell-core] repository, which provides packages that are dependencies of all the other satellites.<br />
<br />
=== [haskell-core] maintenance ===<br />
Ensure:<br />
* [haskell-core] is an Arch repo hosted at (xsounds?).<br />
* [haskell-core] is in sync with the [https://github.com/archhaskell/habs habs] cblrepo database.<br />
<br />
=== Other repo maintenance ===<br />
For example, for haskell-foo, ensure:<br />
* haskell-foo is a cblrepo database, possibly using packages from [haskell-core] as DistroPkgs.<br />
* Whenever [haskell-core] is updated, haskell-foo's database is updated to match within a reasonable time.<br />
<br />
=== Creating another repo ===<br />
<br />
=== List of satellite repos ===</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=241803Haskell package guidelines2012-12-26T16:02:22Z<p>Magus: /* [haskell] */ Renaming to haskell-core.</p>
<hr />
<div>[[Category:Package development]]<br />
[[it:Haskell Package Guidelines]]<br />
{{Package Guidelines}}<br />
<br />
[[Wikipedia:Haskell|Haskell]] is well supported on Arch Linux.<br />
GHC and a few core packages are available in the [[Official Repositories|official repositories]].<br />
For more serious Haskellers, the [[ArchHaskell]] community project provides many packages from [http://hackage.haskell.org Hackage], and the number is growing.<br />
<br />
See the [[ArchHaskell]] community page for contact details and ways to help.<br />
<br />
== Haskell Packages ==<br />
To use Haskell on Arch Linux, you have two mutually exclusive options:<br />
# Use packages from the official Arch Linux repositories. These are a well maintained small subset of all Haskell packages. Just install them the way you would install anything else on Arch Linux. Examples of what is available: in the [https://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 extra] and [https://www.archlinux.org/packages/?arch=x86_64&repo=Community&q=haskell&last_update=&limit=50 community] repositories. The packages here should satisfy people who just want to use the Haskell Platform. You may also combine this option with other packages from unofficial sources like the AUR.<br />
# Use the ArchHaskell project's unofficial repositories. These contain a much larger subset of what's available on Hackage. As a community effort, we often need volunteers to help maintain and add more packages to these repositories. Read on for information about using them.<br />
<br />
=== [haskell-core] ===<br />
The [haskell-core] repository is the base repository of packages maintained by the ArchHaskell team.<br />
[haskell-core] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}} (above [extra]):<br />
<br />
[haskell-core]<br />
Server = http://xsounds.org/~haskell/core/$arch<br />
<br />
or<br />
<br />
[haskell-core]<br />
Server = http://www.kiwilight.com/haskell/core/$arch<br />
<br />
The set of packages in the [haskell-core] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
Putting [haskell-core] above [extra] will ensure that the packages from [haskell-core] take precedence, in case of duplicate packages in the two repositories.<br />
<br />
=== [haskell-web] ===<br />
The [haskell-web] repository builds on [haskell], providing several more packages, especially those useful for web applications.<br />
<br />
[haskell-web]<br />
Server = http://archhaskell.mynerdside.com/$repo/$arch<br />
<br />
Add it after [haskell].<br />
<br />
=== Last resorts ===<br />
* [https://aur.archlinux.org/packages.php?O=0&K=haskell- Haskell packages in the AUR]<br />
* cabal-install directly<br />
<br />
Unfortunately, many of the packages in the AUR are outdated due to a lack of resources.<br />
If you have the time, it is recommended to use cblrepo and create something like [haskell-web], which can then be added to the collection of haskell-providing repositories.<br />
<br />
== Improving ArchHaskell ==<br />
<br />
=== Community ===<br />
See the [[ArchHaskell]] community page and get in touch via the mailing list or the IRC channel.<br />
<br />
=== Overview ===<br />
The plan is to have one user-facing repository, [haskell], which merges the packages available in various satellite repositories (like [haskell-web]), thereby distributing the maintenance load.<br />
One satellite repo is special, the [haskell-core] repository, which provides packages that are dependencies of all the other satellites.<br />
<br />
=== [haskell-core] maintenance ===<br />
Ensure:<br />
* [haskell-core] is an Arch repo hosted at (xsounds?).<br />
* [haskell-core] is in sync with the [https://github.com/archhaskell/habs habs] cblrepo database.<br />
<br />
=== [haskell] maintenance ===<br />
Ensure:<br />
* [haskell] is an Arch repo hosted at (unknown).<br />
* Whenever all satellite repositories' databases are in sync with [haskell-core]'s, packages from all of them are put into [haskell].<br />
<br />
=== Other repo maintenance ===<br />
For example, for haskell-foo, ensure:<br />
* haskell-foo is a cblrepo database, possibly using packages from [haskell-core] as DistroPkgs.<br />
* Whenever [haskell-core] is updated, haskell-foo's database is updated to match within a reasonable time.<br />
<br />
=== Creating another repo ===<br />
<br />
=== List of satellite repos ===</div>Magushttps://wiki.archlinux.org/index.php?title=Unofficial_user_repositories/ArchHaskell&diff=225118Unofficial user repositories/ArchHaskell2012-09-25T21:11:50Z<p>Magus: /* Membership */ Adjusting the list of members.</p>
<hr />
<div>[[Category:Package development]]<br />
The ArchHaskell group works on providing Haskell packages to the wider Arch Linux community. The ultimate goal is to provide all of [http://hackage.haskell.org Hackage] as binary packages for easy installation. We are still a long way away :-)<br />
<br />
See also [[Haskell package guidelines]].<br />
<br />
== Resources ==<br />
<br />
The main resources for the [[ArchHaskell]] community to interact and discuss are:<br />
<br />
* [http://www.gogloom.com/FreeNode/arch-haskell <nowiki>#arch-haskell</nowiki>] IRC channel @ freenode.org<br />
** Good for quick discussion and planning<br />
** Currently severely underpopulated<br />
* [http://haskell.org/mailman/listinfo/arch-haskell arch-haskell@haskell.org] mailing list<br />
** Broader announcements, and automated updates<br />
** Currently very low traffic, but responses do come.<br />
** Also, check the archives.<br />
* [https://github.com/archhaskell ArchHaskell group] on GitHub<br />
** Repositories for tools as well as the source for the binary packages (HABS).<br />
<br />
== Membership ==<br />
<br />
Due to using GitHub for the source repositories, membership is not required at all in order to contribute. Just fork the relevant repository, make some changes, and file a pull request.<br />
<br />
There are currently three people with commit rights to the ArchHaskell repository at GitHub:<br />
<br />
* Magnus Therning<br />
* Leif Warner</div>Magushttps://wiki.archlinux.org/index.php?title=Pm-utils&diff=215701Pm-utils2012-07-30T22:04:23Z<p>Magus: Adding section on editing the GRUB2 defaults.</p>
<hr />
<div>[[Category:Power management]]<br />
[[it:Pm-utils]]<br />
[[ru:Pm-utils]]<br />
[[zh-CN:Pm-utils]]{{DISPLAYTITLE:pm-utils}}<br />
{{Article summary start}}<br />
{{Article summary text|Describes installing, configuring, using and troubleshooting pm-utils, the new suspend and powerstate setting framework.}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Uswsusp}}<br />
{{Article summary wiki|Tuxonice}}<br />
{{Article summary end}}<br />
'''pm-utils''' is the new suspend and powerstate setting framework. It is designed to replace such scripts as those provided by the {{ic|powersave}} package.<br />
<br />
pm-utils can be thought of as a collection of shell scripts that wrap the kernel mode suspend/resume with the various hacks. These hacks are needed to work around bugs in drivers and subsystems that are not yet aware of suspend. It is easily extensible by putting custom hooks into a directory, which can either be done by the system administrator or those hooks can be part of a package, especially if this package needs special attention during a system suspend or power state transition.<br />
<br />
A lesser known feature is one that mimics toggling done by [[Laptop Mode Tools]], although the responsible scripts have been deleted from the Arch Linux package.<br />
<br />
Used in conjunction with the [[cpufrequtils]] package, notebook (and desktop) owners are provided with a complete power management suite.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] the {{Pkg|pm-utils}} package which is available in the [[Official Repositories|official repositories]].<br />
<br />
{{Note|If you run into issues when resuming video, it might be necessary to also install {{Pkg|vbetool}} from the [[Official Repositories|official repositories]].}}<br />
<br />
{{Note|If you are starting from a clean install, make sure that you have {{Pkg|acpi}} installed.}}<br />
<br />
Run {{ic|pm-suspend}} or {{ic|pm-hibernate}} as root to trigger suspend manually. The suspend scripts write log to {{ic|/var/log/pm-suspend.log}}.<br />
<br />
=== suspend backend ===<br />
<br />
The Arch Linux package ships with support for the following backends: {{ic|kernel}}, {{ic|tuxonice}} and {{ic|uswsusp}} which can be seen from command:<br />
pacman -Ql pm-utils | grep module.d<br />
<br />
Suspend backend is specified by the {{ic|SLEEP_MODULE}} configuration variable in {{ic|/etc/pm/config.d}} and defaults to the {{ic|kernel}} backend. To use the alternative suspend backends the respective packages need to be installed. Both of these are available in the [[Arch User Repository]]:<br />
* uswsusp - {{AUR|uswsusp-git}}<br />
* tuxonice - {{AUR|linux-ice}} / [[linux-pf]]<br />
<br />
Furthermore, {{Pkg|pm-utils}} ships with its own video quirks database in {{ic|/usr/lib/pm-utils/video-quirks/}}.<br />
<br />
== Basic Configuration ==<br />
=== Standby / Suspend to RAM ===<br />
In the ideal case, running {{ic|pm-suspend}} as root should initiate suspend to memory, meaning that all running state will be preserved in RAM and all components other than RAM will be shut down to conserve power. Pressing the power button should initiate a resume from this state.<br />
<br />
In some cases, it is possible that running {{ic|pm-suspend}} causes hangs or other issues. This may be due to specific "misbehaving" modules. If you know which modules could cause such issues, adding a {{ic|SUSPEND_MODULES}} config to {{Ic|/etc/pm/config.d/modules}} of the form:<br />
SUSPEND_MODULES="uhci_hd button ehci_hd"<br />
should cause these modules to be specifically unloaded before suspend and reloaded after resume.<br />
<br />
To configure invoking {{ic|pm-suspend}} automatically on power events like laptop lid close, please refer to [[Acpid]].<br />
<br />
=== Hibernation (suspend2disk) ===<br />
In order for suspend2disk (hibernate) to work, the parameter {{ic|1=resume=SWAP_PARTITION}} has to be passed to the [[Kernel parameters]] (where {{ic|SWAP_PARTITION}} is either your swap device, i.e. {{ic|/dev/sda'''X'''}}, or your swap UUID) .Consult [[Kernel parameters]] for more info.<br />
<br />
==== Editing GRUB2's defaults ====<br />
The easiest way to modify the kernel parameters is to edit the default for GRUB2 held in {{ic|/etc/defaults/grub}}. If {{ic|/dev/sda5}} is your swap partition then change {{ic|GRUB_CMDLINE_LINUX}} to:<br />
<br />
{{bc|1=GRUB_CMDLINE_LINUX="resume=/dev/sda5"}}<br />
<br />
Don't forget to run {{ic|grub-mkconfig}} afterwards.<br />
<br />
==== Including GRUB2's os-prober lines ====<br />
According to the [http://wiki.debian.org/Grub#Configuring_grub_v2 debian wiki], here is a handy solution for GRUB2 that will insert the resume line with the swap device the system is using when running the script. Replace (line 141):<br />
{{bc|1=linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} }}<br />
with:<br />
{{bc|<nowiki>linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} resume=`swapon -s | grep '/dev/sd.[0-9]' -o`</nowiki>}}<br />
<br />
When the machine is placed into hibernation, it will now move all data from RAM to the swap partition.<br />
<br />
For discussion regarding permanence, please refer to [https://bbs.archlinux.org/viewtopic.php?pid=886789#p88678 this thread].<br />
<br />
Even if your swap partition is smaller than RAM, you still have a big chance in hibernating successfully. According to [http://www.mjmwired.net/kernel/Documentation/power/interface.txt kernel documentation]: "''{{ic|/sys/power/image_size}} controls the size of the image created by the suspend-to-disk mechanism [...] which is set to 2/5 of available RAM by default. [...] The suspend-to-disk mechanism will do its best to ensure the image size will not exceed that number.''" You may either decrease it due to a small swap partition or increase it in purpose of possible hibernation speed up.<br />
<br />
{{Warning|You may have to add the {{ic|resume}} hook to {{ic|/etc/mkinitcpio.conf}}, see [[Pm-utils#Mkinitcpio_Resume_Hook|below]]!}}<br />
<br />
==== Suspend to Swap-File ====<br />
If you want to suspend-to-disk without having a Swap partition see https://wiki.archlinux.org/index.php/MacBook#Suspend_to_disk_.28hibernate.29<br />
<br />
=== Mkinitcpio Resume Hook ===<br />
If your system '''still''' doesn't resume from hibernation, even after you've added the proper lines to your grub config files, your system may require the {{ic|resume}} hook be added to the initrd image (even if you use [[LVM]]), otherwise the kernel will '''not''' resume. You can see if this is happening if the hibernation works fine, no error messages appear in {{ic|/var/log/pm-suspend.log}} and the kernel logs the following message: "PM: Hibernation image not present or could not be loaded." To add the resume hook, edit {{ic|/etc/mkinitcpio.conf}} as root and add {{ic|resume}} to the HOOKS array:<br />
HOOKS="base udev autodetect ide scsi sata lvm2 '''''resume''''' filesystems"<br />
<br />
Note that this is an example, and your HOOKS array may look different.<br />
<br />
{{ic|resume}} must be placed ''after'' {{ic|ide}}, {{ic|scsi}}, {{ic|sata}} and/or {{ic|lvm2}}, but before {{ic|filesystems}}. Of course, there has to be an appropriate {{ic|resume}} file in {{ic|/usr/lib/initcpio/hooks}} (formerly {{ic|/lib/initcpio/hooks}}), but it should already be there, as it is part of the {{ic|mkinitcpio}} package.<br />
<br />
Finally, you must rebuild the initrd image for these changes to take effect:<br />
# mkinitcpio -p linux<br />
<br />
{{Note|If you use a custom kernel, then you might have to change the value of the {{ic|-p}} option.}}<br />
<br />
=== Suspend/Hibernate as regular user ===<br />
<br />
Three methods are available to suspend without the need for a root password: using [[Udev]], using UPower, and giving the user the appropriate permissions with [[sudo|visudo]].<br />
<br />
==== UPower method ====<br />
<br />
Install {{Pkg|upower}}. To suspend to RAM:<br />
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \<br />
/org/freedesktop/UPower org.freedesktop.UPower.Suspend<br />
<br />
To suspend to disk (hibernate):<br />
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \<br />
/org/freedesktop/UPower org.freedesktop.UPower.Hibernate<br />
<br />
==== User Permission Method ====<br />
<br />
Because the {{Pkg|pm-utils}} scripts must be run as root, you may want to make the scripts accessible to normal users by running sudo without the root password. To do so, edit the {{ic|/etc/sudoers}} file with {{ic|visudo}} as root. For more information, see [[sudo]].<br />
<br />
Add the following lines, replacing {{ic|''username''}} with your own user name, then save and exit {{ic|visudo}}:<br />
''username'' ALL = NOPASSWD: /usr/sbin/pm-hibernate<br />
''username'' ALL = NOPASSWD: /usr/sbin/pm-suspend<br />
<br />
Or you can enable it for a group, using the following lines, replacing {{ic|''group''}}:<br />
%''group'' ALL = NOPASSWD: /usr/sbin/pm-hibernate<br />
%''group'' ALL = NOPASSWD: /usr/sbin/pm-suspend<br />
<br />
{{Note|These must come after any user privilege specifications, e.g., {{ic|1=username ALL=(ALL) ALL}}, or they will not work.}}<br />
<br />
You can now run the scripts without a password by simply running:<br />
$ sudo pm-hibernate<br />
<br />
or:<br />
<br />
$ sudo pm-suspend<br />
<br />
Also, add yourself to the {{ic|power}} [[Users and Groups|group]] so that way using things like applets to do suspend will work. If you do not do this, when you try to use suspend though things like [[GNOME]]'s shutdown applet, your computer will just play a very annoying loud triple beep and lock the screen.<br />
# gpasswd -a ''username'' power<br />
<br />
You should now be able to use your [[Desktop Environment]]'s power management tools to automatically suspend or hibernate when doing things like closing the laptop lid, running low on battery power, etc.<br />
<br />
===Power saving===<br />
pm-utils supports running commands depending on whether the system is connected to the AC adapter or not; therefore, a script has to be created inside the folder {{ic|/etc/pm/power.d/}}. An example of such a script can be found in the [http://crunchbanglinux.org/forums/post/110148/#p110148 crunchbang forum]. Be aware that upower must be running in order to detect changing AC states [https://bbs.archlinux.org/viewtopic.php?id=132125 (see more information)].<br />
<br />
===Suspend on idle/inactivity===<br />
<br />
One method relies on xautolock program. Add following: {{ic|xautolock -time 30 -locker "sudo pm-suspend" &}} to {{ic|~/.xinitrc}}. This implies that {{ic|pm-suspend}} is called after 30 minutes of inactivity.<br />
<br />
=== Using Swap file instead of regular swap partition ===<br />
<br />
If you want use swap file instead of regular swap patition [[Swap#Swap_file_resuming|read this]].<br />
<br />
== Advanced Configuration ==<br />
The main configuration file is {{ic|/usr/lib/pm-utils/defaults}}. You ''should not edit this file'', since after a package update it might be overwritten with the default settings. Put your config file into {{ic|/etc/pm/config.d/}} instead.<br />
You can just put a simple text file with<br />
SUSPEND_MODULES="button uhci_hcd"<br />
named {{ic|modules}} or {{ic|config}} into {{ic|/etc/pm/config.d}} and it will override the settings in the system-wide configuration file.<br />
<br />
=== Available variables for use in config files ===<br />
;SUSPEND_MODULES="button": the list of modules to be unloaded before suspend<br />
;SLEEP_MODULE="tuxonice uswsusp kernel": the default sleep/wake systems to try<br />
;HIBERNATE_MODE="shutdown": forces the system to shut down rather than reboot<br />
<br />
=== Disabling a hook ===<br />
If a hook is run which you do not like or which you think is not useful or even harmful, we would appreciate a bug report for that.<br />
You can however easily disable hooks by just creating an empty file corresponding to the hook in {{ic|/etc/pm/sleep.d/}}. Say you want to disable the hook {{ic|/usr/lib/pm-utils/sleep.d/45pcmcia}}, you can do this easily by calling<br />
# touch /etc/pm/sleep.d/45pcmcia<br />
Do not set the executable bit on that dummy-hook.<br />
<br />
==== Alternative method ====<br />
Create a file in {{ic|/etc/pm/config.d}} with the modules you want to blacklist in the {{ic|HOOK_BLACKLIST}} variable.<br />
For example, to manage power saving yourself, use:<br />
HOOK_BLACKLIST="hal-cd-polling intel-audio-powersave journal-commit laptop-mode pcie_aspm readahead sata_alpm sched-powersave xfs_buffer wireless"<br />
<br />
=== Creating your own hooks ===<br />
If you want to do something specific to your setup during suspend or hibernate, then you can easily put your own hook into {{ic|/etc/pm/sleep.d}}. The hooks in this directory will be called in alphabetic order during suspend (that is the reason their names all start with 2 digits, to make the ordering explicit) and in the reverse order during resume. The general convention to be followed on number ordering is:.<br />
;00 - 49: User and most package supplied hooks. If a hook assumes that all of the usual services and userspace infrastructure is still running, it should be here.<br />
;50 - 74: Service handling hooks. Hooks that start or stop a service belong in this range. At or before 50, hooks can assume that all services are still enabled.<br />
;75 - 89: Module and non-core hardware handling. If a hook needs to load/unload a module, or if it needs to place non-video hardware that would otherwise break suspend or hibernate into a safe state, it belongs in this range. At or before 75, hooks can assume all modules are still loaded.<br />
;90 - 99: Reserved for critical suspend hooks.<br />
<br />
I am showing a pretty useless demonstration hook here, that will just put some informative lines into your log file:<br />
<br />
#!/bin/bash<br />
case $1 in<br />
hibernate)<br />
echo "Hey guy, we are going to suspend to disk!"<br />
;;<br />
suspend)<br />
echo "Oh, this time we are doing a suspend to RAM. Cool!"<br />
;;<br />
thaw)<br />
echo "Oh, suspend to disk is over, we are resuming..."<br />
;;<br />
resume)<br />
echo "Hey, the suspend to RAM seems to be over..."<br />
;;<br />
*) echo "Somebody is calling me totally wrong."<br />
;;<br />
esac<br />
<br />
Put this into {{ic|/etc/pm/sleep.d/66dummy}}, do a {{ic|chmod +x /etc/pm/sleep.d/66dummy}} and it will spew some useless lines during suspend and resume.<br />
<br />
{{Warning|All the hooks run as root. This means that you need to be careful when creating temporary files, check that the {{ic|PATH}} environment variable is set correctly, etc. to avoid security problems.}}<br />
<br />
== How it works ==<br />
The concept is quite easy: the main script ({{ic|pm-action}}, called via symlinks as either {{ic|pm-suspend}}, {{ic|pm-hibernate}} or {{ic|pm-suspend-hybrid}}) executes so-called "hooks", executable scripts, in the alphabetical sorted order with the parameter {{ic|suspend}} (suspend to RAM) or {{ic|hibernate}} (suspend to disk).<br />
Once all hooks are done, it puts the machine to sleep. After the machine has woken up again, all those hooks are executed in reverse order with the parameter {{ic|resume}} (resume from RAM) or {{ic|thaw}} (resume from disk).<br />
The hooks perform various tasks, such as preparing the bootloader, stopping the Bluetooth subsystem, or unloading of critical modules.<br />
<br />
Both {{ic|pm-suspend}} and {{ic|pm-hibernate}} are usually called from [[Udev]], initiated by desktop applets like {{Pkg|gnome-power-manager}} or {{ic|kpowersave}}.<br />
<br />
{{Note|{{ic|suspend-hybrid}} is a placeholder right now -- it is not completely implemented.}}<br />
<br />
There is also the possibility to set the machine into high-power and low-power mode, the command {{ic|pm-powersave}} is used with an additional parameter of {{ic|true}} or {{ic|false}}. It works basically the same as the suspend framework.<br />
<br />
The hooks for suspend are placed in<br />
;{{ic|/usr/lib/pm-utils/sleep.d}}: distribution / package provided hooks<br />
;{{ic|/etc/pm/sleep.d}}: hooks added by the system administrator<br />
<br />
The hooks for the power state are placed in <br />
;{{ic|/usr/lib/pm-utils/power.d}}: distribution / package provided hooks<br />
;{{ic|/etc/pm/power.d}}: hooks added by the system administrator<br />
<br />
Hooks in {{ic|/etc/pm/}} take precedence over those in {{ic|/usr/lib/pm-utils/}}, so the system administrator can override the defaults provided by the distribution.<br />
<br />
=== Pm-suspend internals ===<br />
<br />
This outlines the internal actions when {{ic|pm-suspend}} is run, describing how {{ic|pm-utils}} gracefully falls back onto the kernel method if the requirements of other methods are not met.<br />
<br />
$ pm-suspend<br />
<br />
The first step is set-up preliminary variables and source parent scripts:<br />
export STASHNAME=pm-suspend<br />
export METHOD="$(echo ${0##*pm-} |tr - _)"<br />
. "/usr/lib/pm-utils/pm-functions"<br />
<br />
The variable {{Ic|METHOD}} is extracted from the executable name, ''suspend'' from {{ic|pm-suspend}} and ''hibernate'' from {{ic|pm-hibernate}}.<br />
<br />
The location of runtime configuration parameters is defined in {{Ic|/usr/lib/pm-utils/pm-functions}} as ''PM_UTILS_RUNDIR="/var/run/pm-utils"'' and ''STORAGEDIR="${PM_UTILS_RUNDIR}/${STASHNAME}/storage"''. Therefore ''STORAGEDIR="/var/run/pm-utils/pm-suspend/storage"''; this is where {{ic|pm-suspend}} will cache its configuration. Disabled hooks are stored as plain text files with the hook name prefixed by "''disable_hook:''". Configuration parameters are appended to the ''parameters'' file:<br />
$ ls -lah /var/run/pm-utils/pm-suspend/storage/<br />
-rw-r--r-- 1 root root 20 May 19 09:57 disable_hook:99video<br />
-rw-r--r-- 1 root root 0 May 19 02:59 parameters<br />
-rw-r--r-- 1 root root 247 May 19 02:59 parameters.rm<br />
-rw-r--r-- 1 root root 9 May 19 02:59 state:cpu0_governor<br />
-rw-r--r-- 1 root root 9 May 19 02:59 state:cpu1_governor<br />
<br />
Then {{Ic|pm-functions}} will source the files located in {{Ic|/etc/pm/config.d/}} in addition to {{Ic|/usr/lib/pm-utils/defaults}}. Upon returning, {{Ic|pm-functions}} will proceed to source the files specified by '''$SLEEP_METHOD''' as {{Ic|/usr/lib/pm-utils/module.d/$SLEEP_METHOD[...]}} if they exist:<br />
for mod in $SLEEP_MODULE; do<br />
mod="${PM_UTILS_LIBDIR}/module.d/${mod}"<br />
[ -f "$mod" ] || continue<br />
. "$mod"<br />
done<br />
<br />
Otherwise, if '''$SLEEP_MODULE''' is empty, {{Ic|do_suspend()}} will be set to the kernel backend as described above:<br />
if [ -z "$SUSPEND_MODULE" ]; then<br />
if grep -q mem /sys/power/state; then<br />
SUSPEND_MODULE="kernel"<br />
do_suspend() { echo -n "mem" >/sys/power/state; }<br />
elif [ -c /dev/pmu ] && pm-pmu --check; then<br />
SUSPEND_MODULE="kernel"<br />
do_suspend() { pm-pmu --suspend; }<br />
elif grep -q standby /sys/power/state; then<br />
SUSPEND_MODULE="kernel"<br />
do_suspend() { echo -n "standby" >/sys/power/state; }<br />
fi<br />
fi<br />
<br />
Assuming '''$SLEEP_MODULE''' is not empty and {{Ic|uswsusp}} is specified, {{Ic|/usr/lib/pm-utils/module.d/uswsusp}} is executed. This script checks several requirements (these are the requirements for being able to use uswsusp):<br />
* [ -z $SUSPEND_MODULE ]<br />
* command_exists s2ram<br />
* grep -q mem /sys/power/state || ( [ -c /dev/pmu ] && pm-pmu --check; );<br />
If these requirements are met, do_suspend() is defined as:<br />
do_suspend()<br />
{<br />
uswsusp_get_quirks<br />
s2ram --force $OPTS<br />
}<br />
Most importantly, the {{Ic|uswsusp}} module runs:<br />
add_before_hooks uswsusp_hooks<br />
add_module_help uswsusp_help<br />
The first function, ''add_before_hook'' disables the '''pm-utils''' hooks '''99video''' since this functionality is subsumed by '''s2ram'''.<br />
The second function, ''add_module_help'', adds uswsusp-module-specific help, which in essence replaces the help function provided by '''99video'''.<br />
<br />
Back to {{Ic|pm-suspend}}:<br />
command_exists "check_$METHOD" && command_exists "do_$METHOD"<br />
"check_$METHOD"<br />
This verifies that the ''check_suspend'' and ''do_suspend'' methods have been defined. The ''check_suspend'' method simply verifies that $SUSPEND_MODULE is not empty:<br />
<br />
check_suspend() { [ -n "$SUSPEND_MODULE" ]; }<br />
<br />
Lastly, {{Ic|pm-suspend}} must run all hooks that have not been disabled, sync file-system buffers, and run ''do_suspend'':<br />
if run_hooks sleep "$ACTION $METHOD"; then<br />
# Sleep only if we know how and if a hook did not inhibit us.<br />
log "$(date): performing $METHOD"<br />
sync<br />
"do_$METHOD" || r=128<br />
log "$(date): Awake."<br />
<br />
The method ''run_hooks'' is a wrapper for ''_run_hooks'', which the case of {{ic|pm-suspend}} is called as ''run_hooks sleep "suspend suspend"''. Given that:<br />
PARAMETERS="${STORAGEDIR}/parameters"<br />
PM_UTILS_LIBDIR="/usr/lib/pm-utils"<br />
PM_UTILS_ETCDIR="/etc/pm"<br />
<br />
The method ''_run_hooks'', will for each hook in ''"${PM_UTILS_LIBDIR}/$1.d"'' and ''"${PM_UTILS_ETCDIR}/$1.d"'', check that sleep has not been inhibited and update the runtime parameters stored in ''$PARAMETERS'' before running each hook via ''run_hook $hook $2''. In the case of Suspend-to-RAM, all the hooks in ''{/usr/lib/pm-utils/sleep.d/,/etc/pm/sleep.d/}'' will be enumerated, and ''run_hook'' will be passed the parameters ''$hook'' and "''suspend suspend''". The method ''run_hook'' uses the ''hook_ok'' function to verify that the hook has not been disabled before executing the hook with the "''suspend suspend''" parameters.<br />
<br />
== Troubleshooting ==<br />
If suspend or hibernate did not work correctly, you will probably find some information in the log file {{ic|/var/log/pm-suspend.log}}. For example, which hooks were run and what the output of them was should be in that log file.<br />
<br />
Also, check the output of the {{ic|pm-is-supported}} command. This command (with the {{ic|--hibernate}} or {{ic|--suspend}} flag) will do some sanity checking and report any errors it finds in your configuration. It will not detect all possible errors, but may still be useful.<br />
<br />
=== Segmentation faults === <br />
If you experience segmentation faults that might result in an unresponsive system and missing keys then try to set the UUID in the resume-path in {{ic|/boot/grub/menu.lst}} as explained [[#Hibernation (suspend2disk)|above]].<br />
<br />
=== Reboot instead of resume from suspend ===<br />
<br />
This problem started when saving NVS area during suspend was introduced (in 2.6.35-rc4) ([http://www.spinics.net/lists/linux-acpi/msg29521.html mailing list post]). However, it is known that this mechanism does not work on all machines, so the kernel developers allow the user to disable it with the help of the {{ic|1=acpi_sleep=nonvs}} kernel command line option. This option could be pass to the kernel through [[GRUB]] options by editing the file {{ic|/boot/grub/menu.lst}} (GRUB 0.97) on the {{ic|kernel}} line.<br />
<br />
=== Resume from suspend shuts down instead of wake up ===<br />
On an Acer Aspire AS3810TG, resuming from suspend shuts down the computer instead of waking it up. If you experience a similar issue, try passing the parameter {{ic|1=i8042.reset=1}} to your kernel. In [[GRUB2]], the line in {{ic|/boot/grub/grub.cfg}} should be something like this:<br />
linux /vmlinuz-linux root=/dev/vg00/root resume=/dev/vg00/swap i8042.reset=1 ro<br />
<br />
Although I have not tested this, you could also set this parameter live without having to restart by doing:<br />
# sysctl -e -w i8042.reset=1<br />
<br />
=== Blank screen when waking from suspend ===<br />
Some laptops (e.g. Dell Inspiron Mini 1018) will just show a black screen with no backlight after resuming from suspend. If this happens to you, try going into the BIOS of the laptop and disabling Intel SpeedStep if it is present.<br />
<br />
You could also try, without disabling SpeedStep, creating a quirk in {{ic|/etc/pm/sleep.d/}} with this content (requires {{Pkg|vbetool}}):<br />
{{bc|#!/bin/sh<br />
#<br />
case "$1" in<br />
suspend)<br />
;;<br />
resume)<br />
sleep 5<br />
vbetool dpms off<br />
vbetool dpms on<br />
;;<br />
*) exit $NA<br />
;;<br />
esac}}<br />
save it as you want but with a {{ic|00}} in front of the name so this is called last when resuming; remember to {{ic|chmod +x}} the script.<br />
Try adjusting the {{ic|sleep}} time if the other commands are called too soon, or if it works well, you can also try removing that line.<br />
<br />
Some other laptops (e.g. Toshiba Portégé R830) will just show a black screen with no backlight after resuming from suspend, with fans blowing at top speed. If this is what you're seeing, try going into the BIOS and disable the VT-d virtualization setting by switching to "VT-x only".<br />
<br />
=== VirtualBox problems ===<br />
The VirtualBox kernel modules cause {{ic|pm-suspend}} and {{ic|pm-hibernate}} to fail on some laptops. (See [https://bbs.archlinux.org/viewtopic.php?id=123354 this discussion]). Instead of suspending or hibernating, the system freezes and indicator LEDs blink (the suspend indicator in the case of ThinkPads and the Caps Lock and Scroll Lock indicators in the case of the MSI Wind U100). The {{ic|pm-suspend}} and {{ic|pm-hibernate}} logs appear normal.<br />
<br />
The problem can be fixed by removing the modules before suspension or hibernation and reloading them afterwards. That can be accomplished through a script:<br />
{{bc|1=<br />
#!/bin/sh<br />
<br />
rmmod vboxdrv<br />
pm-hibernate<br />
modprobe vboxdrv<br />
}}<br />
<br />
{{Note|Some users reported that it is sufficient to rebuild the kernel module by running {{ic|vboxbuild}} as root.}}<br />
<br />
=== Hibernate with missing swap partition ===<br />
If you try to hibernate without an active swap partition, your system will look like it is going into hibernate, and then immediately resume again. There are no error messages warning you that there is no swap partition, even when verbose logging is activated, so this problem can be very hard to debug. On my system, the swap partition was somehow corrupted and deactivated, so this may happen even if you set up a swap partition during install. If hibernate displays this behaviour, make sure that you actually have a swap partition that is being used as such. The output of the {{ic|blkid}} command should look e.g. like<br />
{{bc|1=<br />
# blkid<br />
/dev/sda1: UUID="00000-000-000-0000000" TYPE="ext2" <br />
/dev/sda2: UUID="00000-000-000-0000000" TYPE="ext4"<br />
/dev/sda3: UUID="00000-000-000-0000000" TYPE="ext4"<br />
/dev/sda4: UUID="00000-000-000-0000000" TYPE="swap"<br />
}}<br />
with one of the lines having {{ic|"swap"}} as the type. If this is not the case, consult [[Swap#Swap partition]] for instructions on re-creating/activating the swap partition.<br />
<br />
=== Black screen with unblinking cursor when trying to suspend ===<br />
If you get a black screen with unblinking cursor when trying to do<br />
$ sudo pm-suspend<br />
have a look at {{ic|/var/log/pm-suspend.log}} and search for "ehci" or "xhci". Some of the names you could find may be "ehci_hd", "xhci_hd" or "ehci_hcd".<br />
<br />
Then as root create the file {{ic|/etc/pm/config.d/modules}} and include this code with the exact name of the ehci or xhci module you found. For example:<br />
SUSPEND_MODULES="ehci_hcd"<br />
Suspend should now be working.<br />
<br />
=== Blank screen issue ===<br />
Some users have reported having issues with their laptops not resuming after a suspend or hibernate. This is due to the {{ic|autodetect}} hook in "HOOKS" array of the {{ic|/etc/mkinitcpio.conf}} file. This can be disabled using the same method for adding the {{ic|resume}} hook. Just remove {{ic|autodetect}} from the list and follow the steps to build the new image. See [[Pm-utils#Mkinitcpio_Resume_Hook|Resume Hook]] for more details on building the new image.<br />
<br />
{{Note|If you are using [[Plymouth|plymouth]] it may be an other reason to this issue. Adding {{ic|resume}} before {{ic|plymouth}} in "HOOKS" array of the {{ic|/etc/mkinitcpio.conf}} file should fix this.}}<br />
<br />
=== Unable to Resume with 64 bit OS ===<br />
Certain motherboards/BIOS combinations (specifically known are some Zotac ITX boards, perhaps others) will not resume properly from suspend if any 64 bit operating system is installed. The solution is the enter your BIOS setup and Disable the "Memory Remapping Hole" in your DRAM configuration page. This will probably fix the suspend to RAM problem but will probably result in your OS not detecting all of your RAM. <br />
<br />
== Tips and Tricks ==<br />
<br />
=== Having the HD power management level automatically set again on resume ===<br />
Do it like this:<br />
{{hc|/etc/pm/sleep.d/50-hdparm_pm|<nowiki><br />
#!/bin/dash<br />
<br />
if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then<br />
hdparm -B 254 /dev/sda > /dev/null<br />
fi<br />
</nowiki>}}<br />
<br />
Then run:<br />
$ sudo chmod +x /etc/pm/sleep.d/50-hdparm_pm<br />
<br />
If the above [[Bash]] script fails the work, the following may work instead:<br />
{{hc|/etc/pm/sleep.d/50-hdparm_pm|<nowiki><br />
#!/bin/sh<br />
<br />
. "${PM_FUNCTIONS}"<br />
case "$1" in<br />
thaw|resume)<br />
sleep 6<br />
hdparm -B 254 /dev/sda<br />
;;<br />
*)<br />
;;<br />
esac<br />
exit $NA<br />
</nowiki>}}<br />
<br />
Lower {{ic|-B}} switch values may be effective. See [[hdparm]].<br />
<br />
=== Restarting the mouse ===<br />
On some laptops the mouse will hang after an otherwise successful suspend. One way to remedy this is to force a re-initialization of the PS/2 driver (here {{ic|i8042}}) through a hook in {{ic|/etc/pm/hooks}} (see [[#Creating_your_own_hooks|hooks]])<br />
<br />
#!/bin/sh<br />
echo -n "i8042" > /sys/bus/platform/drivers/i8042/unbind<br />
echo -n "i8042" > /sys/bus/platform/drivers/i8042/bind<br />
<br />
=== Add sleep modes to Openbox menu ===<br />
Openbox users can add the new scripts as additional shutdown options within the Openbox menu by adding the items to a new or existing sub-menu in {{ic|~/.config/openbox/menu.xml}}, for example:<br />
<menu id="64" label="Shutdown"><br />
<item label="Lock"> <action name="Execute"> <execute>xscreensaver-command -lock</execute> </action> </item><br />
<item label="Logout"> <action name="Exit"/> </item><br />
<item label="Reboot"> <action name="Execute"> <execute>sudo shutdown -r now</execute> </action> </item><br />
<item label="Poweroff"> <action name="Execute"> <execute>sudo shutdown -h now </execute> </action> </item><br />
'''<item label="Hibernate"> <action name="Execute"> <execute>sudo pm-hibernate</execute> </action> </item>'''<br />
'''<item label="Suspend"> <action name="Execute"> <execute>sudo pm-suspend</execute> </action> </item>'''<br />
</menu><br />
<br />
=== Handling "sleep" and "power" buttons ===<br />
"Sleep" and "power" buttons are handled by {{ic|acpid}} in {{ic|/etc/acpi/handler.sh}} (see "button/power" and "power/sleep" entries). You may want to substitute the default actions with calls to {{ic|pm-suspend}} and {{ic|pm-hibernate}}.<br />
<br />
=== Locking the screen saver on hibernate or suspend ===<br />
It is a good idea to have the system require a password after waking up. One way to do this is to make a script {{ic|/etc/pm/sleep.d/00screensaver-lock}} (making sure it is chmodded to 755 and owned by {{ic|root:root}}, like other similar scripts in this area). Replace '''username''' with your username and add your desired screen locker in between the "" after {{ic|su $USER -c}}.<br />
<br />
{{hc|/etc/pm/sleep.d/00screensaver-lock|<nowiki><br />
#!/bin/sh<br />
#<br />
# 00screensaver-lock: lock workstation on hibernate or suspend<br />
<br />
DBUS=$(ps aux | grep 'dbus-launch' | grep -v root)<br />
if [[ ! -z $DBUS ]];then<br />
USER=$(echo $DBUS | awk '{print $1}')<br />
USERHOME=$(getent passwd $USER | cut -d: -f6)<br />
export XAUTHORITY="$USERHOME/.Xauthority"<br />
for x in /tmp/.X11-unix/*; do<br />
DISPLAYNUM=$(echo $x | sed s#/tmp/.X11-unix/X##)<br />
if [[ -f "$XAUTHORITY" ]]; then<br />
export DISPLAY=":$DISPLAYNUM"<br />
fi<br />
done<br />
else<br />
USER=username<br />
USERHOME=/home/username<br />
export XAUTHORITY="$USERHOME/.Xauthority"<br />
export DISPLAY=":0"<br />
fi<br />
<br />
case "$1" in<br />
hibernate|suspend)<br />
su $USER -c "/usr/bin/slimlock" & # or any other such as /usr/bin/xscreensaver-command -lock<br />
;;<br />
thaw|resume)<br />
;;<br />
*) exit $NA<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
'''Note:''' for the previous script to work TTY lock must be disabled in slimlock. Be sure to set {{ic|tty_lock 0}} in {{ic|/etc/slimlock.conf}} [https://github.com/joelburget/slimlock/issues/4].<br />
<br />
For some the above script might not work, use this one instead:<br />
<br />
{{hc|/etc/pm/sleep.d/00screensaver-lock|<nowiki><br />
#!/bin/sh<br />
#<br />
# 00screensaver-lock: lock workstation on hibernate or suspend<br />
<br />
username= # add your username here, i.e.: username=foobar<br />
<br />
USERHOME=/home/$username<br />
export XAUTHORITY="$USERHOME/.Xauthority"<br />
export DISPLAY=":0"<br />
<br />
case "$1" in<br />
hibernate|suspend)<br />
su $username -c "/usr/bin/slimlock" & # or any other such as /usr/bin/xscreensaver-command -lock<br />
;;<br />
thaw|resume)<br />
;;<br />
*) exit $NA<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
== Other Resources ==<br />
* [https://wiki.ubuntu.com/UnderstandingSuspend Understanding Suspend] - Ubuntu article explaining how suspending to RAM works<br />
* [http://www.mjmwired.net/kernel/Documentation/power/basic-pm-debugging.txt#178 PM Debugging] - Basic PM debugging<br />
*[[Cpufrequtils]] - CPU Frequency Scaling and CPU Power schemes<br />
*[[Acpid]] - daemon for delivering ACPI events.<br />
<br />
== Credits ==<br />
''This wiki entry was originally sourced from the [http://en.opensuse.org/SDB:Pm-utils OpenSUSE Wiki] (Licensed under GPL). A big thank you goes to the {{Pkg|pm-utils}} developers and documenters for their time.''</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=186955Haskell package guidelines2012-02-29T12:07:25Z<p>Magus: /* [haskell] */ new URL for the repo</p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
{{i18n|Haskell package guidelines}}<br />
<br />
'''Haskell on Arch Linux'''<br />
<br />
Haskell is well supported on Arch Linux, with GHC and other key tools available via the [[Official Repositories|official repositories]], a growing number of packages made available by the ArchHaskell group, and a large part of [http://hackage.haskell.org hackage.haskell.org]'s library database [https://aur.archlinux.org/packages.php?O=0&K=haskell- available in the AUR].<br />
<br />
The community around Haskell on Arch is active and well organized, but your help is always welcome.<br />
<br />
== Community ==<br />
<br />
All the details on the [[ArchHaskell]] group is available on its own page.<br />
<br />
== Haskell Packages ==<br />
<br />
The core Haskell tools are available in the core system (extra):<br />
<br />
==== [extra] ====<br />
<br />
* [https://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 Haskell packages in the core system]<br />
<br />
Our policy for [extra] is to provide the Haskell platform, and popular Haskell applications.<br />
<br />
==== [community] ====<br />
<br />
* [https://www.archlinux.org/packages/?arch=x86_64&repo=Community&q=haskell&last_update=&limit=50 other popular Haskell packages]<br />
<br />
[community] provides additional packages that are popular and not part of the Haskell platform, such as [[xmonad]].<br />
<br />
==== [haskell] ====<br />
<br />
The [haskell] repository is the official repository of packages maintained by the ArchHaskell team. This repository represents the last tier of stability, before resorting to the packages in the AUR, or perhaps building packages yourself with cabal2arch. [haskell] can be accessed by adding the following entry to {{ic|/etc/pacman.conf}}:<br />
<br />
[haskell]<br />
Server = http://xsounds.org/~haskell/$arch<br />
<br />
The set of packages in the [haskell] repository is derived from the '''habs''' tree officially located [https://github.com/archhaskell/habs here]. A tool called [https://github.com/magthe/cblrepo cblrepo] is used to keep the '''habs''' tree synchronized with the official Haskell packages from [http://hackage.haskell.org/packages/hackage.html Hackage].<br />
<br />
==== AUR ====<br />
<br />
* [https://aur.archlinux.org/packages.php?O=0&K=haskell- Haskell packages in the AUR]<br />
<br />
A huge number (almost 2000) packages built from http://hackage.haskell.org.<br />
<br />
These generally improve on installing directly from Hackage as they resolve required C libraries. They can be installed as, for example:<br />
<br />
# paktahn -S haskell-csv<br />
<br />
Anything not found here can be installed via {{pkg|cabal-install}} directly from Hackage.<br />
<br />
Unfortunately, many of the packages in the AUR are outdated due to a lack of resources. In practice, one uses the cabal2arch program to create PKGBUILDs directly from Hackage.<br />
<br />
== Guidelines ==<br />
<br />
In almost all cases, cabalised Haskell packages can be automatically translated into Arch packages, via the cabal2arch tool. It is strongly recommended that you use the latest released version of this tool, as it implements the packaging policy for Haskell packages. You can get it in several ways:<br />
<br />
* Add the [haskell] repository to {{ic|/etc/pacman.conf}} and use [[pacman]] to install the latest release.<br />
* Download and build the {{AUR|cabal2arch}} package from the [[Arch User Repository|AUR]].<br />
* Install directly from Hackage using {{ic|cabal install cabal2arch}}.<br />
<br />
===cabal2arch: an example===<br />
<br />
This example illustrates how to create a new package with cabal2arch. We will make a new package for the delimited continuations library, CC-delcont:<br />
<br />
First, set the name and email address to be used in the generated [[PKGBUILD]]:<br />
<br />
export ARCH_HASKELL='My Name <my.name@domain.org>'<br />
<br />
Second, find [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CC-delcont the hackage page for CC-delcont], then identify the link to the .cabal file. Use this link as an argument to cabal2arch:<br />
<br />
{{bc|<nowiki><br />
% cd /tmp<br />
% cabal2arch http://hackage.haskell.org/packages/archive/pandoc/1.6.0.1/pandoc.cabal<br />
Using /tmp/tmp.D7HAJJx2js/pandoc.cabal<br />
Feeding the PKGBUILD to `makepkg -g`...<br />
==> Retrieving Sources...<br />
-> Downloading pandoc-1.6.0.1.tar.gz...<br />
--2011-05-14 07:25:39-- http://hackage.haskell.org/packages/archive/pandoc/1.6.0.1/pandoc-1.6.0.1.tar.gz<br />
Resolving hackage.haskell.org... 69.30.63.204<br />
Connecting to hackage.haskell.org|69.30.63.204|:80... connected.<br />
HTTP request sent, awaiting response... 200 OK<br />
Length: 355477 (347K) [application/x-tar]<br />
Saving to: “pandoc-1.6.0.1.tar.gz.part”<br />
<br />
0K .......... .......... .......... .......... .......... 14% 210K 1s<br />
50K .......... .......... .......... .......... .......... 28% 393K 1s<br />
100K .......... .......... .......... .......... .......... 43% 338K 1s<br />
150K .......... .......... .......... .......... .......... 57% 419K 0s<br />
200K .......... .......... .......... .......... .......... 72% 404K 0s<br />
250K .......... .......... .......... .......... .......... 86% 554K 0s<br />
300K .......... .......... .......... .......... ....... 100% 506K=0.9s<br />
<br />
2011-05-14 07:25:40 (369 KB/s) - “pandoc-1.6.0.1.tar.gz.part” saved [355477/355477]<br />
<br />
==> Generating checksums for source files...<br />
</nowiki>}}<br />
<br />
Checking what was created:<br />
<br />
% ls<br />
haskell-pandoc<br />
% cd haskell-pandoc<br />
% ls<br />
haskell-pandoc.install PKGBUILD<br />
<br />
You can now inspect the PKGBUILD and install script for the library:<br />
<br />
{{bc|<nowiki><br />
# Maintainer: <br />
_hkgname=pandoc<br />
pkgname=haskell-pandoc<br />
pkgver=1.6.0.1<br />
pkgrel=1<br />
pkgdesc="Conversion between markup formats"<br />
url="http://hackage.haskell.org/package/${_hkgname}"<br />
license=('GPL')<br />
arch=('i686' 'x86_64')<br />
makedepends=()<br />
depends=('ghc' 'haskell-http=4000.1.1' 'haskell-bytestring=0.9.1.10' 'haskell-containers=0.4.0.0' 'haskell-directory=1.1.0.0' 'haskell-extensible-exceptions=0.1.1.2' 'haskell-filepath=1.2.0.0' 'haskell-mtl=2.0.1.0' 'haskell-network=2.3.0.2' 'haskell-old-time=1.0.0.6' 'haskell-parsec=3.1.1' 'haskell-pretty=1.0.1.2' 'haskell-process=1.0.1.5' 'haskell-random=1.0.0.3' 'haskell-syb=0.3' 'haskell-texmath<0.5' 'haskell-utf8-string>=0.3' 'haskell-xhtml=3000.2.0.1' 'haskell-xml<1.4' 'haskell-zip-archive<0.2')<br />
options=('strip')<br />
source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)<br />
install=${pkgname}.install<br />
md5sums=('d19a630462595941b3100dff6f839aa3')<br />
build() {<br />
cd ${srcdir}/${_hkgname}-${pkgver}<br />
runhaskell Setup configure -O ${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } --enable-split-objs --enable-shared \<br />
--prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid<br />
runhaskell Setup build<br />
runhaskell Setup haddock<br />
runhaskell Setup register --gen-script<br />
runhaskell Setup unregister --gen-script<br />
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh<br />
}<br />
package() {<br />
cd ${srcdir}/${_hkgname}-${pkgver}<br />
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh<br />
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh<br />
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries<br />
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}<br />
runhaskell Setup copy --destdir=${pkgdir}<br />
}<br />
</nowiki>}}<br />
<br />
It follows the conventions for Haskell packages:<br />
<br />
* Libraries are prefixed with {{ic|haskell-}}<br />
* All libraries that the package depend on are listed (libraries shipped with GHC are dealt with by having the {{pkg|ghc}} package provide them)<br />
* It uses cabal to generate a post-install register/unregister script, with a standard name.<br />
* We use haddock to build the documentation.<br />
<br />
All Haskell libraries should follow these naming conventions, and using the latest release of cabal2arch will ensure this is the case.<br />
<br />
{{Note|Beginning with {{AUR|cabal2arch}} 1.1-2, a new environment variable, {{ic|PKGBUILD_HASKELL_ENABLE_PROFILING}}, is generated into the PKGBUILD. If this variable is of non-zero length, such as "1" or "true", then profiling builds will occur. Thus, if a user desires profiling, then it is advised to export this environment variable in a file such as {{ic|~/.bashrc}} or {{ic|~/.zshrc}}.}}<br />
<br />
===Guidelines for Libraries===<br />
<br />
In general, each .cabal file should map to one PKGBUILD. The following conventions hold:<br />
<br />
* libraries have their cabal names prefixed with {{ic|haskell-}}<br />
* all libraries have a dependency on {{pkg|ghc}}<br />
* all libraries that are depended on must be listed in the {{ic|depends}} array in the [[PKGBUILD]]<br />
* be careful about dependencies from gtk2hs: cairo, svg, glib, gtk. These are all provided by the {{pkg|gtk2hs}} package, not , e.g. "haskell-cairo"<br />
<br />
Registering Haskell libraries is done via a register hook, see above.<br />
<br />
===Guidelines for Programs ===<br />
<br />
* Have their normal name. Examples: hmp3, xmonad, ghc, cabal-install<br />
<br />
* Be careful about dynamically linked run-time dependencies on C. For example, all GHC-produced binaries have a run-time dependency on 'gmp'. OpenGL or GtT-based binaries will have additional 'depends'. cabal2arch will attempt to work out the C dependencies, but there may be others implied by Haskell dependencies that are missed.<br />
<br />
* Use executable stripping, {{ic|--enable-executable-stripping}}. cabal2arch will do this automatically.</div>Magushttps://wiki.archlinux.org/index.php?title=Unofficial_user_repositories&diff=166630Unofficial user repositories2011-10-20T18:17:16Z<p>Magus: Adding [haskell]</p>
<hr />
<div>[[Category: Package management (English)]]<br />
==Why unofficial user repositories==<br />
Since the AUR only allows users to upload PKGBUILD and other package build related files, but does not provide a means for distributing a binary package, a user may want to create a binary repository of their packages elsewhere.<br />
<br />
==The future of Unofficial repos==<br />
I'd like to see more work of this type. Sometimes there are certain projects that don't mesh well with other things, such as the community repo. The 'kdemod' project is a good example. If you want to contribute with your own builds, you can check page [[Custom local repository]].<br />
<br />
In the future, well-thought-out user repositories may be ideal for lots of supplementary things. Forming a "web of trust" is important in cases like this, so we may begin keeping a list of "recommended" repositories somewhere, in order to make it seem more official and trustworthy.<br />
<br />
[[User:Phrakture|Phrakture]] 12:50, 18 May 2007 (EDT)<br />
<br />
==List of PUR (unofficial user repositories)==<br />
===Any===<br />
"Any" repos are architecture-independent, i.e. they can be used on both i686 and x86_64 systems.<br />
<pre><br />
[herecura-stable-any]<br />
# Just some stuff; a few java apps, wallpapers, small scripts, xbmc-skin<br />
Server = http://herecura.be/repo/herecura-stable/any<br />
<br />
[herecura-testing-any]<br />
# Some any testing stuff, xbmc-svn skin<br />
Server = http://herecura.be/repo/herecura-testing/any<br />
<br />
[xyne-any]<br />
# The home of Xyne's contributions.<br />
# More info including a package list can be found at http://xyne.archlinux.ca/repos<br />
Server = http://xyne.archlinux.ca/repos/xyne-any/<br />
<br />
[arch-fonts]<br />
# Prebuilt packages for font packages found in AUR<br />
# This should be faster than building from source<br />
# as many have download speed of 10KB/s. If you find<br />
# missing font, email to <gmail.com: jesse.jaara><br />
Server = http://huulivoide.pp.fi/Arch/arch-fonts<br />
</pre><br />
<br />
===Both i686 and x86_64===<br />
<!--Not exactly same as 'any' repositories, this section should probably be separate.--><br />
Repositories with both i686 and x86_64 versions. The $arch variable will be set automatically by pacman.<br />
<pre><br />
[allanbrokeit]<br />
# http://allanmcrae.com/2011/06/the-allanbrokeit-repo-that-might-really-break-your-system/<br />
Server = http://allanmcrae.com/$repo/$arch<br />
<br />
[adslgr]<br />
# The Hellenic (Greek) archlinux unofficial repository with many interesting packages.<br />
Server = http://archlinuxgr.tiven.org/archlinux/$arch<br />
<br />
[archlinuxfr]<br />
# The French Arch Linux communities packages.<br />
Server = http://repo.archlinux.fr/$arch<br />
<br />
[archaudio-production]<br />
# verified PKGBUILDs AND tested packages<br />
Server = http://repos.archaudio.org/$repo/$arch<br />
<br />
[archaudio-preview]<br />
# unverified PKGBUILDs AND/OR untested packages<br />
Server = http://repos.archaudio.org/$repo/$arch<br />
<br />
[archaudio-nightly]<br />
# verified devel PKGBUILDs<br />
Server = http://repos.archaudio.org/$repo/$arch<br />
<br />
[archaudio-experimental]<br />
# unverified devel PKGBUILDs<br />
Server = http://repos.archaudio.org/$repo/$arch<br />
<br />
[archstuff]<br />
# AUR's most voted and many bin32-* and lib32-* packages.<br />
Server = http://archstuff.vs169092.vserver.de/$arch<br />
<br />
[arch-games]<br />
# The Arch Linux Gaming repository project.<br />
# Active mirrors listed in https://github.com/Arch-Games/arch-games/wiki/Mirrors<br />
Server = http://repo.exigen.org/arch/games/$arch<br />
Server = ftp://mirror.selfnet.de/arch-games/$arch<br />
# Currently inactive mirrors<br />
#Server = http://arch.twilightlair.net/games/$arch<br />
#Server = http://pseudoform.org/arch-games/games/$arch<br />
<br />
[burg]<br />
# Burg bootloader repo<br />
# More info : http://archydeb.wordpress.com/<br />
Server = http://dl.dropbox.com/u/11529444/repos/archlinux/burg/$arch<br />
<br />
[catalyst]<br />
# ATI Catalyst proprietary drivers.<br />
Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch<br />
<br />
[haskell]<br />
# ArchHaskell repository<br />
Server = http://www.kiwilight.com/$repo/$arch<br />
<br />
[heftig]<br />
# Includes kernel26-zen and aurora (firefox development build - works alongside firefox in extra.)<br />
# https://bbs.archlinux.org/viewtopic.php?id=117157<br />
Server = http://pkgbuild.com/~heftig/repo/$arch<br />
<br />
[kde4-eyecandy]<br />
# Useful and beautiful plasmoids and themes for KDE4.<br />
Server = http://archlinuxgr.tiven.org/kde4-eyecandy/$arch<br />
<br />
[repo-ck]<br />
# ARCH kernel with Brain Fuck Scheduler and all the goodies in the ck1 patch set<br />
Server = http://repo-ck.com/$arch<br />
<br />
[kittyserve]<br />
# Contains kittykatt's packages and packages from friends of kittykatt, as well as most mint-related packages<br />
Server = http://repo.kattz.tk/$arch<br />
<br />
[kxstudio-free]<br />
# KXStudio Free<br />
Server = http://kxstudio.sf.net/repo/arch/$arch<br />
<br />
[kxstudio-non-free]<br />
# KXStudio Non-Free<br />
Server = http://kxstudio.sf.net/repo/arch/$arch <br />
<br />
[mate]<br />
# Contains official mate desktop packages (gnome2 fork)<br />
Server = http://matsusoft.com.ar/repository/archlinux/mate/$arch<br />
Server = http://germ.winpe.com/archlinux/mate/$arch<br />
<br />
[pfkernel]<br />
# linux-pf and kernel26-pf<br />
# Kernel packages: generic i686 and x86_64, optimized P3, P4, K7, Atom, Pentium-M, K8, Core2<br />
# amarok1, nvidia-pf, squid3, arora-git, nvidia-96xx+utils, gdm-old, w3perl<br />
Server = http://dl.dropbox.com/u/11734958/$arch<br />
<br />
[radeon]<br />
# ATI Radeon X.Org drivers, bleeding edge 'git' builds.<br />
Server = http://spiralinear.org/perry3d/$arch<br />
<br />
[repo-ck]<br />
# Public server that holds cpu optimized packages of linux-ck<br />
# See the kernel26-ck wiki page for more<br />
Server = http://repo-ck.com/$arch<br />
<br />
[sergej-repo]<br />
# ion3 and some other stuff.<br />
# http://code.google.com/p/archlinux-stuff/source/browse/trunk<br />
Server = http://repo.p5n.pp.ru/sergej-repo/$arch/<br />
<br />
[suckless]<br />
# suckless.org packages<br />
Server = http://dl.suckless.org/arch/$arch<br />
</pre><br />
<br />
===i686 only===<br />
<pre><br />
[andrwe]<br />
# For a list of packages see: http://andrwe.org/doku.php/linux/repository<br />
Server = http://repo.andrwe.org/i686<br />
<br />
[archlinux-es]<br />
# Repositorio Hispano (Spanish/Hispanic Respository).<br />
Server = http://repo.archlinux-es.org/i686<br />
<br />
[arch-graphics]<br />
# Repository aimed to provide applications mainly for 3D graphics.<br />
# For more info, look at http://arch-graphics.kx.cz/<br />
Server = http://arch-graphics.kx.cz/repo/i686<br />
<br />
[cgr-i686]<br />
# Packages for some ChicoGeek's PKGBUILDs.<br />
Server = http://cgr.i686.googlepages.com/<br />
<br />
[chaox-stable]<br />
# Pentesting packages and custom kernel patched for WIFI injection.<br />
Server = http://repo.chaox.net/stable<br />
<br />
[compiz-fusion]<br />
# compiz-fusion-git<br />
# Updated to June 2008.<br />
Server = http://compiz.dreamz-box.de/i686<br />
<br />
[esclinux]<br />
# Mostly games, interactive fiction and abc notation stuffs already on AUR.<br />
Server = http://download.tuxfamily.org/esclinuxcd/ressources/repo/i686/<br />
<br />
[fukawi]<br />
# Some Nagios Stuff; molly-guard; celtx and various networking tools.<br />
Server = http://repo.fukawi2.nl/i686/<br />
Server = ftp://repo.fukawi2.nl/i686/<br />
<br />
[jose1711repo]<br />
# Most of the packages I maintain in AUR (games, tools)<br />
Server = http://arch.l33t.in/i686/<br />
<br />
[kpiche]<br />
# Stable OpenSync packages.<br />
Server = http://kpiche.archlinux.ca/repo<br />
<br />
[rfad]<br />
# Repository made by haxit | Contact at: requiem [at] archlinux.us for package suggestions!<br />
Server = http://web.ncf.ca/ey723/archlinux/repo/<br />
<br />
[xdemon-repo]<br />
# madwimax, kismet-svn and aircrack-svn, etc...<br />
Server=http://repo.x-demon.org/archlinux/os/i686<br />
<br />
[herecura-stable]<br />
# Additional apps not found in community.<br />
Server = http://herecura.be/repo/herecura-stable/i686<br />
<br />
[herecura-testing]<br />
# Additional apps for testing build against stable Arch.<br />
Server = http://herecura.be/repo/herecura-testing/i686<br />
<br />
[studioidefix]<br />
# Precompiled boxee packages.<br />
Server = http://studioidefix.googlecode.com/hg/repo/i686<br />
<br />
[mingw32]<br />
# Libs & tools for crosscompiling for Win32, mainly taken from AUR.<br />
# Contact: Alexander 'hatred' Drozdov <adrozdoff [at] gmail (dot) com> (Russian-speaked guys can write on Russian :-)<br />
Server = http://hatred.homelinux.net/archlinux/mingw32/os/i686<br />
<br />
[ayatana]<br />
# Packages from Ubuntu (humanity-icon-theme, ttf-ubuntu, ubuntu-light-themes, ubuntuone-client, indicator-applet, notify-osd…),<br />
# packages from elementary project (dexter, elementary-icon-theme, gloobus-preview, gnome-theme-elementary, postler…),<br />
# packages from Linux Mint (gnome-theme-mint, mintbackup, mintdesktop, mint-icon-theme, mintmenu…) and<br />
# apps with ayatana support (audio-recorder, banshee-community-extensions, cloudsn, gwibber, pino, sbackup, smuxi…),<br />
# extra GNOME apps (conduit, eog-plugins, glabels, gnome-color-manager, gnome-globalmenu, gnome-subtitles, ontv, pdfmod, rygel, postr, tasque…),<br />
# mapping apps (bt747, emerillon, foxtrotgps, gpx-viewer, merkaartor, navit, prune…),<br />
# some other apps (backintime, connman, faenza-icon-theme, gdesklets, keepnote, kompozer, nautilus-terminal, openbve, pinta, textflow, uget…).<br />
# More info: http://arch.ballogyorgy.com/<br />
Server = http://repo.ayatana.info/<br />
<br />
[sylar_repo]<br />
# My built packages.<br />
# Additional info and package list: see http://dl.dropbox.com/u/8192972/arch_repo/arch_repo.html<br />
Server = http://dl.dropbox.com/u/8192972/arch_repo/repo<br />
<br />
[kernel26-pae]<br />
# PAE-enabled 32-bit kernel 2.6.39<br />
Server = http://kernel26-pae.archlinux.ca/<br />
<br />
[linux-pae]<br />
# PAE-enabled 32-bit kernel 3.0<br />
Server = http://pae.archlinux.ca/<br />
<br />
[aur]<br />
# most common packages in aur<br />
# readme: http://dl.dropbox.com/u/10527821/repo/i686/readme.txt<br />
# packages: http://dl.dropbox.com/u/10527821/repo/i686/pkglst.txt<br />
http://dl.dropbox.com/u/10527821/repo/i686/<br />
<br />
</pre><br />
<br />
===x86_64 only===<br />
<pre><br />
[andrwe]<br />
# For a list of packages see: http://andrwe.dyndns.org/doku.php/blog/repository<br />
Server = http://repo.andrwe.org/x86_64<br />
<br />
[archlinux-es]<br />
# Repositorio Hispano (Spanish/Hispanic Respository).<br />
Server = http://repo.archlinux-es.org/x86_64<br />
<br />
[archstudio]<br />
# ArchAudio Packages <br />
# Optimized for Intel Core {i3,i5,i7} CPU <br />
# Package Details: http://dl.dropbox.com/u/5977716/archstudio.html<br />
Server = http://dl.dropbox.com/u/5977716/x86_64<br />
<br />
[compiz-fusion]<br />
# compiz-fusion-git<br />
Server = http://compiz.dreamz-box.de/x86_64<br />
<br />
[nightly]<br />
# Nightly builds of some packages from the AUR.<br />
# Repo-Tracker: http://tracker.kromonos.net/projects/show/nightlyarch<br />
Server = http://files.shadowice.org/nightly/x86_64<br />
<br />
[zen]<br />
# Various and zengeist' AUR packages.<br />
Server = http://zloduch.cz/archlinux/x86_64<br />
<br />
[seiichiro]<br />
# VDR and some plugins, mms, foo2zjs-drivers<br />
Server = http://repo.seiichiro0185.org/x86_64<br />
<br />
[herecura-stable]<br />
# Additional apps not found in community.<br />
Server = http://herecura.be/repo/herecura-stable/x86_64<br />
<br />
[herecura-testing]<br />
# Additional apps for testing build against stable Arch.<br />
Server = http://herecura.be/repo/herecura-testing/x86_64<br />
<br />
[studioidefix]<br />
# Precompiled boxee packages.<br />
Server = http://studioidefix.googlecode.com/hg/repo/x86_64<br />
<br />
[pyropeter]<br />
# My AUR packages: https://aur.archlinux.org/packages.php?SeB=m&K=pyropeter<br />
Server = http://keks.selfip.org/arch/pyropeter<br />
<br />
[sorcix]<br />
# Various packages from AUR: dropbox, nautilus-dropbox, minecraft, etc..<br />
# Packagelist: http://archlinux.sorcix.com/repository/<br />
Server = http://archlinux.sorcix.com/repository/x86_64<br />
</pre><br />
<br />
==Add your own repository to this list==<br />
If you have your own repository, please add this to this list, so that all other users knows where to find your packages.</div>Magushttps://wiki.archlinux.org/index.php?title=Unofficial_user_repositories/ArchHaskell&diff=135421Unofficial user repositories/ArchHaskell2011-03-31T08:07:37Z<p>Magus: </p>
<hr />
<div>[[Category:Package development (English)]]<br />
<br />
The ArchHaskell group works on providing Haskell packages to the wider ArchLinux community. The ultimate goal is to provide all of [http://hackage.haskell.org Hackage] as binary packages for easy installation. We are still a long way away :-)<br />
<br />
== Resources ==<br />
<br />
The main resources for the [[ArchHaskell]] community to interact and discuss are:<br />
<br />
* [http://www.gogloom.com/FreeNode/arch-haskell <nowiki>#arch-haskell</nowiki>] irc channel @ freenode.org<br />
** Good for quick discussion and planning<br />
* [http://haskell.org/mailman/listinfo/arch-haskell arch-haskell@haskell.org] mailing list<br />
** Broader announcements, and automated updates<br />
* [https://github.com/archhaskell ArchHaskell group] on github<br />
** Repositories for tools as well as the source for the binary packages (HABS).<br />
<br />
== Membership ==<br />
<br />
Due to using github for the source repositories membership isn't required at all in order to contribute. Just fork the relevant repository, make some changes and file a pull request.<br />
<br />
There are currently three people with commit rights to the ArchHaskell repos at github:<br />
<br />
* Peter Simons<br />
* Rémy Oudompheng<br />
* Leif Warner</div>Magushttps://wiki.archlinux.org/index.php?title=Unofficial_user_repositories/ArchHaskell&diff=130684Unofficial user repositories/ArchHaskell2011-02-12T22:17:12Z<p>Magus: Created page with "The ArchHaskell group works on providing Haskell packages to the wider ArchLinux community. The ultimate goal is to provide all of [http://hackage.haskell.org Hackage] as binary..."</p>
<hr />
<div>The ArchHaskell group works on providing Haskell packages to the wider ArchLinux community. The ultimate goal is to provide all of [http://hackage.haskell.org Hackage] as binary packages for easy installation. We are still a long way away :-)<br />
<br />
== Resources ==<br />
<br />
The main resources for the [[ArchHaskell]] community to interact and discuss are:<br />
<br />
* [http://www.gogloom.com/FreeNode/arch-haskell <nowiki>#arch-haskell</nowiki>] irc channel @ freenode.org<br />
** Good for quick discussion and planning<br />
* [http://haskell.org/mailman/listinfo/arch-haskell arch-haskell@haskell.org] mailing list<br />
** Broader announcements, and automated updates<br />
* [https://github.com/archhaskell ArchHaskell group] on github<br />
** Repositories for tools as well as the source for the binary packages (HABS).<br />
<br />
== Membership ==<br />
<br />
Due to using github for the source repositories membership isn't required at all in order to contribute. Just fork the relevant repository, make some changes and file a pull request.<br />
<br />
There are currently three people with commit rights to the ArchHaskell repos at github:<br />
<br />
* Magnus Therning<br />
* Peter Simons<br />
* Rémy Oudompheng</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=130682Haskell package guidelines2011-02-12T22:09:37Z<p>Magus: /* Community */</p>
<hr />
<div>[[Category:Guidelines (English)]]<br />
[[Category:Package development (English)]]<br />
<br />
{{i18n|Haskell package guidelines}}<br />
<br />
'''Haskell on Arch Linux'''<br />
<br />
Haskell is well supported on Arch Linux, with GHC and other key tools available via pacman, a growing number of packages made available by the ArchHaskell group, and a large part of [http://hackage.haskell.org hackage.haskell.org] library database [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=arch-haskell&SeB=m&SB=n&SO=a&PP=100&do_Search=Go available via AUR].<br />
<br />
The community around Haskell on Arch is active and well organized but your help is always welcome.<br />
<br />
== Community ==<br />
<br />
All the details on the [[ArchHaskell]] group is available on its own page.<br />
<br />
== Haskell Packages ==<br />
<br />
The core Haskell tools are available in the core system (extra):<br />
<br />
==== <nowiki>[Extra]</nowiki> ====<br />
<br />
* [http://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 Haskell packages in the core system]<br />
<br />
Our policy is for [extra] to provide the Haskell platform, and popular Haskell applications.<br />
<br />
==== <nowiki>[haskell]</nowiki> ====<br />
<br />
The packages maintained by the ArchHaskell group can be accessed by adding the following entry to pacman.conf:<br />
<br />
[haskell]<br />
Server = http://andromeda.kiwilight.com/$repo/$arch<br />
<br />
==== <nowiki>AUR</nowiki> ====<br />
<br />
* [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=arch-haskell&SeB=m&SB=n&SO=a&PP=100&do_Search=Go Haskell packages in AUR]<br />
<br />
A huge number (almost 2000) packages built from http://hackage.haskell.org<br />
<br />
These generally improve on installing directly from Hackage as they resolve required C libraries. They can be installed as, for example:<br />
<br />
sudo paktahn -S haskell-csv<br />
<br />
Anything not found here can be installed via [http://aur.archlinux.org/packages.php?ID=17411 cabal-install] direct from Hackage.<br />
<br />
== Guidelines ==<br />
<br />
In almost all cases cabalised Haskell packages can be automatically translated into Arch packages, via the cabal2arch tool. It is strongly recommended that you use the latest released version of this tool, as it implements the packaging policy for Haskell packages. You can get it in several ways:<br />
<br />
* Add the <nowiki>[haskell]</nowiki> repository to pacman.conf and use pacman do install the latest release.<br />
* Download and build the [http://aur.archlinux.org/packages.php?ID=17471 source from AUR], either manually or using one of the many [[AUR Helpers]].<br />
* Install directly from Hackage using "cabal install cabal2arch".<br />
<br />
===cabal2arch: an example===<br />
<br />
This example illustrates how to create a new package with cabal2arch. We'll make a new package for the delimited continuations library, CC-delcont:<br />
<br />
First, set the name and email address to be used in the generated PKGBUILD:<br />
<br />
export ARCH_HASKELL='My Name <my.name@domain.org>'<br />
<br />
Second, find [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CC-delcont the hackage page for CC-delcont], then identify the link to the .cabal file. Use this link as an argument to cabal2arch:<br />
<br />
<pre><br />
% cd /tmp<br />
% cabal2arch http://hackage.haskell.org/packages/archive/pandoc/1.6.0.1/pandoc.cabal<br />
Using /tmp/tmp.x9SEhTJ8N9/pandoc.cabal<br />
Feeding the PKGBUILD to `makepkg -g`...<br />
==> Retrieving Sources...<br />
-> Downloading pandoc-1.6.0.1.tar.gz...<br />
--2011-01-30 22:12:18-- http://hackage.haskell.org/packages/archive/pandoc/1.6.0.1/pandoc-1.6.0.1.tar.gz<br />
Resolving hackage.haskell.org... 69.30.63.204<br />
Connecting to hackage.haskell.org|69.30.63.204|:80... connected.<br />
HTTP request sent, awaiting response... 200 OK<br />
Length: 355477 (347K) [application/x-tar]<br />
Saving to: `pandoc-1.6.0.1.tar.gz.part'<br />
<br />
0K .......... .......... .......... .......... .......... 14% 20.3K 15s<br />
50K .......... .......... .......... .......... .......... 28% 40.3K 9s<br />
100K .......... .......... .......... .......... .......... 43% 53.0K 6s<br />
150K .......... .......... .......... .......... .......... 57% 58.2K 4s<br />
200K .......... .......... .......... .......... .......... 72% 57.7K 2s<br />
250K .......... .......... .......... .......... .......... 86% 67.1K 1s<br />
300K .......... .......... .......... .......... ....... 100% 76.4K=7.7s<br />
<br />
2011-01-30 22:12:27 (44.9 KB/s) - `pandoc-1.6.0.1.tar.gz.part' saved [355477/355477]<br />
<br />
==> Generating checksums for source files...<br />
</pre><br />
<br />
Checking what was created:<br />
<br />
% ls<br />
haskell-cc-delcont<br />
<br />
You can now inspect the PKGBUILD and install script for the library:<br />
<br />
<pre><br />
# Maintainer: My Name <my.name@domain.org><br />
_hkgname=pandoc<br />
pkgname=haskell-pandoc<br />
pkgver=1.6.0.1<br />
pkgrel=1<br />
pkgdesc="Conversion between markup formats"<br />
url="http://hackage.haskell.org/package/${_hkgname}"<br />
license=('GPL')<br />
arch=('i686' 'x86_64')<br />
makedepends=()<br />
depends=('ghc' 'haskell-http=4000.0.9' 'haskell-bytestring=0.9.1.7' 'haskell-containers=0.3.0.0' 'haskell-directory=1.0.1.1' 'haskell-extensible-exceptions=0.1.1.1' 'haskell-filepath=1.1.0.4' 'haskell-mtl>=1.1' 'haskell-network=2.2.1.7' 'haskell-old-time=1.0.0.5' 'haskell-parsec=2.1.0.1' 'haskell-pretty=1.0.1.1' 'haskell-process=1.0.1.3' 'haskell-random=1.0.0.2' 'haskell-syb=0.1.0.2' 'haskell-texmath<0.5' 'haskell-utf8-string>=0.3' 'haskell-xhtml=3000.2.0.1' 'haskell-xml<1.4' 'haskell-zip-archive<0.2')<br />
options=('strip')<br />
source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)<br />
install=${pkgname}.install<br />
md5sums=('d19a630462595941b3100dff6f839aa3')<br />
build() {<br />
cd ${srcdir}/${_hkgname}-${pkgver}<br />
runhaskell Setup configure -O --enable-split-objs --enable-shared \<br />
--prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid<br />
runhaskell Setup build<br />
runhaskell Setup haddock<br />
runhaskell Setup register --gen-script<br />
runhaskell Setup unregister --gen-script<br />
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh<br />
}<br />
package() {<br />
cd ${srcdir}/${_hkgname}-${pkgver}<br />
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh<br />
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh<br />
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries<br />
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}<br />
runhaskell Setup copy --destdir=${pkgdir}<br />
}<br />
</pre><br />
<br />
It follows the conventions for Haskell packages:<br />
<br />
* Libraries are prefixed with "haskell-"<br />
* All libraries that the package depend on are listed (libraries shipped with ghc are dealt with by having the ghc package provide them)<br />
* It uses cabal to generate a post-install register/unregister script, with a standard name.<br />
* We use haddock to build the documentation.<br />
<br />
All Haskell libraries should follow these naming conventions, and using the latest release of cabal2arch will ensure this is the case.<br />
<br />
===Guidelines for Libraries===<br />
<br />
In general, each .cabal file should map to one PKGBUILD. The following conventions hold:<br />
<br />
* libraries have their cabal names prefixed with "haskell-"<br />
* all libraries have a dependency on 'ghc'<br />
* all libraries that are depended on must be listed in the depends-array in the PKGBUILD<br />
* be careful about dependencies from gtk2hs: cairo, svg, glib, gtk. These are all provided by the 'gtk2hs' package, not , e.g. "haskell-cairo"<br />
<br />
Registering Haskell libraries is done via a register hook, see above.<br />
<br />
===Guidelines for Programs ===<br />
<br />
* Have their normal name. Examples: hmp3, xmonad, ghc, cabal-install<br />
<br />
* Be careful about dynamically linked runtime dependencies on C. For example, all GHC-produced binaries have a runtime dependency on 'gmp'. OpenGL or GtT-based binaries will have additional 'depends'. cabal2arch will attempt to work out the C dependencies, but there may be others implied by Haskell dependencies that are missed.<br />
<br />
* Use executable stripping, --enable-executable-stripping. cabal2arch will do this automatically.<br />
<br />
== Automatic local building of Hackage Packages with cabal2arch using Bauerbill ==<br />
<br />
Although there are a number of haskell packages on AUR, there will always be outdated packages on AUR. If this happens and you want to create a fully updated package you would normally use cabal2arch. This however can become painful/time consuming if you have numerous packages with different dependencies (some of which may/may not be updated). Instead you can automatic this process by using [[Bauerbill]] which has the --hackage flag, allowing you to create AUR packages from Hackage locally. Below is an example of some common commands<br />
<br />
bauerbill -S --hackage [pkgs] : build [pkgs] directly from Hackage*<br />
bauerbill -Si --hackage [pkgs] : look up information about [pkgs]<br />
bauerbill -Ss --hackage [args] : search for [args]<br />
bauerbill -Qu --hackage : list upgradable Hackage packages<br />
<br />
Syncing packages with the --hackage flag will interactively download all dependencies of the package from Hackage, convert them using cabal2arch and then build/install them (while checking dependencies). You can combine this with the --aur flag to give precedence to Hackage packages that are on AUR</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=130672Haskell package guidelines2011-02-12T22:02:08Z<p>Magus: /* Community */</p>
<hr />
<div>[[Category:Guidelines (English)]]<br />
[[Category:Package development (English)]]<br />
<br />
{{i18n|Haskell package guidelines}}<br />
<br />
'''Haskell on Arch Linux'''<br />
<br />
Haskell is well supported on Arch Linux, with GHC and other key tools available via pacman, a growing number of packages made available by the ArchHaskell group, and a large part of [http://hackage.haskell.org hackage.haskell.org] library database [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=arch-haskell&SeB=m&SB=n&SO=a&PP=100&do_Search=Go available via AUR].<br />
<br />
The community around Haskell on Arch is active and well organized but your help is always welcome.<br />
<br />
== Community ==<br />
<br />
The main resources for the [[ArchHaskell]] community to interact and discuss are:<br />
<br />
* [http://www.gogloom.com/FreeNode/arch-haskell <nowiki>#arch-haskell</nowiki>] irc channel @ freenode.org<br />
** Good for quick discussion and planning<br />
* [http://haskell.org/mailman/listinfo/arch-haskell arch-haskell@haskell.org] mailing list<br />
** Broader announcements, and automated updates<br />
* [https://github.com/archhaskell ArchHaskell group] on github<br />
** Repositories for tools as well as the source for the binary packages (HABS).<br />
<br />
== Haskell Packages ==<br />
<br />
The core Haskell tools are available in the core system (extra):<br />
<br />
==== <nowiki>[Extra]</nowiki> ====<br />
<br />
* [http://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 Haskell packages in the core system]<br />
<br />
Our policy is for [extra] to provide the Haskell platform, and popular Haskell applications.<br />
<br />
==== <nowiki>[haskell]</nowiki> ====<br />
<br />
The packages maintained by the ArchHaskell group can be accessed by adding the following entry to pacman.conf:<br />
<br />
[haskell]<br />
Server = http://andromeda.kiwilight.com/$repo/$arch<br />
<br />
==== <nowiki>AUR</nowiki> ====<br />
<br />
* [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=arch-haskell&SeB=m&SB=n&SO=a&PP=100&do_Search=Go Haskell packages in AUR]<br />
<br />
A huge number (almost 2000) packages built from http://hackage.haskell.org<br />
<br />
These generally improve on installing directly from Hackage as they resolve required C libraries. They can be installed as, for example:<br />
<br />
sudo paktahn -S haskell-csv<br />
<br />
Anything not found here can be installed via [http://aur.archlinux.org/packages.php?ID=17411 cabal-install] direct from Hackage.<br />
<br />
== Guidelines ==<br />
<br />
In almost all cases cabalised Haskell packages can be automatically translated into Arch packages, via the cabal2arch tool. It is strongly recommended that you use the latest released version of this tool, as it implements the packaging policy for Haskell packages. You can get it in several ways:<br />
<br />
* Add the <nowiki>[haskell]</nowiki> repository to pacman.conf and use pacman do install the latest release.<br />
* Download and build the [http://aur.archlinux.org/packages.php?ID=17471 source from AUR], either manually or using one of the many [[AUR Helpers]].<br />
* Install directly from Hackage using "cabal install cabal2arch".<br />
<br />
===cabal2arch: an example===<br />
<br />
This example illustrates how to create a new package with cabal2arch. We'll make a new package for the delimited continuations library, CC-delcont:<br />
<br />
First, set the name and email address to be used in the generated PKGBUILD:<br />
<br />
export ARCH_HASKELL='My Name <my.name@domain.org>'<br />
<br />
Second, find [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CC-delcont the hackage page for CC-delcont], then identify the link to the .cabal file. Use this link as an argument to cabal2arch:<br />
<br />
<pre><br />
% cd /tmp<br />
% cabal2arch http://hackage.haskell.org/packages/archive/pandoc/1.6.0.1/pandoc.cabal<br />
Using /tmp/tmp.x9SEhTJ8N9/pandoc.cabal<br />
Feeding the PKGBUILD to `makepkg -g`...<br />
==> Retrieving Sources...<br />
-> Downloading pandoc-1.6.0.1.tar.gz...<br />
--2011-01-30 22:12:18-- http://hackage.haskell.org/packages/archive/pandoc/1.6.0.1/pandoc-1.6.0.1.tar.gz<br />
Resolving hackage.haskell.org... 69.30.63.204<br />
Connecting to hackage.haskell.org|69.30.63.204|:80... connected.<br />
HTTP request sent, awaiting response... 200 OK<br />
Length: 355477 (347K) [application/x-tar]<br />
Saving to: `pandoc-1.6.0.1.tar.gz.part'<br />
<br />
0K .......... .......... .......... .......... .......... 14% 20.3K 15s<br />
50K .......... .......... .......... .......... .......... 28% 40.3K 9s<br />
100K .......... .......... .......... .......... .......... 43% 53.0K 6s<br />
150K .......... .......... .......... .......... .......... 57% 58.2K 4s<br />
200K .......... .......... .......... .......... .......... 72% 57.7K 2s<br />
250K .......... .......... .......... .......... .......... 86% 67.1K 1s<br />
300K .......... .......... .......... .......... ....... 100% 76.4K=7.7s<br />
<br />
2011-01-30 22:12:27 (44.9 KB/s) - `pandoc-1.6.0.1.tar.gz.part' saved [355477/355477]<br />
<br />
==> Generating checksums for source files...<br />
</pre><br />
<br />
Checking what was created:<br />
<br />
% ls<br />
haskell-cc-delcont<br />
<br />
You can now inspect the PKGBUILD and install script for the library:<br />
<br />
<pre><br />
# Maintainer: My Name <my.name@domain.org><br />
_hkgname=pandoc<br />
pkgname=haskell-pandoc<br />
pkgver=1.6.0.1<br />
pkgrel=1<br />
pkgdesc="Conversion between markup formats"<br />
url="http://hackage.haskell.org/package/${_hkgname}"<br />
license=('GPL')<br />
arch=('i686' 'x86_64')<br />
makedepends=()<br />
depends=('ghc' 'haskell-http=4000.0.9' 'haskell-bytestring=0.9.1.7' 'haskell-containers=0.3.0.0' 'haskell-directory=1.0.1.1' 'haskell-extensible-exceptions=0.1.1.1' 'haskell-filepath=1.1.0.4' 'haskell-mtl>=1.1' 'haskell-network=2.2.1.7' 'haskell-old-time=1.0.0.5' 'haskell-parsec=2.1.0.1' 'haskell-pretty=1.0.1.1' 'haskell-process=1.0.1.3' 'haskell-random=1.0.0.2' 'haskell-syb=0.1.0.2' 'haskell-texmath<0.5' 'haskell-utf8-string>=0.3' 'haskell-xhtml=3000.2.0.1' 'haskell-xml<1.4' 'haskell-zip-archive<0.2')<br />
options=('strip')<br />
source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)<br />
install=${pkgname}.install<br />
md5sums=('d19a630462595941b3100dff6f839aa3')<br />
build() {<br />
cd ${srcdir}/${_hkgname}-${pkgver}<br />
runhaskell Setup configure -O --enable-split-objs --enable-shared \<br />
--prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid<br />
runhaskell Setup build<br />
runhaskell Setup haddock<br />
runhaskell Setup register --gen-script<br />
runhaskell Setup unregister --gen-script<br />
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh<br />
}<br />
package() {<br />
cd ${srcdir}/${_hkgname}-${pkgver}<br />
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh<br />
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh<br />
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries<br />
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}<br />
runhaskell Setup copy --destdir=${pkgdir}<br />
}<br />
</pre><br />
<br />
It follows the conventions for Haskell packages:<br />
<br />
* Libraries are prefixed with "haskell-"<br />
* All libraries that the package depend on are listed (libraries shipped with ghc are dealt with by having the ghc package provide them)<br />
* It uses cabal to generate a post-install register/unregister script, with a standard name.<br />
* We use haddock to build the documentation.<br />
<br />
All Haskell libraries should follow these naming conventions, and using the latest release of cabal2arch will ensure this is the case.<br />
<br />
===Guidelines for Libraries===<br />
<br />
In general, each .cabal file should map to one PKGBUILD. The following conventions hold:<br />
<br />
* libraries have their cabal names prefixed with "haskell-"<br />
* all libraries have a dependency on 'ghc'<br />
* all libraries that are depended on must be listed in the depends-array in the PKGBUILD<br />
* be careful about dependencies from gtk2hs: cairo, svg, glib, gtk. These are all provided by the 'gtk2hs' package, not , e.g. "haskell-cairo"<br />
<br />
Registering Haskell libraries is done via a register hook, see above.<br />
<br />
===Guidelines for Programs ===<br />
<br />
* Have their normal name. Examples: hmp3, xmonad, ghc, cabal-install<br />
<br />
* Be careful about dynamically linked runtime dependencies on C. For example, all GHC-produced binaries have a runtime dependency on 'gmp'. OpenGL or GtT-based binaries will have additional 'depends'. cabal2arch will attempt to work out the C dependencies, but there may be others implied by Haskell dependencies that are missed.<br />
<br />
* Use executable stripping, --enable-executable-stripping. cabal2arch will do this automatically.<br />
<br />
== Automatic local building of Hackage Packages with cabal2arch using Bauerbill ==<br />
<br />
Although there are a number of haskell packages on AUR, there will always be outdated packages on AUR. If this happens and you want to create a fully updated package you would normally use cabal2arch. This however can become painful/time consuming if you have numerous packages with different dependencies (some of which may/may not be updated). Instead you can automatic this process by using [[Bauerbill]] which has the --hackage flag, allowing you to create AUR packages from Hackage locally. Below is an example of some common commands<br />
<br />
bauerbill -S --hackage [pkgs] : build [pkgs] directly from Hackage*<br />
bauerbill -Si --hackage [pkgs] : look up information about [pkgs]<br />
bauerbill -Ss --hackage [args] : search for [args]<br />
bauerbill -Qu --hackage : list upgradable Hackage packages<br />
<br />
Syncing packages with the --hackage flag will interactively download all dependencies of the package from Hackage, convert them using cabal2arch and then build/install them (while checking dependencies). You can combine this with the --aur flag to give precedence to Hackage packages that are on AUR</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=129433Haskell package guidelines2011-01-30T22:22:53Z<p>Magus: First attempt at bringing this page into the present.</p>
<hr />
<div>[[Category:Guidelines (English)]]<br />
[[Category:Package development (English)]]<br />
<br />
{{i18n|Haskell package guidelines}}<br />
<br />
'''Haskell on Arch Linux'''<br />
<br />
Haskell is well supported on Arch Linux, with GHC and other key tools available via pacman, a growing number of packages made available by the ArchHaskell group, and a large part of [http://hackage.haskell.org hackage.haskell.org] library database [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=arch-haskell&SeB=m&SB=n&SO=a&PP=100&do_Search=Go available via AUR].<br />
<br />
The community around Haskell on Arch is active and well organized but your help is always welcome.<br />
<br />
== Community ==<br />
<br />
The main resources for the Arch/Haskell community to interact and discuss are:<br />
<br />
* [http://www.gogloom.com/FreeNode/arch-haskell <nowiki>#arch-haskell</nowiki>] irc channel @ freenode.org<br />
** Good for quick discussion and planning<br />
* [http://haskell.org/mailman/listinfo/arch-haskell arch-haskell@haskell.org] mailing list<br />
** Broader announcements, and automated updates<br />
* [https://github.com/archhaskell ArchHaskell group] on github<br />
** Repositories for tools as well as the source for the binary packages (HABS).<br />
<br />
== Haskell Packages ==<br />
<br />
The core Haskell tools are available in the core system (extra):<br />
<br />
==== <nowiki>[Extra]</nowiki> ====<br />
<br />
* [http://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 Haskell packages in the core system]<br />
<br />
Our policy is for [extra] to provide the Haskell platform, and popular Haskell applications.<br />
<br />
==== <nowiki>[haskell]</nowiki> ====<br />
<br />
The packages maintained by the ArchHaskell group can be accessed by adding the following entry to pacman.conf:<br />
<br />
[haskell]<br />
Server = http://andromeda.kiwilight.com/$repo/$arch<br />
<br />
==== <nowiki>AUR</nowiki> ====<br />
<br />
* [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=arch-haskell&SeB=m&SB=n&SO=a&PP=100&do_Search=Go Haskell packages in AUR]<br />
<br />
A huge number (almost 2000) packages built from http://hackage.haskell.org<br />
<br />
These generally improve on installing directly from Hackage as they resolve required C libraries. They can be installed as, for example:<br />
<br />
sudo paktahn -S haskell-csv<br />
<br />
Anything not found here can be installed via [http://aur.archlinux.org/packages.php?ID=17411 cabal-install] direct from Hackage.<br />
<br />
== Guidelines ==<br />
<br />
In almost all cases cabalised Haskell packages can be automatically translated into Arch packages, via the cabal2arch tool. It is strongly recommended that you use the latest released version of this tool, as it implements the packaging policy for Haskell packages. You can get it in several ways:<br />
<br />
* Add the <nowiki>[haskell]</nowiki> repository to pacman.conf and use pacman do install the latest release.<br />
* Download and build the [http://aur.archlinux.org/packages.php?ID=17471 source from AUR], either manually or using one of the many [[AUR Helpers]].<br />
* Install directly from Hackage using "cabal install cabal2arch".<br />
<br />
===cabal2arch: an example===<br />
<br />
This example illustrates how to create a new package with cabal2arch. We'll make a new package for the delimited continuations library, CC-delcont:<br />
<br />
First, set the name and email address to be used in the generated PKGBUILD:<br />
<br />
export ARCH_HASKELL='My Name <my.name@domain.org>'<br />
<br />
Second, find [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CC-delcont the hackage page for CC-delcont], then identify the link to the .cabal file. Use this link as an argument to cabal2arch:<br />
<br />
<pre><br />
% cd /tmp<br />
% cabal2arch http://hackage.haskell.org/packages/archive/pandoc/1.6.0.1/pandoc.cabal<br />
Using /tmp/tmp.x9SEhTJ8N9/pandoc.cabal<br />
Feeding the PKGBUILD to `makepkg -g`...<br />
==> Retrieving Sources...<br />
-> Downloading pandoc-1.6.0.1.tar.gz...<br />
--2011-01-30 22:12:18-- http://hackage.haskell.org/packages/archive/pandoc/1.6.0.1/pandoc-1.6.0.1.tar.gz<br />
Resolving hackage.haskell.org... 69.30.63.204<br />
Connecting to hackage.haskell.org|69.30.63.204|:80... connected.<br />
HTTP request sent, awaiting response... 200 OK<br />
Length: 355477 (347K) [application/x-tar]<br />
Saving to: `pandoc-1.6.0.1.tar.gz.part'<br />
<br />
0K .......... .......... .......... .......... .......... 14% 20.3K 15s<br />
50K .......... .......... .......... .......... .......... 28% 40.3K 9s<br />
100K .......... .......... .......... .......... .......... 43% 53.0K 6s<br />
150K .......... .......... .......... .......... .......... 57% 58.2K 4s<br />
200K .......... .......... .......... .......... .......... 72% 57.7K 2s<br />
250K .......... .......... .......... .......... .......... 86% 67.1K 1s<br />
300K .......... .......... .......... .......... ....... 100% 76.4K=7.7s<br />
<br />
2011-01-30 22:12:27 (44.9 KB/s) - `pandoc-1.6.0.1.tar.gz.part' saved [355477/355477]<br />
<br />
==> Generating checksums for source files...<br />
</pre><br />
<br />
Checking what was created:<br />
<br />
% ls<br />
haskell-cc-delcont<br />
<br />
You can now inspect the PKGBUILD and install script for the library:<br />
<br />
<pre><br />
# Maintainer: My Name <my.name@domain.org><br />
_hkgname=pandoc<br />
pkgname=haskell-pandoc<br />
pkgver=1.6.0.1<br />
pkgrel=1<br />
pkgdesc="Conversion between markup formats"<br />
url="http://hackage.haskell.org/package/${_hkgname}"<br />
license=('GPL')<br />
arch=('i686' 'x86_64')<br />
makedepends=()<br />
depends=('ghc' 'haskell-http=4000.0.9' 'haskell-bytestring=0.9.1.7' 'haskell-containers=0.3.0.0' 'haskell-directory=1.0.1.1' 'haskell-extensible-exceptions=0.1.1.1' 'haskell-filepath=1.1.0.4' 'haskell-mtl>=1.1' 'haskell-network=2.2.1.7' 'haskell-old-time=1.0.0.5' 'haskell-parsec=2.1.0.1' 'haskell-pretty=1.0.1.1' 'haskell-process=1.0.1.3' 'haskell-random=1.0.0.2' 'haskell-syb=0.1.0.2' 'haskell-texmath<0.5' 'haskell-utf8-string>=0.3' 'haskell-xhtml=3000.2.0.1' 'haskell-xml<1.4' 'haskell-zip-archive<0.2')<br />
options=('strip')<br />
source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)<br />
install=${pkgname}.install<br />
md5sums=('d19a630462595941b3100dff6f839aa3')<br />
build() {<br />
cd ${srcdir}/${_hkgname}-${pkgver}<br />
runhaskell Setup configure -O --enable-split-objs --enable-shared \<br />
--prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid<br />
runhaskell Setup build<br />
runhaskell Setup haddock<br />
runhaskell Setup register --gen-script<br />
runhaskell Setup unregister --gen-script<br />
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh<br />
}<br />
package() {<br />
cd ${srcdir}/${_hkgname}-${pkgver}<br />
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh<br />
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh<br />
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries<br />
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}<br />
runhaskell Setup copy --destdir=${pkgdir}<br />
}<br />
</pre><br />
<br />
It follows the conventions for Haskell packages:<br />
<br />
* Libraries are prefixed with "haskell-"<br />
* All libraries that the package depend on are listed (libraries shipped with ghc are dealt with by having the ghc package provide them)<br />
* It uses cabal to generate a post-install register/unregister script, with a standard name.<br />
* We use haddock to build the documentation.<br />
<br />
All Haskell libraries should follow these naming conventions, and using the latest release of cabal2arch will ensure this is the case.<br />
<br />
===Guidelines for Libraries===<br />
<br />
In general, each .cabal file should map to one PKGBUILD. The following conventions hold:<br />
<br />
* libraries have their cabal names prefixed with "haskell-"<br />
* all libraries have a dependency on 'ghc'<br />
* all libraries that are depended on must be listed in the depends-array in the PKGBUILD<br />
* be careful about dependencies from gtk2hs: cairo, svg, glib, gtk. These are all provided by the 'gtk2hs' package, not , e.g. "haskell-cairo"<br />
<br />
Registering Haskell libraries is done via a register hook, see above.<br />
<br />
===Guidelines for Programs ===<br />
<br />
* Have their normal name. Examples: hmp3, xmonad, ghc, cabal-install<br />
<br />
* Be careful about dynamically linked runtime dependencies on C. For example, all GHC-produced binaries have a runtime dependency on 'gmp'. OpenGL or GtT-based binaries will have additional 'depends'. cabal2arch will attempt to work out the C dependencies, but there may be others implied by Haskell dependencies that are missed.<br />
<br />
* Use executable stripping, --enable-executable-stripping. cabal2arch will do this automatically.<br />
<br />
== Automatic local building of Hackage Packages with cabal2arch using Bauerbill ==<br />
<br />
Although there are a number of haskell packages on AUR, there will always be outdated packages on AUR. If this happens and you want to create a fully updated package you would normally use cabal2arch. This however can become painful/time consuming if you have numerous packages with different dependencies (some of which may/may not be updated). Instead you can automatic this process by using [[Bauerbill]] which has the --hackage flag, allowing you to create AUR packages from Hackage locally. Below is an example of some common commands<br />
<br />
bauerbill -S --hackage [pkgs] : build [pkgs] directly from Hackage*<br />
bauerbill -Si --hackage [pkgs] : look up information about [pkgs]<br />
bauerbill -Ss --hackage [args] : search for [args]<br />
bauerbill -Qu --hackage : list upgradable Hackage packages<br />
<br />
Syncing packages with the --hackage flag will interactively download all dependencies of the package from Hackage, convert them using cabal2arch and then build/install them (while checking dependencies). You can combine this with the --aur flag to give precedence to Hackage packages that are on AUR</div>Magushttps://wiki.archlinux.org/index.php?title=Haskell_package_guidelines&diff=129431Haskell package guidelines2011-01-30T21:56:32Z<p>Magus: </p>
<hr />
<div>[[Category:Guidelines (English)]]<br />
[[Category:Package development (English)]]<br />
<br />
{{i18n|Haskell package guidelines}}<br />
<br />
'''Haskell on Arch Linux'''<br />
<br />
Haskell is well supported on Arch Linux, with GHC and other key tools available via pacman, a growing number of packages made available by the ArchHaskell group, and a large part of [http://hackage.haskell.org hackage.haskell.org] library database [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=arch-haskell&SeB=m&SB=n&SO=a&PP=100&do_Search=Go available via AUR].<br />
<br />
The community around Haskell on Arch is active and well organized but your help is always welcome.<br />
<br />
== Community ==<br />
<br />
The main resources for the Arch/Haskell community to interact and discuss are:<br />
<br />
* [http://www.gogloom.com/FreeNode/arch-haskell <nowiki>#arch-haskell</nowiki>] irc channel @ freenode.org<br />
** Good for quick discussion and planning<br />
* [http://haskell.org/mailman/listinfo/arch-haskell arch-haskell@haskell.org] mailing list<br />
** Broader announcements, and automated updates<br />
* [https://github.com/archhaskell ArchHaskell group] on github<br />
** Repositories for tools as well as the source for the binary packages (HABS).<br />
<br />
== Haskell Packages ==<br />
<br />
The core Haskell tools are available in the core system (extra):<br />
<br />
==== <nowiki>[Extra]</nowiki> ====<br />
<br />
* [http://www.archlinux.org/packages/?arch=x86_64&repo=Extra&q=haskell&last_update=&limit=50 Haskell packages in the core system]<br />
<br />
Our policy is for [extra] to provide the Haskell platform, and popular Haskell applications.<br />
<br />
==== <nowiki>[haskell]</nowiki> ====<br />
<br />
The packages maintained by the ArchHaskell group can be accessed by adding the following entry to pacman.conf:<br />
<br />
[haskell]<br />
Server = http://andromeda.kiwilight.com/$repo/$arch<br />
<br />
==== <nowiki>AUR</nowiki> ====<br />
<br />
* [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=arch-haskell&SeB=m&SB=n&SO=a&PP=100&do_Search=Go Haskell packages in AUR]<br />
<br />
A huge number (almost 2000) packages built from http://hackage.haskell.org<br />
<br />
These generally improve on installing directly from Hackage as they resolve required C libraries. They can be installed as, for example:<br />
<br />
sudo paktahn -S haskell-csv<br />
<br />
Anything not found here can be installed via [http://aur.archlinux.org/packages.php?ID=17411 cabal-install] direct from Hackage.<br />
<br />
== Guidelines ==<br />
<br />
In almost all cases cabalised Haskell packages can be automatically translated into Arch packages, via the cabal2arch tool.<br />
<br />
* [http://aur.archlinux.org/packages.php?ID=17471 Get the latest cabal2arch]<br />
<br />
It is strongly recommended that you use the latest released version of this tool, as it implements the packaging policy for Haskell packages. You can get it in several ways:<br />
<br />
* Add the <nowiki>[haskell]</nowiki> repository to pacman.conf and use pacman do install the latest release.<br />
* Download and build the [http://aur.archlinux.org/packages.php?ID=17471 source from AUR], either manually or using one of the many [AUR_Helpers].<br />
* Install directly from Hackage using "cabal install cabal2arch".<br />
<br />
===cabal2arch: an example===<br />
<br />
This example illustrates how to create a new package with cabal2arch. We'll make a<br />
new package for the delimited continuations library, CC-delcont:<br />
<br />
First, find [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CC-delcont the hackage page for CC-delcont], then identify the link to the .cabal file. Use this link<br />
as an argument to cabal2arch:<br />
<br />
$ cd /tmp<br />
$ cabal2arch http://hackage.haskell.org/packages/archive/CC-delcont/0.2/CC-delcont.cabal<br />
Using /tmp/tmp.Ig0H8jCOyO/CC-delcont.cabal<br />
Fetching http://hackage.haskell.org/packages/archive/CC-delcont/0.2/CC-delcont-0.2.tar.gz<br />
Created /tmp/haskell-cc-delcont.tar.gz<br />
<br />
Checking what was created:<br />
<br />
$ ls<br />
haskell-cc-delcont haskell-cc-delcont.tar.gz<br />
<br />
The .tar.gz is a zipped PKGBUILD ready to upload to AUR.<br />
You can now inspect the PKGBUILD and install script for the library:<br />
<br />
# Contributor: Arch Haskell Team <arch-haskell@haskell.org><br />
# Package generated by cabal2arch 0.6.1<br />
pkgname=haskell-cc-delcont<br />
pkgrel=1<br />
pkgver=0.2<br />
pkgdesc="Delimited continuations and dynamically scoped variables"<br />
url="http://hackage.haskell.org/package/CC-delcont"<br />
license=('custom:OtherLicense')<br />
arch=('i686' 'x86_64')<br />
makedepends=()<br />
depends=('ghc' 'haskell-cabal')<br />
options=('strip')<br />
source=(http://hackage.haskell.org/packages/archive/CC-delcont/0.2/CC-delcont-0.2.tar.gz)<br />
install=haskell-cc-delcont.install<br />
md5sums=('e52149fca9bf76330a7c159917152790')<br />
build() {<br />
cd ${srcdir}/CC-delcont-0.2<br />
runhaskell Setup configure --prefix=/usr --docdir=/usr/share/doc/${pkgname} || return 1<br />
runhaskell Setup build || return 1<br />
runhaskell Setup haddock || return 1<br />
runhaskell Setup register --gen-script || return 1<br />
runhaskell Setup unregister --gen-script || return 1<br />
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/$pkgname/register.sh<br />
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/$pkgname/unregister.sh<br />
install -d -m755 $pkgdir/usr/share/doc/ghc/libraries<br />
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/libraries/CC-delcont<br />
runhaskell Setup copy --destdir=${pkgdir} || return 1<br />
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1<br />
rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE<br />
}<br />
<br />
It follows the conventions for Haskell packages:<br />
<br />
* Maintainer is by default the Arch Haskell team.<br />
* Libraries are prefixed with "haskell-"<br />
* "core" and "extra" Haskell libraries are not included as explicit dependencies, since ghc provides them<br />
* It uses cabal to generate a post-install register/unregister script, with a standard name.<br />
* We use haddock to build the documentation.<br />
* Profiling versions of the library aren't currently installed (''TODO'')<br />
<br />
All Haskell libraries should follow these naming conventions, and using the cabal2arch tool<br />
will ensure this is the case.<br />
<br />
Inspect the bundle, and confirm you can build and install it:<br />
<br />
$ makepkg -s<br />
$ makepkg -i<br />
<br />
And we're ready to go. Now your .tar.gz is ready to upload to AUR.<br />
<br />
=== "Provides" ===<br />
<br />
[http://haskell.org/haskellwiki/Arch_Linux/Preferred_Package_Tools See the discussion on the use of "provides" here].<br />
<br />
===Uploading the the Haskell repository ===<br />
<br />
'''This section is out of date'''<br />
<br />
The following (ad hoc) script is currently used to upload packages after running cabal2arch to the respository, and keep it in sync:<br />
<br />
#!/bin/sh<br />
set -e<br />
makepkg -i<br />
scp *-x86_64.pkg.tar.gz code.haskell.org:/srv/code/arch/x86_64/<br />
repo-add /home/dons/haskell.db.tar.gz *.pkg.tar.gz<br />
rm -rf *.tar.gz pkg src<br />
pwd=`pwd`<br />
dir=`basename $pwd`<br />
cd ..<br />
scp -r $dir code.haskell.org:/srv/code/arch/x86_64/<br />
scp $HOME/haskell.db.tar.gz code.haskell.org:/srv/code/arch/x86_64/<br />
<br />
This is to be used by those with arch-haskell repository write permissions.<br />
<br />
===Guidelines for Libraries===<br />
<br />
In general, each .cabal file should map to one PKGBUILD. The following conventions hold:<br />
<br />
* libraries have their cabal names prefixed with "haskell-"<br />
* all haskell dependencies are statically linked, so can go in the makedepends field.<br />
* all libraries have a dependency on 'ghc'<br />
* libraries don't need to have explicit dependencies on core Haskell packages -- these come in the 'ghc' package. (e.g. array, base, containers, random, process etc).<br />
* be careful about dependencies from gtk2hs: cairo, svg, glib, gtk. These are all provided by the 'gtk2hs' package, not , e.g. "haskell-cairo"<br />
* we want to resolve dependencies with a fixed constraint to base>=3.0<br />
* be careful about dependencies on the libraries provided by the basic 'ghc' package, which include:<br />
<br />
ALUT-2.1.0.0 cgi-3001.1.5.1 network-2.1.0.0 regex-base-0.72.0.1<br />
Cabal-1.2.3.0 containers-0.1.0.1 old-locale-1.0.0.0 regex-compat-0.71.0.1<br />
GLUT-2.1.1.1 directory-1.0.0.0 old-time-1.0.0.0 regex-posix-0.72.0.2<br />
HUnit-1.2.0.0 fgl-5.4.1.1 packedstring-0.1.0.0 stm-2.1.1.0<br />
OpenAL-1.3.1.1 filepath-1.1.0.0 parallel-1.0.0.0 template-haskell-2.2.0.0<br />
OpenGL-2.2.1.1 haskell-src-1.0.1.1 parsec-2.1.0.0 time-1.1.2.0<br />
QuickCheck-1.1.0.0 haskell98-1.0.1.0 pretty-1.0.0.0 unix-2.3.0.0<br />
array-0.1.0.0 hpc-0.5.0.0 process-1.0.0.0 xhtml-3000.0.2.1<br />
base-3.0.1.0 html-1.0.1.1 random-1.0.0.0<br />
bytestring-0.9.0.1 mtl-1.1.0.0 readline-1.0.1.0<br />
<br />
These libraries don't need explicit dependencies to be set. cabal2arch solves all these constraints for us.<br />
<br />
Registering Haskell libraries is done via a register hook:<br />
<br />
build() {<br />
cd ${srcdir}/cabal2arch-0.1<br />
runhaskell Setup configure --prefix=/usr || return 1<br />
runhaskell Setup build || return 1<br />
-- generate register scripts<br />
runhaskell Setup register --gen-script || return 1<br />
runhaskell Setup unregister --gen-script || return 1<br />
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/$pkgname/register.sh<br />
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/$pkgname/unregister.sh<br />
runhaskell Setup copy --destdir=${pkgdir} || return 1<br />
-- usual Haskell BSD3 license isnt' official<br />
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1<br />
}<br />
<br />
* Examples:<br />
haskell-zlib, haskell-mersenne-random<br />
<br />
===Guidelines for Programs ===<br />
<br />
* Have their normal name. Examples:<br />
hmp3, xmonad, ghc, cabal-install<br />
<br />
* Be careful about dynamically linked runtime dependencies on C. For example, all GHC-produced binaries<br />
have a runtime dependency on 'gmp'. OpenGL or GtT-based binaries will have additional 'depends'. cabal2arch will attempt to work out the C dependencies, but there may be others implied by Haskell dependencies that are missed.<br />
<br />
* Use executable stripping, --enable-executable-stripping. cabal2arch will do this automatically.<br />
<br />
== Haskell on Arch: current state ==<br />
<br />
* http://www.galois.com/~dons/arch-haskell-status.html<br />
<br />
===AUR===<br />
<br />
There's another [http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=haskell&SB=v&SO=d&PP=100&SeB=nd&do_Orphans= > 550 Haskell packages] in AUR.<br />
<br />
== Building all of Hackage ==<br />
<br />
The following simple script, with cabal-install and cabal2arch installed,<br />
will do a simple run over all the Haskell packages on haskell.org, <br />
creating arch packages for them. Before you start it is worthwhile removing all haskell packages, and reinstalling them. And then editing your unpacked haskell package directory to remove base libraries -- you probably don't want to install them.<br />
<br />
<br />
#!/bin/sh<br />
cabal update<br />
tmpdir=`mktemp -d`<br />
finaldir=`mktemp -d`<br />
cd $tmpdir<br />
tar xzf $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz<br />
for dir in * ; do <br />
if [ ! -d $dir ] ; then<br />
continue<br />
fi<br />
cd $dir<br />
lib=`ls --color=never -1 | tail -1`<br />
echo "************** Building package for $dir-$lib"<br />
cd $lib<br />
cabal2arch *.cabal > $dir.log 2>&1<br />
cd `find . -type d -a ! -name '.'`<br />
if makepkg -sm > ../$dir.log 2>&1 ; then<br />
echo "OK: " $dir-$lib<br />
cp *.pkg.tar.gz $finaldir/<br />
sudo pacman -A *.pkg.tar.gz<br />
rm *.pkg.tar.gz<br />
rm -rf pkg src *.tar.gz<br />
cd ..<br />
cp -R `find . -type d -a ! -name '.'` $finaldir/<br />
cp *.tar.gz $finaldir/<br />
else<br />
echo "Failed"<br />
fi<br />
cd $tmpdir<br />
done<br />
echo `ls $finaldir/*pkg* | wc -l` "build packages in $finaldir"<br />
echo "Now: scp -r $finaldir/* code.haskell.org:/srv/code/arch/$MACHTYPE/"<br />
<br />
== Automatic local building of Hackage Packages with cabal2arch using Bauerbill ==<br />
Although there are a number of haskell packages on AUR, there will always be outdated packages on AUR. If this happens and you want to create a fully updated package you would normally use cabal2arch. This however can become painful/time consuming if you have numerous packages with different dependencies (some of which may/may not be updated). Instead you can automatic this process by using [[Bauerbill]] which has the --hackage flag, allowing you to create AUR packages from Hackage locally. Below is an example of some common commands<br />
<br />
bauerbill -S --hackage [pkgs] : build [pkgs] directly from Hackage*<br />
bauerbill -Si --hackage [pkgs] : look up information about [pkgs]<br />
bauerbill -Ss --hackage [args] : search for [args]<br />
bauerbill -Qu --hackage : list upgradable Hackage packages<br />
<br />
Syncing packages with the --hackage flag will interactively download all dependencies of the package from Hackage, convert them using cabal2arch and then build/install them (while checking dependencies). You can combine this with the --aur flag to give precedence to Hackage packages that are on AUR</div>Magushttps://wiki.archlinux.org/index.php?title=Talk:AutoFS&diff=105891Talk:AutoFS2010-05-07T09:31:18Z<p>Magus: </p>
<hr />
<div>Hi.<br />
<br />
I can only read the cd/dvd drive in root after manually load the module as su.<br />
I have added the command to the script and didn't work.<br />
<br />
Using /media for autoFS seems like a bad idea. It appears to take over the directory and hides any other folders in it, so drives mounted to /media via /etc/fstab will not work properly with autofs mounting to /media. Perhaps we should change this to /media/autofs or something else.<br />
<br />
----<br />
<br />
I've done a major rewrite of the article, added the suggestions above, also added a network mount section and commented ambiguous tweaks from the original article. [[User:Litemotiv|Litemotiv]] 09:21, 15 February 2009 (EST)<br />
<br />
----<br />
<br />
Would it also be possible to cover the use of <tt>autofs</tt> together with NIS? (Or should that go on the [[NIS | page about NIS]]?) - [[User:Magus|Magus]] 05:31, 7 May 2010 (EDT)</div>Magushttps://wiki.archlinux.org/index.php?title=Talk:NIS&diff=105890Talk:NIS2010-05-07T09:25:16Z<p>Magus: </p>
<hr />
<div>I think basic NIS setup is covered by this article now, so I think it can be taken out of the stub category.<br />
:[[User:Magus|Magus]] 05:25, 7 May 2010 (EDT)</div>Magushttps://wiki.archlinux.org/index.php?title=Talk:NIS&diff=105889Talk:NIS2010-05-07T09:24:16Z<p>Magus: Created page with 'I think basic NIS setup is covered by this article now, so I think it can be taken out of the stub category.'</p>
<hr />
<div>I think basic NIS setup is covered by this article now, so I think it can be taken out of the stub category.</div>Magushttps://wiki.archlinux.org/index.php?title=NIS&diff=105888NIS2010-05-07T09:19:33Z<p>Magus: </p>
<hr />
<div>{{stub}}<br />
<br />
=Introduction=<br />
<br />
NIS is a protocol developed by sun to allow one to defer user authentication to a server. The server software is in the ypserv package, and the client software is in the yp-tools package. ypbind-mt is also available, which is a multi threaded version of the client daemon.<br />
<br />
'''Note:''' obviously this article is far from finished. hopefully in the future that will change, but in the meantime check the [[NIS#More resources|More resources section]].<br />
<br />
==How to set up a NIS client==<br />
<br />
The first step is to install the tools that you need. This provides the configuration files and general tools needed to use NIS.<br />
<br />
# pacman -S yp-tools ypbind-mt<br />
<br />
Next add your NIS domain name to the file /etc/conf.d/nisdomainname<br />
<br />
If your NIS domainname has not already been set you can run this command to set it.<br />
<br />
# /bin/domainname nis.domain<br />
<br />
Now edit the /etc/yp.conf file and add your ypserver or nis server.<br />
<br />
ypserver your.nis.server<br />
<br />
Start the rpcbind and ypbind daemons (add them to your [[rc.conf]] file if you want it to start automatically).<br />
<br />
# /etc/rc.d/rpcbind start<br />
# /etc/rc.d/ypbind start<br />
<br />
To test the setup so far you can run the command yptest:<br />
<br />
# yptest<br />
<br />
If it works you will, among other things, see the contents of the NIS user database (which is printed in the same format as /etc/passwd).<br />
<br />
To actually use NIS to log in you have to edit /etc/nsswitch.conf. Modify the lines for passwd, group and shadow to say the following:<br />
<br />
passwd: compat<br />
group: compat<br />
shadow: compat<br />
<br />
See [http://www.tldp.org/HOWTO/NIS-HOWTO/settingup_client.html#AEN313 section 7.5 of The Linux NIS HOWTO] for further information on configuring /etc/nsswitch.conf.<br />
<br />
==More resources==<br />
*[http://www.tldp.org/HOWTO/NIS-HOWTO/ The Linux NIS HOWTO],very helpful and generally applicable to Arch Linux.<br />
*[http://www.yolinux.com/TUTORIALS/NIS.html YoLinux NIS tutorial]<br />
*[http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch30_:_Configuring_NIS Quick HOWTO, Configuring NIS]</div>Magushttps://wiki.archlinux.org/index.php?title=NIS&diff=105887NIS2010-05-07T09:16:29Z<p>Magus: Adding details on testing the NIS setup and configuring nsswitch.conf</p>
<hr />
<div>{{stub}}<br />
<br />
=Introduction=<br />
<br />
NIS is a protocol developed by sun to allow one to defer user authentication to a server. The server software is in the ypserv package, and the client software is in the yp-tools package. ypbind-mt is also available, which is a multi threaded version of the client daemon.<br />
<br />
'''Note:''' obviously this article is far from finished. hopefully in the future that will change, but in the meantime check the [[NIS#More resources|More resources section]].<br />
<br />
==How to Setup NIS client==<br />
<br />
First step is to install the tools that you will need. This will provide you with the configuration files and general tools needed to use NIS.<br />
<br />
# pacman -S yp-tools ypbind-mt<br />
<br />
Next add your NIS domain name to the file /etc/conf.d/nisdomainname<br />
<br />
If your NIS domainname has not already been set you can run this command to set it.<br />
<br />
# /bin/domainname nis.domain<br />
<br />
Now edit the /etc/yp.conf file and add your ypserver or nis server.<br />
<br />
ypserver your.nis.server<br />
<br />
Start the rpcbind and ypbind daemons (add them to your [[rc.conf]] file if you want it to start automatically).<br />
<br />
# /etc/rc.d/rpcbind start<br />
# /etc/rc.d/ypbind start<br />
<br />
To test the setup so far you can run the command yptest:<br />
<br />
# yptest<br />
<br />
If it works you will, among other things, see the contents of the NIS user database (which is printed in the same format as /etc/passwd).<br />
<br />
To actually use NIS to log in edit /etc/nsswitch.conf. Modify the lines for passwd, group and shadow:<br />
<br />
passwd: compat<br />
group: compat<br />
shadow: compat<br />
<br />
See [http://www.tldp.org/HOWTO/NIS-HOWTO/settingup_client.html#AEN313 section 7.5 of The Linux NIS HOWTO] for further information on configuring /etc/nsswitch.conf.<br />
<br />
==More resources==<br />
*[http://www.tldp.org/HOWTO/NIS-HOWTO/ The Linux NIS HOWTO],very helpful and generally applicable to Arch Linux.<br />
*[http://www.yolinux.com/TUTORIALS/NIS.html YoLinux NIS tutorial]<br />
*[http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch30_:_Configuring_NIS Quick HOWTO, Configuring NIS]</div>Magushttps://wiki.archlinux.org/index.php?title=Talk:ASUS_Eee_PC_701&diff=69486Talk:ASUS Eee PC 7012009-05-26T10:01:09Z<p>Magus: /* Info about SSD */</p>
<hr />
<div>=Please Finish this article=<br />
The EEE has been out for quite some time now. Please finalize this entry and get it up to date. It remains too long and somewhat convoluted. Thanks for your efforts. [[User:Misfit138|Misfit138]] 17:10, 11 September 2008 (EDT)<br />
<br />
== Changes to the article ==<br />
<br />
I have made quite a radical changes to the article. Please provided your feedback and comment. Also, please correct any mistakes, weather it is technical or grammatical, that you have found on the article.<br />
<br />
The article need a lot of input from people who use filoktetes kernel26eee. So if you use filoktetes kernel, please contribute.<br />
<br />
I would like to thanks all people who have contributed on this article, to whom without which I wouldn't have gotten this far. Thanks guys! You guys rock! :)<br />
<br />
<br />
<br />
Isn't the filoktetes kernel26eee removed from all repos? I think the article needs some heavy editing in the kernel / kernel modules installation part.<br />
[[User:Ighea|Ighea]] 14:58, 21 March 2008 (EDT)<br />
<br />
==Journaling FS and Temp FS for logs==<br />
It should be noted that the Eee 901 uses ext3 by default for the /home partition. A lot of the "don't use a journaling FS" FUD relates to the early days of solid state devices before hardware level wear-leveling was introduced. [http://wiki.eeeuser.com/ssd_write_limit this eeeuser.com article] looks into the matter in more detail.<br />
<br />
Also see this article: http://www.storagesearch.com/ssdmyths-endurance.html<br />
<br />
Perhaps there should at least be a footnote to the warning not to use a journaling FS and to create the logs partition as a tempfs, with pointers to these articles and a brief mention that SSD flash cards have improved.<br />
<br />
== madwifi-newhal-svn ==<br />
<br />
WiFi works very well with http://aur.archlinux.org/packages.php?ID=17392 No need to patch anymore!<br />
<br />
== Info about SSD ==<br />
<br />
I have added some info regarding SSD and avoiding pitfalls. I know this document is for the standard eee pc, however as all other eee users also must follow this guide, I thought it would be nice to remark the difference of SSD and standard HD.<br />
<br />
=== More info about SSD, please! ===<br />
<br />
How do I as a user see what is SSD and what isn't?<br />
<br />
AFAIU I ''need'' a swap partition in order to have hibernation support. What are my options for this?<br />
<br />
== Keyboard problem ==<br />
<br />
I have an asus eee 701, and I've used this wiki article many times in the past to set up my laptop using the stock kernel, always with good results. <br />
<br />
However this last week I reformatted and started over from scratch, upgrading everything to the newest version, and for some reason my keyboard isn't working at all in Xorg. I tried a second time and once again the mouse and video worked great, but keyboard wouldn't respond at all.<br />
<br />
Has there been a change to xorg which would make this xorg.conf keyboard configurations no longer work? <br />
<br />
Also, I have to remove the 'RgbPath "/usr/share/X11/rgb"' line from xorg.conf. Is there a missing step to install this?<br />
<br />
UPDATE to the above questions: <br />
<br />
I had to add this to my xorg.conf to get the keyboard working<br />
<br />
Section "ServerFlags"<br />
Option "AutoAddDevices" "False"<br />
EndSection<br />
<br />
As for the RgbPath I just commented that out.<br />
<br />
UPDATE to the answer to the above questions:<br />
<br />
Thanks, that worked great. I added the AutoAddDevices false to the article's xorg.conf. Is there any reason why this shouldn't be in by default?<br />
<br />
== Suspend to RAM ==<br />
<br />
There's no mention of suspending in this article. Do I need to do something special to get it working with the hotkey? /etc/acpi/eee.conf says that it will run /etc/acpi/suspend2ram.sh when the lid is closed, but it doesn't. The script itself works. The hotkey doesn't, but then again none of the other hotkeys work. The eee daemon is running. Maybe I'm overlooking something. [[User:AntiNeo|AntiNeo]] 11:18, 2 January 2009 (EST)<br />
<br />
== Generic ACPI script package ==<br />
I created a package to unify ACPI events handling in all models. It is inspired from all other different packages. Its name is [http://aur.archlinux.org/packages.php?ID=23318 acpi-eeepc-generic] and you can find it on [http://aur.archlinux.org/packages.php?ID=23318 AUR].<br />
<br />
Actually it should work on these models: 700, 701, 900, 900A, 901, 904HD, S101, 1000, 1000H and 1000HD. Can somebody with one of these test it on their machine? I only own a 1000 but it works flawlessly here. Please test and report here, directly to me, on the AUR page or on the [[Asus_Eee_PC_1000|1000 wiki entry]]. Thank you! :)<br />
--[[User:big_gie|big_gie]] 12:30, 21 January 2009 (EDT)<br />
<br />
== Wifi configuration ==<br />
Please, will you detail the wifi configuration details: in rc.conf, modules loaded, daemons setting, network settings; if you use netcfg, and how you confgured it; settings of wpa_supplicant.conf. The module used: ath_pci, ath5k, madwifi... ?<br />
I had installed archlinux a few days ago, and I cannont have wifi: no IP is given to wlan0, and then, no wifi!</div>Magushttps://wiki.archlinux.org/index.php?title=DeveloperWiki_talk:UID_/_GID_Database&diff=69082DeveloperWiki talk:UID / GID Database2009-05-22T13:54:05Z<p>Magus: </p>
<hr />
<div>Why should user and group be created at build time? This sounds really weird to me.<br />
Arch packages aren't supposed to be shared? You can very well build a package and not install it immediately.<br />
<br />
In any cases, I think this task definitively needs to be made at install time.<br />
That is why it is always done in scriptlets.<br />
Now what you might want to do is somehow unifying this task inside the scriptlets.<br />
If that's the case, please add your proposal with the two functions there :<br />
[http://bugs.archlinux.org/task/10375 FS#10375]<br />
and maybe edit the wiki accordingly.<br />
--[[User:Shining|shining]] 04:42, 19 May 2008 (EDT)<br />
<br />
== input group ==<br />
<br />
Would you mind adding the following group to the list?:<br />
*input:103<br />
I am using this group to allow access to input events for gizmod in AUR.<br />
<br />
== Add svn user and group ==<br />
<br />
Just a suggestion:<br />
create/reserve UID 44 and GID 44 for snv user ([http://subversion.tigris.org subversion] server)<br />
<br />
== mailman ==<br />
<br />
Can we have UID and GID 97 set aside for mailman? http://www.list.org<br />
<br />
EDIT: 91 is used for video apparently, changed to 97<br />
<br />
== gdm group? ==<br />
<br />
It seems gdm creates a group when installing as well. There's a bug against its current behaviour ([http://bugs.archlinux.org/task/13690 bug 13690]), I really think it should have a group with the same gid as its uid (120).<br />
<br />
== policykit is incomplete ==<br />
<br />
The UID entry for policykit is missing. It creates both a user (102) and a group (102), only the latter is mentioned on the page.<br />
<br />
== pulseaudio ==<br />
<br />
Pulseaudio creates one user (pulse : 130) and three groups (pulse : 130, pulse-access : 131, pulse-rt : 132).<br />
<br />
== system-tools-backends ==<br />
<br />
This package creates a user-level group, there's a bug open for this issue ([http://bugs.archlinux.org/task/14787 bug 14787]).</div>Magushttps://wiki.archlinux.org/index.php?title=DeveloperWiki_talk:UID_/_GID_Database&diff=68454DeveloperWiki talk:UID / GID Database2009-05-08T19:38:47Z<p>Magus: </p>
<hr />
<div>Why should user and group be created at build time? This sounds really weird to me.<br />
Arch packages aren't supposed to be shared? You can very well build a package and not install it immediately.<br />
<br />
In any cases, I think this task definitively needs to be made at install time.<br />
That is why it is always done in scriptlets.<br />
Now what you might want to do is somehow unifying this task inside the scriptlets.<br />
If that's the case, please add your proposal with the two functions there :<br />
[http://bugs.archlinux.org/task/10375 FS#10375]<br />
and maybe edit the wiki accordingly.<br />
--[[User:Shining|shining]] 04:42, 19 May 2008 (EDT)<br />
<br />
== input group ==<br />
<br />
Would you mind adding the following group to the list?:<br />
*input:103<br />
I am using this group to allow access to input events for gizmod in AUR.<br />
<br />
== Add svn user and group ==<br />
<br />
Just a suggestion:<br />
create/reserve UID 44 and GID 44 for snv user ([http://subversion.tigris.org subversion] server)<br />
<br />
== mailman ==<br />
<br />
Can we have UID and GID 97 set aside for mailman? http://www.list.org<br />
<br />
EDIT: 91 is used for video apparently, changed to 97<br />
<br />
== gdm group? ==<br />
<br />
It seems gdm creates a group when installing as well. There's a bug against its current behaviour ([http://bugs.archlinux.org/task/13690 bug 13690]), I really think it should have a group with the same gid as its uid (120).<br />
<br />
== policykit is incomplete ==<br />
<br />
The UID entry for policykit is missing. It creates both a user (102) and a group (102), only the latter is mentioned on the page.<br />
<br />
== pulseaudio ==<br />
<br />
Pulseaudio creates one user (pulse : 130) and three groups (pulse : 130, pulse-access : 131, pulse-rt : 132).</div>Magushttps://wiki.archlinux.org/index.php?title=DeveloperWiki_talk:UID_/_GID_Database&diff=68077DeveloperWiki talk:UID / GID Database2009-05-02T14:42:18Z<p>Magus: Adding comment on pulseaudio</p>
<hr />
<div>Why should user and group be created at build time? This sounds really weird to me.<br />
Arch packages aren't supposed to be shared? You can very well build a package and not install it immediately.<br />
<br />
In any cases, I think this task definitively needs to be made at install time.<br />
That is why it is always done in scriptlets.<br />
Now what you might want to do is somehow unifying this task inside the scriptlets.<br />
If that's the case, please add your proposal with the two functions there :<br />
[http://bugs.archlinux.org/task/10375 FS#10375]<br />
and maybe edit the wiki accordingly.<br />
--[[User:Shining|shining]] 04:42, 19 May 2008 (EDT)<br />
<br />
== input group ==<br />
<br />
Would you mind adding the following group to the list?:<br />
*input:103<br />
I am using this group to allow access to input events for gizmod in AUR.<br />
<br />
== Add svn user and group ==<br />
<br />
Just a suggestion:<br />
create/reserve UID 44 and GID 44 for snv user ([http://subversion.tigris.org subversion] server)<br />
<br />
== mailman ==<br />
<br />
Can we have UID and GID 97 set aside for mailman? http://www.list.org<br />
<br />
EDIT: 91 is used for video apparently, changed to 97<br />
<br />
== gdm group? ==<br />
<br />
It seems gdm creates a group when installing as well. There's a bug against its current behaviour ([http://bugs.archlinux.org/task/13690 bug 13690]), I really think it should have a group with the same gid as its uid (120).<br />
<br />
== policykit is missing ==<br />
<br />
Policy kit is missing from the table, it creates both a user and group with the same name. Currently it installs with a uid of 102. There's a bug against its behaviour when creating the group ([http://bugs.archlinux.org/task/14507 bug 14507]).<br />
<br />
== pulseaudio ==<br />
<br />
Pulseaudio creates one user (pulse : 130) and three groups (pulse : 130, pulse-access : 131, pulse-rt : 132).</div>Magushttps://wiki.archlinux.org/index.php?title=PulseAudio&diff=68071PulseAudio2009-05-02T13:33:25Z<p>Magus: /* Configuration of the ALSA PulseAudio plugin */ the file /etc/asound.conf isn't present by default, added a note that it likely has to be created (for the absolute newbies, like me)</p>
<hr />
<div>[[Category:Sound (English)]]<br />
[[Category:Audio/Video (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|PulseAudio}}<br />
{{i18n_entry|Italiano|PulseAudio (Italiano)}}<br />
{{i18n_entry|Türkçe|PulseAudio (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
= Introduction =<br />
PulseAudio is a sound server for POSIX and Win32 systems. It allows to have multiple programs playing sound at one machine and even more advanced features. PulseAudio is a drop-in replacement for the enlightened sound daemon (esd).<br />
<br />
PulseAudio is '''not''' a drop-in replacement for aRts. If you use KDE 3, it is not currently possible to use PulseAudio.<br />
<br />
This article focuses on the more basic PulseAudio features.<br />
<br />
= Install =<br />
All packages are from the community repository so you need to have it enabled. Then, to install pulseaudio:<br />
# pacman -S pulseaudio <br />
<br />
Optionally you can install some GTK front-ends for PulseAudio (recommended):<br />
# pacman -S padevchooser paman paprefs pavucontrol pavumeter<br />
<br />
For the applications that don't support PulseAudio and support ALSA it's '''recommended''' to install the PulseAudio plugin for alsalibs. This plugin is available in the alsa-plugins package.<br />
# pacman -S alsa-plugins<br />
<br />
== Drop-in replacement for ESD (EsounD) ==<br />
Current GNOME versions have support for starting ESD on session startup. Because PulseAudio can be used as drop-in replacement for ESD you can fool GNOME to load the PulseAudio daemon just like the traditional ESD daemon. To achieve this use the esdcompat script shipped with PulseAudio. Create a symlink from {{Filename|/usr/bin/esd}} to this script: <br />
# ln -sf /usr/bin/esdcompat /usr/bin/esd<br />
That's it. Now GNOME should load and make use of PulseAudio automatically on each login.<br />
<br />
Pulseaudio uses by default a different socket ({{Filename|/tmp/.esd-xxxx}}) as the stock to prevent different users to access the same socket. If you want gnome to start esd (esdcompat actually) automatically as a user you should edit the file {{Filename|/etc/pulse/system.pa}} to make it use the default socket as expected by most gnome apps. Find the line {{Codeline|"load-module module-esound-protocol-unix"}} and edit it as follows:<br />
<br />
load-module module-esound-protocol-unix socket=/tmp/.esd/socket <br />
<br />
This works only if you are the only user of the computer however, as soon as a second user starts gnome on the same computer problems are likely to appear. To have a more general solution for the problem start esdcompat on a server basis. Though I did not have to edit the above line (because my Ubuntu was working fine even without editing the above line, so tried the same with Arch and it worked) but YMMV.<br />
<br />
= Configuring your system for Pulse =<br />
== System-wide daemon (optional) ==<br />
By default, PulseAudio is run per-user and will be started automatically when it is needed. This is simpler, more efficient and more secure. If for some reason you need a system-wide daemon e.g. multiple users log in at the same time, do the following:<br />
<br />
First you need to add the "pulseaudio" daemon to {{Filename|/etc/[[rc.conf]]}}. Example:<br />
DAEMONS=(syslog-ng ipw3945d network netfs crond fam hal '''avahi-daemon''' '''pulseaudio''')<br />
To use the PulseAudio Device Chooser (padevchooser), you might also need to add the 'avahi-daemon' to this list.<br />
<br />
Then you need to add the user(s) to the pulse-access group, even for root (if you want to have sound as root).<br />
# gpasswd -a <user> pulse-access<br />
<br />
== Permissions for per-user daemon ==<br />
It's a good idea to add your user to the pulse-rt group, this can help performance but doesn't seem to be done automatically in installation.<br />
<br />
# gpasswd -a <user> pulse-rt<br />
<br />
== Configuration of the ALSA PulseAudio plugin ==<br />
It's recommended to configure ALSA for PulseAudio, since most applications use ALSA. This is done through the PulseAudio plugin for alsalibs (the ALSA PulseAudio plugin is available through the alsa-plugins package). In order for ALSA to use PulseAudio we need to edit (and most likely create) {{Filename|/etc/asound.conf}} (recommended) or {{Filename|~/.asoundrc}} to have these lines:<br />
pcm.pulse {<br />
type pulse<br />
}<br />
ctl.pulse {<br />
type pulse<br />
}<br />
{{Codeline|pulse}} in {{Codeline|pcm.pulse}} and {{Codeline|ctl.pulse}} is just the name, you can change it but it would change the next steps.<br />
<br />
If you want ALSA to use PulseAudio by default you should also add this to {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:<br />
pcm.!default {<br />
type pulse<br />
}<br />
ctl.!default {<br />
type pulse<br />
}<br />
If you selected pulse to be your default device you need to '''either''' specify the hardware device to PulseAudio in {{Filename|/etc/pulse/system.pa}} example:<br />
load-module module-alsa-sink device=hw:0<br />
load-module module-alsa-source device=hw:0<br />
'''or''' you can use automatic detection using hal with:<br />
load-module module-hal-detect<br />
The above line sholud be there by default in {{Filename|/etc/pulse/system.pa}}, make sure it is uncommented.<br />
<br />
If you haven't configured PulseAudio as the ALSA default, you need to change the ALSA device to "pulse" in the applications that you use to make it work.<br />
<br />
=== Multiple PulseAudio ALSA devices ===<br />
<br />
If you want to use multiple sound cards or multiple virtual PCMs of your sound card (for example, to separate front and rear outputs), you'll need to tell PulseAudio to use multiple ALSA sinks:<br />
load-module module-alsa-sink device=front<br />
load-module module-alsa-sink device=rear<br />
If you want the client to have separate Pulse/ALSA outputs for each device, edit {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:<br />
pcm.pulsefront {<br />
type pulse<br />
device front<br />
}<br />
pcm.pulserear {<br />
type pulse<br />
device rear<br />
}<br />
And specify the appropriate ctl elements:<br />
ctl.pulsefront {<br />
type pulse<br />
device front<br />
}<br />
ctl.pulserear {<br />
type pulse<br />
device rear<br />
}<br />
<br />
== Configuration of GStreamer for PulseAudio ==<br />
To make GStreamer use PulseAudio, you'll need to install the gstreamer0.10-pulse package:<br />
<br />
# pacman -S gstreamer0.10-pulse<br />
<br />
Then, execute {{Codeline|gstreamer-properties}} (part of {{Codeline|gnome-media}} package) and select ''PulseAudio Sound Server'' in both Audio Input and Output. Alternatively, this can be done by setting the gconf variables {{Codeline|/system/gstreamer/0.10/default/audiosink}} to ''pulsesink'' and {{Codeline|/system/gstreamer/0.10/default/audiosrc}} to ''pulsesrc'':<br />
<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc<br />
<br />
== Configuration of the Adobe Flash plugin for PulseAudio ==<br />
{{Note | Adobe Flash starting with version 10 has native PulseAudio support, so there should be no need for libflashsupport-pulse anymore.}}<br />
<br />
The default Adobe Flash plugin for Mozilla doesn't work well with the PulseAudio plugin for ALSA so you'll get no sound but there is a way to make the Flash plugin work with PulseAudio even though you might end up with a little delay.<br />
This is done through libflashsupport-pulse and there is a package for it on the AUR. Link : [http://aur.archlinux.org/packages.php?do_Details=1&ID=13384&O=0&L=0&C=0&K=pulseaudio&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd]<br />
<br />
This lib version should '''correctly''' auto detect PulseAudio and work, if it doesn't we can force it to use PulseAudio. We can do this through the environment variable FLASH_FORCE_PULSEAUDIO and in order for all users to have this working without any trouble we can create the variable at the login of a user. We do this by editing the script {{Filename|/etc/profile.d/libflashsupport.sh}} (create it if it doesn't exist):<br />
export FLASH_FORCE_PULSEAUDIO="1"<br />
# export FLASH_AUDIODEBUG="1" If you want to see debug from the flash audio<br />
# export FLASH_PULSEDEBUG="1" If you want to know the delay from the sound<br />
<br />
If your PulseAudio daemon is running remotely Flash cannot autodetect it. Therefore, you'll need to specify the PULSE_SERVER environment variable:<br />
export PULSE_SERVER=192.168.0.5<br />
replacing the IP address with that of your server, of course.<br />
<br />
It also looks like the new beta version of flashplugin 10 can use pcm_pulse plugin without additional libraries. Get the package for it on the AUR. Link: [http://aur.archlinux.org/packages.php?ID=16993]<br />
<br />
== Configuration of SDL for PulseAudio ==<br />
<br />
Since SDL version 1.2.12, SDL has native pulseaudio support. Add this to your {{Filename|.profile}} or similar: <br />
export SDL_AUDIODRIVER="pulse"<br />
to use it. Other environment variables to configure: set PASERVER to the host of the PulseAudio server and set PADEVICE to the device used on the server. (the "pulse" driver has no support, yet, for reading your pulseaudio configuration, it seems.).<br />
<br />
Or, if this driver does not work for you or if you are using an older version of SDL, <br />
export SDL_AUDIODRIVER="esd"<br />
might do the trick.<br />
<br />
{{Note | You may need to use the ABS to compile SDL with pulseaudio support. Until the quality of the driver is fixed upstream, please use the patch located here: [http://0pointer.de/blog/projects/pa-plugin-for-sdl.html SDL PulseAudio Patch]. It should fix most if not all the sound issues you may be having.}}<br />
<br />
== Configuration of OpenAL for PulseAudio ==<br />
<br />
Games that uses OpenAL can use PulseAudio directly writing this line in {{Filename|~/.openalrc}}:<br />
<br />
(define devices '(esd))<br />
<br />
or alternatively<br />
<br />
(define devices '(alsa))<br />
(define alsa-device "pulse")<br />
<br />
== Configuration of libao for PulseAudio ==<br />
<br />
# pacman -Sy libao-pulse<br />
<br />
Edit {{Filename|/etc/libao.conf}}, add:<br />
<br />
default_driver=pulse<br />
<br />
== Using OSS apps with PulseAudio wrapper ==<br />
<br />
If you have a program that uses OSS you can make it work with PulseAudio by starting it with padsp:<br />
$ padsp OSSprogram<br />
A few examples:<br />
$ padsp aumix<br />
$ padsp sox foo.wav -t ossdsp /dev/dsp<br />
<br />
<br />
If you prefer you can rename the program OSSprogram-real and replace it with a script like this: <br />
#!/bin/sh<br />
if test -x /usr/bin/padsp ; then<br />
exec /usr/bin/padsp /usr/bin/OSSprogram-real "$@"<br />
else<br />
exec /usr/bin/OSSprogram "$@"<br />
fi<br />
<br />
==PulseAudio over network ==<br />
One of PulseAudio's magnificent features is the possibility to stream audio from clients over TCP to the server running the PulseAudio daemon, allowing sound to be streamed through your LAN.<br />
To accomplish this, one needs to enable module-native-protocol-tcp, and copy the pulse-cookie to the clients. <br />
To enable the TCP module, add (or uncomment, if already there) this to {{Filename|/etc/pulse/system.pa}}:<br />
load-module module-native-protocol-tcp<br />
<br />
To allow remote connections to the TCP module, you also have to remember to unblock the service in {{Filename|/etc/hosts.allow}} with for example the following line:<br />
pulseaudio-native: ALL<br />
<br />
If you're running a system-wide PulseAudio instance, which makes sense for networked audio, the cookie is located in {{Filename|/var/run/pulse/.pulse-cookie}}. This cookie needs to be sent to the client and placed somewhere the pulse-access group can read (and with permissions so only they can read it).<br />
<br />
# scp /var/run/pulse/.pulse-cookie client:/etc/pulse-cookie<br />
<br />
# chown pulse:pulse-access /etc/pulse-cookie<br />
# chmod 640 /etc/pulse-cookie<br />
<br />
The pulse client needs to know where to look for the cookie.<br />
{{Filename|/etc/pulse/client.conf}}:<br />
<br />
### Cookie file<br />
cookie-file = /etc/pulse-cookie<br />
<br />
Then the client needs to be configured to connect to the specified server.<br />
{{Filename|/etc/pulse/client.conf}}:<br />
<br />
## The default server to connect to<br />
default-server = 192.168.0.5<br />
<br />
That's it!<br />
<br />
==Pulseaudio through JACK==<br />
The JACK-Audio-Connection-Kit is popular for audio work, and is widely supported by Linux audio applications. It fills a similar niche as Pulseaudio, but with more of an emphasis on professional audio work. In particular, audio applications such as Ardour and Audacity (recently) work well with Jack. Pulseaudio provides module-jack-source and module-jack-sink which allow Pulseaudio to be run as a sound server above the JACK daemon. This allows the usage of per-volume adjustments and the like for the apps which need it, play-back apps for movies and audio, while allowing low-latency and inter-app connectivity for sound-processing apps which connect to JACK.<br />
<br />
To use pulseaudio with JACK, JACK must be started up before pulseaudio, using whichever method you prefer. Pulseaudio then needs to be started loading the 2 relevant modules. Edit your {{Filename|/etc/pulse/default.pa}} (as root, of course), and change the following region:<br />
<br />
### Load audio drivers statically (it's probably better to not load<br />
### these drivers manually, but instead use module-hal-detect --<br />
### see below -- for doing this automatically)<br />
#load-module module-alsa-sink<br />
#load-module module-alsa-source device=hw:1,0<br />
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-null-sink<br />
#load-module module-pipe-sink<br />
<br />
### Automatically load driver modules depending on the hardware available<br />
.ifexists module-hal-detect.so<br />
load-module module-hal-detect<br />
.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack HAL support)<br />
load-module module-detect<br />
.endif<br />
<br />
to the following:<br />
<br />
### Load audio drivers statically (it's probably better to not load<br />
### these drivers manually, but instead use module-hal-detect --<br />
### see below -- for doing this automatically)<br />
#load-module module-alsa-sink<br />
#load-module module-alsa-source device=hw:1,0<br />
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-null-sink<br />
#load-module module-pipe-sink<br />
load-module module-jack-source<br />
load-module module-jack-sink<br />
<br />
### Automatically load driver modules depending on the hardware available<br />
#.ifexists module-hal-detect.so<br />
#load-module module-hal-detect<br />
#.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack HAL support)<br />
#load-module module-detect<br />
#.endif<br />
<br />
Basically, this prevents module-hal-detect from loading. module-hal-detect will always try to grab your sound-card (JACK has already done that, so this will cause an error). Also, the jack source and sink must be explicitly loaded.<br />
<br />
==Pulseaudio from within a chroot (ex. 32-bit chroot in 64-bit install)==<br />
<br />
Since a chroot sets up an alternative root for the running/jailing of applications, pulseaudio must be installed within the chroot itself ({{Codeline|"pacman -S pulseaudio"}} within the chroot environment).<br />
<br />
Pulseaudio, if not set up to connect to any specific server (this can be done in {{Filename|/etc/pulse/client.conf}}, through the PULSE_SERVER environment variable, or through publishing to the local X11 properties using module-x11-publish), will attempt to connect to the local pulse server, failing which it will spawn a new pulse server. Each pulse server has a unique ID based on the machine-id value in {{Filename|/var/lib/dbus}}. To allow for chrooted apps to access the pulse server, the following directories must be mounted within the chroot:-<br />
/var/lib/dbus<br />
/tmp<br />
~/.pulse<br />
{{Filename|/dev/shm}} should also be mounted for efficiency and good performance. Note that mounting /home would normally also allow sharing of the {{Filename|~/.pulse}} folder.<br />
<br />
For specific direction on accomplishing the appropriate mounts, please refer to the wiki on installing a bundled 32-bit system, especially the [http://wiki.archlinux.org/index.php?title=Arch64_Install_bundled_32bit_system#Additional_mount_option_to_allow_32-bit_apps_to_access_the_64-bit_Pulseaudio_server additional section] specific to Pulseaudio.<br />
<br />
= Troubleshooting =<br />
<br />
=== authkey.c: Failed to open cookie file '/home/<user>/.esd_auth': Permission denied ===<br />
If this error message appears in {{Filename|/var/log/errors.log}}, then add:<br />
<br />
if [ -e /var/run/pulse/.esd_auth ]; then<br />
chown pulse:pulse-access /var/run/pulse/.esd_auth<br />
chmod 640 /var/run/pulse/.esd_auth<br />
fi<br />
<br />
before {{Codeline|"add_daemon pulseaudio"}} in {{Filename|/etc/rc.d/pulseaudio}}.<br />
<br />
=== module-x11-publish ===<br />
If PulseAudio fails to start and the messages<br />
x11wrap.c: XOpenDisplay() failed<br />
module.c: Failed to load module "module-x11-publish" (argument: ""): initialization failed.<br />
main.c: Module load failed.<br />
main.c: failed to initialize daemon.<br />
appear in your logs, you need to disable module-x11-publish in {{Filename|/etc/pulse/system.pa}}:<br />
#load-module module-x11-publish<br />
<br />
=== "daemon startup failed" ===<br />
If PulseAudio fails to start as a daemon and the message <br />
E: main.c: daemon startup failed.<br />
appear, you may need to disable the line in {{Filename|/etc/pulse/system.pa}} that reads<br />
.fail<br />
Simply add a "#" as a comment in front of that line.<br />
<br />
=== Glitches and high CPU usage since 0.9.14 ===<br />
The PulseAudio sound server has been rewritten to use timer-based audio scheduling instead of the traditional interrupt-driven approach. Timer-based scheduling may expose issues in some Alsa drivers. To turn timer-based scheduling off, replace the line:<br />
load-module module-hal-detect <br />
in {{Filename|/etc/pulse/default.pa}} by:<br />
load-module module-hal-detect tsched=0<br />
<br />
=== Audacity ===<br />
According to the PulseAudio.org Wiki, Audacity doesn't currently support PulseAudio. Therefore they suggest killing pulseaudio before using it.<br />
[http://www.pulseaudio.org/wiki/PerfectSetup#Audacity look here]<br />
<br />
=== PulseAudio Device Chooser (padevchooser) ===<br />
If you can't launch the PulseAudio Device Chooser, first (re)start the Avahi daemon as follows:<br />
$ sudo /etc/rc.d/avahi-daemon restart<br />
<br />
=== VLC ===<br />
If you are having audio problems with the audio playback of DVDs in VLC, uninstall VLC and install the vlc-nightly package from the AUR, and set the audio output method to {{Codeline|"Pulseaudio"}}.<br />
<br />
=== mpd ===<br />
There is a pulseaudio enabled version of mpd [http://aur.archlinux.org/packages.php?ID=18722 in the AUR]. You will need to add the mpd user to the "pulse-access" group in order for mpd to connect to the daemon.<br />
<br />
=== module-hal-detect ===<br />
If you receive an error message about HAL, module-hal, or something along those lines, you will need to remove module-hal-detect from your {{Filename|/etc/pulse/system.pa}} and explicitely specify the ALSA devices yourself, for example:<br />
load-module module-alsa-sink device=hw:0<br />
load-module module-alsa-source device=hw:0<br />
<br />
=== No sound after install ===<br />
If you experience no audio output via any means while using ALSA as your default device, you may have to unmute your sound card. To do this, you will want to launch alsamixer and make sure each column has a green 00 under it (this can be toggled by pressing 'm')<br />
$ alsamixer -c 0<br />
<br />
Sometimes the snd_pcsp driver conflicts with the snd_hda_intel driver (for those of you<br />
using Intel cards) and no sound output is experienced. To fix this, you can blacklist the<br />
snd_pcsp driver in the MODULES array of {{Filename|/etc/rc.conf}} (by appending {{Codeline|!snd_pcsp}}).<br />
<br />
=== I have a surround sound card, but PulseAudio uses just the front speakers! ===<br />
<br />
Many people have a surround card, but have speakers for just two channels, so PulseAudio can't really default to a surround setup. To enable all the channels, edit {{Filename|/etc/pulse/daemon.conf}}: uncomment the default-sample-channels line (i.e. remove the semicolon from the beginning of the line) and set the value to '''6''' if you have a ''5.1'' setup, or '''8''' if you have ''7.1'' setup etc. After doing the edit, restart pulseaudio daemon. <br />
<br />
# Default<br />
default-sample-channels = 2<br />
# For 5.1<br />
default-sample-channels = 6<br />
# For 7.1<br />
default-sample-channels = 8<br />
<br />
= See also =<br />
*[[Allow multiple programs to play sound at once]]<br />
<br />
= External Links =<br />
*[http://www.pulseaudio.org/wiki/PerfectSetup http://www.pulseaudio.org/wiki/PerfectSetup] - A good guide to make your configuration perfect<br />
*[http://www.alsa-project.org/main/index.php/Asoundrc http://www.alsa-project.org/main/index.php/Asoundrc] - Alsa wiki on .asoundrc<br />
*[http://www.pulseaudio.org/ http://www.pulseaudio.org/] - PulseAudio official site<br />
*[http://mpd.wikia.com/wiki/PulseAudio#Version_0.12.0_and_later http://mpd.wikia.com/wiki/PulseAudio#Version_0.12.0_and_later] - Configuring MPD for PulseAudio<br />
*[http://www.pulseaudio.org/wiki/FAQ http://www.pulseaudio.org/wiki/FAQ] - PulseAudio FAQ</div>Magushttps://wiki.archlinux.org/index.php?title=DeveloperWiki_talk:UID_/_GID_Database&diff=68041DeveloperWiki talk:UID / GID Database2009-05-01T19:06:27Z<p>Magus: Adding comment on gdm and policykit</p>
<hr />
<div>Why should user and group be created at build time? This sounds really weird to me.<br />
Arch packages aren't supposed to be shared? You can very well build a package and not install it immediately.<br />
<br />
In any cases, I think this task definitively needs to be made at install time.<br />
That is why it is always done in scriptlets.<br />
Now what you might want to do is somehow unifying this task inside the scriptlets.<br />
If that's the case, please add your proposal with the two functions there :<br />
[http://bugs.archlinux.org/task/10375 FS#10375]<br />
and maybe edit the wiki accordingly.<br />
--[[User:Shining|shining]] 04:42, 19 May 2008 (EDT)<br />
<br />
== input group ==<br />
<br />
Would you mind adding the following group to the list?:<br />
*input:103<br />
I am using this group to allow access to input events for gizmod in AUR.<br />
<br />
== Add svn user and group ==<br />
<br />
Just a suggestion:<br />
create/reserve UID 44 and GID 44 for snv user ([http://subversion.tigris.org subversion] server)<br />
<br />
== mailman ==<br />
<br />
Can we have UID and GID 97 set aside for mailman? http://www.list.org<br />
<br />
EDIT: 91 is used for video apparently, changed to 97<br />
<br />
== gdm group? ==<br />
<br />
It seems gdm creates a group when installing as well. There's a bug against its current behaviour ([http://bugs.archlinux.org/task/13690 bug 13690]), I really think it should have a group with the same gid as its uid (120).<br />
<br />
== policykit is missing ==<br />
<br />
Policy kit is missing from the table, it creates both a user and group with the same name. Currently it installs with a uid of 102. There's a bug against its behaviour when creating the group ([http://bugs.archlinux.org/task/14507 bug 14507]).</div>Magushttps://wiki.archlinux.org/index.php?title=Fast_Arch_Install_from_existing_Linux_System&diff=8264Fast Arch Install from existing Linux System2006-01-14T10:06:24Z<p>Magus: Modified since Arch doesn't use DevFS anymore.</p>
<hr />
<div>[[Category:Installation]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|Deutsch|Schnellinstallation von einem bestehenden Linuxsystem}}<br />
{{i18n_entry|English|Fast Arch Install from existing Linux System}}<br />
{{i18n_entry|繁體中文|F.在安裝了 Linux 的電腦上快速安裝 Arch}}<br />
{{i18n_links_end}}<br />
<br />
If you are running Linux already and don't have a CD writer or simply want a faster install process, here is how to install from hard drive.<br />
<br />
Read the [http://www.archlinux.org/docs/en/guide/install/arch-install-guide.html Arch Linux Install Guide] first so that you know what to expect.<br />
<br />
You need one '''more''' spare partition, bigger than the Arch CD iso. Here I'm logged in as '''root''' and am using "/dev/hda12" which happens to be 6GB.<br />
<br />
Depending on your boot loader, follow the "LILO" or "GRUB" section. Then the "REBOOT AND INSTALL" section<br />
<br />
==Lilo==<br />
<br />
1) Copy the iso to the spare partition (you can use a plain recursive copy, cp -R instead of dd, dd may sometimes screw the partition):<br />
dd if=arch-0.7.iso of=/dev/hda12<br />
<br />
2) Making or using a suitable mount point, mount the partition somewhere (you can use option -tiso9660 but mount should work it out):<br />
mkdir /mnt/archCD<br />
mount /dev/hda12 /mnt/archCD<br />
<br />
3) Edit lilo.conf and add:<br />
image=/mnt/archCD/isolinux/vmlinuz<br />
label=archCD<br />
initrd=/mnt/archCD/isolinux/initrd.img<br />
append="root=/dev/hda12 BOOTMEDIA=cd"<br />
<br />
then don't forget to run:<br />
lilo<br />
<br />
==Grub==<br />
<br />
I've not been able to boot a hard disk partition containing the Arch iso with grub, instead the iso must first be unpacked to an ordinary partition. This is still quicker than burning a CD:<br />
<br />
1) Format the spare partition and (making or using a suitable mount point) mount it:<br />
<br />
mkreiserfs /dev/hda12<br />
mkdir /mnt/archCD<br />
mount /dev/hda12 /mnt/archCD<br />
<br />
<br />
2) Mount the Arch iso file (making or using a suitable mount point):<br />
mkdir /mnt/tmp<br />
mount -o loop arch-0.7.iso /mnt/tmp<br />
<br />
3) Copy from the iso to the spare partition:<br />
cd /mnt/tmp<br />
cp -a * /mnt/archCD<br />
<br />
4) then modify <code>/boot/grub/menu.lst</code><br />
title ArchCD<br />
kernel (hd0,11)/isolinux/vmlinuz root=/dev/hda12 BOOTMEDIA=cd<br />
initrd (hd0,11)/isolinux/initrd.img<br />
<br />
==Reboot and Install Arch==<br />
<br />
Reboot and select '''archCD''', when the installer asks if you're using CD or SRC, you can hop out to another shell and if you are using lilo:<br />
mount -tiso9660 /dev/hda12 /src<br />
if you are using grub:<br />
mount /dev/hda12 /src<br />
<br />
* replace <code>/dev/hda12</code> with the spare partition you allocated<br />
* remember you can use "tab completion" to find that partition, rather than type the whole thing in<br />
* then hop back and install from hard drive by selecting SRC rather than CD.<br />
<br />
==And to reclaim the spare partition when Arch is up and running...==<br />
<br />
1) The spare partition can be reclaimed by making a file system with "mkreiserfs", "mke2fs" etc. Using hda12 as an example:<br />
mkreiserfs /dev/hda12<br />
<br />
2) Then edit /etc/fstab to check the partition has the correct file system and options listed against it:<br />
/dev/hda12 /mnt/spare reiserfs defaults,noatime,notail,noauto 0 0<br />
<br />
3) Lastly check that the mount point exists, if not:<br />
mkdir /mnt/spare</div>Magushttps://wiki.archlinux.org/index.php?title=Wvdial&diff=6561Wvdial2005-12-08T09:10:22Z<p>Magus: Major re-write. The previous page wasn't entirely correct (it contained extre unnecessary steps) and it only offered one solution.</p>
<hr />
<div>[[Category:Network]]<br />
<br />
There are a few different ways of giving regular users the ability to use <tt>wvdial</tt> to dial a ppp connection. This document describes three different ways, each of them differ in difficulty to set up and the implication on security.<br />
<br />
This document assumes you have <tt>wvdial</tt> properly configured. All the configuration below must be done as <tt>root</tt>.<br />
<br />
==Using <tt>suid</tt>==<br />
<br />
This is arguable the easiest setup but has major impact on system security since it means that ''every user can run wvdial as root''. Please consider using one of the other solutions instead.<br />
<br />
As normal users can't use wvdial to dial a ppp conection by default, you need to change permissions:<br />
<br />
chmod u+s /usr/bin/wvdial<br />
<br />
You should see the following permissions:<br />
<br />
ls -l /usr/bin/wvdial<br />
-rwsr-xr-x 1 root root 114368 2005-12-07 19:21 /usr/bin/wvdial<br />
<br />
==Using a <tt>dialout</tt> group==<br />
<br />
Another, slightly more secure way is to set up a group called <tt>dialout</tt> (you can call the group anything you want really) and give members of this group permission to run <tt>wvdial</tt> as root.<br />
<br />
First create the group and add the users to it:<br />
<br />
groupadd dialout<br />
gpasswd -a myuser dialout<br />
<br />
Then set the group and adjust the permissions on <tt>wvdial</tt>:<br />
<br />
chgrp dialout /usr/bin/wvdial<br />
chmod u+s,o= /usr/bin/wvdial<br />
<br />
You should see the following permissions:<br />
<br />
ls -l /usr/bin/wvdial<br />
-rwsr-x--- 1 root dialout 114368 2005-12-07 19:21 /usr/bin/wvdial<br />
<br />
==Using <tt>sudo</tt>==<br />
<br />
<tt>sudo</tt> arguably offers the most secure option to allow regular users to establish dial-up connections using <tt>wvdial</tt>. It can be used to give permission both on a per-user and group basis. Another benefit of using <tt>sudo</tt> is that you only need to do the setup once, both previous solutions will be "undone" when a new package of <tt>wvdial</tt> is installed.<br />
<br />
This document will not dive into all that <tt>sudo</tt> has to offer, please refer to its man-pages (<tt>sudo</tt>, <tt>sudoers</tt>, <tt>visudo</tt>) for that.<br />
<br />
Use <tt>visudo</tt> to edit the file <tt>/etc/sudoers</tt>:<br />
<br />
visudo<br />
<br />
To give a specific user permission to run <tt>wvdial</tt> as root add the following line (changing the user name of course):<br />
<br />
myuser localhost = /usr/bin/wvdial<br />
<br />
To give all members of a group (<tt>dialout</tt>) the same permission:<br />
<br />
%dialout localhost = /usr/bin/wvdial</div>Magushttps://wiki.archlinux.org/index.php?title=User:Magus&diff=6146User:Magus2005-11-25T16:06:19Z<p>Magus: Creation of the page</p>
<hr />
<div>(There is currently no text in this page)<br />
<br />
It'll be like that for a little while too :)</div>Magushttps://wiki.archlinux.org/index.php?title=Wvdial&diff=6145Wvdial2005-11-25T15:59:05Z<p>Magus: Merged this page with "Dial as a user with WvDial"</p>
<hr />
<div>[[Category:Network]]<br />
As normal users can't use wvdial to dial a ppp conection by default, you need to change some permissions:<br />
<br />
chmod +s /usr/bin/wvdial<br />
chmod +xs /usr/sbin/pppd<br />
<br />
Also make sure that the following files are '''readable by user:'''<br />
<br />
/etc/resolv.conf<br />
/etc/ppp/options<br />
/etc/ppp/resolv.conf<br />
/etc/ppp/peers/wvdial<br />
<br />
For example to set /etc/resolv.conf readable to all users:<br />
<br />
chmod a+r /etc/resolv.conf<br />
<br />
-----<br />
<br />
Another way to do this, in a more controlled enviroment is to set up a group called <tt>dial</tt> or <tt>dialout</tt> and give this group the above permissions and set the above files with this group(s).<br />
<br />
If you can't access the Internet through your dialed connection as user, backup your <tt>/etc/resolv.conf</tt> and make it a symlink to <tt>/etc/ppp/resolv.conf</tt>.</div>Magus